feat: Route to send status broadcast

This commit is contained in:
Davidson Gomes
2023-07-06 13:55:14 -03:00
parent 26b2903995
commit 69c1059644
7 changed files with 94 additions and 3 deletions

View File

@@ -189,6 +189,34 @@ export const pollMessageSchema: JSONSchema7 = {
required: ['pollMessage', 'number'],
};
export const statusMessageSchema: JSONSchema7 = {
$id: v4(),
type: 'object',
properties: {
statusMessage: {
type: 'object',
properties: {
text: { type: 'string' },
backgroundColor: { type: 'string' },
font: { type: 'integer', minimum: 0, maximum: 5 },
statusJidList: {
type: 'array',
minItems: 1,
uniqueItems: true,
items: {
type: 'string',
pattern: '^\\d+',
description: '"statusJidList" must be an array of numeric strings',
},
},
},
required: ['text', 'backgroundColor', 'font', 'statusJidList'],
...isNotEmpty('text', 'backgroundColor', 'font', 'statusJidList'),
},
},
required: ['statusMessage'],
};
export const mediaMessageSchema: JSONSchema7 = {
$id: v4(),
type: 'object',