diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc51615..64628b03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ 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 +- Added `POST /deals/{id}/products/bulk` endpoint for creating multiple deal products at once (max 100 per request) +- Added `DELETE /deals/{id}/products` endpoint for deleting multiple deal products at once (max 100 per request) ## [30.1.0] - 2025-10-06 ### Added diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts index b7f8cacb..7a54af14 100644 --- a/src/versions/v2/api/deals-api.ts +++ b/src/versions/v2/api/deals-api.ts @@ -941,12 +941,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {number} id The ID of the deal * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. - * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`. + * @param {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ - getDealProducts: async (id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise => { + getDealProducts: async (id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc', ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getDealProducts', 'id', id) const localVarPath = `/deals/{id}/products` @@ -1119,12 +1119,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached products 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 * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. - * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`. + * @param {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ - getDealsProducts: async (deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise => { + getDealsProducts: async (deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc', ): Promise => { // verify required parameter 'deal_ids' is not null or undefined assertParamExists('getDealsProducts', 'deal_ids', deal_ids) const localVarPath = `/deals/products`; @@ -1841,12 +1841,12 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {number} id The ID of the deal * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. - * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`. + * @param {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ - async getDealProducts(id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDealProducts(id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDealProducts(id, cursor, limit, sort_by, sort_direction, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1882,12 +1882,12 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached products 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 * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. - * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`. + * @param {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ - async getDealsProducts(deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDealsProducts(deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsProducts(deal_ids, cursor, limit, sort_by, sort_direction, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2769,11 +2769,11 @@ export interface DealsApiGetDealProductsRequest { readonly limit?: number /** - * The field to sort by. Supported fields: `id`, `add_time`, `update_time`. - * @type {'id' | 'add_time' | 'update_time'} + * The field to sort by. Supported fields: `id`, `add_time`, `update_time`, `order_nr`. + * @type {'id' | 'add_time' | 'update_time' | 'order_nr'} * @memberof DealsApiGetDealProducts */ - readonly sort_by?: 'id' | 'add_time' | 'update_time' + readonly sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr' /** * The sorting direction. Supported values: `asc`, `desc`. @@ -2930,11 +2930,11 @@ export interface DealsApiGetDealsProductsRequest { readonly limit?: number /** - * The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`. - * @type {'id' | 'deal_id' | 'add_time' | 'update_time'} + * The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`, `order_nr`. + * @type {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} * @memberof DealsApiGetDealsProducts */ - readonly sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' + readonly sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr' /** * The sorting direction. Supported values: `asc`, `desc`. diff --git a/src/versions/v2/models/get-deals-products-response-data-inner-all-of.ts b/src/versions/v2/models/get-deals-products-response-data-inner-all-of.ts index 09ad593e..dcf8b9b5 100644 --- a/src/versions/v2/models/get-deals-products-response-data-inner-all-of.ts +++ b/src/versions/v2/models/get-deals-products-response-data-inner-all-of.ts @@ -56,6 +56,11 @@ export interface GetDealsProductsResponseDataInnerAllOf { */ 'product_variation_id'?: number | null; /** + * The order number of the product within the deal + * @type {number} + */ + 'order_nr'?: number | null; + /** * The date and time when the product was added to the deal * @type {string} */