pipedrive 24.1.1 → 25.0.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.
Files changed (175) hide show
  1. package/dist/esm/versions/v1/api/deals-api.d.ts +3 -3
  2. package/dist/esm/versions/v1/api/deals-api.js +2 -2
  3. package/dist/esm/versions/v1/api/organizations-api.d.ts +3 -3
  4. package/dist/esm/versions/v1/api/organizations-api.js +2 -2
  5. package/dist/esm/versions/v1/api/persons-api.d.ts +3 -3
  6. package/dist/esm/versions/v1/api/persons-api.js +2 -2
  7. package/dist/esm/versions/v1/api/subscriptions-api.d.ts +36 -36
  8. package/dist/esm/versions/v1/api/subscriptions-api.js +36 -36
  9. package/dist/esm/versions/v1/api/webhooks-api.d.ts +4 -4
  10. package/dist/esm/versions/v1/api/webhooks-api.js +4 -4
  11. package/dist/esm/versions/v1/models/add-webhook-request.d.ts +5 -6
  12. package/dist/esm/versions/v1/models/add-webhook-request.js +4 -5
  13. package/dist/esm/versions/v1/models/additional-data.d.ts +38 -0
  14. package/dist/esm/versions/v1/models/additional-data.js +14 -0
  15. package/dist/esm/versions/v1/models/get-notes-response-additional-data.d.ts +3 -3
  16. package/dist/esm/versions/v1/models/index.d.ts +1 -1
  17. package/dist/esm/versions/v1/models/index.js +1 -1
  18. package/dist/esm/versions/v1/models/user-access.d.ts +3 -2
  19. package/dist/esm/versions/v1/models/user-access.js +4 -3
  20. package/dist/esm/versions/v1/models/user-access1.d.ts +3 -2
  21. package/dist/esm/versions/v1/models/user-access1.js +4 -3
  22. package/dist/esm/versions/v2/api/activities-api.d.ts +34 -2
  23. package/dist/esm/versions/v2/api/activities-api.js +25 -5
  24. package/dist/esm/versions/v2/api/beta-api.d.ts +160 -2424
  25. package/dist/esm/versions/v2/api/beta-api.js +169 -2788
  26. package/dist/esm/versions/v2/api/deals-api.d.ts +491 -0
  27. package/dist/esm/versions/v2/api/deals-api.js +613 -0
  28. package/dist/esm/versions/v2/api/organizations-api.d.ts +237 -0
  29. package/dist/esm/versions/v2/api/organizations-api.js +301 -0
  30. package/dist/esm/versions/v2/api/persons-api.d.ts +237 -0
  31. package/dist/esm/versions/v2/api/persons-api.js +301 -0
  32. package/dist/esm/versions/v2/api/products-api.d.ts +237 -0
  33. package/dist/esm/versions/v2/api/products-api.js +301 -0
  34. package/dist/esm/versions/v2/api/users-api.d.ts +103 -0
  35. package/dist/esm/versions/v2/api/users-api.js +140 -0
  36. package/dist/esm/versions/v2/api.d.ts +1 -0
  37. package/dist/esm/versions/v2/api.js +1 -0
  38. package/dist/esm/versions/v2/models/add-ainstallment-response.d.ts +29 -0
  39. package/dist/esm/versions/v2/models/add-ainstallment-response.js +14 -0
  40. package/dist/esm/versions/v2/models/add-deal-follower-request.d.ts +23 -0
  41. package/dist/esm/versions/v2/models/add-deal-follower-request.js +14 -0
  42. package/dist/esm/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
  43. package/dist/esm/versions/v2/models/add-follower-response-all-of.js +14 -0
  44. package/dist/esm/versions/v2/models/add-follower-response.d.ts +18 -0
  45. package/dist/esm/versions/v2/models/add-follower-response.js +14 -0
  46. package/dist/esm/versions/v2/models/add-installment-request-body.d.ts +33 -0
  47. package/dist/esm/versions/v2/models/add-installment-request-body.js +14 -0
  48. package/dist/esm/versions/v2/models/delete-follower-response-data.d.ts +23 -0
  49. package/dist/esm/versions/v2/models/delete-follower-response-data.js +14 -0
  50. package/dist/esm/versions/v2/models/delete-follower-response.d.ts +29 -0
  51. package/dist/esm/versions/v2/models/delete-follower-response.js +14 -0
  52. package/dist/esm/versions/v2/models/delete-installment-response-data.d.ts +23 -0
  53. package/dist/esm/versions/v2/models/delete-installment-response-data.js +14 -0
  54. package/dist/esm/versions/v2/models/delete-installment-response.d.ts +29 -0
  55. package/dist/esm/versions/v2/models/delete-installment-response.js +14 -0
  56. package/dist/esm/versions/v2/models/follower-changelog-item.d.ts +38 -0
  57. package/dist/esm/versions/v2/models/follower-changelog-item.js +14 -0
  58. package/dist/esm/versions/v2/models/follower-item.d.ts +28 -0
  59. package/dist/esm/versions/v2/models/follower-item.js +14 -0
  60. package/dist/esm/versions/v2/models/follower-item1.d.ts +28 -0
  61. package/dist/esm/versions/v2/models/follower-item1.js +14 -0
  62. package/dist/esm/versions/v2/models/get-activities-response-all-of-additional-data.d.ts +23 -0
  63. package/dist/esm/versions/v2/models/get-activities-response-all-of-additional-data.js +14 -0
  64. package/dist/esm/versions/v2/models/get-activities-response-all-of.d.ts +6 -0
  65. package/dist/esm/versions/v2/models/get-deals-response-all-of.d.ts +6 -0
  66. package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
  67. package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.js +14 -0
  68. package/dist/esm/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
  69. package/dist/esm/versions/v2/models/get-follower-changelogs-response.js +14 -0
  70. package/dist/esm/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
  71. package/dist/esm/versions/v2/models/get-followers-response-all-of.js +14 -0
  72. package/dist/esm/versions/v2/models/get-followers-response.d.ts +18 -0
  73. package/dist/esm/versions/v2/models/get-followers-response.js +14 -0
  74. package/dist/esm/versions/v2/models/get-installments-response-data-inner.d.ts +43 -0
  75. package/dist/esm/versions/v2/models/get-installments-response-data-inner.js +14 -0
  76. package/dist/esm/versions/v2/models/get-installments-response.d.ts +29 -0
  77. package/dist/esm/versions/v2/models/get-installments-response.js +14 -0
  78. package/dist/esm/versions/v2/models/get-organizations-response-all-of.d.ts +6 -0
  79. package/dist/esm/versions/v2/models/get-persons-response-all-of.d.ts +6 -0
  80. package/dist/esm/versions/v2/models/get-pipelines-response-all-of.d.ts +6 -0
  81. package/dist/esm/versions/v2/models/get-stages-response.d.ts +6 -0
  82. package/dist/esm/versions/v2/models/index.d.ts +21 -0
  83. package/dist/esm/versions/v2/models/index.js +21 -0
  84. package/dist/esm/versions/v2/models/update-installment-request-body.d.ts +33 -0
  85. package/dist/esm/versions/v2/models/update-installment-request-body.js +14 -0
  86. package/dist/esm/versions/v2/models/update-installment-response.d.ts +29 -0
  87. package/dist/esm/versions/v2/models/update-installment-response.js +14 -0
  88. package/dist/versions/v1/api/deals-api.d.ts +3 -3
  89. package/dist/versions/v1/api/deals-api.js +2 -2
  90. package/dist/versions/v1/api/organizations-api.d.ts +3 -3
  91. package/dist/versions/v1/api/organizations-api.js +2 -2
  92. package/dist/versions/v1/api/persons-api.d.ts +3 -3
  93. package/dist/versions/v1/api/persons-api.js +2 -2
  94. package/dist/versions/v1/api/subscriptions-api.d.ts +36 -36
  95. package/dist/versions/v1/api/subscriptions-api.js +36 -36
  96. package/dist/versions/v1/api/webhooks-api.d.ts +4 -4
  97. package/dist/versions/v1/api/webhooks-api.js +4 -4
  98. package/dist/versions/v1/models/add-webhook-request.d.ts +5 -6
  99. package/dist/versions/v1/models/add-webhook-request.js +4 -5
  100. package/dist/versions/v1/models/additional-data.d.ts +38 -0
  101. package/dist/versions/v1/models/additional-data.js +15 -0
  102. package/dist/versions/v1/models/get-notes-response-additional-data.d.ts +3 -3
  103. package/dist/versions/v1/models/index.d.ts +1 -1
  104. package/dist/versions/v1/models/index.js +1 -1
  105. package/dist/versions/v1/models/user-access.d.ts +3 -2
  106. package/dist/versions/v1/models/user-access.js +4 -3
  107. package/dist/versions/v1/models/user-access1.d.ts +3 -2
  108. package/dist/versions/v1/models/user-access1.js +4 -3
  109. package/dist/versions/v2/api/activities-api.d.ts +34 -2
  110. package/dist/versions/v2/api/activities-api.js +25 -5
  111. package/dist/versions/v2/api/beta-api.d.ts +160 -2424
  112. package/dist/versions/v2/api/beta-api.js +171 -2790
  113. package/dist/versions/v2/api/deals-api.d.ts +491 -0
  114. package/dist/versions/v2/api/deals-api.js +613 -0
  115. package/dist/versions/v2/api/organizations-api.d.ts +237 -0
  116. package/dist/versions/v2/api/organizations-api.js +301 -0
  117. package/dist/versions/v2/api/persons-api.d.ts +237 -0
  118. package/dist/versions/v2/api/persons-api.js +301 -0
  119. package/dist/versions/v2/api/products-api.d.ts +237 -0
  120. package/dist/versions/v2/api/products-api.js +301 -0
  121. package/dist/versions/v2/api/users-api.d.ts +103 -0
  122. package/dist/versions/v2/api/users-api.js +150 -0
  123. package/dist/versions/v2/api.d.ts +1 -0
  124. package/dist/versions/v2/api.js +1 -0
  125. package/dist/versions/v2/models/add-ainstallment-response.d.ts +29 -0
  126. package/dist/versions/v2/models/add-ainstallment-response.js +15 -0
  127. package/dist/versions/v2/models/add-deal-follower-request.d.ts +23 -0
  128. package/dist/versions/v2/models/add-deal-follower-request.js +15 -0
  129. package/dist/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
  130. package/dist/versions/v2/models/add-follower-response-all-of.js +15 -0
  131. package/dist/versions/v2/models/add-follower-response.d.ts +18 -0
  132. package/dist/versions/v2/models/add-follower-response.js +15 -0
  133. package/dist/versions/v2/models/add-installment-request-body.d.ts +33 -0
  134. package/dist/versions/v2/models/add-installment-request-body.js +15 -0
  135. package/dist/versions/v2/models/delete-follower-response-data.d.ts +23 -0
  136. package/dist/versions/v2/models/delete-follower-response-data.js +15 -0
  137. package/dist/versions/v2/models/delete-follower-response.d.ts +29 -0
  138. package/dist/versions/v2/models/delete-follower-response.js +15 -0
  139. package/dist/versions/v2/models/delete-installment-response-data.d.ts +23 -0
  140. package/dist/versions/v2/models/delete-installment-response-data.js +15 -0
  141. package/dist/versions/v2/models/delete-installment-response.d.ts +29 -0
  142. package/dist/versions/v2/models/delete-installment-response.js +15 -0
  143. package/dist/versions/v2/models/follower-changelog-item.d.ts +38 -0
  144. package/dist/versions/v2/models/follower-changelog-item.js +15 -0
  145. package/dist/versions/v2/models/follower-item.d.ts +28 -0
  146. package/dist/versions/v2/models/follower-item.js +15 -0
  147. package/dist/versions/v2/models/follower-item1.d.ts +28 -0
  148. package/dist/versions/v2/models/follower-item1.js +15 -0
  149. package/dist/versions/v2/models/get-activities-response-all-of-additional-data.d.ts +23 -0
  150. package/dist/versions/v2/models/get-activities-response-all-of-additional-data.js +15 -0
  151. package/dist/versions/v2/models/get-activities-response-all-of.d.ts +6 -0
  152. package/dist/versions/v2/models/get-deals-response-all-of.d.ts +6 -0
  153. package/dist/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
  154. package/dist/versions/v2/models/get-follower-changelogs-response-all-of.js +15 -0
  155. package/dist/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
  156. package/dist/versions/v2/models/get-follower-changelogs-response.js +15 -0
  157. package/dist/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
  158. package/dist/versions/v2/models/get-followers-response-all-of.js +15 -0
  159. package/dist/versions/v2/models/get-followers-response.d.ts +18 -0
  160. package/dist/versions/v2/models/get-followers-response.js +15 -0
  161. package/dist/versions/v2/models/get-installments-response-data-inner.d.ts +43 -0
  162. package/dist/versions/v2/models/get-installments-response-data-inner.js +15 -0
  163. package/dist/versions/v2/models/get-installments-response.d.ts +29 -0
  164. package/dist/versions/v2/models/get-installments-response.js +15 -0
  165. package/dist/versions/v2/models/get-organizations-response-all-of.d.ts +6 -0
  166. package/dist/versions/v2/models/get-persons-response-all-of.d.ts +6 -0
  167. package/dist/versions/v2/models/get-pipelines-response-all-of.d.ts +6 -0
  168. package/dist/versions/v2/models/get-stages-response.d.ts +6 -0
  169. package/dist/versions/v2/models/index.d.ts +21 -0
  170. package/dist/versions/v2/models/index.js +21 -0
  171. package/dist/versions/v2/models/update-installment-request-body.d.ts +33 -0
  172. package/dist/versions/v2/models/update-installment-request-body.js +15 -0
  173. package/dist/versions/v2/models/update-installment-response.d.ts +29 -0
  174. package/dist/versions/v2/models/update-installment-response.js +15 -0
  175. package/package.json +1 -1
@@ -71,6 +71,43 @@ const DealsApiAxiosParamCreator = function (configuration) {
71
71
  options: localVarRequestOptions,
72
72
  };
73
73
  }),
74
+ /**
75
+ * Adds a user as a follower to the deal.
76
+ * @summary Add a follower to a deal
77
+ * @param {number} id The ID of the deal
78
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
79
+
80
+ * @throws {RequiredError}
81
+ */
82
+ addDealFollower: (id, AddDealFollowerRequest) => __awaiter(this, void 0, void 0, function* () {
83
+ // verify required parameter 'id' is not null or undefined
84
+ (0, common_1.assertParamExists)('addDealFollower', 'id', id);
85
+ const localVarPath = `/deals/{id}/followers`
86
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
87
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
88
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
89
+ let baseOptions;
90
+ if (configuration) {
91
+ baseOptions = configuration.baseOptions;
92
+ }
93
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
94
+ const localVarHeaderParameter = {};
95
+ const localVarQueryParameter = {};
96
+ // authentication api_key required
97
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
98
+ // authentication oauth2 required
99
+ // oauth required
100
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
101
+ localVarHeaderParameter['Content-Type'] = 'application/json';
102
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
103
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
104
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
105
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddDealFollowerRequest, localVarRequestOptions, configuration);
106
+ return {
107
+ url: (0, common_1.toPathString)(localVarUrlObj),
108
+ options: localVarRequestOptions,
109
+ };
110
+ }),
74
111
  /**
75
112
  * Adds a product to a deal, creating a new item called a deal-product.
76
113
  * @summary Add a product to a deal
@@ -180,6 +217,44 @@ const DealsApiAxiosParamCreator = function (configuration) {
180
217
  options: localVarRequestOptions,
181
218
  };
182
219
  }),
220
+ /**
221
+ * Deletes a user follower from the deal.
222
+ * @summary Delete a follower from a deal
223
+ * @param {number} id The ID of the deal
224
+ * @param {number} follower_id The ID of the following user
225
+
226
+ * @throws {RequiredError}
227
+ */
228
+ deleteDealFollower: (id, follower_id) => __awaiter(this, void 0, void 0, function* () {
229
+ // verify required parameter 'id' is not null or undefined
230
+ (0, common_1.assertParamExists)('deleteDealFollower', 'id', id);
231
+ // verify required parameter 'follower_id' is not null or undefined
232
+ (0, common_1.assertParamExists)('deleteDealFollower', 'follower_id', follower_id);
233
+ const localVarPath = `/deals/{id}/followers/{follower_id}`
234
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
235
+ .replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_id)));
236
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
237
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
238
+ let baseOptions;
239
+ if (configuration) {
240
+ baseOptions = configuration.baseOptions;
241
+ }
242
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
243
+ const localVarHeaderParameter = {};
244
+ const localVarQueryParameter = {};
245
+ // authentication api_key required
246
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
247
+ // authentication oauth2 required
248
+ // oauth required
249
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
250
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
251
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
253
+ return {
254
+ url: (0, common_1.toPathString)(localVarUrlObj),
255
+ options: localVarRequestOptions,
256
+ };
257
+ }),
183
258
  /**
184
259
  * Deletes a product attachment from a deal, using the `product_attachment_id`.
185
260
  * @summary Delete an attached product from a deal
@@ -218,6 +293,44 @@ const DealsApiAxiosParamCreator = function (configuration) {
218
293
  options: localVarRequestOptions,
219
294
  };
220
295
  }),
296
+ /**
297
+ * Removes an installment from a deal. Only available in Advanced and above plans.
298
+ * @summary Delete an installment from a deal
299
+ * @param {number} id The ID of the deal
300
+ * @param {number} installment_id The ID of the installment
301
+
302
+ * @throws {RequiredError}
303
+ */
304
+ deleteInstallment: (id, installment_id) => __awaiter(this, void 0, void 0, function* () {
305
+ // verify required parameter 'id' is not null or undefined
306
+ (0, common_1.assertParamExists)('deleteInstallment', 'id', id);
307
+ // verify required parameter 'installment_id' is not null or undefined
308
+ (0, common_1.assertParamExists)('deleteInstallment', 'installment_id', installment_id);
309
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
310
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
311
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
312
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
313
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
314
+ let baseOptions;
315
+ if (configuration) {
316
+ baseOptions = configuration.baseOptions;
317
+ }
318
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
319
+ const localVarHeaderParameter = {};
320
+ const localVarQueryParameter = {};
321
+ // authentication api_key required
322
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
323
+ // authentication oauth2 required
324
+ // oauth required
325
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
326
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
327
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
328
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
329
+ return {
330
+ url: (0, common_1.toPathString)(localVarUrlObj),
331
+ options: localVarRequestOptions,
332
+ };
333
+ }),
221
334
  /**
222
335
  * Lists discounts attached to a deal.
223
336
  * @summary List discounts added to a deal
@@ -294,6 +407,90 @@ const DealsApiAxiosParamCreator = function (configuration) {
294
407
  options: localVarRequestOptions,
295
408
  };
296
409
  }),
410
+ /**
411
+ * Lists users who are following the deal.
412
+ * @summary List followers of a deal
413
+ * @param {number} id The ID of the deal
414
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
415
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
416
+
417
+ * @throws {RequiredError}
418
+ */
419
+ getDealFollowers: (id, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
420
+ // verify required parameter 'id' is not null or undefined
421
+ (0, common_1.assertParamExists)('getDealFollowers', 'id', id);
422
+ const localVarPath = `/deals/{id}/followers`
423
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
424
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
425
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
426
+ let baseOptions;
427
+ if (configuration) {
428
+ baseOptions = configuration.baseOptions;
429
+ }
430
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
431
+ const localVarHeaderParameter = {};
432
+ const localVarQueryParameter = {};
433
+ // authentication api_key required
434
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
435
+ // authentication oauth2 required
436
+ // oauth required
437
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
438
+ if (limit !== undefined) {
439
+ localVarQueryParameter['limit'] = limit;
440
+ }
441
+ if (cursor !== undefined) {
442
+ localVarQueryParameter['cursor'] = cursor;
443
+ }
444
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
445
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
446
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
447
+ return {
448
+ url: (0, common_1.toPathString)(localVarUrlObj),
449
+ options: localVarRequestOptions,
450
+ };
451
+ }),
452
+ /**
453
+ * Lists changelogs about users have followed the deal.
454
+ * @summary List followers changelog of a deal
455
+ * @param {number} id The ID of the deal
456
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
457
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
458
+
459
+ * @throws {RequiredError}
460
+ */
461
+ getDealFollowersChangelog: (id, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
462
+ // verify required parameter 'id' is not null or undefined
463
+ (0, common_1.assertParamExists)('getDealFollowersChangelog', 'id', id);
464
+ const localVarPath = `/deals/{id}/followers/changelog`
465
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
466
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
467
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
468
+ let baseOptions;
469
+ if (configuration) {
470
+ baseOptions = configuration.baseOptions;
471
+ }
472
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
473
+ const localVarHeaderParameter = {};
474
+ const localVarQueryParameter = {};
475
+ // authentication api_key required
476
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
477
+ // authentication oauth2 required
478
+ // oauth required
479
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
480
+ if (limit !== undefined) {
481
+ localVarQueryParameter['limit'] = limit;
482
+ }
483
+ if (cursor !== undefined) {
484
+ localVarQueryParameter['cursor'] = cursor;
485
+ }
486
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
487
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
488
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
489
+ return {
490
+ url: (0, common_1.toPathString)(localVarUrlObj),
491
+ options: localVarRequestOptions,
492
+ };
493
+ }),
297
494
  /**
298
495
  * Lists products attached to a deal.
299
496
  * @summary List products attached to a deal
@@ -490,6 +687,58 @@ const DealsApiAxiosParamCreator = function (configuration) {
490
687
  options: localVarRequestOptions,
491
688
  };
492
689
  }),
690
+ /**
691
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
692
+ * @summary List installments added to a list of deals
693
+ * @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
694
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
695
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
696
+ * @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;billing_date&#x60;, &#x60;deal_id&#x60;.
697
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
698
+
699
+ * @throws {RequiredError}
700
+ */
701
+ getInstallments: (deal_ids, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
702
+ // verify required parameter 'deal_ids' is not null or undefined
703
+ (0, common_1.assertParamExists)('getInstallments', 'deal_ids', deal_ids);
704
+ const localVarPath = `/deals/installments`;
705
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
706
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
707
+ let baseOptions;
708
+ if (configuration) {
709
+ baseOptions = configuration.baseOptions;
710
+ }
711
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
712
+ const localVarHeaderParameter = {};
713
+ const localVarQueryParameter = {};
714
+ // authentication api_key required
715
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
716
+ // authentication oauth2 required
717
+ // oauth required
718
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
719
+ if (deal_ids) {
720
+ localVarQueryParameter['deal_ids'] = deal_ids;
721
+ }
722
+ if (cursor !== undefined) {
723
+ localVarQueryParameter['cursor'] = cursor;
724
+ }
725
+ if (limit !== undefined) {
726
+ localVarQueryParameter['limit'] = limit;
727
+ }
728
+ if (sort_by !== undefined) {
729
+ localVarQueryParameter['sort_by'] = sort_by;
730
+ }
731
+ if (sort_direction !== undefined) {
732
+ localVarQueryParameter['sort_direction'] = sort_direction;
733
+ }
734
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
735
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
736
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
737
+ return {
738
+ url: (0, common_1.toPathString)(localVarUrlObj),
739
+ options: localVarRequestOptions,
740
+ };
741
+ }),
493
742
  /**
494
743
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
495
744
  * @summary Add a discount to a deal
@@ -527,6 +776,43 @@ const DealsApiAxiosParamCreator = function (configuration) {
527
776
  options: localVarRequestOptions,
528
777
  };
529
778
  }),
779
+ /**
780
+ * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
781
+ * @summary Add an installment to a deal
782
+ * @param {number} id The ID of the deal
783
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
784
+
785
+ * @throws {RequiredError}
786
+ */
787
+ postInstallment: (id, AddInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
788
+ // verify required parameter 'id' is not null or undefined
789
+ (0, common_1.assertParamExists)('postInstallment', 'id', id);
790
+ const localVarPath = `/deals/{id}/installments`
791
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
792
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
793
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
794
+ let baseOptions;
795
+ if (configuration) {
796
+ baseOptions = configuration.baseOptions;
797
+ }
798
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
799
+ const localVarHeaderParameter = {};
800
+ const localVarQueryParameter = {};
801
+ // authentication api_key required
802
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
803
+ // authentication oauth2 required
804
+ // oauth required
805
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
806
+ localVarHeaderParameter['Content-Type'] = 'application/json';
807
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
808
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
809
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
810
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddInstallmentRequestBody, localVarRequestOptions, configuration);
811
+ return {
812
+ url: (0, common_1.toPathString)(localVarUrlObj),
813
+ options: localVarRequestOptions,
814
+ };
815
+ }),
530
816
  /**
531
817
  * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
532
818
  * @summary Search deals
@@ -714,6 +1000,47 @@ const DealsApiAxiosParamCreator = function (configuration) {
714
1000
  options: localVarRequestOptions,
715
1001
  };
716
1002
  }),
1003
+ /**
1004
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1005
+ * @summary Update an installment added to a deal
1006
+ * @param {number} id The ID of the deal
1007
+ * @param {number} installment_id The ID of the installment
1008
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
1009
+
1010
+ * @throws {RequiredError}
1011
+ */
1012
+ updateInstallment: (id, installment_id, UpdateInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
1013
+ // verify required parameter 'id' is not null or undefined
1014
+ (0, common_1.assertParamExists)('updateInstallment', 'id', id);
1015
+ // verify required parameter 'installment_id' is not null or undefined
1016
+ (0, common_1.assertParamExists)('updateInstallment', 'installment_id', installment_id);
1017
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
1018
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1019
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
1020
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1021
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1022
+ let baseOptions;
1023
+ if (configuration) {
1024
+ baseOptions = configuration.baseOptions;
1025
+ }
1026
+ const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
1027
+ const localVarHeaderParameter = {};
1028
+ const localVarQueryParameter = {};
1029
+ // authentication api_key required
1030
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
1031
+ // authentication oauth2 required
1032
+ // oauth required
1033
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
1034
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1035
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1036
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1037
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
1038
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateInstallmentRequestBody, localVarRequestOptions, configuration);
1039
+ return {
1040
+ url: (0, common_1.toPathString)(localVarUrlObj),
1041
+ options: localVarRequestOptions,
1042
+ };
1043
+ }),
717
1044
  };
718
1045
  };
719
1046
  exports.DealsApiAxiosParamCreator = DealsApiAxiosParamCreator;
@@ -737,6 +1064,20 @@ const DealsApiFp = function (configuration) {
737
1064
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
738
1065
  });
739
1066
  },
1067
+ /**
1068
+ * Adds a user as a follower to the deal.
1069
+ * @summary Add a follower to a deal
1070
+ * @param {number} id The ID of the deal
1071
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
1072
+
1073
+ * @throws {RequiredError}
1074
+ */
1075
+ addDealFollower(id, AddDealFollowerRequest) {
1076
+ return __awaiter(this, void 0, void 0, function* () {
1077
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.addDealFollower(id, AddDealFollowerRequest);
1078
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1079
+ });
1080
+ },
740
1081
  /**
741
1082
  * Adds a product to a deal, creating a new item called a deal-product.
742
1083
  * @summary Add a product to a deal
@@ -778,6 +1119,20 @@ const DealsApiFp = function (configuration) {
778
1119
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
779
1120
  });
780
1121
  },
1122
+ /**
1123
+ * Deletes a user follower from the deal.
1124
+ * @summary Delete a follower from a deal
1125
+ * @param {number} id The ID of the deal
1126
+ * @param {number} follower_id The ID of the following user
1127
+
1128
+ * @throws {RequiredError}
1129
+ */
1130
+ deleteDealFollower(id, follower_id) {
1131
+ return __awaiter(this, void 0, void 0, function* () {
1132
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteDealFollower(id, follower_id);
1133
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1134
+ });
1135
+ },
781
1136
  /**
782
1137
  * Deletes a product attachment from a deal, using the `product_attachment_id`.
783
1138
  * @summary Delete an attached product from a deal
@@ -792,6 +1147,20 @@ const DealsApiFp = function (configuration) {
792
1147
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
793
1148
  });
794
1149
  },
1150
+ /**
1151
+ * Removes an installment from a deal. Only available in Advanced and above plans.
1152
+ * @summary Delete an installment from a deal
1153
+ * @param {number} id The ID of the deal
1154
+ * @param {number} installment_id The ID of the installment
1155
+
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ deleteInstallment(id, installment_id) {
1159
+ return __awaiter(this, void 0, void 0, function* () {
1160
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstallment(id, installment_id);
1161
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1162
+ });
1163
+ },
795
1164
  /**
796
1165
  * Lists discounts attached to a deal.
797
1166
  * @summary List discounts added to a deal
@@ -820,6 +1189,36 @@ const DealsApiFp = function (configuration) {
820
1189
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
821
1190
  });
822
1191
  },
1192
+ /**
1193
+ * Lists users who are following the deal.
1194
+ * @summary List followers of a deal
1195
+ * @param {number} id The ID of the deal
1196
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1197
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
1198
+
1199
+ * @throws {RequiredError}
1200
+ */
1201
+ getDealFollowers(id, limit, cursor) {
1202
+ return __awaiter(this, void 0, void 0, function* () {
1203
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealFollowers(id, limit, cursor);
1204
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1205
+ });
1206
+ },
1207
+ /**
1208
+ * Lists changelogs about users have followed the deal.
1209
+ * @summary List followers changelog of a deal
1210
+ * @param {number} id The ID of the deal
1211
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1212
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
1213
+
1214
+ * @throws {RequiredError}
1215
+ */
1216
+ getDealFollowersChangelog(id, limit, cursor) {
1217
+ return __awaiter(this, void 0, void 0, function* () {
1218
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealFollowersChangelog(id, limit, cursor);
1219
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1220
+ });
1221
+ },
823
1222
  /**
824
1223
  * Lists products attached to a deal.
825
1224
  * @summary List products attached to a deal
@@ -882,6 +1281,23 @@ const DealsApiFp = function (configuration) {
882
1281
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
883
1282
  });
884
1283
  },
1284
+ /**
1285
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
1286
+ * @summary List installments added to a list of deals
1287
+ * @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
1288
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
1289
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1290
+ * @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;billing_date&#x60;, &#x60;deal_id&#x60;.
1291
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1292
+
1293
+ * @throws {RequiredError}
1294
+ */
1295
+ getInstallments(deal_ids, cursor, limit, sort_by, sort_direction) {
1296
+ return __awaiter(this, void 0, void 0, function* () {
1297
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction);
1298
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1299
+ });
1300
+ },
885
1301
  /**
886
1302
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
887
1303
  * @summary Add a discount to a deal
@@ -896,6 +1312,20 @@ const DealsApiFp = function (configuration) {
896
1312
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
897
1313
  });
898
1314
  },
1315
+ /**
1316
+ * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
1317
+ * @summary Add an installment to a deal
1318
+ * @param {number} id The ID of the deal
1319
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
1320
+
1321
+ * @throws {RequiredError}
1322
+ */
1323
+ postInstallment(id, AddInstallmentRequestBody) {
1324
+ return __awaiter(this, void 0, void 0, function* () {
1325
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody);
1326
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1327
+ });
1328
+ },
899
1329
  /**
900
1330
  * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
901
1331
  * @summary Search deals
@@ -961,6 +1391,21 @@ const DealsApiFp = function (configuration) {
961
1391
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
962
1392
  });
963
1393
  },
1394
+ /**
1395
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1396
+ * @summary Update an installment added to a deal
1397
+ * @param {number} id The ID of the deal
1398
+ * @param {number} installment_id The ID of the installment
1399
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
1400
+
1401
+ * @throws {RequiredError}
1402
+ */
1403
+ updateInstallment(id, installment_id, UpdateInstallmentRequestBody) {
1404
+ return __awaiter(this, void 0, void 0, function* () {
1405
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody);
1406
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1407
+ });
1408
+ },
964
1409
  };
965
1410
  };
966
1411
  exports.DealsApiFp = DealsApiFp;
@@ -981,6 +1426,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
981
1426
  addDeal(requestParameters = {}) {
982
1427
  return localVarFp.addDeal(requestParameters.AddDealRequest).then((request) => request(axios, basePath));
983
1428
  },
1429
+ /**
1430
+ * Adds a user as a follower to the deal.
1431
+ * @summary Add a follower to a deal
1432
+ * @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
1433
+
1434
+ * @throws {RequiredError}
1435
+ */
1436
+ addDealFollower(requestParameters) {
1437
+ return localVarFp.addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest).then((request) => request(axios, basePath));
1438
+ },
984
1439
  /**
985
1440
  * Adds a product to a deal, creating a new item called a deal-product.
986
1441
  * @summary Add a product to a deal
@@ -1011,6 +1466,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
1011
1466
  deleteDeal(requestParameters) {
1012
1467
  return localVarFp.deleteDeal(requestParameters.id).then((request) => request(axios, basePath));
1013
1468
  },
1469
+ /**
1470
+ * Deletes a user follower from the deal.
1471
+ * @summary Delete a follower from a deal
1472
+ * @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
1473
+
1474
+ * @throws {RequiredError}
1475
+ */
1476
+ deleteDealFollower(requestParameters) {
1477
+ return localVarFp.deleteDealFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(axios, basePath));
1478
+ },
1014
1479
  /**
1015
1480
  * Deletes a product attachment from a deal, using the `product_attachment_id`.
1016
1481
  * @summary Delete an attached product from a deal
@@ -1021,6 +1486,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
1021
1486
  deleteDealProduct(requestParameters) {
1022
1487
  return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(axios, basePath));
1023
1488
  },
1489
+ /**
1490
+ * Removes an installment from a deal. Only available in Advanced and above plans.
1491
+ * @summary Delete an installment from a deal
1492
+ * @param {DealsApiDeleteInstallmentRequest} requestParameters Request parameters.
1493
+
1494
+ * @throws {RequiredError}
1495
+ */
1496
+ deleteInstallment(requestParameters) {
1497
+ return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(axios, basePath));
1498
+ },
1024
1499
  /**
1025
1500
  * Lists discounts attached to a deal.
1026
1501
  * @summary List discounts added to a deal
@@ -1041,6 +1516,26 @@ const DealsApiFactory = function (configuration, basePath, axios) {
1041
1516
  getDeal(requestParameters) {
1042
1517
  return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
1043
1518
  },
1519
+ /**
1520
+ * Lists users who are following the deal.
1521
+ * @summary List followers of a deal
1522
+ * @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
1523
+
1524
+ * @throws {RequiredError}
1525
+ */
1526
+ getDealFollowers(requestParameters) {
1527
+ return localVarFp.getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
1528
+ },
1529
+ /**
1530
+ * Lists changelogs about users have followed the deal.
1531
+ * @summary List followers changelog of a deal
1532
+ * @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
1533
+
1534
+ * @throws {RequiredError}
1535
+ */
1536
+ getDealFollowersChangelog(requestParameters) {
1537
+ return localVarFp.getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
1538
+ },
1044
1539
  /**
1045
1540
  * Lists products attached to a deal.
1046
1541
  * @summary List products attached to a deal
@@ -1071,6 +1566,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
1071
1566
  getDealsProducts(requestParameters) {
1072
1567
  return localVarFp.getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
1073
1568
  },
1569
+ /**
1570
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
1571
+ * @summary List installments added to a list of deals
1572
+ * @param {DealsApiGetInstallmentsRequest} requestParameters Request parameters.
1573
+
1574
+ * @throws {RequiredError}
1575
+ */
1576
+ getInstallments(requestParameters) {
1577
+ return localVarFp.getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
1578
+ },
1074
1579
  /**
1075
1580
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
1076
1581
  * @summary Add a discount to a deal
@@ -1081,6 +1586,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
1081
1586
  postAdditionalDiscount(requestParameters) {
1082
1587
  return localVarFp.postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(axios, basePath));
1083
1588
  },
1589
+ /**
1590
+ * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
1591
+ * @summary Add an installment to a deal
1592
+ * @param {DealsApiPostInstallmentRequest} requestParameters Request parameters.
1593
+
1594
+ * @throws {RequiredError}
1595
+ */
1596
+ postInstallment(requestParameters) {
1597
+ return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(axios, basePath));
1598
+ },
1084
1599
  /**
1085
1600
  * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
1086
1601
  * @summary Search deals
@@ -1121,6 +1636,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
1121
1636
  updateDealProduct(requestParameters) {
1122
1637
  return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(axios, basePath));
1123
1638
  },
1639
+ /**
1640
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1641
+ * @summary Update an installment added to a deal
1642
+ * @param {DealsApiUpdateInstallmentRequest} requestParameters Request parameters.
1643
+
1644
+ * @throws {RequiredError}
1645
+ */
1646
+ updateInstallment(requestParameters) {
1647
+ return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(axios, basePath));
1648
+ },
1124
1649
  };
1125
1650
  };
1126
1651
  exports.DealsApiFactory = DealsApiFactory;
@@ -1142,6 +1667,17 @@ class DealsApi extends base_1.BaseAPI {
1142
1667
  addDeal(requestParameters = {}) {
1143
1668
  return (0, exports.DealsApiFp)(this.configuration).addDeal(requestParameters.AddDealRequest).then((request) => request(this.axios, this.basePath));
1144
1669
  }
1670
+ /**
1671
+ * Adds a user as a follower to the deal.
1672
+ * @summary Add a follower to a deal
1673
+ * @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
1674
+
1675
+ * @throws {RequiredError}
1676
+ * @memberof DealsApi
1677
+ */
1678
+ addDealFollower(requestParameters) {
1679
+ return (0, exports.DealsApiFp)(this.configuration).addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest).then((request) => request(this.axios, this.basePath));
1680
+ }
1145
1681
  /**
1146
1682
  * Adds a product to a deal, creating a new item called a deal-product.
1147
1683
  * @summary Add a product to a deal
@@ -1175,6 +1711,17 @@ class DealsApi extends base_1.BaseAPI {
1175
1711
  deleteDeal(requestParameters) {
1176
1712
  return (0, exports.DealsApiFp)(this.configuration).deleteDeal(requestParameters.id).then((request) => request(this.axios, this.basePath));
1177
1713
  }
1714
+ /**
1715
+ * Deletes a user follower from the deal.
1716
+ * @summary Delete a follower from a deal
1717
+ * @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
1718
+
1719
+ * @throws {RequiredError}
1720
+ * @memberof DealsApi
1721
+ */
1722
+ deleteDealFollower(requestParameters) {
1723
+ return (0, exports.DealsApiFp)(this.configuration).deleteDealFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(this.axios, this.basePath));
1724
+ }
1178
1725
  /**
1179
1726
  * Deletes a product attachment from a deal, using the `product_attachment_id`.
1180
1727
  * @summary Delete an attached product from a deal
@@ -1186,6 +1733,17 @@ class DealsApi extends base_1.BaseAPI {
1186
1733
  deleteDealProduct(requestParameters) {
1187
1734
  return (0, exports.DealsApiFp)(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(this.axios, this.basePath));
1188
1735
  }
1736
+ /**
1737
+ * Removes an installment from a deal. Only available in Advanced and above plans.
1738
+ * @summary Delete an installment from a deal
1739
+ * @param {DealsApiDeleteInstallmentRequest} requestParameters Request parameters.
1740
+
1741
+ * @throws {RequiredError}
1742
+ * @memberof DealsApi
1743
+ */
1744
+ deleteInstallment(requestParameters) {
1745
+ return (0, exports.DealsApiFp)(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(this.axios, this.basePath));
1746
+ }
1189
1747
  /**
1190
1748
  * Lists discounts attached to a deal.
1191
1749
  * @summary List discounts added to a deal
@@ -1208,6 +1766,28 @@ class DealsApi extends base_1.BaseAPI {
1208
1766
  getDeal(requestParameters) {
1209
1767
  return (0, exports.DealsApiFp)(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
1210
1768
  }
1769
+ /**
1770
+ * Lists users who are following the deal.
1771
+ * @summary List followers of a deal
1772
+ * @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
1773
+
1774
+ * @throws {RequiredError}
1775
+ * @memberof DealsApi
1776
+ */
1777
+ getDealFollowers(requestParameters) {
1778
+ return (0, exports.DealsApiFp)(this.configuration).getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
1779
+ }
1780
+ /**
1781
+ * Lists changelogs about users have followed the deal.
1782
+ * @summary List followers changelog of a deal
1783
+ * @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
1784
+
1785
+ * @throws {RequiredError}
1786
+ * @memberof DealsApi
1787
+ */
1788
+ getDealFollowersChangelog(requestParameters) {
1789
+ return (0, exports.DealsApiFp)(this.configuration).getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
1790
+ }
1211
1791
  /**
1212
1792
  * Lists products attached to a deal.
1213
1793
  * @summary List products attached to a deal
@@ -1241,6 +1821,17 @@ class DealsApi extends base_1.BaseAPI {
1241
1821
  getDealsProducts(requestParameters) {
1242
1822
  return (0, exports.DealsApiFp)(this.configuration).getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
1243
1823
  }
1824
+ /**
1825
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
1826
+ * @summary List installments added to a list of deals
1827
+ * @param {DealsApiGetInstallmentsRequest} requestParameters Request parameters.
1828
+
1829
+ * @throws {RequiredError}
1830
+ * @memberof DealsApi
1831
+ */
1832
+ getInstallments(requestParameters) {
1833
+ return (0, exports.DealsApiFp)(this.configuration).getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
1834
+ }
1244
1835
  /**
1245
1836
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
1246
1837
  * @summary Add a discount to a deal
@@ -1252,6 +1843,17 @@ class DealsApi extends base_1.BaseAPI {
1252
1843
  postAdditionalDiscount(requestParameters) {
1253
1844
  return (0, exports.DealsApiFp)(this.configuration).postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(this.axios, this.basePath));
1254
1845
  }
1846
+ /**
1847
+ * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
1848
+ * @summary Add an installment to a deal
1849
+ * @param {DealsApiPostInstallmentRequest} requestParameters Request parameters.
1850
+
1851
+ * @throws {RequiredError}
1852
+ * @memberof DealsApi
1853
+ */
1854
+ postInstallment(requestParameters) {
1855
+ return (0, exports.DealsApiFp)(this.configuration).postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
1856
+ }
1255
1857
  /**
1256
1858
  * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
1257
1859
  * @summary Search deals
@@ -1296,5 +1898,16 @@ class DealsApi extends base_1.BaseAPI {
1296
1898
  updateDealProduct(requestParameters) {
1297
1899
  return (0, exports.DealsApiFp)(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(this.axios, this.basePath));
1298
1900
  }
1901
+ /**
1902
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1903
+ * @summary Update an installment added to a deal
1904
+ * @param {DealsApiUpdateInstallmentRequest} requestParameters Request parameters.
1905
+
1906
+ * @throws {RequiredError}
1907
+ * @memberof DealsApi
1908
+ */
1909
+ updateInstallment(requestParameters) {
1910
+ return (0, exports.DealsApiFp)(this.configuration).updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
1911
+ }
1299
1912
  }
1300
1913
  exports.DealsApi = DealsApi;