From 41bb7582f23cf9888365972e8320ee9979dfd7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9lio=20Matheus?= Date: Thu, 10 Oct 2024 21:51:23 -0300 Subject: [PATCH] feat: add support for splitMessages and timePerChar in JSON schema validation for EvolutionBot --- .../chatbot/evolutionBot/validate/evolutionBot.schema.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/api/integrations/chatbot/evolutionBot/validate/evolutionBot.schema.ts b/src/api/integrations/chatbot/evolutionBot/validate/evolutionBot.schema.ts index 2c5fc752..e80ef5cf 100644 --- a/src/api/integrations/chatbot/evolutionBot/validate/evolutionBot.schema.ts +++ b/src/api/integrations/chatbot/evolutionBot/validate/evolutionBot.schema.ts @@ -40,6 +40,8 @@ export const evolutionBotSchema: JSONSchema7 = { keepOpen: { type: 'boolean' }, debounceTime: { type: 'integer' }, ignoreJids: { type: 'array', items: { type: 'string' } }, + splitMessages: {type: 'boolean'}, + timePerChar: {type: 'integer'} }, required: ['enabled', 'apiUrl', 'triggerType'], ...isNotEmpty('enabled', 'apiUrl', 'triggerType'), @@ -70,6 +72,8 @@ export const evolutionBotSettingSchema: JSONSchema7 = { debounceTime: { type: 'integer' }, ignoreJids: { type: 'array', items: { type: 'string' } }, botIdFallback: { type: 'string' }, + splitMessages: {type: 'boolean'}, + timePerChar: {type: 'integer'} }, required: [ 'expire', @@ -81,6 +85,8 @@ export const evolutionBotSettingSchema: JSONSchema7 = { 'keepOpen', 'debounceTime', 'ignoreJids', + 'splitMessages', + 'timePerChar' ], ...isNotEmpty( 'expire', @@ -92,6 +98,8 @@ export const evolutionBotSettingSchema: JSONSchema7 = { 'keepOpen', 'debounceTime', 'ignoreJids', + 'splitMessages', + 'timePerChar' ), };