Skip to content

Commit 3f8ef70

Browse files
author
pipedrive-bot
committed
Build 331 - version-patch
1 parent 622d901 commit 3f8ef70

19 files changed

Lines changed: 237 additions & 34 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
77
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).
88

99
## [Unreleased]
10+
### Fixed
11+
- Fixed double-nested response schema in `GET /api/v2/products``data` array items were incorrectly typed as a full response wrapper object instead of the product schema
12+
- Added missing fields to v2 product response schema: `add_time`, `update_time`, `description`, and `category` (nullable)
13+
- Added typed properties to `prices` array items in v2 product schema: `product_id`, `price`, `currency`, `cost`, `direct_cost` (nullable), `notes`
14+
- Fixed `BaseProduct.id`, `ProductVariation.id`, and product image `product_id` typed as `number` instead of `integer`
15+
- Documented the `updated_since` query parameter for `GET /api/v2/products` which was supported by the API but absent from the spec
16+
- Fixed `quantity` field type from `integer` to `number` in deal product response schema (`GET /api/v2/deals/{id}/products`) — the API supports decimal values such as `5.5`
1017

1118
## [33.1.1] - 2026-05-28
1219

src/versions/v1/api/files-api.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration
5151
* @param {number} [product_id] The ID of the product to associate file(s) with
5252
* @param {number} [activity_id] The ID of the activity to associate file(s) with
5353
* @param {string} [lead_id] The ID of the lead to associate file(s) with
54+
* @param {number} [project_id] The ID of the project to associate file(s) with
5455
5556
* @throws {RequiredError}
5657
*/
57-
addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<RequestArgs> => {
58+
addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number, ): Promise<RequestArgs> => {
5859
// verify required parameter 'file' is not null or undefined
5960
assertParamExists('addFile', 'file', file)
6061
const localVarPath = `/files`;
@@ -106,6 +107,10 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration
106107
localVarFormParams.append('lead_id', lead_id as any);
107108
}
108109

110+
if (project_id !== undefined) {
111+
localVarFormParams.append('project_id', project_id as any);
112+
}
113+
109114

110115
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
111116

@@ -515,11 +520,12 @@ export const FilesApiFp = function(configuration?: Configuration) {
515520
* @param {number} [product_id] The ID of the product to associate file(s) with
516521
* @param {number} [activity_id] The ID of the activity to associate file(s) with
517522
* @param {string} [lead_id] The ID of the lead to associate file(s) with
523+
* @param {number} [project_id] The ID of the project to associate file(s) with
518524
519525
* @throws {RequiredError}
520526
*/
521-
async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddFileResponse>> {
522-
const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, );
527+
async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddFileResponse>> {
528+
const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, project_id, );
523529
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
524530
},
525531
/**
@@ -628,7 +634,7 @@ export const FilesApiFactory = function (configuration?: Configuration, basePath
628634
* @throws {RequiredError}
629635
*/
630636
addFile(requestParameters: FilesApiAddFileRequest, ): Promise<AddFileResponse> {
631-
return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(axios, basePath));
637+
return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, requestParameters.project_id, ).then((request) => request(axios, basePath));
632638
},
633639
/**
634640
* Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-remote-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a remote file</a>.
@@ -757,6 +763,13 @@ export interface FilesApiAddFileRequest {
757763
* @memberof FilesApiAddFile
758764
*/
759765
readonly lead_id?: string
766+
767+
/**
768+
* The ID of the project to associate file(s) with
769+
* @type {number}
770+
* @memberof FilesApiAddFile
771+
*/
772+
readonly project_id?: number
760773
}
761774

762775
/**
@@ -950,7 +963,7 @@ export class FilesApi extends BaseAPI {
950963
* @memberof FilesApi
951964
*/
952965
public addFile(requestParameters: FilesApiAddFileRequest, ) {
953-
return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(this.axios, this.basePath));
966+
return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, requestParameters.project_id, ).then((request) => request(this.axios, this.basePath));
954967
}
955968

956969
/**

src/versions/v1/models/get-files-response-data-inner.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ export interface GetFilesResponseDataInner {
6161
*/
6262
'lead_id'?: string;
6363
/**
64+
* The ID of the project to associate the file with
65+
* @type {number}
66+
*/
67+
'project_id'?: number;
68+
/**
6469
* The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS
6570
* @type {string}
6671
*/
@@ -146,6 +151,11 @@ export interface GetFilesResponseDataInner {
146151
*/
147152
'lead_name'?: string;
148153
/**
154+
* The name of the project associated with the file
155+
* @type {string}
156+
*/
157+
'project_name'?: string;
158+
/**
149159
* The URL of the download file
150160
* @type {string}
151161
*/

src/versions/v1/models/project-all-of1.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,10 @@ export interface ProjectAllOf1 {
7575
* @type {Array<number>}
7676
*/
7777
'labels'?: Array<number>;
78+
/**
79+
* The health status of the project
80+
* @type {number}
81+
*/
82+
'health_status'?: number | null;
7883
}
7984

src/versions/v2/api/deal-products-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export const DealProductsApiAxiosParamCreator = function (configuration?: Config
319319
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "deals:read", "deals:full"], configuration)
320320

321321
if (deal_ids) {
322-
localVarQueryParameter['deal_ids'] = deal_ids;
322+
localVarQueryParameter['deal_ids'] = deal_ids.join(COLLECTION_FORMATS.csv);
323323
}
324324

325325
if (cursor !== undefined) {

src/versions/v2/api/products-api.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,11 +658,12 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
658658
* @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.
659659
* @param {'id' | 'name' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;name&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
660660
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
661+
* @param {string} [updated_since] If set, only products with an &#x60;update_time&#x60; later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
661662
* @param {string} [custom_fields] Comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for a smaller response.&lt;br/&gt;A maximum of 15 keys is allowed.
662663
663664
* @throws {RequiredError}
664665
*/
665-
getProducts: async (owner_id?: number, ids?: string, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', custom_fields?: string, ): Promise<RequestArgs> => {
666+
getProducts: async (owner_id?: number, ids?: string, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', updated_since?: string, custom_fields?: string, ): Promise<RequestArgs> => {
666667
const localVarPath = `/products`;
667668
// use dummy base URL string because the URL constructor only accepts absolute URLs.
668669
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -710,6 +711,10 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
710711
localVarQueryParameter['sort_direction'] = sort_direction;
711712
}
712713

714+
if (updated_since !== undefined) {
715+
localVarQueryParameter['updated_since'] = updated_since;
716+
}
717+
713718
if (custom_fields !== undefined) {
714719
localVarQueryParameter['custom_fields'] = custom_fields;
715720
}
@@ -1166,12 +1171,13 @@ export const ProductsApiFp = function(configuration?: Configuration) {
11661171
* @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.
11671172
* @param {'id' | 'name' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;name&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
11681173
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1174+
* @param {string} [updated_since] If set, only products with an &#x60;update_time&#x60; later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
11691175
* @param {string} [custom_fields] Comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for a smaller response.&lt;br/&gt;A maximum of 15 keys is allowed.
11701176
11711177
* @throws {RequiredError}
11721178
*/
1173-
async getProducts(owner_id?: number, ids?: string, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetProductsResponse>> {
1174-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(owner_id, ids, filter_id, cursor, limit, sort_by, sort_direction, custom_fields, );
1179+
async getProducts(owner_id?: number, ids?: string, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', updated_since?: string, custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetProductsResponse>> {
1180+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(owner_id, ids, filter_id, cursor, limit, sort_by, sort_direction, updated_since, custom_fields, );
11751181
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
11761182
},
11771183
/**
@@ -1387,7 +1393,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
13871393
* @throws {RequiredError}
13881394
*/
13891395
getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ): Promise<GetProductsResponse> {
1390-
return localVarFp.getProducts(requestParameters.owner_id, requestParameters.ids, requestParameters.filter_id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
1396+
return localVarFp.getProducts(requestParameters.owner_id, requestParameters.ids, requestParameters.filter_id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.updated_since, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
13911397
},
13921398
/**
13931399
* Searches all products by name, code and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope.
@@ -1749,6 +1755,13 @@ export interface ProductsApiGetProductsRequest {
17491755
*/
17501756
readonly sort_direction?: 'asc' | 'desc'
17511757

1758+
/**
1759+
* If set, only products with an &#x60;update_time&#x60; later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
1760+
* @type {string}
1761+
* @memberof ProductsApiGetProducts
1762+
*/
1763+
readonly updated_since?: string
1764+
17521765
/**
17531766
* Comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for a smaller response.&lt;br/&gt;A maximum of 15 keys is allowed.
17541767
* @type {string}
@@ -2069,7 +2082,7 @@ export class ProductsApi extends BaseAPI {
20692082
* @memberof ProductsApi
20702083
*/
20712084
public getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ) {
2072-
return ProductsApiFp(this.configuration).getProducts(requestParameters.owner_id, requestParameters.ids, requestParameters.filter_id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
2085+
return ProductsApiFp(this.configuration).getProducts(requestParameters.owner_id, requestParameters.ids, requestParameters.filter_id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.updated_since, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
20732086
}
20742087

20752088
/**

0 commit comments

Comments
 (0)