n8n-nodes-digitalsac 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -211,7 +211,6 @@ Onde:
211
211
  - `copy`: Copia texto para área de transferência
212
212
  - `call`: Inicia uma chamada telefônica
213
213
 
214
- <!-- TEMPORARIAMENTE DESABILITADO - ENVIAR LISTA
215
214
  ### 📋 Enviar Lista
216
215
  1. Selecione a operação **Enviar Lista**
217
216
  2. No campo **Parâmetro**, insira o UUID da conexão
@@ -268,7 +267,6 @@ Onde:
268
267
  }
269
268
  ]
270
269
  ```
271
- -->
272
270
 
273
271
  ### 🖼️ Enviar Mídia com Caption
274
272
  1. **Conecte um nó com arquivo** (ex: HTTP Request, Read Binary File, Google Drive)
@@ -37,7 +37,7 @@ class Digitalsac {
37
37
  { name: 'Fechar Ticket', value: 'closeTicket' },
38
38
  { name: 'Enviar Mensagem', value: 'sendMessage' },
39
39
  { name: 'Enviar Botões', value: 'sendButtons' },
40
- // { name: 'Enviar Lista', value: 'sendList' }, // TEMPORARIAMENTE DESABILITADO
40
+ { name: 'Enviar Lista', value: 'sendList' },
41
41
  { name: 'Enviar Mídia com Caption', value: 'sendMediaCaption' },
42
42
  { name: 'Enviar Base64', value: 'sendBase64' },
43
43
  { name: 'Listar Tags', value: 'listTags' },
@@ -65,7 +65,7 @@ class Digitalsac {
65
65
  default: '',
66
66
  displayOptions: {
67
67
  show: {
68
- operation: ['validateWhatsapp', 'validateCpf', 'sendMessage', 'sendButtons', /* 'sendList', */ 'sendMediaCaption', 'sendBase64'],
68
+ operation: ['validateWhatsapp', 'validateCpf', 'sendMessage', 'sendButtons', 'sendList', 'sendMediaCaption', 'sendBase64'],
69
69
  },
70
70
  },
71
71
  description: 'Número, CPF ou UUID da conexão (conforme operação)',
@@ -113,7 +113,7 @@ class Digitalsac {
113
113
  default: 'Digitalsac123',
114
114
  displayOptions: {
115
115
  show: {
116
- operation: ['sendMessage', 'sendButtons', /* 'sendList', */ 'sendMediaCaption', 'sendBase64'],
116
+ operation: ['sendMessage', 'sendButtons', 'sendList', 'sendMediaCaption', 'sendBase64'],
117
117
  },
118
118
  },
119
119
  description: 'Identificador único opcional para a mensagem',
@@ -167,8 +167,7 @@ class Digitalsac {
167
167
  },
168
168
  description: 'Array de botões em formato JSON',
169
169
  },
170
- // Campos para Enviar Lista - TEMPORARIAMENTE DESABILITADO
171
- /*
170
+ // Campos para Enviar Lista
172
171
  {
173
172
  displayName: 'Título',
174
173
  name: 'listTitle',
@@ -241,7 +240,6 @@ class Digitalsac {
241
240
  },
242
241
  description: 'Array de seções da lista em formato JSON',
243
242
  },
244
- */
245
243
  // Campos para Enviar Mídia com Caption
246
244
  {
247
245
  displayName: 'Caption',
@@ -1034,32 +1032,27 @@ class Digitalsac {
1034
1032
  json: true,
1035
1033
  };
1036
1034
  break;
1037
- // TEMPORARIAMENTE DESABILITADO - sendList
1038
- /*
1039
1035
  case 'sendList':
1040
1036
  // Validar se o UUID foi fornecido
1041
1037
  if (!param || param.trim() === '') {
1042
1038
  throw new Error('UUID da conexão é obrigatório para enviar lista. Preencha o campo "Parâmetro" com o UUID da conexão.');
1043
1039
  }
1044
-
1045
1040
  url = `/v1/api/external/${param}/send-list`;
1046
1041
  method = 'POST';
1047
-
1048
- const listTitle = this.getNodeParameter('listTitle', i) as string;
1049
- const listText = this.getNodeParameter('listText', i) as string;
1050
- const listButtonText = this.getNodeParameter('listButtonText', i) as string;
1051
- const listFooter = this.getNodeParameter('listFooter', i) as string;
1052
- const listPhoneNumber = this.getNodeParameter('listPhoneNumber', i) as string;
1053
- const listExternalKey = this.getNodeParameter('externalKey', i) as string;
1054
- const sectionsData = this.getNodeParameter('sectionsData', i) as string;
1055
-
1042
+ const listTitle = this.getNodeParameter('listTitle', i);
1043
+ const listText = this.getNodeParameter('listText', i);
1044
+ const listButtonText = this.getNodeParameter('listButtonText', i);
1045
+ const listFooter = this.getNodeParameter('listFooter', i);
1046
+ const listPhoneNumber = this.getNodeParameter('listPhoneNumber', i);
1047
+ const listExternalKey = this.getNodeParameter('externalKey', i);
1048
+ const sectionsData = this.getNodeParameter('sectionsData', i);
1056
1049
  let parsedSections;
1057
1050
  try {
1058
1051
  parsedSections = JSON.parse(sectionsData);
1059
- } catch (error) {
1052
+ }
1053
+ catch (error) {
1060
1054
  throw new Error('Erro ao fazer parse do JSON das seções. Verifique a sintaxe.');
1061
1055
  }
1062
-
1063
1056
  body = {
1064
1057
  title: listTitle,
1065
1058
  text: listText,
@@ -1069,7 +1062,6 @@ class Digitalsac {
1069
1062
  sections: parsedSections,
1070
1063
  externalKey: listExternalKey
1071
1064
  };
1072
-
1073
1065
  headers['Content-Type'] = 'application/json';
1074
1066
  options = {
1075
1067
  method,
@@ -1079,7 +1071,6 @@ class Digitalsac {
1079
1071
  json: true,
1080
1072
  };
1081
1073
  break;
1082
- */
1083
1074
  case 'sendMediaCaption':
1084
1075
  // Validar se o UUID foi fornecido
1085
1076
  if (!param || param.trim() === '') {
@@ -42,10 +42,10 @@ export class Digitalsac implements INodeType {
42
42
  { name: 'Transferir para Fila', value: 'transferQueue' },
43
43
  { name: 'Transferir para Atendente', value: 'transferAgent' },
44
44
  { name: 'Fechar Ticket', value: 'closeTicket' },
45
- { name: 'Enviar Mensagem', value: 'sendMessage' },
46
- { name: 'Enviar Botões', value: 'sendButtons' },
47
- // { name: 'Enviar Lista', value: 'sendList' }, // TEMPORARIAMENTE DESABILITADO
48
- { name: 'Enviar Mídia com Caption', value: 'sendMediaCaption' },
45
+ { name: 'Enviar Mensagem', value: 'sendMessage' },
46
+ { name: 'Enviar Botões', value: 'sendButtons' },
47
+ { name: 'Enviar Lista', value: 'sendList' },
48
+ { name: 'Enviar Mídia com Caption', value: 'sendMediaCaption' },
49
49
  { name: 'Enviar Base64', value: 'sendBase64' },
50
50
  { name: 'Listar Tags', value: 'listTags' },
51
51
  { name: 'Vincular Tag', value: 'linkTag' },
@@ -72,7 +72,7 @@ export class Digitalsac implements INodeType {
72
72
  default: '',
73
73
  displayOptions: {
74
74
  show: {
75
- operation: ['validateWhatsapp', 'validateCpf', 'sendMessage', 'sendButtons', /* 'sendList', */ 'sendMediaCaption', 'sendBase64'],
75
+ operation: ['validateWhatsapp', 'validateCpf', 'sendMessage', 'sendButtons', 'sendList', 'sendMediaCaption', 'sendBase64'],
76
76
  },
77
77
  },
78
78
  description: 'Número, CPF ou UUID da conexão (conforme operação)',
@@ -120,7 +120,7 @@ export class Digitalsac implements INodeType {
120
120
  default: 'Digitalsac123',
121
121
  displayOptions: {
122
122
  show: {
123
- operation: ['sendMessage', 'sendButtons', /* 'sendList', */ 'sendMediaCaption', 'sendBase64'],
123
+ operation: ['sendMessage', 'sendButtons', 'sendList', 'sendMediaCaption', 'sendBase64'],
124
124
  },
125
125
  },
126
126
  description: 'Identificador único opcional para a mensagem',
@@ -174,8 +174,7 @@ export class Digitalsac implements INodeType {
174
174
  },
175
175
  description: 'Array de botões em formato JSON',
176
176
  },
177
- // Campos para Enviar Lista - TEMPORARIAMENTE DESABILITADO
178
- /*
177
+ // Campos para Enviar Lista
179
178
  {
180
179
  displayName: 'Título',
181
180
  name: 'listTitle',
@@ -248,7 +247,6 @@ export class Digitalsac implements INodeType {
248
247
  },
249
248
  description: 'Array de seções da lista em formato JSON',
250
249
  },
251
- */
252
250
  // Campos para Enviar Mídia com Caption
253
251
  {
254
252
  displayName: 'Caption',
@@ -1070,8 +1068,6 @@ export class Digitalsac implements INodeType {
1070
1068
  json: true,
1071
1069
  };
1072
1070
  break;
1073
- // TEMPORARIAMENTE DESABILITADO - sendList
1074
- /*
1075
1071
  case 'sendList':
1076
1072
  // Validar se o UUID foi fornecido
1077
1073
  if (!param || param.trim() === '') {
@@ -1115,7 +1111,6 @@ export class Digitalsac implements INodeType {
1115
1111
  json: true,
1116
1112
  };
1117
1113
  break;
1118
- */
1119
1114
  case 'sendMediaCaption':
1120
1115
  // Validar se o UUID foi fornecido
1121
1116
  if (!param || param.trim() === '') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-digitalsac",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Izing Pro Digitalsac",
5
5
  "keywords": [
6
6
  "n8n",