@crono-one/n8n-nodes-crono-public-api 1.4.2 → 1.6.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',
@@ -579,17 +638,172 @@ class CronoPublicApi {
579
638
  },
580
639
  },
581
640
  {
582
- displayName: 'Include Options (JSON)',
583
- name: 'includeOptions',
584
- type: 'json',
585
- default: {},
641
+ displayName: 'Include User',
642
+ name: 'companyGetIncludeUser',
643
+ type: 'boolean',
644
+ default: false,
645
+ displayOptions: {
646
+ show: {
647
+ resource: ['company'],
648
+ operation: ['get', 'getAll'],
649
+ },
650
+ },
651
+ },
652
+ {
653
+ displayName: 'Include External Values (No Tags)',
654
+ name: 'companyGetIncludeExternalValuesNoTags',
655
+ type: 'boolean',
656
+ default: false,
657
+ displayOptions: {
658
+ show: {
659
+ resource: ['company'],
660
+ operation: ['get', 'getAll'],
661
+ },
662
+ },
663
+ },
664
+ {
665
+ displayName: 'Include Tags',
666
+ name: 'companyGetIncludeTags',
667
+ type: 'boolean',
668
+ default: false,
669
+ displayOptions: {
670
+ show: {
671
+ resource: ['company'],
672
+ operation: ['get', 'getAll'],
673
+ },
674
+ },
675
+ },
676
+ {
677
+ displayName: 'Include Tasks Analytics',
678
+ name: 'companyGetIncludeTasksAnalytics',
679
+ type: 'boolean',
680
+ default: false,
681
+ displayOptions: {
682
+ show: {
683
+ resource: ['company'],
684
+ operation: ['get', 'getAll'],
685
+ },
686
+ },
687
+ },
688
+ {
689
+ displayName: 'Include Sequences',
690
+ name: 'companyGetIncludeSequences',
691
+ type: 'boolean',
692
+ default: false,
693
+ displayOptions: {
694
+ show: {
695
+ resource: ['company'],
696
+ operation: ['get', 'getAll'],
697
+ },
698
+ },
699
+ },
700
+ {
701
+ displayName: 'Include User',
702
+ name: 'contactGetIncludeUser',
703
+ type: 'boolean',
704
+ default: false,
705
+ displayOptions: {
706
+ show: {
707
+ resource: ['contact'],
708
+ operation: ['get', 'getAll'],
709
+ },
710
+ },
711
+ },
712
+ {
713
+ displayName: 'Include External Values (No Tags)',
714
+ name: 'contactGetIncludeExternalValuesNoTags',
715
+ type: 'boolean',
716
+ default: false,
717
+ displayOptions: {
718
+ show: {
719
+ resource: ['contact'],
720
+ operation: ['get', 'getAll'],
721
+ },
722
+ },
723
+ },
724
+ {
725
+ displayName: 'Include Tags',
726
+ name: 'contactGetIncludeTags',
727
+ type: 'boolean',
728
+ default: false,
729
+ displayOptions: {
730
+ show: {
731
+ resource: ['contact'],
732
+ operation: ['get', 'getAll'],
733
+ },
734
+ },
735
+ },
736
+ {
737
+ displayName: 'Include Tasks Analytics',
738
+ name: 'contactGetIncludeTasksAnalytics',
739
+ type: 'boolean',
740
+ default: false,
741
+ displayOptions: {
742
+ show: {
743
+ resource: ['contact'],
744
+ operation: ['get', 'getAll'],
745
+ },
746
+ },
747
+ },
748
+ {
749
+ displayName: 'Include Sequences',
750
+ name: 'contactGetIncludeSequences',
751
+ type: 'boolean',
752
+ default: false,
753
+ displayOptions: {
754
+ show: {
755
+ resource: ['contact'],
756
+ operation: ['get', 'getAll'],
757
+ },
758
+ },
759
+ },
760
+ {
761
+ displayName: 'Include User',
762
+ name: 'dealGetIncludeUser',
763
+ type: 'boolean',
764
+ default: false,
765
+ displayOptions: {
766
+ show: {
767
+ resource: ['deal'],
768
+ operation: ['get', 'getAll'],
769
+ },
770
+ },
771
+ },
772
+ {
773
+ displayName: 'Include External Values',
774
+ name: 'dealGetIncludeExternalValues',
775
+ type: 'boolean',
776
+ default: false,
586
777
  displayOptions: {
587
778
  show: {
588
- resource: ['company', 'contact', 'deal', 'note', 'activity'],
779
+ resource: ['deal'],
780
+ operation: ['get', 'getAll'],
781
+ },
782
+ },
783
+ },
784
+ {
785
+ displayName: 'Include User',
786
+ name: 'noteGetIncludeUser',
787
+ type: 'boolean',
788
+ default: false,
789
+ displayOptions: {
790
+ show: {
791
+ resource: ['note'],
792
+ operation: ['get', 'getAll'],
793
+ },
794
+ },
795
+ },
796
+ {
797
+ displayName: 'Include User',
798
+ name: 'activityGetIncludeUser',
799
+ type: 'boolean',
800
+ default: false,
801
+ displayOptions: {
802
+ show: {
803
+ resource: ['activity'],
589
804
  operation: ['get', 'getAll'],
590
805
  },
591
806
  },
592
- description: 'JSON object of include options to add as query parameters',
593
807
  },
594
808
  {
595
809
  displayName: 'Return All',
@@ -675,7 +889,7 @@ class CronoPublicApi {
675
889
  displayOptions: {
676
890
  show: {
677
891
  resource: ['company', 'contact', 'deal', 'note', 'task', 'list', 'sequence'],
678
- operation: ['create', 'update', 'import', 'addContacts', 'stopContactSequence'],
892
+ operation: ['create', 'update', 'import', 'sync', 'addContacts', 'stopContactSequence'],
679
893
  },
680
894
  },
681
895
  description: 'Whether to send a raw JSON data payload',
@@ -688,7 +902,7 @@ class CronoPublicApi {
688
902
  displayOptions: {
689
903
  show: {
690
904
  resource: ['company', 'contact', 'deal', 'note', 'task', 'list', 'sequence'],
691
- operation: ['create', 'update', 'import', 'addContacts', 'stopContactSequence'],
905
+ operation: ['create', 'update', 'import', 'sync', 'addContacts', 'stopContactSequence'],
692
906
  useRawJsonData: [true],
693
907
  },
694
908
  },
@@ -705,7 +919,7 @@ class CronoPublicApi {
705
919
  displayOptions: {
706
920
  show: {
707
921
  resource: ['company', 'contact', 'deal', 'note', 'task', 'list', 'sequence'],
708
- operation: ['create', 'update', 'import', 'addContacts', 'stopContactSequence'],
922
+ operation: ['create', 'update', 'import', 'sync', 'addContacts', 'stopContactSequence'],
709
923
  useRawJsonData: [false],
710
924
  },
711
925
  },
@@ -1322,6 +1536,35 @@ class CronoPublicApi {
1322
1536
  },
1323
1537
  description: 'Comma-separated list of AI external property IDs to generate',
1324
1538
  },
1539
+ {
1540
+ displayName: 'Object IDs',
1541
+ name: 'companySyncObjectIds',
1542
+ type: 'string',
1543
+ default: '',
1544
+ required: true,
1545
+ displayOptions: {
1546
+ show: {
1547
+ resource: ['company'],
1548
+ operation: ['sync'],
1549
+ useRawJsonData: [false],
1550
+ },
1551
+ },
1552
+ description: 'Comma-separated list of CRM object IDs of the companies to synchronize',
1553
+ },
1554
+ {
1555
+ displayName: 'List ID',
1556
+ name: 'companySyncListId',
1557
+ type: 'number',
1558
+ default: 0,
1559
+ displayOptions: {
1560
+ show: {
1561
+ resource: ['company'],
1562
+ operation: ['sync'],
1563
+ useRawJsonData: [false],
1564
+ },
1565
+ },
1566
+ description: 'Optional Crono list ID. When provided, the synchronized companies are also added to this list at the end of the job.',
1567
+ },
1325
1568
  {
1326
1569
  displayName: 'First Name',
1327
1570
  name: 'contactCreateFirstName',
@@ -2127,6 +2370,63 @@ class CronoPublicApi {
2127
2370
  },
2128
2371
  description: 'Comma-separated list of AI external property IDs to generate',
2129
2372
  },
2373
+ {
2374
+ displayName: 'Object IDs',
2375
+ name: 'contactSyncObjectIds',
2376
+ type: 'string',
2377
+ default: '',
2378
+ required: true,
2379
+ displayOptions: {
2380
+ show: {
2381
+ resource: ['contact'],
2382
+ operation: ['sync'],
2383
+ useRawJsonData: [false],
2384
+ },
2385
+ },
2386
+ description: 'Comma-separated list of CRM object IDs of the contacts to synchronize',
2387
+ },
2388
+ {
2389
+ displayName: 'Is Lead',
2390
+ name: 'contactSyncIsLead',
2391
+ type: 'boolean',
2392
+ default: false,
2393
+ displayOptions: {
2394
+ show: {
2395
+ resource: ['contact'],
2396
+ operation: ['sync'],
2397
+ useRawJsonData: [false],
2398
+ },
2399
+ },
2400
+ description: 'Whether the provided object IDs should be treated as leads instead of contacts',
2401
+ },
2402
+ {
2403
+ displayName: 'List ID',
2404
+ name: 'contactSyncListId',
2405
+ type: 'number',
2406
+ default: 0,
2407
+ displayOptions: {
2408
+ show: {
2409
+ resource: ['contact'],
2410
+ operation: ['sync'],
2411
+ useRawJsonData: [false],
2412
+ },
2413
+ },
2414
+ description: 'Optional Crono list ID. When provided, the synchronized contacts are also added to this list at the end of the job.',
2415
+ },
2416
+ {
2417
+ displayName: 'Strategy ID',
2418
+ name: 'contactSyncStrategyId',
2419
+ type: 'number',
2420
+ default: 0,
2421
+ displayOptions: {
2422
+ show: {
2423
+ resource: ['contact'],
2424
+ operation: ['sync'],
2425
+ useRawJsonData: [false],
2426
+ },
2427
+ },
2428
+ description: 'Optional Crono sequence (strategy) ID. When provided, the synchronized contacts are also enrolled in this sequence at the end of the job.',
2429
+ },
2130
2430
  {
2131
2431
  displayName: 'Company ID',
2132
2432
  name: 'dealCreateAccountId',
@@ -2416,6 +2716,21 @@ class CronoPublicApi {
2416
2716
  },
2417
2717
  description: 'Owner user ID',
2418
2718
  },
2719
+ {
2720
+ displayName: 'Object IDs',
2721
+ name: 'dealSyncObjectIds',
2722
+ type: 'string',
2723
+ default: '',
2724
+ required: true,
2725
+ displayOptions: {
2726
+ show: {
2727
+ resource: ['deal'],
2728
+ operation: ['sync'],
2729
+ useRawJsonData: [false],
2730
+ },
2731
+ },
2732
+ description: 'Comma-separated list of CRM object IDs of the deals to synchronize',
2733
+ },
2419
2734
  {
2420
2735
  displayName: 'Description',
2421
2736
  name: 'noteCreateDescription',
@@ -2693,6 +3008,7 @@ class CronoPublicApi {
2693
3008
  resource: ['task'],
2694
3009
  operation: ['search'],
2695
3010
  useRawJsonSearch: [false],
3011
+ returnAll: [false],
2696
3012
  },
2697
3013
  },
2698
3014
  description: 'Max number of tasks to return',
@@ -2707,6 +3023,7 @@ class CronoPublicApi {
2707
3023
  resource: ['task'],
2708
3024
  operation: ['search'],
2709
3025
  useRawJsonSearch: [false],
3026
+ returnAll: [false],
2710
3027
  },
2711
3028
  },
2712
3029
  description: 'Number of tasks to skip',
@@ -3228,6 +3545,7 @@ class CronoPublicApi {
3228
3545
  resource: ['company'],
3229
3546
  operation: ['search'],
3230
3547
  useRawJsonSearch: [false],
3548
+ returnAll: [false],
3231
3549
  },
3232
3550
  },
3233
3551
  description: 'Max number of results to return',
@@ -3242,6 +3560,7 @@ class CronoPublicApi {
3242
3560
  resource: ['company'],
3243
3561
  operation: ['search'],
3244
3562
  useRawJsonSearch: [false],
3563
+ returnAll: [false],
3245
3564
  },
3246
3565
  },
3247
3566
  description: 'Number of results to skip',
@@ -3720,6 +4039,7 @@ class CronoPublicApi {
3720
4039
  resource: ['contact'],
3721
4040
  operation: ['search'],
3722
4041
  useRawJsonSearch: [false],
4042
+ returnAll: [false],
3723
4043
  },
3724
4044
  },
3725
4045
  description: 'Max number of results to return',
@@ -3734,6 +4054,7 @@ class CronoPublicApi {
3734
4054
  resource: ['contact'],
3735
4055
  operation: ['search'],
3736
4056
  useRawJsonSearch: [false],
4057
+ returnAll: [false],
3737
4058
  },
3738
4059
  },
3739
4060
  description: 'Number of results to skip',
@@ -4394,6 +4715,7 @@ class CronoPublicApi {
4394
4715
  resource: ['deal'],
4395
4716
  operation: ['search'],
4396
4717
  useRawJsonSearch: [false],
4718
+ returnAll: [false],
4397
4719
  },
4398
4720
  },
4399
4721
  description: 'Max number of results to return',
@@ -4408,6 +4730,7 @@ class CronoPublicApi {
4408
4730
  resource: ['deal'],
4409
4731
  operation: ['search'],
4410
4732
  useRawJsonSearch: [false],
4733
+ returnAll: [false],
4411
4734
  },
4412
4735
  },
4413
4736
  description: 'Number of results to skip',
@@ -4708,6 +5031,7 @@ class CronoPublicApi {
4708
5031
  resource: ['note'],
4709
5032
  operation: ['search'],
4710
5033
  useRawJsonSearch: [false],
5034
+ returnAll: [false],
4711
5035
  },
4712
5036
  },
4713
5037
  description: 'Max number of results to return',
@@ -4722,6 +5046,7 @@ class CronoPublicApi {
4722
5046
  resource: ['note'],
4723
5047
  operation: ['search'],
4724
5048
  useRawJsonSearch: [false],
5049
+ returnAll: [false],
4725
5050
  },
4726
5051
  },
4727
5052
  description: 'Number of results to skip',
@@ -4944,6 +5269,7 @@ class CronoPublicApi {
4944
5269
  resource: ['activity'],
4945
5270
  operation: ['search'],
4946
5271
  useRawJsonSearch: [false],
5272
+ returnAll: [false],
4947
5273
  },
4948
5274
  },
4949
5275
  description: 'Max number of results to return',
@@ -4958,6 +5284,7 @@ class CronoPublicApi {
4958
5284
  resource: ['activity'],
4959
5285
  operation: ['search'],
4960
5286
  useRawJsonSearch: [false],
5287
+ returnAll: [false],
4961
5288
  },
4962
5289
  },
4963
5290
  description: 'Number of results to skip',
@@ -5367,6 +5694,7 @@ class CronoPublicApi {
5367
5694
  resource: ['list'],
5368
5695
  operation: ['search'],
5369
5696
  useRawJsonSearch: [false],
5697
+ returnAll: [false],
5370
5698
  },
5371
5699
  },
5372
5700
  description: 'Max number of results to return',
@@ -5381,6 +5709,7 @@ class CronoPublicApi {
5381
5709
  resource: ['list'],
5382
5710
  operation: ['search'],
5383
5711
  useRawJsonSearch: [false],
5712
+ returnAll: [false],
5384
5713
  },
5385
5714
  },
5386
5715
  description: 'Number of results to skip',
@@ -5468,6 +5797,7 @@ class CronoPublicApi {
5468
5797
  resource: ['sequence'],
5469
5798
  operation: ['search'],
5470
5799
  useRawJsonSearch: [false],
5800
+ returnAll: [false],
5471
5801
  },
5472
5802
  },
5473
5803
  description: 'Max number of results to return',
@@ -5482,6 +5812,7 @@ class CronoPublicApi {
5482
5812
  resource: ['sequence'],
5483
5813
  operation: ['search'],
5484
5814
  useRawJsonSearch: [false],
5815
+ returnAll: [false],
5485
5816
  },
5486
5817
  },
5487
5818
  description: 'Number of results to skip',
@@ -5618,6 +5949,7 @@ class CronoPublicApi {
5618
5949
  resource: ['sequence'],
5619
5950
  operation: ['searchDetails'],
5620
5951
  useRawJsonSearch: [false],
5952
+ returnAll: [false],
5621
5953
  },
5622
5954
  },
5623
5955
  description: 'Max number of results to return',
@@ -5632,6 +5964,7 @@ class CronoPublicApi {
5632
5964
  resource: ['sequence'],
5633
5965
  operation: ['searchDetails'],
5634
5966
  useRawJsonSearch: [false],
5967
+ returnAll: [false],
5635
5968
  },
5636
5969
  },
5637
5970
  description: 'Number of results to skip',
@@ -5904,6 +6237,7 @@ class CronoPublicApi {
5904
6237
  resource: ['user'],
5905
6238
  operation: ['search'],
5906
6239
  useRawJsonSearch: [false],
6240
+ returnAll: [false],
5907
6241
  },
5908
6242
  },
5909
6243
  description: 'Max number of results to return',
@@ -5918,6 +6252,7 @@ class CronoPublicApi {
5918
6252
  resource: ['user'],
5919
6253
  operation: ['search'],
5920
6254
  useRawJsonSearch: [false],
6255
+ returnAll: [false],
5921
6256
  },
5922
6257
  },
5923
6258
  description: 'Number of results to skip',
@@ -6181,6 +6516,50 @@ class CronoPublicApi {
6181
6516
  },
6182
6517
  description: 'Contact object ID whose sequence must be stopped',
6183
6518
  },
6519
+ {
6520
+ displayName: 'Name',
6521
+ name: 'strategyCreateName',
6522
+ type: 'string',
6523
+ default: '',
6524
+ required: true,
6525
+ displayOptions: {
6526
+ show: {
6527
+ resource: ['sequence'],
6528
+ operation: ['create'],
6529
+ useRawJsonData: [false],
6530
+ },
6531
+ },
6532
+ description: 'Sequence name',
6533
+ },
6534
+ {
6535
+ displayName: 'Shared',
6536
+ name: 'strategyCreateShared',
6537
+ type: 'boolean',
6538
+ default: false,
6539
+ displayOptions: {
6540
+ show: {
6541
+ resource: ['sequence'],
6542
+ operation: ['create'],
6543
+ useRawJsonData: [false],
6544
+ },
6545
+ },
6546
+ description: 'Whether the sequence is shared with the rest of the subscription',
6547
+ },
6548
+ {
6549
+ displayName: 'Steps (JSON)',
6550
+ name: 'strategyCreateSteps',
6551
+ type: 'json',
6552
+ default: [],
6553
+ required: true,
6554
+ displayOptions: {
6555
+ show: {
6556
+ resource: ['sequence'],
6557
+ operation: ['create'],
6558
+ useRawJsonData: [false],
6559
+ },
6560
+ },
6561
+ description: 'Array of sequence steps. Each step can include Type, Subtype, Automatic, ReplyToThread, Delay, ScheduleTime, TemplateId, Subject, Content, and Description.',
6562
+ },
6184
6563
  {
6185
6564
  displayName: 'Title',
6186
6565
  name: 'templateSearchTitle',
@@ -6329,6 +6708,7 @@ class CronoPublicApi {
6329
6708
  resource: ['template'],
6330
6709
  operation: ['search'],
6331
6710
  useRawJsonSearch: [false],
6711
+ returnAll: [false],
6332
6712
  },
6333
6713
  },
6334
6714
  description: 'Max number of results to return',
@@ -6343,6 +6723,7 @@ class CronoPublicApi {
6343
6723
  resource: ['template'],
6344
6724
  operation: ['search'],
6345
6725
  useRawJsonSearch: [false],
6726
+ returnAll: [false],
6346
6727
  },
6347
6728
  },
6348
6729
  description: 'Number of results to skip',
@@ -6389,6 +6770,62 @@ class CronoPublicApi {
6389
6770
  ],
6390
6771
  description: 'Filter imports by status',
6391
6772
  },
6773
+ {
6774
+ displayName: 'Sync Type',
6775
+ name: 'syncType',
6776
+ type: 'options',
6777
+ default: '',
6778
+ displayOptions: {
6779
+ show: {
6780
+ resource: ['sync'],
6781
+ operation: ['getAll'],
6782
+ },
6783
+ },
6784
+ options: [
6785
+ { name: 'All', value: '' },
6786
+ { name: 'Company', value: 'Account' },
6787
+ { name: 'Contact', value: 'Prospect' },
6788
+ { name: 'Deal', value: 'Opportunity' },
6789
+ ],
6790
+ description: 'Filter sync jobs by table type',
6791
+ },
6792
+ {
6793
+ displayName: 'Sync Status',
6794
+ name: 'syncStatus',
6795
+ type: 'options',
6796
+ default: '',
6797
+ displayOptions: {
6798
+ show: {
6799
+ resource: ['sync'],
6800
+ operation: ['getAll'],
6801
+ },
6802
+ },
6803
+ options: [
6804
+ { name: 'All', value: '' },
6805
+ { name: 'Completed', value: 'Completed' },
6806
+ { name: 'Completed With Errors', value: 'CompletedWithErrors' },
6807
+ { name: 'On Going', value: 'OnGoing' },
6808
+ { name: 'Started', value: 'Started' },
6809
+ ],
6810
+ description: 'Filter sync jobs by status',
6811
+ },
6812
+ {
6813
+ displayName: 'Limit',
6814
+ name: 'syncLimit',
6815
+ type: 'number',
6816
+ typeOptions: {
6817
+ minValue: 1,
6818
+ maxValue: 100,
6819
+ },
6820
+ default: 50,
6821
+ displayOptions: {
6822
+ show: {
6823
+ resource: ['sync'],
6824
+ operation: ['getAll'],
6825
+ },
6826
+ },
6827
+ description: 'Max number of sync jobs to return, ordered by start date descending (capped at 100)',
6828
+ },
6392
6829
  ],
6393
6830
  };
6394
6831
  }
@@ -6420,12 +6857,29 @@ class CronoPublicApi {
6420
6857
  method = 'GET';
6421
6858
  const objectId = this.getNodeParameter('objectId', itemIndex);
6422
6859
  endpoint = `${endpoint}/${objectId}`;
6423
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
6860
+ if (this.getNodeParameter('companyGetIncludeUser', itemIndex, false))
6861
+ qs.WithUser = true;
6862
+ if (this.getNodeParameter('companyGetIncludeExternalValuesNoTags', itemIndex, false))
6863
+ qs.WithExternalValuesNoTags = true;
6864
+ if (this.getNodeParameter('companyGetIncludeTags', itemIndex, false))
6865
+ qs.WithTags = true;
6866
+ if (this.getNodeParameter('companyGetIncludeTasksAnalytics', itemIndex, false))
6867
+ qs.WithTasksAnalytics = true;
6868
+ if (this.getNodeParameter('companyGetIncludeSequences', itemIndex, false))
6869
+ qs.WithSequences = true;
6424
6870
  }
6425
6871
  else if (operation === 'getAll') {
6426
6872
  method = 'GET';
6427
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
6428
- qs = { ...qs, ...includeOptions };
6873
+ if (this.getNodeParameter('companyGetIncludeUser', itemIndex, false))
6874
+ qs.WithUser = true;
6875
+ if (this.getNodeParameter('companyGetIncludeExternalValuesNoTags', itemIndex, false))
6876
+ qs.WithExternalValuesNoTags = true;
6877
+ if (this.getNodeParameter('companyGetIncludeTags', itemIndex, false))
6878
+ qs.WithTags = true;
6879
+ if (this.getNodeParameter('companyGetIncludeTasksAnalytics', itemIndex, false))
6880
+ qs.WithTasksAnalytics = true;
6881
+ if (this.getNodeParameter('companyGetIncludeSequences', itemIndex, false))
6882
+ qs.WithSequences = true;
6429
6883
  }
6430
6884
  else if (operation === 'search') {
6431
6885
  method = 'POST';
@@ -6641,6 +7095,25 @@ class CronoPublicApi {
6641
7095
  }
6642
7096
  body = { data };
6643
7097
  }
7098
+ else if (operation === 'sync') {
7099
+ method = 'POST';
7100
+ endpoint = `${endpoint}/sync`;
7101
+ const data = useRawJsonData
7102
+ ? getJsonParameter(this, 'data', itemIndex)
7103
+ : {};
7104
+ if (!useRawJsonData) {
7105
+ const objectIds = parseCsv(this.getNodeParameter('companySyncObjectIds', itemIndex, ''));
7106
+ if (objectIds.length) {
7107
+ data.ObjectIds = objectIds;
7108
+ }
7109
+ const listId = this.getNodeParameter('companySyncListId', itemIndex, 0);
7110
+ if (listId) {
7111
+ data.ListId = listId;
7112
+ }
7113
+ Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
7114
+ }
7115
+ body = { data };
7116
+ }
6644
7117
  break;
6645
7118
  }
6646
7119
  case 'contact': {
@@ -6649,12 +7122,29 @@ class CronoPublicApi {
6649
7122
  method = 'GET';
6650
7123
  const objectId = this.getNodeParameter('objectId', itemIndex);
6651
7124
  endpoint = `${endpoint}/${objectId}`;
6652
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
7125
+ if (this.getNodeParameter('contactGetIncludeUser', itemIndex, false))
7126
+ qs.WithUser = true;
7127
+ if (this.getNodeParameter('contactGetIncludeExternalValuesNoTags', itemIndex, false))
7128
+ qs.WithExternalValuesNoTags = true;
7129
+ if (this.getNodeParameter('contactGetIncludeTags', itemIndex, false))
7130
+ qs.WithTags = true;
7131
+ if (this.getNodeParameter('contactGetIncludeTasksAnalytics', itemIndex, false))
7132
+ qs.WithTasksAnalytics = true;
7133
+ if (this.getNodeParameter('contactGetIncludeSequences', itemIndex, false))
7134
+ qs.WithSequences = true;
6653
7135
  }
6654
7136
  else if (operation === 'getAll') {
6655
7137
  method = 'GET';
6656
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
6657
- qs = { ...qs, ...includeOptions };
7138
+ if (this.getNodeParameter('contactGetIncludeUser', itemIndex, false))
7139
+ qs.WithUser = true;
7140
+ if (this.getNodeParameter('contactGetIncludeExternalValuesNoTags', itemIndex, false))
7141
+ qs.WithExternalValuesNoTags = true;
7142
+ if (this.getNodeParameter('contactGetIncludeTags', itemIndex, false))
7143
+ qs.WithTags = true;
7144
+ if (this.getNodeParameter('contactGetIncludeTasksAnalytics', itemIndex, false))
7145
+ qs.WithTasksAnalytics = true;
7146
+ if (this.getNodeParameter('contactGetIncludeSequences', itemIndex, false))
7147
+ qs.WithSequences = true;
6658
7148
  }
6659
7149
  else if (operation === 'search') {
6660
7150
  method = 'POST';
@@ -6939,6 +7429,32 @@ class CronoPublicApi {
6939
7429
  }
6940
7430
  body = { data };
6941
7431
  }
7432
+ else if (operation === 'sync') {
7433
+ method = 'POST';
7434
+ endpoint = `${endpoint}/sync`;
7435
+ const data = useRawJsonData
7436
+ ? getJsonParameter(this, 'data', itemIndex)
7437
+ : {};
7438
+ if (!useRawJsonData) {
7439
+ const objectIds = parseCsv(this.getNodeParameter('contactSyncObjectIds', itemIndex, ''));
7440
+ if (objectIds.length) {
7441
+ data.ObjectIds = objectIds;
7442
+ }
7443
+ if (this.getNodeParameter('contactSyncIsLead', itemIndex, false)) {
7444
+ data.IsLead = true;
7445
+ }
7446
+ const listId = this.getNodeParameter('contactSyncListId', itemIndex, 0);
7447
+ if (listId) {
7448
+ data.ListId = listId;
7449
+ }
7450
+ const strategyId = this.getNodeParameter('contactSyncStrategyId', itemIndex, 0);
7451
+ if (strategyId) {
7452
+ data.StrategyId = strategyId;
7453
+ }
7454
+ Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
7455
+ }
7456
+ body = { data };
7457
+ }
6942
7458
  break;
6943
7459
  }
6944
7460
  case 'deal': {
@@ -6947,12 +7463,17 @@ class CronoPublicApi {
6947
7463
  method = 'GET';
6948
7464
  const objectId = this.getNodeParameter('objectId', itemIndex);
6949
7465
  endpoint = `${endpoint}/${objectId}`;
6950
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
7466
+ if (this.getNodeParameter('dealGetIncludeUser', itemIndex, false))
7467
+ qs.WithUser = true;
7468
+ if (this.getNodeParameter('dealGetIncludeExternalValues', itemIndex, false))
7469
+ qs.WithExternalValues = true;
6951
7470
  }
6952
7471
  else if (operation === 'getAll') {
6953
7472
  method = 'GET';
6954
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
6955
- qs = { ...qs, ...includeOptions };
7473
+ if (this.getNodeParameter('dealGetIncludeUser', itemIndex, false))
7474
+ qs.WithUser = true;
7475
+ if (this.getNodeParameter('dealGetIncludeExternalValues', itemIndex, false))
7476
+ qs.WithExternalValues = true;
6956
7477
  }
6957
7478
  else if (operation === 'search') {
6958
7479
  method = 'POST';
@@ -7066,6 +7587,21 @@ class CronoPublicApi {
7066
7587
  }
7067
7588
  body = { data };
7068
7589
  }
7590
+ else if (operation === 'sync') {
7591
+ method = 'POST';
7592
+ endpoint = `${endpoint}/sync`;
7593
+ const data = useRawJsonData
7594
+ ? getJsonParameter(this, 'data', itemIndex)
7595
+ : {};
7596
+ if (!useRawJsonData) {
7597
+ const objectIds = parseCsv(this.getNodeParameter('dealSyncObjectIds', itemIndex, ''));
7598
+ if (objectIds.length) {
7599
+ data.ObjectIds = objectIds;
7600
+ }
7601
+ Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
7602
+ }
7603
+ body = { data };
7604
+ }
7069
7605
  break;
7070
7606
  }
7071
7607
  case 'note': {
@@ -7074,12 +7610,13 @@ class CronoPublicApi {
7074
7610
  method = 'GET';
7075
7611
  const objectId = this.getNodeParameter('objectId', itemIndex);
7076
7612
  endpoint = `${endpoint}/${objectId}`;
7077
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
7613
+ if (this.getNodeParameter('noteGetIncludeUser', itemIndex, false))
7614
+ qs.WithUser = true;
7078
7615
  }
7079
7616
  else if (operation === 'getAll') {
7080
7617
  method = 'GET';
7081
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
7082
- qs = { ...qs, ...includeOptions };
7618
+ if (this.getNodeParameter('noteGetIncludeUser', itemIndex, false))
7619
+ qs.WithUser = true;
7083
7620
  }
7084
7621
  else if (operation === 'search') {
7085
7622
  method = 'POST';
@@ -7286,12 +7823,13 @@ class CronoPublicApi {
7286
7823
  method = 'GET';
7287
7824
  const objectId = this.getNodeParameter('objectId', itemIndex);
7288
7825
  endpoint = `${endpoint}/${objectId}`;
7289
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
7826
+ if (this.getNodeParameter('activityGetIncludeUser', itemIndex, false))
7827
+ qs.WithUser = true;
7290
7828
  }
7291
7829
  else if (operation === 'getAll') {
7292
7830
  method = 'GET';
7293
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
7294
- qs = { ...qs, ...includeOptions };
7831
+ if (this.getNodeParameter('activityGetIncludeUser', itemIndex, false))
7832
+ qs.WithUser = true;
7295
7833
  }
7296
7834
  else if (operation === 'search') {
7297
7835
  method = 'POST';
@@ -7496,6 +8034,24 @@ class CronoPublicApi {
7496
8034
  }
7497
8035
  body = { data };
7498
8036
  }
8037
+ else if (operation === 'create') {
8038
+ method = 'POST';
8039
+ const data = useRawJsonData
8040
+ ? getJsonParameter(this, 'data', itemIndex)
8041
+ : {};
8042
+ if (!useRawJsonData) {
8043
+ addIfNotEmpty(data, 'Name', this.getNodeParameter('strategyCreateName', itemIndex, ''));
8044
+ if (this.getNodeParameter('strategyCreateShared', itemIndex, false)) {
8045
+ data.Shared = true;
8046
+ }
8047
+ const steps = getJsonArrayParameter(this, 'strategyCreateSteps', itemIndex);
8048
+ if (steps.length) {
8049
+ data.Steps = steps;
8050
+ }
8051
+ Object.assign(data, getAdditionalFields(this, 'dataAdditionalFields', itemIndex));
8052
+ }
8053
+ body = { data };
8054
+ }
7499
8055
  else if (operation === 'stopContactSequence') {
7500
8056
  method = 'POST';
7501
8057
  endpoint = `${endpoint}/prospects/stop`;
@@ -7723,6 +8279,31 @@ class CronoPublicApi {
7723
8279
  }
7724
8280
  break;
7725
8281
  }
8282
+ case 'sync': {
8283
+ endpoint = `${basePath}/Sync`;
8284
+ if (operation === 'get') {
8285
+ method = 'GET';
8286
+ const syncId = this.getNodeParameter('syncId', itemIndex);
8287
+ endpoint = `${endpoint}/${syncId}`;
8288
+ }
8289
+ else if (operation === 'getAll') {
8290
+ method = 'GET';
8291
+ qs = {};
8292
+ const syncType = this.getNodeParameter('syncType', itemIndex, '');
8293
+ const syncStatus = this.getNodeParameter('syncStatus', itemIndex, '');
8294
+ const syncLimit = this.getNodeParameter('syncLimit', itemIndex, 50);
8295
+ if (syncLimit) {
8296
+ qs.limit = syncLimit;
8297
+ }
8298
+ if (syncType) {
8299
+ qs.type = syncType;
8300
+ }
8301
+ if (syncStatus) {
8302
+ qs.statusType = syncStatus;
8303
+ }
8304
+ }
8305
+ break;
8306
+ }
7726
8307
  default:
7727
8308
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported resource: ${resource}`, {
7728
8309
  itemIndex,