@@ -457,11 +457,16 @@ export const buttonsMessageSchema: JSONSchema7 = {
457457 required : [ 'number' ] ,
458458} ;
459459
460+ < < < << << HEAD
460461export const carouselMessageSchema : JSONSchema7 = {
462+ === === =
463+ export const productMessageSchema : JSONSchema7 = {
464+ > >>> >>> 97 a314b9 ( feat ( messages ) : add sendProduct endpoint for WhatsApp Business catalog cards )
461465 $id : v4 ( ) ,
462466 type : 'object' ,
463467 properties : {
464468 number : { ...numberDefinition } ,
469+ < << << << HEAD
465470 body : { type : 'string' , minLength : 1 } ,
466471 cards : {
467472 type : 'array' ,
@@ -536,4 +541,26 @@ export const decryptPollVoteSchema: JSONSchema7 = {
536541 remoteJid : { type : 'string' } ,
537542 } ,
538543 required : [ 'message' , 'remoteJid' ] ,
544+ = === ===
545+ productId : { type : 'string' , minLength : 1 } ,
546+ businessOwnerJid : {
547+ type : 'string' ,
548+ pattern : '^[0-9]+@s[.]whatsapp[.]net$' ,
549+ description : '"businessOwnerJid" must look like "<phone>@s.whatsapp.net"' ,
550+ } ,
551+ productImage : { type : 'string' , minLength : 1 } ,
552+ retailerId : { type : 'string' } ,
553+ title : { type : 'string' } ,
554+ description : { type : 'string' } ,
555+ currencyCode : { type : 'string' , minLength : 3 , maxLength : 3 } ,
556+ priceAmount1000 : { type : 'integer' , minimum : 0 } ,
557+ url : { type : 'string' } ,
558+ productImageCount : { type : 'integer' , minimum : 1 } ,
559+ caption : { type : 'string' } ,
560+ delay : { type : 'integer' , description : 'Enter a value in milliseconds' } ,
561+ quoted : { ...quotedOptionsSchema } ,
562+ } ,
563+ required : [ 'number' , 'productId' , 'businessOwnerJid' , 'productImage' ] ,
564+ ...isNotEmpty ( 'number', 'productId ', 'businessOwnerJid ', 'productImage ') ,
565+ > >>> >>> 97 a314b9 ( feat ( messages ) : add sendProduct endpoint for WhatsApp Business catalog cards )
539566} ;
0 commit comments