n8n-nodes-nero-crm 1.0.0
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 +105 -0
- package/dist/credentials/NeroCrmApi.credentials.d.ts +9 -0
- package/dist/credentials/NeroCrmApi.credentials.js +56 -0
- package/dist/credentials/NeroCrmApi.credentials.js.map +1 -0
- package/dist/credentials/NexoCrmApi.credentials.d.ts +9 -0
- package/dist/credentials/NexoCrmApi.credentials.js +56 -0
- package/dist/credentials/NexoCrmApi.credentials.js.map +1 -0
- package/dist/nodes/NeroCrm/NeroCrm.node.d.ts +5 -0
- package/dist/nodes/NeroCrm/NeroCrm.node.js +635 -0
- package/dist/nodes/NeroCrm/NeroCrm.node.js.map +1 -0
- package/dist/nodes/NeroCrm/nerocrm.svg +10 -0
- package/dist/nodes/NexoCrm/NexoCrm.node.d.ts +5 -0
- package/dist/nodes/NexoCrm/NexoCrm.node.js +635 -0
- package/dist/nodes/NexoCrm/NexoCrm.node.js.map +1 -0
- package/dist/nodes/NexoCrm/nexocrm.svg +4 -0
- package/package.json +56 -0
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NexoCrm = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class NexoCrm {
|
|
6
|
+
description = {
|
|
7
|
+
displayName: 'Nexo CRM',
|
|
8
|
+
name: 'nexoCrm',
|
|
9
|
+
icon: 'file:nexocrm.svg',
|
|
10
|
+
group: ['transform'],
|
|
11
|
+
version: 1,
|
|
12
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
13
|
+
description: 'Gerencie leads e colunas do Kanban no Nexo CRM',
|
|
14
|
+
defaults: {
|
|
15
|
+
name: 'Nexo CRM',
|
|
16
|
+
},
|
|
17
|
+
inputs: ['main'],
|
|
18
|
+
outputs: ['main'],
|
|
19
|
+
credentials: [
|
|
20
|
+
{
|
|
21
|
+
name: 'nexoCrmApi',
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
properties: [
|
|
26
|
+
// Resource
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Recurso',
|
|
29
|
+
name: 'resource',
|
|
30
|
+
type: 'options',
|
|
31
|
+
noDataExpression: true,
|
|
32
|
+
options: [
|
|
33
|
+
{
|
|
34
|
+
name: 'Lead',
|
|
35
|
+
value: 'lead',
|
|
36
|
+
description: 'Gerenciar leads',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Coluna',
|
|
40
|
+
value: 'column',
|
|
41
|
+
description: 'Gerenciar colunas do Kanban',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
default: 'lead',
|
|
45
|
+
},
|
|
46
|
+
// Operations for Lead
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Operação',
|
|
49
|
+
name: 'operation',
|
|
50
|
+
type: 'options',
|
|
51
|
+
noDataExpression: true,
|
|
52
|
+
displayOptions: {
|
|
53
|
+
show: {
|
|
54
|
+
resource: ['lead'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
options: [
|
|
58
|
+
{
|
|
59
|
+
name: 'Criar',
|
|
60
|
+
value: 'create',
|
|
61
|
+
description: 'Criar um novo lead',
|
|
62
|
+
action: 'Criar um lead',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Atualizar',
|
|
66
|
+
value: 'update',
|
|
67
|
+
description: 'Atualizar um lead existente',
|
|
68
|
+
action: 'Atualizar um lead',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Deletar',
|
|
72
|
+
value: 'delete',
|
|
73
|
+
description: 'Deletar um lead',
|
|
74
|
+
action: 'Deletar um lead',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Buscar',
|
|
78
|
+
value: 'get',
|
|
79
|
+
description: 'Buscar um lead por ID',
|
|
80
|
+
action: 'Buscar um lead',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Listar',
|
|
84
|
+
value: 'list',
|
|
85
|
+
description: 'Listar todos os leads',
|
|
86
|
+
action: 'Listar leads',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Mover',
|
|
90
|
+
value: 'move',
|
|
91
|
+
description: 'Mover lead para uma coluna (cria a coluna se não existir)',
|
|
92
|
+
action: 'Mover um lead',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
default: 'create',
|
|
96
|
+
},
|
|
97
|
+
// Operations for Column
|
|
98
|
+
{
|
|
99
|
+
displayName: 'Operação',
|
|
100
|
+
name: 'operation',
|
|
101
|
+
type: 'options',
|
|
102
|
+
noDataExpression: true,
|
|
103
|
+
displayOptions: {
|
|
104
|
+
show: {
|
|
105
|
+
resource: ['column'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
options: [
|
|
109
|
+
{
|
|
110
|
+
name: 'Criar',
|
|
111
|
+
value: 'create',
|
|
112
|
+
description: 'Criar uma nova coluna',
|
|
113
|
+
action: 'Criar uma coluna',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'Listar',
|
|
117
|
+
value: 'list',
|
|
118
|
+
description: 'Listar todas as colunas',
|
|
119
|
+
action: 'Listar colunas',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'Deletar',
|
|
123
|
+
value: 'delete',
|
|
124
|
+
description: 'Deletar uma coluna',
|
|
125
|
+
action: 'Deletar uma coluna',
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
default: 'list',
|
|
129
|
+
},
|
|
130
|
+
// Fields for Lead Create
|
|
131
|
+
{
|
|
132
|
+
displayName: 'Nome',
|
|
133
|
+
name: 'name',
|
|
134
|
+
type: 'string',
|
|
135
|
+
default: '',
|
|
136
|
+
required: true,
|
|
137
|
+
displayOptions: {
|
|
138
|
+
show: {
|
|
139
|
+
resource: ['lead'],
|
|
140
|
+
operation: ['create'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
description: 'Nome do lead',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: 'Telefone',
|
|
147
|
+
name: 'phone',
|
|
148
|
+
type: 'string',
|
|
149
|
+
default: '',
|
|
150
|
+
displayOptions: {
|
|
151
|
+
show: {
|
|
152
|
+
resource: ['lead'],
|
|
153
|
+
operation: ['create'],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
description: 'Telefone do lead',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: 'E-mail',
|
|
160
|
+
name: 'email',
|
|
161
|
+
type: 'string',
|
|
162
|
+
default: '',
|
|
163
|
+
displayOptions: {
|
|
164
|
+
show: {
|
|
165
|
+
resource: ['lead'],
|
|
166
|
+
operation: ['create'],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
description: 'E-mail do lead',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
displayName: 'Coluna',
|
|
173
|
+
name: 'status',
|
|
174
|
+
type: 'string',
|
|
175
|
+
default: 'Novos Leads',
|
|
176
|
+
displayOptions: {
|
|
177
|
+
show: {
|
|
178
|
+
resource: ['lead'],
|
|
179
|
+
operation: ['create'],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
description: 'Nome da coluna onde o lead será criado (será criada automaticamente se não existir)',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
displayName: 'Descrição',
|
|
186
|
+
name: 'description',
|
|
187
|
+
type: 'string',
|
|
188
|
+
default: '',
|
|
189
|
+
displayOptions: {
|
|
190
|
+
show: {
|
|
191
|
+
resource: ['lead'],
|
|
192
|
+
operation: ['create'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
description: 'Descrição ou observação sobre o lead (aparece no card)',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
displayName: 'Nome da Empresa',
|
|
199
|
+
name: 'company_name',
|
|
200
|
+
type: 'string',
|
|
201
|
+
default: '',
|
|
202
|
+
displayOptions: {
|
|
203
|
+
show: {
|
|
204
|
+
resource: ['lead'],
|
|
205
|
+
operation: ['create'],
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
description: 'Nome da empresa do lead',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
displayName: 'Faturamento Mensal',
|
|
212
|
+
name: 'monthly_revenue',
|
|
213
|
+
type: 'string',
|
|
214
|
+
default: '',
|
|
215
|
+
displayOptions: {
|
|
216
|
+
show: {
|
|
217
|
+
resource: ['lead'],
|
|
218
|
+
operation: ['create'],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
description: 'Faturamento mensal do lead (ex: R$ 50.000,00)',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
displayName: 'Dados (JSON)',
|
|
225
|
+
name: 'dados',
|
|
226
|
+
type: 'json',
|
|
227
|
+
default: '{}',
|
|
228
|
+
displayOptions: {
|
|
229
|
+
show: {
|
|
230
|
+
resource: ['lead'],
|
|
231
|
+
operation: ['create'],
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
description: 'Dados adicionais do lead em formato JSON (ex: {"whatsapp": "(99) 99137-2552", "modelo_veiculo": "Honda Bros 160", "preocupacao": "Roubo"})',
|
|
235
|
+
},
|
|
236
|
+
// Fields for Lead Update
|
|
237
|
+
{
|
|
238
|
+
displayName: 'Lead ID',
|
|
239
|
+
name: 'leadId',
|
|
240
|
+
type: 'string',
|
|
241
|
+
default: '',
|
|
242
|
+
required: true,
|
|
243
|
+
displayOptions: {
|
|
244
|
+
show: {
|
|
245
|
+
resource: ['lead'],
|
|
246
|
+
operation: ['update', 'delete', 'get'],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
description: 'UUID do lead',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
displayName: 'Campos para Atualizar',
|
|
253
|
+
name: 'updateFields',
|
|
254
|
+
type: 'collection',
|
|
255
|
+
placeholder: 'Adicionar Campo',
|
|
256
|
+
default: {},
|
|
257
|
+
displayOptions: {
|
|
258
|
+
show: {
|
|
259
|
+
resource: ['lead'],
|
|
260
|
+
operation: ['update'],
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
options: [
|
|
264
|
+
{
|
|
265
|
+
displayName: 'Nome',
|
|
266
|
+
name: 'name',
|
|
267
|
+
type: 'string',
|
|
268
|
+
default: '',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
displayName: 'Telefone',
|
|
272
|
+
name: 'phone',
|
|
273
|
+
type: 'string',
|
|
274
|
+
default: '',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
displayName: 'E-mail',
|
|
278
|
+
name: 'email',
|
|
279
|
+
type: 'string',
|
|
280
|
+
default: '',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
displayName: 'Coluna/Status',
|
|
284
|
+
name: 'status',
|
|
285
|
+
type: 'string',
|
|
286
|
+
default: '',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
displayName: 'Descrição',
|
|
290
|
+
name: 'last_message',
|
|
291
|
+
type: 'string',
|
|
292
|
+
default: '',
|
|
293
|
+
description: 'Descrição ou observação sobre o lead',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
displayName: 'Nome da Empresa',
|
|
297
|
+
name: 'company_name',
|
|
298
|
+
type: 'string',
|
|
299
|
+
default: '',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
displayName: 'Faturamento Mensal',
|
|
303
|
+
name: 'monthly_revenue',
|
|
304
|
+
type: 'string',
|
|
305
|
+
default: '',
|
|
306
|
+
description: 'Faturamento mensal (ex: R$ 50.000,00)',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
displayName: 'Dados (JSON)',
|
|
310
|
+
name: 'dados',
|
|
311
|
+
type: 'json',
|
|
312
|
+
default: '{}',
|
|
313
|
+
description: 'Dados adicionais do lead em formato JSON',
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
// Fields for Lead Move
|
|
318
|
+
{
|
|
319
|
+
displayName: 'Lead ID',
|
|
320
|
+
name: 'leadId',
|
|
321
|
+
type: 'string',
|
|
322
|
+
default: '',
|
|
323
|
+
required: true,
|
|
324
|
+
displayOptions: {
|
|
325
|
+
show: {
|
|
326
|
+
resource: ['lead'],
|
|
327
|
+
operation: ['move'],
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
description: 'UUID do lead a ser movido',
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
displayName: 'Nova Coluna',
|
|
334
|
+
name: 'targetColumn',
|
|
335
|
+
type: 'string',
|
|
336
|
+
default: '',
|
|
337
|
+
required: true,
|
|
338
|
+
displayOptions: {
|
|
339
|
+
show: {
|
|
340
|
+
resource: ['lead'],
|
|
341
|
+
operation: ['move'],
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
description: 'Nome da coluna destino (será criada automaticamente se não existir)',
|
|
345
|
+
},
|
|
346
|
+
// Fields for Column Create
|
|
347
|
+
{
|
|
348
|
+
displayName: 'Nome da Coluna',
|
|
349
|
+
name: 'columnName',
|
|
350
|
+
type: 'string',
|
|
351
|
+
default: '',
|
|
352
|
+
required: true,
|
|
353
|
+
displayOptions: {
|
|
354
|
+
show: {
|
|
355
|
+
resource: ['column'],
|
|
356
|
+
operation: ['create'],
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
description: 'Nome da nova coluna',
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
displayName: 'Posição',
|
|
363
|
+
name: 'position',
|
|
364
|
+
type: 'number',
|
|
365
|
+
default: 0,
|
|
366
|
+
displayOptions: {
|
|
367
|
+
show: {
|
|
368
|
+
resource: ['column'],
|
|
369
|
+
operation: ['create'],
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
description: 'Posição da coluna no Kanban (0 = primeira)',
|
|
373
|
+
},
|
|
374
|
+
// Fields for Column Delete
|
|
375
|
+
{
|
|
376
|
+
displayName: 'Coluna ID',
|
|
377
|
+
name: 'columnId',
|
|
378
|
+
type: 'string',
|
|
379
|
+
default: '',
|
|
380
|
+
required: true,
|
|
381
|
+
displayOptions: {
|
|
382
|
+
show: {
|
|
383
|
+
resource: ['column'],
|
|
384
|
+
operation: ['delete'],
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
description: 'UUID da coluna a ser deletada',
|
|
388
|
+
},
|
|
389
|
+
],
|
|
390
|
+
};
|
|
391
|
+
async execute() {
|
|
392
|
+
const items = this.getInputData();
|
|
393
|
+
const returnData = [];
|
|
394
|
+
const credentials = await this.getCredentials('nexoCrmApi');
|
|
395
|
+
const supabaseUrl = credentials.supabaseUrl;
|
|
396
|
+
const apiKey = credentials.apiKey;
|
|
397
|
+
const userId = credentials.userId;
|
|
398
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
399
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
400
|
+
for (let i = 0; i < items.length; i++) {
|
|
401
|
+
try {
|
|
402
|
+
let responseData;
|
|
403
|
+
if (resource === 'lead') {
|
|
404
|
+
if (operation === 'create') {
|
|
405
|
+
const name = this.getNodeParameter('name', i);
|
|
406
|
+
const phone = this.getNodeParameter('phone', i);
|
|
407
|
+
const email = this.getNodeParameter('email', i);
|
|
408
|
+
const status = this.getNodeParameter('status', i);
|
|
409
|
+
const description = this.getNodeParameter('description', i);
|
|
410
|
+
const company_name = this.getNodeParameter('company_name', i);
|
|
411
|
+
const monthly_revenue = this.getNodeParameter('monthly_revenue', i);
|
|
412
|
+
const dadosRaw = this.getNodeParameter('dados', i, {});
|
|
413
|
+
const dados = typeof dadosRaw === 'string' ? (dadosRaw.trim() ? JSON.parse(dadosRaw) : null) : (Object.keys(dadosRaw).length > 0 ? dadosRaw : null);
|
|
414
|
+
// Check if column exists, create if not
|
|
415
|
+
const existingColumns = await this.helpers.request({
|
|
416
|
+
method: 'GET',
|
|
417
|
+
url: `${supabaseUrl}/rest/v1/kanban_columns?user_id=eq.${userId}&name=eq.${encodeURIComponent(status)}`,
|
|
418
|
+
headers: {
|
|
419
|
+
'apikey': apiKey,
|
|
420
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
421
|
+
},
|
|
422
|
+
json: true,
|
|
423
|
+
});
|
|
424
|
+
// If column doesn't exist, create it
|
|
425
|
+
if (!existingColumns || existingColumns.length === 0) {
|
|
426
|
+
// Get max position
|
|
427
|
+
const allColumns = await this.helpers.request({
|
|
428
|
+
method: 'GET',
|
|
429
|
+
url: `${supabaseUrl}/rest/v1/kanban_columns?user_id=eq.${userId}&order=position.desc&limit=1`,
|
|
430
|
+
headers: {
|
|
431
|
+
'apikey': apiKey,
|
|
432
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
433
|
+
},
|
|
434
|
+
json: true,
|
|
435
|
+
});
|
|
436
|
+
const maxPosition = allColumns && allColumns.length > 0 ? allColumns[0].position + 1 : 0;
|
|
437
|
+
await this.helpers.request({
|
|
438
|
+
method: 'POST',
|
|
439
|
+
url: `${supabaseUrl}/rest/v1/kanban_columns`,
|
|
440
|
+
headers: {
|
|
441
|
+
'apikey': apiKey,
|
|
442
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
443
|
+
'Content-Type': 'application/json',
|
|
444
|
+
},
|
|
445
|
+
body: {
|
|
446
|
+
user_id: userId,
|
|
447
|
+
name: status,
|
|
448
|
+
position: maxPosition,
|
|
449
|
+
},
|
|
450
|
+
json: true,
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
responseData = await this.helpers.request({
|
|
454
|
+
method: 'POST',
|
|
455
|
+
url: `${supabaseUrl}/rest/v1/leads`,
|
|
456
|
+
headers: {
|
|
457
|
+
'apikey': apiKey,
|
|
458
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
459
|
+
'Content-Type': 'application/json',
|
|
460
|
+
'Prefer': 'return=representation',
|
|
461
|
+
},
|
|
462
|
+
body: {
|
|
463
|
+
user_id: userId,
|
|
464
|
+
name,
|
|
465
|
+
phone: phone || null,
|
|
466
|
+
email: email || null,
|
|
467
|
+
status,
|
|
468
|
+
last_message: description || null,
|
|
469
|
+
company_name: company_name || null,
|
|
470
|
+
monthly_revenue: monthly_revenue || null,
|
|
471
|
+
dados: dados,
|
|
472
|
+
avatar: `https://picsum.photos/seed/${encodeURIComponent(name)}/200`,
|
|
473
|
+
},
|
|
474
|
+
json: true,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
else if (operation === 'update') {
|
|
478
|
+
const leadId = this.getNodeParameter('leadId', i);
|
|
479
|
+
const updateFields = this.getNodeParameter('updateFields', i);
|
|
480
|
+
// Filter out empty/undefined values and process the fields
|
|
481
|
+
const filteredFields = {};
|
|
482
|
+
for (const [key, value] of Object.entries(updateFields)) {
|
|
483
|
+
if (value !== undefined && value !== '' && value !== null) {
|
|
484
|
+
// Special handling for dados field - parse JSON if string
|
|
485
|
+
if (key === 'dados') {
|
|
486
|
+
let parsedDados = value;
|
|
487
|
+
if (typeof value === 'string') {
|
|
488
|
+
try {
|
|
489
|
+
parsedDados = value.trim() ? JSON.parse(value) : undefined;
|
|
490
|
+
}
|
|
491
|
+
catch {
|
|
492
|
+
parsedDados = undefined;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
// Only include if it's a non-empty object
|
|
496
|
+
if (parsedDados && typeof parsedDados === 'object' && Object.keys(parsedDados).length > 0) {
|
|
497
|
+
filteredFields[key] = parsedDados;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
filteredFields[key] = value;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
if (Object.keys(filteredFields).length === 0) {
|
|
506
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Nenhum campo para atualizar foi fornecido', { itemIndex: i });
|
|
507
|
+
}
|
|
508
|
+
responseData = await this.helpers.request({
|
|
509
|
+
method: 'PATCH',
|
|
510
|
+
url: `${supabaseUrl}/rest/v1/leads?id=eq.${leadId}`,
|
|
511
|
+
headers: {
|
|
512
|
+
'apikey': apiKey,
|
|
513
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
514
|
+
'Content-Type': 'application/json',
|
|
515
|
+
'Prefer': 'return=representation',
|
|
516
|
+
},
|
|
517
|
+
body: filteredFields,
|
|
518
|
+
json: true,
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
else if (operation === 'delete') {
|
|
522
|
+
const leadId = this.getNodeParameter('leadId', i);
|
|
523
|
+
responseData = await this.helpers.request({
|
|
524
|
+
method: 'DELETE',
|
|
525
|
+
url: `${supabaseUrl}/rest/v1/leads?id=eq.${leadId}`,
|
|
526
|
+
headers: {
|
|
527
|
+
'apikey': apiKey,
|
|
528
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
529
|
+
},
|
|
530
|
+
});
|
|
531
|
+
responseData = { success: true, deleted: leadId };
|
|
532
|
+
}
|
|
533
|
+
else if (operation === 'get') {
|
|
534
|
+
const leadId = this.getNodeParameter('leadId', i);
|
|
535
|
+
responseData = await this.helpers.request({
|
|
536
|
+
method: 'GET',
|
|
537
|
+
url: `${supabaseUrl}/rest/v1/leads?id=eq.${leadId}`,
|
|
538
|
+
headers: {
|
|
539
|
+
'apikey': apiKey,
|
|
540
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
541
|
+
},
|
|
542
|
+
json: true,
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
else if (operation === 'list') {
|
|
546
|
+
responseData = await this.helpers.request({
|
|
547
|
+
method: 'GET',
|
|
548
|
+
url: `${supabaseUrl}/rest/v1/leads?user_id=eq.${userId}&order=created_at.desc`,
|
|
549
|
+
headers: {
|
|
550
|
+
'apikey': apiKey,
|
|
551
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
552
|
+
},
|
|
553
|
+
json: true,
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
else if (operation === 'move') {
|
|
557
|
+
const leadId = this.getNodeParameter('leadId', i);
|
|
558
|
+
const targetColumn = this.getNodeParameter('targetColumn', i);
|
|
559
|
+
// Use the Edge Function to move lead (auto-creates column if needed)
|
|
560
|
+
responseData = await this.helpers.request({
|
|
561
|
+
method: 'POST',
|
|
562
|
+
url: `${supabaseUrl}/functions/v1/mover_lead`,
|
|
563
|
+
headers: {
|
|
564
|
+
'Content-Type': 'application/json',
|
|
565
|
+
},
|
|
566
|
+
body: {
|
|
567
|
+
lead_id: leadId,
|
|
568
|
+
coluna: targetColumn,
|
|
569
|
+
user_id: userId,
|
|
570
|
+
},
|
|
571
|
+
json: true,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
else if (resource === 'column') {
|
|
576
|
+
if (operation === 'create') {
|
|
577
|
+
const columnName = this.getNodeParameter('columnName', i);
|
|
578
|
+
const position = this.getNodeParameter('position', i);
|
|
579
|
+
responseData = await this.helpers.request({
|
|
580
|
+
method: 'POST',
|
|
581
|
+
url: `${supabaseUrl}/rest/v1/kanban_columns`,
|
|
582
|
+
headers: {
|
|
583
|
+
'apikey': apiKey,
|
|
584
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
585
|
+
'Content-Type': 'application/json',
|
|
586
|
+
'Prefer': 'return=representation',
|
|
587
|
+
},
|
|
588
|
+
body: {
|
|
589
|
+
user_id: userId,
|
|
590
|
+
name: columnName,
|
|
591
|
+
position,
|
|
592
|
+
},
|
|
593
|
+
json: true,
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
else if (operation === 'list') {
|
|
597
|
+
responseData = await this.helpers.request({
|
|
598
|
+
method: 'GET',
|
|
599
|
+
url: `${supabaseUrl}/rest/v1/kanban_columns?user_id=eq.${userId}&order=position`,
|
|
600
|
+
headers: {
|
|
601
|
+
'apikey': apiKey,
|
|
602
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
603
|
+
},
|
|
604
|
+
json: true,
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
else if (operation === 'delete') {
|
|
608
|
+
const columnId = this.getNodeParameter('columnId', i);
|
|
609
|
+
responseData = await this.helpers.request({
|
|
610
|
+
method: 'DELETE',
|
|
611
|
+
url: `${supabaseUrl}/rest/v1/kanban_columns?id=eq.${columnId}`,
|
|
612
|
+
headers: {
|
|
613
|
+
'apikey': apiKey,
|
|
614
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
615
|
+
},
|
|
616
|
+
});
|
|
617
|
+
responseData = { success: true, deleted: columnId };
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
621
|
+
returnData.push(...executionData);
|
|
622
|
+
}
|
|
623
|
+
catch (error) {
|
|
624
|
+
if (this.continueOnFail()) {
|
|
625
|
+
returnData.push({ json: { error: error.message }, pairedItem: i });
|
|
626
|
+
continue;
|
|
627
|
+
}
|
|
628
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return [returnData];
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
exports.NexoCrm = NexoCrm;
|
|
635
|
+
//# sourceMappingURL=NexoCrm.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NexoCrm.node.js","sourceRoot":"","sources":["../../../nodes/NexoCrm/NexoCrm.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,MAAa,OAAO;IAChB,WAAW,GAAyB;QAChC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,CAAC,WAAW,CAAC;QACpB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,8DAA8D;QACxE,WAAW,EAAE,gDAAgD;QAC7D,QAA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ACH,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;oBACxD,CAAC;gBACL,CAAC;gBAED,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,0BAA0B,CACzD,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,YAA2C,CAAC,EACzE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAC5B,CAAC;gBACF,UAAU,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;YACtC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACxB,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;oBAC9E,SAAS;gBACb,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YACnF,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AA/nBD,0BA+nBC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" fill="none">
|
|
2
|
+
<rect width="60" height="60" rx="12" fill="#4F46E5"/>
|
|
3
|
+
<text x="50%" y="55%" dominant-baseline="middle" text-anchor="middle" font-family="Arial, sans-serif" font-weight="bold" font-size="24" fill="white">NX</text>
|
|
4
|
+
</svg>
|