diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c050f8..68c1a357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19). ## [Unreleased] +### Added +- Added `include_field_code` query parameter to Filters endpoints: + - `GET /v1/filters/{id}` + - `PUT /v1/filters/{id}` + - `POST /v1/filters` + - When set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name. The value is `null` if the field code cannot be resolved. ## [32.1.0] - 2026-03-26 ### Added diff --git a/src/versions/v1/api/filters-api.ts b/src/versions/v1/api/filters-api.ts index 9dff6815..bb116817 100644 --- a/src/versions/v1/api/filters-api.ts +++ b/src/versions/v1/api/filters-api.ts @@ -44,11 +44,12 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati /** * Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with \'AND\', and only two second level condition groups are supported of which one must be glued with \'AND\' and the second with \'OR\'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for adding a filter. * @summary Add a new filter + * @param {boolean} [include_field_code] If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name * @param {AddFilterRequest} [AddFilterRequest] * @throws {RequiredError} */ - addFilter: async (AddFilterRequest?: AddFilterRequest, ): Promise => { + addFilter: async (include_field_code?: boolean, AddFilterRequest?: AddFilterRequest, ): Promise => { const localVarPath = `/filters`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -68,6 +69,10 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration) + if (include_field_code !== undefined) { + localVarQueryParameter['include_field_code'] = include_field_code; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -171,10 +176,11 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati * Returns data about a specific filter. Note that this also returns the condition lines of the filter. * @summary Get one filter * @param {number} id The ID of the filter + * @param {boolean} [include_field_code] If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name * @throws {RequiredError} */ - getFilter: async (id: number, ): Promise => { + getFilter: async (id: number, include_field_code?: boolean, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getFilter', 'id', id) const localVarPath = `/filters/{id}` @@ -197,6 +203,10 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration) + if (include_field_code !== undefined) { + localVarQueryParameter['include_field_code'] = include_field_code; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -291,11 +301,12 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati * Updates an existing filter. * @summary Update filter * @param {number} id The ID of the filter + * @param {boolean} [include_field_code] If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name * @param {UpdateFilterRequest} [UpdateFilterRequest] * @throws {RequiredError} */ - updateFilter: async (id: number, UpdateFilterRequest?: UpdateFilterRequest, ): Promise => { + updateFilter: async (id: number, include_field_code?: boolean, UpdateFilterRequest?: UpdateFilterRequest, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('updateFilter', 'id', id) const localVarPath = `/filters/{id}` @@ -318,6 +329,10 @@ export const FiltersApiAxiosParamCreator = function (configuration?: Configurati // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration) + if (include_field_code !== undefined) { + localVarQueryParameter['include_field_code'] = include_field_code; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -346,12 +361,13 @@ export const FiltersApiFp = function(configuration?: Configuration) { /** * Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with \'AND\', and only two second level condition groups are supported of which one must be glued with \'AND\' and the second with \'OR\'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for adding a filter. * @summary Add a new filter + * @param {boolean} [include_field_code] If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name * @param {AddFilterRequest} [AddFilterRequest] * @throws {RequiredError} */ - async addFilter(AddFilterRequest?: AddFilterRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addFilter(AddFilterRequest, ); + async addFilter(include_field_code?: boolean, AddFilterRequest?: AddFilterRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addFilter(include_field_code, AddFilterRequest, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -380,11 +396,12 @@ export const FiltersApiFp = function(configuration?: Configuration) { * Returns data about a specific filter. Note that this also returns the condition lines of the filter. * @summary Get one filter * @param {number} id The ID of the filter + * @param {boolean} [include_field_code] If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name * @throws {RequiredError} */ - async getFilter(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getFilter(id, ); + async getFilter(id: number, include_field_code?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFilter(id, include_field_code, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -412,12 +429,13 @@ export const FiltersApiFp = function(configuration?: Configuration) { * Updates an existing filter. * @summary Update filter * @param {number} id The ID of the filter + * @param {boolean} [include_field_code] If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name * @param {UpdateFilterRequest} [UpdateFilterRequest] * @throws {RequiredError} */ - async updateFilter(id: number, UpdateFilterRequest?: UpdateFilterRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateFilter(id, UpdateFilterRequest, ); + async updateFilter(id: number, include_field_code?: boolean, UpdateFilterRequest?: UpdateFilterRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateFilter(id, include_field_code, UpdateFilterRequest, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -438,7 +456,7 @@ export const FiltersApiFactory = function (configuration?: Configuration, basePa * @throws {RequiredError} */ addFilter(requestParameters: FiltersApiAddFilterRequest = {}, ): Promise { - return localVarFp.addFilter(requestParameters.AddFilterRequest, ).then((request) => request(axios, basePath)); + return localVarFp.addFilter(requestParameters.include_field_code, requestParameters.AddFilterRequest, ).then((request) => request(axios, basePath)); }, /** * Marks a filter as deleted. @@ -468,7 +486,7 @@ export const FiltersApiFactory = function (configuration?: Configuration, basePa * @throws {RequiredError} */ getFilter(requestParameters: FiltersApiGetFilterRequest, ): Promise { - return localVarFp.getFilter(requestParameters.id, ).then((request) => request(axios, basePath)); + return localVarFp.getFilter(requestParameters.id, requestParameters.include_field_code, ).then((request) => request(axios, basePath)); }, /** * Returns all supported filter helpers. It helps to know what conditions and helpers are available when you want to add or update filters. For more information, see the tutorial for adding a filter. @@ -497,7 +515,7 @@ export const FiltersApiFactory = function (configuration?: Configuration, basePa * @throws {RequiredError} */ updateFilter(requestParameters: FiltersApiUpdateFilterRequest, ): Promise { - return localVarFp.updateFilter(requestParameters.id, requestParameters.UpdateFilterRequest, ).then((request) => request(axios, basePath)); + return localVarFp.updateFilter(requestParameters.id, requestParameters.include_field_code, requestParameters.UpdateFilterRequest, ).then((request) => request(axios, basePath)); }, }; }; @@ -508,6 +526,13 @@ export const FiltersApiFactory = function (configuration?: Configuration, basePa * @interface FiltersApiAddFilterRequest */ export interface FiltersApiAddFilterRequest { + /** + * If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name + * @type {boolean} + * @memberof FiltersApiAddFilter + */ + readonly include_field_code?: boolean + /** * * @type {AddFilterRequest} @@ -556,6 +581,13 @@ export interface FiltersApiGetFilterRequest { * @memberof FiltersApiGetFilter */ readonly id: number + + /** + * If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name + * @type {boolean} + * @memberof FiltersApiGetFilter + */ + readonly include_field_code?: boolean } /** @@ -585,6 +617,13 @@ export interface FiltersApiUpdateFilterRequest { */ readonly id: number + /** + * If set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name + * @type {boolean} + * @memberof FiltersApiUpdateFilter + */ + readonly include_field_code?: boolean + /** * * @type {UpdateFilterRequest} @@ -609,7 +648,7 @@ export class FiltersApi extends BaseAPI { * @memberof FiltersApi */ public addFilter(requestParameters: FiltersApiAddFilterRequest = {}, ) { - return FiltersApiFp(this.configuration).addFilter(requestParameters.AddFilterRequest, ).then((request) => request(this.axios, this.basePath)); + return FiltersApiFp(this.configuration).addFilter(requestParameters.include_field_code, requestParameters.AddFilterRequest, ).then((request) => request(this.axios, this.basePath)); } /** @@ -645,7 +684,7 @@ export class FiltersApi extends BaseAPI { * @memberof FiltersApi */ public getFilter(requestParameters: FiltersApiGetFilterRequest, ) { - return FiltersApiFp(this.configuration).getFilter(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + return FiltersApiFp(this.configuration).getFilter(requestParameters.id, requestParameters.include_field_code, ).then((request) => request(this.axios, this.basePath)); } /** @@ -680,6 +719,6 @@ export class FiltersApi extends BaseAPI { * @memberof FiltersApi */ public updateFilter(requestParameters: FiltersApiUpdateFilterRequest, ) { - return FiltersApiFp(this.configuration).updateFilter(requestParameters.id, requestParameters.UpdateFilterRequest, ).then((request) => request(this.axios, this.basePath)); + return FiltersApiFp(this.configuration).updateFilter(requestParameters.id, requestParameters.include_field_code, requestParameters.UpdateFilterRequest, ).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/versions/v1/models/filter-conditions-conditions-inner-conditions-inner.ts b/src/versions/v1/models/filter-conditions-conditions-inner-conditions-inner.ts new file mode 100644 index 00000000..bae57c74 --- /dev/null +++ b/src/versions/v1/models/filter-conditions-conditions-inner-conditions-inner.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* A single filter condition +* @export +* @interface FilterConditionsConditionsInnerConditionsInner +*/ +export interface FilterConditionsConditionsInnerConditionsInner { + /** + * The type of entity the condition applies to (e.g. \"deal\", \"person\") + * @type {string} + */ + 'object'?: string; + /** + * The ID of the field + * @type {string} + */ + 'field_id'?: string; + /** + * The operator used in the condition (e.g. \"=\", \"IS NOT NULL\") + * @type {string} + */ + 'operator'?: string; + /** + * The value of the condition + * @type {string} + */ + 'value'?: string | null; + /** + * An extra value for conditions that require two values + * @type {string} + */ + 'extra_value'?: string | null; + /** + * Whether the value is JSON-encoded + * @type {boolean} + */ + 'json_value_flag'?: boolean; + /** + * The code name of the field. Present when `include_field_code=true` is passed as a query parameter; `null` if the field code cannot be resolved + * @type {string} + */ + 'field_code'?: string | null; +} + diff --git a/src/versions/v1/models/filter-conditions-conditions-inner.ts b/src/versions/v1/models/filter-conditions-conditions-inner.ts new file mode 100644 index 00000000..e2f90352 --- /dev/null +++ b/src/versions/v1/models/filter-conditions-conditions-inner.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FilterConditionsConditionsInnerConditionsInner } from './filter-conditions-conditions-inner-conditions-inner'; + +/** +* A group of conditions joined by a logical operator +* @export +* @interface FilterConditionsConditionsInner +*/ +export interface FilterConditionsConditionsInner { + /** + * The logical operator joining conditions within this group + * @type {string} + */ + 'glue'?: FilterConditionsConditionsInnerGlueConst; + /** + * The individual conditions in this group + * @type {Array} + */ + 'conditions'?: Array; +} + + export const FilterConditionsConditionsInnerGlueConst = { + and: 'and', + or: 'or' + } as const; + + export type FilterConditionsConditionsInnerGlueConst = typeof FilterConditionsConditionsInnerGlueConst[keyof typeof FilterConditionsConditionsInnerGlueConst]; + + diff --git a/src/versions/v1/models/filter-conditions.ts b/src/versions/v1/models/filter-conditions.ts new file mode 100644 index 00000000..0580a8e9 --- /dev/null +++ b/src/versions/v1/models/filter-conditions.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FilterConditionsConditionsInner } from './filter-conditions-conditions-inner'; + +/** +* The conditions object of a filter +* @export +* @interface FilterConditions +*/ +export interface FilterConditions { + /** + * The top-level glue is always \"and\" + * @type {string} + */ + 'glue'?: FilterConditionsGlueConst; + /** + * The condition groups + * @type {Array} + */ + 'conditions'?: Array; +} + + export const FilterConditionsGlueConst = { + and: 'and' + } as const; + + export type FilterConditionsGlueConst = typeof FilterConditionsGlueConst[keyof typeof FilterConditionsGlueConst]; + + diff --git a/src/versions/v1/models/filter.ts b/src/versions/v1/models/filter.ts index 17d9fa6a..c166e109 100644 --- a/src/versions/v1/models/filter.ts +++ b/src/versions/v1/models/filter.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { FilterConditions } from './filter-conditions'; /** * @@ -21,17 +24,27 @@ */ export interface Filter { /** - * The ID of the created filter + * The ID of the filter * @type {number} */ 'id'?: number; /** - * The name of the created filter + * The name of the filter * @type {string} */ 'name'?: string; /** - * The activity flag of the created filter + * The system code of the filter + * @type {string} + */ + 'filter_code'?: string | null; + /** + * Whether the filter can be edited by the requesting user + * @type {boolean} + */ + 'is_editable'?: boolean; + /** + * The activity flag of the filter * @type {boolean} */ 'active_flag'?: boolean; @@ -41,40 +54,45 @@ export interface Filter { */ 'type'?: FilterTypeConst; /** - * If the created filter is temporary or not + * Whether the filter is temporary * @type {boolean} */ - 'temporary_flag'?: boolean; + 'temporary_flag'?: boolean | null; /** - * The user ID of the created filter + * The user ID of the filter owner * @type {number} */ 'user_id'?: number; /** - * The add time of the created filter + * The date and time when the filter was added * @type {string} */ 'add_time'?: string; /** - * The update time of the created filter + * The date and time when the filter was last updated * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; /** - * The visibility group ID of the created filter - * @type {number} + * + * @type {string} + */ + 'visible_to'?: FilterVisibleToConst; + /** + * The date and time when the filter was last used + * @type {string} */ - 'visible_to'?: number; + 'last_used_time'?: string | null; /** - * The custom view ID of the created filter + * The custom view ID linked to the filter * @type {number} */ - 'custom_view_id'?: number; + 'custom_view_id'?: number | null; /** - * The created filter conditions object - * @type {object} + * + * @type {FilterConditions} */ - 'conditions'?: object; + 'conditions'?: FilterConditions; } export const FilterTypeConst = { @@ -88,5 +106,13 @@ export interface Filter { } as const; export type FilterTypeConst = typeof FilterTypeConst[keyof typeof FilterTypeConst]; + export const FilterVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' + } as const; + + export type FilterVisibleToConst = typeof FilterVisibleToConst[keyof typeof FilterVisibleToConst]; diff --git a/src/versions/v1/models/get-filters-response-all-of-data-inner.ts b/src/versions/v1/models/get-filters-response-all-of-data-inner.ts index 28c24c29..0cf0f126 100644 --- a/src/versions/v1/models/get-filters-response-all-of-data-inner.ts +++ b/src/versions/v1/models/get-filters-response-all-of-data-inner.ts @@ -31,15 +31,30 @@ export interface GetFiltersResponseAllOfDataInner { */ 'name'?: string; /** + * The system code of the filter + * @type {string} + */ + 'filter_code'?: string | null; + /** + * Whether the filter can be edited by the requesting user + * @type {boolean} + */ + 'is_editable'?: boolean; + /** * The active flag of the filter * @type {boolean} */ 'active_flag'?: boolean; /** - * The type of the item + * * @type {string} */ - 'type'?: string; + 'type'?: GetFiltersResponseAllOfDataInnerTypeConst; + /** + * Whether the filter is temporary + * @type {boolean} + */ + 'temporary_flag'?: boolean | null; /** * The owner of the filter * @type {number} @@ -54,16 +69,42 @@ export interface GetFiltersResponseAllOfDataInner { * The date and time when the filter was updated * @type {string} */ - 'update_time'?: string; + 'update_time'?: string | null; /** - * The visibility group ID of who can see then filter - * @type {number} + * + * @type {string} + */ + 'visible_to'?: GetFiltersResponseAllOfDataInnerVisibleToConst; + /** + * The date and time when the filter was last used + * @type {string} */ - 'visible_to'?: number; + 'last_used_time'?: string | null; /** - * Used by Pipedrive webapp + * The custom view ID linked to the filter * @type {number} */ - 'custom_view_id'?: number; + 'custom_view_id'?: number | null; } + export const GetFiltersResponseAllOfDataInnerTypeConst = { + deals: 'deals', + leads: 'leads', + org: 'org', + people: 'people', + products: 'products', + activity: 'activity', + projects: 'projects' + } as const; + + export type GetFiltersResponseAllOfDataInnerTypeConst = typeof GetFiltersResponseAllOfDataInnerTypeConst[keyof typeof GetFiltersResponseAllOfDataInnerTypeConst]; + export const GetFiltersResponseAllOfDataInnerVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' + } as const; + + export type GetFiltersResponseAllOfDataInnerVisibleToConst = typeof GetFiltersResponseAllOfDataInnerVisibleToConst[keyof typeof GetFiltersResponseAllOfDataInnerVisibleToConst]; + + diff --git a/src/versions/v1/models/get-filters-response1-all-of-data.ts b/src/versions/v1/models/get-filters-response1-all-of-data.ts new file mode 100644 index 00000000..6b00ba72 --- /dev/null +++ b/src/versions/v1/models/get-filters-response1-all-of-data.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FilterConditions } from './filter-conditions'; + +/** +* The filter object including conditions +* @export +* @interface GetFiltersResponse1AllOfData +*/ +export interface GetFiltersResponse1AllOfData { + /** + * The ID of the filter + * @type {number} + */ + 'id'?: number; + /** + * The name of the filter + * @type {string} + */ + 'name'?: string; + /** + * The system code of the filter + * @type {string} + */ + 'filter_code'?: string | null; + /** + * Whether the filter can be edited by the requesting user + * @type {boolean} + */ + 'is_editable'?: boolean; + /** + * The active flag of the filter + * @type {boolean} + */ + 'active_flag'?: boolean; + /** + * + * @type {string} + */ + 'type'?: GetFiltersResponse1AllOfDataTypeConst; + /** + * Whether the filter is temporary + * @type {boolean} + */ + 'temporary_flag'?: boolean | null; + /** + * The owner of the filter + * @type {number} + */ + 'user_id'?: number; + /** + * The date and time when the filter was added + * @type {string} + */ + 'add_time'?: string; + /** + * The date and time when the filter was updated + * @type {string} + */ + 'update_time'?: string | null; + /** + * + * @type {string} + */ + 'visible_to'?: GetFiltersResponse1AllOfDataVisibleToConst; + /** + * The date and time when the filter was last used + * @type {string} + */ + 'last_used_time'?: string | null; + /** + * The custom view ID linked to the filter + * @type {number} + */ + 'custom_view_id'?: number | null; + /** + * + * @type {FilterConditions} + */ + 'conditions'?: FilterConditions; +} + + export const GetFiltersResponse1AllOfDataTypeConst = { + deals: 'deals', + leads: 'leads', + org: 'org', + people: 'people', + products: 'products', + activity: 'activity', + projects: 'projects' + } as const; + + export type GetFiltersResponse1AllOfDataTypeConst = typeof GetFiltersResponse1AllOfDataTypeConst[keyof typeof GetFiltersResponse1AllOfDataTypeConst]; + export const GetFiltersResponse1AllOfDataVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' + } as const; + + export type GetFiltersResponse1AllOfDataVisibleToConst = typeof GetFiltersResponse1AllOfDataVisibleToConst[keyof typeof GetFiltersResponse1AllOfDataVisibleToConst]; + + diff --git a/src/versions/v1/models/get-filters-response1-all-of.ts b/src/versions/v1/models/get-filters-response1-all-of.ts index a19d3392..ede8110b 100644 --- a/src/versions/v1/models/get-filters-response1-all-of.ts +++ b/src/versions/v1/models/get-filters-response1-all-of.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; +import { GetFiltersResponse1AllOfData } from './get-filters-response1-all-of-data'; /** * @@ -25,8 +25,8 @@ import { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of- export interface GetFiltersResponse1AllOf { /** * - * @type {GetFiltersResponseAllOfDataInner} + * @type {GetFiltersResponse1AllOfData} */ - 'data': GetFiltersResponseAllOfDataInner; + 'data': GetFiltersResponse1AllOfData; } diff --git a/src/versions/v1/models/get-filters-response1.ts b/src/versions/v1/models/get-filters-response1.ts index 5664791f..0f98f5be 100644 --- a/src/versions/v1/models/get-filters-response1.ts +++ b/src/versions/v1/models/get-filters-response1.ts @@ -21,7 +21,7 @@ import { BaseResponse } from './base-response'; import { GetFiltersResponse1AllOf } from './get-filters-response1-all-of'; // May contain unused imports in some cases // @ts-ignore -import { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; +import { GetFiltersResponse1AllOfData } from './get-filters-response1-all-of-data'; /** * @type GetFiltersResponse1 diff --git a/src/versions/v1/models/index.ts b/src/versions/v1/models/index.ts index 61c3a515..cb41a2c8 100644 --- a/src/versions/v1/models/index.ts +++ b/src/versions/v1/models/index.ts @@ -179,6 +179,9 @@ export * from './delete-webhook403-response-all-of'; export * from './fail-response'; export * from './field'; export * from './filter'; +export * from './filter-conditions'; +export * from './filter-conditions-conditions-inner'; +export * from './filter-conditions-conditions-inner-conditions-inner'; export * from './full-role'; export * from './full-role-all-of'; export * from './get-activities-collection-response'; @@ -253,6 +256,7 @@ export * from './get-files-response-data-inner'; export * from './get-filters-response'; export * from './get-filters-response1'; export * from './get-filters-response1-all-of'; +export * from './get-filters-response1-all-of-data'; export * from './get-filters-response-all-of'; export * from './get-filters-response-all-of-data-inner'; export * from './get-goal-result-response'; diff --git a/src/versions/v1/models/user-access.ts b/src/versions/v1/models/user-access.ts index 348615ea..927ea64d 100644 --- a/src/versions/v1/models/user-access.ts +++ b/src/versions/v1/models/user-access.ts @@ -21,17 +21,17 @@ */ export interface UserAccess { /** - * + * The granular app access level * @type {string} */ 'app'?: UserAccessAppConst; /** - * + * Whether the user has admin access or not * @type {boolean} */ 'admin'?: boolean; /** - * + * The ID of the permission set * @type {string} */ 'permission_set_id'?: string; diff --git a/src/versions/v1/models/user-access1.ts b/src/versions/v1/models/user-access1.ts index 63724c4f..5a937326 100644 --- a/src/versions/v1/models/user-access1.ts +++ b/src/versions/v1/models/user-access1.ts @@ -21,17 +21,17 @@ */ export interface UserAccess1 { /** - * + * The granular app access level * @type {string} */ 'app': UserAccess1AppConst; /** - * + * Whether the user has admin access or not * @type {boolean} */ 'admin'?: boolean; /** - * + * The ID of the permission set * @type {string} */ 'permission_set_id'?: string; diff --git a/src/versions/v2/api/persons-api.ts b/src/versions/v2/api/persons-api.ts index b4550b0d..b6d438d8 100644 --- a/src/versions/v2/api/persons-api.ts +++ b/src/versions/v2/api/persons-api.ts @@ -42,8 +42,6 @@ import { GetPersonSearchResponse } from '../models'; // @ts-ignore import { GetPersonsResponse } from '../models'; // @ts-ignore -import { UpdatePersonRequest } from '../models'; -// @ts-ignore import { UpsertPersonResponse } from '../models'; /** * PersonsApi - axios parameter creator @@ -597,11 +595,11 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Update a person * @param {number} id The ID of the person - * @param {UpdatePersonRequest} [UpdatePersonRequest] + * @param {AddPersonRequest} [AddPersonRequest] * @throws {RequiredError} */ - updatePerson: async (id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise => { + updatePerson: async (id: number, AddPersonRequest?: AddPersonRequest, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('updatePerson', 'id', id) const localVarPath = `/persons/{id}` @@ -631,7 +629,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; - localVarRequestOptions.data = serializeDataIfNeeded(UpdatePersonRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(AddPersonRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -789,12 +787,12 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Update a person * @param {number} id The ID of the person - * @param {UpdatePersonRequest} [UpdatePersonRequest] + * @param {AddPersonRequest} [AddPersonRequest] * @throws {RequiredError} */ - async updatePerson(id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest, ); + async updatePerson(id: number, AddPersonRequest?: AddPersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePerson(id, AddPersonRequest, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -915,7 +913,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa * @throws {RequiredError} */ updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ): Promise { - return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(axios, basePath)); + return localVarFp.updatePerson(requestParameters.id, requestParameters.AddPersonRequest, ).then((request) => request(axios, basePath)); }, }; }; @@ -1257,10 +1255,10 @@ export interface PersonsApiUpdatePersonRequest { /** * - * @type {UpdatePersonRequest} + * @type {AddPersonRequest} * @memberof PersonsApiUpdatePerson */ - readonly UpdatePersonRequest?: UpdatePersonRequest + readonly AddPersonRequest?: AddPersonRequest } /** @@ -1399,6 +1397,6 @@ export class PersonsApi extends BaseAPI { * @memberof PersonsApi */ public updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ) { - return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(this.axios, this.basePath)); + return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.AddPersonRequest, ).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/versions/v2/models/add-organization-field-request.ts b/src/versions/v2/models/add-organization-field-request.ts index c0e05674..0ad5f87f 100644 --- a/src/versions/v2/models/add-organization-field-request.ts +++ b/src/versions/v2/models/add-organization-field-request.ts @@ -62,11 +62,6 @@ export interface AddOrganizationFieldRequest { * @type {AddOrganizationFieldRequestRequiredFields} */ 'required_fields'?: AddOrganizationFieldRequestRequiredFields; - /** - * Field description - * @type {string} - */ - 'description'?: string | null; } export const AddOrganizationFieldRequestFieldTypeConst = { diff --git a/src/versions/v2/models/add-person-field-request.ts b/src/versions/v2/models/add-person-field-request.ts index 10716437..9167ab7d 100644 --- a/src/versions/v2/models/add-person-field-request.ts +++ b/src/versions/v2/models/add-person-field-request.ts @@ -62,11 +62,6 @@ export interface AddPersonFieldRequest { * @type {AddPersonFieldRequestRequiredFields} */ 'required_fields'?: AddPersonFieldRequestRequiredFields; - /** - * Field description - * @type {string} - */ - 'description'?: string | null; } export const AddPersonFieldRequestFieldTypeConst = { diff --git a/src/versions/v2/models/add-product-field-request.ts b/src/versions/v2/models/add-product-field-request.ts index 3d2d315c..6cb59bad 100644 --- a/src/versions/v2/models/add-product-field-request.ts +++ b/src/versions/v2/models/add-product-field-request.ts @@ -46,11 +46,6 @@ export interface AddProductFieldRequest { * @type {AddProductFieldRequestUiVisibility} */ 'ui_visibility'?: AddProductFieldRequestUiVisibility; - /** - * Field description - * @type {string} - */ - 'description'?: string | null; } export const AddProductFieldRequestFieldTypeConst = { diff --git a/src/versions/v2/models/create-many-deal-product-request.ts b/src/versions/v2/models/create-many-deal-product-request.ts index 0f94ab60..50767273 100644 --- a/src/versions/v2/models/create-many-deal-product-request.ts +++ b/src/versions/v2/models/create-many-deal-product-request.ts @@ -24,7 +24,7 @@ import { AddDealProductRequest } from './add-deal-product-request'; */ export interface CreateManyDealProductRequest { /** - * Array of products to attach to the deal. See the single product endpoint (https://developers.pipedrive.com/docs/api/v1/Deals#addDealProduct) for the expected format of array items. + * Array of products to attach to the deal. Each product object may have the following properties. * @type {Array} */ 'data': Array; diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts index 3f0e0003..60ee28f4 100644 --- a/src/versions/v2/models/index.ts +++ b/src/versions/v2/models/index.ts @@ -220,7 +220,6 @@ export * from './update-installment-response'; export * from './update-organization-field-request'; export * from './update-organization-request'; export * from './update-person-field-request'; -export * from './update-person-request'; export * from './update-pipeline-request'; export * from './update-product-field-request'; export * from './update-product-image-response'; diff --git a/src/versions/v2/models/update-person-field-request.ts b/src/versions/v2/models/update-person-field-request.ts index d68d3eaf..b8fa5a76 100644 --- a/src/versions/v2/models/update-person-field-request.ts +++ b/src/versions/v2/models/update-person-field-request.ts @@ -49,10 +49,5 @@ export interface UpdatePersonFieldRequest { * @type {AddPersonFieldRequestRequiredFields} */ 'required_fields'?: AddPersonFieldRequestRequiredFields; - /** - * Field description - * @type {string} - */ - 'description'?: string | null; } diff --git a/src/versions/v2/models/update-person-request.ts b/src/versions/v2/models/update-person-request.ts deleted file mode 100644 index 8cbacecb..00000000 --- a/src/versions/v2/models/update-person-request.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Pipedrive API v2 - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { AddPersonRequestEmailsInner } from './add-person-request-emails-inner'; -// May contain unused imports in some cases -// @ts-ignore -import { AddPersonRequestPhonesInner } from './add-person-request-phones-inner'; - -/** -* -* @export -* @interface UpdatePersonRequest -*/ -export interface UpdatePersonRequest { - /** - * The name of the person - * @type {string} - */ - 'name'?: string; - /** - * The ID of the user who owns the person - * @type {number} - */ - 'owner_id'?: number; - /** - * The ID of the organization linked to the person - * @type {number} - */ - 'org_id'?: number; - /** - * The creation date and time of the person - * @type {string} - */ - 'add_time'?: string; - /** - * The last updated date and time of the person - * @type {string} - */ - 'update_time'?: string; - /** - * The emails of the person - * @type {Array} - */ - 'emails'?: Array; - /** - * The phones of the person - * @type {Array} - */ - 'phones'?: Array; - /** - * The visibility of the person - * @type {number} - */ - 'visible_to'?: number; - /** - * The IDs of labels assigned to the person - * @type {Array} - */ - 'label_ids'?: Array; - /** - * If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.
ValueDescription
`no_consent`The customer has not given consent to receive any marketing communications
`unsubscribed`The customers have unsubscribed from ALL marketing communications
`subscribed`The customers are subscribed and are counted towards marketing caps
`archived`The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for
- * @type {string} - */ - 'marketing_status'?: UpdatePersonRequestMarketingStatusConst; - /** - * An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes - * @type {{ [key: string]: any | undefined; }} - */ - 'custom_fields'?: { [key: string]: any | undefined; }; -} - - export const UpdatePersonRequestMarketingStatusConst = { - no_consent: 'no_consent', - unsubscribed: 'unsubscribed', - subscribed: 'subscribed', - archived: 'archived' - } as const; - - export type UpdatePersonRequestMarketingStatusConst = typeof UpdatePersonRequestMarketingStatusConst[keyof typeof UpdatePersonRequestMarketingStatusConst]; - - diff --git a/src/versions/v2/models/update-product-field-request.ts b/src/versions/v2/models/update-product-field-request.ts index e975cec2..08108953 100644 --- a/src/versions/v2/models/update-product-field-request.ts +++ b/src/versions/v2/models/update-product-field-request.ts @@ -33,10 +33,5 @@ export interface UpdateProductFieldRequest { * @type {AddProductFieldRequestUiVisibility} */ 'ui_visibility'?: AddProductFieldRequestUiVisibility; - /** - * Field description - * @type {string} - */ - 'description'?: string | null; }