feat: add support for splitMessages and timePerChar in JSON schema validation for EvolutionBot

This commit is contained in:
Thélio Matheus 2024-10-10 21:51:23 -03:00
parent cd2a687751
commit 41bb7582f2

View File

@ -40,6 +40,8 @@ export const evolutionBotSchema: JSONSchema7 = {
keepOpen: { type: 'boolean' }, keepOpen: { type: 'boolean' },
debounceTime: { type: 'integer' }, debounceTime: { type: 'integer' },
ignoreJids: { type: 'array', items: { type: 'string' } }, ignoreJids: { type: 'array', items: { type: 'string' } },
splitMessages: {type: 'boolean'},
timePerChar: {type: 'integer'}
}, },
required: ['enabled', 'apiUrl', 'triggerType'], required: ['enabled', 'apiUrl', 'triggerType'],
...isNotEmpty('enabled', 'apiUrl', 'triggerType'), ...isNotEmpty('enabled', 'apiUrl', 'triggerType'),
@ -70,6 +72,8 @@ export const evolutionBotSettingSchema: JSONSchema7 = {
debounceTime: { type: 'integer' }, debounceTime: { type: 'integer' },
ignoreJids: { type: 'array', items: { type: 'string' } }, ignoreJids: { type: 'array', items: { type: 'string' } },
botIdFallback: { type: 'string' }, botIdFallback: { type: 'string' },
splitMessages: {type: 'boolean'},
timePerChar: {type: 'integer'}
}, },
required: [ required: [
'expire', 'expire',
@ -81,6 +85,8 @@ export const evolutionBotSettingSchema: JSONSchema7 = {
'keepOpen', 'keepOpen',
'debounceTime', 'debounceTime',
'ignoreJids', 'ignoreJids',
'splitMessages',
'timePerChar'
], ],
...isNotEmpty( ...isNotEmpty(
'expire', 'expire',
@ -92,6 +98,8 @@ export const evolutionBotSettingSchema: JSONSchema7 = {
'keepOpen', 'keepOpen',
'debounceTime', 'debounceTime',
'ignoreJids', 'ignoreJids',
'splitMessages',
'timePerChar'
), ),
}; };