@@ -58,6 +58,7 @@ export const instanceNameSchema: JSONSchema7 = {
5858 } ,
5959 } ,
6060 qrcode : { type : 'boolean' , enum : [ true , false ] } ,
61+ number : { type : 'string' , pattern : '^\\d+[\\.@\\w-]+' } ,
6162 token : { type : 'string' } ,
6263 } ,
6364 ...isNotEmpty ( 'instanceName' ) ,
@@ -123,7 +124,7 @@ const optionsSchema: JSONSchema7 = {
123124
124125const numberDefinition : JSONSchema7Definition = {
125126 type : 'string' ,
126- pattern : '^\\d+[\\.@\\w-]+' ,
127+ // pattern: '^\\d+[\\.@\\w-]+',
127128 description : 'Invalid format' ,
128129} ;
129130
@@ -398,7 +399,7 @@ export const contactMessageSchema: JSONSchema7 = {
398399 email : { type : 'string' } ,
399400 url : { type : 'string' } ,
400401 } ,
401- required : [ 'fullName' , 'wuid' , ' phoneNumber'] ,
402+ required : [ 'fullName' , 'phoneNumber' ] ,
402403 ...isNotEmpty ( 'fullName' ) ,
403404 } ,
404405 minItems : 1 ,
@@ -445,7 +446,7 @@ export const whatsappNumberSchema: JSONSchema7 = {
445446 uniqueItems : true ,
446447 items : {
447448 type : 'string' ,
448- pattern : '^\\d+' ,
449+ // pattern: '^\\d+',
449450 description : '"numbers" must be an array of numeric strings' ,
450451 } ,
451452 } ,
@@ -587,6 +588,17 @@ export const profilePictureSchema: JSONSchema7 = {
587588 } ,
588589} ;
589590
591+ export const profileSchema : JSONSchema7 = {
592+ type : 'object' ,
593+ properties : {
594+ wuid : { type : 'string' } ,
595+ name : { type : 'string' } ,
596+ picture : { type : 'string' } ,
597+ status : { type : 'string' } ,
598+ isBusiness : { type : 'boolean' } ,
599+ } ,
600+ } ;
601+
590602export const messageValidateSchema : JSONSchema7 = {
591603 $id : v4 ( ) ,
592604 type : 'object' ,
@@ -865,3 +877,15 @@ export const chatwootSchema: JSONSchema7 = {
865877 required : [ 'enabled' , 'account_id' , 'token' , 'url' , 'sign_msg' ] ,
866878 ...isNotEmpty ( 'account_id' , 'token' , 'url' , 'sign_msg' ) ,
867879} ;
880+
881+ export const settingsSchema : JSONSchema7 = {
882+ $id : v4 ( ) ,
883+ type : 'object' ,
884+ properties : {
885+ reject_call : { type : 'boolean' , enum : [ true , false ] } ,
886+ msg_call : { type : 'string' } ,
887+ groups_ignore : { type : 'boolean' , enum : [ true , false ] } ,
888+ } ,
889+ required : [ 'reject_call' ] ,
890+ ...isNotEmpty ( 'reject_call' ) ,
891+ } ;
0 commit comments