@@ -457,16 +457,11 @@ export const buttonsMessageSchema: JSONSchema7 = {
457457 required : [ 'number' ] ,
458458} ;
459459
460- < < < << << HEAD
461460export const carouselMessageSchema : JSONSchema7 = {
462- === === =
463- export const productMessageSchema : JSONSchema7 = {
464- > >>> >>> 97 a314b9 ( feat ( messages ) : add sendProduct endpoint for WhatsApp Business catalog cards )
465461 $id : v4 ( ) ,
466462 type : 'object' ,
467463 properties : {
468464 number : { ...numberDefinition } ,
469- < << << << HEAD
470465 body : { type : 'string' , minLength : 1 } ,
471466 cards : {
472467 type : 'array' ,
@@ -486,7 +481,7 @@ export const productMessageSchema: JSONSchema7 = {
486481 items : {
487482 type : 'object' ,
488483 properties : {
489- type : { type : 'string' , enum : [ 'reply' , 'copy' , 'url' , 'call' ] } ,
484+ type : { type : 'string' , enum : [ 'reply' , 'copy' , 'url' , 'call' , 'pix' ] } ,
490485 displayText : { type : 'string' } ,
491486 id : { type : 'string' } ,
492487 url : { type : 'string' } ,
@@ -506,7 +501,7 @@ export const productMessageSchema: JSONSchema7 = {
506501 description : 'Enter a value in milliseconds' ,
507502 } ,
508503 quoted : { ...quotedOptionsSchema } ,
509- everyOne : { type : 'boolean' , enum : [ true , false ] } ,
504+ mentionsEveryOne : { type : 'boolean' , enum : [ true , false ] } ,
510505 mentioned : {
511506 type : 'array' ,
512507 minItems : 1 ,
@@ -521,27 +516,11 @@ export const productMessageSchema: JSONSchema7 = {
521516 required : [ 'number' , 'body' , 'cards' ] ,
522517} ;
523518
524- export const decryptPollVoteSchema : JSONSchema7 = {
519+ export const productMessageSchema : JSONSchema7 = {
525520 $id : v4 ( ) ,
526521 type : 'object' ,
527522 properties : {
528- message : {
529- type : 'object' ,
530- properties : {
531- key : {
532- type : 'object' ,
533- properties : {
534- id : { type : 'string' } ,
535- } ,
536- required : [ 'id' ] ,
537- } ,
538- } ,
539- required : [ 'key' ] ,
540- } ,
541- remoteJid : { type : 'string' } ,
542- } ,
543- required : [ 'message' , 'remoteJid' ] ,
544- = === ===
523+ number : { ...numberDefinition } ,
545524 productId : { type : 'string' , minLength : 1 } ,
546525 businessOwnerJid : {
547526 type : 'string' ,
@@ -559,8 +538,40 @@ export const decryptPollVoteSchema: JSONSchema7 = {
559538 caption : { type : 'string' } ,
560539 delay : { type : 'integer' , description : 'Enter a value in milliseconds' } ,
561540 quoted : { ...quotedOptionsSchema } ,
541+ mentionsEveryOne : { type : 'boolean' , enum : [ true , false ] } ,
542+ mentioned : {
543+ type : 'array' ,
544+ minItems : 1 ,
545+ uniqueItems : true ,
546+ items : {
547+ type : 'string' ,
548+ pattern : '^\\d+' ,
549+ description : '"mentioned" must be an array of numeric strings' ,
550+ } ,
551+ } ,
562552 } ,
563553 required : [ 'number' , 'productId' , 'businessOwnerJid' , 'productImage' ] ,
564554 ...isNotEmpty ( 'number' , 'productId' , 'businessOwnerJid' , 'productImage' ) ,
565- > >>> >>> 97 a314b9 ( feat ( messages ) : add sendProduct endpoint for WhatsApp Business catalog cards )
555+ } ;
556+
557+ export const decryptPollVoteSchema : JSONSchema7 = {
558+ $id : v4 ( ) ,
559+ type : 'object' ,
560+ properties : {
561+ message : {
562+ type : 'object' ,
563+ properties : {
564+ key : {
565+ type : 'object' ,
566+ properties : {
567+ id : { type : 'string' } ,
568+ } ,
569+ required : [ 'id' ] ,
570+ } ,
571+ } ,
572+ required : [ 'key' ] ,
573+ } ,
574+ remoteJid : { type : 'string' } ,
575+ } ,
576+ required : [ 'message' , 'remoteJid' ] ,
566577} ;
0 commit comments