@crono-one/n8n-nodes-crono-public-api 1.4.2 → 1.5.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.
|
@@ -23,6 +23,32 @@ function getJsonParameter(executeFunctions, parameterName, itemIndex, defaultVal
|
|
|
23
23
|
}
|
|
24
24
|
return value;
|
|
25
25
|
}
|
|
26
|
+
function getJsonArrayParameter(executeFunctions, parameterName, itemIndex, defaultValue = []) {
|
|
27
|
+
const value = executeFunctions.getNodeParameter(parameterName, itemIndex, defaultValue);
|
|
28
|
+
if (value === '' || value === undefined || value === null) {
|
|
29
|
+
return defaultValue;
|
|
30
|
+
}
|
|
31
|
+
if (typeof value === 'string') {
|
|
32
|
+
try {
|
|
33
|
+
const parsed = JSON.parse(value);
|
|
34
|
+
if (Array.isArray(parsed)) {
|
|
35
|
+
return parsed;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw new n8n_workflow_1.NodeOperationError(executeFunctions.getNode(), error, {
|
|
40
|
+
message: `Parameter "${parameterName}" is not valid JSON.`,
|
|
41
|
+
itemIndex,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (Array.isArray(value)) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
throw new n8n_workflow_1.NodeOperationError(executeFunctions.getNode(), `Parameter "${parameterName}" must be a JSON array.`, {
|
|
49
|
+
itemIndex,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
26
52
|
function addIfNotEmpty(target, key, value) {
|
|
27
53
|
if (value !== undefined && value !== null && value !== '') {
|
|
28
54
|
target[key] = value;
|
|
@@ -245,6 +271,7 @@ class CronoPublicApi {
|
|
|
245
271
|
{ name: 'Note', value: 'note' },
|
|
246
272
|
{ name: 'Pipeline', value: 'pipeline' },
|
|
247
273
|
{ name: 'Sequence', value: 'sequence' },
|
|
274
|
+
{ name: 'Sync', value: 'sync' },
|
|
248
275
|
{ name: 'Task', value: 'task' },
|
|
249
276
|
{ name: 'Template', value: 'template' },
|
|
250
277
|
{ name: 'User', value: 'user' },
|
|
@@ -265,6 +292,7 @@ class CronoPublicApi {
|
|
|
265
292
|
{ name: 'Get Many', value: 'getAll', action: 'Get many companies' },
|
|
266
293
|
{ name: 'Import', value: 'import', action: 'Import companies' },
|
|
267
294
|
{ name: 'Search', value: 'search', action: 'Search companies' },
|
|
295
|
+
{ name: 'Sync', value: 'sync', action: 'Sync companies from CRM' },
|
|
268
296
|
{ name: 'Update', value: 'update', action: 'Update a company' },
|
|
269
297
|
],
|
|
270
298
|
default: 'getAll',
|
|
@@ -283,6 +311,7 @@ class CronoPublicApi {
|
|
|
283
311
|
{ name: 'Get Many', value: 'getAll', action: 'Get many contacts' },
|
|
284
312
|
{ name: 'Import', value: 'import', action: 'Import contacts' },
|
|
285
313
|
{ name: 'Search', value: 'search', action: 'Search contacts' },
|
|
314
|
+
{ name: 'Sync', value: 'sync', action: 'Sync contacts from CRM' },
|
|
286
315
|
{ name: 'Update', value: 'update', action: 'Update a contact' },
|
|
287
316
|
],
|
|
288
317
|
default: 'getAll',
|
|
@@ -300,6 +329,7 @@ class CronoPublicApi {
|
|
|
300
329
|
{ name: 'Get', value: 'get', action: 'Get a deal' },
|
|
301
330
|
{ name: 'Get Many', value: 'getAll', action: 'Get many deals' },
|
|
302
331
|
{ name: 'Search', value: 'search', action: 'Search deals' },
|
|
332
|
+
{ name: 'Sync', value: 'sync', action: 'Sync deals from CRM' },
|
|
303
333
|
{ name: 'Update', value: 'update', action: 'Update a deal' },
|
|
304
334
|
],
|
|
305
335
|
default: 'getAll',
|
|
@@ -415,6 +445,7 @@ class CronoPublicApi {
|
|
|
415
445
|
value: 'addContacts',
|
|
416
446
|
action: 'Add contacts to a sequence',
|
|
417
447
|
},
|
|
448
|
+
{ name: 'Create', value: 'create', action: 'Create a sequence' },
|
|
418
449
|
{ name: 'Search Sequence', value: 'search', action: 'Search sequence' },
|
|
419
450
|
{
|
|
420
451
|
name: 'Search Sequence Details',
|
|
@@ -483,6 +514,20 @@ class CronoPublicApi {
|
|
|
483
514
|
],
|
|
484
515
|
default: 'getAll',
|
|
485
516
|
},
|
|
517
|
+
{
|
|
518
|
+
displayName: 'Operation',
|
|
519
|
+
name: 'operation',
|
|
520
|
+
type: 'options',
|
|
521
|
+
noDataExpression: true,
|
|
522
|
+
displayOptions: {
|
|
523
|
+
show: { resource: ['sync'] },
|
|
524
|
+
},
|
|
525
|
+
options: [
|
|
526
|
+
{ name: 'Get', value: 'get', action: 'Get a sync job' },
|
|
527
|
+
{ name: 'Get Many', value: 'getAll', action: 'Get many sync jobs' },
|
|
528
|
+
],
|
|
529
|
+
default: 'getAll',
|
|
530
|
+
},
|
|
486
531
|
{
|
|
487
532
|
displayName: 'Object ID',
|
|
488
533
|
name: 'objectId',
|
|
@@ -535,6 +580,20 @@ class CronoPublicApi {
|
|
|
535
580
|
},
|
|
536
581
|
},
|
|
537
582
|
},
|
|
583
|
+
{
|
|
584
|
+
displayName: 'Sync ID',
|
|
585
|
+
name: 'syncId',
|
|
586
|
+
type: 'number',
|
|
587
|
+
default: 0,
|
|
588
|
+
required: true,
|
|
589
|
+
displayOptions: {
|
|
590
|
+
show: {
|
|
591
|
+
resource: ['sync'],
|
|
592
|
+
operation: ['get'],
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
description: 'Numeric identifier of the sync job to retrieve (returned by the originating sync request)',
|
|
596
|
+
},
|
|
538
597
|
{
|
|
539
598
|
displayName: 'Return All',
|
|
540
599
|
name: 'returnAll',
|
|
@@ -675,7 +734,7 @@ class CronoPublicApi {
|
|
|
675
734
|
displayOptions: {
|
|
676
735
|
show: {
|
|
677
736
|
resource: ['company', 'contact', 'deal', 'note', 'task', 'list', 'sequence'],
|
|
678
|
-
operation: ['create', 'update', 'import', 'addContacts', 'stopContactSequence'],
|
|
737
|
+
operation: ['create', 'update', 'import', 'sync', 'addContacts', 'stopContactSequence'],
|
|
679
738
|
},
|
|
680
739
|
},
|
|
681
740
|
description: 'Whether to send a raw JSON data payload',
|
|
@@ -688,7 +747,7 @@ class CronoPublicApi {
|
|
|
688
747
|
displayOptions: {
|
|
689
748
|
show: {
|
|
690
749
|
resource: ['company', 'contact', 'deal', 'note', 'task', 'list', 'sequence'],
|
|
691
|
-
operation: ['create', 'update', 'import', 'addContacts', 'stopContactSequence'],
|
|
750
|
+
operation: ['create', 'update', 'import', 'sync', 'addContacts', 'stopContactSequence'],
|
|
692
751
|
useRawJsonData: [true],
|
|
693
752
|
},
|
|
694
753
|
},
|
|
@@ -705,7 +764,7 @@ class CronoPublicApi {
|
|
|
705
764
|
displayOptions: {
|
|
706
765
|
show: {
|
|
707
766
|
resource: ['company', 'contact', 'deal', 'note', 'task', 'list', 'sequence'],
|
|
708
|
-
operation: ['create', 'update', 'import', 'addContacts', 'stopContactSequence'],
|
|
767
|
+
operation: ['create', 'update', 'import', 'sync', 'addContacts', 'stopContactSequence'],
|
|
709
768
|
useRawJsonData: [false],
|
|
710
769
|
},
|
|
711
770
|
},
|
|
@@ -1322,6 +1381,35 @@ class CronoPublicApi {
|
|
|
1322
1381
|
},
|
|
1323
1382
|
description: 'Comma-separated list of AI external property IDs to generate',
|
|
1324
1383
|
},
|
|
1384
|
+
{
|
|
1385
|
+
displayName: 'Object IDs',
|
|
1386
|
+
name: 'companySyncObjectIds',
|
|
1387
|
+
type: 'string',
|
|
1388
|
+
default: '',
|
|
1389
|
+
required: true,
|
|
1390
|
+
displayOptions: {
|
|
1391
|
+
show: {
|
|
1392
|
+
resource: ['company'],
|
|
1393
|
+
operation: ['sync'],
|
|
1394
|
+
useRawJsonData: [false],
|
|
1395
|
+
},
|
|
1396
|
+
},
|
|
1397
|
+
description: 'Comma-separated list of CRM object IDs of the companies to synchronize',
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
displayName: 'List ID',
|
|
1401
|
+
name: 'companySyncListId',
|
|
1402
|
+
type: 'number',
|
|
1403
|
+
default: 0,
|
|
1404
|
+
displayOptions: {
|
|
1405
|
+
show: {
|
|
1406
|
+
resource: ['company'],
|
|
1407
|
+
operation: ['sync'],
|
|
1408
|
+
useRawJsonData: [false],
|
|
1409
|
+
},
|
|
1410
|
+
},
|
|
1411
|
+
description: 'Optional Crono list ID. When provided, the synchronized companies are also added to this list at the end of the job.',
|
|
1412
|
+
},
|
|
1325
1413
|
{
|
|
1326
1414
|
displayName: 'First Name',
|
|
1327
1415
|
name: 'contactCreateFirstName',
|
|
@@ -2127,6 +2215,63 @@ class CronoPublicApi {
|
|
|
2127
2215
|
},
|
|
2128
2216
|
description: 'Comma-separated list of AI external property IDs to generate',
|
|
2129
2217
|
},
|
|
2218
|
+
{
|
|
2219
|
+
displayName: 'Object IDs',
|
|
2220
|
+
name: 'contactSyncObjectIds',
|
|
2221
|
+
type: 'string',
|
|
2222
|
+
default: '',
|
|
2223
|
+
required: true,
|
|
2224
|
+
displayOptions: {
|
|
2225
|
+
show: {
|
|
2226
|
+
resource: ['contact'],
|
|
2227
|
+
operation: ['sync'],
|
|
2228
|
+
useRawJsonData: [false],
|
|
2229
|
+
},
|
|
2230
|
+
},
|
|
2231
|
+
description: 'Comma-separated list of CRM object IDs of the contacts to synchronize',
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
displayName: 'Is Lead',
|
|
2235
|
+
name: 'contactSyncIsLead',
|
|
2236
|
+
type: 'boolean',
|
|
2237
|
+
default: false,
|
|
2238
|
+
displayOptions: {
|
|
2239
|
+
show: {
|
|
2240
|
+
resource: ['contact'],
|
|
2241
|
+
operation: ['sync'],
|
|
2242
|
+
useRawJsonData: [false],
|
|
2243
|
+
},
|
|
2244
|
+
},
|
|
2245
|
+
description: 'Whether the provided object IDs should be treated as leads instead of contacts',
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
displayName: 'List ID',
|
|
2249
|
+
name: 'contactSyncListId',
|
|
2250
|
+
type: 'number',
|
|
2251
|
+
default: 0,
|
|
2252
|
+
displayOptions: {
|
|
2253
|
+
show: {
|
|
2254
|
+
resource: ['contact'],
|
|
2255
|
+
operation: ['sync'],
|
|
2256
|
+
useRawJsonData: [false],
|
|
2257
|
+
},
|
|
2258
|
+
},
|
|
2259
|
+
description: 'Optional Crono list ID. When provided, the synchronized contacts are also added to this list at the end of the job.',
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
displayName: 'Strategy ID',
|
|
2263
|
+
name: 'contactSyncStrategyId',
|
|
2264
|
+
type: 'number',
|
|
2265
|
+
default: 0,
|
|
2266
|
+
displayOptions: {
|
|
2267
|
+
show: {
|
|
2268
|
+
resource: ['contact'],
|
|
2269
|
+
operation: ['sync'],
|
|
2270
|
+
useRawJsonData: [false],
|
|
2271
|
+
},
|
|
2272
|
+
},
|
|
2273
|
+
description: 'Optional Crono sequence (strategy) ID. When provided, the synchronized contacts are also enrolled in this sequence at the end of the job.',
|
|
2274
|
+
},
|
|
2130
2275
|
{
|
|
2131
2276
|
displayName: 'Company ID',
|
|
2132
2277
|
name: 'dealCreateAccountId',
|
|
@@ -2416,6 +2561,21 @@ class CronoPublicApi {
|
|
|
2416
2561
|
},
|
|
2417
2562
|
description: 'Owner user ID',
|
|
2418
2563
|
},
|
|
2564
|
+
{
|
|
2565
|
+
displayName: 'Object IDs',
|
|
2566
|
+
name: 'dealSyncObjectIds',
|
|
2567
|
+
type: 'string',
|
|
2568
|
+
default: '',
|
|
2569
|
+
required: true,
|
|
2570
|
+
displayOptions: {
|
|
2571
|
+
show: {
|
|
2572
|
+
resource: ['deal'],
|
|
2573
|
+
operation: ['sync'],
|
|
2574
|
+
useRawJsonData: [false],
|
|
2575
|
+
},
|
|
2576
|
+
},
|
|
2577
|
+
description: 'Comma-separated list of CRM object IDs of the deals to synchronize',
|
|
2578
|
+
},
|
|
2419
2579
|
{
|
|
2420
2580
|
displayName: 'Description',
|
|
2421
2581
|
name: 'noteCreateDescription',
|
|
@@ -2693,6 +2853,7 @@ class CronoPublicApi {
|
|
|
2693
2853
|
resource: ['task'],
|
|
2694
2854
|
operation: ['search'],
|
|
2695
2855
|
useRawJsonSearch: [false],
|
|
2856
|
+
returnAll: [false],
|
|
2696
2857
|
},
|
|
2697
2858
|
},
|
|
2698
2859
|
description: 'Max number of tasks to return',
|
|
@@ -2707,6 +2868,7 @@ class CronoPublicApi {
|
|
|
2707
2868
|
resource: ['task'],
|
|
2708
2869
|
operation: ['search'],
|
|
2709
2870
|
useRawJsonSearch: [false],
|
|
2871
|
+
returnAll: [false],
|
|
2710
2872
|
},
|
|
2711
2873
|
},
|
|
2712
2874
|
description: 'Number of tasks to skip',
|
|
@@ -3228,6 +3390,7 @@ class CronoPublicApi {
|
|
|
3228
3390
|
resource: ['company'],
|
|
3229
3391
|
operation: ['search'],
|
|
3230
3392
|
useRawJsonSearch: [false],
|
|
3393
|
+
returnAll: [false],
|
|
3231
3394
|
},
|
|
3232
3395
|
},
|
|
3233
3396
|
description: 'Max number of results to return',
|
|
@@ -3242,6 +3405,7 @@ class CronoPublicApi {
|
|
|
3242
3405
|
resource: ['company'],
|
|
3243
3406
|
operation: ['search'],
|
|
3244
3407
|
useRawJsonSearch: [false],
|
|
3408
|
+
returnAll: [false],
|
|
3245
3409
|
},
|
|
3246
3410
|
},
|
|
3247
3411
|
description: 'Number of results to skip',
|
|
@@ -3720,6 +3884,7 @@ class CronoPublicApi {
|
|
|
3720
3884
|
resource: ['contact'],
|
|
3721
3885
|
operation: ['search'],
|
|
3722
3886
|
useRawJsonSearch: [false],
|
|
3887
|
+
returnAll: [false],
|
|
3723
3888
|
},
|
|
3724
3889
|
},
|
|
3725
3890
|
description: 'Max number of results to return',
|
|
@@ -3734,6 +3899,7 @@ class CronoPublicApi {
|
|
|
3734
3899
|
resource: ['contact'],
|
|
3735
3900
|
operation: ['search'],
|
|
3736
3901
|
useRawJsonSearch: [false],
|
|
3902
|
+
returnAll: [false],
|
|
3737
3903
|
},
|
|
3738
3904
|
},
|
|
3739
3905
|
description: 'Number of results to skip',
|
|
@@ -4394,6 +4560,7 @@ class CronoPublicApi {
|
|
|
4394
4560
|
resource: ['deal'],
|
|
4395
4561
|
operation: ['search'],
|
|
4396
4562
|
useRawJsonSearch: [false],
|
|
4563
|
+
returnAll: [false],
|
|
4397
4564
|
},
|
|
4398
4565
|
},
|
|
4399
4566
|
description: 'Max number of results to return',
|
|
@@ -4408,6 +4575,7 @@ class CronoPublicApi {
|
|
|
4408
4575
|
resource: ['deal'],
|
|
4409
4576
|
operation: ['search'],
|
|
4410
4577
|
useRawJsonSearch: [false],
|
|
4578
|
+
returnAll: [false],
|
|
4411
4579
|
},
|
|
4412
4580
|
},
|
|
4413
4581
|
description: 'Number of results to skip',
|
|
@@ -4708,6 +4876,7 @@ class CronoPublicApi {
|
|
|
4708
4876
|
resource: ['note'],
|
|
4709
4877
|
operation: ['search'],
|
|
4710
4878
|
useRawJsonSearch: [false],
|
|
4879
|
+
returnAll: [false],
|
|
4711
4880
|
},
|
|
4712
4881
|
},
|
|
4713
4882
|
description: 'Max number of results to return',
|
|
@@ -4722,6 +4891,7 @@ class CronoPublicApi {
|
|
|
4722
4891
|
resource: ['note'],
|
|
4723
4892
|
operation: ['search'],
|
|
4724
4893
|
useRawJsonSearch: [false],
|
|
4894
|
+
returnAll: [false],
|
|
4725
4895
|
},
|
|
4726
4896
|
},
|
|
4727
4897
|
description: 'Number of results to skip',
|
|
@@ -4944,6 +5114,7 @@ class CronoPublicApi {
|
|
|
4944
5114
|
resource: ['activity'],
|
|
4945
5115
|
operation: ['search'],
|
|
4946
5116
|
useRawJsonSearch: [false],
|
|
5117
|
+
returnAll: [false],
|
|
4947
5118
|
},
|
|
4948
5119
|
},
|
|
4949
5120
|
description: 'Max number of results to return',
|
|
@@ -4958,6 +5129,7 @@ class CronoPublicApi {
|
|
|
4958
5129
|
resource: ['activity'],
|
|
4959
5130
|
operation: ['search'],
|
|
4960
5131
|
useRawJsonSearch: [false],
|
|
5132
|
+
returnAll: [false],
|
|
4961
5133
|
},
|
|
4962
5134
|
},
|
|
4963
5135
|
description: 'Number of results to skip',
|
|
@@ -5367,6 +5539,7 @@ class CronoPublicApi {
|
|
|
5367
5539
|
resource: ['list'],
|
|
5368
5540
|
operation: ['search'],
|
|
5369
5541
|
useRawJsonSearch: [false],
|
|
5542
|
+
returnAll: [false],
|
|
5370
5543
|
},
|
|
5371
5544
|
},
|
|
5372
5545
|
description: 'Max number of results to return',
|
|
@@ -5381,6 +5554,7 @@ class CronoPublicApi {
|
|
|
5381
5554
|
resource: ['list'],
|
|
5382
5555
|
operation: ['search'],
|
|
5383
5556
|
useRawJsonSearch: [false],
|
|
5557
|
+
returnAll: [false],
|
|
5384
5558
|
},
|
|
5385
5559
|
},
|
|
5386
5560
|
description: 'Number of results to skip',
|
|
@@ -5468,6 +5642,7 @@ class CronoPublicApi {
|
|
|
5468
5642
|
resource: ['sequence'],
|
|
5469
5643
|
operation: ['search'],
|
|
5470
5644
|
useRawJsonSearch: [false],
|
|
5645
|
+
returnAll: [false],
|
|
5471
5646
|
},
|
|
5472
5647
|
},
|
|
5473
5648
|
description: 'Max number of results to return',
|
|
@@ -5482,6 +5657,7 @@ class CronoPublicApi {
|
|
|
5482
5657
|
resource: ['sequence'],
|
|
5483
5658
|
operation: ['search'],
|
|
5484
5659
|
useRawJsonSearch: [false],
|
|
5660
|
+
returnAll: [false],
|
|
5485
5661
|
},
|
|
5486
5662
|
},
|
|
5487
5663
|
description: 'Number of results to skip',
|
|
@@ -5618,6 +5794,7 @@ class CronoPublicApi {
|
|
|
5618
5794
|
resource: ['sequence'],
|
|
5619
5795
|
operation: ['searchDetails'],
|
|
5620
5796
|
useRawJsonSearch: [false],
|
|
5797
|
+
returnAll: [false],
|
|
5621
5798
|
},
|
|
5622
5799
|
},
|
|
5623
5800
|
description: 'Max number of results to return',
|
|
@@ -5632,6 +5809,7 @@ class CronoPublicApi {
|
|
|
5632
5809
|
resource: ['sequence'],
|
|
5633
5810
|
operation: ['searchDetails'],
|
|
5634
5811
|
useRawJsonSearch: [false],
|
|
5812
|
+
returnAll: [false],
|
|
5635
5813
|
},
|
|
5636
5814
|
},
|
|
5637
5815
|
description: 'Number of results to skip',
|
|
@@ -5904,6 +6082,7 @@ class CronoPublicApi {
|
|
|
5904
6082
|
resource: ['user'],
|
|
5905
6083
|
operation: ['search'],
|
|
5906
6084
|
useRawJsonSearch: [false],
|
|
6085
|
+
returnAll: [false],
|
|
5907
6086
|
},
|
|
5908
6087
|
},
|
|
5909
6088
|
description: 'Max number of results to return',
|
|
@@ -5918,6 +6097,7 @@ class CronoPublicApi {
|
|
|
5918
6097
|
resource: ['user'],
|
|
5919
6098
|
operation: ['search'],
|
|
5920
6099
|
useRawJsonSearch: [false],
|
|
6100
|
+
returnAll: [false],
|
|
5921
6101
|
},
|
|
5922
6102
|
},
|
|
5923
6103
|
description: 'Number of results to skip',
|
|
@@ -6181,6 +6361,50 @@ class CronoPublicApi {
|
|
|
6181
6361
|
},
|
|
6182
6362
|
description: 'Contact object ID whose sequence must be stopped',
|
|
6183
6363
|
},
|
|
6364
|
+
{
|
|
6365
|
+
displayName: 'Name',
|
|
6366
|
+
name: 'strategyCreateName',
|
|
6367
|
+
type: 'string',
|
|
6368
|
+
default: '',
|
|
6369
|
+
required: true,
|
|
6370
|
+
displayOptions: {
|
|
6371
|
+
show: {
|
|
6372
|
+
resource: ['sequence'],
|
|
6373
|
+
operation: ['create'],
|
|
6374
|
+
useRawJsonData: [false],
|
|
6375
|
+
},
|
|
6376
|
+
},
|
|
6377
|
+
description: 'Sequence name',
|
|
6378
|
+
},
|
|
6379
|
+
{
|
|
6380
|
+
displayName: 'Shared',
|
|
6381
|
+
name: 'strategyCreateShared',
|
|
6382
|
+
type: 'boolean',
|
|
6383
|
+
default: false,
|
|
6384
|
+
displayOptions: {
|
|
6385
|
+
show: {
|
|
6386
|
+
resource: ['sequence'],
|
|
6387
|
+
operation: ['create'],
|
|
6388
|
+
useRawJsonData: [false],
|
|
6389
|
+
},
|
|
6390
|
+
},
|
|
6391
|
+
description: 'Whether the sequence is shared with the rest of the subscription',
|
|
6392
|
+
},
|
|
6393
|
+
{
|
|
6394
|
+
displayName: 'Steps (JSON)',
|
|
6395
|
+
name: 'strategyCreateSteps',
|
|
6396
|
+
type: 'json',
|
|
6397
|
+
default: [],
|
|
6398
|
+
required: true,
|
|
6399
|
+
displayOptions: {
|
|
6400
|
+
show: {
|
|
6401
|
+
resource: ['sequence'],
|
|
6402
|
+
operation: ['create'],
|
|
6403
|
+
useRawJsonData: [false],
|
|
6404
|
+
},
|
|
6405
|
+
},
|
|
6406
|
+
description: 'Array of sequence steps. Each step can include Type, Subtype, Automatic, ReplyToThread, Delay, ScheduleTime, TemplateId, Subject, Content, and Description.',
|
|
6407
|
+
},
|
|
6184
6408
|
{
|
|
6185
6409
|
displayName: 'Title',
|
|
6186
6410
|
name: 'templateSearchTitle',
|
|
@@ -6329,6 +6553,7 @@ class CronoPublicApi {
|
|
|
6329
6553
|
resource: ['template'],
|
|
6330
6554
|
operation: ['search'],
|
|
6331
6555
|
useRawJsonSearch: [false],
|
|
6556
|
+
returnAll: [false],
|
|
6332
6557
|
},
|
|
6333
6558
|
},
|
|
6334
6559
|
description: 'Max number of results to return',
|
|
@@ -6343,6 +6568,7 @@ class CronoPublicApi {
|
|
|
6343
6568
|
resource: ['template'],
|
|
6344
6569
|
operation: ['search'],
|
|
6345
6570
|
useRawJsonSearch: [false],
|
|
6571
|
+
returnAll: [false],
|
|
6346
6572
|
},
|
|
6347
6573
|
},
|
|
6348
6574
|
description: 'Number of results to skip',
|
|
@@ -6389,6 +6615,62 @@ class CronoPublicApi {
|
|
|
6389
6615
|
],
|
|
6390
6616
|
description: 'Filter imports by status',
|
|
6391
6617
|
},
|
|
6618
|
+
{
|
|
6619
|
+
displayName: 'Sync Type',
|
|
6620
|
+
name: 'syncType',
|
|
6621
|
+
type: 'options',
|
|
6622
|
+
default: '',
|
|
6623
|
+
displayOptions: {
|
|
6624
|
+
show: {
|
|
6625
|
+
resource: ['sync'],
|
|
6626
|
+
operation: ['getAll'],
|
|
6627
|
+
},
|
|
6628
|
+
},
|
|
6629
|
+
options: [
|
|
6630
|
+
{ name: 'All', value: '' },
|
|
6631
|
+
{ name: 'Company', value: 'Account' },
|
|
6632
|
+
{ name: 'Contact', value: 'Prospect' },
|
|
6633
|
+
{ name: 'Deal', value: 'Opportunity' },
|
|
6634
|
+
],
|
|
6635
|
+
description: 'Filter sync jobs by table type',
|
|
6636
|
+
},
|
|
6637
|
+
{
|
|
6638
|
+
displayName: 'Sync Status',
|
|
6639
|
+
name: 'syncStatus',
|
|
6640
|
+
type: 'options',
|
|
6641
|
+
default: '',
|
|
6642
|
+
displayOptions: {
|
|
6643
|
+
show: {
|
|
6644
|
+
resource: ['sync'],
|
|
6645
|
+
operation: ['getAll'],
|
|
6646
|
+
},
|
|
6647
|
+
},
|
|
6648
|
+
options: [
|
|
6649
|
+
{ name: 'All', value: '' },
|
|
6650
|
+
{ name: 'Completed', value: 'Completed' },
|
|
6651
|
+
{ name: 'Completed With Errors', value: 'CompletedWithErrors' },
|
|
6652
|
+
{ name: 'On Going', value: 'OnGoing' },
|
|
6653
|
+
{ name: 'Started', value: 'Started' },
|
|
6654
|
+
],
|
|
6655
|
+
description: 'Filter sync jobs by status',
|
|
6656
|
+
},
|
|
6657
|
+
{
|
|
6658
|
+
displayName: 'Limit',
|
|
6659
|
+
name: 'syncLimit',
|
|
6660
|
+
type: 'number',
|
|
6661
|
+
typeOptions: {
|
|
6662
|
+
minValue: 1,
|
|
6663
|
+
maxValue: 100,
|
|
6664
|
+
},
|
|
6665
|
+
default: 50,
|
|
6666
|
+
displayOptions: {
|
|
6667
|
+
show: {
|
|
6668
|
+
resource: ['sync'],
|
|
6669
|
+
operation: ['getAll'],
|
|
6670
|
+
},
|
|
6671
|
+
},
|
|
6672
|
+
description: 'Max number of sync jobs to return, ordered by start date descending (capped at 100)',
|
|
6673
|
+
},
|
|
6392
6674
|
],
|
|
6393
6675
|
};
|
|
6394
6676
|
}
|
|
@@ -6641,6 +6923,25 @@ class CronoPublicApi {
|
|
|
6641
6923
|
}
|
|
6642
6924
|
body = { data };
|
|
6643
6925
|
}
|
|
6926
|
+
else if (operation === 'sync') {
|
|
6927
|
+
method = 'POST';
|
|
6928
|
+
endpoint = `${endpoint}/sync`;
|
|
6929
|
+
const data = useRawJsonData
|
|
6930
|
+
? getJsonParameter(this, 'data', itemIndex)
|
|
6931
|
+
: {};
|
|
6932
|
+
if (!useRawJsonData) {
|
|
6933
|
+
const objectIds = parseCsv(this.getNodeParameter('companySyncObjectIds', itemIndex, ''));
|
|
6934
|
+
if (objectIds.length) {
|
|
6935
|
+
data.ObjectIds = objectIds;
|
|
6936
|
+
}
|
|
6937
|
+
const listId = this.getNodeParameter('companySyncListId', itemIndex, 0);
|
|
6938
|
+
if (listId) {
|
|
6939
|
+
data.ListId = listId;
|
|
6940
|
+
}
|
|
6941
|
+
Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
|
|
6942
|
+
}
|
|
6943
|
+
body = { data };
|
|
6944
|
+
}
|
|
6644
6945
|
break;
|
|
6645
6946
|
}
|
|
6646
6947
|
case 'contact': {
|
|
@@ -6939,6 +7240,32 @@ class CronoPublicApi {
|
|
|
6939
7240
|
}
|
|
6940
7241
|
body = { data };
|
|
6941
7242
|
}
|
|
7243
|
+
else if (operation === 'sync') {
|
|
7244
|
+
method = 'POST';
|
|
7245
|
+
endpoint = `${endpoint}/sync`;
|
|
7246
|
+
const data = useRawJsonData
|
|
7247
|
+
? getJsonParameter(this, 'data', itemIndex)
|
|
7248
|
+
: {};
|
|
7249
|
+
if (!useRawJsonData) {
|
|
7250
|
+
const objectIds = parseCsv(this.getNodeParameter('contactSyncObjectIds', itemIndex, ''));
|
|
7251
|
+
if (objectIds.length) {
|
|
7252
|
+
data.ObjectIds = objectIds;
|
|
7253
|
+
}
|
|
7254
|
+
if (this.getNodeParameter('contactSyncIsLead', itemIndex, false)) {
|
|
7255
|
+
data.IsLead = true;
|
|
7256
|
+
}
|
|
7257
|
+
const listId = this.getNodeParameter('contactSyncListId', itemIndex, 0);
|
|
7258
|
+
if (listId) {
|
|
7259
|
+
data.ListId = listId;
|
|
7260
|
+
}
|
|
7261
|
+
const strategyId = this.getNodeParameter('contactSyncStrategyId', itemIndex, 0);
|
|
7262
|
+
if (strategyId) {
|
|
7263
|
+
data.StrategyId = strategyId;
|
|
7264
|
+
}
|
|
7265
|
+
Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
|
|
7266
|
+
}
|
|
7267
|
+
body = { data };
|
|
7268
|
+
}
|
|
6942
7269
|
break;
|
|
6943
7270
|
}
|
|
6944
7271
|
case 'deal': {
|
|
@@ -7066,6 +7393,21 @@ class CronoPublicApi {
|
|
|
7066
7393
|
}
|
|
7067
7394
|
body = { data };
|
|
7068
7395
|
}
|
|
7396
|
+
else if (operation === 'sync') {
|
|
7397
|
+
method = 'POST';
|
|
7398
|
+
endpoint = `${endpoint}/sync`;
|
|
7399
|
+
const data = useRawJsonData
|
|
7400
|
+
? getJsonParameter(this, 'data', itemIndex)
|
|
7401
|
+
: {};
|
|
7402
|
+
if (!useRawJsonData) {
|
|
7403
|
+
const objectIds = parseCsv(this.getNodeParameter('dealSyncObjectIds', itemIndex, ''));
|
|
7404
|
+
if (objectIds.length) {
|
|
7405
|
+
data.ObjectIds = objectIds;
|
|
7406
|
+
}
|
|
7407
|
+
Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
|
|
7408
|
+
}
|
|
7409
|
+
body = { data };
|
|
7410
|
+
}
|
|
7069
7411
|
break;
|
|
7070
7412
|
}
|
|
7071
7413
|
case 'note': {
|
|
@@ -7496,6 +7838,24 @@ class CronoPublicApi {
|
|
|
7496
7838
|
}
|
|
7497
7839
|
body = { data };
|
|
7498
7840
|
}
|
|
7841
|
+
else if (operation === 'create') {
|
|
7842
|
+
method = 'POST';
|
|
7843
|
+
const data = useRawJsonData
|
|
7844
|
+
? getJsonParameter(this, 'data', itemIndex)
|
|
7845
|
+
: {};
|
|
7846
|
+
if (!useRawJsonData) {
|
|
7847
|
+
addIfNotEmpty(data, 'Name', this.getNodeParameter('strategyCreateName', itemIndex, ''));
|
|
7848
|
+
if (this.getNodeParameter('strategyCreateShared', itemIndex, false)) {
|
|
7849
|
+
data.Shared = true;
|
|
7850
|
+
}
|
|
7851
|
+
const steps = getJsonArrayParameter(this, 'strategyCreateSteps', itemIndex);
|
|
7852
|
+
if (steps.length) {
|
|
7853
|
+
data.Steps = steps;
|
|
7854
|
+
}
|
|
7855
|
+
Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
|
|
7856
|
+
}
|
|
7857
|
+
body = { data };
|
|
7858
|
+
}
|
|
7499
7859
|
else if (operation === 'stopContactSequence') {
|
|
7500
7860
|
method = 'POST';
|
|
7501
7861
|
endpoint = `${endpoint}/prospects/stop`;
|
|
@@ -7723,6 +8083,31 @@ class CronoPublicApi {
|
|
|
7723
8083
|
}
|
|
7724
8084
|
break;
|
|
7725
8085
|
}
|
|
8086
|
+
case 'sync': {
|
|
8087
|
+
endpoint = `${basePath}/Sync`;
|
|
8088
|
+
if (operation === 'get') {
|
|
8089
|
+
method = 'GET';
|
|
8090
|
+
const syncId = this.getNodeParameter('syncId', itemIndex);
|
|
8091
|
+
endpoint = `${endpoint}/${syncId}`;
|
|
8092
|
+
}
|
|
8093
|
+
else if (operation === 'getAll') {
|
|
8094
|
+
method = 'GET';
|
|
8095
|
+
qs = {};
|
|
8096
|
+
const syncType = this.getNodeParameter('syncType', itemIndex, '');
|
|
8097
|
+
const syncStatus = this.getNodeParameter('syncStatus', itemIndex, '');
|
|
8098
|
+
const syncLimit = this.getNodeParameter('syncLimit', itemIndex, 50);
|
|
8099
|
+
if (syncLimit) {
|
|
8100
|
+
qs.limit = syncLimit;
|
|
8101
|
+
}
|
|
8102
|
+
if (syncType) {
|
|
8103
|
+
qs.type = syncType;
|
|
8104
|
+
}
|
|
8105
|
+
if (syncStatus) {
|
|
8106
|
+
qs.statusType = syncStatus;
|
|
8107
|
+
}
|
|
8108
|
+
}
|
|
8109
|
+
break;
|
|
8110
|
+
}
|
|
7726
8111
|
default:
|
|
7727
8112
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported resource: ${resource}`, {
|
|
7728
8113
|
itemIndex,
|