diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 7484ee59..d6d15038 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +package.json \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f5463c10..617f919c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,39 @@ 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 “pipeline_id” query parameter to GET /api/v1/deals/summary endpoint + +### Changed + +- Updated list of lead label colors to include 'brown', 'dark-gray', 'orange', 'pink' ## [24.0.0] - 2025-01-30 ### Added + - Introduced a new client-nodejs library with full TypeScript support - Added compatibility for both API v1 and v2 endpoints. See migration guide for more details +- Add documentation for installments functionality: + - `POST` `/v1/deals/{id}/products` endpoint + - `PUT` `/v1/deals/{id}/products/{product_attachment_id}` endpoint + - `DELETE` `/v1/deals/{id}/products/{product_attachment_id}` endpoint + - `POST` `/v2/deals/{id}/products` endpoint + - `PATCH` `/v2/deals/{id}/products/{product_attachment_id}` endpoint + - `DELETE` `/v2/deals/{id}/products/{product_attachment_id}` endpoint +- Added the field “notes” to product prices in the body and response for v1 and v2 +- Added the field “overhead_cost” to the product variation prices in the response for v1 +- Added the field “direct_cost” to the product variation prices in the response and body for v2 +- Add “custom_fields” query paremeter to GET /api/v2/products + +### Changed + +- Reduce maximum `limit` query param to 100 for the following endpoints + - GET v1/files + - GET v1/deals/{id}/files + - GET v1/organizations/{id}/files + - GET v1/persons/{id}/files + - GET /v1/products/{id}/files ## [23.4.3] - 2024-11-22 ### Added diff --git a/README.md b/README.md index 10774d6f..5f00f5f9 100644 --- a/README.md +++ b/README.md @@ -261,4 +261,4 @@ app.get('/callback', async (req, res) => { } }); -``` +``` \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1fc5c1be..4078846e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,6 +6,7 @@ "packages": { "": { "name": "pipedrive", + "version": "24.0.0", "license": "MIT", "dependencies": { "axios": "^1.3.3", @@ -59,8 +60,7 @@ "ts-jest": "^29.2.5", "typescript": "^4.9.5", "typescript-eslint": "^8.22.0" - }, - "version": "24.0.0" + } }, "node_modules/@ampproject/remapping": { "version": "2.2.0", diff --git a/src/versions/v1/api/deals-api.ts b/src/versions/v1/api/deals-api.ts index d6412176..bd08ae09 100644 --- a/src/versions/v1/api/deals-api.ts +++ b/src/versions/v1/api/deals-api.ts @@ -1305,11 +1305,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. * @param {number} [user_id] Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. + * @param {number} [pipeline_id] Only deals within the given pipeline will be returned * @param {number} [stage_id] Only deals within the given stage will be returned * @throws {RequiredError} */ - getDealsSummary: async (status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, stage_id?: number, ): Promise<RequestArgs> => { + getDealsSummary: async (status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, pipeline_id?: number, stage_id?: number, ): Promise<RequestArgs> => { const localVarPath = `/deals/summary`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1341,6 +1342,10 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['user_id'] = user_id; } + if (pipeline_id !== undefined) { + localVarQueryParameter['pipeline_id'] = pipeline_id; + } + if (stage_id !== undefined) { localVarQueryParameter['stage_id'] = stage_id; } @@ -1995,12 +2000,13 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. * @param {number} [user_id] Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. + * @param {number} [pipeline_id] Only deals within the given pipeline will be returned * @param {number} [stage_id] Only deals within the given stage will be returned * @throws {RequiredError} */ - async getDealsSummary(status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, stage_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetDealsSummaryResponse>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsSummary(status, filter_id, user_id, stage_id, ); + async getDealsSummary(status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, pipeline_id?: number, stage_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetDealsSummaryResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsSummary(status, filter_id, user_id, pipeline_id, stage_id, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -2336,7 +2342,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getDealsSummary(requestParameters: DealsApiGetDealsSummaryRequest = {}, ): Promise<GetDealsSummaryResponse> { - return localVarFp.getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.stage_id, ).then((request) => request(axios, basePath)); + return localVarFp.getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.stage_id, ).then((request) => request(axios, basePath)); }, /** * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. @@ -3055,6 +3061,13 @@ export interface DealsApiGetDealsSummaryRequest { */ readonly user_id?: number + /** + * Only deals within the given pipeline will be returned + * @type {number} + * @memberof DealsApiGetDealsSummary + */ + readonly pipeline_id?: number + /** * Only deals within the given stage will be returned * @type {number} @@ -3577,7 +3590,7 @@ export class DealsApi extends BaseAPI { * @memberof DealsApi */ public getDealsSummary(requestParameters: DealsApiGetDealsSummaryRequest = {}, ) { - return DealsApiFp(this.configuration).getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.stage_id, ).then((request) => request(this.axios, this.basePath)); + return DealsApiFp(this.configuration).getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.stage_id, ).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/versions/v1/configuration.ts b/src/versions/v1/configuration.ts index 9db94018..a6e0d435 100644 --- a/src/versions/v1/configuration.ts +++ b/src/versions/v1/configuration.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/versions/v1/models/add-lead-label-request.ts b/src/versions/v1/models/add-lead-label-request.ts index f470c5c8..d2bfcd44 100644 --- a/src/versions/v1/models/add-lead-label-request.ts +++ b/src/versions/v1/models/add-lead-label-request.ts @@ -33,12 +33,16 @@ export interface AddLeadLabelRequest { } export const AddLeadLabelRequestColorConst = { - green: 'green', blue: 'blue', - red: 'red', - yellow: 'yellow', + brown: 'brown', + dark_gray: 'dark-gray', + gray: 'gray', + green: 'green', + orange: 'orange', + pink: 'pink', purple: 'purple', - gray: 'gray' + red: 'red', + yellow: 'yellow' } as const; export type AddLeadLabelRequestColorConst = typeof AddLeadLabelRequestColorConst[keyof typeof AddLeadLabelRequestColorConst]; diff --git a/src/versions/v1/models/lead-label.ts b/src/versions/v1/models/lead-label.ts index 2b69250f..e2bfa0b2 100644 --- a/src/versions/v1/models/lead-label.ts +++ b/src/versions/v1/models/lead-label.ts @@ -48,12 +48,16 @@ export interface LeadLabel { } export const LeadLabelColorConst = { - green: 'green', blue: 'blue', - red: 'red', - yellow: 'yellow', + brown: 'brown', + dark_gray: 'dark-gray', + gray: 'gray', + green: 'green', + orange: 'orange', + pink: 'pink', purple: 'purple', - gray: 'gray' + red: 'red', + yellow: 'yellow' } as const; export type LeadLabelColorConst = typeof LeadLabelColorConst[keyof typeof LeadLabelColorConst]; diff --git a/src/versions/v1/models/update-lead-label-request.ts b/src/versions/v1/models/update-lead-label-request.ts index d3d27ae7..6e0e7830 100644 --- a/src/versions/v1/models/update-lead-label-request.ts +++ b/src/versions/v1/models/update-lead-label-request.ts @@ -33,12 +33,16 @@ export interface UpdateLeadLabelRequest { } export const UpdateLeadLabelRequestColorConst = { - green: 'green', blue: 'blue', - red: 'red', - yellow: 'yellow', + brown: 'brown', + dark_gray: 'dark-gray', + gray: 'gray', + green: 'green', + orange: 'orange', + pink: 'pink', purple: 'purple', - gray: 'gray' + red: 'red', + yellow: 'yellow' } as const; export type UpdateLeadLabelRequestColorConst = typeof UpdateLeadLabelRequestColorConst[keyof typeof UpdateLeadLabelRequestColorConst];