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
@@ -212,6 +212,44 @@ export const DealsApiAxiosParamCreator = function (configuration) {
212
212
  options: localVarRequestOptions,
213
213
  };
214
214
  }),
215
+ /**
216
+ * Removes an installment from a deal. Only available in Advanced and above plans.
217
+ * @summary Delete an installment from a deal
218
+ * @param {number} id The ID of the deal
219
+ * @param {number} installment_id The ID of the installment
220
+
221
+ * @throws {RequiredError}
222
+ */
223
+ deleteInstallment: (id, installment_id) => __awaiter(this, void 0, void 0, function* () {
224
+ // verify required parameter 'id' is not null or undefined
225
+ assertParamExists('deleteInstallment', 'id', id);
226
+ // verify required parameter 'installment_id' is not null or undefined
227
+ assertParamExists('deleteInstallment', 'installment_id', installment_id);
228
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
229
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
230
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
231
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
232
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
233
+ let baseOptions;
234
+ if (configuration) {
235
+ baseOptions = configuration.baseOptions;
236
+ }
237
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
238
+ const localVarHeaderParameter = {};
239
+ const localVarQueryParameter = {};
240
+ // authentication api_key required
241
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
242
+ // authentication oauth2 required
243
+ // oauth required
244
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
245
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
246
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
247
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
248
+ return {
249
+ url: toPathString(localVarUrlObj),
250
+ options: localVarRequestOptions,
251
+ };
252
+ }),
215
253
  /**
216
254
  * Lists discounts attached to a deal.
217
255
  * @summary List discounts added to a deal
@@ -484,6 +522,58 @@ export const DealsApiAxiosParamCreator = function (configuration) {
484
522
  options: localVarRequestOptions,
485
523
  };
486
524
  }),
525
+ /**
526
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
527
+ * @summary List installments added to a list of deals
528
+ * @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.
529
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
530
+ * @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.
531
+ * @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;.
532
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
533
+
534
+ * @throws {RequiredError}
535
+ */
536
+ getInstallments: (deal_ids, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
537
+ // verify required parameter 'deal_ids' is not null or undefined
538
+ assertParamExists('getInstallments', 'deal_ids', deal_ids);
539
+ const localVarPath = `/deals/installments`;
540
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
541
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
542
+ let baseOptions;
543
+ if (configuration) {
544
+ baseOptions = configuration.baseOptions;
545
+ }
546
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
547
+ const localVarHeaderParameter = {};
548
+ const localVarQueryParameter = {};
549
+ // authentication api_key required
550
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
551
+ // authentication oauth2 required
552
+ // oauth required
553
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
554
+ if (deal_ids) {
555
+ localVarQueryParameter['deal_ids'] = deal_ids;
556
+ }
557
+ if (cursor !== undefined) {
558
+ localVarQueryParameter['cursor'] = cursor;
559
+ }
560
+ if (limit !== undefined) {
561
+ localVarQueryParameter['limit'] = limit;
562
+ }
563
+ if (sort_by !== undefined) {
564
+ localVarQueryParameter['sort_by'] = sort_by;
565
+ }
566
+ if (sort_direction !== undefined) {
567
+ localVarQueryParameter['sort_direction'] = sort_direction;
568
+ }
569
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
570
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
571
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
572
+ return {
573
+ url: toPathString(localVarUrlObj),
574
+ options: localVarRequestOptions,
575
+ };
576
+ }),
487
577
  /**
488
578
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
489
579
  * @summary Add a discount to a deal
@@ -521,6 +611,43 @@ export const DealsApiAxiosParamCreator = function (configuration) {
521
611
  options: localVarRequestOptions,
522
612
  };
523
613
  }),
614
+ /**
615
+ * 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.
616
+ * @summary Add an installment to a deal
617
+ * @param {number} id The ID of the deal
618
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
619
+
620
+ * @throws {RequiredError}
621
+ */
622
+ postInstallment: (id, AddInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
623
+ // verify required parameter 'id' is not null or undefined
624
+ assertParamExists('postInstallment', 'id', id);
625
+ const localVarPath = `/deals/{id}/installments`
626
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
627
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
628
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
629
+ let baseOptions;
630
+ if (configuration) {
631
+ baseOptions = configuration.baseOptions;
632
+ }
633
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
634
+ const localVarHeaderParameter = {};
635
+ const localVarQueryParameter = {};
636
+ // authentication api_key required
637
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
638
+ // authentication oauth2 required
639
+ // oauth required
640
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
641
+ localVarHeaderParameter['Content-Type'] = 'application/json';
642
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
643
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
644
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
645
+ localVarRequestOptions.data = serializeDataIfNeeded(AddInstallmentRequestBody, localVarRequestOptions, configuration);
646
+ return {
647
+ url: toPathString(localVarUrlObj),
648
+ options: localVarRequestOptions,
649
+ };
650
+ }),
524
651
  /**
525
652
  * 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.
526
653
  * @summary Search deals
@@ -708,6 +835,47 @@ export const DealsApiAxiosParamCreator = function (configuration) {
708
835
  options: localVarRequestOptions,
709
836
  };
710
837
  }),
838
+ /**
839
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
840
+ * @summary Update an installment added to a deal
841
+ * @param {number} id The ID of the deal
842
+ * @param {number} installment_id The ID of the installment
843
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
844
+
845
+ * @throws {RequiredError}
846
+ */
847
+ updateInstallment: (id, installment_id, UpdateInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
848
+ // verify required parameter 'id' is not null or undefined
849
+ assertParamExists('updateInstallment', 'id', id);
850
+ // verify required parameter 'installment_id' is not null or undefined
851
+ assertParamExists('updateInstallment', 'installment_id', installment_id);
852
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
853
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
854
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
855
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
856
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
857
+ let baseOptions;
858
+ if (configuration) {
859
+ baseOptions = configuration.baseOptions;
860
+ }
861
+ const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
862
+ const localVarHeaderParameter = {};
863
+ const localVarQueryParameter = {};
864
+ // authentication api_key required
865
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
866
+ // authentication oauth2 required
867
+ // oauth required
868
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
869
+ localVarHeaderParameter['Content-Type'] = 'application/json';
870
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
871
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
872
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
873
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateInstallmentRequestBody, localVarRequestOptions, configuration);
874
+ return {
875
+ url: toPathString(localVarUrlObj),
876
+ options: localVarRequestOptions,
877
+ };
878
+ }),
711
879
  };
712
880
  };
713
881
  /**
@@ -785,6 +953,20 @@ export const DealsApiFp = function (configuration) {
785
953
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
786
954
  });
787
955
  },
956
+ /**
957
+ * Removes an installment from a deal. Only available in Advanced and above plans.
958
+ * @summary Delete an installment from a deal
959
+ * @param {number} id The ID of the deal
960
+ * @param {number} installment_id The ID of the installment
961
+
962
+ * @throws {RequiredError}
963
+ */
964
+ deleteInstallment(id, installment_id) {
965
+ return __awaiter(this, void 0, void 0, function* () {
966
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstallment(id, installment_id);
967
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
968
+ });
969
+ },
788
970
  /**
789
971
  * Lists discounts attached to a deal.
790
972
  * @summary List discounts added to a deal
@@ -875,6 +1057,23 @@ export const DealsApiFp = function (configuration) {
875
1057
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
876
1058
  });
877
1059
  },
1060
+ /**
1061
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
1062
+ * @summary List installments added to a list of deals
1063
+ * @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.
1064
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
1065
+ * @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.
1066
+ * @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;.
1067
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1068
+
1069
+ * @throws {RequiredError}
1070
+ */
1071
+ getInstallments(deal_ids, cursor, limit, sort_by, sort_direction) {
1072
+ return __awaiter(this, void 0, void 0, function* () {
1073
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction);
1074
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1075
+ });
1076
+ },
878
1077
  /**
879
1078
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
880
1079
  * @summary Add a discount to a deal
@@ -889,6 +1088,20 @@ export const DealsApiFp = function (configuration) {
889
1088
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
890
1089
  });
891
1090
  },
1091
+ /**
1092
+ * 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.
1093
+ * @summary Add an installment to a deal
1094
+ * @param {number} id The ID of the deal
1095
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
1096
+
1097
+ * @throws {RequiredError}
1098
+ */
1099
+ postInstallment(id, AddInstallmentRequestBody) {
1100
+ return __awaiter(this, void 0, void 0, function* () {
1101
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody);
1102
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1103
+ });
1104
+ },
892
1105
  /**
893
1106
  * 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.
894
1107
  * @summary Search deals
@@ -954,6 +1167,21 @@ export const DealsApiFp = function (configuration) {
954
1167
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
955
1168
  });
956
1169
  },
1170
+ /**
1171
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1172
+ * @summary Update an installment added to a deal
1173
+ * @param {number} id The ID of the deal
1174
+ * @param {number} installment_id The ID of the installment
1175
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
1176
+
1177
+ * @throws {RequiredError}
1178
+ */
1179
+ updateInstallment(id, installment_id, UpdateInstallmentRequestBody) {
1180
+ return __awaiter(this, void 0, void 0, function* () {
1181
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody);
1182
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1183
+ });
1184
+ },
957
1185
  };
958
1186
  };
959
1187
  /**
@@ -1013,6 +1241,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
1013
1241
  deleteDealProduct(requestParameters) {
1014
1242
  return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(axios, basePath));
1015
1243
  },
1244
+ /**
1245
+ * Removes an installment from a deal. Only available in Advanced and above plans.
1246
+ * @summary Delete an installment from a deal
1247
+ * @param {DealsApiDeleteInstallmentRequest} requestParameters Request parameters.
1248
+
1249
+ * @throws {RequiredError}
1250
+ */
1251
+ deleteInstallment(requestParameters) {
1252
+ return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(axios, basePath));
1253
+ },
1016
1254
  /**
1017
1255
  * Lists discounts attached to a deal.
1018
1256
  * @summary List discounts added to a deal
@@ -1063,6 +1301,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
1063
1301
  getDealsProducts(requestParameters) {
1064
1302
  return localVarFp.getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
1065
1303
  },
1304
+ /**
1305
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
1306
+ * @summary List installments added to a list of deals
1307
+ * @param {DealsApiGetInstallmentsRequest} requestParameters Request parameters.
1308
+
1309
+ * @throws {RequiredError}
1310
+ */
1311
+ getInstallments(requestParameters) {
1312
+ return localVarFp.getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
1313
+ },
1066
1314
  /**
1067
1315
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
1068
1316
  * @summary Add a discount to a deal
@@ -1073,6 +1321,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
1073
1321
  postAdditionalDiscount(requestParameters) {
1074
1322
  return localVarFp.postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(axios, basePath));
1075
1323
  },
1324
+ /**
1325
+ * 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.
1326
+ * @summary Add an installment to a deal
1327
+ * @param {DealsApiPostInstallmentRequest} requestParameters Request parameters.
1328
+
1329
+ * @throws {RequiredError}
1330
+ */
1331
+ postInstallment(requestParameters) {
1332
+ return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(axios, basePath));
1333
+ },
1076
1334
  /**
1077
1335
  * 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.
1078
1336
  * @summary Search deals
@@ -1113,6 +1371,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
1113
1371
  updateDealProduct(requestParameters) {
1114
1372
  return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(axios, basePath));
1115
1373
  },
1374
+ /**
1375
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1376
+ * @summary Update an installment added to a deal
1377
+ * @param {DealsApiUpdateInstallmentRequest} requestParameters Request parameters.
1378
+
1379
+ * @throws {RequiredError}
1380
+ */
1381
+ updateInstallment(requestParameters) {
1382
+ return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(axios, basePath));
1383
+ },
1116
1384
  };
1117
1385
  };
1118
1386
  /**
@@ -1177,6 +1445,17 @@ export class DealsApi extends BaseAPI {
1177
1445
  deleteDealProduct(requestParameters) {
1178
1446
  return DealsApiFp(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(this.axios, this.basePath));
1179
1447
  }
1448
+ /**
1449
+ * Removes an installment from a deal. Only available in Advanced and above plans.
1450
+ * @summary Delete an installment from a deal
1451
+ * @param {DealsApiDeleteInstallmentRequest} requestParameters Request parameters.
1452
+
1453
+ * @throws {RequiredError}
1454
+ * @memberof DealsApi
1455
+ */
1456
+ deleteInstallment(requestParameters) {
1457
+ return DealsApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(this.axios, this.basePath));
1458
+ }
1180
1459
  /**
1181
1460
  * Lists discounts attached to a deal.
1182
1461
  * @summary List discounts added to a deal
@@ -1232,6 +1511,17 @@ export class DealsApi extends BaseAPI {
1232
1511
  getDealsProducts(requestParameters) {
1233
1512
  return DealsApiFp(this.configuration).getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
1234
1513
  }
1514
+ /**
1515
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
1516
+ * @summary List installments added to a list of deals
1517
+ * @param {DealsApiGetInstallmentsRequest} requestParameters Request parameters.
1518
+
1519
+ * @throws {RequiredError}
1520
+ * @memberof DealsApi
1521
+ */
1522
+ getInstallments(requestParameters) {
1523
+ return DealsApiFp(this.configuration).getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
1524
+ }
1235
1525
  /**
1236
1526
  * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
1237
1527
  * @summary Add a discount to a deal
@@ -1243,6 +1533,17 @@ export class DealsApi extends BaseAPI {
1243
1533
  postAdditionalDiscount(requestParameters) {
1244
1534
  return DealsApiFp(this.configuration).postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(this.axios, this.basePath));
1245
1535
  }
1536
+ /**
1537
+ * 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.
1538
+ * @summary Add an installment to a deal
1539
+ * @param {DealsApiPostInstallmentRequest} requestParameters Request parameters.
1540
+
1541
+ * @throws {RequiredError}
1542
+ * @memberof DealsApi
1543
+ */
1544
+ postInstallment(requestParameters) {
1545
+ return DealsApiFp(this.configuration).postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
1546
+ }
1246
1547
  /**
1247
1548
  * 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.
1248
1549
  * @summary Search deals
@@ -1287,4 +1588,15 @@ export class DealsApi extends BaseAPI {
1287
1588
  updateDealProduct(requestParameters) {
1288
1589
  return DealsApiFp(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(this.axios, this.basePath));
1289
1590
  }
1591
+ /**
1592
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
1593
+ * @summary Update an installment added to a deal
1594
+ * @param {DealsApiUpdateInstallmentRequest} requestParameters Request parameters.
1595
+
1596
+ * @throws {RequiredError}
1597
+ * @memberof DealsApi
1598
+ */
1599
+ updateInstallment(requestParameters) {
1600
+ return DealsApiFp(this.configuration).updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
1601
+ }
1290
1602
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { GetInstallmentsResponseDataInner } from './get-installments-response-data-inner';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AddAInstallmentResponse
17
+ */
18
+ export interface AddAInstallmentResponse {
19
+ /**
20
+ * If the response is successful or not
21
+ * @type {boolean}
22
+ */
23
+ 'success'?: boolean;
24
+ /**
25
+ *
26
+ * @type {GetInstallmentsResponseDataInner}
27
+ */
28
+ 'data'?: GetInstallmentsResponseDataInner;
29
+ }
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AddInstallmentRequestBody
16
+ */
17
+ export interface AddInstallmentRequestBody {
18
+ /**
19
+ * The name of the installment.
20
+ * @type {string}
21
+ */
22
+ 'description': string;
23
+ /**
24
+ * The installment amount. Must be a positive number (excluding 0).
25
+ * @type {number}
26
+ */
27
+ 'amount': number;
28
+ /**
29
+ * The date which the installment will be charged. Must be in the format YYYY-MM-DD.
30
+ * @type {string}
31
+ */
32
+ 'billing_date': string;
33
+ }
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface DeleteInstallmentResponseData
16
+ */
17
+ export interface DeleteInstallmentResponseData {
18
+ /**
19
+ * The ID of the installment that was deleted from the deal
20
+ * @type {number}
21
+ */
22
+ 'id'?: number;
23
+ }
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { DeleteInstallmentResponseData } from './delete-installment-response-data';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface DeleteInstallmentResponse
17
+ */
18
+ export interface DeleteInstallmentResponse {
19
+ /**
20
+ * If the response is successful or not
21
+ * @type {boolean}
22
+ */
23
+ 'success'?: boolean;
24
+ /**
25
+ *
26
+ * @type {DeleteInstallmentResponseData}
27
+ */
28
+ 'data'?: DeleteInstallmentResponseData;
29
+ }
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The additional data of the list
14
+ * @export
15
+ * @interface GetActivitiesResponseAllOfAdditionalData
16
+ */
17
+ export interface GetActivitiesResponseAllOfAdditionalData {
18
+ /**
19
+ * The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned.
20
+ * @type {string}
21
+ */
22
+ 'next_cursor'?: string;
23
+ }
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export {};
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { ActivityItem } from './activity-item';
13
+ import { GetActivitiesResponseAllOfAdditionalData } from './get-activities-response-all-of-additional-data';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -21,4 +22,9 @@ export interface GetActivitiesResponseAllOf {
21
22
  * @type {Array<ActivityItem>}
22
23
  */
23
24
  'data'?: Array<ActivityItem>;
25
+ /**
26
+ *
27
+ * @type {GetActivitiesResponseAllOfAdditionalData}
28
+ */
29
+ 'additional_data'?: GetActivitiesResponseAllOfAdditionalData;
24
30
  }