pipedrive 29.0.0 → 29.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 (85) hide show
  1. package/dist/esm/versions/v1/models/add-deal-product-request-all-of.d.ts +1 -1
  2. package/dist/esm/versions/v1/models/add-deal-product-request-all-of1.d.ts +1 -1
  3. package/dist/esm/versions/v1/models/add-deal-product-request-all-of2.d.ts +1 -1
  4. package/dist/esm/versions/v1/models/add-or-update-role-setting-request.d.ts +1 -1
  5. package/dist/esm/versions/v1/models/add-product-request-all-of1.d.ts +1 -1
  6. package/dist/esm/versions/v1/models/add-product-request-all-of2.d.ts +1 -1
  7. package/dist/esm/versions/v1/models/add-webhook-request.d.ts +7 -2
  8. package/dist/esm/versions/v1/models/base-deal.d.ts +6 -6
  9. package/dist/esm/versions/v1/models/base-product.d.ts +2 -2
  10. package/dist/esm/versions/v1/models/base-webhook.d.ts +10 -5
  11. package/dist/esm/versions/v1/models/update-deal-product-request-all-of.d.ts +1 -1
  12. package/dist/esm/versions/v1/models/update-product-request-all-of1.d.ts +1 -1
  13. package/dist/esm/versions/v2/api/beta-api.d.ts +220 -16
  14. package/dist/esm/versions/v2/api/beta-api.js +308 -16
  15. package/dist/esm/versions/v2/api/deals-api.d.ts +16 -16
  16. package/dist/esm/versions/v2/api/deals-api.js +16 -16
  17. package/dist/esm/versions/v2/api/products-api.d.ts +204 -0
  18. package/dist/esm/versions/v2/api/products-api.js +292 -0
  19. package/dist/esm/versions/v2/models/add-product-image-response.d.ts +29 -0
  20. package/dist/esm/versions/v2/models/add-product-image-response.js +14 -0
  21. package/dist/esm/versions/v2/models/base-product-all-of1.d.ts +1 -1
  22. package/dist/esm/versions/v2/models/deal-item.d.ts +3 -3
  23. package/dist/esm/versions/v2/models/deal-item1.d.ts +3 -3
  24. package/dist/esm/versions/v2/models/delete-product-image-response-data.d.ts +23 -0
  25. package/dist/esm/versions/v2/models/delete-product-image-response-data.js +14 -0
  26. package/dist/esm/versions/v2/models/delete-product-image-response.d.ts +29 -0
  27. package/dist/esm/versions/v2/models/delete-product-image-response.js +14 -0
  28. package/dist/esm/versions/v2/models/get-deals-products-response-data-inner-all-of1.d.ts +1 -1
  29. package/dist/esm/versions/v2/models/get-deals-products-response-data-inner-all-of2.d.ts +1 -1
  30. package/dist/esm/versions/v2/models/get-deals-products-response-data-inner-all-of3.d.ts +1 -1
  31. package/dist/esm/versions/v2/models/get-product-image-response-data.d.ts +53 -0
  32. package/dist/esm/versions/v2/models/get-product-image-response-data.js +14 -0
  33. package/dist/esm/versions/v2/models/get-product-image-response.d.ts +29 -0
  34. package/dist/esm/versions/v2/models/get-product-image-response.js +14 -0
  35. package/dist/esm/versions/v2/models/index.d.ts +7 -0
  36. package/dist/esm/versions/v2/models/index.js +7 -0
  37. package/dist/esm/versions/v2/models/update-deal-product-request-all-of.d.ts +1 -1
  38. package/dist/esm/versions/v2/models/update-product-image-response-data.d.ts +38 -0
  39. package/dist/esm/versions/v2/models/update-product-image-response-data.js +14 -0
  40. package/dist/esm/versions/v2/models/update-product-image-response.d.ts +29 -0
  41. package/dist/esm/versions/v2/models/update-product-image-response.js +14 -0
  42. package/dist/esm/versions/v2/models/update-product-request-all-of1.d.ts +1 -1
  43. package/dist/versions/v1/models/add-deal-product-request-all-of.d.ts +1 -1
  44. package/dist/versions/v1/models/add-deal-product-request-all-of1.d.ts +1 -1
  45. package/dist/versions/v1/models/add-deal-product-request-all-of2.d.ts +1 -1
  46. package/dist/versions/v1/models/add-or-update-role-setting-request.d.ts +1 -1
  47. package/dist/versions/v1/models/add-product-request-all-of1.d.ts +1 -1
  48. package/dist/versions/v1/models/add-product-request-all-of2.d.ts +1 -1
  49. package/dist/versions/v1/models/add-webhook-request.d.ts +7 -2
  50. package/dist/versions/v1/models/base-deal.d.ts +6 -6
  51. package/dist/versions/v1/models/base-product.d.ts +2 -2
  52. package/dist/versions/v1/models/base-webhook.d.ts +10 -5
  53. package/dist/versions/v1/models/update-deal-product-request-all-of.d.ts +1 -1
  54. package/dist/versions/v1/models/update-product-request-all-of1.d.ts +1 -1
  55. package/dist/versions/v2/api/beta-api.d.ts +220 -16
  56. package/dist/versions/v2/api/beta-api.js +308 -16
  57. package/dist/versions/v2/api/deals-api.d.ts +16 -16
  58. package/dist/versions/v2/api/deals-api.js +16 -16
  59. package/dist/versions/v2/api/products-api.d.ts +204 -0
  60. package/dist/versions/v2/api/products-api.js +292 -0
  61. package/dist/versions/v2/models/add-product-image-response.d.ts +29 -0
  62. package/dist/versions/v2/models/add-product-image-response.js +15 -0
  63. package/dist/versions/v2/models/base-product-all-of1.d.ts +1 -1
  64. package/dist/versions/v2/models/deal-item.d.ts +3 -3
  65. package/dist/versions/v2/models/deal-item1.d.ts +3 -3
  66. package/dist/versions/v2/models/delete-product-image-response-data.d.ts +23 -0
  67. package/dist/versions/v2/models/delete-product-image-response-data.js +15 -0
  68. package/dist/versions/v2/models/delete-product-image-response.d.ts +29 -0
  69. package/dist/versions/v2/models/delete-product-image-response.js +15 -0
  70. package/dist/versions/v2/models/get-deals-products-response-data-inner-all-of1.d.ts +1 -1
  71. package/dist/versions/v2/models/get-deals-products-response-data-inner-all-of2.d.ts +1 -1
  72. package/dist/versions/v2/models/get-deals-products-response-data-inner-all-of3.d.ts +1 -1
  73. package/dist/versions/v2/models/get-product-image-response-data.d.ts +53 -0
  74. package/dist/versions/v2/models/get-product-image-response-data.js +15 -0
  75. package/dist/versions/v2/models/get-product-image-response.d.ts +29 -0
  76. package/dist/versions/v2/models/get-product-image-response.js +15 -0
  77. package/dist/versions/v2/models/index.d.ts +7 -0
  78. package/dist/versions/v2/models/index.js +7 -0
  79. package/dist/versions/v2/models/update-deal-product-request-all-of.d.ts +1 -1
  80. package/dist/versions/v2/models/update-product-image-response-data.d.ts +38 -0
  81. package/dist/versions/v2/models/update-product-image-response-data.js +15 -0
  82. package/dist/versions/v2/models/update-product-image-response.d.ts +29 -0
  83. package/dist/versions/v2/models/update-product-image-response.js +15 -0
  84. package/dist/versions/v2/models/update-product-request-all-of1.d.ts +1 -1
  85. package/package.json +1 -1
@@ -217,6 +217,40 @@ const ProductsApiAxiosParamCreator = function (configuration) {
217
217
  options: localVarRequestOptions,
218
218
  };
219
219
  }),
220
+ /**
221
+ * Deletes the image of a product.
222
+ * @summary Delete an image of a product
223
+ * @param {number} id The ID of the product
224
+
225
+ * @throws {RequiredError}
226
+ */
227
+ deleteProductImage: (id) => __awaiter(this, void 0, void 0, function* () {
228
+ // verify required parameter 'id' is not null or undefined
229
+ (0, common_1.assertParamExists)('deleteProductImage', 'id', id);
230
+ const localVarPath = `/products/{id}/images`
231
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
232
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
233
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
234
+ let baseOptions;
235
+ if (configuration) {
236
+ baseOptions = configuration.baseOptions;
237
+ }
238
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
239
+ const localVarHeaderParameter = {};
240
+ const localVarQueryParameter = {};
241
+ // authentication api_key required
242
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-token", configuration);
243
+ // authentication oauth2 required
244
+ // oauth required
245
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:full"], configuration);
246
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
249
+ return {
250
+ url: (0, common_1.toPathString)(localVarUrlObj),
251
+ options: localVarRequestOptions,
252
+ };
253
+ }),
220
254
  /**
221
255
  * Deletes a product variation.
222
256
  * @summary Delete a product variation
@@ -373,6 +407,40 @@ const ProductsApiAxiosParamCreator = function (configuration) {
373
407
  options: localVarRequestOptions,
374
408
  };
375
409
  }),
410
+ /**
411
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
412
+ * @summary Get image of a product
413
+ * @param {number} id The ID of the product
414
+
415
+ * @throws {RequiredError}
416
+ */
417
+ getProductImage: (id) => __awaiter(this, void 0, void 0, function* () {
418
+ // verify required parameter 'id' is not null or undefined
419
+ (0, common_1.assertParamExists)('getProductImage', 'id', id);
420
+ const localVarPath = `/products/{id}/images`
421
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
422
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
423
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
424
+ let baseOptions;
425
+ if (configuration) {
426
+ baseOptions = configuration.baseOptions;
427
+ }
428
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
429
+ const localVarHeaderParameter = {};
430
+ const localVarQueryParameter = {};
431
+ // authentication api_key required
432
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-token", configuration);
433
+ // authentication oauth2 required
434
+ // oauth required
435
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration);
436
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
437
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
438
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
439
+ return {
440
+ url: (0, common_1.toPathString)(localVarUrlObj),
441
+ options: localVarRequestOptions,
442
+ };
443
+ }),
376
444
  /**
377
445
  * Returns data about all product variations.
378
446
  * @summary Get all product variations
@@ -570,6 +638,49 @@ const ProductsApiAxiosParamCreator = function (configuration) {
570
638
  options: localVarRequestOptions,
571
639
  };
572
640
  }),
641
+ /**
642
+ * Updates the image of a product.
643
+ * @summary Update an image for a product
644
+ * @param {number} id The ID of the product
645
+ * @param {File} data One image supplied in the multipart/form-data encoding
646
+
647
+ * @throws {RequiredError}
648
+ */
649
+ updateProductImage: (id, data) => __awaiter(this, void 0, void 0, function* () {
650
+ // verify required parameter 'id' is not null or undefined
651
+ (0, common_1.assertParamExists)('updateProductImage', 'id', id);
652
+ // verify required parameter 'data' is not null or undefined
653
+ (0, common_1.assertParamExists)('updateProductImage', 'data', data);
654
+ const localVarPath = `/products/{id}/images`
655
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
656
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
657
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
658
+ let baseOptions;
659
+ if (configuration) {
660
+ baseOptions = configuration.baseOptions;
661
+ }
662
+ const localVarRequestOptions = Object.assign({ method: 'PUT' }, baseOptions);
663
+ const localVarHeaderParameter = {};
664
+ const localVarQueryParameter = {};
665
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
666
+ // authentication api_key required
667
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-token", configuration);
668
+ // authentication oauth2 required
669
+ // oauth required
670
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:full"], configuration);
671
+ if (data !== undefined) {
672
+ localVarFormParams.append('data', data);
673
+ }
674
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
675
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
676
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
677
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
678
+ localVarRequestOptions.data = localVarFormParams;
679
+ return {
680
+ url: (0, common_1.toPathString)(localVarUrlObj),
681
+ options: localVarRequestOptions,
682
+ };
683
+ }),
573
684
  /**
574
685
  * Updates product variation data.
575
686
  * @summary Update a product variation
@@ -611,6 +722,49 @@ const ProductsApiAxiosParamCreator = function (configuration) {
611
722
  options: localVarRequestOptions,
612
723
  };
613
724
  }),
725
+ /**
726
+ * Uploads an image for a product.
727
+ * @summary Upload an image for a product
728
+ * @param {number} id The ID of the product
729
+ * @param {File} data One image supplied in the multipart/form-data encoding
730
+
731
+ * @throws {RequiredError}
732
+ */
733
+ uploadProductImage: (id, data) => __awaiter(this, void 0, void 0, function* () {
734
+ // verify required parameter 'id' is not null or undefined
735
+ (0, common_1.assertParamExists)('uploadProductImage', 'id', id);
736
+ // verify required parameter 'data' is not null or undefined
737
+ (0, common_1.assertParamExists)('uploadProductImage', 'data', data);
738
+ const localVarPath = `/products/{id}/images`
739
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
740
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
741
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
742
+ let baseOptions;
743
+ if (configuration) {
744
+ baseOptions = configuration.baseOptions;
745
+ }
746
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
747
+ const localVarHeaderParameter = {};
748
+ const localVarQueryParameter = {};
749
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
750
+ // authentication api_key required
751
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-token", configuration);
752
+ // authentication oauth2 required
753
+ // oauth required
754
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:full"], configuration);
755
+ if (data !== undefined) {
756
+ localVarFormParams.append('data', data);
757
+ }
758
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
759
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
760
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
761
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
762
+ localVarRequestOptions.data = localVarFormParams;
763
+ return {
764
+ url: (0, common_1.toPathString)(localVarUrlObj),
765
+ options: localVarRequestOptions,
766
+ };
767
+ }),
614
768
  };
615
769
  };
616
770
  exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
@@ -689,6 +843,19 @@ const ProductsApiFp = function (configuration) {
689
843
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
690
844
  });
691
845
  },
846
+ /**
847
+ * Deletes the image of a product.
848
+ * @summary Delete an image of a product
849
+ * @param {number} id The ID of the product
850
+
851
+ * @throws {RequiredError}
852
+ */
853
+ deleteProductImage(id) {
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteProductImage(id);
856
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
857
+ });
858
+ },
692
859
  /**
693
860
  * Deletes a product variation.
694
861
  * @summary Delete a product variation
@@ -746,6 +913,19 @@ const ProductsApiFp = function (configuration) {
746
913
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
747
914
  });
748
915
  },
916
+ /**
917
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
918
+ * @summary Get image of a product
919
+ * @param {number} id The ID of the product
920
+
921
+ * @throws {RequiredError}
922
+ */
923
+ getProductImage(id) {
924
+ return __awaiter(this, void 0, void 0, function* () {
925
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getProductImage(id);
926
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
927
+ });
928
+ },
749
929
  /**
750
930
  * Returns data about all product variations.
751
931
  * @summary Get all product variations
@@ -813,6 +993,20 @@ const ProductsApiFp = function (configuration) {
813
993
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
814
994
  });
815
995
  },
996
+ /**
997
+ * Updates the image of a product.
998
+ * @summary Update an image for a product
999
+ * @param {number} id The ID of the product
1000
+ * @param {File} data One image supplied in the multipart/form-data encoding
1001
+
1002
+ * @throws {RequiredError}
1003
+ */
1004
+ updateProductImage(id, data) {
1005
+ return __awaiter(this, void 0, void 0, function* () {
1006
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateProductImage(id, data);
1007
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1008
+ });
1009
+ },
816
1010
  /**
817
1011
  * Updates product variation data.
818
1012
  * @summary Update a product variation
@@ -828,6 +1022,20 @@ const ProductsApiFp = function (configuration) {
828
1022
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
829
1023
  });
830
1024
  },
1025
+ /**
1026
+ * Uploads an image for a product.
1027
+ * @summary Upload an image for a product
1028
+ * @param {number} id The ID of the product
1029
+ * @param {File} data One image supplied in the multipart/form-data encoding
1030
+
1031
+ * @throws {RequiredError}
1032
+ */
1033
+ uploadProductImage(id, data) {
1034
+ return __awaiter(this, void 0, void 0, function* () {
1035
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadProductImage(id, data);
1036
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1037
+ });
1038
+ },
831
1039
  };
832
1040
  };
833
1041
  exports.ProductsApiFp = ProductsApiFp;
@@ -888,6 +1096,16 @@ const ProductsApiFactory = function (configuration, basePath, axios) {
888
1096
  deleteProductFollower(requestParameters) {
889
1097
  return localVarFp.deleteProductFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(axios, basePath));
890
1098
  },
1099
+ /**
1100
+ * Deletes the image of a product.
1101
+ * @summary Delete an image of a product
1102
+ * @param {ProductsApiDeleteProductImageRequest} requestParameters Request parameters.
1103
+
1104
+ * @throws {RequiredError}
1105
+ */
1106
+ deleteProductImage(requestParameters) {
1107
+ return localVarFp.deleteProductImage(requestParameters.id).then((request) => request(axios, basePath));
1108
+ },
891
1109
  /**
892
1110
  * Deletes a product variation.
893
1111
  * @summary Delete a product variation
@@ -928,6 +1146,16 @@ const ProductsApiFactory = function (configuration, basePath, axios) {
928
1146
  getProductFollowersChangelog(requestParameters) {
929
1147
  return localVarFp.getProductFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
930
1148
  },
1149
+ /**
1150
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
1151
+ * @summary Get image of a product
1152
+ * @param {ProductsApiGetProductImageRequest} requestParameters Request parameters.
1153
+
1154
+ * @throws {RequiredError}
1155
+ */
1156
+ getProductImage(requestParameters) {
1157
+ return localVarFp.getProductImage(requestParameters.id).then((request) => request(axios, basePath));
1158
+ },
931
1159
  /**
932
1160
  * Returns data about all product variations.
933
1161
  * @summary Get all product variations
@@ -968,6 +1196,16 @@ const ProductsApiFactory = function (configuration, basePath, axios) {
968
1196
  updateProduct(requestParameters) {
969
1197
  return localVarFp.updateProduct(requestParameters.id, requestParameters.UpdateProductRequest).then((request) => request(axios, basePath));
970
1198
  },
1199
+ /**
1200
+ * Updates the image of a product.
1201
+ * @summary Update an image for a product
1202
+ * @param {ProductsApiUpdateProductImageRequest} requestParameters Request parameters.
1203
+
1204
+ * @throws {RequiredError}
1205
+ */
1206
+ updateProductImage(requestParameters) {
1207
+ return localVarFp.updateProductImage(requestParameters.id, requestParameters.data).then((request) => request(axios, basePath));
1208
+ },
971
1209
  /**
972
1210
  * Updates product variation data.
973
1211
  * @summary Update a product variation
@@ -978,6 +1216,16 @@ const ProductsApiFactory = function (configuration, basePath, axios) {
978
1216
  updateProductVariation(requestParameters) {
979
1217
  return localVarFp.updateProductVariation(requestParameters.id, requestParameters.product_variation_id, requestParameters.UpdateProductVariationRequest).then((request) => request(axios, basePath));
980
1218
  },
1219
+ /**
1220
+ * Uploads an image for a product.
1221
+ * @summary Upload an image for a product
1222
+ * @param {ProductsApiUploadProductImageRequest} requestParameters Request parameters.
1223
+
1224
+ * @throws {RequiredError}
1225
+ */
1226
+ uploadProductImage(requestParameters) {
1227
+ return localVarFp.uploadProductImage(requestParameters.id, requestParameters.data).then((request) => request(axios, basePath));
1228
+ },
981
1229
  };
982
1230
  };
983
1231
  exports.ProductsApiFactory = ProductsApiFactory;
@@ -1043,6 +1291,17 @@ class ProductsApi extends base_1.BaseAPI {
1043
1291
  deleteProductFollower(requestParameters) {
1044
1292
  return (0, exports.ProductsApiFp)(this.configuration).deleteProductFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(this.axios, this.basePath));
1045
1293
  }
1294
+ /**
1295
+ * Deletes the image of a product.
1296
+ * @summary Delete an image of a product
1297
+ * @param {ProductsApiDeleteProductImageRequest} requestParameters Request parameters.
1298
+
1299
+ * @throws {RequiredError}
1300
+ * @memberof ProductsApi
1301
+ */
1302
+ deleteProductImage(requestParameters) {
1303
+ return (0, exports.ProductsApiFp)(this.configuration).deleteProductImage(requestParameters.id).then((request) => request(this.axios, this.basePath));
1304
+ }
1046
1305
  /**
1047
1306
  * Deletes a product variation.
1048
1307
  * @summary Delete a product variation
@@ -1087,6 +1346,17 @@ class ProductsApi extends base_1.BaseAPI {
1087
1346
  getProductFollowersChangelog(requestParameters) {
1088
1347
  return (0, exports.ProductsApiFp)(this.configuration).getProductFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
1089
1348
  }
1349
+ /**
1350
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
1351
+ * @summary Get image of a product
1352
+ * @param {ProductsApiGetProductImageRequest} requestParameters Request parameters.
1353
+
1354
+ * @throws {RequiredError}
1355
+ * @memberof ProductsApi
1356
+ */
1357
+ getProductImage(requestParameters) {
1358
+ return (0, exports.ProductsApiFp)(this.configuration).getProductImage(requestParameters.id).then((request) => request(this.axios, this.basePath));
1359
+ }
1090
1360
  /**
1091
1361
  * Returns data about all product variations.
1092
1362
  * @summary Get all product variations
@@ -1131,6 +1401,17 @@ class ProductsApi extends base_1.BaseAPI {
1131
1401
  updateProduct(requestParameters) {
1132
1402
  return (0, exports.ProductsApiFp)(this.configuration).updateProduct(requestParameters.id, requestParameters.UpdateProductRequest).then((request) => request(this.axios, this.basePath));
1133
1403
  }
1404
+ /**
1405
+ * Updates the image of a product.
1406
+ * @summary Update an image for a product
1407
+ * @param {ProductsApiUpdateProductImageRequest} requestParameters Request parameters.
1408
+
1409
+ * @throws {RequiredError}
1410
+ * @memberof ProductsApi
1411
+ */
1412
+ updateProductImage(requestParameters) {
1413
+ return (0, exports.ProductsApiFp)(this.configuration).updateProductImage(requestParameters.id, requestParameters.data).then((request) => request(this.axios, this.basePath));
1414
+ }
1134
1415
  /**
1135
1416
  * Updates product variation data.
1136
1417
  * @summary Update a product variation
@@ -1142,5 +1423,16 @@ class ProductsApi extends base_1.BaseAPI {
1142
1423
  updateProductVariation(requestParameters) {
1143
1424
  return (0, exports.ProductsApiFp)(this.configuration).updateProductVariation(requestParameters.id, requestParameters.product_variation_id, requestParameters.UpdateProductVariationRequest).then((request) => request(this.axios, this.basePath));
1144
1425
  }
1426
+ /**
1427
+ * Uploads an image for a product.
1428
+ * @summary Upload an image for a product
1429
+ * @param {ProductsApiUploadProductImageRequest} requestParameters Request parameters.
1430
+
1431
+ * @throws {RequiredError}
1432
+ * @memberof ProductsApi
1433
+ */
1434
+ uploadProductImage(requestParameters) {
1435
+ return (0, exports.ProductsApiFp)(this.configuration).uploadProductImage(requestParameters.id, requestParameters.data).then((request) => request(this.axios, this.basePath));
1436
+ }
1145
1437
  }
1146
1438
  exports.ProductsApi = ProductsApi;
@@ -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 { UpdateProductImageResponseData } from './update-product-image-response-data';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AddProductImageResponse
17
+ */
18
+ export interface AddProductImageResponse {
19
+ /**
20
+ * If the response is successful or not
21
+ * @type {boolean}
22
+ */
23
+ 'success'?: boolean;
24
+ /**
25
+ *
26
+ * @type {UpdateProductImageResponseData}
27
+ */
28
+ 'data'?: UpdateProductImageResponseData;
29
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pipedrive API v2
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface BaseProductAllOf1 {
18
18
  /**
19
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product
19
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product
20
20
  * @type {string}
21
21
  */
22
22
  'billing_frequency'?: BaseProductAllOf1BillingFrequencyConst;
@@ -152,17 +152,17 @@ export interface DealItem {
152
152
  */
153
153
  'channel_id'?: string | null;
154
154
  /**
155
- * Only available in Advanced and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
155
+ * Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
156
156
  * @type {number}
157
157
  */
158
158
  'arr'?: number | null;
159
159
  /**
160
- * Only available in Advanced and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
160
+ * Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
161
161
  * @type {number}
162
162
  */
163
163
  'mrr'?: number | null;
164
164
  /**
165
- * Only available in Advanced and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
165
+ * Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
166
166
  * @type {number}
167
167
  */
168
168
  'acv'?: number | null;
@@ -152,17 +152,17 @@ export interface DealItem1 {
152
152
  */
153
153
  'channel_id'?: string | null;
154
154
  /**
155
- * Only available in Advanced and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
155
+ * Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
156
156
  * @type {number}
157
157
  */
158
158
  'arr'?: number | null;
159
159
  /**
160
- * Only available in Advanced and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
160
+ * Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
161
161
  * @type {number}
162
162
  */
163
163
  'mrr'?: number | null;
164
164
  /**
165
- * Only available in Advanced and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
165
+ * Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
166
166
  * @type {number}
167
167
  */
168
168
  'acv'?: number | null;
@@ -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 DeleteProductImageResponseData
16
+ */
17
+ export interface DeleteProductImageResponseData {
18
+ /**
19
+ * The ID of the image that was deleted from the product.
20
+ * @type {number}
21
+ */
22
+ 'id'?: number;
23
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pipedrive API v2
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 { DeleteProductImageResponseData } from './delete-product-image-response-data';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface DeleteProductImageResponse
17
+ */
18
+ export interface DeleteProductImageResponse {
19
+ /**
20
+ * If the response is successful or not
21
+ * @type {boolean}
22
+ */
23
+ 'success'?: boolean;
24
+ /**
25
+ *
26
+ * @type {DeleteProductImageResponseData}
27
+ */
28
+ 'data'?: DeleteProductImageResponseData;
29
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pipedrive API v2
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface GetDealsProductsResponseDataInnerAllOf1 {
18
18
  /**
19
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time`
19
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time`
20
20
  * @type {string}
21
21
  */
22
22
  'billing_frequency'?: GetDealsProductsResponseDataInnerAllOf1BillingFrequencyConst;
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface GetDealsProductsResponseDataInnerAllOf2 {
18
18
  /**
19
- * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208
19
+ * Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208
20
20
  * @type {number}
21
21
  */
22
22
  'billing_frequency_cycles'?: number | null;
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface GetDealsProductsResponseDataInnerAllOf3 {
18
18
  /**
19
- * Only available in Advanced and above plans The billing start date. Must be between 10 years in the past and 10 years in the future
19
+ * Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future
20
20
  * @type {string}
21
21
  */
22
22
  'billing_start_date'?: string | null;
@@ -0,0 +1,53 @@
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 product image data and the respective public URL
14
+ * @export
15
+ * @interface GetProductImageResponseData
16
+ */
17
+ export interface GetProductImageResponseData {
18
+ /**
19
+ * The ID of the product image
20
+ * @type {number}
21
+ */
22
+ 'id'?: number;
23
+ /**
24
+ * The ID of the product associated
25
+ * @type {number}
26
+ */
27
+ 'product_id'?: number;
28
+ /**
29
+ * The ID of the company
30
+ * @type {string}
31
+ */
32
+ 'company_id'?: string;
33
+ /**
34
+ * The public URL of the product image
35
+ * @type {string}
36
+ */
37
+ 'public_url'?: string;
38
+ /**
39
+ * The date of image upload.
40
+ * @type {string}
41
+ */
42
+ 'add_time'?: string;
43
+ /**
44
+ * The MIME type of the product image
45
+ * @type {string}
46
+ */
47
+ 'mime_type'?: string;
48
+ /**
49
+ * The name of the product image file
50
+ * @type {string}
51
+ */
52
+ 'name'?: string;
53
+ }