n8n-nodes-idb2b 2.0.0 → 2.0.1

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.
@@ -308,14 +308,6 @@ class IDB2B {
308
308
  name: 'Lead',
309
309
  value: 'lead',
310
310
  },
311
- {
312
- name: 'Lead Activities',
313
- value: 'leadActivities',
314
- },
315
- {
316
- name: 'Custom',
317
- value: 'custom',
318
- },
319
311
  ],
320
312
  default: 'contact',
321
313
  },
@@ -371,86 +363,6 @@ class IDB2B {
371
363
  ],
372
364
  default: 'getAll',
373
365
  },
374
- {
375
- displayName: 'Operation',
376
- name: 'operation',
377
- type: 'options',
378
- noDataExpression: true,
379
- displayOptions: {
380
- show: {
381
- resource: ['leadActivities'],
382
- },
383
- },
384
- options: [
385
- {
386
- name: 'Get All',
387
- value: 'getAll',
388
- action: 'Get all activities for a lead',
389
- description: 'Retrieve all activities for a specific lead',
390
- },
391
- {
392
- name: 'Create',
393
- value: 'create',
394
- action: 'Create a lead activity',
395
- description: 'Create a new activity for a lead',
396
- },
397
- ],
398
- default: 'getAll',
399
- },
400
- {
401
- displayName: 'Operation',
402
- name: 'operation',
403
- type: 'options',
404
- noDataExpression: true,
405
- displayOptions: {
406
- show: {
407
- resource: ['custom'],
408
- },
409
- },
410
- options: [
411
- {
412
- name: 'GET Request',
413
- value: 'get',
414
- action: 'Execute a GET request',
415
- routing: {
416
- request: {
417
- method: 'GET',
418
- },
419
- },
420
- },
421
- {
422
- name: 'POST Request',
423
- value: 'post',
424
- action: 'Execute a POST request',
425
- routing: {
426
- request: {
427
- method: 'POST',
428
- },
429
- },
430
- },
431
- {
432
- name: 'PUT Request',
433
- value: 'put',
434
- action: 'Execute a PUT request',
435
- routing: {
436
- request: {
437
- method: 'PUT',
438
- },
439
- },
440
- },
441
- {
442
- name: 'DELETE Request',
443
- value: 'delete',
444
- action: 'Execute a DELETE request',
445
- routing: {
446
- request: {
447
- method: 'DELETE',
448
- },
449
- },
450
- },
451
- ],
452
- default: 'get',
453
- },
454
366
  {
455
367
  displayName: 'Name',
456
368
  name: 'name',
@@ -1261,7 +1173,7 @@ class IDB2B {
1261
1173
  if (resource === 'contact') {
1262
1174
  if (operation === 'getAll') {
1263
1175
  method = 'GET';
1264
- endpoint = '/contacts';
1176
+ endpoint = '/api/contacts';
1265
1177
  // Add pagination parameters
1266
1178
  const limit = this.getNodeParameter('limit', i, 50);
1267
1179
  const page = this.getNodeParameter('page', i, 1);
@@ -1274,7 +1186,7 @@ class IDB2B {
1274
1186
  }
1275
1187
  else if (operation === 'create') {
1276
1188
  method = 'POST';
1277
- endpoint = '/contacts';
1189
+ endpoint = '/api/contacts';
1278
1190
  const name = this.getNodeParameter('name', i);
1279
1191
  const email = this.getNodeParameter('email', i);
1280
1192
  const phone_number = this.getNodeParameter('phone_number', i, '');
@@ -1326,7 +1238,7 @@ class IDB2B {
1326
1238
  else if (resource === 'lead') {
1327
1239
  if (operation === 'getAll') {
1328
1240
  method = 'GET';
1329
- endpoint = '/leads';
1241
+ endpoint = '/api/leads';
1330
1242
  // Add pagination parameters
1331
1243
  const limit = this.getNodeParameter('limit', i, 50);
1332
1244
  const page = this.getNodeParameter('page', i, 1);
@@ -1339,7 +1251,7 @@ class IDB2B {
1339
1251
  }
1340
1252
  else if (operation === 'create') {
1341
1253
  method = 'POST';
1342
- endpoint = '/leads';
1254
+ endpoint = '/api/leads';
1343
1255
  const name = this.getNodeParameter('name', i);
1344
1256
  const additionalFields = this.getNodeParameter('additionalFields', i, {});
1345
1257
  // Validate required fields
@@ -18,12 +18,30 @@ exports.contactOperations = {
18
18
  action: 'Get all contacts',
19
19
  description: 'Retrieve all contacts',
20
20
  },
21
+ {
22
+ name: 'Get',
23
+ value: 'get',
24
+ action: 'Get a contact',
25
+ description: 'Get a single contact by ID',
26
+ },
21
27
  {
22
28
  name: 'Create',
23
29
  value: 'create',
24
30
  action: 'Create a contact',
25
31
  description: 'Create a new contact',
26
32
  },
33
+ {
34
+ name: 'Update',
35
+ value: 'update',
36
+ action: 'Update a contact',
37
+ description: 'Update an existing contact',
38
+ },
39
+ {
40
+ name: 'Delete',
41
+ value: 'delete',
42
+ action: 'Delete a contact',
43
+ description: 'Delete a contact by ID',
44
+ },
27
45
  ],
28
46
  default: 'getAll',
29
47
  };
@@ -42,66 +42,6 @@ exports.leadOperations = {
42
42
  action: 'Delete a lead',
43
43
  description: 'Delete a lead by ID',
44
44
  },
45
- {
46
- name: 'Create Multiple',
47
- value: 'createMultiple',
48
- action: 'Create multiple leads',
49
- description: 'Create multiple leads in bulk',
50
- },
51
- {
52
- name: 'Delete Multiple',
53
- value: 'deleteMultiple',
54
- action: 'Delete multiple leads',
55
- description: 'Delete multiple leads by IDs',
56
- },
57
- {
58
- name: 'Get Call Logs',
59
- value: 'getCallLogs',
60
- action: 'Get lead call logs',
61
- description: 'Get call logs for a specific lead',
62
- },
63
- {
64
- name: 'Assign New Contact',
65
- value: 'assignNewContact',
66
- action: 'Assign new contact to lead',
67
- description: 'Create and assign a new contact to a lead',
68
- },
69
- {
70
- name: 'Assign Contacts',
71
- value: 'assignContacts',
72
- action: 'Assign contacts to lead',
73
- description: 'Assign existing contacts to a lead',
74
- },
75
- {
76
- name: 'Remove Contact',
77
- value: 'removeContact',
78
- action: 'Remove contact from lead',
79
- description: 'Remove a contact from a lead',
80
- },
81
- {
82
- name: 'Import',
83
- value: 'import',
84
- action: 'Import leads',
85
- description: 'Import leads from CSV/Excel file',
86
- },
87
- {
88
- name: 'Get Import Template',
89
- value: 'getImportTemplate',
90
- action: 'Get import template',
91
- description: 'Download import template for leads',
92
- },
93
- {
94
- name: 'Geocode',
95
- value: 'geocode',
96
- action: 'Geocode lead address',
97
- description: 'Manually geocode a lead address',
98
- },
99
- {
100
- name: 'Search Nearby',
101
- value: 'searchNearby',
102
- action: 'Find leads near location',
103
- description: 'Find leads near a specific location',
104
- },
105
45
  ],
106
46
  default: 'getAll',
107
47
  };
@@ -116,26 +56,11 @@ exports.leadFields = [
116
56
  displayOptions: {
117
57
  show: {
118
58
  resource: ['lead'],
119
- operation: ['get', 'update', 'delete', 'getCallLogs', 'assignNewContact', 'assignContacts', 'removeContact', 'geocode'],
59
+ operation: ['get', 'update', 'delete'],
120
60
  },
121
61
  },
122
62
  description: 'ID of the lead',
123
63
  },
124
- // Contact ID field for remove contact operation
125
- {
126
- displayName: 'Contact ID',
127
- name: 'contactId',
128
- type: 'string',
129
- default: '',
130
- required: true,
131
- displayOptions: {
132
- show: {
133
- resource: ['lead'],
134
- operation: ['removeContact'],
135
- },
136
- },
137
- description: 'ID of the contact to remove from the lead',
138
- },
139
64
  // Name field for create and update operations
140
65
  {
141
66
  displayName: 'Name',
@@ -149,7 +74,7 @@ exports.leadFields = [
149
74
  operation: ['create'],
150
75
  },
151
76
  },
152
- description: 'Lead name',
77
+ description: 'Lead name (company name)',
153
78
  },
154
79
  {
155
80
  displayName: 'Name',
@@ -164,80 +89,6 @@ exports.leadFields = [
164
89
  },
165
90
  description: 'Lead name (leave empty to keep current value)',
166
91
  },
167
- // Lead IDs for bulk operations
168
- {
169
- displayName: 'Lead IDs',
170
- name: 'leadIds',
171
- type: 'string',
172
- default: '',
173
- required: true,
174
- displayOptions: {
175
- show: {
176
- resource: ['lead'],
177
- operation: ['deleteMultiple'],
178
- },
179
- },
180
- description: 'Comma-separated list of lead IDs to delete',
181
- },
182
- // Contact IDs for assign contacts operation
183
- {
184
- displayName: 'Contact IDs',
185
- name: 'contactIds',
186
- type: 'string',
187
- default: '',
188
- required: true,
189
- displayOptions: {
190
- show: {
191
- resource: ['lead'],
192
- operation: ['assignContacts'],
193
- },
194
- },
195
- description: 'Comma-separated list of contact IDs to assign to the lead',
196
- },
197
- // Leads data for bulk create
198
- {
199
- displayName: 'Leads Data',
200
- name: 'leadsData',
201
- type: 'json',
202
- default: '[]',
203
- required: true,
204
- displayOptions: {
205
- show: {
206
- resource: ['lead'],
207
- operation: ['createMultiple'],
208
- },
209
- },
210
- description: 'Array of lead objects to create',
211
- },
212
- // Location fields for search nearby
213
- {
214
- displayName: 'Latitude',
215
- name: 'latitude',
216
- type: 'number',
217
- default: 0,
218
- required: true,
219
- displayOptions: {
220
- show: {
221
- resource: ['lead'],
222
- operation: ['searchNearby'],
223
- },
224
- },
225
- description: 'Latitude for nearby search',
226
- },
227
- {
228
- displayName: 'Longitude',
229
- name: 'longitude',
230
- type: 'number',
231
- default: 0,
232
- required: true,
233
- displayOptions: {
234
- show: {
235
- resource: ['lead'],
236
- operation: ['searchNearby'],
237
- },
238
- },
239
- description: 'Longitude for nearby search',
240
- },
241
92
  {
242
93
  displayName: 'Additional Fields',
243
94
  name: 'additionalFields',
@@ -251,225 +102,54 @@ exports.leadFields = [
251
102
  },
252
103
  },
253
104
  options: [
254
- {
255
- displayName: 'Owner ID',
256
- name: 'owner_id',
257
- type: 'string',
258
- default: '',
259
- description: 'ID of the user who owns this lead',
260
- },
261
105
  {
262
106
  displayName: 'Website',
263
107
  name: 'website',
264
108
  type: 'string',
265
109
  default: '',
266
- description: 'Lead website URL',
110
+ description: 'Company website URL',
267
111
  },
268
112
  {
269
113
  displayName: 'Description',
270
114
  name: 'description',
271
115
  type: 'string',
272
116
  default: '',
273
- description: 'Lead description',
274
- },
275
- {
276
- displayName: 'Status ID',
277
- name: 'status_id',
278
- type: 'string',
279
- default: '',
280
- description: 'Lead status ID',
281
- },
282
- {
283
- displayName: 'Source ID',
284
- name: 'source_id',
285
- type: 'string',
286
- default: '',
287
- description: 'Lead source ID',
288
- },
289
- {
290
- displayName: 'Size ID',
291
- name: 'size_id',
292
- type: 'string',
293
- default: '',
294
- description: 'Lead size ID',
117
+ description: 'Company description',
295
118
  },
296
119
  {
297
120
  displayName: 'Industry ID',
298
121
  name: 'industry_id',
299
122
  type: 'string',
300
123
  default: '',
301
- description: 'Lead industry ID',
302
- },
303
- {
304
- displayName: 'Main Contact ID',
305
- name: 'main_contact_id',
306
- type: 'string',
307
- default: '',
308
- description: 'ID of the main contact for this lead',
309
- },
310
- {
311
- displayName: 'Contact Name',
312
- name: 'contact_name',
313
- type: 'string',
314
- default: '',
315
- description: 'Name of the main contact',
316
- },
317
- {
318
- displayName: 'Contact Email',
319
- name: 'contact_email',
320
- type: 'string',
321
- default: '',
322
- description: 'Email of the main contact',
124
+ description: 'Industry category ID',
323
125
  },
324
126
  {
325
- displayName: 'Contact Phone Number',
326
- name: 'contact_phone_number',
327
- type: 'string',
328
- default: '',
329
- description: 'Phone number of the main contact',
330
- },
331
- ],
332
- },
333
- // Additional fields for specialized operations
334
- {
335
- displayName: 'New Contact Data',
336
- name: 'newContactData',
337
- type: 'collection',
338
- placeholder: 'Add Contact Field',
339
- default: {},
340
- displayOptions: {
341
- show: {
342
- resource: ['lead'],
343
- operation: ['assignNewContact'],
344
- },
345
- },
346
- options: [
347
- {
348
- displayName: 'Name',
349
- name: 'name',
350
- type: 'string',
351
- default: '',
352
- required: true,
353
- description: 'Contact name',
354
- },
355
- {
356
- displayName: 'Email',
357
- name: 'email',
127
+ displayName: 'Size ID',
128
+ name: 'size_id',
358
129
  type: 'string',
359
130
  default: '',
360
- required: true,
361
- description: 'Contact email',
131
+ description: 'Company size category ID',
362
132
  },
363
133
  {
364
- displayName: 'Phone Number',
365
- name: 'phone_number',
134
+ displayName: 'Status ID',
135
+ name: 'status_id',
366
136
  type: 'string',
367
137
  default: '',
368
- description: 'Contact phone number',
369
- },
370
- ],
371
- },
372
- {
373
- displayName: 'Geocode Data',
374
- name: 'geocodeData',
375
- type: 'collection',
376
- placeholder: 'Add Geocode Field',
377
- default: {},
378
- displayOptions: {
379
- show: {
380
- resource: ['lead'],
381
- operation: ['geocode'],
138
+ description: 'Lead status ID',
382
139
  },
383
- },
384
- options: [
385
140
  {
386
- displayName: 'Address',
387
- name: 'address',
141
+ displayName: 'Source ID',
142
+ name: 'source_id',
388
143
  type: 'string',
389
144
  default: '',
390
- description: 'Address to geocode',
391
- },
392
- {
393
- displayName: 'Latitude',
394
- name: 'latitude',
395
- type: 'number',
396
- default: 0,
397
- description: 'Latitude coordinate',
145
+ description: 'Lead source ID',
398
146
  },
399
147
  {
400
- displayName: 'Longitude',
401
- name: 'longitude',
402
- type: 'number',
403
- default: 0,
404
- description: 'Longitude coordinate',
405
- },
406
- ],
407
- },
408
- {
409
- displayName: 'Import Data',
410
- name: 'importData',
411
- type: 'collection',
412
- placeholder: 'Add Import Field',
413
- default: {},
414
- displayOptions: {
415
- show: {
416
- resource: ['lead'],
417
- operation: ['import'],
418
- },
419
- },
420
- options: [
421
- {
422
- displayName: 'File Path/URL',
423
- name: 'file',
148
+ displayName: 'Owner ID',
149
+ name: 'owner_id',
424
150
  type: 'string',
425
151
  default: '',
426
- description: 'Path or URL to the import file (CSV/Excel)',
427
- },
428
- {
429
- displayName: 'Field Mapping (JSON)',
430
- name: 'mapping',
431
- type: 'json',
432
- default: '{}',
433
- description: 'JSON object mapping CSV columns to lead fields',
434
- },
435
- ],
436
- },
437
- {
438
- displayName: 'Search Options',
439
- name: 'searchOptions',
440
- type: 'collection',
441
- placeholder: 'Add Search Option',
442
- default: {},
443
- displayOptions: {
444
- show: {
445
- resource: ['lead'],
446
- operation: ['searchNearby'],
447
- },
448
- },
449
- options: [
450
- {
451
- displayName: 'Radius',
452
- name: 'radius',
453
- type: 'number',
454
- default: 10,
455
- description: 'Search radius',
456
- },
457
- {
458
- displayName: 'Unit',
459
- name: 'unit',
460
- type: 'options',
461
- default: 'km',
462
- options: [
463
- {
464
- name: 'Kilometers',
465
- value: 'km',
466
- },
467
- {
468
- name: 'Miles',
469
- value: 'miles',
470
- },
471
- ],
472
- description: 'Distance unit',
152
+ description: 'ID of the user who owns this lead',
473
153
  },
474
154
  ],
475
155
  },
@@ -478,11 +158,11 @@ exports.leadFields = [
478
158
  name: 'limit',
479
159
  type: 'number',
480
160
  default: 50,
481
- description: 'Maximum number of records to return',
161
+ description: 'Maximum number of leads to return',
482
162
  displayOptions: {
483
163
  show: {
484
164
  resource: ['lead'],
485
- operation: ['getAll', 'getCallLogs', 'searchNearby'],
165
+ operation: ['getAll'],
486
166
  },
487
167
  },
488
168
  },
@@ -495,7 +175,7 @@ exports.leadFields = [
495
175
  displayOptions: {
496
176
  show: {
497
177
  resource: ['lead'],
498
- operation: ['getAll', 'getCallLogs', 'searchNearby'],
178
+ operation: ['getAll'],
499
179
  },
500
180
  },
501
181
  },
@@ -548,22 +228,6 @@ exports.leadFields = [
548
228
  name: 'Industry ID',
549
229
  value: 'industry_id',
550
230
  },
551
- {
552
- name: 'Main Contact ID',
553
- value: 'main_contact_id',
554
- },
555
- {
556
- name: 'Contact Name',
557
- value: 'contact_name',
558
- },
559
- {
560
- name: 'Contact Email',
561
- value: 'contact_email',
562
- },
563
- {
564
- name: 'Contact Phone Number',
565
- value: 'contact_phone_number',
566
- },
567
231
  {
568
232
  name: 'Created At',
569
233
  value: 'created_at',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-idb2b",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "n8n community node for IDB2B - WhatsApp AI Agents",
5
5
  "main": "index.js",
6
6
  "scripts": {