From cd2672740230b7257c8fc906651563c64bb1cb09 Mon Sep 17 00:00:00 2001 From: pipedrive-bot Date: Thu, 24 Sep 2026 11:53:51 +0000 Subject: [PATCH] Build 350 - version-major --- CHANGELOG.md | 9 + src/versions/v1/api/deal-fields-api.ts | 16 +- src/versions/v1/api/deals-api.ts | 16 +- src/versions/v1/api/filters-api.ts | 16 +- src/versions/v1/api/leads-api.ts | 28 +-- src/versions/v1/api/legacy-teams-api.ts | 64 +++---- .../v1/api/organization-fields-api.ts | 16 +- src/versions/v1/api/organizations-api.ts | 16 +- src/versions/v1/api/person-fields-api.ts | 16 +- src/versions/v1/api/persons-api.ts | 16 +- src/versions/v1/api/product-fields-api.ts | 16 +- .../v1/models/deal-all-of-creator-user-id.ts | 4 +- ...ssociated-product-files-response-all-of.ts | 2 +- src/versions/v2/api/activities-api.ts | 44 ++--- src/versions/v2/api/activity-fields-api.ts | 32 ++-- src/versions/v2/api/beta-api.ts | 16 +- src/versions/v2/api/deal-fields-api.ts | 32 ++-- src/versions/v2/api/deal-installments-api.ts | 6 +- src/versions/v2/api/deal-products-api.ts | 16 +- src/versions/v2/api/deals-api.ts | 178 +++++++++--------- src/versions/v2/api/item-search-api.ts | 40 ++-- src/versions/v2/api/leads-api.ts | 28 +-- .../v2/api/organization-fields-api.ts | 32 ++-- src/versions/v2/api/organizations-api.ts | 84 ++++----- src/versions/v2/api/person-fields-api.ts | 32 ++-- src/versions/v2/api/persons-api.ts | 112 +++++------ src/versions/v2/api/product-fields-api.ts | 50 ++--- src/versions/v2/api/products-api.ts | 76 ++++---- src/versions/v2/api/projects-api.ts | 16 +- .../v2/models/activity-item-location.ts | 74 ++++++++ src/versions/v2/models/activity-item.ts | 24 +-- .../v2/models/add-activity-request.ts | 7 +- .../v2/models/add-organization-request.ts | 2 +- src/versions/v2/models/add-person-request.ts | 12 +- .../models/add-product-field200-response.ts | 37 ++++ src/versions/v2/models/deal.ts | 2 +- ...ivities-response-all-of-additional-data.ts | 2 +- ...-activity-fields200-response-data-inner.ts | 4 +- ...h-response-all-of-data-items-inner-item.ts | 2 +- ...deals-products-response-additional-data.ts | 2 +- ...h-response-all-of-data-items-inner-item.ts | 2 +- ...t-product-fields200-response-data-inner.ts | 112 +++++++++++ .../models/get-product-fields200-response.ts | 45 +++++ ...h-response-all-of-data-items-inner-item.ts | 4 +- ...t-project-fields200-response-data-inner.ts | 3 +- src/versions/v2/models/index.ts | 4 + .../v2/models/lead-search-item-item.ts | 2 +- .../v2/models/organization-item-address.ts | 18 +- src/versions/v2/models/organization-item.ts | 4 +- src/versions/v2/models/person-item-address.ts | 18 +- src/versions/v2/models/person.ts | 6 +- src/versions/v2/models/stage-item.ts | 2 +- src/versions/v2/models/stage-item1.ts | 2 +- .../v2/models/update-organization-request.ts | 2 +- .../v2/models/update-person-request.ts | 10 +- 55 files changed, 855 insertions(+), 576 deletions(-) create mode 100644 src/versions/v2/models/activity-item-location.ts create mode 100644 src/versions/v2/models/add-product-field200-response.ts create mode 100644 src/versions/v2/models/get-product-fields200-response-data-inner.ts create mode 100644 src/versions/v2/models/get-product-fields200-response.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5ba862..c87f9673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ 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 several comma-separated query parameters that were still typed as `type: string` — changed to `type: array` with `uniqueItems: true`, `style: form`, `explode: false` (integer items unless noted): + - `ids` on the v1 delete-many endpoints (`DELETE /v1/dealFields`, `DELETE /v1/organizationFields`, `DELETE /v1/personFields`, `DELETE /v1/filters`, `DELETE /v1/productFields`) + - `exclude` on `GET /v1/activities` (`ActivityExclude`); `ActivityTypeIdsParameter` + - `items` on v1 activity/flow endpoints (`Items`, string items) + - `fields`/`include_fields` on `GET /v1/leads/search` (enumerated string items) + - `status` on `GET /api/v2/deals` (`DealStatus`, enumerated string items) + - `ids` on `DELETE /api/v2/deals/{id}/products` + - `fields`/`status`/`include_fields`/`item_types` parameters on `GET /api/v2/deals/search`, `GET /api/v2/itemSearch`, `GET /api/v2/leads/search`, `GET /api/v2/organizations/search`, `GET /api/v2/persons/search`, `GET /api/v2/products/search`, and `GET /api/v2/projects/search` ## [33.7.0] - 2026-09-08 ### Added diff --git a/src/versions/v1/api/deal-fields-api.ts b/src/versions/v1/api/deal-fields-api.ts index 612064f5..7b053c55 100644 --- a/src/versions/v1/api/deal-fields-api.ts +++ b/src/versions/v1/api/deal-fields-api.ts @@ -124,11 +124,11 @@ export const DealFieldsApiAxiosParamCreator = function (configuration?: Configur /** * Marks multiple deal fields as deleted. * @summary Delete multiple deal fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - deleteDealFields: async (ids: string, ): Promise => { + deleteDealFields: async (ids: Set, ): Promise => { // verify required parameter 'ids' is not null or undefined assertParamExists('deleteDealFields', 'ids', ids) const localVarPath = `/dealFields`; @@ -150,8 +150,8 @@ export const DealFieldsApiAxiosParamCreator = function (configuration?: Configur // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deal-fields:full", "admin"], configuration) - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } @@ -334,11 +334,11 @@ export const DealFieldsApiFp = function(configuration?: Configuration) { /** * Marks multiple deal fields as deleted. * @summary Delete multiple deal fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - async deleteDealFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async deleteDealFields(ids: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealFields(ids, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -486,10 +486,10 @@ export interface DealFieldsApiDeleteDealFieldRequest { export interface DealFieldsApiDeleteDealFieldsRequest { /** * The comma-separated field IDs to delete - * @type {string} + * @type {Set} * @memberof DealFieldsApiDeleteDealFields */ - readonly ids: string + readonly ids: Set } /** diff --git a/src/versions/v1/api/deals-api.ts b/src/versions/v1/api/deals-api.ts index dd2ef759..6c8d9542 100644 --- a/src/versions/v1/api/deals-api.ts +++ b/src/versions/v1/api/deals-api.ts @@ -852,11 +852,11 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. - * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). + * @param {Set} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). * @throws {RequiredError} */ - getDealUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => { + getDealUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: Set, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getDealUpdates', 'id', id) const localVarPath = `/deals/{id}/flow` @@ -891,8 +891,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['all_changes'] = all_changes; } - if (items !== undefined) { - localVarQueryParameter['items'] = items; + if (items) { + localVarQueryParameter['items'] = Array.from(items).join(COLLECTION_FORMATS.csv); } @@ -1357,11 +1357,11 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. - * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). + * @param {Set} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). * @throws {RequiredError} */ - async getDealUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDealUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDealUpdates(id, start, limit, all_changes, items, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2130,10 +2130,10 @@ export interface DealsApiGetDealUpdatesRequest { /** * A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). - * @type {string} + * @type {Set} * @memberof DealsApiGetDealUpdates */ - readonly items?: string + readonly items?: Set } /** diff --git a/src/versions/v1/api/filters-api.ts b/src/versions/v1/api/filters-api.ts index bb116817..ec897e7a 100644 --- a/src/versions/v1/api/filters-api.ts +++ b/src/versions/v1/api/filters-api.ts @@ -131,11 +131,11 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati /** * Marks multiple filters as deleted. * @summary Delete multiple filters in bulk - * @param {string} ids The comma-separated filter IDs to delete + * @param {Set} ids The comma-separated filter IDs to delete * @throws {RequiredError} */ - deleteFilters: async (ids: string, ): Promise => { + deleteFilters: async (ids: Set, ): Promise => { // verify required parameter 'ids' is not null or undefined assertParamExists('deleteFilters', 'ids', ids) const localVarPath = `/filters`; @@ -157,8 +157,8 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration) - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } @@ -384,11 +384,11 @@ export const FiltersApiFp = function(configuration?: Configuration) { /** * Marks multiple filters as deleted. * @summary Delete multiple filters in bulk - * @param {string} ids The comma-separated filter IDs to delete + * @param {Set} ids The comma-separated filter IDs to delete * @throws {RequiredError} */ - async deleteFilters(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async deleteFilters(ids: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFilters(ids, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -563,10 +563,10 @@ export interface FiltersApiDeleteFilterRequest { export interface FiltersApiDeleteFiltersRequest { /** * The comma-separated filter IDs to delete - * @type {string} + * @type {Set} * @memberof FiltersApiDeleteFilters */ - readonly ids: string + readonly ids: Set } /** diff --git a/src/versions/v1/api/leads-api.ts b/src/versions/v1/api/leads-api.ts index a71b40b5..d61aeba2 100644 --- a/src/versions/v1/api/leads-api.ts +++ b/src/versions/v1/api/leads-api.ts @@ -360,17 +360,17 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. + * @param {Set<'custom_fields' | 'notes' | 'title'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. * @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 leads by the provided person ID. The upper limit of found leads associated with the person is 2000. * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. - * @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'lead.was_seen'>} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page * @throws {RequiredError} */ - searchLeads: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', start?: number, limit?: number, ): Promise => { + searchLeads: async (term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: Set<'lead.was_seen'>, start?: number, limit?: number, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchLeads', 'term', term) const localVarPath = `/leads/search`; @@ -396,8 +396,8 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -412,8 +412,8 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['organization_id'] = organization_id; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (start !== undefined) { @@ -574,17 +574,17 @@ export const LeadsApiFp = function(configuration?: Configuration) { * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. + * @param {Set<'custom_fields' | 'notes' | 'title'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. * @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 leads by the provided person ID. The upper limit of found leads associated with the person is 2000. * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. - * @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'lead.was_seen'>} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page * @throws {RequiredError} */ - async searchLeads(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchLeads(term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: Set<'lead.was_seen'>, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchLeads(term, fields, exact_match, person_id, organization_id, include_fields, start, limit, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -883,10 +883,10 @@ export interface LeadsApiSearchLeadsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. - * @type {'custom_fields' | 'notes' | 'title'} + * @type {Set<'custom_fields' | 'notes' | 'title'>} * @memberof LeadsApiSearchLeads */ - readonly fields?: 'custom_fields' | 'notes' | 'title' + readonly fields?: Set<'custom_fields' | 'notes' | 'title'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. @@ -911,10 +911,10 @@ export interface LeadsApiSearchLeadsRequest { /** * Supports including optional fields in the results which are not provided by default - * @type {'lead.was_seen'} + * @type {Set<'lead.was_seen'>} * @memberof LeadsApiSearchLeads */ - readonly include_fields?: 'lead.was_seen' + readonly include_fields?: Set<'lead.was_seen'> /** * Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. diff --git a/src/versions/v1/api/legacy-teams-api.ts b/src/versions/v1/api/legacy-teams-api.ts index c7bd6e2b..485d086d 100644 --- a/src/versions/v1/api/legacy-teams-api.ts +++ b/src/versions/v1/api/legacy-teams-api.ts @@ -47,7 +47,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * Adds a new team to the company and returns the created object. * @summary Add a new team * @param {AddTeamRequest1} [AddTeamRequest1] - * @deprecated + * @throws {RequiredError} */ addTeam: async (AddTeamRequest1?: AddTeamRequest1, ): Promise => { @@ -89,7 +89,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * @summary Add users to a team * @param {number} id The ID of the team * @param {AddTeamUserRequest} [AddTeamUserRequest] - * @deprecated + * @throws {RequiredError} */ addTeamUser: async (id: number, AddTeamUserRequest?: AddTeamUserRequest, ): Promise => { @@ -134,7 +134,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * @summary Delete users from a team * @param {number} id The ID of the team * @param {DeleteTeamUserRequest} [DeleteTeamUserRequest] - * @deprecated + * @throws {RequiredError} */ deleteTeamUser: async (id: number, DeleteTeamUserRequest?: DeleteTeamUserRequest, ): Promise => { @@ -179,7 +179,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * @summary Get a single team * @param {number} id The ID of the team * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users - * @deprecated + * @throws {RequiredError} */ getTeam: async (id: number, skip_users?: 0 | 1, ): Promise => { @@ -224,7 +224,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * Returns a list of all user IDs within a team. * @summary Get all users in a team * @param {number} id The ID of the team - * @deprecated + * @throws {RequiredError} */ getTeamUsers: async (id: number, ): Promise => { @@ -266,7 +266,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * @summary Get all teams * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users - * @deprecated + * @throws {RequiredError} */ getTeams: async (order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise => { @@ -314,7 +314,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * @param {number} id The ID of the user * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users - * @deprecated + * @throws {RequiredError} */ getUserTeams: async (id: number, order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise => { @@ -364,7 +364,7 @@ export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configu * @summary Update a team * @param {number} id The ID of the team * @param {UpdateTeamRequest} [UpdateTeamRequest] - * @deprecated + * @throws {RequiredError} */ updateTeam: async (id: number, UpdateTeamRequest?: UpdateTeamRequest, ): Promise => { @@ -419,7 +419,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * Adds a new team to the company and returns the created object. * @summary Add a new team * @param {AddTeamRequest1} [AddTeamRequest1] - * @deprecated + * @throws {RequiredError} */ async addTeam(AddTeamRequest1?: AddTeamRequest1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -431,7 +431,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * @summary Add users to a team * @param {number} id The ID of the team * @param {AddTeamUserRequest} [AddTeamUserRequest] - * @deprecated + * @throws {RequiredError} */ async addTeamUser(id: number, AddTeamUserRequest?: AddTeamUserRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -443,7 +443,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * @summary Delete users from a team * @param {number} id The ID of the team * @param {DeleteTeamUserRequest} [DeleteTeamUserRequest] - * @deprecated + * @throws {RequiredError} */ async deleteTeamUser(id: number, DeleteTeamUserRequest?: DeleteTeamUserRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -455,7 +455,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * @summary Get a single team * @param {number} id The ID of the team * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users - * @deprecated + * @throws {RequiredError} */ async getTeam(id: number, skip_users?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -466,7 +466,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * Returns a list of all user IDs within a team. * @summary Get all users in a team * @param {number} id The ID of the team - * @deprecated + * @throws {RequiredError} */ async getTeamUsers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -478,7 +478,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * @summary Get all teams * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users - * @deprecated + * @throws {RequiredError} */ async getTeams(order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -491,7 +491,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * @param {number} id The ID of the user * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users - * @deprecated + * @throws {RequiredError} */ async getUserTeams(id: number, order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -503,7 +503,7 @@ export const LegacyTeamsApiFp = function(configuration?: Configuration) { * @summary Update a team * @param {number} id The ID of the team * @param {UpdateTeamRequest} [UpdateTeamRequest] - * @deprecated + * @throws {RequiredError} */ async updateTeam(id: number, UpdateTeamRequest?: UpdateTeamRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -524,7 +524,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Adds a new team to the company and returns the created object. * @summary Add a new team * @param {LegacyTeamsApiAddTeamRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ addTeam(requestParameters: LegacyTeamsApiAddTeamRequest = {}, ): Promise { @@ -534,7 +534,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Adds users to an existing team. * @summary Add users to a team * @param {LegacyTeamsApiAddTeamUserRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ addTeamUser(requestParameters: LegacyTeamsApiAddTeamUserRequest, ): Promise { @@ -544,7 +544,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Deletes users from an existing team. * @summary Delete users from a team * @param {LegacyTeamsApiDeleteTeamUserRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ deleteTeamUser(requestParameters: LegacyTeamsApiDeleteTeamUserRequest, ): Promise { @@ -554,7 +554,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Returns data about a specific team. * @summary Get a single team * @param {LegacyTeamsApiGetTeamRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ getTeam(requestParameters: LegacyTeamsApiGetTeamRequest, ): Promise { @@ -564,7 +564,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Returns a list of all user IDs within a team. * @summary Get all users in a team * @param {LegacyTeamsApiGetTeamUsersRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ getTeamUsers(requestParameters: LegacyTeamsApiGetTeamUsersRequest, ): Promise { @@ -574,7 +574,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Returns data about teams within the company. * @summary Get all teams * @param {LegacyTeamsApiGetTeamsRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ getTeams(requestParameters: LegacyTeamsApiGetTeamsRequest = {}, ): Promise { @@ -584,7 +584,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Returns data about all teams which have the specified user as a member. * @summary Get all teams of a user * @param {LegacyTeamsApiGetUserTeamsRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ getUserTeams(requestParameters: LegacyTeamsApiGetUserTeamsRequest, ): Promise { @@ -594,7 +594,7 @@ export const LegacyTeamsApiFactory = function (configuration?: Configuration, ba * Updates an existing team and returns the updated object. * @summary Update a team * @param {LegacyTeamsApiUpdateTeamRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} */ updateTeam(requestParameters: LegacyTeamsApiUpdateTeamRequest, ): Promise { @@ -775,7 +775,7 @@ export class LegacyTeamsApi extends BaseAPI { * Adds a new team to the company and returns the created object. * @summary Add a new team * @param {LegacyTeamsApiAddTeamRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -787,7 +787,7 @@ export class LegacyTeamsApi extends BaseAPI { * Adds users to an existing team. * @summary Add users to a team * @param {LegacyTeamsApiAddTeamUserRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -799,7 +799,7 @@ export class LegacyTeamsApi extends BaseAPI { * Deletes users from an existing team. * @summary Delete users from a team * @param {LegacyTeamsApiDeleteTeamUserRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -811,7 +811,7 @@ export class LegacyTeamsApi extends BaseAPI { * Returns data about a specific team. * @summary Get a single team * @param {LegacyTeamsApiGetTeamRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -823,7 +823,7 @@ export class LegacyTeamsApi extends BaseAPI { * Returns a list of all user IDs within a team. * @summary Get all users in a team * @param {LegacyTeamsApiGetTeamUsersRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -835,7 +835,7 @@ export class LegacyTeamsApi extends BaseAPI { * Returns data about teams within the company. * @summary Get all teams * @param {LegacyTeamsApiGetTeamsRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -847,7 +847,7 @@ export class LegacyTeamsApi extends BaseAPI { * Returns data about all teams which have the specified user as a member. * @summary Get all teams of a user * @param {LegacyTeamsApiGetUserTeamsRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ @@ -859,7 +859,7 @@ export class LegacyTeamsApi extends BaseAPI { * Updates an existing team and returns the updated object. * @summary Update a team * @param {LegacyTeamsApiUpdateTeamRequest} requestParameters Request parameters. - * @deprecated + * @throws {RequiredError} * @memberof LegacyTeamsApi */ diff --git a/src/versions/v1/api/organization-fields-api.ts b/src/versions/v1/api/organization-fields-api.ts index c41e4984..35b1cfd5 100644 --- a/src/versions/v1/api/organization-fields-api.ts +++ b/src/versions/v1/api/organization-fields-api.ts @@ -124,11 +124,11 @@ export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: /** * Marks multiple fields as deleted. * @summary Delete multiple organization fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - deleteOrganizationFields: async (ids: string, ): Promise => { + deleteOrganizationFields: async (ids: Set, ): Promise => { // verify required parameter 'ids' is not null or undefined assertParamExists('deleteOrganizationFields', 'ids', ids) const localVarPath = `/organizationFields`; @@ -150,8 +150,8 @@ export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contact-fields:full", "admin"], configuration) - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } @@ -334,11 +334,11 @@ export const OrganizationFieldsApiFp = function(configuration?: Configuration) { /** * Marks multiple fields as deleted. * @summary Delete multiple organization fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - async deleteOrganizationFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async deleteOrganizationFields(ids: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationFields(ids, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -486,10 +486,10 @@ export interface OrganizationFieldsApiDeleteOrganizationFieldRequest { export interface OrganizationFieldsApiDeleteOrganizationFieldsRequest { /** * The comma-separated field IDs to delete - * @type {string} + * @type {Set} * @memberof OrganizationFieldsApiDeleteOrganizationFields */ - readonly ids: string + readonly ids: Set } /** diff --git a/src/versions/v1/api/organizations-api.ts b/src/versions/v1/api/organizations-api.ts index 51f5026a..12a58f7a 100644 --- a/src/versions/v1/api/organizations-api.ts +++ b/src/versions/v1/api/organizations-api.ts @@ -350,11 +350,11 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted, returns changes without custom field updates. - * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). + * @param {Set} [items] A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). * @throws {RequiredError} */ - getOrganizationUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => { + getOrganizationUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: Set, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getOrganizationUpdates', 'id', id) const localVarPath = `/organizations/{id}/flow` @@ -389,8 +389,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['all_changes'] = all_changes; } - if (items !== undefined) { - localVarQueryParameter['items'] = items; + if (items) { + localVarQueryParameter['items'] = Array.from(items).join(COLLECTION_FORMATS.csv); } @@ -584,11 +584,11 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted, returns changes without custom field updates. - * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). + * @param {Set} [items] A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). * @throws {RequiredError} */ - async getOrganizationUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getOrganizationUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationUpdates(id, start, limit, all_changes, items, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -908,10 +908,10 @@ export interface OrganizationsApiGetOrganizationUpdatesRequest { /** * A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). - * @type {string} + * @type {Set} * @memberof OrganizationsApiGetOrganizationUpdates */ - readonly items?: string + readonly items?: Set } /** diff --git a/src/versions/v1/api/person-fields-api.ts b/src/versions/v1/api/person-fields-api.ts index d556d8c3..3d301997 100644 --- a/src/versions/v1/api/person-fields-api.ts +++ b/src/versions/v1/api/person-fields-api.ts @@ -124,11 +124,11 @@ export const PersonFieldsApiAxiosParamCreator = function (configuration?: Config /** * Marks multiple fields as deleted. * @summary Delete multiple person fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - deletePersonFields: async (ids: string, ): Promise => { + deletePersonFields: async (ids: Set, ): Promise => { // verify required parameter 'ids' is not null or undefined assertParamExists('deletePersonFields', 'ids', ids) const localVarPath = `/personFields`; @@ -150,8 +150,8 @@ export const PersonFieldsApiAxiosParamCreator = function (configuration?: Config // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contact-fields:full", "admin"], configuration) - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } @@ -334,11 +334,11 @@ export const PersonFieldsApiFp = function(configuration?: Configuration) { /** * Marks multiple fields as deleted. * @summary Delete multiple person fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - async deletePersonFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async deletePersonFields(ids: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonFields(ids, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -486,10 +486,10 @@ export interface PersonFieldsApiDeletePersonFieldRequest { export interface PersonFieldsApiDeletePersonFieldsRequest { /** * The comma-separated field IDs to delete - * @type {string} + * @type {Set} * @memberof PersonFieldsApiDeletePersonFields */ - readonly ids: string + readonly ids: Set } /** diff --git a/src/versions/v1/api/persons-api.ts b/src/versions/v1/api/persons-api.ts index d6630d2d..89be0cc0 100644 --- a/src/versions/v1/api/persons-api.ts +++ b/src/versions/v1/api/persons-api.ts @@ -518,11 +518,11 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. - * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). + * @param {Set} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). * @throws {RequiredError} */ - getPersonUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => { + getPersonUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: Set, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getPersonUpdates', 'id', id) const localVarPath = `/persons/{id}/flow` @@ -557,8 +557,8 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['all_changes'] = all_changes; } - if (items !== undefined) { - localVarQueryParameter['items'] = items; + if (items) { + localVarQueryParameter['items'] = Array.from(items).join(COLLECTION_FORMATS.csv); } @@ -792,11 +792,11 @@ export const PersonsApiFp = function(configuration?: Configuration) { * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. - * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). + * @param {Set} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). * @throws {RequiredError} */ - async getPersonUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getPersonUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonUpdates(id, start, limit, all_changes, items, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1237,10 +1237,10 @@ export interface PersonsApiGetPersonUpdatesRequest { /** * A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). - * @type {string} + * @type {Set} * @memberof PersonsApiGetPersonUpdates */ - readonly items?: string + readonly items?: Set } /** diff --git a/src/versions/v1/api/product-fields-api.ts b/src/versions/v1/api/product-fields-api.ts index 6f510a80..453bee1a 100644 --- a/src/versions/v1/api/product-fields-api.ts +++ b/src/versions/v1/api/product-fields-api.ts @@ -126,11 +126,11 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration?: Confi /** * Marks multiple fields as deleted. * @summary Delete multiple product fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - deleteProductFields: async (ids: string, ): Promise => { + deleteProductFields: async (ids: Set, ): Promise => { // verify required parameter 'ids' is not null or undefined assertParamExists('deleteProductFields', 'ids', ids) const localVarPath = `/productFields`; @@ -152,8 +152,8 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration?: Confi // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["product-fields:full", "products:full"], configuration) - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } @@ -336,11 +336,11 @@ export const ProductFieldsApiFp = function(configuration?: Configuration) { /** * Marks multiple fields as deleted. * @summary Delete multiple product fields in bulk - * @param {string} ids The comma-separated field IDs to delete + * @param {Set} ids The comma-separated field IDs to delete * @throws {RequiredError} */ - async deleteProductFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async deleteProductFields(ids: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductFields(ids, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -488,10 +488,10 @@ export interface ProductFieldsApiDeleteProductFieldRequest { export interface ProductFieldsApiDeleteProductFieldsRequest { /** * The comma-separated field IDs to delete - * @type {string} + * @type {Set} * @memberof ProductFieldsApiDeleteProductFields */ - readonly ids: string + readonly ids: Set } /** diff --git a/src/versions/v1/models/deal-all-of-creator-user-id.ts b/src/versions/v1/models/deal-all-of-creator-user-id.ts index dd8d7af7..adb18a6f 100644 --- a/src/versions/v1/models/deal-all-of-creator-user-id.ts +++ b/src/versions/v1/models/deal-all-of-creator-user-id.ts @@ -37,9 +37,9 @@ export interface DealAllOfCreatorUserId { 'email'?: string; /** * If the creator has a picture or not - * @type {boolean} + * @type {number} */ - 'has_pic'?: boolean; + 'has_pic'?: number; /** * The creator picture hash * @type {string} diff --git a/src/versions/v1/models/get-associated-product-files-response-all-of.ts b/src/versions/v1/models/get-associated-product-files-response-all-of.ts index 903d1c9f..4648f8b4 100644 --- a/src/versions/v1/models/get-associated-product-files-response-all-of.ts +++ b/src/versions/v1/models/get-associated-product-files-response-all-of.ts @@ -30,7 +30,7 @@ export interface GetAssociatedProductFilesResponseAllOf { * The array of files * @type {Array} */ - 'data': Array; + 'data': Array | null; /** * * @type {GetFieldsResponseAllOfAdditionalData} diff --git a/src/versions/v2/api/activities-api.ts b/src/versions/v2/api/activities-api.ts index 130d4282..4fab8567 100644 --- a/src/versions/v2/api/activities-api.ts +++ b/src/versions/v2/api/activities-api.ts @@ -121,7 +121,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * Returns data about all activities. * @summary Get all activities * @param {number} [filter_id] If supplied, only activities matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored. * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. @@ -132,13 +132,13 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * @param {string} [updated_until] If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time' | 'due_date'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set<'attendees'>} [include_fields] Optional comma separated string array of additional fields to include * @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} */ - getActivities: async (filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, done?: boolean, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time' | 'due_date', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise => { + getActivities: async (filter_id?: number, ids?: Set, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, done?: boolean, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time' | 'due_date', sort_direction?: 'asc' | 'desc', include_fields?: Set<'attendees'>, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/activities`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -162,8 +162,8 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['filter_id'] = filter_id; } - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } if (owner_id !== undefined) { @@ -206,8 +206,8 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['sort_direction'] = sort_direction; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -233,11 +233,11 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * Returns the details of a specific activity. * @summary Get details of an activity * @param {number} id The ID of the activity - * @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set<'attendees'>} [include_fields] Optional comma separated string array of additional fields to include * @throws {RequiredError} */ - getActivity: async (id: number, include_fields?: 'attendees', ): Promise => { + getActivity: async (id: number, include_fields?: Set<'attendees'>, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getActivity', 'id', id) const localVarPath = `/activities/{id}` @@ -260,8 +260,8 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } @@ -357,7 +357,7 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * Returns data about all activities. * @summary Get all activities * @param {number} [filter_id] If supplied, only activities matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored. * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. @@ -368,13 +368,13 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * @param {string} [updated_until] If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time' | 'due_date'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set<'attendees'>} [include_fields] Optional comma separated string array of additional fields to include * @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 getActivities(filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, done?: boolean, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time' | 'due_date', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getActivities(filter_id?: number, ids?: Set, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, done?: boolean, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time' | 'due_date', sort_direction?: 'asc' | 'desc', include_fields?: Set<'attendees'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, done, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -382,11 +382,11 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * Returns the details of a specific activity. * @summary Get details of an activity * @param {number} id The ID of the activity - * @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set<'attendees'>} [include_fields] Optional comma separated string array of additional fields to include * @throws {RequiredError} */ - async getActivity(id: number, include_fields?: 'attendees', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getActivity(id: number, include_fields?: Set<'attendees'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getActivity(id, include_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -508,10 +508,10 @@ export interface ActivitiesApiGetActivitiesRequest { /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. - * @type {string} + * @type {Set} * @memberof ActivitiesApiGetActivities */ - readonly ids?: string + readonly ids?: Set /** * If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored. @@ -585,10 +585,10 @@ export interface ActivitiesApiGetActivitiesRequest { /** * Optional comma separated string array of additional fields to include - * @type {'attendees'} + * @type {Set<'attendees'>} * @memberof ActivitiesApiGetActivities */ - readonly include_fields?: 'attendees' + readonly include_fields?: Set<'attendees'> /** * 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. @@ -620,10 +620,10 @@ export interface ActivitiesApiGetActivityRequest { /** * Optional comma separated string array of additional fields to include - * @type {'attendees'} + * @type {Set<'attendees'>} * @memberof ActivitiesApiGetActivity */ - readonly include_fields?: 'attendees' + readonly include_fields?: Set<'attendees'> } /** diff --git a/src/versions/v2/api/activity-fields-api.ts b/src/versions/v2/api/activity-fields-api.ts index 597a1648..72b93b4b 100644 --- a/src/versions/v2/api/activity-fields-api.ts +++ b/src/versions/v2/api/activity-fields-api.ts @@ -35,11 +35,11 @@ export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Conf * Returns metadata about a specific activity field. * @summary Get one activity field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - getActivityField: async (field_code: string, include_fields?: 'ui_visibility', ): Promise => { + getActivityField: async (field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise => { // verify required parameter 'field_code' is not null or undefined assertParamExists('getActivityField', 'field_code', field_code) const localVarPath = `/activityFields/{field_code}` @@ -62,8 +62,8 @@ export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Conf // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } @@ -80,13 +80,13 @@ export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Conf /** * Returns metadata about all activity fields in the company. * @summary Get all activity fields - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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} */ - getActivityFields: async (include_fields?: 'ui_visibility', limit?: number, cursor?: string, ): Promise => { + getActivityFields: async (include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/activityFields`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -106,8 +106,8 @@ export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Conf // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -144,24 +144,24 @@ export const ActivityFieldsApiFp = function(configuration?: Configuration) { * Returns metadata about a specific activity field. * @summary Get one activity field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - async getActivityField(field_code: string, include_fields?: 'ui_visibility', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getActivityField(field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityField(field_code, include_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metadata about all activity fields in the company. * @summary Get all activity fields - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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 getActivityFields(include_fields?: 'ui_visibility', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getActivityFields(include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityFields(include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -213,10 +213,10 @@ export interface ActivityFieldsApiGetActivityFieldRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility'} + * @type {Set<'ui_visibility'>} * @memberof ActivityFieldsApiGetActivityField */ - readonly include_fields?: 'ui_visibility' + readonly include_fields?: Set<'ui_visibility'> } /** @@ -227,10 +227,10 @@ export interface ActivityFieldsApiGetActivityFieldRequest { export interface ActivityFieldsApiGetActivityFieldsRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility'} + * @type {Set<'ui_visibility'>} * @memberof ActivityFieldsApiGetActivityFields */ - readonly include_fields?: 'ui_visibility' + readonly include_fields?: Set<'ui_visibility'> /** * 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. diff --git a/src/versions/v2/api/beta-api.ts b/src/versions/v2/api/beta-api.ts index 9cbeda31..0714c086 100644 --- a/src/versions/v2/api/beta-api.ts +++ b/src/versions/v2/api/beta-api.ts @@ -879,7 +879,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) * Searches all projects by title, description, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found projects can be filtered by person ID or organization ID. * @summary Search projects * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'notes' | 'title' | 'description'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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 projects by the provided person ID * @param {number} [organization_id] Will filter projects by the provided organization ID @@ -888,7 +888,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) * @throws {RequiredError} */ - searchProjects: async (term: string, fields?: 'custom_fields' | 'notes' | 'title' | 'description', exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise => { + searchProjects: async (term: string, fields?: Set<'custom_fields' | 'notes' | 'title' | 'description'>, exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchProjects', 'term', term) const localVarPath = `/projects/search`; @@ -914,8 +914,8 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -1399,7 +1399,7 @@ export const BetaApiFp = function(configuration?: Configuration) { * Searches all projects by title, description, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found projects can be filtered by person ID or organization ID. * @summary Search projects * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'notes' | 'title' | 'description'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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 projects by the provided person ID * @param {number} [organization_id] Will filter projects by the provided organization ID @@ -1408,7 +1408,7 @@ export const BetaApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async searchProjects(term: string, fields?: 'custom_fields' | 'notes' | 'title' | 'description', exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchProjects(term: string, fields?: Set<'custom_fields' | 'notes' | 'title' | 'description'>, exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchProjects(term, fields, exact_match, person_id, organization_id, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2040,10 +2040,10 @@ export interface BetaApiSearchProjectsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'custom_fields' | 'notes' | 'title' | 'description'} + * @type {Set<'custom_fields' | 'notes' | 'title' | 'description'>} * @memberof BetaApiSearchProjects */ - readonly fields?: 'custom_fields' | 'notes' | 'title' | 'description' + readonly fields?: Set<'custom_fields' | 'notes' | 'title' | 'description'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. diff --git a/src/versions/v2/api/deal-fields-api.ts b/src/versions/v2/api/deal-fields-api.ts index f6a11bb5..5079b5a4 100644 --- a/src/versions/v2/api/deal-fields-api.ts +++ b/src/versions/v2/api/deal-fields-api.ts @@ -227,11 +227,11 @@ export const DealFieldsApiAxiosParamCreator = function (configuration?: Configur * Returns metadata about a specific deal field. * @summary Get one deal field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - getDealField: async (field_code: string, include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', ): Promise => { + getDealField: async (field_code: string, include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, ): Promise => { // verify required parameter 'field_code' is not null or undefined assertParamExists('getDealField', 'field_code', field_code) const localVarPath = `/dealFields/{field_code}` @@ -254,8 +254,8 @@ export const DealFieldsApiAxiosParamCreator = function (configuration?: Configur // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin", "deal-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } @@ -272,13 +272,13 @@ export const DealFieldsApiAxiosParamCreator = function (configuration?: Configur /** * Returns metadata about all deal fields in the company. * @summary Get all deal fields - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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} */ - getDealFields: async (include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', limit?: number, cursor?: string, ): Promise => { + getDealFields: async (include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/dealFields`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -298,8 +298,8 @@ export const DealFieldsApiAxiosParamCreator = function (configuration?: Configur // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin", "deal-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -476,24 +476,24 @@ export const DealFieldsApiFp = function(configuration?: Configuration) { * Returns metadata about a specific deal field. * @summary Get one deal field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - async getDealField(field_code: string, include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDealField(field_code: string, include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDealField(field_code, include_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metadata about all deal fields in the company. * @summary Get all deal fields - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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 getDealFields(include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDealFields(include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDealFields(include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -699,10 +699,10 @@ export interface DealFieldsApiGetDealFieldRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} + * @type {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} * @memberof DealFieldsApiGetDealField */ - readonly include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields' + readonly include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'> } /** @@ -713,10 +713,10 @@ export interface DealFieldsApiGetDealFieldRequest { export interface DealFieldsApiGetDealFieldsRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} + * @type {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} * @memberof DealFieldsApiGetDealFields */ - readonly include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields' + readonly include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'> /** * 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. diff --git a/src/versions/v2/api/deal-installments-api.ts b/src/versions/v2/api/deal-installments-api.ts index 2d6137a3..28405dbf 100644 --- a/src/versions/v2/api/deal-installments-api.ts +++ b/src/versions/v2/api/deal-installments-api.ts @@ -71,7 +71,7 @@ export const DealInstallmentsApiAxiosParamCreator = function (configuration?: Co // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) @@ -177,7 +177,7 @@ export const DealInstallmentsApiAxiosParamCreator = function (configuration?: Co // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) @@ -226,7 +226,7 @@ export const DealInstallmentsApiAxiosParamCreator = function (configuration?: Co // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) diff --git a/src/versions/v2/api/deal-products-api.ts b/src/versions/v2/api/deal-products-api.ts index 61bdbe04..08ef08e7 100644 --- a/src/versions/v2/api/deal-products-api.ts +++ b/src/versions/v2/api/deal-products-api.ts @@ -182,11 +182,11 @@ export const DealProductsApiAxiosParamCreator = function (configuration?: Config * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request. * @summary Delete many products from a deal * @param {number} id The ID of the deal - * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. + * @param {Set} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. * @throws {RequiredError} */ - deleteManyDealProducts: async (id: number, ids?: string, ): Promise => { + deleteManyDealProducts: async (id: number, ids?: Set, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteManyDealProducts', 'id', id) const localVarPath = `/deals/{id}/products` @@ -209,8 +209,8 @@ export const DealProductsApiAxiosParamCreator = function (configuration?: Config // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration) - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } @@ -449,11 +449,11 @@ export const DealProductsApiFp = function(configuration?: Configuration) { * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request. * @summary Delete many products from a deal * @param {number} id The ID of the deal - * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. + * @param {Set} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. * @throws {RequiredError} */ - async deleteManyDealProducts(id: number, ids?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async deleteManyDealProducts(id: number, ids?: Set, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteManyDealProducts(id, ids, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -661,10 +661,10 @@ export interface DealProductsApiDeleteManyDealProductsRequest { /** * Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. - * @type {string} + * @type {Set} * @memberof DealProductsApiDeleteManyDealProducts */ - readonly ids?: string + readonly ids?: Set } /** diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts index d7a4c191..e03fdb11 100644 --- a/src/versions/v2/api/deals-api.ts +++ b/src/versions/v2/api/deals-api.ts @@ -226,7 +226,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) @@ -370,25 +370,25 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Returns data about all archived deals. * @summary Get all archived deals * @param {number} [filter_id] If supplied, only deals matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. - * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @param {Set<'open' | 'won' | 'lost' | 'deleted'>} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @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} */ - getArchivedDeals: async (filter_id?: number, ids?: string, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id', custom_fields?: string, limit?: number, cursor?: string, ): Promise => { + getArchivedDeals: async (filter_id?: number, ids?: Set, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: Set<'open' | 'won' | 'lost' | 'deleted'>, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>, custom_fields?: Set, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/deals/archived`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -412,8 +412,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['filter_id'] = filter_id; } - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } if (owner_id !== undefined) { @@ -436,8 +436,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['stage_id'] = stage_id; } - if (status !== undefined) { - localVarQueryParameter['status'] = status; + if (status) { + localVarQueryParameter['status'] = Array.from(status).join(COLLECTION_FORMATS.csv); } if (updated_since !== undefined) { @@ -456,12 +456,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['sort_direction'] = sort_direction; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -487,14 +487,14 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Returns the details of a specific deal. * @summary Get details of a deal * @param {number} id The ID of the deal - * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ - getDeal: async (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, ): Promise => { + getDeal: async (id: number, include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getDeal', 'id', id) const localVarPath = `/deals/{id}` @@ -517,12 +517,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (include_option_labels !== undefined) { @@ -695,19 +695,19 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Returns data about all not archived deals. * @summary Get all deals * @param {number} [filter_id] If supplied, only deals matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. - * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @param {Set<'open' | 'won' | 'lost' | 'deleted'>} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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. @@ -715,7 +715,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @throws {RequiredError} */ - getDeals: async (filter_id?: number, ids?: string, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise => { + getDeals: async (filter_id?: number, ids?: Set, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: Set<'open' | 'won' | 'lost' | 'deleted'>, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/deals`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -739,8 +739,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['filter_id'] = filter_id; } - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } if (owner_id !== undefined) { @@ -763,8 +763,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['stage_id'] = stage_id; } - if (status !== undefined) { - localVarQueryParameter['status'] = status; + if (status) { + localVarQueryParameter['status'] = Array.from(status).join(COLLECTION_FORMATS.csv); } if (updated_since !== undefined) { @@ -783,12 +783,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['sort_direction'] = sort_direction; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (include_option_labels !== undefined) { @@ -847,7 +847,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) @@ -867,18 +867,18 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID. * @summary Search deals * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'notes' | 'title'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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 {'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 {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default + * @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 {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?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: '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?: Set<'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`; @@ -904,8 +904,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -920,12 +920,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['organization_id'] = organization_id; } - if (status !== undefined) { - localVarQueryParameter['status'] = status; + if (status) { + localVarQueryParameter['status'] = Array.from(status).join(COLLECTION_FORMATS.csv); } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -980,7 +980,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) @@ -1136,25 +1136,25 @@ export const DealsApiFp = function(configuration?: Configuration) { * Returns data about all archived deals. * @summary Get all archived deals * @param {number} [filter_id] If supplied, only deals matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. - * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @param {Set<'open' | 'won' | 'lost' | 'deleted'>} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @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 getArchivedDeals(filter_id?: number, ids?: string, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id', custom_fields?: string, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getArchivedDeals(filter_id?: number, ids?: Set, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: Set<'open' | 'won' | 'lost' | 'deleted'>, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>, custom_fields?: Set, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getArchivedDeals(filter_id, ids, owner_id, person_id, org_id, pipeline_id, stage_id, status, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1162,14 +1162,14 @@ export const DealsApiFp = function(configuration?: Configuration) { * Returns the details of a specific deal. * @summary Get details of a deal * @param {number} id The ID of the deal - * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ - async getDeal(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDeal(id: number, include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, include_fields, custom_fields, include_option_labels, include_labels, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1215,19 +1215,19 @@ export const DealsApiFp = function(configuration?: Configuration) { * Returns data about all not archived deals. * @summary Get all deals * @param {number} [filter_id] If supplied, only deals matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. - * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @param {Set<'open' | 'won' | 'lost' | 'deleted'>} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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. @@ -1235,7 +1235,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async getDeals(filter_id?: number, ids?: string, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getDeals(filter_id?: number, ids?: Set, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: Set<'open' | 'won' | 'lost' | 'deleted'>, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDeals(filter_id, ids, owner_id, person_id, org_id, pipeline_id, stage_id, status, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, include_option_labels, include_labels, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1255,18 +1255,18 @@ export const DealsApiFp = function(configuration?: Configuration) { * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID. * @summary Search deals * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'notes' | 'title'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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 {'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 {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default + * @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 {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?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: '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?: Set<'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); }, @@ -1612,10 +1612,10 @@ export interface DealsApiGetArchivedDealsRequest { /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. - * @type {string} + * @type {Set} * @memberof DealsApiGetArchivedDeals */ - readonly ids?: string + readonly ids?: Set /** * If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. @@ -1654,10 +1654,10 @@ export interface DealsApiGetArchivedDealsRequest { /** * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. - * @type {'open' | 'won' | 'lost' | 'deleted'} + * @type {Set<'open' | 'won' | 'lost' | 'deleted'>} * @memberof DealsApiGetArchivedDeals */ - readonly status?: 'open' | 'won' | 'lost' | 'deleted' + readonly status?: Set<'open' | 'won' | 'lost' | 'deleted'> /** * If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. @@ -1689,17 +1689,17 @@ export interface DealsApiGetArchivedDealsRequest { /** * Optional comma separated string array of additional fields to include - * @type {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} * @memberof DealsApiGetArchivedDeals */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof DealsApiGetArchivedDeals */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * 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. @@ -1731,17 +1731,17 @@ export interface DealsApiGetDealRequest { /** * Optional comma separated string array of additional fields to include - * @type {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} * @memberof DealsApiGetDeal */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof DealsApiGetDeal */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id @@ -1850,10 +1850,10 @@ export interface DealsApiGetDealsRequest { /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. - * @type {string} + * @type {Set} * @memberof DealsApiGetDeals */ - readonly ids?: string + readonly ids?: Set /** * If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. @@ -1892,10 +1892,10 @@ export interface DealsApiGetDealsRequest { /** * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. - * @type {'open' | 'won' | 'lost' | 'deleted'} + * @type {Set<'open' | 'won' | 'lost' | 'deleted'>} * @memberof DealsApiGetDeals */ - readonly status?: 'open' | 'won' | 'lost' | 'deleted' + readonly status?: Set<'open' | 'won' | 'lost' | 'deleted'> /** * If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. @@ -1927,17 +1927,17 @@ export interface DealsApiGetDealsRequest { /** * Optional comma separated string array of additional fields to include - * @type {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'>} * @memberof DealsApiGetDeals */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'smart_bcc_email' | 'source_lead_id'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof DealsApiGetDeals */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id @@ -2004,10 +2004,10 @@ export interface DealsApiSearchDealsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'custom_fields' | 'notes' | 'title'} + * @type {Set<'custom_fields' | 'notes' | 'title'>} * @memberof DealsApiSearchDeals */ - readonly fields?: 'custom_fields' | 'notes' | 'title' + readonly fields?: Set<'custom_fields' | 'notes' | 'title'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. @@ -2032,17 +2032,17 @@ 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 {'open' | 'won' | 'lost'} + * @type {Set<'open' | 'won' | 'lost'>} * @memberof DealsApiSearchDeals */ - readonly status?: 'open' | 'won' | 'lost' + readonly status?: Set<'open' | 'won' | 'lost'> /** * Supports including optional fields in the results which are not provided by default - * @type {'deal.cc_email'} + * @type {Set<'deal.cc_email'>} * @memberof DealsApiSearchDeals */ - readonly include_fields?: 'deal.cc_email' + readonly include_fields?: Set<'deal.cc_email'> /** * 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. diff --git a/src/versions/v2/api/item-search-api.ts b/src/versions/v2/api/item-search-api.ts index d5c410c1..dcabeedb 100644 --- a/src/versions/v2/api/item-search-api.ts +++ b/src/versions/v2/api/item-search-api.ts @@ -35,17 +35,17 @@ export const ItemSearchApiAxiosParamCreator = function (configuration?: Configur * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. - * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'>} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. + * @param {Set<'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. - * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default. + * @param {Set<'deal.cc_email' | 'person.picture' | 'product.price'>} [include_fields] A comma-separated string array. 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 100 is allowed. * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @throws {RequiredError} */ - searchItem: async (term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', limit?: number, cursor?: string, ): Promise => { + searchItem: async (term: string, item_types?: Set<'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'>, fields?: Set<'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'>, search_for_related_items?: boolean, exact_match?: boolean, include_fields?: Set<'deal.cc_email' | 'person.picture' | 'product.price'>, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchItem', 'term', term) const localVarPath = `/itemSearch`; @@ -71,12 +71,12 @@ export const ItemSearchApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['term'] = term; } - if (item_types !== undefined) { - localVarQueryParameter['item_types'] = item_types; + if (item_types) { + localVarQueryParameter['item_types'] = Array.from(item_types).join(COLLECTION_FORMATS.csv); } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (search_for_related_items !== undefined) { @@ -87,8 +87,8 @@ export const ItemSearchApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['exact_match'] = exact_match; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -198,17 +198,17 @@ export const ItemSearchApiFp = function(configuration?: Configuration) { * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. - * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'>} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. + * @param {Set<'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. - * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default. + * @param {Set<'deal.cc_email' | 'person.picture' | 'product.price'>} [include_fields] A comma-separated string array. 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 100 is allowed. * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @throws {RequiredError} */ - async searchItem(term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchItem(term: string, item_types?: Set<'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'>, fields?: Set<'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'>, search_for_related_items?: boolean, exact_match?: boolean, include_fields?: Set<'deal.cc_email' | 'person.picture' | 'product.price'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchItem(term, item_types, fields, search_for_related_items, exact_match, include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -276,17 +276,17 @@ export interface ItemSearchApiSearchItemRequest { /** * A comma-separated string array. The type of items to perform the search from. Defaults to all. - * @type {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} + * @type {Set<'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'>} * @memberof ItemSearchApiSearchItem */ - readonly item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project' + readonly item_types?: Set<'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'> /** * A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'} + * @type {Set<'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'>} * @memberof ItemSearchApiSearchItem */ - readonly fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description' + readonly fields?: Set<'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'> /** * When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization @@ -304,10 +304,10 @@ export interface ItemSearchApiSearchItemRequest { /** * A comma-separated string array. Supports including optional fields in the results which are not provided by default. - * @type {'deal.cc_email' | 'person.picture' | 'product.price'} + * @type {Set<'deal.cc_email' | 'person.picture' | 'product.price'>} * @memberof ItemSearchApiSearchItem */ - readonly include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price' + readonly include_fields?: Set<'deal.cc_email' | 'person.picture' | 'product.price'> /** * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 100 is allowed. diff --git a/src/versions/v2/api/leads-api.ts b/src/versions/v2/api/leads-api.ts index 0160ea7e..e145855f 100644 --- a/src/versions/v2/api/leads-api.ts +++ b/src/versions/v2/api/leads-api.ts @@ -131,17 +131,17 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. + * @param {Set<'custom_fields' | 'notes' | 'title'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. * @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 leads by the provided person ID. The upper limit of found leads associated with the person is 2000. * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. - * @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'lead.was_seen'>} [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} */ - searchLeads: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', limit?: number, cursor?: string, ): Promise => { + searchLeads: async (term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: Set<'lead.was_seen'>, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchLeads', 'term', term) const localVarPath = `/leads/search`; @@ -167,8 +167,8 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -183,8 +183,8 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['organization_id'] = organization_id; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -245,17 +245,17 @@ export const LeadsApiFp = function(configuration?: Configuration) { * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. + * @param {Set<'custom_fields' | 'notes' | 'title'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. * @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 leads by the provided person ID. The upper limit of found leads associated with the person is 2000. * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. - * @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'lead.was_seen'>} [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 searchLeads(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchLeads(term: string, fields?: Set<'custom_fields' | 'notes' | 'title'>, exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: Set<'lead.was_seen'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchLeads(term, fields, exact_match, person_id, organization_id, include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -359,10 +359,10 @@ export interface LeadsApiSearchLeadsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. - * @type {'custom_fields' | 'notes' | 'title'} + * @type {Set<'custom_fields' | 'notes' | 'title'>} * @memberof LeadsApiSearchLeads */ - readonly fields?: 'custom_fields' | 'notes' | 'title' + readonly fields?: Set<'custom_fields' | 'notes' | 'title'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. @@ -387,10 +387,10 @@ export interface LeadsApiSearchLeadsRequest { /** * Supports including optional fields in the results which are not provided by default - * @type {'lead.was_seen'} + * @type {Set<'lead.was_seen'>} * @memberof LeadsApiSearchLeads */ - readonly include_fields?: 'lead.was_seen' + readonly include_fields?: Set<'lead.was_seen'> /** * 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. diff --git a/src/versions/v2/api/organization-fields-api.ts b/src/versions/v2/api/organization-fields-api.ts index ad901ea8..f4290ab0 100644 --- a/src/versions/v2/api/organization-fields-api.ts +++ b/src/versions/v2/api/organization-fields-api.ts @@ -227,11 +227,11 @@ export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: * Returns metadata about a specific organization field. * @summary Get one organization field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - getOrganizationField: async (field_code: string, include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', ): Promise => { + getOrganizationField: async (field_code: string, include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, ): Promise => { // verify required parameter 'field_code' is not null or undefined assertParamExists('getOrganizationField', 'field_code', field_code) const localVarPath = `/organizationFields/{field_code}` @@ -254,8 +254,8 @@ export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full", "admin", "contact-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } @@ -272,13 +272,13 @@ export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: /** * Returns metadata about all organization fields in the company. * @summary Get all organization fields - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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} */ - getOrganizationFields: async (include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', limit?: number, cursor?: string, ): Promise => { + getOrganizationFields: async (include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/organizationFields`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -298,8 +298,8 @@ export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full", "admin", "contact-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -476,24 +476,24 @@ export const OrganizationFieldsApiFp = function(configuration?: Configuration) { * Returns metadata about a specific organization field. * @summary Get one organization field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - async getOrganizationField(field_code: string, include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getOrganizationField(field_code: string, include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationField(field_code, include_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metadata about all organization fields in the company. * @summary Get all organization fields - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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 getOrganizationFields(include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getOrganizationFields(include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationFields(include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -699,10 +699,10 @@ export interface OrganizationFieldsApiGetOrganizationFieldRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} + * @type {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} * @memberof OrganizationFieldsApiGetOrganizationField */ - readonly include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields' + readonly include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'> } /** @@ -713,10 +713,10 @@ export interface OrganizationFieldsApiGetOrganizationFieldRequest { export interface OrganizationFieldsApiGetOrganizationFieldsRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} + * @type {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} * @memberof OrganizationFieldsApiGetOrganizationFields */ - readonly include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields' + readonly include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'> /** * 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. diff --git a/src/versions/v2/api/organizations-api.ts b/src/versions/v2/api/organizations-api.ts index 1f2c23dc..1351a0a9 100644 --- a/src/versions/v2/api/organizations-api.ts +++ b/src/versions/v2/api/organizations-api.ts @@ -225,14 +225,14 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Returns the details of a specific organization. * @summary Get details of a organization * @param {number} id The ID of the organization - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ - getOrganization: async (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, ): Promise => { + getOrganization: async (id: number, include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getOrganization', 'id', id) const localVarPath = `/organizations/{id}` @@ -255,12 +255,12 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (include_option_labels !== undefined) { @@ -388,14 +388,14 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Returns data about all organizations. * @summary Get all organizations * @param {number} [filter_id] If supplied, only organizations matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only organizations owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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. @@ -403,7 +403,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @throws {RequiredError} */ - getOrganizations: async (filter_id?: number, ids?: string, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise => { + getOrganizations: async (filter_id?: number, ids?: Set, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/organizations`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -427,8 +427,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['filter_id'] = filter_id; } - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } if (owner_id !== undefined) { @@ -451,12 +451,12 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['sort_direction'] = sort_direction; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (include_option_labels !== undefined) { @@ -490,14 +490,14 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search organizations * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'address' | 'custom_fields' | 'notes' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'address' | 'custom_fields' | 'notes' | 'name'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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} [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} */ - searchOrganization: async (term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, limit?: number, cursor?: string, ): Promise => { + searchOrganization: async (term: string, fields?: Set<'address' | 'custom_fields' | 'notes' | 'name'>, exact_match?: boolean, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchOrganization', 'term', term) const localVarPath = `/organizations/search`; @@ -523,8 +523,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -656,14 +656,14 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * Returns the details of a specific organization. * @summary Get details of a organization * @param {number} id The ID of the organization - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ - async getOrganization(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getOrganization(id: number, include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(id, include_fields, custom_fields, include_option_labels, include_labels, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -697,14 +697,14 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * Returns data about all organizations. * @summary Get all organizations * @param {number} [filter_id] If supplied, only organizations matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only organizations owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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. @@ -712,7 +712,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async getOrganizations(filter_id?: number, ids?: string, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getOrganizations(filter_id?: number, ids?: Set, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizations(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, include_option_labels, include_labels, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -720,14 +720,14 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search organizations * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'address' | 'custom_fields' | 'notes' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'address' | 'custom_fields' | 'notes' | 'name'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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} [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 searchOrganization(term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchOrganization(term: string, fields?: Set<'address' | 'custom_fields' | 'notes' | 'name'>, exact_match?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchOrganization(term, fields, exact_match, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -941,17 +941,17 @@ export interface OrganizationsApiGetOrganizationRequest { /** * Optional comma separated string array of additional fields to include - * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>} * @memberof OrganizationsApiGetOrganization */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof OrganizationsApiGetOrganization */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id @@ -1039,10 +1039,10 @@ export interface OrganizationsApiGetOrganizationsRequest { /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. - * @type {string} + * @type {Set} * @memberof OrganizationsApiGetOrganizations */ - readonly ids?: string + readonly ids?: Set /** * If supplied, only organizations owned by the specified user are returned. If filter_id is provided, this is ignored. @@ -1081,17 +1081,17 @@ export interface OrganizationsApiGetOrganizationsRequest { /** * Optional comma separated string array of additional fields to include - * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'>} * @memberof OrganizationsApiGetOrganizations */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'smart_bcc_email'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof OrganizationsApiGetOrganizations */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id @@ -1137,10 +1137,10 @@ export interface OrganizationsApiSearchOrganizationRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'address' | 'custom_fields' | 'notes' | 'name'} + * @type {Set<'address' | 'custom_fields' | 'notes' | 'name'>} * @memberof OrganizationsApiSearchOrganization */ - readonly fields?: 'address' | 'custom_fields' | 'notes' | 'name' + readonly fields?: Set<'address' | 'custom_fields' | 'notes' | 'name'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. diff --git a/src/versions/v2/api/person-fields-api.ts b/src/versions/v2/api/person-fields-api.ts index ba4cbcbd..2571162c 100644 --- a/src/versions/v2/api/person-fields-api.ts +++ b/src/versions/v2/api/person-fields-api.ts @@ -227,11 +227,11 @@ export const PersonFieldsApiAxiosParamCreator = function (configuration?: Config * Returns metadata about a specific person field. * @summary Get one person field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - getPersonField: async (field_code: string, include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', ): Promise => { + getPersonField: async (field_code: string, include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, ): Promise => { // verify required parameter 'field_code' is not null or undefined assertParamExists('getPersonField', 'field_code', field_code) const localVarPath = `/personFields/{field_code}` @@ -254,8 +254,8 @@ export const PersonFieldsApiAxiosParamCreator = function (configuration?: Config // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full", "admin", "contact-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } @@ -272,13 +272,13 @@ export const PersonFieldsApiAxiosParamCreator = function (configuration?: Config /** * Returns metadata about all person fields in the company. * @summary Get all person fields - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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} */ - getPersonFields: async (include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', limit?: number, cursor?: string, ): Promise => { + getPersonFields: async (include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/personFields`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -298,8 +298,8 @@ export const PersonFieldsApiAxiosParamCreator = function (configuration?: Config // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full", "admin", "contact-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -476,24 +476,24 @@ export const PersonFieldsApiFp = function(configuration?: Configuration) { * Returns metadata about a specific person field. * @summary Get one person field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - async getPersonField(field_code: string, include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getPersonField(field_code: string, include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonField(field_code, include_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metadata about all person fields in the company. * @summary Get all person fields - * @param {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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 getPersonFields(include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getPersonFields(include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFields(include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -699,10 +699,10 @@ export interface PersonFieldsApiGetPersonFieldRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} + * @type {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} * @memberof PersonFieldsApiGetPersonField */ - readonly include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields' + readonly include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'> } /** @@ -713,10 +713,10 @@ export interface PersonFieldsApiGetPersonFieldRequest { export interface PersonFieldsApiGetPersonFieldsRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields'} + * @type {Set<'ui_visibility' | 'important_fields' | 'required_fields'>} * @memberof PersonFieldsApiGetPersonFields */ - readonly include_fields?: 'ui_visibility' | 'important_fields' | 'required_fields' | 'ui_visibility,important_fields' | 'ui_visibility,required_fields' | 'important_fields,required_fields' | 'ui_visibility,important_fields,required_fields' + readonly include_fields?: Set<'ui_visibility' | 'important_fields' | 'required_fields'> /** * 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. diff --git a/src/versions/v2/api/persons-api.ts b/src/versions/v2/api/persons-api.ts index f6520679..e968d0b8 100644 --- a/src/versions/v2/api/persons-api.ts +++ b/src/versions/v2/api/persons-api.ts @@ -52,7 +52,7 @@ import { UpsertPersonResponse } from '../models'; export const PersonsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {AddPersonRequest} [AddPersonRequest] @@ -227,14 +227,14 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get details of a person * @param {number} id The ID of the person - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ - getPerson: async (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, ): Promise => { + getPerson: async (id: number, include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getPerson', 'id', id) const localVarPath = `/persons/{id}` @@ -257,12 +257,12 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (include_option_labels !== undefined) { @@ -431,7 +431,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get all persons * @param {number} [filter_id] If supplied, only persons matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored. @@ -439,8 +439,8 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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. @@ -448,7 +448,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ - getPersons: async (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise => { + getPersons: async (filter_id?: number, ids?: Set, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/persons`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -472,8 +472,8 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['filter_id'] = filter_id; } - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); } if (owner_id !== undefined) { @@ -504,12 +504,12 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['sort_direction'] = sort_direction; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (include_option_labels !== undefined) { @@ -543,16 +543,16 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'email' | 'notes' | 'phone' | 'name'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. - * @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'person.picture'>} [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} */ - searchPersons: async (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string, ): Promise => { + searchPersons: async (term: string, fields?: Set<'custom_fields' | 'email' | 'notes' | 'phone' | 'name'>, exact_match?: boolean, organization_id?: number, include_fields?: Set<'person.picture'>, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchPersons', 'term', term) const localVarPath = `/persons/search`; @@ -578,8 +578,8 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -590,8 +590,8 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['organization_id'] = organization_id; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -614,7 +614,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {number} id The ID of the person * @param {UpdatePersonRequest} [UpdatePersonRequest] @@ -670,7 +670,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PersonsApiAxiosParamCreator(configuration) return { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {AddPersonRequest} [AddPersonRequest] @@ -719,14 +719,14 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get details of a person * @param {number} id The ID of the person - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ - async getPerson(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getPerson(id: number, include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPerson(id, include_fields, custom_fields, include_option_labels, include_labels, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -771,7 +771,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get all persons * @param {number} [filter_id] If supplied, only persons matching the specified filter are returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored. @@ -779,8 +779,8 @@ export const PersonsApiFp = function(configuration?: Configuration) { * @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. - * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. - * @param {string} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @param {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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. @@ -788,7 +788,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getPersons(filter_id?: number, ids?: Set, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>, custom_fields?: Set, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, include_option_labels, include_labels, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -796,21 +796,21 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'email' | 'notes' | 'phone' | 'name'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. - * @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'person.picture'>} [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 searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchPersons(term: string, fields?: Set<'custom_fields' | 'email' | 'notes' | 'phone' | 'name'>, exact_match?: boolean, organization_id?: number, include_fields?: Set<'person.picture'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchPersons(term, fields, exact_match, organization_id, include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {number} id The ID of the person * @param {UpdatePersonRequest} [UpdatePersonRequest] @@ -832,7 +832,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa const localVarFp = PersonsApiFp(configuration) return { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. @@ -932,7 +932,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); }, /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. @@ -1029,17 +1029,17 @@ export interface PersonsApiGetPersonRequest { /** * Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. - * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>} * @memberof PersonsApiGetPerson */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof PersonsApiGetPerson */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id @@ -1141,10 +1141,10 @@ export interface PersonsApiGetPersonsRequest { /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. - * @type {string} + * @type {Set} * @memberof PersonsApiGetPersons */ - readonly ids?: string + readonly ids?: Set /** * If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored. @@ -1197,17 +1197,17 @@ export interface PersonsApiGetPersonsRequest { /** * Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. - * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} + * @type {Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'>} * @memberof PersonsApiGetPersons */ - readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email' + readonly include_fields?: Set<'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'> /** * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. - * @type {string} + * @type {Set} * @memberof PersonsApiGetPersons */ - readonly custom_fields?: string + readonly custom_fields?: Set /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id @@ -1253,10 +1253,10 @@ export interface PersonsApiSearchPersonsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} + * @type {Set<'custom_fields' | 'email' | 'notes' | 'phone' | 'name'>} * @memberof PersonsApiSearchPersons */ - readonly fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name' + readonly fields?: Set<'custom_fields' | 'email' | 'notes' | 'phone' | 'name'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. @@ -1274,10 +1274,10 @@ export interface PersonsApiSearchPersonsRequest { /** * Supports including optional fields in the results which are not provided by default - * @type {'person.picture'} + * @type {Set<'person.picture'>} * @memberof PersonsApiSearchPersons */ - readonly include_fields?: 'person.picture' + readonly include_fields?: Set<'person.picture'> /** * 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. @@ -1323,7 +1323,7 @@ export interface PersonsApiUpdatePersonRequest { */ export class PersonsApi extends BaseAPI { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. @@ -1443,7 +1443,7 @@ export class PersonsApi extends BaseAPI { } /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. diff --git a/src/versions/v2/api/product-fields-api.ts b/src/versions/v2/api/product-fields-api.ts index 82df24ce..07a8684c 100644 --- a/src/versions/v2/api/product-fields-api.ts +++ b/src/versions/v2/api/product-fields-api.ts @@ -26,15 +26,15 @@ import { AddDealFieldOptions200Response } from '../models'; // @ts-ignore import { AddDealFieldOptionsRequestInner } from '../models'; // @ts-ignore +import { AddProductField200Response } from '../models'; +// @ts-ignore import { AddProductFieldRequest } from '../models'; // @ts-ignore import { DeleteDealFieldOptionsRequestInner } from '../models'; // @ts-ignore import { DeletePersonField200Response } from '../models'; // @ts-ignore -import { GetActivityField200Response } from '../models'; -// @ts-ignore -import { GetActivityFields200Response } from '../models'; +import { GetProductFields200Response } from '../models'; // @ts-ignore import { UpdateDealFieldOptionsRequestInner } from '../models'; // @ts-ignore @@ -227,11 +227,11 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration?: Confi * Returns metadata about a specific product field. * @summary Get one product field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - getProductField: async (field_code: string, include_fields?: 'ui_visibility', ): Promise => { + getProductField: async (field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise => { // verify required parameter 'field_code' is not null or undefined assertParamExists('getProductField', 'field_code', field_code) const localVarPath = `/productFields/{field_code}` @@ -254,8 +254,8 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration?: Confi // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "product-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } @@ -272,13 +272,13 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration?: Confi /** * Returns metadata about all product fields in the company. * @summary Get all product fields - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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} */ - getProductFields: async (include_fields?: 'ui_visibility', limit?: number, cursor?: string, ): Promise => { + getProductFields: async (include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise => { const localVarPath = `/productFields`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -298,8 +298,8 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration?: Confi // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "product-fields:full"], configuration) - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -433,7 +433,7 @@ export const ProductFieldsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async addProductField(AddProductFieldRequest: AddProductFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async addProductField(AddProductFieldRequest: AddProductFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addProductField(AddProductFieldRequest, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -476,24 +476,24 @@ export const ProductFieldsApiFp = function(configuration?: Configuration) { * Returns metadata about a specific product field. * @summary Get one product field * @param {string} field_code The unique code identifying the field - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @throws {RequiredError} */ - async getProductField(field_code: string, include_fields?: 'ui_visibility', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getProductField(field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProductField(field_code, include_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metadata about all product fields in the company. * @summary Get all product fields - * @param {'ui_visibility'} [include_fields] Optional comma separated string array of additional data namespaces to include in response + * @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response * @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 getProductFields(include_fields?: 'ui_visibility', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async getProductFields(include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFields(include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -505,7 +505,7 @@ export const ProductFieldsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async updateProductField(field_code: string, UpdateProductFieldRequest: UpdateProductFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async updateProductField(field_code: string, UpdateProductFieldRequest: UpdateProductFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductField(field_code, UpdateProductFieldRequest, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -538,7 +538,7 @@ export const ProductFieldsApiFactory = function (configuration?: Configuration, * @throws {RequiredError} */ - addProductField(requestParameters: ProductFieldsApiAddProductFieldRequest, ): Promise { + addProductField(requestParameters: ProductFieldsApiAddProductFieldRequest, ): Promise { return localVarFp.addProductField(requestParameters.AddProductFieldRequest, ).then((request) => request(axios, basePath)); }, /** @@ -578,7 +578,7 @@ export const ProductFieldsApiFactory = function (configuration?: Configuration, * @throws {RequiredError} */ - getProductField(requestParameters: ProductFieldsApiGetProductFieldRequest, ): Promise { + getProductField(requestParameters: ProductFieldsApiGetProductFieldRequest, ): Promise { return localVarFp.getProductField(requestParameters.field_code, requestParameters.include_fields, ).then((request) => request(axios, basePath)); }, /** @@ -588,7 +588,7 @@ export const ProductFieldsApiFactory = function (configuration?: Configuration, * @throws {RequiredError} */ - getProductFields(requestParameters: ProductFieldsApiGetProductFieldsRequest = {}, ): Promise { + getProductFields(requestParameters: ProductFieldsApiGetProductFieldsRequest = {}, ): Promise { return localVarFp.getProductFields(requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); }, /** @@ -598,7 +598,7 @@ export const ProductFieldsApiFactory = function (configuration?: Configuration, * @throws {RequiredError} */ - updateProductField(requestParameters: ProductFieldsApiUpdateProductFieldRequest, ): Promise { + updateProductField(requestParameters: ProductFieldsApiUpdateProductFieldRequest, ): Promise { return localVarFp.updateProductField(requestParameters.field_code, requestParameters.UpdateProductFieldRequest, ).then((request) => request(axios, basePath)); }, /** @@ -699,10 +699,10 @@ export interface ProductFieldsApiGetProductFieldRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility'} + * @type {Set<'ui_visibility'>} * @memberof ProductFieldsApiGetProductField */ - readonly include_fields?: 'ui_visibility' + readonly include_fields?: Set<'ui_visibility'> } /** @@ -713,10 +713,10 @@ export interface ProductFieldsApiGetProductFieldRequest { export interface ProductFieldsApiGetProductFieldsRequest { /** * Optional comma separated string array of additional data namespaces to include in response - * @type {'ui_visibility'} + * @type {Set<'ui_visibility'>} * @memberof ProductFieldsApiGetProductFields */ - readonly include_fields?: 'ui_visibility' + readonly include_fields?: Set<'ui_visibility'> /** * 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. diff --git a/src/versions/v2/api/products-api.ts b/src/versions/v2/api/products-api.ts index dfd63ca7..fe7b42a2 100644 --- a/src/versions/v2/api/products-api.ts +++ b/src/versions/v2/api/products-api.ts @@ -652,18 +652,18 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * Returns data about all products. * @summary Get all products * @param {number} [owner_id] If supplied, only products owned by the given user will be returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {number} [filter_id] The ID of the filter to use * @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' | 'name' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `name`, `add_time`, `update_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @param {string} [updated_since] If set, only products with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. - * @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.<br/>A maximum of 15 keys is allowed. * @throws {RequiredError} */ - 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 => { + getProducts: async (owner_id?: number, ids?: Set, custom_fields?: Set, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', updated_since?: string, ): Promise => { const localVarPath = `/products`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -687,8 +687,12 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['owner_id'] = owner_id; } - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; + if (ids) { + localVarQueryParameter['ids'] = Array.from(ids).join(COLLECTION_FORMATS.csv); + } + + if (custom_fields) { + localVarQueryParameter['custom_fields'] = Array.from(custom_fields).join(COLLECTION_FORMATS.csv); } if (filter_id !== undefined) { @@ -715,10 +719,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['updated_since'] = updated_since; } - if (custom_fields !== undefined) { - localVarQueryParameter['custom_fields'] = custom_fields; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -734,15 +734,15 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search products * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'code' | 'custom_fields' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'code' | 'custom_fields' | 'name'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. - * @param {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'product.price'>} [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} */ - searchProducts: async (term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', limit?: number, cursor?: string, ): Promise => { + searchProducts: async (term: string, fields?: Set<'code' | 'custom_fields' | 'name'>, exact_match?: boolean, include_fields?: Set<'product.price'>, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchProducts', 'term', term) const localVarPath = `/products/search`; @@ -768,16 +768,16 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { localVarQueryParameter['exact_match'] = exact_match; } - if (include_fields !== undefined) { - localVarQueryParameter['include_fields'] = include_fields; + if (include_fields) { + localVarQueryParameter['include_fields'] = Array.from(include_fields).join(COLLECTION_FORMATS.csv); } if (limit !== undefined) { @@ -1165,34 +1165,34 @@ export const ProductsApiFp = function(configuration?: Configuration) { * Returns data about all products. * @summary Get all products * @param {number} [owner_id] If supplied, only products owned by the given user will be returned - * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. + * @param {Set} [custom_fields] Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {number} [filter_id] The ID of the filter to use * @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' | 'name' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `name`, `add_time`, `update_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @param {string} [updated_since] If set, only products with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. - * @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.<br/>A maximum of 15 keys is allowed. * @throws {RequiredError} */ - 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> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(owner_id, ids, filter_id, cursor, limit, sort_by, sort_direction, updated_since, custom_fields, ); + async getProducts(owner_id?: number, ids?: Set, custom_fields?: Set, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', updated_since?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(owner_id, ids, custom_fields, filter_id, cursor, limit, sort_by, sort_direction, updated_since, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search products * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'code' | 'custom_fields' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'code' | 'custom_fields' | 'name'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. - * @param {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default + * @param {Set<'product.price'>} [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 searchProducts(term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchProducts(term: string, fields?: Set<'code' | 'custom_fields' | 'name'>, exact_match?: boolean, include_fields?: Set<'product.price'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchProducts(term, fields, exact_match, include_fields, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1393,7 +1393,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * @throws {RequiredError} */ getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ): Promise { - 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)); + return localVarFp.getProducts(requestParameters.owner_id, requestParameters.ids, requestParameters.custom_fields, requestParameters.filter_id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.updated_since, ).then((request) => request(axios, basePath)); }, /** * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. @@ -1715,10 +1715,17 @@ export interface ProductsApiGetProductsRequest { /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. - * @type {string} + * @type {Set} + * @memberof ProductsApiGetProducts + */ + readonly ids?: Set + + /** + * Optional 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 faster results and smaller response.<br/>A maximum of 15 keys is allowed. + * @type {Set} * @memberof ProductsApiGetProducts */ - readonly ids?: string + readonly custom_fields?: Set /** * The ID of the filter to use @@ -1761,13 +1768,6 @@ export interface ProductsApiGetProductsRequest { * @memberof ProductsApiGetProducts */ readonly updated_since?: string - - /** - * 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.<br/>A maximum of 15 keys is allowed. - * @type {string} - * @memberof ProductsApiGetProducts - */ - readonly custom_fields?: string } /** @@ -1785,10 +1785,10 @@ export interface ProductsApiSearchProductsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'code' | 'custom_fields' | 'name'} + * @type {Set<'code' | 'custom_fields' | 'name'>} * @memberof ProductsApiSearchProducts */ - readonly fields?: 'code' | 'custom_fields' | 'name' + readonly fields?: Set<'code' | 'custom_fields' | 'name'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. @@ -1799,10 +1799,10 @@ export interface ProductsApiSearchProductsRequest { /** * Supports including optional fields in the results which are not provided by default - * @type {'product.price'} + * @type {Set<'product.price'>} * @memberof ProductsApiSearchProducts */ - readonly include_fields?: 'product.price' + readonly include_fields?: Set<'product.price'> /** * 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. @@ -2082,7 +2082,7 @@ export class ProductsApi extends BaseAPI { * @memberof ProductsApi */ public getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ) { - 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)); + return ProductsApiFp(this.configuration).getProducts(requestParameters.owner_id, requestParameters.ids, requestParameters.custom_fields, requestParameters.filter_id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.updated_since, ).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/versions/v2/api/projects-api.ts b/src/versions/v2/api/projects-api.ts index f837919a..054ffe2b 100644 --- a/src/versions/v2/api/projects-api.ts +++ b/src/versions/v2/api/projects-api.ts @@ -444,7 +444,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * Searches all projects by title, description, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found projects can be filtered by person ID or organization ID. * @summary Search projects * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'notes' | 'title' | 'description'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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 projects by the provided person ID * @param {number} [organization_id] Will filter projects by the provided organization ID @@ -453,7 +453,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @throws {RequiredError} */ - searchProjects: async (term: string, fields?: 'custom_fields' | 'notes' | 'title' | 'description', exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise => { + searchProjects: async (term: string, fields?: Set<'custom_fields' | 'notes' | 'title' | 'description'>, exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise => { // verify required parameter 'term' is not null or undefined assertParamExists('searchProjects', 'term', term) const localVarPath = `/projects/search`; @@ -479,8 +479,8 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['term'] = term; } - if (fields !== undefined) { - localVarQueryParameter['fields'] = fields; + if (fields) { + localVarQueryParameter['fields'] = Array.from(fields).join(COLLECTION_FORMATS.csv); } if (exact_match !== undefined) { @@ -675,7 +675,7 @@ export const ProjectsApiFp = function(configuration?: Configuration) { * Searches all projects by title, description, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found projects can be filtered by person ID or organization ID. * @summary Search projects * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. - * @param {'custom_fields' | 'notes' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. + * @param {Set<'custom_fields' | 'notes' | 'title' | 'description'>} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @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 projects by the provided person ID * @param {number} [organization_id] Will filter projects by the provided organization ID @@ -684,7 +684,7 @@ export const ProjectsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async searchProjects(term: string, fields?: 'custom_fields' | 'notes' | 'title' | 'description', exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + async searchProjects(term: string, fields?: Set<'custom_fields' | 'notes' | 'title' | 'description'>, exact_match?: boolean, person_id?: number, organization_id?: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchProjects(term, fields, exact_match, person_id, organization_id, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1031,10 +1031,10 @@ export interface ProjectsApiSearchProjectsRequest { /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. - * @type {'custom_fields' | 'notes' | 'title' | 'description'} + * @type {Set<'custom_fields' | 'notes' | 'title' | 'description'>} * @memberof ProjectsApiSearchProjects */ - readonly fields?: 'custom_fields' | 'notes' | 'title' | 'description' + readonly fields?: Set<'custom_fields' | 'notes' | 'title' | 'description'> /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. diff --git a/src/versions/v2/models/activity-item-location.ts b/src/versions/v2/models/activity-item-location.ts new file mode 100644 index 00000000..d68e00bb --- /dev/null +++ b/src/versions/v2/models/activity-item-location.ts @@ -0,0 +1,74 @@ +/* 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. + */ + + + +/** +* Location of the activity +* @export +* @interface ActivityItemLocation +*/ +export interface ActivityItemLocation { + /** + * The full address of the activity + * @type {string} + */ + 'value'?: string; + /** + * Country of the activity + * @type {string} + */ + 'country'?: string | null; + /** + * Admin area level 1 (e.g. state) of the activity + * @type {string} + */ + 'admin_area_level_1'?: string | null; + /** + * Admin area level 2 (e.g. county) of the activity + * @type {string} + */ + 'admin_area_level_2'?: string | null; + /** + * Locality (e.g. city) of the activity + * @type {string} + */ + 'locality'?: string | null; + /** + * Sublocality (e.g. neighborhood) of the activity + * @type {string} + */ + 'sublocality'?: string | null; + /** + * Route (e.g. street) of the activity + * @type {string} + */ + 'route'?: string | null; + /** + * Street number of the activity + * @type {string} + */ + 'street_number'?: string | null; + /** + * Subpremise (e.g. apartment/suite number) of the activity + * @type {string} + */ + 'subpremise'?: string | null; + /** + * Postal code of the activity + * @type {string} + */ + 'postal_code'?: string | null; +} + diff --git a/src/versions/v2/models/activity-item.ts b/src/versions/v2/models/activity-item.ts index 1cfea13b..edfae524 100644 --- a/src/versions/v2/models/activity-item.ts +++ b/src/versions/v2/models/activity-item.ts @@ -15,10 +15,10 @@ // May contain unused imports in some cases // @ts-ignore -import { AddActivityRequestAttendeesInner } from './add-activity-request-attendees-inner'; +import { ActivityItemLocation } from './activity-item-location'; // May contain unused imports in some cases // @ts-ignore -import { AddActivityRequestLocation } from './add-activity-request-location'; +import { AddActivityRequestAttendeesInner } from './add-activity-request-attendees-inner'; // May contain unused imports in some cases // @ts-ignore import { AddActivityRequestParticipantsInner } from './add-activity-request-participants-inner'; @@ -73,27 +73,27 @@ export interface ActivityItem { * The ID of the deal linked to the activity * @type {number} */ - 'deal_id'?: number; + 'deal_id'?: number | null; /** * The ID of the lead linked to the activity * @type {string} */ - 'lead_id'?: string; + 'lead_id'?: string | null; /** * The ID of the person linked to the activity * @type {number} */ - 'person_id'?: number; + 'person_id'?: number | null; /** * The ID of the organization linked to the activity * @type {number} */ - 'org_id'?: number; + 'org_id'?: number | null; /** * The ID of the project linked to the activity * @type {number} */ - 'project_id'?: number; + 'project_id'?: number | null; /** * The due date of the activity * @type {string} @@ -103,12 +103,12 @@ export interface ActivityItem { * The due time of the activity * @type {string} */ - 'due_time'?: string; + 'due_time'?: string | null; /** * The duration of the activity * @type {string} */ - 'duration'?: string; + 'duration'?: string | null; /** * Whether the activity marks the assignee as busy or not in their calendar * @type {boolean} @@ -123,12 +123,12 @@ export interface ActivityItem { * The date and time when the activity was marked as done * @type {string} */ - 'marked_as_done_time'?: string; + 'marked_as_done_time'?: string | null; /** * - * @type {AddActivityRequestLocation} + * @type {ActivityItemLocation} */ - 'location'?: AddActivityRequestLocation; + 'location'?: ActivityItemLocation | null; /** * The participants of the activity * @type {Array} diff --git a/src/versions/v2/models/add-activity-request.ts b/src/versions/v2/models/add-activity-request.ts index 80a74bf1..76ac0ec0 100644 --- a/src/versions/v2/models/add-activity-request.ts +++ b/src/versions/v2/models/add-activity-request.ts @@ -55,11 +55,6 @@ export interface AddActivityRequest { */ 'lead_id'?: string; /** - * The ID of the person linked to the activity - * @type {number} - */ - 'person_id'?: number; - /** * The ID of the organization linked to the activity * @type {number} */ @@ -100,7 +95,7 @@ export interface AddActivityRequest { */ 'location'?: AddActivityRequestLocation; /** - * The participants of the activity + * The participants of the activity. Use this to set the activity\'s person — a primary participant (`primary: true`) sets `person_id` on the activity. * @type {Array} */ 'participants'?: Array; diff --git a/src/versions/v2/models/add-organization-request.ts b/src/versions/v2/models/add-organization-request.ts index 645b1a82..c1aeda37 100644 --- a/src/versions/v2/models/add-organization-request.ts +++ b/src/versions/v2/models/add-organization-request.ts @@ -52,7 +52,7 @@ export interface AddOrganizationRequest { * * @type {OrganizationItemAddress} */ - 'address'?: OrganizationItemAddress; + 'address'?: OrganizationItemAddress | null; /** * The website of the organization * @type {string} diff --git a/src/versions/v2/models/add-person-request.ts b/src/versions/v2/models/add-person-request.ts index 4a7afe63..c73a12c3 100644 --- a/src/versions/v2/models/add-person-request.ts +++ b/src/versions/v2/models/add-person-request.ts @@ -36,7 +36,7 @@ export interface AddPersonRequest { * The name of the person * @type {string} */ - 'name'?: string; + 'name': string; /** * The ID of the user who owns the person * @type {number} @@ -76,24 +76,24 @@ export interface AddPersonRequest { * * @type {PersonItemAddress} */ - 'postal_address'?: PersonItemAddress; + 'postal_address'?: PersonItemAddress | null; /** - * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company + * Contact sync notes of the person, maximum 10 000 characters. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'notes'?: string; /** - * The instant messaging accounts of the person, included if contact sync is enabled for the company + * The instant messaging accounts of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {Array} */ 'im'?: Array; /** - * The birthday of the person, included if contact sync is enabled for the company + * The birthday of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'birthday'?: string; /** - * The job title of the person, included if contact sync is enabled for the company + * The job title of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'job_title'?: string; diff --git a/src/versions/v2/models/add-product-field200-response.ts b/src/versions/v2/models/add-product-field200-response.ts new file mode 100644 index 00000000..02ba1045 --- /dev/null +++ b/src/versions/v2/models/add-product-field200-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 { GetProductFields200ResponseDataInner } from './get-product-fields200-response-data-inner'; + +/** +* +* @export +* @interface AddProductField200Response +*/ +export interface AddProductField200Response { + /** + * Whether the request was successful + * @type {boolean} + */ + 'success'?: boolean; + /** + * + * @type {GetProductFields200ResponseDataInner} + */ + 'data'?: GetProductFields200ResponseDataInner; +} + diff --git a/src/versions/v2/models/deal.ts b/src/versions/v2/models/deal.ts index 7c29168e..6db41fdf 100644 --- a/src/versions/v2/models/deal.ts +++ b/src/versions/v2/models/deal.ts @@ -74,7 +74,7 @@ export interface Deal { * The last updated date and time of the deal * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; /** * The last updated date and time of the deal stage * @type {string} diff --git a/src/versions/v2/models/get-activities-response-all-of-additional-data.ts b/src/versions/v2/models/get-activities-response-all-of-additional-data.ts index 288283ec..0351b8bf 100644 --- a/src/versions/v2/models/get-activities-response-all-of-additional-data.ts +++ b/src/versions/v2/models/get-activities-response-all-of-additional-data.ts @@ -24,6 +24,6 @@ export interface GetActivitiesResponseAllOfAdditionalData { * The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned. * @type {string} */ - 'next_cursor'?: string; + 'next_cursor'?: string | null; } diff --git a/src/versions/v2/models/get-activity-fields200-response-data-inner.ts b/src/versions/v2/models/get-activity-fields200-response-data-inner.ts index bbb070b6..89afd886 100644 --- a/src/versions/v2/models/get-activity-fields200-response-data-inner.ts +++ b/src/versions/v2/models/get-activity-fields200-response-data-inner.ts @@ -104,7 +104,9 @@ export interface GetActivityFields200ResponseDataInner { price_list: 'price_list', billing_frequency: 'billing_frequency', projects_board: 'projects_board', - projects_phase: 'projects_phase' + projects_phase: 'projects_phase', + participants: 'participants', + attendees: 'attendees' } as const; export type GetActivityFields200ResponseDataInnerFieldTypeConst = typeof GetActivityFields200ResponseDataInnerFieldTypeConst[keyof typeof GetActivityFields200ResponseDataInnerFieldTypeConst]; diff --git a/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts b/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts index 7141cbfa..bfba5997 100644 --- a/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts +++ b/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts @@ -51,7 +51,7 @@ export interface GetDealSearchResponseAllOfDataItemsInnerItem { * The value of the deal * @type {number} */ - 'value'?: number; + 'value'?: number | null; /** * The currency of the deal * @type {string} diff --git a/src/versions/v2/models/get-deals-products-response-additional-data.ts b/src/versions/v2/models/get-deals-products-response-additional-data.ts index 19baca9b..9bd23bd7 100644 --- a/src/versions/v2/models/get-deals-products-response-additional-data.ts +++ b/src/versions/v2/models/get-deals-products-response-additional-data.ts @@ -24,6 +24,6 @@ export interface GetDealsProductsResponseAdditionalData { * The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned. * @type {string} */ - 'next_cursor'?: string; + 'next_cursor'?: string | null; } diff --git a/src/versions/v2/models/get-organization-search-response-all-of-data-items-inner-item.ts b/src/versions/v2/models/get-organization-search-response-all-of-data-items-inner-item.ts index 34379150..f5545cc7 100644 --- a/src/versions/v2/models/get-organization-search-response-all-of-data-items-inner-item.ts +++ b/src/versions/v2/models/get-organization-search-response-all-of-data-items-inner-item.ts @@ -42,7 +42,7 @@ export interface GetOrganizationSearchResponseAllOfDataItemsInnerItem { * The address of the organization * @type {string} */ - 'address'?: string; + 'address'?: string | null; /** * The visibility of the organization * @type {number} diff --git a/src/versions/v2/models/get-product-fields200-response-data-inner.ts b/src/versions/v2/models/get-product-fields200-response-data-inner.ts new file mode 100644 index 00000000..b1ba8613 --- /dev/null +++ b/src/versions/v2/models/get-product-fields200-response-data-inner.ts @@ -0,0 +1,112 @@ +/* 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 { GetActivityFields200ResponseDataInnerOptionsInner } from './get-activity-fields200-response-data-inner-options-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityFields200ResponseDataInnerSubfieldsInner } from './get-activity-fields200-response-data-inner-subfields-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityFields200ResponseDataInnerUiVisibility } from './get-activity-fields200-response-data-inner-ui-visibility'; + +/** +* +* @export +* @interface GetProductFields200ResponseDataInner +*/ +export interface GetProductFields200ResponseDataInner { + /** + * The display name/label of the field + * @type {string} + */ + 'field_name': string; + /** + * The unique identifier for the field (40-character hash for custom fields) + * @type {string} + */ + 'field_code': string; + /** + * The type of the field + * @type {string} + */ + 'field_type': GetProductFields200ResponseDataInnerFieldTypeConst; + /** + * Whether this is a user-created custom field + * @type {boolean} + */ + 'is_custom_field': boolean; + /** + * Whether this field is not returned by default in entity responses + * @type {boolean} + */ + 'is_optional_response_field': boolean; + /** + * Array of available options for enum/set fields, null for other field types + * @type {Array} + */ + 'options'?: Array | null; + /** + * Array of subfields for complex field types (address, monetary), null for simple field types + * @type {Array} + */ + 'subfields'?: Array | null; + /** + * + * @type {GetActivityFields200ResponseDataInnerUiVisibility} + */ + 'ui_visibility'?: GetActivityFields200ResponseDataInnerUiVisibility; +} + + export const GetProductFields200ResponseDataInnerFieldTypeConst = { + int: 'int', + double: 'double', + boolean: 'boolean', + varchar: 'varchar', + text: 'text', + phone: 'phone', + varchar_options: 'varchar_options', + varchar_auto: 'varchar_auto', + date: 'date', + daterange: 'daterange', + time: 'time', + timerange: 'timerange', + enum: 'enum', + set: 'set', + address: 'address', + monetary: 'monetary', + deal: 'deal', + deals: 'deals', + lead: 'lead', + org: 'org', + people: 'people', + project: 'project', + stage: 'stage', + user: 'user', + activity: 'activity', + json: 'json', + picture: 'picture', + status: 'status', + visible_to: 'visible_to', + price_list: 'price_list', + billing_frequency: 'billing_frequency', + projects_board: 'projects_board', + projects_phase: 'projects_phase' + } as const; + + export type GetProductFields200ResponseDataInnerFieldTypeConst = typeof GetProductFields200ResponseDataInnerFieldTypeConst[keyof typeof GetProductFields200ResponseDataInnerFieldTypeConst]; + + diff --git a/src/versions/v2/models/get-product-fields200-response.ts b/src/versions/v2/models/get-product-fields200-response.ts new file mode 100644 index 00000000..ae9dbf29 --- /dev/null +++ b/src/versions/v2/models/get-product-fields200-response.ts @@ -0,0 +1,45 @@ +/* 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 { GetActivityFields200ResponseAdditionalData } from './get-activity-fields200-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFields200ResponseDataInner } from './get-product-fields200-response-data-inner'; + +/** +* +* @export +* @interface GetProductFields200Response +*/ +export interface GetProductFields200Response { + /** + * Whether the request was successful + * @type {boolean} + */ + 'success'?: boolean; + /** + * + * @type {Array} + */ + 'data'?: Array; + /** + * + * @type {GetActivityFields200ResponseAdditionalData} + */ + 'additional_data'?: GetActivityFields200ResponseAdditionalData; +} + diff --git a/src/versions/v2/models/get-product-search-response-all-of-data-items-inner-item.ts b/src/versions/v2/models/get-product-search-response-all-of-data-items-inner-item.ts index ec96c6e4..09efb3e5 100644 --- a/src/versions/v2/models/get-product-search-response-all-of-data-items-inner-item.ts +++ b/src/versions/v2/models/get-product-search-response-all-of-data-items-inner-item.ts @@ -40,9 +40,9 @@ export interface GetProductSearchResponseAllOfDataItemsInnerItem { 'name'?: string; /** * The code of the product - * @type {number} + * @type {string} */ - 'code'?: number; + 'code'?: string | null; /** * The visibility of the product * @type {number} diff --git a/src/versions/v2/models/get-project-fields200-response-data-inner.ts b/src/versions/v2/models/get-project-fields200-response-data-inner.ts index 4a4be886..44467091 100644 --- a/src/versions/v2/models/get-project-fields200-response-data-inner.ts +++ b/src/versions/v2/models/get-project-fields200-response-data-inner.ts @@ -120,7 +120,8 @@ export interface GetProjectFields200ResponseDataInner { price_list: 'price_list', billing_frequency: 'billing_frequency', projects_board: 'projects_board', - projects_phase: 'projects_phase' + projects_phase: 'projects_phase', + orgs: 'orgs' } as const; export type GetProjectFields200ResponseDataInnerFieldTypeConst = typeof GetProjectFields200ResponseDataInnerFieldTypeConst[keyof typeof GetProjectFields200ResponseDataInnerFieldTypeConst]; diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts index ed20a801..2e1fa1df 100644 --- a/src/versions/v2/models/index.ts +++ b/src/versions/v2/models/index.ts @@ -1,4 +1,5 @@ export * from './activity-item'; +export * from './activity-item-location'; export * from './add-ainstallment-response'; export * from './add-activity-request'; export * from './add-activity-request-attendees-inner'; @@ -43,6 +44,7 @@ export * from './add-person-field-request-ui-visibility'; export * from './add-person-field-request-ui-visibility-show-in-add-deal-dialog'; export * from './add-person-request'; export * from './add-pipeline-request'; +export * from './add-product-field200-response'; export * from './add-product-field-request'; export * from './add-product-field-request-ui-visibility'; export * from './add-product-image-response'; @@ -201,6 +203,8 @@ export * from './get-persons-response-all-of'; 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-fields200-response'; +export * from './get-product-fields200-response-data-inner'; export * from './get-product-image-response'; export * from './get-product-image-response-data'; export * from './get-product-response'; diff --git a/src/versions/v2/models/lead-search-item-item.ts b/src/versions/v2/models/lead-search-item-item.ts index 257dacc0..519215e7 100644 --- a/src/versions/v2/models/lead-search-item-item.ts +++ b/src/versions/v2/models/lead-search-item-item.ts @@ -53,7 +53,7 @@ export interface LeadSearchItemItem { * * @type {LeadSearchItemItemPerson} */ - 'person'?: LeadSearchItemItemPerson; + 'person'?: LeadSearchItemItemPerson | null; /** * * @type {LeadSearchItemItemOrganization} diff --git a/src/versions/v2/models/organization-item-address.ts b/src/versions/v2/models/organization-item-address.ts index efbc42b1..babed9dc 100644 --- a/src/versions/v2/models/organization-item-address.ts +++ b/src/versions/v2/models/organization-item-address.ts @@ -29,46 +29,46 @@ export interface OrganizationItemAddress { * Country of the organization * @type {string} */ - 'country'?: string; + 'country'?: string | null; /** * Admin area level 1 (e.g. state) of the organization * @type {string} */ - 'admin_area_level_1'?: string; + 'admin_area_level_1'?: string | null; /** * Admin area level 2 (e.g. county) of the organization * @type {string} */ - 'admin_area_level_2'?: string; + 'admin_area_level_2'?: string | null; /** * Locality (e.g. city) of the organization * @type {string} */ - 'locality'?: string; + 'locality'?: string | null; /** * Sublocality (e.g. neighborhood) of the organization * @type {string} */ - 'sublocality'?: string; + 'sublocality'?: string | null; /** * Route (e.g. street) of the organization * @type {string} */ - 'route'?: string; + 'route'?: string | null; /** * Street number of the organization * @type {string} */ - 'street_number'?: string; + 'street_number'?: string | null; /** * Subpremise (e.g. apartment/suite number) of the organization * @type {string} */ - 'subpremise'?: string; + 'subpremise'?: string | null; /** * Postal code of the organization * @type {string} */ - 'postal_code'?: string; + 'postal_code'?: string | null; } diff --git a/src/versions/v2/models/organization-item.ts b/src/versions/v2/models/organization-item.ts index 64059c77..12fb858c 100644 --- a/src/versions/v2/models/organization-item.ts +++ b/src/versions/v2/models/organization-item.ts @@ -47,7 +47,7 @@ export interface OrganizationItem { * The last updated date and time of the organization * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; /** * Whether the organization is deleted or not * @type {boolean} @@ -62,7 +62,7 @@ export interface OrganizationItem { * * @type {OrganizationItemAddress} */ - 'address'?: OrganizationItemAddress; + 'address'?: OrganizationItemAddress | null; /** * The IDs of labels assigned to the organization * @type {Array} diff --git a/src/versions/v2/models/person-item-address.ts b/src/versions/v2/models/person-item-address.ts index 7417be7b..bff40de1 100644 --- a/src/versions/v2/models/person-item-address.ts +++ b/src/versions/v2/models/person-item-address.ts @@ -29,46 +29,46 @@ export interface PersonItemAddress { * Country of the person * @type {string} */ - 'country'?: string; + 'country'?: string | null; /** * Admin area level 1 (e.g. state) of the person * @type {string} */ - 'admin_area_level_1'?: string; + 'admin_area_level_1'?: string | null; /** * Admin area level 2 (e.g. county) of the person * @type {string} */ - 'admin_area_level_2'?: string; + 'admin_area_level_2'?: string | null; /** * Locality (e.g. city) of the person * @type {string} */ - 'locality'?: string; + 'locality'?: string | null; /** * Sublocality (e.g. neighborhood) of the person * @type {string} */ - 'sublocality'?: string; + 'sublocality'?: string | null; /** * Route (e.g. street) of the person * @type {string} */ - 'route'?: string; + 'route'?: string | null; /** * Street number of the person * @type {string} */ - 'street_number'?: string; + 'street_number'?: string | null; /** * Subpremise (e.g. apartment/suite number) of the person * @type {string} */ - 'subpremise'?: string; + 'subpremise'?: string | null; /** * Postal code of the person * @type {string} */ - 'postal_code'?: string; + 'postal_code'?: string | null; } diff --git a/src/versions/v2/models/person.ts b/src/versions/v2/models/person.ts index 0fe033f2..aa9e0283 100644 --- a/src/versions/v2/models/person.ts +++ b/src/versions/v2/models/person.ts @@ -71,7 +71,7 @@ export interface Person { * The last updated date and time of the person * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; /** * The emails of the person * @type {Array} @@ -101,12 +101,12 @@ export interface Person { * The ID of the picture associated with the person * @type {number} */ - 'picture_id'?: number; + 'picture_id'?: number | null; /** * * @type {PersonItemAddress} */ - 'postal_address'?: PersonItemAddress; + 'postal_address'?: PersonItemAddress | null; /** * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company * @type {string} diff --git a/src/versions/v2/models/stage-item.ts b/src/versions/v2/models/stage-item.ts index c58eef1c..2b37d5c7 100644 --- a/src/versions/v2/models/stage-item.ts +++ b/src/versions/v2/models/stage-item.ts @@ -69,6 +69,6 @@ export interface StageItem { * The stage update time * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; } diff --git a/src/versions/v2/models/stage-item1.ts b/src/versions/v2/models/stage-item1.ts index 2e5f7d1b..ffe8faca 100644 --- a/src/versions/v2/models/stage-item1.ts +++ b/src/versions/v2/models/stage-item1.ts @@ -69,6 +69,6 @@ export interface StageItem1 { * The stage update time * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; } diff --git a/src/versions/v2/models/update-organization-request.ts b/src/versions/v2/models/update-organization-request.ts index 6ed190b0..cbe0df42 100644 --- a/src/versions/v2/models/update-organization-request.ts +++ b/src/versions/v2/models/update-organization-request.ts @@ -47,7 +47,7 @@ export interface UpdateOrganizationRequest { * * @type {OrganizationItemAddress} */ - 'address'?: OrganizationItemAddress; + 'address'?: OrganizationItemAddress | null; /** * The website of the organization * @type {string} diff --git a/src/versions/v2/models/update-person-request.ts b/src/versions/v2/models/update-person-request.ts index 80ea5643..001dc207 100644 --- a/src/versions/v2/models/update-person-request.ts +++ b/src/versions/v2/models/update-person-request.ts @@ -71,24 +71,24 @@ export interface UpdatePersonRequest { * * @type {PersonItemAddress} */ - 'postal_address'?: PersonItemAddress; + 'postal_address'?: PersonItemAddress | null; /** - * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company + * Contact sync notes of the person, maximum 10 000 characters. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'notes'?: string; /** - * The instant messaging accounts of the person, included if contact sync is enabled for the company + * The instant messaging accounts of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {Array} */ 'im'?: Array; /** - * The birthday of the person, included if contact sync is enabled for the company + * The birthday of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'birthday'?: string; /** - * The job title of the person, included if contact sync is enabled for the company + * The job title of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'job_title'?: string;