diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac194e14..902786e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,12 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
## [Unreleased]
+### Added
+- Add documentation for product images functionality:
+ - `GET` `/api/v2/products/{id}/images` endpoint
+ - `POST` `/api/v2/products/{id}/images` endpoint
+ - `PUT` `/api/v2/products/{id}/images` endpoint
+ - `DELETE` `/api/v2/products/{id}/images` endpoint
## [29.0.0] - 2025-09-03
### Removed
diff --git a/docs/v2.md b/docs/v2.md
index 392d8e0b..8aeb2ead 100644
--- a/docs/v2.md
+++ b/docs/v2.md
@@ -12,11 +12,15 @@ ActivitiesApi | updateActivity | **PATCH** /activities/{id} | Update an activity
BetaApi | convertDealToLead | **POST** /deals/{id}/convert/lead | Convert a deal to a lead (BETA)
BetaApi | convertLeadToDeal | **POST** /leads/{id}/convert/deal | Convert a lead to a deal (BETA)
BetaApi | deleteInstallment | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal
+BetaApi | deleteProductImage | **DELETE** /products/{id}/images | Delete an image of a product
BetaApi | getDealConversionStatus | **GET** /deals/{id}/convert/status/{conversion_id} | Get Deal conversion status (BETA)
BetaApi | getInstallments | **GET** /deals/installments | List installments added to a list of deals
BetaApi | getLeadConversionStatus | **GET** /leads/{id}/convert/status/{conversion_id} | Get Lead conversion status (BETA)
+BetaApi | getProductImage | **GET** /products/{id}/images | Get image of a product
BetaApi | postInstallment | **POST** /deals/{id}/installments | Add an installment to a deal
BetaApi | updateInstallment | **PATCH** /deals/{id}/installments/{installment_id} | Update an installment added to a deal
+BetaApi | updateProductImage | **PUT** /products/{id}/images | Update an image for a product
+BetaApi | uploadProductImage | **POST** /products/{id}/images | Upload an image for a product
DealsApi | addDeal | **POST** /deals | Add a new deal
DealsApi | addDealFollower | **POST** /deals/{id}/followers | Add a follower to a deal
DealsApi | addDealProduct | **POST** /deals/{id}/products | Add a product to a deal
@@ -78,15 +82,19 @@ ProductsApi | addProductFollower | **POST** /products/{id}/followers | Add a fol
ProductsApi | addProductVariation | **POST** /products/{id}/variations | Add a product variation
ProductsApi | deleteProduct | **DELETE** /products/{id} | Delete a product
ProductsApi | deleteProductFollower | **DELETE** /products/{id}/followers/{follower_id} | Delete a follower from a product
+ProductsApi | deleteProductImage | **DELETE** /products/{id}/images | Delete an image of a product
ProductsApi | deleteProductVariation | **DELETE** /products/{id}/variations/{product_variation_id} | Delete a product variation
ProductsApi | getProduct | **GET** /products/{id} | Get one product
ProductsApi | getProductFollowers | **GET** /products/{id}/followers | List followers of a product
ProductsApi | getProductFollowersChangelog | **GET** /products/{id}/followers/changelog | List followers changelog of a product
+ProductsApi | getProductImage | **GET** /products/{id}/images | Get image of a product
ProductsApi | getProductVariations | **GET** /products/{id}/variations | Get all product variations
ProductsApi | getProducts | **GET** /products | Get all products
ProductsApi | searchProducts | **GET** /products/search | Search products
ProductsApi | updateProduct | **PATCH** /products/{id} | Update a product
+ProductsApi | updateProductImage | **PUT** /products/{id}/images | Update an image for a product
ProductsApi | updateProductVariation | **PATCH** /products/{id}/variations/{product_variation_id} | Update a product variation
+ProductsApi | uploadProductImage | **POST** /products/{id}/images | Upload an image for a product
StagesApi | addStage | **POST** /stages | Add a new stage
StagesApi | deleteStage | **DELETE** /stages/{id} | Delete a stage
StagesApi | getStage | **GET** /stages/{id} | Get one stage
diff --git a/src/versions/v1/models/add-deal-product-request-all-of.ts b/src/versions/v1/models/add-deal-product-request-all-of.ts
index cf0c9832..4d708499 100644
--- a/src/versions/v1/models/add-deal-product-request-all-of.ts
+++ b/src/versions/v1/models/add-deal-product-request-all-of.ts
@@ -21,7 +21,7 @@
*/
export interface AddDealProductRequestAllOf {
/**
- * 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`
+ * 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`
* @type {string}
*/
'billing_frequency'?: AddDealProductRequestAllOfBillingFrequencyConst;
diff --git a/src/versions/v1/models/add-deal-product-request-all-of1.ts b/src/versions/v1/models/add-deal-product-request-all-of1.ts
index 8ccc5327..8e9eef85 100644
--- a/src/versions/v1/models/add-deal-product-request-all-of1.ts
+++ b/src/versions/v1/models/add-deal-product-request-all-of1.ts
@@ -21,7 +21,7 @@
*/
export interface AddDealProductRequestAllOf1 {
/**
- * 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
+ * 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
* @type {number}
*/
'billing_frequency_cycles'?: number | null;
diff --git a/src/versions/v1/models/add-deal-product-request-all-of2.ts b/src/versions/v1/models/add-deal-product-request-all-of2.ts
index 1a52d478..9326a291 100644
--- a/src/versions/v1/models/add-deal-product-request-all-of2.ts
+++ b/src/versions/v1/models/add-deal-product-request-all-of2.ts
@@ -21,7 +21,7 @@
*/
export interface AddDealProductRequestAllOf2 {
/**
- * 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
+ * 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
* @type {string}
*/
'billing_start_date'?: string | null;
diff --git a/src/versions/v1/models/add-or-update-role-setting-request.ts b/src/versions/v1/models/add-or-update-role-setting-request.ts
index 7ee121be..32847bb0 100644
--- a/src/versions/v1/models/add-or-update-role-setting-request.ts
+++ b/src/versions/v1/models/add-or-update-role-setting-request.ts
@@ -26,7 +26,7 @@ export interface AddOrUpdateRoleSettingRequest {
*/
'setting_key': AddOrUpdateRoleSettingRequestSettingKeyConst;
/**
- * Possible values for the `default_visibility` setting depending on the subscription plan:
Essential / Advanced plan Value | Description |
`1` | Owner & Followers |
`3` | Entire company |
Professional / Enterprise plan Value | Description |
`1` | Owner only |
`3` | Owner's visibility group |
`5` | Owner's visibility group and sub-groups |
`7` | Entire company |
Read more about visibility groups here.
+ * Possible values for the `default_visibility` setting depending on the subscription plan:
Light / Growth and Professional plans Value | Description |
`1` | Owner & Followers |
`3` | Entire company |
Premium / Ultimate plan Value | Description |
`1` | Owner only |
`3` | Owner's visibility group |
`5` | Owner's visibility group and sub-groups |
`7` | Entire company |
Read more about visibility groups here.
* @type {number}
*/
'value': AddOrUpdateRoleSettingRequestValueConst;
diff --git a/src/versions/v1/models/add-product-request-all-of1.ts b/src/versions/v1/models/add-product-request-all-of1.ts
index 5fa026ed..28e2b7b3 100644
--- a/src/versions/v1/models/add-product-request-all-of1.ts
+++ b/src/versions/v1/models/add-product-request-all-of1.ts
@@ -21,7 +21,7 @@
*/
export interface AddProductRequestAllOf1 {
/**
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product
* @type {string}
*/
'billing_frequency'?: AddProductRequestAllOf1BillingFrequencyConst;
diff --git a/src/versions/v1/models/add-product-request-all-of2.ts b/src/versions/v1/models/add-product-request-all-of2.ts
index 3aa33281..646d9ce6 100644
--- a/src/versions/v1/models/add-product-request-all-of2.ts
+++ b/src/versions/v1/models/add-product-request-all-of2.ts
@@ -21,7 +21,7 @@
*/
export interface AddProductRequestAllOf2 {
/**
- * 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` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208
+ * 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` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208
* @type {number}
*/
'billing_frequency_cycles'?: number | null;
diff --git a/src/versions/v1/models/base-deal.ts b/src/versions/v1/models/base-deal.ts
index 60c37cfb..4e459606 100644
--- a/src/versions/v1/models/base-deal.ts
+++ b/src/versions/v1/models/base-deal.ts
@@ -306,32 +306,32 @@ export interface BaseDeal {
*/
'channel_id'?: string | null;
/**
- * Only available in Advanced and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
* @type {number}
*/
'arr'?: number | null;
/**
- * Only available in Advanced and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
* @type {number}
*/
'mrr'?: number | null;
/**
- * Only available in Advanced and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
* @type {number}
*/
'acv'?: number | null;
/**
- * Only available in Advanced and above plans The Currency for Annual Recurring Revenue of the deal If the `arr` is null, this will also be null
+ * Only available in Growth and above plans The Currency for Annual Recurring Revenue of the deal If the `arr` is null, this will also be null
* @type {string}
*/
'arr_currency'?: string | null;
/**
- * Only available in Advanced and above plans The Currency for Monthly Recurring Revenue of the deal If the `mrr` is null, this will also be null
+ * Only available in Growth and above plans The Currency for Monthly Recurring Revenue of the deal If the `mrr` is null, this will also be null
* @type {string}
*/
'mrr_currency'?: string | null;
/**
- * Only available in Advanced and above plans The Currency for Annual Contract Value of the deal If the `acv` is null, this will also be null
+ * Only available in Growth and above plans The Currency for Annual Contract Value of the deal If the `acv` is null, this will also be null
* @type {string}
*/
'acv_currency'?: string | null;
diff --git a/src/versions/v1/models/base-product.ts b/src/versions/v1/models/base-product.ts
index 15a5d9cb..e855dcbe 100644
--- a/src/versions/v1/models/base-product.ts
+++ b/src/versions/v1/models/base-product.ts
@@ -66,12 +66,12 @@ export interface BaseProduct {
*/
'owner_id'?: object;
/**
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product
* @type {string}
*/
'billing_frequency'?: BaseProductBillingFrequencyConst;
/**
- * 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 is always `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
+ * 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 is always `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
* @type {number}
*/
'billing_frequency_cycles'?: number | null;
diff --git a/src/versions/v1/models/update-deal-product-request-all-of.ts b/src/versions/v1/models/update-deal-product-request-all-of.ts
index 69c1a1f1..c72fdd5e 100644
--- a/src/versions/v1/models/update-deal-product-request-all-of.ts
+++ b/src/versions/v1/models/update-deal-product-request-all-of.ts
@@ -21,7 +21,7 @@
*/
export interface UpdateDealProductRequestAllOf {
/**
- * 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`
+ * 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`
* @type {string}
*/
'billing_frequency'?: UpdateDealProductRequestAllOfBillingFrequencyConst;
diff --git a/src/versions/v1/models/update-product-request-all-of1.ts b/src/versions/v1/models/update-product-request-all-of1.ts
index ddfc1496..d21672e9 100644
--- a/src/versions/v1/models/update-product-request-all-of1.ts
+++ b/src/versions/v1/models/update-product-request-all-of1.ts
@@ -21,7 +21,7 @@
*/
export interface UpdateProductRequestAllOf1 {
/**
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product
* @type {string}
*/
'billing_frequency'?: UpdateProductRequestAllOf1BillingFrequencyConst;
diff --git a/src/versions/v2/api/beta-api.ts b/src/versions/v2/api/beta-api.ts
index c358ad38..ae6f57c7 100644
--- a/src/versions/v2/api/beta-api.ts
+++ b/src/versions/v2/api/beta-api.ts
@@ -30,19 +30,27 @@ import { AddConvertLeadToDealResponse } from '../models';
// @ts-ignore
import { AddInstallmentRequestBody } from '../models';
// @ts-ignore
+import { AddProductImageResponse } from '../models';
+// @ts-ignore
import { ConvertLeadToDealRequest } from '../models';
// @ts-ignore
import { DeleteInstallmentResponse } from '../models';
// @ts-ignore
+import { DeleteProductImageResponse } from '../models';
+// @ts-ignore
import { GetConvertResponse } from '../models';
// @ts-ignore
import { GetConvertResponse1 } from '../models';
// @ts-ignore
import { GetInstallmentsResponse } from '../models';
// @ts-ignore
+import { GetProductImageResponse } from '../models';
+// @ts-ignore
import { UpdateInstallmentRequestBody } from '../models';
// @ts-ignore
import { UpdateInstallmentResponse } from '../models';
+// @ts-ignore
+import { UpdateProductImageResponse } from '../models';
/**
* BetaApi - axios parameter creator
* @export
@@ -136,7 +144,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -171,6 +179,47 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ deleteProductImage: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteProductImage', 'id', id)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -226,7 +275,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {Array} 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.
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
@@ -335,7 +384,48 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * 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.
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ getProductImage: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getProductImage', 'id', id)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {number} id The ID of the deal
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
@@ -380,7 +470,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -423,6 +513,110 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
localVarRequestOptions.data = serializeDataIfNeeded(UpdateInstallmentRequestBody, localVarRequestOptions, configuration)
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ updateProductImage: async (id: number, data: File, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateProductImage', 'id', id)
+ // verify required parameter 'data' is not null or undefined
+ assertParamExists('updateProductImage', 'data', data)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
+
+
+ if (data !== undefined) {
+ localVarFormParams.append('data', data as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams;
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ uploadProductImage: async (id: number, data: File, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('uploadProductImage', 'id', id)
+ // verify required parameter 'data' is not null or undefined
+ assertParamExists('uploadProductImage', 'data', data)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
+
+
+ if (data !== undefined) {
+ localVarFormParams.append('data', data as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams;
+
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -463,7 +657,7 @@ export const BetaApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -474,6 +668,17 @@ export const BetaApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstallment(id, installment_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ async deleteProductImage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductImage(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Deal conversion status (BETA)
@@ -487,7 +692,7 @@ export const BetaApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {Array} 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.
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
@@ -514,7 +719,18 @@ export const BetaApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * 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.
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ async getProductImage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductImage(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {number} id The ID of the deal
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
@@ -526,7 +742,7 @@ export const BetaApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -538,6 +754,30 @@ export const BetaApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ async updateProductImage(id: number, data: File, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductImage(id, data, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ async uploadProductImage(id: number, data: File, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadProductImage(id, data, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
}
};
@@ -569,7 +809,7 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath?
return localVarFp.convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest, ).then((request) => request(axios, basePath));
},
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
@@ -578,6 +818,16 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath?
deleteInstallment(requestParameters: BetaApiDeleteInstallmentRequest, ): Promise {
return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {BetaApiDeleteProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteProductImage(requestParameters: BetaApiDeleteProductImageRequest, ): Promise {
+ return localVarFp.deleteProductImage(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
/**
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Deal conversion status (BETA)
@@ -589,7 +839,7 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath?
return localVarFp.getDealConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(axios, basePath));
},
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
@@ -609,7 +859,17 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath?
return localVarFp.getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(axios, basePath));
},
/**
- * 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.
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {BetaApiGetProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getProductImage(requestParameters: BetaApiGetProductImageRequest, ): Promise {
+ return localVarFp.getProductImage(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
@@ -619,7 +879,7 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath?
return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody, ).then((request) => request(axios, basePath));
},
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {BetaApiUpdateInstallmentRequest} requestParameters Request parameters.
@@ -628,6 +888,26 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath?
updateInstallment(requestParameters: BetaApiUpdateInstallmentRequest, ): Promise {
return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody, ).then((request) => request(axios, basePath));
},
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {BetaApiUpdateProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateProductImage(requestParameters: BetaApiUpdateProductImageRequest, ): Promise {
+ return localVarFp.updateProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {BetaApiUploadProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ uploadProductImage(requestParameters: BetaApiUploadProductImageRequest, ): Promise {
+ return localVarFp.uploadProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(axios, basePath));
+ },
};
};
@@ -687,6 +967,20 @@ export interface BetaApiDeleteInstallmentRequest {
readonly installment_id: number
}
+/**
+ * Request parameters for deleteProductImage operation in BetaApi.
+ * @export
+ * @interface BetaApiDeleteProductImageRequest
+ */
+export interface BetaApiDeleteProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof BetaApiDeleteProductImage
+ */
+ readonly id: number
+}
+
/**
* Request parameters for getDealConversionStatus operation in BetaApi.
* @export
@@ -771,6 +1065,20 @@ export interface BetaApiGetLeadConversionStatusRequest {
readonly conversion_id: string
}
+/**
+ * Request parameters for getProductImage operation in BetaApi.
+ * @export
+ * @interface BetaApiGetProductImageRequest
+ */
+export interface BetaApiGetProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof BetaApiGetProductImage
+ */
+ readonly id: number
+}
+
/**
* Request parameters for postInstallment operation in BetaApi.
* @export
@@ -820,6 +1128,48 @@ export interface BetaApiUpdateInstallmentRequest {
readonly UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody
}
+/**
+ * Request parameters for updateProductImage operation in BetaApi.
+ * @export
+ * @interface BetaApiUpdateProductImageRequest
+ */
+export interface BetaApiUpdateProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof BetaApiUpdateProductImage
+ */
+ readonly id: number
+
+ /**
+ * One image supplied in the multipart/form-data encoding
+ * @type {File}
+ * @memberof BetaApiUpdateProductImage
+ */
+ readonly data: File
+}
+
+/**
+ * Request parameters for uploadProductImage operation in BetaApi.
+ * @export
+ * @interface BetaApiUploadProductImageRequest
+ */
+export interface BetaApiUploadProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof BetaApiUploadProductImage
+ */
+ readonly id: number
+
+ /**
+ * One image supplied in the multipart/form-data encoding
+ * @type {File}
+ * @memberof BetaApiUploadProductImage
+ */
+ readonly data: File
+}
+
/**
* BetaApi - object-oriented interface
* @export
@@ -852,7 +1202,7 @@ export class BetaApi extends BaseAPI {
}
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
@@ -863,6 +1213,18 @@ export class BetaApi extends BaseAPI {
return BetaApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {BetaApiDeleteProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof BetaApi
+ */
+ public deleteProductImage(requestParameters: BetaApiDeleteProductImageRequest, ) {
+ return BetaApiFp(this.configuration).deleteProductImage(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Deal conversion status (BETA)
@@ -876,7 +1238,7 @@ export class BetaApi extends BaseAPI {
}
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
@@ -900,7 +1262,19 @@ export class BetaApi extends BaseAPI {
}
/**
- * 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.
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {BetaApiGetProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof BetaApi
+ */
+ public getProductImage(requestParameters: BetaApiGetProductImageRequest, ) {
+ return BetaApiFp(this.configuration).getProductImage(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
@@ -912,7 +1286,7 @@ export class BetaApi extends BaseAPI {
}
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {BetaApiUpdateInstallmentRequest} requestParameters Request parameters.
@@ -922,4 +1296,28 @@ export class BetaApi extends BaseAPI {
public updateInstallment(requestParameters: BetaApiUpdateInstallmentRequest, ) {
return BetaApiFp(this.configuration).updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody, ).then((request) => request(this.axios, this.basePath));
}
+
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {BetaApiUpdateProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof BetaApi
+ */
+ public updateProductImage(requestParameters: BetaApiUpdateProductImageRequest, ) {
+ return BetaApiFp(this.configuration).updateProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {BetaApiUploadProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof BetaApi
+ */
+ public uploadProductImage(requestParameters: BetaApiUploadProductImageRequest, ) {
+ return BetaApiFp(this.configuration).uploadProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(this.axios, this.basePath));
+ }
}
diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts
index 864bea29..e0c82e32 100644
--- a/src/versions/v2/api/deals-api.ts
+++ b/src/versions/v2/api/deals-api.ts
@@ -438,7 +438,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
};
},
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -1081,7 +1081,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
};
},
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {Array} 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.
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
@@ -1190,7 +1190,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
};
},
/**
- * 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.
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {number} id The ID of the deal
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
@@ -1462,7 +1462,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
};
},
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -1615,7 +1615,7 @@ export const DealsApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -1771,7 +1771,7 @@ export const DealsApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {Array} 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.
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
@@ -1798,7 +1798,7 @@ export const DealsApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * 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.
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {number} id The ID of the deal
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
@@ -1867,7 +1867,7 @@ export const DealsApiFp = function(configuration?: Configuration) {
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {number} id The ID of the deal
* @param {number} installment_id The ID of the installment
@@ -1970,7 +1970,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(axios, basePath));
},
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {DealsApiDeleteInstallmentRequest} requestParameters Request parameters.
@@ -2070,7 +2070,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
return localVarFp.getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).then((request) => request(axios, basePath));
},
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {DealsApiGetInstallmentsRequest} requestParameters Request parameters.
@@ -2090,7 +2090,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
return localVarFp.postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody, ).then((request) => request(axios, basePath));
},
/**
- * 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.
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {DealsApiPostInstallmentRequest} requestParameters Request parameters.
@@ -2140,7 +2140,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(axios, basePath));
},
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {DealsApiUpdateInstallmentRequest} requestParameters Request parameters.
@@ -3124,7 +3124,7 @@ export class DealsApi extends BaseAPI {
}
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
+ * Removes an installment from a deal. Only available in Growth and above plans.
* @summary Delete an installment from a deal
* @param {DealsApiDeleteInstallmentRequest} requestParameters Request parameters.
@@ -3244,7 +3244,7 @@ export class DealsApi extends BaseAPI {
}
/**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * Lists installments attached to a list of deals. Only available in Growth and above plans.
* @summary List installments added to a list of deals
* @param {DealsApiGetInstallmentsRequest} requestParameters Request parameters.
@@ -3268,7 +3268,7 @@ export class DealsApi extends BaseAPI {
}
/**
- * 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.
+ * 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 Growth and above plans.
* @summary Add an installment to a deal
* @param {DealsApiPostInstallmentRequest} requestParameters Request parameters.
@@ -3328,7 +3328,7 @@ export class DealsApi extends BaseAPI {
}
/**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * Edits an installment added to a deal. Only available in Growth and above plans.
* @summary Update an installment added to a deal
* @param {DealsApiUpdateInstallmentRequest} requestParameters Request parameters.
diff --git a/src/versions/v2/api/products-api.ts b/src/versions/v2/api/products-api.ts
index 4804493c..b64e04a3 100644
--- a/src/versions/v2/api/products-api.ts
+++ b/src/versions/v2/api/products-api.ts
@@ -26,12 +26,16 @@ import { AddDealFollowerRequest } from '../models';
// @ts-ignore
import { AddFollowerResponse } from '../models';
// @ts-ignore
+import { AddProductImageResponse } from '../models';
+// @ts-ignore
import { AddProductRequest } from '../models';
// @ts-ignore
import { AddProductVariationRequest } from '../models';
// @ts-ignore
import { DeleteFollowerResponse } from '../models';
// @ts-ignore
+import { DeleteProductImageResponse } from '../models';
+// @ts-ignore
import { DeleteProductResponse } from '../models';
// @ts-ignore
import { DeleteProductVariationResponse } from '../models';
@@ -40,6 +44,8 @@ import { GetFollowerChangelogsResponse } from '../models';
// @ts-ignore
import { GetFollowersResponse } from '../models';
// @ts-ignore
+import { GetProductImageResponse } from '../models';
+// @ts-ignore
import { GetProductResponse } from '../models';
// @ts-ignore
import { GetProductSearchResponse } from '../models';
@@ -50,6 +56,8 @@ import { GetProductVariationsResponse } from '../models';
// @ts-ignore
import { GetProductsResponse } from '../models';
// @ts-ignore
+import { UpdateProductImageResponse } from '../models';
+// @ts-ignore
import { UpdateProductRequest } from '../models';
// @ts-ignore
import { UpdateProductResponse } from '../models';
@@ -269,6 +277,47 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ deleteProductImage: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteProductImage', 'id', id)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -457,6 +506,47 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ getProductImage: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getProductImage', 'id', id)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -708,6 +798,58 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
options: localVarRequestOptions,
};
},
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ updateProductImage: async (id: number, data: File, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateProductImage', 'id', id)
+ // verify required parameter 'data' is not null or undefined
+ assertParamExists('updateProductImage', 'data', data)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
+
+
+ if (data !== undefined) {
+ localVarFormParams.append('data', data as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams;
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
/**
* Updates product variation data.
* @summary Update a product variation
@@ -752,6 +894,58 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
localVarRequestOptions.data = serializeDataIfNeeded(UpdateProductVariationRequest, localVarRequestOptions, configuration)
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ uploadProductImage: async (id: number, data: File, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('uploadProductImage', 'id', id)
+ // verify required parameter 'data' is not null or undefined
+ assertParamExists('uploadProductImage', 'data', data)
+ const localVarPath = `/products/{id}/images`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
+
+
+ if (data !== undefined) {
+ localVarFormParams.append('data', data as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams;
+
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -826,6 +1020,17 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductFollower(id, follower_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ async deleteProductImage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductImage(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Deletes a product variation.
* @summary Delete a product variation
@@ -875,6 +1080,17 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFollowersChangelog(id, limit, cursor, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {number} id The ID of the product
+
+ * @throws {RequiredError}
+ */
+ async getProductImage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductImage(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns data about all product variations.
* @summary Get all product variations
@@ -934,6 +1150,18 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProduct(id, UpdateProductRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ async updateProductImage(id: number, data: File, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductImage(id, data, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Updates product variation data.
* @summary Update a product variation
@@ -947,6 +1175,18 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductVariation(id, product_variation_id, UpdateProductVariationRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {number} id The ID of the product
+ * @param {File} data One image supplied in the multipart/form-data encoding
+
+ * @throws {RequiredError}
+ */
+ async uploadProductImage(id: number, data: File, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadProductImage(id, data, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
}
};
@@ -1007,6 +1247,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest, ): Promise {
return localVarFp.deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {ProductsApiDeleteProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteProductImage(requestParameters: ProductsApiDeleteProductImageRequest, ): Promise {
+ return localVarFp.deleteProductImage(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
/**
* Deletes a product variation.
* @summary Delete a product variation
@@ -1047,6 +1297,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
getProductFollowersChangelog(requestParameters: ProductsApiGetProductFollowersChangelogRequest, ): Promise {
return localVarFp.getProductFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
},
+ /**
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {ProductsApiGetProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getProductImage(requestParameters: ProductsApiGetProductImageRequest, ): Promise {
+ return localVarFp.getProductImage(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
/**
* Returns data about all product variations.
* @summary Get all product variations
@@ -1087,6 +1347,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
updateProduct(requestParameters: ProductsApiUpdateProductRequest, ): Promise {
return localVarFp.updateProduct(requestParameters.id, requestParameters.UpdateProductRequest, ).then((request) => request(axios, basePath));
},
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {ProductsApiUpdateProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateProductImage(requestParameters: ProductsApiUpdateProductImageRequest, ): Promise {
+ return localVarFp.updateProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(axios, basePath));
+ },
/**
* Updates product variation data.
* @summary Update a product variation
@@ -1097,6 +1367,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
updateProductVariation(requestParameters: ProductsApiUpdateProductVariationRequest, ): Promise {
return localVarFp.updateProductVariation(requestParameters.id, requestParameters.product_variation_id, requestParameters.UpdateProductVariationRequest, ).then((request) => request(axios, basePath));
},
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {ProductsApiUploadProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ uploadProductImage(requestParameters: ProductsApiUploadProductImageRequest, ): Promise {
+ return localVarFp.uploadProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(axios, basePath));
+ },
};
};
@@ -1191,6 +1471,20 @@ export interface ProductsApiDeleteProductFollowerRequest {
readonly follower_id: number
}
+/**
+ * Request parameters for deleteProductImage operation in ProductsApi.
+ * @export
+ * @interface ProductsApiDeleteProductImageRequest
+ */
+export interface ProductsApiDeleteProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiDeleteProductImage
+ */
+ readonly id: number
+}
+
/**
* Request parameters for deleteProductVariation operation in ProductsApi.
* @export
@@ -1282,6 +1576,20 @@ export interface ProductsApiGetProductFollowersChangelogRequest {
readonly cursor?: string
}
+/**
+ * Request parameters for getProductImage operation in ProductsApi.
+ * @export
+ * @interface ProductsApiGetProductImageRequest
+ */
+export interface ProductsApiGetProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiGetProductImage
+ */
+ readonly id: number
+}
+
/**
* Request parameters for getProductVariations operation in ProductsApi.
* @export
@@ -1443,6 +1751,27 @@ export interface ProductsApiUpdateProductRequest {
readonly UpdateProductRequest?: UpdateProductRequest
}
+/**
+ * Request parameters for updateProductImage operation in ProductsApi.
+ * @export
+ * @interface ProductsApiUpdateProductImageRequest
+ */
+export interface ProductsApiUpdateProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiUpdateProductImage
+ */
+ readonly id: number
+
+ /**
+ * One image supplied in the multipart/form-data encoding
+ * @type {File}
+ * @memberof ProductsApiUpdateProductImage
+ */
+ readonly data: File
+}
+
/**
* Request parameters for updateProductVariation operation in ProductsApi.
* @export
@@ -1471,6 +1800,27 @@ export interface ProductsApiUpdateProductVariationRequest {
readonly UpdateProductVariationRequest?: UpdateProductVariationRequest
}
+/**
+ * Request parameters for uploadProductImage operation in ProductsApi.
+ * @export
+ * @interface ProductsApiUploadProductImageRequest
+ */
+export interface ProductsApiUploadProductImageRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiUploadProductImage
+ */
+ readonly id: number
+
+ /**
+ * One image supplied in the multipart/form-data encoding
+ * @type {File}
+ * @memberof ProductsApiUploadProductImage
+ */
+ readonly data: File
+}
+
/**
* ProductsApi - object-oriented interface
* @export
@@ -1538,6 +1888,18 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Deletes the image of a product.
+ * @summary Delete an image of a product
+ * @param {ProductsApiDeleteProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public deleteProductImage(requestParameters: ProductsApiDeleteProductImageRequest, ) {
+ return ProductsApiFp(this.configuration).deleteProductImage(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Deletes a product variation.
* @summary Delete a product variation
@@ -1586,6 +1948,18 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).getProductFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
+ * @summary Get image of a product
+ * @param {ProductsApiGetProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public getProductImage(requestParameters: ProductsApiGetProductImageRequest, ) {
+ return ProductsApiFp(this.configuration).getProductImage(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns data about all product variations.
* @summary Get all product variations
@@ -1634,6 +2008,18 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).updateProduct(requestParameters.id, requestParameters.UpdateProductRequest, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Updates the image of a product.
+ * @summary Update an image for a product
+ * @param {ProductsApiUpdateProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public updateProductImage(requestParameters: ProductsApiUpdateProductImageRequest, ) {
+ return ProductsApiFp(this.configuration).updateProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Updates product variation data.
* @summary Update a product variation
@@ -1645,4 +2031,16 @@ export class ProductsApi extends BaseAPI {
public updateProductVariation(requestParameters: ProductsApiUpdateProductVariationRequest, ) {
return ProductsApiFp(this.configuration).updateProductVariation(requestParameters.id, requestParameters.product_variation_id, requestParameters.UpdateProductVariationRequest, ).then((request) => request(this.axios, this.basePath));
}
+
+ /**
+ * Uploads an image for a product.
+ * @summary Upload an image for a product
+ * @param {ProductsApiUploadProductImageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public uploadProductImage(requestParameters: ProductsApiUploadProductImageRequest, ) {
+ return ProductsApiFp(this.configuration).uploadProductImage(requestParameters.id, requestParameters.data, ).then((request) => request(this.axios, this.basePath));
+ }
}
diff --git a/src/versions/v2/models/add-product-image-response.ts b/src/versions/v2/models/add-product-image-response.ts
new file mode 100644
index 00000000..6fe2f288
--- /dev/null
+++ b/src/versions/v2/models/add-product-image-response.ts
@@ -0,0 +1,37 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+// May contain unused imports in some cases
+// @ts-ignore
+import { UpdateProductImageResponseData } from './update-product-image-response-data';
+
+/**
+*
+* @export
+* @interface AddProductImageResponse
+*/
+export interface AddProductImageResponse {
+ /**
+ * If the response is successful or not
+ * @type {boolean}
+ */
+ 'success'?: boolean;
+ /**
+ *
+ * @type {UpdateProductImageResponseData}
+ */
+ 'data'?: UpdateProductImageResponseData;
+}
+
diff --git a/src/versions/v2/models/base-product-all-of1.ts b/src/versions/v2/models/base-product-all-of1.ts
index 235051da..8aa03b41 100644
--- a/src/versions/v2/models/base-product-all-of1.ts
+++ b/src/versions/v2/models/base-product-all-of1.ts
@@ -21,7 +21,7 @@
*/
export interface BaseProductAllOf1 {
/**
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product
* @type {string}
*/
'billing_frequency'?: BaseProductAllOf1BillingFrequencyConst;
diff --git a/src/versions/v2/models/deal-item.ts b/src/versions/v2/models/deal-item.ts
index afcbb900..d2ba024b 100644
--- a/src/versions/v2/models/deal-item.ts
+++ b/src/versions/v2/models/deal-item.ts
@@ -159,17 +159,17 @@ export interface DealItem {
*/
'channel_id'?: string | null;
/**
- * Only available in Advanced and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
* @type {number}
*/
'arr'?: number | null;
/**
- * Only available in Advanced and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
* @type {number}
*/
'mrr'?: number | null;
/**
- * Only available in Advanced and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
* @type {number}
*/
'acv'?: number | null;
diff --git a/src/versions/v2/models/deal-item1.ts b/src/versions/v2/models/deal-item1.ts
index 8e4a58e0..b9ab9e1d 100644
--- a/src/versions/v2/models/deal-item1.ts
+++ b/src/versions/v2/models/deal-item1.ts
@@ -159,17 +159,17 @@ export interface DealItem1 {
*/
'channel_id'?: string | null;
/**
- * Only available in Advanced and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal
* @type {number}
*/
'arr'?: number | null;
/**
- * Only available in Advanced and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal
* @type {number}
*/
'mrr'?: number | null;
/**
- * Only available in Advanced and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
+ * Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal
* @type {number}
*/
'acv'?: number | null;
diff --git a/src/versions/v2/models/delete-product-image-response-data.ts b/src/versions/v2/models/delete-product-image-response-data.ts
new file mode 100644
index 00000000..7cb8bb70
--- /dev/null
+++ b/src/versions/v2/models/delete-product-image-response-data.ts
@@ -0,0 +1,29 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+
+/**
+*
+* @export
+* @interface DeleteProductImageResponseData
+*/
+export interface DeleteProductImageResponseData {
+ /**
+ * The ID of the image that was deleted from the product.
+ * @type {number}
+ */
+ 'id'?: number;
+}
+
diff --git a/src/versions/v2/models/delete-product-image-response.ts b/src/versions/v2/models/delete-product-image-response.ts
new file mode 100644
index 00000000..6cf36165
--- /dev/null
+++ b/src/versions/v2/models/delete-product-image-response.ts
@@ -0,0 +1,37 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+// May contain unused imports in some cases
+// @ts-ignore
+import { DeleteProductImageResponseData } from './delete-product-image-response-data';
+
+/**
+*
+* @export
+* @interface DeleteProductImageResponse
+*/
+export interface DeleteProductImageResponse {
+ /**
+ * If the response is successful or not
+ * @type {boolean}
+ */
+ 'success'?: boolean;
+ /**
+ *
+ * @type {DeleteProductImageResponseData}
+ */
+ 'data'?: DeleteProductImageResponseData;
+}
+
diff --git a/src/versions/v2/models/get-deals-products-response-data-inner-all-of1.ts b/src/versions/v2/models/get-deals-products-response-data-inner-all-of1.ts
index 746e68f3..1ac73c88 100644
--- a/src/versions/v2/models/get-deals-products-response-data-inner-all-of1.ts
+++ b/src/versions/v2/models/get-deals-products-response-data-inner-all-of1.ts
@@ -21,7 +21,7 @@
*/
export interface GetDealsProductsResponseDataInnerAllOf1 {
/**
- * 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`
+ * 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`
* @type {string}
*/
'billing_frequency'?: GetDealsProductsResponseDataInnerAllOf1BillingFrequencyConst;
diff --git a/src/versions/v2/models/get-deals-products-response-data-inner-all-of2.ts b/src/versions/v2/models/get-deals-products-response-data-inner-all-of2.ts
index c42d54d1..13fe49ce 100644
--- a/src/versions/v2/models/get-deals-products-response-data-inner-all-of2.ts
+++ b/src/versions/v2/models/get-deals-products-response-data-inner-all-of2.ts
@@ -21,7 +21,7 @@
*/
export interface GetDealsProductsResponseDataInnerAllOf2 {
/**
- * 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
+ * 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
* @type {number}
*/
'billing_frequency_cycles'?: number | null;
diff --git a/src/versions/v2/models/get-deals-products-response-data-inner-all-of3.ts b/src/versions/v2/models/get-deals-products-response-data-inner-all-of3.ts
index 184e5fe8..79642fee 100644
--- a/src/versions/v2/models/get-deals-products-response-data-inner-all-of3.ts
+++ b/src/versions/v2/models/get-deals-products-response-data-inner-all-of3.ts
@@ -21,7 +21,7 @@
*/
export interface GetDealsProductsResponseDataInnerAllOf3 {
/**
- * 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
+ * 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
* @type {string}
*/
'billing_start_date'?: string | null;
diff --git a/src/versions/v2/models/get-product-image-response-data.ts b/src/versions/v2/models/get-product-image-response-data.ts
new file mode 100644
index 00000000..0ae0ed88
--- /dev/null
+++ b/src/versions/v2/models/get-product-image-response-data.ts
@@ -0,0 +1,59 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+
+/**
+* The product image data and the respective public URL
+* @export
+* @interface GetProductImageResponseData
+*/
+export interface GetProductImageResponseData {
+ /**
+ * The ID of the product image
+ * @type {number}
+ */
+ 'id'?: number;
+ /**
+ * The ID of the product associated
+ * @type {number}
+ */
+ 'product_id'?: number;
+ /**
+ * The ID of the company
+ * @type {string}
+ */
+ 'company_id'?: string;
+ /**
+ * The public URL of the product image
+ * @type {string}
+ */
+ 'public_url'?: string;
+ /**
+ * The date of image upload.
+ * @type {string}
+ */
+ 'add_time'?: string;
+ /**
+ * The MIME type of the product image
+ * @type {string}
+ */
+ 'mime_type'?: string;
+ /**
+ * The name of the product image file
+ * @type {string}
+ */
+ 'name'?: string;
+}
+
diff --git a/src/versions/v2/models/get-product-image-response.ts b/src/versions/v2/models/get-product-image-response.ts
new file mode 100644
index 00000000..0adb6ae3
--- /dev/null
+++ b/src/versions/v2/models/get-product-image-response.ts
@@ -0,0 +1,37 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetProductImageResponseData } from './get-product-image-response-data';
+
+/**
+*
+* @export
+* @interface GetProductImageResponse
+*/
+export interface GetProductImageResponse {
+ /**
+ * If the response is successful or not
+ * @type {boolean}
+ */
+ 'success'?: boolean;
+ /**
+ *
+ * @type {GetProductImageResponseData}
+ */
+ 'data'?: GetProductImageResponseData;
+}
+
diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts
index 389c4fc8..c702ac61 100644
--- a/src/versions/v2/models/index.ts
+++ b/src/versions/v2/models/index.ts
@@ -22,6 +22,7 @@ export * from './add-person-request';
export * from './add-person-request-emails-inner';
export * from './add-person-request-phones-inner';
export * from './add-pipeline-request';
+export * from './add-product-image-response';
export * from './add-product-request';
export * from './add-product-request-all-of';
export * from './add-product-variation-request';
@@ -54,6 +55,8 @@ export * from './delete-person-response';
export * from './delete-person-response-data';
export * from './delete-pipeline-response';
export * from './delete-pipeline-response-data';
+export * from './delete-product-image-response';
+export * from './delete-product-image-response-data';
export * from './delete-product-response';
export * from './delete-product-response-data';
export * from './delete-product-variation-response';
@@ -127,6 +130,8 @@ export * from './get-persons-response-all-of-data-inner-postal-address';
export * from './get-pipelines-response';
export * from './get-pipelines-response-all-of';
export * from './get-pipelines-response-all-of-data-inner';
+export * from './get-product-image-response';
+export * from './get-product-image-response-data';
export * from './get-product-response';
export * from './get-product-response-data';
export * from './get-product-search-response';
@@ -163,6 +168,8 @@ export * from './update-installment-response';
export * from './update-organization-request';
export * from './update-person-request';
export * from './update-pipeline-request';
+export * from './update-product-image-response';
+export * from './update-product-image-response-data';
export * from './update-product-request';
export * from './update-product-request-all-of';
export * from './update-product-request-all-of1';
diff --git a/src/versions/v2/models/update-deal-product-request-all-of.ts b/src/versions/v2/models/update-deal-product-request-all-of.ts
index 2d9b343c..7d0c84be 100644
--- a/src/versions/v2/models/update-deal-product-request-all-of.ts
+++ b/src/versions/v2/models/update-deal-product-request-all-of.ts
@@ -21,7 +21,7 @@
*/
export interface UpdateDealProductRequestAllOf {
/**
- * 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`
+ * 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`
* @type {string}
*/
'billing_frequency'?: UpdateDealProductRequestAllOfBillingFrequencyConst;
diff --git a/src/versions/v2/models/update-product-image-response-data.ts b/src/versions/v2/models/update-product-image-response-data.ts
new file mode 100644
index 00000000..ae33a1a9
--- /dev/null
+++ b/src/versions/v2/models/update-product-image-response-data.ts
@@ -0,0 +1,44 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+
+/**
+*
+* @export
+* @interface UpdateProductImageResponseData
+*/
+export interface UpdateProductImageResponseData {
+ /**
+ * The ID of the product image
+ * @type {number}
+ */
+ 'id'?: number;
+ /**
+ * The ID of the product associated
+ * @type {number}
+ */
+ 'product_id'?: number;
+ /**
+ * The ID of the company
+ * @type {string}
+ */
+ 'company_id'?: string;
+ /**
+ * The date of image upload.
+ * @type {string}
+ */
+ 'add_time'?: string;
+}
+
diff --git a/src/versions/v2/models/update-product-image-response.ts b/src/versions/v2/models/update-product-image-response.ts
new file mode 100644
index 00000000..5a2ca51a
--- /dev/null
+++ b/src/versions/v2/models/update-product-image-response.ts
@@ -0,0 +1,37 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v2
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+// May contain unused imports in some cases
+// @ts-ignore
+import { UpdateProductImageResponseData } from './update-product-image-response-data';
+
+/**
+*
+* @export
+* @interface UpdateProductImageResponse
+*/
+export interface UpdateProductImageResponse {
+ /**
+ * If the response is successful or not
+ * @type {boolean}
+ */
+ 'success'?: boolean;
+ /**
+ *
+ * @type {UpdateProductImageResponseData}
+ */
+ 'data'?: UpdateProductImageResponseData;
+}
+
diff --git a/src/versions/v2/models/update-product-request-all-of1.ts b/src/versions/v2/models/update-product-request-all-of1.ts
index 972cbfc9..4205131b 100644
--- a/src/versions/v2/models/update-product-request-all-of1.ts
+++ b/src/versions/v2/models/update-product-request-all-of1.ts
@@ -21,7 +21,7 @@
*/
export interface UpdateProductRequestAllOf1 {
/**
- * Only available in Advanced and above plans How often a customer is billed for access to a service or product
+ * Only available in Growth and above plans How often a customer is billed for access to a service or product
* @type {string}
*/
'billing_frequency'?: UpdateProductRequestAllOf1BillingFrequencyConst;