pipedrive 22.7.0 → 22.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -80,7 +80,7 @@ var DealsApi = /*#__PURE__*/function () {
80
80
 
81
81
  /**
82
82
  * Add a deal
83
- * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>.
83
+ * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>.
84
84
  * @param {Object} opts Optional parameters
85
85
  * @param {module:model/NewDeal} opts.newDeal
86
86
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAddedDeal} and HTTP response
@@ -115,7 +115,7 @@ var DealsApi = /*#__PURE__*/function () {
115
115
 
116
116
  /**
117
117
  * Add a deal
118
- * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>.
118
+ * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>.
119
119
  * @param {Object} opts Optional parameters
120
120
  * @param {module:model/NewDeal} opts.newDeal
121
121
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAddedDeal}
@@ -50,7 +50,7 @@ var LeadsApi = /*#__PURE__*/function () {
50
50
 
51
51
  /**
52
52
  * Add a lead
53
- * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here's the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-lead\" target=\"_blank\" rel=\"noopener noreferrer\">adding a lead</a>. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields' values tutorial</a>.
53
+ * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source and origin set to `API`. Here's the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-lead\" target=\"_blank\" rel=\"noopener noreferrer\">adding a lead</a>. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields' values tutorial</a>.
54
54
  * @param {Object} opts Optional parameters
55
55
  * @param {module:model/AddLeadRequest} opts.addLeadRequest
56
56
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OneLeadResponse200} and HTTP response
@@ -88,7 +88,7 @@ var LeadsApi = /*#__PURE__*/function () {
88
88
 
89
89
  /**
90
90
  * Add a lead
91
- * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here's the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-lead\" target=\"_blank\" rel=\"noopener noreferrer\">adding a lead</a>. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields' values tutorial</a>.
91
+ * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source and origin set to `API`. Here's the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-lead\" target=\"_blank\" rel=\"noopener noreferrer\">adding a lead</a>. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields' values tutorial</a>.
92
92
  * @param {Object} opts Optional parameters
93
93
  * @param {module:model/AddLeadRequest} opts.addLeadRequest
94
94
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OneLeadResponse200}
@@ -97,6 +97,18 @@ var AddLeadRequest = /*#__PURE__*/function () {
97
97
  obj['was_seen'] = _ApiClient["default"].convertToType(data['was_seen'], 'Boolean');
98
98
  delete data['was_seen'];
99
99
  }
100
+ if (data.hasOwnProperty('origin_id')) {
101
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
102
+ delete data['origin_id'];
103
+ }
104
+ if (data.hasOwnProperty('channel')) {
105
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
106
+ delete data['channel'];
107
+ }
108
+ if (data.hasOwnProperty('channel_id')) {
109
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
110
+ delete data['channel_id'];
111
+ }
100
112
  if (Object.keys(data).length > 0) {
101
113
  Object.assign(obj, data);
102
114
  }
@@ -158,5 +170,23 @@ AddLeadRequest.prototype['visible_to'] = undefined;
158
170
  * @member {Boolean} was_seen
159
171
  */
160
172
  AddLeadRequest.prototype['was_seen'] = undefined;
173
+
174
+ /**
175
+ * The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this lead. If omitted, `origin_id` will be set to null.
176
+ * @member {String} origin_id
177
+ */
178
+ AddLeadRequest.prototype['origin_id'] = undefined;
179
+
180
+ /**
181
+ * The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null.
182
+ * @member {Number} channel
183
+ */
184
+ AddLeadRequest.prototype['channel'] = undefined;
185
+
186
+ /**
187
+ * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null.
188
+ * @member {String} channel_id
189
+ */
190
+ AddLeadRequest.prototype['channel_id'] = undefined;
161
191
  var _default = AddLeadRequest;
162
192
  exports["default"] = _default;
@@ -264,6 +264,22 @@ var BaseDeal = /*#__PURE__*/function () {
264
264
  obj['person_hidden'] = _ApiClient["default"].convertToType(data['person_hidden'], 'Boolean');
265
265
  delete data['person_hidden'];
266
266
  }
267
+ if (data.hasOwnProperty('origin')) {
268
+ obj['origin'] = _ApiClient["default"].convertToType(data['origin'], 'String');
269
+ delete data['origin'];
270
+ }
271
+ if (data.hasOwnProperty('origin_id')) {
272
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
273
+ delete data['origin_id'];
274
+ }
275
+ if (data.hasOwnProperty('channel')) {
276
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
277
+ delete data['channel'];
278
+ }
279
+ if (data.hasOwnProperty('channel_id')) {
280
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
281
+ delete data['channel_id'];
282
+ }
267
283
  if (Object.keys(data).length > 0) {
268
284
  Object.assign(obj, data);
269
285
  }
@@ -584,5 +600,29 @@ BaseDeal.prototype['org_hidden'] = undefined;
584
600
  * @member {Boolean} person_hidden
585
601
  */
586
602
  BaseDeal.prototype['person_hidden'] = undefined;
603
+
604
+ /**
605
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
606
+ * @member {String} origin
607
+ */
608
+ BaseDeal.prototype['origin'] = undefined;
609
+
610
+ /**
611
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
612
+ * @member {String} origin_id
613
+ */
614
+ BaseDeal.prototype['origin_id'] = undefined;
615
+
616
+ /**
617
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
618
+ * @member {Number} channel
619
+ */
620
+ BaseDeal.prototype['channel'] = undefined;
621
+
622
+ /**
623
+ * The optional ID to further distinguish the Marketing channel.
624
+ * @member {String} channel_id
625
+ */
626
+ BaseDeal.prototype['channel_id'] = undefined;
587
627
  var _default = BaseDeal;
588
628
  exports["default"] = _default;
@@ -296,6 +296,22 @@ var DealNonStrict = /*#__PURE__*/function () {
296
296
  obj['person_hidden'] = _ApiClient["default"].convertToType(data['person_hidden'], 'Boolean');
297
297
  delete data['person_hidden'];
298
298
  }
299
+ if (data.hasOwnProperty('origin')) {
300
+ obj['origin'] = _ApiClient["default"].convertToType(data['origin'], 'String');
301
+ delete data['origin'];
302
+ }
303
+ if (data.hasOwnProperty('origin_id')) {
304
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
305
+ delete data['origin_id'];
306
+ }
307
+ if (data.hasOwnProperty('channel')) {
308
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
309
+ delete data['channel'];
310
+ }
311
+ if (data.hasOwnProperty('channel_id')) {
312
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
313
+ delete data['channel_id'];
314
+ }
299
315
  if (Object.keys(data).length > 0) {
300
316
  Object.assign(obj, data);
301
317
  }
@@ -643,6 +659,30 @@ DealNonStrict.prototype['org_hidden'] = undefined;
643
659
  */
644
660
  DealNonStrict.prototype['person_hidden'] = undefined;
645
661
 
662
+ /**
663
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
664
+ * @member {String} origin
665
+ */
666
+ DealNonStrict.prototype['origin'] = undefined;
667
+
668
+ /**
669
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
670
+ * @member {String} origin_id
671
+ */
672
+ DealNonStrict.prototype['origin_id'] = undefined;
673
+
674
+ /**
675
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
676
+ * @member {Number} channel
677
+ */
678
+ DealNonStrict.prototype['channel'] = undefined;
679
+
680
+ /**
681
+ * The optional ID to further distinguish the Marketing channel.
682
+ * @member {String} channel_id
683
+ */
684
+ DealNonStrict.prototype['channel_id'] = undefined;
685
+
646
686
  // Implement DealNonStrictModeFields interface:
647
687
  /**
648
688
  * The ID of the deal
@@ -926,5 +966,25 @@ _BaseDeal["default"].prototype['org_hidden'] = undefined;
926
966
  * @member {Boolean} person_hidden
927
967
  */
928
968
  _BaseDeal["default"].prototype['person_hidden'] = undefined;
969
+ /**
970
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
971
+ * @member {String} origin
972
+ */
973
+ _BaseDeal["default"].prototype['origin'] = undefined;
974
+ /**
975
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
976
+ * @member {String} origin_id
977
+ */
978
+ _BaseDeal["default"].prototype['origin_id'] = undefined;
979
+ /**
980
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
981
+ * @member {Number} channel
982
+ */
983
+ _BaseDeal["default"].prototype['channel'] = undefined;
984
+ /**
985
+ * The optional ID to further distinguish the Marketing channel.
986
+ * @member {String} channel_id
987
+ */
988
+ _BaseDeal["default"].prototype['channel_id'] = undefined;
929
989
  var _default = DealNonStrict;
930
990
  exports["default"] = _default;
@@ -299,6 +299,22 @@ var DealNonStrictWithDetails = /*#__PURE__*/function () {
299
299
  obj['person_hidden'] = _ApiClient["default"].convertToType(data['person_hidden'], 'Boolean');
300
300
  delete data['person_hidden'];
301
301
  }
302
+ if (data.hasOwnProperty('origin')) {
303
+ obj['origin'] = _ApiClient["default"].convertToType(data['origin'], 'String');
304
+ delete data['origin'];
305
+ }
306
+ if (data.hasOwnProperty('origin_id')) {
307
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
308
+ delete data['origin_id'];
309
+ }
310
+ if (data.hasOwnProperty('channel')) {
311
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
312
+ delete data['channel'];
313
+ }
314
+ if (data.hasOwnProperty('channel_id')) {
315
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
316
+ delete data['channel_id'];
317
+ }
302
318
  if (data.hasOwnProperty('average_time_to_won')) {
303
319
  obj['average_time_to_won'] = _DealNonStrictWithDetailsAllOfAverageTimeToWon["default"].constructFromObject(data['average_time_to_won']);
304
320
  delete data['average_time_to_won'];
@@ -670,6 +686,30 @@ DealNonStrictWithDetails.prototype['org_hidden'] = undefined;
670
686
  */
671
687
  DealNonStrictWithDetails.prototype['person_hidden'] = undefined;
672
688
 
689
+ /**
690
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
691
+ * @member {String} origin
692
+ */
693
+ DealNonStrictWithDetails.prototype['origin'] = undefined;
694
+
695
+ /**
696
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
697
+ * @member {String} origin_id
698
+ */
699
+ DealNonStrictWithDetails.prototype['origin_id'] = undefined;
700
+
701
+ /**
702
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
703
+ * @member {Number} channel
704
+ */
705
+ DealNonStrictWithDetails.prototype['channel'] = undefined;
706
+
707
+ /**
708
+ * The optional ID to further distinguish the Marketing channel.
709
+ * @member {String} channel_id
710
+ */
711
+ DealNonStrictWithDetails.prototype['channel_id'] = undefined;
712
+
673
713
  /**
674
714
  * @member {module:model/DealNonStrictWithDetailsAllOfAverageTimeToWon} average_time_to_won
675
715
  */
@@ -985,6 +1025,26 @@ _DealNonStrict["default"].prototype['org_hidden'] = undefined;
985
1025
  * @member {Boolean} person_hidden
986
1026
  */
987
1027
  _DealNonStrict["default"].prototype['person_hidden'] = undefined;
1028
+ /**
1029
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
1030
+ * @member {String} origin
1031
+ */
1032
+ _DealNonStrict["default"].prototype['origin'] = undefined;
1033
+ /**
1034
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
1035
+ * @member {String} origin_id
1036
+ */
1037
+ _DealNonStrict["default"].prototype['origin_id'] = undefined;
1038
+ /**
1039
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
1040
+ * @member {Number} channel
1041
+ */
1042
+ _DealNonStrict["default"].prototype['channel'] = undefined;
1043
+ /**
1044
+ * The optional ID to further distinguish the Marketing channel.
1045
+ * @member {String} channel_id
1046
+ */
1047
+ _DealNonStrict["default"].prototype['channel_id'] = undefined;
988
1048
  // Implement DealNonStrictWithDetailsAllOf interface:
989
1049
  /**
990
1050
  * @member {module:model/DealNonStrictWithDetailsAllOfAverageTimeToWon} average_time_to_won
@@ -292,6 +292,22 @@ var DealStrict = /*#__PURE__*/function () {
292
292
  obj['person_hidden'] = _ApiClient["default"].convertToType(data['person_hidden'], 'Boolean');
293
293
  delete data['person_hidden'];
294
294
  }
295
+ if (data.hasOwnProperty('origin')) {
296
+ obj['origin'] = _ApiClient["default"].convertToType(data['origin'], 'String');
297
+ delete data['origin'];
298
+ }
299
+ if (data.hasOwnProperty('origin_id')) {
300
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
301
+ delete data['origin_id'];
302
+ }
303
+ if (data.hasOwnProperty('channel')) {
304
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
305
+ delete data['channel'];
306
+ }
307
+ if (data.hasOwnProperty('channel_id')) {
308
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
309
+ delete data['channel_id'];
310
+ }
295
311
  if (Object.keys(data).length > 0) {
296
312
  Object.assign(obj, data);
297
313
  }
@@ -643,6 +659,30 @@ DealStrict.prototype['org_hidden'] = undefined;
643
659
  */
644
660
  DealStrict.prototype['person_hidden'] = undefined;
645
661
 
662
+ /**
663
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
664
+ * @member {String} origin
665
+ */
666
+ DealStrict.prototype['origin'] = undefined;
667
+
668
+ /**
669
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
670
+ * @member {String} origin_id
671
+ */
672
+ DealStrict.prototype['origin_id'] = undefined;
673
+
674
+ /**
675
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
676
+ * @member {Number} channel
677
+ */
678
+ DealStrict.prototype['channel'] = undefined;
679
+
680
+ /**
681
+ * The optional ID to further distinguish the Marketing channel.
682
+ * @member {String} channel_id
683
+ */
684
+ DealStrict.prototype['channel_id'] = undefined;
685
+
646
686
  // Implement DealStrictModeFields interface:
647
687
  /**
648
688
  * The ID of the deal
@@ -930,5 +970,25 @@ _BaseDeal["default"].prototype['org_hidden'] = undefined;
930
970
  * @member {Boolean} person_hidden
931
971
  */
932
972
  _BaseDeal["default"].prototype['person_hidden'] = undefined;
973
+ /**
974
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
975
+ * @member {String} origin
976
+ */
977
+ _BaseDeal["default"].prototype['origin'] = undefined;
978
+ /**
979
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
980
+ * @member {String} origin_id
981
+ */
982
+ _BaseDeal["default"].prototype['origin_id'] = undefined;
983
+ /**
984
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
985
+ * @member {Number} channel
986
+ */
987
+ _BaseDeal["default"].prototype['channel'] = undefined;
988
+ /**
989
+ * The optional ID to further distinguish the Marketing channel.
990
+ * @member {String} channel_id
991
+ */
992
+ _BaseDeal["default"].prototype['channel_id'] = undefined;
933
993
  var _default = DealStrict;
934
994
  exports["default"] = _default;
@@ -292,6 +292,22 @@ var DealStrictWithMergeId = /*#__PURE__*/function () {
292
292
  obj['person_hidden'] = _ApiClient["default"].convertToType(data['person_hidden'], 'Boolean');
293
293
  delete data['person_hidden'];
294
294
  }
295
+ if (data.hasOwnProperty('origin')) {
296
+ obj['origin'] = _ApiClient["default"].convertToType(data['origin'], 'String');
297
+ delete data['origin'];
298
+ }
299
+ if (data.hasOwnProperty('origin_id')) {
300
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
301
+ delete data['origin_id'];
302
+ }
303
+ if (data.hasOwnProperty('channel')) {
304
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
305
+ delete data['channel'];
306
+ }
307
+ if (data.hasOwnProperty('channel_id')) {
308
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
309
+ delete data['channel_id'];
310
+ }
295
311
  if (data.hasOwnProperty('merge_what_id')) {
296
312
  obj['merge_what_id'] = _ApiClient["default"].convertToType(data['merge_what_id'], 'Number');
297
313
  delete data['merge_what_id'];
@@ -647,6 +663,30 @@ DealStrictWithMergeId.prototype['org_hidden'] = undefined;
647
663
  */
648
664
  DealStrictWithMergeId.prototype['person_hidden'] = undefined;
649
665
 
666
+ /**
667
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
668
+ * @member {String} origin
669
+ */
670
+ DealStrictWithMergeId.prototype['origin'] = undefined;
671
+
672
+ /**
673
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
674
+ * @member {String} origin_id
675
+ */
676
+ DealStrictWithMergeId.prototype['origin_id'] = undefined;
677
+
678
+ /**
679
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
680
+ * @member {Number} channel
681
+ */
682
+ DealStrictWithMergeId.prototype['channel'] = undefined;
683
+
684
+ /**
685
+ * The optional ID to further distinguish the Marketing channel.
686
+ * @member {String} channel_id
687
+ */
688
+ DealStrictWithMergeId.prototype['channel_id'] = undefined;
689
+
650
690
  /**
651
691
  * The deal ID of the deal which the original deal was merged with
652
692
  * @member {Number} merge_what_id
@@ -939,6 +979,26 @@ _DealStrict["default"].prototype['org_hidden'] = undefined;
939
979
  * @member {Boolean} person_hidden
940
980
  */
941
981
  _DealStrict["default"].prototype['person_hidden'] = undefined;
982
+ /**
983
+ * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed.
984
+ * @member {String} origin
985
+ */
986
+ _DealStrict["default"].prototype['origin'] = undefined;
987
+ /**
988
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal.
989
+ * @member {String} origin_id
990
+ */
991
+ _DealStrict["default"].prototype['origin_id'] = undefined;
992
+ /**
993
+ * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
994
+ * @member {Number} channel
995
+ */
996
+ _DealStrict["default"].prototype['channel'] = undefined;
997
+ /**
998
+ * The optional ID to further distinguish the Marketing channel.
999
+ * @member {String} channel_id
1000
+ */
1001
+ _DealStrict["default"].prototype['channel_id'] = undefined;
942
1002
  // Implement DealStrictWithMergeIdAllOf interface:
943
1003
  /**
944
1004
  * The deal ID of the deal which the original deal was merged with
@@ -90,6 +90,22 @@ var LeadResponse = /*#__PURE__*/function () {
90
90
  obj['source_name'] = _ApiClient["default"].convertToType(data['source_name'], 'String');
91
91
  delete data['source_name'];
92
92
  }
93
+ if (data.hasOwnProperty('origin')) {
94
+ obj['origin'] = _ApiClient["default"].convertToType(data['origin'], 'String');
95
+ delete data['origin'];
96
+ }
97
+ if (data.hasOwnProperty('origin_id')) {
98
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
99
+ delete data['origin_id'];
100
+ }
101
+ if (data.hasOwnProperty('channel')) {
102
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
103
+ delete data['channel'];
104
+ }
105
+ if (data.hasOwnProperty('channel_id')) {
106
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
107
+ delete data['channel_id'];
108
+ }
93
109
  if (data.hasOwnProperty('is_archived')) {
94
110
  obj['is_archived'] = _ApiClient["default"].convertToType(data['is_archived'], 'Boolean');
95
111
  delete data['is_archived'];
@@ -183,6 +199,30 @@ LeadResponse.prototype['organization_id'] = undefined;
183
199
  */
184
200
  LeadResponse.prototype['source_name'] = undefined;
185
201
 
202
+ /**
203
+ * The way this Lead was created. `origin` field is set by Pipedrive when Lead is created and cannot be changed.
204
+ * @member {String} origin
205
+ */
206
+ LeadResponse.prototype['origin'] = undefined;
207
+
208
+ /**
209
+ * The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this Lead.
210
+ * @member {String} origin_id
211
+ */
212
+ LeadResponse.prototype['origin_id'] = undefined;
213
+
214
+ /**
215
+ * The ID of your Marketing channel this Lead was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>.
216
+ * @member {Number} channel
217
+ */
218
+ LeadResponse.prototype['channel'] = undefined;
219
+
220
+ /**
221
+ * The optional ID to further distinguish the Marketing channel.
222
+ * @member {String} channel_id
223
+ */
224
+ LeadResponse.prototype['channel_id'] = undefined;
225
+
186
226
  /**
187
227
  * A flag indicating whether the lead is archived or not
188
228
  * @member {Boolean} is_archived
@@ -112,6 +112,18 @@ var NewDeal = /*#__PURE__*/function () {
112
112
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
113
113
  delete data['status'];
114
114
  }
115
+ if (data.hasOwnProperty('origin_id')) {
116
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
117
+ delete data['origin_id'];
118
+ }
119
+ if (data.hasOwnProperty('channel')) {
120
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
121
+ delete data['channel'];
122
+ }
123
+ if (data.hasOwnProperty('channel_id')) {
124
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
125
+ delete data['channel_id'];
126
+ }
115
127
  if (data.hasOwnProperty('add_time')) {
116
128
  obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
117
129
  delete data['add_time'];
@@ -213,6 +225,24 @@ NewDeal.prototype['stage_id'] = undefined;
213
225
  */
214
226
  NewDeal.prototype['status'] = undefined;
215
227
 
228
+ /**
229
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null.
230
+ * @member {String} origin_id
231
+ */
232
+ NewDeal.prototype['origin_id'] = undefined;
233
+
234
+ /**
235
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null.
236
+ * @member {Number} channel
237
+ */
238
+ NewDeal.prototype['channel'] = undefined;
239
+
240
+ /**
241
+ * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null.
242
+ * @member {String} channel_id
243
+ */
244
+ NewDeal.prototype['channel_id'] = undefined;
245
+
216
246
  /**
217
247
  * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
218
248
  * @member {String} add_time
@@ -313,6 +343,21 @@ _NewDealParameters["default"].prototype['stage_id'] = undefined;
313
343
  * @member {module:model/NewDealParameters.StatusEnum} status
314
344
  */
315
345
  _NewDealParameters["default"].prototype['status'] = undefined;
346
+ /**
347
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null.
348
+ * @member {String} origin_id
349
+ */
350
+ _NewDealParameters["default"].prototype['origin_id'] = undefined;
351
+ /**
352
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null.
353
+ * @member {Number} channel
354
+ */
355
+ _NewDealParameters["default"].prototype['channel'] = undefined;
356
+ /**
357
+ * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null.
358
+ * @member {String} channel_id
359
+ */
360
+ _NewDealParameters["default"].prototype['channel_id'] = undefined;
316
361
  /**
317
362
  * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
318
363
  * @member {String} add_time
@@ -92,6 +92,18 @@ var NewDealParameters = /*#__PURE__*/function () {
92
92
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
93
93
  delete data['status'];
94
94
  }
95
+ if (data.hasOwnProperty('origin_id')) {
96
+ obj['origin_id'] = _ApiClient["default"].convertToType(data['origin_id'], 'String');
97
+ delete data['origin_id'];
98
+ }
99
+ if (data.hasOwnProperty('channel')) {
100
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
101
+ delete data['channel'];
102
+ }
103
+ if (data.hasOwnProperty('channel_id')) {
104
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
105
+ delete data['channel_id'];
106
+ }
95
107
  if (data.hasOwnProperty('add_time')) {
96
108
  obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
97
109
  delete data['add_time'];
@@ -159,6 +171,24 @@ NewDealParameters.prototype['stage_id'] = undefined;
159
171
  */
160
172
  NewDealParameters.prototype['status'] = undefined;
161
173
 
174
+ /**
175
+ * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null.
176
+ * @member {String} origin_id
177
+ */
178
+ NewDealParameters.prototype['origin_id'] = undefined;
179
+
180
+ /**
181
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null.
182
+ * @member {Number} channel
183
+ */
184
+ NewDealParameters.prototype['channel'] = undefined;
185
+
186
+ /**
187
+ * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null.
188
+ * @member {String} channel_id
189
+ */
190
+ NewDealParameters.prototype['channel_id'] = undefined;
191
+
162
192
  /**
163
193
  * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
164
194
  * @member {String} add_time
@@ -92,6 +92,14 @@ var UpdateDealParameters = /*#__PURE__*/function () {
92
92
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
93
93
  delete data['status'];
94
94
  }
95
+ if (data.hasOwnProperty('channel')) {
96
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
97
+ delete data['channel'];
98
+ }
99
+ if (data.hasOwnProperty('channel_id')) {
100
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
101
+ delete data['channel_id'];
102
+ }
95
103
  if (Object.keys(data).length > 0) {
96
104
  Object.assign(obj, data);
97
105
  }
@@ -155,6 +163,18 @@ UpdateDealParameters.prototype['stage_id'] = undefined;
155
163
  */
156
164
  UpdateDealParameters.prototype['status'] = undefined;
157
165
 
166
+ /**
167
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>.
168
+ * @member {Number} channel
169
+ */
170
+ UpdateDealParameters.prototype['channel'] = undefined;
171
+
172
+ /**
173
+ * The optional ID to further distinguish the Marketing channel.
174
+ * @member {String} channel_id
175
+ */
176
+ UpdateDealParameters.prototype['channel_id'] = undefined;
177
+
158
178
  /**
159
179
  * Allowed values for the <code>status</code> property.
160
180
  * @enum {String}
@@ -109,6 +109,14 @@ var UpdateDealRequest = /*#__PURE__*/function () {
109
109
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
110
110
  delete data['status'];
111
111
  }
112
+ if (data.hasOwnProperty('channel')) {
113
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
114
+ delete data['channel'];
115
+ }
116
+ if (data.hasOwnProperty('channel_id')) {
117
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
118
+ delete data['channel_id'];
119
+ }
112
120
  if (data.hasOwnProperty('won_time')) {
113
121
  obj['won_time'] = _ApiClient["default"].convertToType(data['won_time'], 'String');
114
122
  delete data['won_time'];
@@ -206,6 +214,18 @@ UpdateDealRequest.prototype['stage_id'] = undefined;
206
214
  */
207
215
  UpdateDealRequest.prototype['status'] = undefined;
208
216
 
217
+ /**
218
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>.
219
+ * @member {Number} channel
220
+ */
221
+ UpdateDealRequest.prototype['channel'] = undefined;
222
+
223
+ /**
224
+ * The optional ID to further distinguish the Marketing channel.
225
+ * @member {String} channel_id
226
+ */
227
+ UpdateDealRequest.prototype['channel_id'] = undefined;
228
+
209
229
  /**
210
230
  * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
211
231
  * @member {String} won_time
@@ -300,6 +320,16 @@ _UpdateDealParameters["default"].prototype['stage_id'] = undefined;
300
320
  * @member {module:model/UpdateDealParameters.StatusEnum} status
301
321
  */
302
322
  _UpdateDealParameters["default"].prototype['status'] = undefined;
323
+ /**
324
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>.
325
+ * @member {Number} channel
326
+ */
327
+ _UpdateDealParameters["default"].prototype['channel'] = undefined;
328
+ /**
329
+ * The optional ID to further distinguish the Marketing channel.
330
+ * @member {String} channel_id
331
+ */
332
+ _UpdateDealParameters["default"].prototype['channel_id'] = undefined;
303
333
  // Implement BasicDeal interface:
304
334
  /**
305
335
  * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
@@ -98,6 +98,14 @@ var UpdateLeadRequest = /*#__PURE__*/function () {
98
98
  obj['was_seen'] = _ApiClient["default"].convertToType(data['was_seen'], 'Boolean');
99
99
  delete data['was_seen'];
100
100
  }
101
+ if (data.hasOwnProperty('channel')) {
102
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
103
+ delete data['channel'];
104
+ }
105
+ if (data.hasOwnProperty('channel_id')) {
106
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
107
+ delete data['channel_id'];
108
+ }
101
109
  if (Object.keys(data).length > 0) {
102
110
  Object.assign(obj, data);
103
111
  }
@@ -165,5 +173,17 @@ UpdateLeadRequest.prototype['visible_to'] = undefined;
165
173
  * @member {Boolean} was_seen
166
174
  */
167
175
  UpdateLeadRequest.prototype['was_seen'] = undefined;
176
+
177
+ /**
178
+ * The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>.
179
+ * @member {Number} channel
180
+ */
181
+ UpdateLeadRequest.prototype['channel'] = undefined;
182
+
183
+ /**
184
+ * The optional ID to further distinguish the Marketing channel.
185
+ * @member {String} channel_id
186
+ */
187
+ UpdateLeadRequest.prototype['channel_id'] = undefined;
168
188
  var _default = UpdateLeadRequest;
169
189
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "22.7.0",
3
+ "version": "22.8.0",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",