diff --git a/CHANGELOG.md b/CHANGELOG.md index f1d3a1e8..eedb8c07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19). ## [Unreleased] +### Changed +- Send token in the `x-api-token` header instead of `api_token` query parameter ## [27.1.1] - 2025-05-23 ### Fixed diff --git a/src/versions/v1/models/base-deal.ts b/src/versions/v1/models/base-deal.ts index 60c37cfb..dd346a7b 100644 --- a/src/versions/v1/models/base-deal.ts +++ b/src/versions/v1/models/base-deal.ts @@ -66,11 +66,6 @@ export interface BaseDeal { */ 'deleted'?: boolean; /** - * Whether the deal is archived or not - * @type {boolean} - */ - 'is_archived'?: boolean; - /** * The status of the deal * @type {string} */ diff --git a/src/versions/v1/models/new-deal-parameters.ts b/src/versions/v1/models/new-deal-parameters.ts index ab4f857c..d3e04c3a 100644 --- a/src/versions/v1/models/new-deal-parameters.ts +++ b/src/versions/v1/models/new-deal-parameters.ts @@ -61,16 +61,6 @@ export interface NewDealParameters { */ 'stage_id'?: number; /** - * Whether the deal is archived or not. If omitted, is_archived will be set to false. - * @type {boolean} - */ - 'is_archived'?: boolean; - /** - * The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and `is_archived` is true, it will be set to the current date and time. - * @type {string} - */ - 'archive_time'?: string; - /** * open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open. * @type {string} */ diff --git a/src/versions/v1/models/update-deal-parameters.ts b/src/versions/v1/models/update-deal-parameters.ts index 44de8172..d16fb47c 100644 --- a/src/versions/v1/models/update-deal-parameters.ts +++ b/src/versions/v1/models/update-deal-parameters.ts @@ -61,11 +61,6 @@ export interface UpdateDealParameters { */ 'stage_id'?: number; /** - * Whether the deal is archived or not - * @type {boolean} - */ - 'is_archived'?: boolean; - /** * open = Open, won = Won, lost = Lost, deleted = Deleted. * @type {string} */ diff --git a/src/versions/v2/api/beta-api.ts b/src/versions/v2/api/beta-api.ts index c358ad38..b15870df 100644 --- a/src/versions/v2/api/beta-api.ts +++ b/src/versions/v2/api/beta-api.ts @@ -77,7 +77,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) @@ -119,7 +119,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) @@ -212,7 +212,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "deals:read"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read"], configuration) @@ -321,7 +321,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:full", "leads:read"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read"], configuration) diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts index 864bea29..491ee871 100644 --- a/src/versions/v2/api/deals-api.ts +++ b/src/versions/v2/api/deals-api.ts @@ -248,7 +248,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) @@ -538,14 +538,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'} [include_fields] Optional comma separated string array of additional fields to include + * @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'} [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 {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', custom_fields?: string, limit?: number, cursor?: string, ): Promise => { + 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', custom_fields?: string, 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); @@ -644,12 +644,12 @@ 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'} [include_fields] Optional comma separated string array of additional fields to include + * @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'} [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. * @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', custom_fields?: string, ): Promise => { + 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', custom_fields?: string, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getDeal', 'id', id) const localVarPath = `/deals/{id}` @@ -723,7 +723,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "deals:read"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read"], configuration) @@ -914,14 +914,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'} [include_fields] Optional comma separated string array of additional fields to include + * @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'} [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 {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} */ - 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', custom_fields?: string, limit?: number, cursor?: string, ): Promise => { + 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', custom_fields?: string, 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); @@ -1652,14 +1652,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'} [include_fields] Optional comma separated string array of additional fields to include + * @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'} [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 {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', custom_fields?: string, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + 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', custom_fields?: string, 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); }, @@ -1667,12 +1667,12 @@ 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'} [include_fields] Optional comma separated string array of additional fields to include + * @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'} [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. * @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', custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + 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', custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, include_fields, custom_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1744,14 +1744,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'} [include_fields] Optional comma separated string array of additional fields to include + * @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'} [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 {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 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', custom_fields?: string, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + 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', custom_fields?: string, 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, limit, cursor, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2426,10 +2426,10 @@ 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'} + * @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'} * @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' + 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' /** * 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. @@ -2468,10 +2468,10 @@ 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'} + * @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'} * @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' + 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' /** * 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. @@ -2692,10 +2692,10 @@ 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'} + * @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'} * @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' + 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' /** * 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. diff --git a/src/versions/v2/api/leads-api.ts b/src/versions/v2/api/leads-api.ts index f7bdc131..43fe2c25 100644 --- a/src/versions/v2/api/leads-api.ts +++ b/src/versions/v2/api/leads-api.ts @@ -66,7 +66,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:full"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) @@ -114,7 +114,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:full", "leads:read"], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read"], configuration) diff --git a/src/versions/v2/models/add-deal-request.ts b/src/versions/v2/models/add-deal-request.ts index 001f4813..cbdc2f04 100644 --- a/src/versions/v2/models/add-deal-request.ts +++ b/src/versions/v2/models/add-deal-request.ts @@ -81,16 +81,6 @@ export interface AddDealRequest { */ 'is_deleted'?: boolean; /** - * Whether the deal is archived or not - * @type {boolean} - */ - 'is_archived'?: boolean; - /** - * The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and `is_archived` is true, it will be set to the current date and time. - * @type {string} - */ - 'archive_time'?: string; - /** * The status of the deal * @type {string} */ diff --git a/src/versions/v2/models/deal-item.ts b/src/versions/v2/models/deal-item.ts index 9b69a7db..d6f258ea 100644 --- a/src/versions/v2/models/deal-item.ts +++ b/src/versions/v2/models/deal-item.ts @@ -81,15 +81,15 @@ export interface DealItem { */ 'stage_change_time'?: string; /** - * Whether the deal is deleted or not + * Whether the deal is archived or not * @type {boolean} */ - 'is_deleted'?: boolean; + 'is_archived'?: boolean; /** - * Whether the deal is archived or not + * Whether the deal is deleted or not * @type {boolean} */ - 'is_archived'?: boolean; + 'is_deleted'?: boolean; /** * The status of the deal * @type {string} diff --git a/src/versions/v2/models/deal-item1.ts b/src/versions/v2/models/deal-item1.ts index 9c05d750..cca18da5 100644 --- a/src/versions/v2/models/deal-item1.ts +++ b/src/versions/v2/models/deal-item1.ts @@ -81,15 +81,15 @@ export interface DealItem1 { */ 'stage_change_time'?: string; /** - * Whether the deal is deleted or not + * Whether the deal is archived or not * @type {boolean} */ - 'is_deleted'?: boolean; + 'is_archived'?: boolean; /** - * Whether the deal is archived or not + * Whether the deal is deleted or not * @type {boolean} */ - 'is_archived'?: boolean; + 'is_deleted'?: boolean; /** * The status of the deal * @type {string} diff --git a/src/versions/v2/models/update-deal-request.ts b/src/versions/v2/models/update-deal-request.ts index 768ed681..fe669b68 100644 --- a/src/versions/v2/models/update-deal-request.ts +++ b/src/versions/v2/models/update-deal-request.ts @@ -81,16 +81,6 @@ export interface UpdateDealRequest { */ 'is_deleted'?: boolean; /** - * Whether the deal is archived or not - * @type {boolean} - */ - 'is_archived'?: boolean; - /** - * The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and `is_archived` is true, it will be set to the current date and time. - * @type {string} - */ - 'archive_time'?: string; - /** * The status of the deal * @type {string} */