diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d2e5d3c..b01e7468 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.9.0] - 2026-10-09 ### Fixed 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/deals-api.ts b/src/versions/v2/api/deals-api.ts index 7e2f7139..035e0006 100644 --- a/src/versions/v2/api/deals-api.ts +++ b/src/versions/v2/api/deals-api.ts @@ -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) { @@ -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 44d34ce8..6beb1548 100644 --- a/src/versions/v2/api/persons-api.ts +++ b/src/versions/v2/api/persons-api.ts @@ -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) { @@ -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); }, @@ -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 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)); } /**