n8n-nodes-digitalsac 0.5.6 → 0.5.7

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.
@@ -85,6 +85,22 @@ class Digitalsac {
85
85
  },
86
86
  description: 'ID do usuário para listar kanbans',
87
87
  },
88
+ {
89
+ displayName: 'Formato de Resposta',
90
+ name: 'agentsFormat',
91
+ type: 'options',
92
+ options: [
93
+ { name: 'JSON Completo (Recomendado)', value: 'json' },
94
+ { name: 'Texto Formatado (Compatibilidade)', value: 'string' },
95
+ ],
96
+ default: 'json',
97
+ displayOptions: {
98
+ show: {
99
+ operation: ['listAgents'],
100
+ },
101
+ },
102
+ description: 'Formato de retorno: JSON completo com todos os campos (id, name, email, phoneNumber, status, profile, isOnline, isActive, isMaster) ou texto formatado para compatibilidade',
103
+ },
88
104
  {
89
105
  displayName: 'Corpo da Mensagem',
90
106
  name: 'messageBody',
@@ -746,7 +762,11 @@ class Digitalsac {
746
762
  url = '/typebot/listar_filas';
747
763
  break;
748
764
  case 'listAgents':
765
+ const agentsFormat = this.getNodeParameter('agentsFormat', i, 'json');
749
766
  url = '/typebot/listar_atendentes';
767
+ if (agentsFormat === 'string') {
768
+ url += '?format=string';
769
+ }
750
770
  break;
751
771
  case 'transferQueue':
752
772
  url = '/typebot/transferir_para_fila';
@@ -80,18 +80,34 @@ export class Digitalsac implements INodeType {
80
80
  },
81
81
  description: 'Número, CPF ou UUID da conexão (conforme operação)',
82
82
  },
83
- {
84
- displayName: 'User ID',
85
- name: 'userId',
86
- type: 'number',
87
- default: 1,
88
- displayOptions: {
89
- show: {
90
- operation: ['listKanbans'],
91
- },
83
+ {
84
+ displayName: 'User ID',
85
+ name: 'userId',
86
+ type: 'number',
87
+ default: 1,
88
+ displayOptions: {
89
+ show: {
90
+ operation: ['listKanbans'],
91
+ },
92
+ },
93
+ description: 'ID do usuário para listar kanbans',
94
+ },
95
+ {
96
+ displayName: 'Formato de Resposta',
97
+ name: 'agentsFormat',
98
+ type: 'options',
99
+ options: [
100
+ { name: 'JSON Completo (Recomendado)', value: 'json' },
101
+ { name: 'Texto Formatado (Compatibilidade)', value: 'string' },
102
+ ],
103
+ default: 'json',
104
+ displayOptions: {
105
+ show: {
106
+ operation: ['listAgents'],
92
107
  },
93
- description: 'ID do usuário para listar kanbans',
94
108
  },
109
+ description: 'Formato de retorno: JSON completo com todos os campos (id, name, email, phoneNumber, status, profile, isOnline, isActive, isMaster) ou texto formatado para compatibilidade',
110
+ },
95
111
  {
96
112
  displayName: 'Corpo da Mensagem',
97
113
  name: 'messageBody',
@@ -753,12 +769,16 @@ export class Digitalsac implements INodeType {
753
769
  json: true,
754
770
  };
755
771
  break;
756
- case 'listQueues':
757
- url = '/typebot/listar_filas';
758
- break;
759
- case 'listAgents':
760
- url = '/typebot/listar_atendentes';
761
- break;
772
+ case 'listQueues':
773
+ url = '/typebot/listar_filas';
774
+ break;
775
+ case 'listAgents':
776
+ const agentsFormat = this.getNodeParameter('agentsFormat', i, 'json') as string;
777
+ url = '/typebot/listar_atendentes';
778
+ if (agentsFormat === 'string') {
779
+ url += '?format=string';
780
+ }
781
+ break;
762
782
  case 'transferQueue':
763
783
  url = '/typebot/transferir_para_fila';
764
784
  method = 'POST';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-digitalsac",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Izing Pro Digitalsac",
5
5
  "keywords": [
6
6
  "n8n",