feat: Added group invitation sending and Added webhook configuration per event in the individual instance registration

This commit is contained in:
Davidson Gomes
2023-06-28 10:29:24 -03:00
parent 77bde5325e
commit bca830dc54
20 changed files with 174 additions and 203 deletions

View File

@@ -27,6 +27,7 @@ export const instanceNameSchema: JSONSchema7 = {
properties: {
instanceName: { type: 'string' },
webhook: { type: 'string' },
webhook_by_events: { type: 'boolean' },
events: {
type: 'array',
minItems: 1,
@@ -665,6 +666,28 @@ export const groupJidSchema: JSONSchema7 = {
...isNotEmpty('groupJid'),
};
export const groupSendInviteSchema: JSONSchema7 = {
$id: v4(),
type: 'object',
properties: {
groupJid: { type: 'string' },
description: { type: 'string' },
numbers: {
type: 'array',
minItems: 1,
uniqueItems: true,
items: {
type: 'string',
minLength: 10,
pattern: '\\d+',
description: '"numbers" must be an array of numeric strings',
},
},
},
required: ['groupJid', 'description', 'numbers'],
...isNotEmpty('groupJid', 'description', 'numbers'),
};
export const groupInviteSchema: JSONSchema7 = {
$id: v4(),
type: 'object',