pipedrive 24.1.0 → 24.2.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 (79) hide show
  1. package/dist/esm/versions/v1/models/additional-data.d.ts +38 -0
  2. package/dist/esm/versions/v1/models/additional-data.js +14 -0
  3. package/dist/esm/versions/v1/models/base-webhook.d.ts +2 -1
  4. package/dist/esm/versions/v1/models/base-webhook.js +2 -1
  5. package/dist/esm/versions/v1/models/get-notes-response-additional-data.d.ts +3 -3
  6. package/dist/esm/versions/v1/models/index.d.ts +1 -1
  7. package/dist/esm/versions/v1/models/index.js +1 -1
  8. package/dist/esm/versions/v2/api/activities-api.d.ts +34 -2
  9. package/dist/esm/versions/v2/api/activities-api.js +25 -5
  10. package/dist/esm/versions/v2/api/beta-api.d.ts +288 -2
  11. package/dist/esm/versions/v2/api/beta-api.js +337 -5
  12. package/dist/esm/versions/v2/api/deals-api.d.ts +254 -0
  13. package/dist/esm/versions/v2/api/deals-api.js +312 -0
  14. package/dist/esm/versions/v2/models/add-ainstallment-response.d.ts +29 -0
  15. package/dist/esm/versions/v2/models/add-ainstallment-response.js +14 -0
  16. package/dist/esm/versions/v2/models/add-installment-request-body.d.ts +33 -0
  17. package/dist/esm/versions/v2/models/add-installment-request-body.js +14 -0
  18. package/dist/esm/versions/v2/models/delete-installment-response-data.d.ts +23 -0
  19. package/dist/esm/versions/v2/models/delete-installment-response-data.js +14 -0
  20. package/dist/esm/versions/v2/models/delete-installment-response.d.ts +29 -0
  21. package/dist/esm/versions/v2/models/delete-installment-response.js +14 -0
  22. package/dist/esm/versions/v2/models/get-activities-response-all-of-additional-data.d.ts +23 -0
  23. package/dist/esm/versions/v2/models/get-activities-response-all-of-additional-data.js +14 -0
  24. package/dist/esm/versions/v2/models/get-activities-response-all-of.d.ts +6 -0
  25. package/dist/esm/versions/v2/models/get-deals-response-all-of.d.ts +6 -0
  26. package/dist/esm/versions/v2/models/get-installments-response-data-inner.d.ts +43 -0
  27. package/dist/esm/versions/v2/models/get-installments-response-data-inner.js +14 -0
  28. package/dist/esm/versions/v2/models/get-installments-response.d.ts +29 -0
  29. package/dist/esm/versions/v2/models/get-installments-response.js +14 -0
  30. package/dist/esm/versions/v2/models/get-organizations-response-all-of.d.ts +6 -0
  31. package/dist/esm/versions/v2/models/get-persons-response-all-of.d.ts +6 -0
  32. package/dist/esm/versions/v2/models/get-pipelines-response-all-of.d.ts +6 -0
  33. package/dist/esm/versions/v2/models/get-stages-response.d.ts +6 -0
  34. package/dist/esm/versions/v2/models/index.d.ts +9 -0
  35. package/dist/esm/versions/v2/models/index.js +9 -0
  36. package/dist/esm/versions/v2/models/update-installment-request-body.d.ts +33 -0
  37. package/dist/esm/versions/v2/models/update-installment-request-body.js +14 -0
  38. package/dist/esm/versions/v2/models/update-installment-response.d.ts +29 -0
  39. package/dist/esm/versions/v2/models/update-installment-response.js +14 -0
  40. package/dist/versions/v1/models/additional-data.d.ts +38 -0
  41. package/dist/versions/v1/models/additional-data.js +15 -0
  42. package/dist/versions/v1/models/base-webhook.d.ts +2 -1
  43. package/dist/versions/v1/models/base-webhook.js +2 -1
  44. package/dist/versions/v1/models/get-notes-response-additional-data.d.ts +3 -3
  45. package/dist/versions/v1/models/index.d.ts +1 -1
  46. package/dist/versions/v1/models/index.js +1 -1
  47. package/dist/versions/v2/api/activities-api.d.ts +34 -2
  48. package/dist/versions/v2/api/activities-api.js +25 -5
  49. package/dist/versions/v2/api/beta-api.d.ts +288 -2
  50. package/dist/versions/v2/api/beta-api.js +337 -5
  51. package/dist/versions/v2/api/deals-api.d.ts +254 -0
  52. package/dist/versions/v2/api/deals-api.js +312 -0
  53. package/dist/versions/v2/models/add-ainstallment-response.d.ts +29 -0
  54. package/dist/versions/v2/models/add-ainstallment-response.js +15 -0
  55. package/dist/versions/v2/models/add-installment-request-body.d.ts +33 -0
  56. package/dist/versions/v2/models/add-installment-request-body.js +15 -0
  57. package/dist/versions/v2/models/delete-installment-response-data.d.ts +23 -0
  58. package/dist/versions/v2/models/delete-installment-response-data.js +15 -0
  59. package/dist/versions/v2/models/delete-installment-response.d.ts +29 -0
  60. package/dist/versions/v2/models/delete-installment-response.js +15 -0
  61. package/dist/versions/v2/models/get-activities-response-all-of-additional-data.d.ts +23 -0
  62. package/dist/versions/v2/models/get-activities-response-all-of-additional-data.js +15 -0
  63. package/dist/versions/v2/models/get-activities-response-all-of.d.ts +6 -0
  64. package/dist/versions/v2/models/get-deals-response-all-of.d.ts +6 -0
  65. package/dist/versions/v2/models/get-installments-response-data-inner.d.ts +43 -0
  66. package/dist/versions/v2/models/get-installments-response-data-inner.js +15 -0
  67. package/dist/versions/v2/models/get-installments-response.d.ts +29 -0
  68. package/dist/versions/v2/models/get-installments-response.js +15 -0
  69. package/dist/versions/v2/models/get-organizations-response-all-of.d.ts +6 -0
  70. package/dist/versions/v2/models/get-persons-response-all-of.d.ts +6 -0
  71. package/dist/versions/v2/models/get-pipelines-response-all-of.d.ts +6 -0
  72. package/dist/versions/v2/models/get-stages-response.d.ts +6 -0
  73. package/dist/versions/v2/models/index.d.ts +9 -0
  74. package/dist/versions/v2/models/index.js +9 -0
  75. package/dist/versions/v2/models/update-installment-request-body.d.ts +33 -0
  76. package/dist/versions/v2/models/update-installment-request-body.js +15 -0
  77. package/dist/versions/v2/models/update-installment-response.d.ts +29 -0
  78. package/dist/versions/v2/models/update-installment-response.js +15 -0
  79. package/package.json +1 -1
@@ -345,6 +345,44 @@ export const BetaApiAxiosParamCreator = function (configuration) {
345
345
  options: localVarRequestOptions,
346
346
  };
347
347
  }),
348
+ /**
349
+ * Removes an installment from a deal. Only available in Advanced and above plans.
350
+ * @summary Delete an installment from a deal
351
+ * @param {number} id The ID of the deal
352
+ * @param {number} installment_id The ID of the installment
353
+
354
+ * @throws {RequiredError}
355
+ */
356
+ deleteInstallment: (id, installment_id) => __awaiter(this, void 0, void 0, function* () {
357
+ // verify required parameter 'id' is not null or undefined
358
+ assertParamExists('deleteInstallment', 'id', id);
359
+ // verify required parameter 'installment_id' is not null or undefined
360
+ assertParamExists('deleteInstallment', 'installment_id', installment_id);
361
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
362
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
363
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
364
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
365
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
366
+ let baseOptions;
367
+ if (configuration) {
368
+ baseOptions = configuration.baseOptions;
369
+ }
370
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
371
+ const localVarHeaderParameter = {};
372
+ const localVarQueryParameter = {};
373
+ // authentication api_key required
374
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
375
+ // authentication oauth2 required
376
+ // oauth required
377
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
378
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
379
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
380
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
381
+ return {
382
+ url: toPathString(localVarUrlObj),
383
+ options: localVarRequestOptions,
384
+ };
385
+ }),
348
386
  /**
349
387
  * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
350
388
  * @summary Delete a organization
@@ -419,6 +457,10 @@ export const BetaApiAxiosParamCreator = function (configuration) {
419
457
  * @param {number} [filter_id] If supplied, only activities matching the specified filter are returned
420
458
  * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
421
459
  * @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
460
+ * @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
461
+ * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
462
+ * @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
463
+ * @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
422
464
  * @param {string} [updated_since] If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
423
465
  * @param {string} [updated_until] If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
424
466
  * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
@@ -429,7 +471,7 @@ export const BetaApiAxiosParamCreator = function (configuration) {
429
471
 
430
472
  * @throws {RequiredError}
431
473
  */
432
- getActivities: (filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
474
+ getActivities: (filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
433
475
  const localVarPath = `/activities`;
434
476
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
435
477
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -454,6 +496,18 @@ export const BetaApiAxiosParamCreator = function (configuration) {
454
496
  if (owner_id !== undefined) {
455
497
  localVarQueryParameter['owner_id'] = owner_id;
456
498
  }
499
+ if (deal_id !== undefined) {
500
+ localVarQueryParameter['deal_id'] = deal_id;
501
+ }
502
+ if (lead_id !== undefined) {
503
+ localVarQueryParameter['lead_id'] = lead_id;
504
+ }
505
+ if (person_id !== undefined) {
506
+ localVarQueryParameter['person_id'] = person_id;
507
+ }
508
+ if (org_id !== undefined) {
509
+ localVarQueryParameter['org_id'] = org_id;
510
+ }
457
511
  if (updated_since !== undefined) {
458
512
  localVarQueryParameter['updated_since'] = updated_since;
459
513
  }
@@ -793,6 +847,58 @@ export const BetaApiAxiosParamCreator = function (configuration) {
793
847
  options: localVarRequestOptions,
794
848
  };
795
849
  }),
850
+ /**
851
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
852
+ * @summary List installments added to a list of deals
853
+ * @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.
854
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
855
+ * @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.
856
+ * @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;.
857
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
858
+
859
+ * @throws {RequiredError}
860
+ */
861
+ getInstallments: (deal_ids, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
862
+ // verify required parameter 'deal_ids' is not null or undefined
863
+ assertParamExists('getInstallments', 'deal_ids', deal_ids);
864
+ const localVarPath = `/deals/installments`;
865
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
866
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
867
+ let baseOptions;
868
+ if (configuration) {
869
+ baseOptions = configuration.baseOptions;
870
+ }
871
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
872
+ const localVarHeaderParameter = {};
873
+ const localVarQueryParameter = {};
874
+ // authentication api_key required
875
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
876
+ // authentication oauth2 required
877
+ // oauth required
878
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
879
+ if (deal_ids) {
880
+ localVarQueryParameter['deal_ids'] = deal_ids;
881
+ }
882
+ if (cursor !== undefined) {
883
+ localVarQueryParameter['cursor'] = cursor;
884
+ }
885
+ if (limit !== undefined) {
886
+ localVarQueryParameter['limit'] = limit;
887
+ }
888
+ if (sort_by !== undefined) {
889
+ localVarQueryParameter['sort_by'] = sort_by;
890
+ }
891
+ if (sort_direction !== undefined) {
892
+ localVarQueryParameter['sort_direction'] = sort_direction;
893
+ }
894
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
895
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
896
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
897
+ return {
898
+ url: toPathString(localVarUrlObj),
899
+ options: localVarRequestOptions,
900
+ };
901
+ }),
796
902
  /**
797
903
  * Returns the details of a specific organization.
798
904
  * @summary Get details of a organization
@@ -1066,6 +1172,43 @@ export const BetaApiAxiosParamCreator = function (configuration) {
1066
1172
  options: localVarRequestOptions,
1067
1173
  };
1068
1174
  }),
1175
+ /**
1176
+ * 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.
1177
+ * @summary Add an installment to a deal
1178
+ * @param {number} id The ID of the deal
1179
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
1180
+
1181
+ * @throws {RequiredError}
1182
+ */
1183
+ postInstallment: (id, AddInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
1184
+ // verify required parameter 'id' is not null or undefined
1185
+ assertParamExists('postInstallment', 'id', id);
1186
+ const localVarPath = `/deals/{id}/installments`
1187
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1188
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1189
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1190
+ let baseOptions;
1191
+ if (configuration) {
1192
+ baseOptions = configuration.baseOptions;
1193
+ }
1194
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
1195
+ const localVarHeaderParameter = {};
1196
+ const localVarQueryParameter = {};
1197
+ // authentication api_key required
1198
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
1199
+ // authentication oauth2 required
1200
+ // oauth required
1201
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
1202
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1203
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1204
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1205
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
1206
+ localVarRequestOptions.data = serializeDataIfNeeded(AddInstallmentRequestBody, localVarRequestOptions, configuration);
1207
+ return {
1208
+ url: toPathString(localVarUrlObj),
1209
+ options: localVarRequestOptions,
1210
+ };
1211
+ }),
1069
1212
  /**
1070
1213
  * 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.
1071
1214
  * @summary Search deals
@@ -1590,6 +1733,47 @@ export const BetaApiAxiosParamCreator = function (configuration) {
1590
1733
  options: localVarRequestOptions,
1591
1734
  };
1592
1735
  }),
1736
+ /**
1737
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1738
+ * @summary Update an installment added to a deal
1739
+ * @param {number} id The ID of the deal
1740
+ * @param {number} installment_id The ID of the installment
1741
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
1742
+
1743
+ * @throws {RequiredError}
1744
+ */
1745
+ updateInstallment: (id, installment_id, UpdateInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
1746
+ // verify required parameter 'id' is not null or undefined
1747
+ assertParamExists('updateInstallment', 'id', id);
1748
+ // verify required parameter 'installment_id' is not null or undefined
1749
+ assertParamExists('updateInstallment', 'installment_id', installment_id);
1750
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
1751
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1752
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
1753
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1754
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1755
+ let baseOptions;
1756
+ if (configuration) {
1757
+ baseOptions = configuration.baseOptions;
1758
+ }
1759
+ const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
1760
+ const localVarHeaderParameter = {};
1761
+ const localVarQueryParameter = {};
1762
+ // authentication api_key required
1763
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
1764
+ // authentication oauth2 required
1765
+ // oauth required
1766
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
1767
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1768
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1769
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1770
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
1771
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateInstallmentRequestBody, localVarRequestOptions, configuration);
1772
+ return {
1773
+ url: toPathString(localVarUrlObj),
1774
+ options: localVarRequestOptions,
1775
+ };
1776
+ }),
1593
1777
  /**
1594
1778
  * Updates the properties of a organization.
1595
1779
  * @summary Update a organization
@@ -1793,6 +1977,20 @@ export const BetaApiFp = function (configuration) {
1793
1977
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1794
1978
  });
1795
1979
  },
1980
+ /**
1981
+ * Removes an installment from a deal. Only available in Advanced and above plans.
1982
+ * @summary Delete an installment from a deal
1983
+ * @param {number} id The ID of the deal
1984
+ * @param {number} installment_id The ID of the installment
1985
+
1986
+ * @throws {RequiredError}
1987
+ */
1988
+ deleteInstallment(id, installment_id) {
1989
+ return __awaiter(this, void 0, void 0, function* () {
1990
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstallment(id, installment_id);
1991
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1992
+ });
1993
+ },
1796
1994
  /**
1797
1995
  * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
1798
1996
  * @summary Delete a organization
@@ -1825,6 +2023,10 @@ export const BetaApiFp = function (configuration) {
1825
2023
  * @param {number} [filter_id] If supplied, only activities matching the specified filter are returned
1826
2024
  * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
1827
2025
  * @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
2026
+ * @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
2027
+ * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
2028
+ * @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
2029
+ * @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
1828
2030
  * @param {string} [updated_since] If set, only activities with an &#x60;update_time&#x60; later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
1829
2031
  * @param {string} [updated_until] If set, only activities with an &#x60;update_time&#x60; earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
1830
2032
  * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;update_time&#x60;, &#x60;add_time&#x60;.
@@ -1835,9 +2037,9 @@ export const BetaApiFp = function (configuration) {
1835
2037
 
1836
2038
  * @throws {RequiredError}
1837
2039
  */
1838
- getActivities(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor) {
2040
+ getActivities(filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor) {
1839
2041
  return __awaiter(this, void 0, void 0, function* () {
1840
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getActivities(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor);
2042
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getActivities(filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor);
1841
2043
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1842
2044
  });
1843
2045
  },
@@ -1945,6 +2147,23 @@ export const BetaApiFp = function (configuration) {
1945
2147
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1946
2148
  });
1947
2149
  },
2150
+ /**
2151
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
2152
+ * @summary List installments added to a list of deals
2153
+ * @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.
2154
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
2155
+ * @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.
2156
+ * @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;.
2157
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
2158
+
2159
+ * @throws {RequiredError}
2160
+ */
2161
+ getInstallments(deal_ids, cursor, limit, sort_by, sort_direction) {
2162
+ return __awaiter(this, void 0, void 0, function* () {
2163
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction);
2164
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2165
+ });
2166
+ },
1948
2167
  /**
1949
2168
  * Returns the details of a specific organization.
1950
2169
  * @summary Get details of a organization
@@ -2036,6 +2255,20 @@ export const BetaApiFp = function (configuration) {
2036
2255
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2037
2256
  });
2038
2257
  },
2258
+ /**
2259
+ * 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.
2260
+ * @summary Add an installment to a deal
2261
+ * @param {number} id The ID of the deal
2262
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
2263
+
2264
+ * @throws {RequiredError}
2265
+ */
2266
+ postInstallment(id, AddInstallmentRequestBody) {
2267
+ return __awaiter(this, void 0, void 0, function* () {
2268
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody);
2269
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2270
+ });
2271
+ },
2039
2272
  /**
2040
2273
  * 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.
2041
2274
  * @summary Search deals
@@ -2209,6 +2442,21 @@ export const BetaApiFp = function (configuration) {
2209
2442
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2210
2443
  });
2211
2444
  },
2445
+ /**
2446
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
2447
+ * @summary Update an installment added to a deal
2448
+ * @param {number} id The ID of the deal
2449
+ * @param {number} installment_id The ID of the installment
2450
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
2451
+
2452
+ * @throws {RequiredError}
2453
+ */
2454
+ updateInstallment(id, installment_id, UpdateInstallmentRequestBody) {
2455
+ return __awaiter(this, void 0, void 0, function* () {
2456
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody);
2457
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2458
+ });
2459
+ },
2212
2460
  /**
2213
2461
  * Updates the properties of a organization.
2214
2462
  * @summary Update a organization
@@ -2336,6 +2584,16 @@ export const BetaApiFactory = function (configuration, basePath, axios) {
2336
2584
  deleteDealProduct(requestParameters) {
2337
2585
  return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(axios, basePath));
2338
2586
  },
2587
+ /**
2588
+ * Removes an installment from a deal. Only available in Advanced and above plans.
2589
+ * @summary Delete an installment from a deal
2590
+ * @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
2591
+
2592
+ * @throws {RequiredError}
2593
+ */
2594
+ deleteInstallment(requestParameters) {
2595
+ return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(axios, basePath));
2596
+ },
2339
2597
  /**
2340
2598
  * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
2341
2599
  * @summary Delete a organization
@@ -2364,7 +2622,7 @@ export const BetaApiFactory = function (configuration, basePath, axios) {
2364
2622
  * @throws {RequiredError}
2365
2623
  */
2366
2624
  getActivities(requestParameters = {}) {
2367
- return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
2625
+ return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
2368
2626
  },
2369
2627
  /**
2370
2628
  * Returns the details of a specific activity.
@@ -2426,6 +2684,16 @@ export const BetaApiFactory = function (configuration, basePath, axios) {
2426
2684
  getDealsProducts(requestParameters) {
2427
2685
  return localVarFp.getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
2428
2686
  },
2687
+ /**
2688
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
2689
+ * @summary List installments added to a list of deals
2690
+ * @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
2691
+
2692
+ * @throws {RequiredError}
2693
+ */
2694
+ getInstallments(requestParameters) {
2695
+ return localVarFp.getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
2696
+ },
2429
2697
  /**
2430
2698
  * Returns the details of a specific organization.
2431
2699
  * @summary Get details of a organization
@@ -2476,6 +2744,16 @@ export const BetaApiFactory = function (configuration, basePath, axios) {
2476
2744
  postAdditionalDiscount(requestParameters) {
2477
2745
  return localVarFp.postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(axios, basePath));
2478
2746
  },
2747
+ /**
2748
+ * 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.
2749
+ * @summary Add an installment to a deal
2750
+ * @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
2751
+
2752
+ * @throws {RequiredError}
2753
+ */
2754
+ postInstallment(requestParameters) {
2755
+ return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(axios, basePath));
2756
+ },
2479
2757
  /**
2480
2758
  * 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.
2481
2759
  * @summary Search deals
@@ -2576,6 +2854,16 @@ export const BetaApiFactory = function (configuration, basePath, axios) {
2576
2854
  updateDealProduct(requestParameters) {
2577
2855
  return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(axios, basePath));
2578
2856
  },
2857
+ /**
2858
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
2859
+ * @summary Update an installment added to a deal
2860
+ * @param {BetaApiUpdateInstallmentRequest} requestParameters Request parameters.
2861
+
2862
+ * @throws {RequiredError}
2863
+ */
2864
+ updateInstallment(requestParameters) {
2865
+ return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(axios, basePath));
2866
+ },
2579
2867
  /**
2580
2868
  * Updates the properties of a organization.
2581
2869
  * @summary Update a organization
@@ -2704,6 +2992,17 @@ export class BetaApi extends BaseAPI {
2704
2992
  deleteDealProduct(requestParameters) {
2705
2993
  return BetaApiFp(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(this.axios, this.basePath));
2706
2994
  }
2995
+ /**
2996
+ * Removes an installment from a deal. Only available in Advanced and above plans.
2997
+ * @summary Delete an installment from a deal
2998
+ * @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
2999
+
3000
+ * @throws {RequiredError}
3001
+ * @memberof BetaApi
3002
+ */
3003
+ deleteInstallment(requestParameters) {
3004
+ return BetaApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(this.axios, this.basePath));
3005
+ }
2707
3006
  /**
2708
3007
  * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
2709
3008
  * @summary Delete a organization
@@ -2735,7 +3034,7 @@ export class BetaApi extends BaseAPI {
2735
3034
  * @memberof BetaApi
2736
3035
  */
2737
3036
  getActivities(requestParameters = {}) {
2738
- return BetaApiFp(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
3037
+ return BetaApiFp(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
2739
3038
  }
2740
3039
  /**
2741
3040
  * Returns the details of a specific activity.
@@ -2803,6 +3102,17 @@ export class BetaApi extends BaseAPI {
2803
3102
  getDealsProducts(requestParameters) {
2804
3103
  return BetaApiFp(this.configuration).getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
2805
3104
  }
3105
+ /**
3106
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
3107
+ * @summary List installments added to a list of deals
3108
+ * @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
3109
+
3110
+ * @throws {RequiredError}
3111
+ * @memberof BetaApi
3112
+ */
3113
+ getInstallments(requestParameters) {
3114
+ return BetaApiFp(this.configuration).getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
3115
+ }
2806
3116
  /**
2807
3117
  * Returns the details of a specific organization.
2808
3118
  * @summary Get details of a organization
@@ -2858,6 +3168,17 @@ export class BetaApi extends BaseAPI {
2858
3168
  postAdditionalDiscount(requestParameters) {
2859
3169
  return BetaApiFp(this.configuration).postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(this.axios, this.basePath));
2860
3170
  }
3171
+ /**
3172
+ * 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.
3173
+ * @summary Add an installment to a deal
3174
+ * @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
3175
+
3176
+ * @throws {RequiredError}
3177
+ * @memberof BetaApi
3178
+ */
3179
+ postInstallment(requestParameters) {
3180
+ return BetaApiFp(this.configuration).postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
3181
+ }
2861
3182
  /**
2862
3183
  * 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.
2863
3184
  * @summary Search deals
@@ -2968,6 +3289,17 @@ export class BetaApi extends BaseAPI {
2968
3289
  updateDealProduct(requestParameters) {
2969
3290
  return BetaApiFp(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(this.axios, this.basePath));
2970
3291
  }
3292
+ /**
3293
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
3294
+ * @summary Update an installment added to a deal
3295
+ * @param {BetaApiUpdateInstallmentRequest} requestParameters Request parameters.
3296
+
3297
+ * @throws {RequiredError}
3298
+ * @memberof BetaApi
3299
+ */
3300
+ updateInstallment(requestParameters) {
3301
+ return BetaApiFp(this.configuration).updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
3302
+ }
2971
3303
  /**
2972
3304
  * Updates the properties of a organization.
2973
3305
  * @summary Update a organization