@crono-one/n8n-nodes-crono-public-api 1.5.0 → 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.
@@ -638,17 +638,172 @@ class CronoPublicApi {
638
638
  },
639
639
  },
640
640
  {
641
- displayName: 'Include Options (JSON)',
642
- name: 'includeOptions',
643
- type: 'json',
644
- 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,
645
681
  displayOptions: {
646
682
  show: {
647
- resource: ['company', 'contact', 'deal', 'note', 'activity'],
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,
777
+ displayOptions: {
778
+ show: {
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'],
648
804
  operation: ['get', 'getAll'],
649
805
  },
650
806
  },
651
- description: 'JSON object of include options to add as query parameters',
652
807
  },
653
808
  {
654
809
  displayName: 'Return All',
@@ -6702,12 +6857,29 @@ class CronoPublicApi {
6702
6857
  method = 'GET';
6703
6858
  const objectId = this.getNodeParameter('objectId', itemIndex);
6704
6859
  endpoint = `${endpoint}/${objectId}`;
6705
- 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;
6706
6870
  }
6707
6871
  else if (operation === 'getAll') {
6708
6872
  method = 'GET';
6709
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
6710
- 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;
6711
6883
  }
6712
6884
  else if (operation === 'search') {
6713
6885
  method = 'POST';
@@ -6950,12 +7122,29 @@ class CronoPublicApi {
6950
7122
  method = 'GET';
6951
7123
  const objectId = this.getNodeParameter('objectId', itemIndex);
6952
7124
  endpoint = `${endpoint}/${objectId}`;
6953
- 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;
6954
7135
  }
6955
7136
  else if (operation === 'getAll') {
6956
7137
  method = 'GET';
6957
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
6958
- 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;
6959
7148
  }
6960
7149
  else if (operation === 'search') {
6961
7150
  method = 'POST';
@@ -7274,12 +7463,17 @@ class CronoPublicApi {
7274
7463
  method = 'GET';
7275
7464
  const objectId = this.getNodeParameter('objectId', itemIndex);
7276
7465
  endpoint = `${endpoint}/${objectId}`;
7277
- 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;
7278
7470
  }
7279
7471
  else if (operation === 'getAll') {
7280
7472
  method = 'GET';
7281
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
7282
- 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;
7283
7477
  }
7284
7478
  else if (operation === 'search') {
7285
7479
  method = 'POST';
@@ -7416,12 +7610,13 @@ class CronoPublicApi {
7416
7610
  method = 'GET';
7417
7611
  const objectId = this.getNodeParameter('objectId', itemIndex);
7418
7612
  endpoint = `${endpoint}/${objectId}`;
7419
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
7613
+ if (this.getNodeParameter('noteGetIncludeUser', itemIndex, false))
7614
+ qs.WithUser = true;
7420
7615
  }
7421
7616
  else if (operation === 'getAll') {
7422
7617
  method = 'GET';
7423
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
7424
- qs = { ...qs, ...includeOptions };
7618
+ if (this.getNodeParameter('noteGetIncludeUser', itemIndex, false))
7619
+ qs.WithUser = true;
7425
7620
  }
7426
7621
  else if (operation === 'search') {
7427
7622
  method = 'POST';
@@ -7628,12 +7823,13 @@ class CronoPublicApi {
7628
7823
  method = 'GET';
7629
7824
  const objectId = this.getNodeParameter('objectId', itemIndex);
7630
7825
  endpoint = `${endpoint}/${objectId}`;
7631
- qs = getJsonParameter(this, 'includeOptions', itemIndex);
7826
+ if (this.getNodeParameter('activityGetIncludeUser', itemIndex, false))
7827
+ qs.WithUser = true;
7632
7828
  }
7633
7829
  else if (operation === 'getAll') {
7634
7830
  method = 'GET';
7635
- const includeOptions = getJsonParameter(this, 'includeOptions', itemIndex);
7636
- qs = { ...qs, ...includeOptions };
7831
+ if (this.getNodeParameter('activityGetIncludeUser', itemIndex, false))
7832
+ qs.WithUser = true;
7637
7833
  }
7638
7834
  else if (operation === 'search') {
7639
7835
  method = 'POST';