diff --git a/CHANGELOG.md b/CHANGELOG.md index 4002c530..10d08ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ 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] +### Fixed +- Fixed type for `status` parameter on `GET /api/v2/deals/search` endpoint ## [35.1.0] - 2026-10-12 ### Added diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts index e03fdb11..0ccecc4a 100644 --- a/src/versions/v2/api/deals-api.ts +++ b/src/versions/v2/api/deals-api.ts @@ -871,14 +871,14 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {number} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000. * @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000. - * @param {Set<'open' | 'won' | 'lost'>} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000. + * @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000. * @param {Set<'deal.cc_email'>} [include_fields] Supports including optional fields in the results which are not provided by default * @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 {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @throws {RequiredError} */ - searchDeals: async (term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, status?: Set<'open' | 'won' | 'lost'>, include_fields?: Set<'deal.cc_email'>, limit?: number, cursor?: string, ): Promise => { + searchDeals: async (term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: Set<'deal.cc_email'>, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchDeals', 'term', term) const localVarPath = `/deals/search`; @@ -921,7 +921,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration } if (status) { - localVarQueryParameter['status'] = Array.from(status).join(COLLECTION_FORMATS.csv); + localVarQueryParameter['status'] = status; } if (include_fields) { @@ -1259,14 +1259,14 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {number} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000. * @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000. - * @param {Set<'open' | 'won' | 'lost'>} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000. + * @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000. * @param {Set<'deal.cc_email'>} [include_fields] Supports including optional fields in the results which are not provided by default * @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 {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @throws {RequiredError} */ - async searchDeals(term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, status?: Set<'open' | 'won' | 'lost'>, include_fields?: Set<'deal.cc_email'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchDeals(term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: Set<'deal.cc_email'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchDeals(term, fields, exact_match, person_id, organization_id, status, include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2032,10 +2032,10 @@ export interface DealsApiSearchDealsRequest { /** * Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000. - * @type {Set<'open' | 'won' | 'lost'>} + * @type {'open' | 'won' | 'lost'} * @memberof DealsApiSearchDeals */ - readonly status?: Set<'open' | 'won' | 'lost'> + readonly status?: 'open' | 'won' | 'lost' /** * Supports including optional fields in the results which are not provided by default