feat: Added update message endpoint

This commit is contained in:
Davidson Gomes
2024-01-03 10:18:20 -03:00
parent a446df4620
commit 7373eea842
6 changed files with 71 additions and 0 deletions

View File

@@ -592,6 +592,26 @@ export const profileStatusSchema: JSONSchema7 = {
...isNotEmpty('status'),
};
export const updateMessageSchema: JSONSchema7 = {
$id: v4(),
type: 'object',
properties: {
number: { type: 'string' },
text: { type: 'string' },
key: {
type: 'object',
properties: {
id: { type: 'string' },
remoteJid: { type: 'string' },
fromMe: { type: 'boolean', enum: [true, false] },
},
required: ['id', 'fromMe', 'remoteJid'],
...isNotEmpty('id', 'remoteJid'),
},
},
...isNotEmpty('number', 'text', 'key'),
};
export const profilePictureSchema: JSONSchema7 = {
$id: v4(),
type: 'object',