From 2b8b6b086b56125d2511ee8e743d99293f19bb56 Mon Sep 17 00:00:00 2001 From: Luis-Fernando <136400011+Azzybot@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:59:54 -0300 Subject: [PATCH] =?UTF-8?q?Removido=20obrigatoriedade=20de=20descri=C3=A7?= =?UTF-8?q?=C3=A3o=20dos=20rows=20do=20sendList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removida a obrigatoriedade da descrição do rows para ser algo opcional. Isso permite os "circulos" das opções ficarem mais alinhados com os titulos sem a necessidade de adicionar espaço em branco caso não queira adicionar a descrição. { "number": "559999999999 (Recipient number with Country Code)", "options": { "delay": 1200, "presence": "composing" }, "listMessage": { "title": "List Title", "description": "List description", "buttonText": "Click Here", "footerText": "footer list\nhttps://examplelink.com.br", "sections": [ { "title": "Row tilte 01", "rows": [ { "title": "Title row 01", "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", "rowId": "rowId 001" }, { "title": "Title row 02", "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", "rowId": "rowId 002" } ] } } Depois: { "number": "559999999999 (Recipient number with Country Code)", "options": { "delay": 1200, "presence": "composing" }, "listMessage": { "title": "List Title", "description": "List description", "buttonText": "Click Here", "footerText": "footer list\nhttps://examplelink.com.br", "sections": [ { "title": "Row tilte 01", "rows": [ { "title": "Title row 01", // "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", //podendo remover por completo como foi feito no Title row 02 abaixo ou apenas comentar a descrição "rowId": "rowId 001" }, { "title": "Title row 02", "rowId": "rowId 002" } ] } } --- src/validate/validate.schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validate/validate.schema.ts b/src/validate/validate.schema.ts index 82bb8902..b723826a 100644 --- a/src/validate/validate.schema.ts +++ b/src/validate/validate.schema.ts @@ -406,7 +406,7 @@ export const listMessageSchema: JSONSchema7 = { description: { type: 'string' }, rowId: { type: 'string' }, }, - required: ['title', 'description', 'rowId'], + required: ['title', 'rowId'], ...isNotEmpty('title', 'description', 'rowId'), }, },