diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5ba862..f3298f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19). ## [Unreleased] +### Fixed +- Fixed the comma-separated `include_fields` query parameter across v2 collection/detail endpoints (`GET /api/v2/activities`, `GET /api/v2/activities/{id}`, `GET /api/v2/activityFields`, `GET /api/v2/activityFields/{field_code}`, `GET /api/v2/deals`, `GET /api/v2/deals/{id}`, `GET /api/v2/dealFields`, `GET /api/v2/dealFields/{field_code}`, `GET /api/v2/organizations`, `GET /api/v2/organizations/{id}`, `GET /api/v2/organizationFields`, `GET /api/v2/organizationFields/{field_code}`, `GET /api/v2/persons`, `GET /api/v2/persons/{id}`, `GET /api/v2/personFields`, `GET /api/v2/personFields/{field_code}`, `GET /api/v2/productFields`, and `GET /api/v2/productFields/{field_code}`) that was typed as `type: string` with an enum of comma-joined value combinations despite accepting comma-separated lists — changed to `type: array` of enumerated strings with `uniqueItems: true`, `style: form`, `explode: false` +- Fixed the comma-separated `custom_fields` query parameter on v2 collection/detail endpoints (`GET /api/v2/deals`, `GET /api/v2/deals/archived`, `GET /api/v2/deals/{id}`, `GET /api/v2/organizations`, `GET /api/v2/organizations/{id}`, `GET /api/v2/persons`, `GET /api/v2/persons/{id}`, and `GET /api/v2/products`) and the `ids` query parameter on v2 collection endpoints (`GET /api/v2/activities`, `GET /api/v2/deals`, `GET /api/v2/deals/archived`, `GET /api/v2/organizations`, `GET /api/v2/persons`, and `GET /api/v2/products`) that were typed as `type: string` despite accepting comma-separated lists — changed to `type: array` of strings (`custom_fields` capped at 15 items, `ids` at 100) with `uniqueItems: true`, `style: form`, `explode: false` ## [33.7.0] - 2026-09-08 ### Added 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/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/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/deals-api.ts b/src/versions/v2/api/deals-api.ts index d7a4c191..035e0006 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,7 +370,7 @@ 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. @@ -381,14 +381,14 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @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?: '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) { @@ -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,7 +695,7 @@ 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. @@ -706,8 +706,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @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?: '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) { @@ -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) @@ -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,7 +1136,7 @@ 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. @@ -1147,14 +1147,14 @@ export const DealsApiFp = function(configuration?: Configuration) { * @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?: '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,7 +1215,7 @@ 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. @@ -1226,8 +1226,8 @@ export const DealsApiFp = function(configuration?: Configuration) { * @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?: '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); }, @@ -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. @@ -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. @@ -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 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..7d2d2f83 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) { @@ -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); }, @@ -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 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..6beb1548 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) { @@ -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); }, @@ -810,7 +810,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { 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 @@ -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..e0fb5c4d 100644 --- a/src/versions/v2/api/product-fields-api.ts +++ b/src/versions/v2/api/product-fields-api.ts @@ -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) { @@ -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); }, @@ -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..2ed2d959 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); @@ -1165,19 +1165,19 @@ 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); }, /** @@ -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 } /** @@ -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/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/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-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-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/index.ts b/src/versions/v2/models/index.ts index ed20a801..8fbdfbd7 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'; 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;