diff --git a/CHANGELOG.md b/CHANGELOG.md index ec17c685..c57f2b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ 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 `project_id` and `pinned_to_project_flag` query parameter to the GET `/notes` endpoint +- Added `project_id` and `pinned_to_project_flag` request bodies to the POST/PUT `/notes` endpoint +- Added `project_id` and `pinned_to_project_flag` to success responses of GET/POST/PUT ## [25.0.0] - 2025-03-31 ### Changed diff --git a/docs/v1.md b/docs/v1.md index de9d3bdb..fcebcb74 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -8,7 +8,7 @@ ActivitiesApi | addActivity | **POST** /activities | Add an activity ActivitiesApi | deleteActivities | **DELETE** /activities | Delete multiple activities in bulk ActivitiesApi | deleteActivity | **DELETE** /activities/{id} | Delete an activity ActivitiesApi | getActivities | **GET** /activities | Get all activities assigned to a particular user -ActivitiesApi | getActivitiesCollection | **GET** /activities/collection | Get all activities (BETA) +ActivitiesApi | getActivitiesCollection | **GET** /activities/collection | Get all activities collection ActivitiesApi | getActivity | **GET** /activities/{id} | Get details of an activity ActivitiesApi | updateActivity | **PUT** /activities/{id} | Update an activity ActivityFieldsApi | getActivityFields | **GET** /activityFields | Get all activity fields @@ -44,6 +44,9 @@ DealsApi | deleteDealParticipant | **DELETE** /deals/{id}/participants/{deal_par DealsApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal DealsApi | deleteDeals | **DELETE** /deals | Delete multiple deals in bulk DealsApi | duplicateDeal | **POST** /deals/{id}/duplicate | Duplicate deal +DealsApi | getArchivedDeals | **GET** /deals/archived | Get all archived deals +DealsApi | getArchivedDealsSummary | **GET** /deals/summary/archived | Get archived deals summary +DealsApi | getArchivedDealsTimeline | **GET** /deals/timeline/archived | Get archived deals timeline DealsApi | getDeal | **GET** /deals/{id} | Get details of a deal DealsApi | getDealActivities | **GET** /deals/{id}/activities | List activities associated with a deal DealsApi | getDealChangelog | **GET** /deals/{id}/changelog | List updates about deal field values @@ -57,7 +60,7 @@ DealsApi | getDealProducts | **GET** /deals/{id}/products | List products attach DealsApi | getDealUpdates | **GET** /deals/{id}/flow | List updates about a deal DealsApi | getDealUsers | **GET** /deals/{id}/permittedUsers | List permitted users DealsApi | getDeals | **GET** /deals | Get all deals -DealsApi | getDealsCollection | **GET** /deals/collection | Get all deals (BETA) +DealsApi | getDealsCollection | **GET** /deals/collection | Get all deals collection DealsApi | getDealsSummary | **GET** /deals/summary | Get deals summary DealsApi | getDealsTimeline | **GET** /deals/timeline | Get deals timeline DealsApi | mergeDeals | **PUT** /deals/{id}/merge | Merge two deals @@ -93,6 +96,7 @@ LeadLabelsApi | updateLeadLabel | **PATCH** /leadLabels/{id} | Update a lead lab LeadSourcesApi | getLeadSources | **GET** /leadSources | Get all lead sources LeadsApi | addLead | **POST** /leads | Add a lead LeadsApi | deleteLead | **DELETE** /leads/{id} | Delete a lead +LeadsApi | getArchivedLeads | **GET** /leads/archived | Get all archived leads LeadsApi | getLead | **GET** /leads/{id} | Get one lead LeadsApi | getLeadUsers | **GET** /leads/{id}/permittedUsers | List permitted users LeadsApi | getLeads | **GET** /leads | Get all leads @@ -152,7 +156,7 @@ OrganizationsApi | getOrganizationPersons | **GET** /organizations/{id}/persons OrganizationsApi | getOrganizationUpdates | **GET** /organizations/{id}/flow | List updates about an organization OrganizationsApi | getOrganizationUsers | **GET** /organizations/{id}/permittedUsers | List permitted users OrganizationsApi | getOrganizations | **GET** /organizations | Get all organizations -OrganizationsApi | getOrganizationsCollection | **GET** /organizations/collection | Get all organizations (BETA) +OrganizationsApi | getOrganizationsCollection | **GET** /organizations/collection | Get all organizations collection OrganizationsApi | mergeOrganizations | **PUT** /organizations/{id}/merge | Merge two organizations OrganizationsApi | searchOrganization | **GET** /organizations/search | Search organizations OrganizationsApi | updateOrganization | **PUT** /organizations/{id} | Update an organization @@ -183,7 +187,7 @@ PersonsApi | getPersonProducts | **GET** /persons/{id}/products | List products PersonsApi | getPersonUpdates | **GET** /persons/{id}/flow | List updates about a person PersonsApi | getPersonUsers | **GET** /persons/{id}/permittedUsers | List permitted users PersonsApi | getPersons | **GET** /persons | Get all persons -PersonsApi | getPersonsCollection | **GET** /persons/collection | Get all persons (BETA) +PersonsApi | getPersonsCollection | **GET** /persons/collection | Get all persons collection PersonsApi | mergePersons | **PUT** /persons/{id}/merge | Merge two persons PersonsApi | searchPersons | **GET** /persons/search | Search persons PersonsApi | updatePerson | **PUT** /persons/{id} | Update a person diff --git a/docs/v2.md b/docs/v2.md index 19b8a1c2..7b62cd9b 100644 --- a/docs/v2.md +++ b/docs/v2.md @@ -9,20 +9,27 @@ ActivitiesApi | deleteActivity | **DELETE** /activities/{id} | Delete an activit ActivitiesApi | getActivities | **GET** /activities | Get all activities ActivitiesApi | getActivity | **GET** /activities/{id} | Get details of an activity ActivitiesApi | updateActivity | **PATCH** /activities/{id} | Update an activity +BetaApi | convertDealToLead | **POST** /deals/{id}/convert/lead | Convert a deal to a lead (BETA) +BetaApi | convertLeadToDeal | **POST** /leads/{id}/convert/deal | Convert a lead to a deal (BETA) BetaApi | deleteInstallment | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal +BetaApi | getDealConversionStatus | **GET** /deals/{id}/convert/status/{conversion_id} | Get Deal conversion status (BETA) BetaApi | getInstallments | **GET** /deals/installments | List installments added to a list of deals +BetaApi | getLeadConversionStatus | **GET** /leads/{id}/convert/status/{conversion_id} | Get Lead conversion status (BETA) BetaApi | postInstallment | **POST** /deals/{id}/installments | Add an installment to a deal BetaApi | updateInstallment | **PATCH** /deals/{id}/installments/{installment_id} | Update an installment added to a deal DealsApi | addDeal | **POST** /deals | Add a new deal DealsApi | addDealFollower | **POST** /deals/{id}/followers | Add a follower to a deal DealsApi | addDealProduct | **POST** /deals/{id}/products | Add a product to a deal +DealsApi | convertDealToLead | **POST** /deals/{id}/convert/lead | Convert a deal to a lead (BETA) DealsApi | deleteAdditionalDiscount | **DELETE** /deals/{id}/discounts/{discount_id} | Delete a discount from a deal DealsApi | deleteDeal | **DELETE** /deals/{id} | Delete a deal DealsApi | deleteDealFollower | **DELETE** /deals/{id}/followers/{follower_id} | Delete a follower from a deal DealsApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal DealsApi | deleteInstallment | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal DealsApi | getAdditionalDiscounts | **GET** /deals/{id}/discounts | List discounts added to a deal +DealsApi | getArchivedDeals | **GET** /deals/archived | Get all archived deals DealsApi | getDeal | **GET** /deals/{id} | Get details of a deal +DealsApi | getDealConversionStatus | **GET** /deals/{id}/convert/status/{conversion_id} | Get Deal conversion status (BETA) DealsApi | getDealFollowers | **GET** /deals/{id}/followers | List followers of a deal DealsApi | getDealFollowersChangelog | **GET** /deals/{id}/followers/changelog | List followers changelog of a deal DealsApi | getDealProducts | **GET** /deals/{id}/products | List products attached to a deal @@ -38,6 +45,8 @@ DealsApi | updateDealProduct | **PATCH** /deals/{id}/products/{product_attachmen DealsApi | updateInstallment | **PATCH** /deals/{id}/installments/{installment_id} | Update an installment added to a deal ItemSearchApi | searchItem | **GET** /itemSearch | Perform a search from multiple item types ItemSearchApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type +LeadsApi | convertLeadToDeal | **POST** /leads/{id}/convert/deal | Convert a lead to a deal (BETA) +LeadsApi | getLeadConversionStatus | **GET** /leads/{id}/convert/status/{conversion_id} | Get Lead conversion status (BETA) LeadsApi | searchLeads | **GET** /leads/search | Search leads OrganizationsApi | addOrganization | **POST** /organizations | Add a new organization OrganizationsApi | addOrganizationFollower | **POST** /organizations/{id}/followers | Add a follower to an organization diff --git a/src/versions/v1/api/activities-api.ts b/src/versions/v1/api/activities-api.ts index 2c9bf4d4..e9edc1d5 100644 --- a/src/versions/v1/api/activities-api.ts +++ b/src/versions/v1/api/activities-api.ts @@ -51,7 +51,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** * @summary Add an activity * @param {AddActivityRequest} [AddActivityRequest] - + * @deprecated * @throws {RequiredError} */ addActivity: async (AddActivityRequest?: AddActivityRequest, ): Promise => { @@ -89,10 +89,10 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted. + * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/activities/{id} instead. * @summary Delete multiple activities in bulk * @param {string} ids The comma-separated IDs of activities that will be deleted - + * @deprecated * @throws {RequiredError} */ deleteActivities: async (ids: string, ): Promise => { @@ -136,7 +136,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * Marks an activity as deleted. After 30 days, the activity will be permanently deleted. * @summary Delete an activity * @param {number} id The ID of the activity - + * @deprecated * @throws {RequiredError} */ deleteActivity: async (id: number, ): Promise => { @@ -184,7 +184,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * @param {string} [start_date] Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format. * @param {string} [end_date] Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format. * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both done and not done activities. - + * @deprecated * @throws {RequiredError} */ getActivities: async (user_id?: number, filter_id?: number, type?: string, limit?: number, start?: number, start_date?: string, end_date?: string, done?: 0 | 1, ): Promise => { @@ -255,8 +255,8 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur }; }, /** - * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all activities (BETA) + * Returns all activities. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/activities instead. + * @summary Get all activities collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. @@ -264,7 +264,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * @param {number} [user_id] The ID of the user whose activities will be fetched. If omitted, all activities are returned. * @param {boolean} [done] Whether the activity is done or not. `false` = Not done, `true` = Done. If omitted, returns both done and not done activities. * @param {string} [type] The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes. - + * @deprecated * @throws {RequiredError} */ getActivitiesCollection: async (cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, done?: boolean, type?: string, ): Promise => { @@ -330,7 +330,7 @@ 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 - + * @deprecated * @throws {RequiredError} */ getActivity: async (id: number, ): Promise => { @@ -372,7 +372,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * @summary Update an activity * @param {number} id The ID of the activity * @param {UpdateActivityRequest} [UpdateActivityRequest] - + * @deprecated * @throws {RequiredError} */ updateActivity: async (id: number, UpdateActivityRequest?: UpdateActivityRequest, ): Promise => { @@ -427,7 +427,7 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** * @summary Add an activity * @param {AddActivityRequest} [AddActivityRequest] - + * @deprecated * @throws {RequiredError} */ async addActivity(AddActivityRequest?: AddActivityRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -435,10 +435,10 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted. + * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/activities/{id} instead. * @summary Delete multiple activities in bulk * @param {string} ids The comma-separated IDs of activities that will be deleted - + * @deprecated * @throws {RequiredError} */ async deleteActivities(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -449,7 +449,7 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * Marks an activity as deleted. After 30 days, the activity will be permanently deleted. * @summary Delete an activity * @param {number} id The ID of the activity - + * @deprecated * @throws {RequiredError} */ async deleteActivity(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -467,7 +467,7 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * @param {string} [start_date] Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format. * @param {string} [end_date] Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format. * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both done and not done activities. - + * @deprecated * @throws {RequiredError} */ async getActivities(user_id?: number, filter_id?: number, type?: string, limit?: number, start?: number, start_date?: string, end_date?: string, done?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -475,8 +475,8 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all activities (BETA) + * Returns all activities. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/activities instead. + * @summary Get all activities collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. @@ -484,7 +484,7 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * @param {number} [user_id] The ID of the user whose activities will be fetched. If omitted, all activities are returned. * @param {boolean} [done] Whether the activity is done or not. `false` = Not done, `true` = Done. If omitted, returns both done and not done activities. * @param {string} [type] The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes. - + * @deprecated * @throws {RequiredError} */ async getActivitiesCollection(cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, done?: boolean, type?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -495,7 +495,7 @@ 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 - + * @deprecated * @throws {RequiredError} */ async getActivity(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -507,7 +507,7 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * @summary Update an activity * @param {number} id The ID of the activity * @param {UpdateActivityRequest} [UpdateActivityRequest] - + * @deprecated * @throws {RequiredError} */ async updateActivity(id: number, UpdateActivityRequest?: UpdateActivityRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -528,17 +528,17 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** * @summary Add an activity * @param {ActivitiesApiAddActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addActivity(requestParameters: ActivitiesApiAddActivityRequest = {}, ): Promise { return localVarFp.addActivity(requestParameters.AddActivityRequest, ).then((request) => request(axios, basePath)); }, /** - * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted. + * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/activities/{id} instead. * @summary Delete multiple activities in bulk * @param {ActivitiesApiDeleteActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteActivities(requestParameters: ActivitiesApiDeleteActivitiesRequest, ): Promise { @@ -548,7 +548,7 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas * Marks an activity as deleted. After 30 days, the activity will be permanently deleted. * @summary Delete an activity * @param {ActivitiesApiDeleteActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteActivity(requestParameters: ActivitiesApiDeleteActivityRequest, ): Promise { @@ -558,17 +558,17 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas * Returns all activities assigned to a particular user. * @summary Get all activities assigned to a particular user * @param {ActivitiesApiGetActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ): Promise { return localVarFp.getActivities(requestParameters.user_id, requestParameters.filter_id, requestParameters.type, requestParameters.limit, requestParameters.start, requestParameters.start_date, requestParameters.end_date, requestParameters.done, ).then((request) => request(axios, basePath)); }, /** - * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all activities (BETA) + * Returns all activities. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/activities instead. + * @summary Get all activities collection * @param {ActivitiesApiGetActivitiesCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getActivitiesCollection(requestParameters: ActivitiesApiGetActivitiesCollectionRequest = {}, ): Promise { @@ -578,7 +578,7 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas * Returns the details of a specific activity. * @summary Get details of an activity * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getActivity(requestParameters: ActivitiesApiGetActivityRequest, ): Promise { @@ -588,7 +588,7 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas * Updates an activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** * @summary Update an activity * @param {ActivitiesApiUpdateActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updateActivity(requestParameters: ActivitiesApiUpdateActivityRequest, ): Promise { @@ -804,7 +804,7 @@ export class ActivitiesApi extends BaseAPI { * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** * @summary Add an activity * @param {ActivitiesApiAddActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ @@ -813,10 +813,10 @@ export class ActivitiesApi extends BaseAPI { } /** - * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted. + * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/activities/{id} instead. * @summary Delete multiple activities in bulk * @param {ActivitiesApiDeleteActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ @@ -828,7 +828,7 @@ export class ActivitiesApi extends BaseAPI { * Marks an activity as deleted. After 30 days, the activity will be permanently deleted. * @summary Delete an activity * @param {ActivitiesApiDeleteActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ @@ -840,7 +840,7 @@ export class ActivitiesApi extends BaseAPI { * Returns all activities assigned to a particular user. * @summary Get all activities assigned to a particular user * @param {ActivitiesApiGetActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ @@ -849,10 +849,10 @@ export class ActivitiesApi extends BaseAPI { } /** - * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all activities (BETA) + * Returns all activities. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/activities instead. + * @summary Get all activities collection * @param {ActivitiesApiGetActivitiesCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ @@ -864,7 +864,7 @@ export class ActivitiesApi extends BaseAPI { * Returns the details of a specific activity. * @summary Get details of an activity * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ @@ -876,7 +876,7 @@ export class ActivitiesApi extends BaseAPI { * Updates an activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** * @summary Update an activity * @param {ActivitiesApiUpdateActivityRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ActivitiesApi */ diff --git a/src/versions/v1/api/deals-api.ts b/src/versions/v1/api/deals-api.ts index 05e04849..3014db36 100644 --- a/src/versions/v1/api/deals-api.ts +++ b/src/versions/v1/api/deals-api.ts @@ -105,7 +105,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. * @summary Add a deal * @param {AddDealRequest} [AddDealRequest] - + * @deprecated * @throws {RequiredError} */ addDeal: async (AddDealRequest?: AddDealRequest, ): Promise => { @@ -237,7 +237,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @summary Add a product to a deal * @param {number} id The ID of the deal * @param {AddDealProductRequest} [AddDealProductRequest] - + * @deprecated * @throws {RequiredError} */ addDealProduct: async (id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise => { @@ -281,7 +281,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Marks a deal as deleted. After 30 days, the deal will be permanently deleted. * @summary Delete a deal * @param {number} id The ID of the deal - + * @deprecated * @throws {RequiredError} */ deleteDeal: async (id: number, ): Promise => { @@ -413,7 +413,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @summary Delete an attached product from a deal * @param {number} id The ID of the deal * @param {number} product_attachment_id The product attachment ID - + * @deprecated * @throws {RequiredError} */ deleteDealProduct: async (id: number, product_attachment_id: number, ): Promise => { @@ -454,10 +454,10 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted. + * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/deals/{id} instead. * @summary Delete multiple deals in bulk * @param {string} ids The comma-separated IDs that will be deleted - + * @deprecated * @throws {RequiredError} */ deleteDeals: async (ids: string, ): Promise => { @@ -529,6 +529,257 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all archived deals. + * @summary Get all archived deals + * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. + * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @param {number} [product_id] If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. + * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. + * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. + * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). + * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. + * @deprecated + * @throws {RequiredError} + */ + getArchivedDeals: async (user_id?: number, filter_id?: number, person_id?: number, org_id?: number, product_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): 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); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + + if (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (person_id !== undefined) { + localVarQueryParameter['person_id'] = person_id; + } + + if (org_id !== undefined) { + localVarQueryParameter['org_id'] = org_id; + } + + if (product_id !== undefined) { + localVarQueryParameter['product_id'] = product_id; + } + + if (pipeline_id !== undefined) { + localVarQueryParameter['pipeline_id'] = pipeline_id; + } + + if (stage_id !== undefined) { + localVarQueryParameter['stage_id'] = stage_id; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (start !== undefined) { + localVarQueryParameter['start'] = start; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + + if (owned_by_you !== undefined) { + localVarQueryParameter['owned_by_you'] = owned_by_you; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a summary of all archived deals. + * @summary Get archived deals summary + * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. + * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. + * @param {number} [user_id] Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. + * @param {number} [pipeline_id] Only deals within the given pipeline will be returned + * @param {number} [stage_id] Only deals within the given stage will be returned + * @deprecated + * @throws {RequiredError} + */ + getArchivedDealsSummary: async (status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, pipeline_id?: number, stage_id?: number, ): Promise => { + const localVarPath = `/deals/summary/archived`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (pipeline_id !== undefined) { + localVarQueryParameter['pipeline_id'] = pipeline_id; + } + + if (stage_id !== undefined) { + localVarQueryParameter['stage_id'] = stage_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * @summary Get archived deals timeline + * @param {string} start_date The date when the first interval starts. Format: YYYY-MM-DD. + * @param {'day' | 'week' | 'month' | 'quarter'} interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> + * @param {number} amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). + * @param {string} field_key The date field key which deals will be retrieved from + * @param {number} [user_id] If supplied, only deals matching the given user will be returned + * @param {number} [pipeline_id] If supplied, only deals matching the given pipeline will be returned + * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned + * @param {0 | 1} [exclude_deals] Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. + * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user\'s default currency is used. + * @deprecated + * @throws {RequiredError} + */ + getArchivedDealsTimeline: async (start_date: string, interval: 'day' | 'week' | 'month' | 'quarter', amount: number, field_key: string, user_id?: number, pipeline_id?: number, filter_id?: number, exclude_deals?: 0 | 1, totals_convert_currency?: string, ): Promise => { + // verify required parameter 'start_date' is not null or undefined + assertParamExists('getArchivedDealsTimeline', 'start_date', start_date) + // verify required parameter 'interval' is not null or undefined + assertParamExists('getArchivedDealsTimeline', 'interval', interval) + // verify required parameter 'amount' is not null or undefined + assertParamExists('getArchivedDealsTimeline', 'amount', amount) + // verify required parameter 'field_key' is not null or undefined + assertParamExists('getArchivedDealsTimeline', 'field_key', field_key) + const localVarPath = `/deals/timeline/archived`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + + if (start_date !== undefined) { + localVarQueryParameter['start_date'] = (start_date as any instanceof Date) ? + (start_date as any).toISOString().substr(0,10) : + start_date; + } + + if (interval !== undefined) { + localVarQueryParameter['interval'] = interval; + } + + if (amount !== undefined) { + localVarQueryParameter['amount'] = amount; + } + + if (field_key !== undefined) { + localVarQueryParameter['field_key'] = field_key; + } + + if (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (pipeline_id !== undefined) { + localVarQueryParameter['pipeline_id'] = pipeline_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (exclude_deals !== undefined) { + localVarQueryParameter['exclude_deals'] = exclude_deals; + } + + if (totals_convert_currency !== undefined) { + localVarQueryParameter['totals_convert_currency'] = totals_convert_currency; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; @@ -542,7 +793,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal. * @summary Get details of a deal * @param {number} id The ID of the deal - + * @deprecated * @throws {RequiredError} */ getDeal: async (id: number, ): Promise => { @@ -580,14 +831,14 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Lists activities associated with a deal. + * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead. * @summary List activities associated with a deal * @param {number} id The ID of the deal * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result - + * @deprecated * @throws {RequiredError} */ getDealActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => { @@ -942,12 +1193,12 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead. * @summary List all persons associated with a deal * @param {number} id The ID of the deal * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ getDealPersons: async (id: number, start?: number, limit?: number, ): Promise => { @@ -999,7 +1250,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [include_product_data] Whether to fetch product data along with each attached product (1) or not (0, default) - + * @deprecated * @throws {RequiredError} */ getDealProducts: async (id: number, start?: number, limit?: number, include_product_data?: 0 | 1, ): Promise => { @@ -1151,7 +1402,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Returns all deals. For more information, see the tutorial for getting all deals. + * Returns all not archived deals. For more information, see the tutorial for getting all deals. * @summary Get all deals * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. * @param {number} [filter_id] The ID of the filter to use @@ -1161,7 +1412,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. - + * @deprecated * @throws {RequiredError} */ getDeals: async (user_id?: number, filter_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise => { @@ -1228,8 +1479,8 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all deals (BETA) + * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead. + * @summary Get all deals collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. @@ -1237,7 +1488,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [user_id] If supplied, only deals matching the given user will be returned * @param {number} [stage_id] If supplied, only deals within the given stage will be returned * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. - + * @deprecated * @throws {RequiredError} */ getDealsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', ): Promise => { @@ -1300,7 +1551,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Returns a summary of all the deals. + * Returns a summary of all not archived deals. * @summary Get deals summary * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. @@ -1362,7 +1613,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * Returns not archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. * @summary Get deals timeline * @param {string} start_date The date when the first interval starts. Format: YYYY-MM-DD. * @param {'day' | 'week' | 'month' | 'quarter'} interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> @@ -1510,7 +1761,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ searchDeals: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: 'deal.cc_email', start?: number, limit?: number, ): Promise => { @@ -1587,7 +1838,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @summary Update a deal * @param {number} id The ID of the deal * @param {UpdateDealRequest} [UpdateDealRequest] - + * @deprecated * @throws {RequiredError} */ updateDeal: async (id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise => { @@ -1633,7 +1884,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration * @param {number} id The ID of the deal * @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal) * @param {UpdateDealProductRequest} [UpdateDealProductRequest] - + * @deprecated * @throws {RequiredError} */ updateDealProduct: async (id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest, ): Promise => { @@ -1691,7 +1942,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. * @summary Add a deal * @param {AddDealRequest} [AddDealRequest] - + * @deprecated * @throws {RequiredError} */ async addDeal(AddDealRequest?: AddDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1727,7 +1978,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @summary Add a product to a deal * @param {number} id The ID of the deal * @param {AddDealProductRequest} [AddDealProductRequest] - + * @deprecated * @throws {RequiredError} */ async addDealProduct(id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1738,7 +1989,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * Marks a deal as deleted. After 30 days, the deal will be permanently deleted. * @summary Delete a deal * @param {number} id The ID of the deal - + * @deprecated * @throws {RequiredError} */ async deleteDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1774,7 +2025,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @summary Delete an attached product from a deal * @param {number} id The ID of the deal * @param {number} product_attachment_id The product attachment ID - + * @deprecated * @throws {RequiredError} */ async deleteDealProduct(id: number, product_attachment_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1782,10 +2033,10 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted. + * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/deals/{id} instead. * @summary Delete multiple deals in bulk * @param {string} ids The comma-separated IDs that will be deleted - + * @deprecated * @throws {RequiredError} */ async deleteDeals(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1803,11 +2054,67 @@ export const DealsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.duplicateDeal(id, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Returns all archived deals. + * @summary Get all archived deals + * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. + * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @param {number} [product_id] If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. + * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. + * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. + * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). + * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. + * @deprecated + * @throws {RequiredError} + */ + async getArchivedDeals(user_id?: number, filter_id?: number, person_id?: number, org_id?: number, product_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArchivedDeals(user_id, filter_id, person_id, org_id, product_id, pipeline_id, stage_id, status, start, limit, sort, owned_by_you, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a summary of all archived deals. + * @summary Get archived deals summary + * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. + * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. + * @param {number} [user_id] Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. + * @param {number} [pipeline_id] Only deals within the given pipeline will be returned + * @param {number} [stage_id] Only deals within the given stage will be returned + * @deprecated + * @throws {RequiredError} + */ + async getArchivedDealsSummary(status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, pipeline_id?: number, stage_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArchivedDealsSummary(status, filter_id, user_id, pipeline_id, stage_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * @summary Get archived deals timeline + * @param {string} start_date The date when the first interval starts. Format: YYYY-MM-DD. + * @param {'day' | 'week' | 'month' | 'quarter'} interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> + * @param {number} amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). + * @param {string} field_key The date field key which deals will be retrieved from + * @param {number} [user_id] If supplied, only deals matching the given user will be returned + * @param {number} [pipeline_id] If supplied, only deals matching the given pipeline will be returned + * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned + * @param {0 | 1} [exclude_deals] Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. + * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user\'s default currency is used. + * @deprecated + * @throws {RequiredError} + */ + async getArchivedDealsTimeline(start_date: string, interval: 'day' | 'week' | 'month' | 'quarter', amount: number, field_key: string, user_id?: number, pipeline_id?: number, filter_id?: number, exclude_deals?: 0 | 1, totals_convert_currency?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArchivedDealsTimeline(start_date, interval, amount, field_key, user_id, pipeline_id, filter_id, exclude_deals, totals_convert_currency, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal. * @summary Get details of a deal * @param {number} id The ID of the deal - + * @deprecated * @throws {RequiredError} */ async getDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1815,14 +2122,14 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists activities associated with a deal. + * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead. * @summary List activities associated with a deal * @param {number} id The ID of the deal * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result - + * @deprecated * @throws {RequiredError} */ async getDealActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1907,12 +2214,12 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead. * @summary List all persons associated with a deal * @param {number} id The ID of the deal * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async getDealPersons(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1926,7 +2233,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [include_product_data] Whether to fetch product data along with each attached product (1) or not (0, default) - + * @deprecated * @throws {RequiredError} */ async getDealProducts(id: number, start?: number, limit?: number, include_product_data?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1960,7 +2267,7 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns all deals. For more information, see the tutorial for getting all deals. + * Returns all not archived deals. For more information, see the tutorial for getting all deals. * @summary Get all deals * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. * @param {number} [filter_id] The ID of the filter to use @@ -1970,7 +2277,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. - + * @deprecated * @throws {RequiredError} */ async getDeals(user_id?: number, filter_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1978,8 +2285,8 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all deals (BETA) + * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead. + * @summary Get all deals collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. @@ -1987,7 +2294,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {number} [user_id] If supplied, only deals matching the given user will be returned * @param {number} [stage_id] If supplied, only deals within the given stage will be returned * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. - + * @deprecated * @throws {RequiredError} */ async getDealsCollection(cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1995,7 +2302,7 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns a summary of all the deals. + * Returns a summary of all not archived deals. * @summary Get deals summary * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. @@ -2010,7 +2317,7 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * Returns not archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. * @summary Get deals timeline * @param {string} start_date The date when the first interval starts. Format: YYYY-MM-DD. * @param {'day' | 'week' | 'month' | 'quarter'} interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> @@ -2052,7 +2359,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async searchDeals(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: 'deal.cc_email', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -2064,7 +2371,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @summary Update a deal * @param {number} id The ID of the deal * @param {UpdateDealRequest} [UpdateDealRequest] - + * @deprecated * @throws {RequiredError} */ async updateDeal(id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -2077,7 +2384,7 @@ export const DealsApiFp = function(configuration?: Configuration) { * @param {number} id The ID of the deal * @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal) * @param {UpdateDealProductRequest} [UpdateDealProductRequest] - + * @deprecated * @throws {RequiredError} */ async updateDealProduct(id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -2098,7 +2405,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. * @summary Add a deal * @param {DealsApiAddDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addDeal(requestParameters: DealsApiAddDealRequest = {}, ): Promise { @@ -2128,7 +2435,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Adds a product to a deal, creating a new item called a deal-product. * @summary Add a product to a deal * @param {DealsApiAddDealProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addDealProduct(requestParameters: DealsApiAddDealProductRequest, ): Promise { @@ -2138,7 +2445,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Marks a deal as deleted. After 30 days, the deal will be permanently deleted. * @summary Delete a deal * @param {DealsApiDeleteDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteDeal(requestParameters: DealsApiDeleteDealRequest, ): Promise { @@ -2168,17 +2475,17 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled * @summary Delete an attached product from a deal * @param {DealsApiDeleteDealProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteDealProduct(requestParameters: DealsApiDeleteDealProductRequest, ): Promise { return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(axios, basePath)); }, /** - * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted. + * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/deals/{id} instead. * @summary Delete multiple deals in bulk * @param {DealsApiDeleteDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteDeals(requestParameters: DealsApiDeleteDealsRequest, ): Promise { @@ -2194,21 +2501,51 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath duplicateDeal(requestParameters: DealsApiDuplicateDealRequest, ): Promise { return localVarFp.duplicateDeal(requestParameters.id, ).then((request) => request(axios, basePath)); }, + /** + * Returns all archived deals. + * @summary Get all archived deals + * @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getArchivedDeals(requestParameters: DealsApiGetArchivedDealsRequest = {}, ): Promise { + return localVarFp.getArchivedDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.pipeline_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(axios, basePath)); + }, + /** + * Returns a summary of all archived deals. + * @summary Get archived deals summary + * @param {DealsApiGetArchivedDealsSummaryRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getArchivedDealsSummary(requestParameters: DealsApiGetArchivedDealsSummaryRequest = {}, ): Promise { + return localVarFp.getArchivedDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.stage_id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * @summary Get archived deals timeline + * @param {DealsApiGetArchivedDealsTimelineRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getArchivedDealsTimeline(requestParameters: DealsApiGetArchivedDealsTimelineRequest, ): Promise { + return localVarFp.getArchivedDealsTimeline(requestParameters.start_date, requestParameters.interval, requestParameters.amount, requestParameters.field_key, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.filter_id, requestParameters.exclude_deals, requestParameters.totals_convert_currency, ).then((request) => request(axios, basePath)); + }, /** * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal. * @summary Get details of a deal * @param {DealsApiGetDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getDeal(requestParameters: DealsApiGetDealRequest, ): Promise { return localVarFp.getDeal(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Lists activities associated with a deal. + * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead. * @summary List activities associated with a deal * @param {DealsApiGetDealActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getDealActivities(requestParameters: DealsApiGetDealActivitiesRequest, ): Promise { @@ -2275,10 +2612,10 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath return localVarFp.getDealParticipantsChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); }, /** - * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead. * @summary List all persons associated with a deal * @param {DealsApiGetDealPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getDealPersons(requestParameters: DealsApiGetDealPersonsRequest, ): Promise { @@ -2288,7 +2625,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Lists products attached to a deal. * @summary List products attached to a deal * @param {DealsApiGetDealProductsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getDealProducts(requestParameters: DealsApiGetDealProductsRequest, ): Promise { @@ -2315,27 +2652,27 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath return localVarFp.getDealUsers(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Returns all deals. For more information, see the tutorial for getting all deals. + * Returns all not archived deals. For more information, see the tutorial for getting all deals. * @summary Get all deals * @param {DealsApiGetDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getDeals(requestParameters: DealsApiGetDealsRequest = {}, ): Promise { return localVarFp.getDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(axios, basePath)); }, /** - * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all deals (BETA) + * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead. + * @summary Get all deals collection * @param {DealsApiGetDealsCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getDealsCollection(requestParameters: DealsApiGetDealsCollectionRequest = {}, ): Promise { return localVarFp.getDealsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.stage_id, requestParameters.status, ).then((request) => request(axios, basePath)); }, /** - * Returns a summary of all the deals. + * Returns a summary of all not archived deals. * @summary Get deals summary * @param {DealsApiGetDealsSummaryRequest} requestParameters Request parameters. @@ -2345,7 +2682,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath return localVarFp.getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.stage_id, ).then((request) => request(axios, basePath)); }, /** - * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * Returns not archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. * @summary Get deals timeline * @param {DealsApiGetDealsTimelineRequest} requestParameters Request parameters. @@ -2368,7 +2705,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID. * @summary Search deals * @param {DealsApiSearchDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ searchDeals(requestParameters: DealsApiSearchDealsRequest, ): Promise { @@ -2378,7 +2715,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Updates the properties of a deal. For more information, see the tutorial for updating a deal. * @summary Update a deal * @param {DealsApiUpdateDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updateDeal(requestParameters: DealsApiUpdateDealRequest, ): Promise { @@ -2388,7 +2725,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath * Updates the details of the product that has been attached to a deal. * @summary Update the product attached to a deal * @param {DealsApiUpdateDealProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updateDealProduct(requestParameters: DealsApiUpdateDealProductRequest, ): Promise { @@ -2579,6 +2916,209 @@ export interface DealsApiDuplicateDealRequest { readonly id: number } +/** + * Request parameters for getArchivedDeals operation in DealsApi. + * @export + * @interface DealsApiGetArchivedDealsRequest + */ +export interface DealsApiGetArchivedDealsRequest { + /** + * If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly user_id?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly filter_id?: number + + /** + * If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly person_id?: number + + /** + * If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly org_id?: number + + /** + * If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly product_id?: number + + /** + * If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly pipeline_id?: number + + /** + * If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly stage_id?: number + + /** + * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. + * @type {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} + * @memberof DealsApiGetArchivedDeals + */ + readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted' + + /** + * Pagination start + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly limit?: number + + /** + * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). + * @type {string} + * @memberof DealsApiGetArchivedDeals + */ + readonly sort?: string + + /** + * When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. + * @type {0 | 1} + * @memberof DealsApiGetArchivedDeals + */ + readonly owned_by_you?: 0 | 1 +} + +/** + * Request parameters for getArchivedDealsSummary operation in DealsApi. + * @export + * @interface DealsApiGetArchivedDealsSummaryRequest + */ +export interface DealsApiGetArchivedDealsSummaryRequest { + /** + * Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. + * @type {'open' | 'won' | 'lost'} + * @memberof DealsApiGetArchivedDealsSummary + */ + readonly status?: 'open' | 'won' | 'lost' + + /** + * <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. + * @type {number} + * @memberof DealsApiGetArchivedDealsSummary + */ + readonly filter_id?: number + + /** + * Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. + * @type {number} + * @memberof DealsApiGetArchivedDealsSummary + */ + readonly user_id?: number + + /** + * Only deals within the given pipeline will be returned + * @type {number} + * @memberof DealsApiGetArchivedDealsSummary + */ + readonly pipeline_id?: number + + /** + * Only deals within the given stage will be returned + * @type {number} + * @memberof DealsApiGetArchivedDealsSummary + */ + readonly stage_id?: number +} + +/** + * Request parameters for getArchivedDealsTimeline operation in DealsApi. + * @export + * @interface DealsApiGetArchivedDealsTimelineRequest + */ +export interface DealsApiGetArchivedDealsTimelineRequest { + /** + * The date when the first interval starts. Format: YYYY-MM-DD. + * @type {string} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly start_date: string + + /** + * The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> + * @type {'day' | 'week' | 'month' | 'quarter'} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly interval: 'day' | 'week' | 'month' | 'quarter' + + /** + * The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). + * @type {number} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly amount: number + + /** + * The date field key which deals will be retrieved from + * @type {string} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly field_key: string + + /** + * If supplied, only deals matching the given user will be returned + * @type {number} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly user_id?: number + + /** + * If supplied, only deals matching the given pipeline will be returned + * @type {number} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly pipeline_id?: number + + /** + * If supplied, only deals matching the given filter will be returned + * @type {number} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly filter_id?: number + + /** + * Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. + * @type {0 | 1} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly exclude_deals?: 0 | 1 + + /** + * The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user\'s default currency is used. + * @type {string} + * @memberof DealsApiGetArchivedDealsTimeline + */ + readonly totals_convert_currency?: string +} + /** * Request parameters for getDeal operation in DealsApi. * @export @@ -3297,7 +3837,7 @@ export class DealsApi extends BaseAPI { * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. * @summary Add a deal * @param {DealsApiAddDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3333,7 +3873,7 @@ export class DealsApi extends BaseAPI { * Adds a product to a deal, creating a new item called a deal-product. * @summary Add a product to a deal * @param {DealsApiAddDealProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3345,7 +3885,7 @@ export class DealsApi extends BaseAPI { * Marks a deal as deleted. After 30 days, the deal will be permanently deleted. * @summary Delete a deal * @param {DealsApiDeleteDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3381,7 +3921,7 @@ export class DealsApi extends BaseAPI { * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled * @summary Delete an attached product from a deal * @param {DealsApiDeleteDealProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3390,10 +3930,10 @@ export class DealsApi extends BaseAPI { } /** - * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted. + * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/deals/{id} instead. * @summary Delete multiple deals in bulk * @param {DealsApiDeleteDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3413,11 +3953,47 @@ export class DealsApi extends BaseAPI { return DealsApiFp(this.configuration).duplicateDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); } + /** + * Returns all archived deals. + * @summary Get all archived deals + * @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof DealsApi + */ + public getArchivedDeals(requestParameters: DealsApiGetArchivedDealsRequest = {}, ) { + return DealsApiFp(this.configuration).getArchivedDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.pipeline_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a summary of all archived deals. + * @summary Get archived deals summary + * @param {DealsApiGetArchivedDealsSummaryRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof DealsApi + */ + public getArchivedDealsSummary(requestParameters: DealsApiGetArchivedDealsSummaryRequest = {}, ) { + return DealsApiFp(this.configuration).getArchivedDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.stage_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * @summary Get archived deals timeline + * @param {DealsApiGetArchivedDealsTimelineRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof DealsApi + */ + public getArchivedDealsTimeline(requestParameters: DealsApiGetArchivedDealsTimelineRequest, ) { + return DealsApiFp(this.configuration).getArchivedDealsTimeline(requestParameters.start_date, requestParameters.interval, requestParameters.amount, requestParameters.field_key, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.filter_id, requestParameters.exclude_deals, requestParameters.totals_convert_currency, ).then((request) => request(this.axios, this.basePath)); + } + /** * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal. * @summary Get details of a deal * @param {DealsApiGetDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3426,10 +4002,10 @@ export class DealsApi extends BaseAPI { } /** - * Lists activities associated with a deal. + * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead. * @summary List activities associated with a deal * @param {DealsApiGetDealActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3510,10 +4086,10 @@ export class DealsApi extends BaseAPI { } /** - * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead. * @summary List all persons associated with a deal * @param {DealsApiGetDealPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3525,7 +4101,7 @@ export class DealsApi extends BaseAPI { * Lists products attached to a deal. * @summary List products attached to a deal * @param {DealsApiGetDealProductsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3558,10 +4134,10 @@ export class DealsApi extends BaseAPI { } /** - * Returns all deals. For more information, see the tutorial for getting all deals. + * Returns all not archived deals. For more information, see the tutorial for getting all deals. * @summary Get all deals * @param {DealsApiGetDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3570,10 +4146,10 @@ export class DealsApi extends BaseAPI { } /** - * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all deals (BETA) + * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead. + * @summary Get all deals collection * @param {DealsApiGetDealsCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3582,7 +4158,7 @@ export class DealsApi extends BaseAPI { } /** - * Returns a summary of all the deals. + * Returns a summary of all not archived deals. * @summary Get deals summary * @param {DealsApiGetDealsSummaryRequest} requestParameters Request parameters. @@ -3594,7 +4170,7 @@ export class DealsApi extends BaseAPI { } /** - * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. + * Returns not archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`. * @summary Get deals timeline * @param {DealsApiGetDealsTimelineRequest} requestParameters Request parameters. @@ -3621,7 +4197,7 @@ export class DealsApi extends BaseAPI { * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID. * @summary Search deals * @param {DealsApiSearchDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3633,7 +4209,7 @@ export class DealsApi extends BaseAPI { * Updates the properties of a deal. For more information, see the tutorial for updating a deal. * @summary Update a deal * @param {DealsApiUpdateDealRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ @@ -3645,7 +4221,7 @@ export class DealsApi extends BaseAPI { * Updates the details of the product that has been attached to a deal. * @summary Update the product attached to a deal * @param {DealsApiUpdateDealProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof DealsApi */ diff --git a/src/versions/v1/api/item-search-api.ts b/src/versions/v1/api/item-search-api.ts index 74fd1595..540b188c 100644 --- a/src/versions/v1/api/item-search-api.ts +++ b/src/versions/v1/api/item-search-api.ts @@ -42,7 +42,7 @@ export const ItemSearchApiAxiosParamCreator = function (configuration?: Configur * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default. * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ searchItem: async (term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', start?: number, limit?: number, ): Promise => { @@ -120,7 +120,7 @@ export const ItemSearchApiAxiosParamCreator = function (configuration?: Configur * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to `0` or `false`, only distinct values of the searched field are returned. When set to `1` or `true`, the ID of each found item is returned. * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ searchItemByField: async (term: string, field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField', field_key: string, exact_match?: boolean, return_item_ids?: boolean, start?: number, limit?: number, ): Promise => { @@ -210,7 +210,7 @@ export const ItemSearchApiFp = function(configuration?: Configuration) { * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default. * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async searchItem(term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -227,7 +227,7 @@ export const ItemSearchApiFp = function(configuration?: Configuration) { * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to `0` or `false`, only distinct values of the searched field are returned. When set to `1` or `true`, the ID of each found item is returned. * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async searchItemByField(term: string, field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField', field_key: string, exact_match?: boolean, return_item_ids?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -248,7 +248,7 @@ export const ItemSearchApiFactory = function (configuration?: Configuration, bas * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ searchItem(requestParameters: ItemSearchApiSearchItemRequest, ): Promise { @@ -258,7 +258,7 @@ export const ItemSearchApiFactory = function (configuration?: Configuration, bas * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). * @summary Perform a search using a specific field from an item type * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ searchItemByField(requestParameters: ItemSearchApiSearchItemByFieldRequest, ): Promise { @@ -397,7 +397,7 @@ export class ItemSearchApi extends BaseAPI { * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ItemSearchApi */ @@ -409,7 +409,7 @@ export class ItemSearchApi extends BaseAPI { * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). * @summary Perform a search using a specific field from an item type * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ItemSearchApi */ diff --git a/src/versions/v1/api/leads-api.ts b/src/versions/v1/api/leads-api.ts index a5430ec9..9ca199bf 100644 --- a/src/versions/v1/api/leads-api.ts +++ b/src/versions/v1/api/leads-api.ts @@ -116,6 +116,78 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all archived leads + * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. + * @param {number} [start] For pagination, the position that represents the first result for the page + * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. + * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. + * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). + + * @throws {RequiredError} + */ + getArchivedLeads: async (limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise => { + const localVarPath = `/leads/archived`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read", "leads:full"], configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (start !== undefined) { + localVarQueryParameter['start'] = start; + } + + if (owner_id !== undefined) { + localVarQueryParameter['owner_id'] = owner_id; + } + + if (person_id !== undefined) { + localVarQueryParameter['person_id'] = person_id; + } + + if (organization_id !== undefined) { + localVarQueryParameter['organization_id'] = organization_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; @@ -208,11 +280,10 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. * @summary Get all leads * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. * @param {number} [start] For pagination, the position that represents the first result for the page - * @param {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, `All` is used. * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. @@ -221,7 +292,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration * @throws {RequiredError} */ - getLeads: async (limit?: number, start?: number, archived_status?: 'archived' | 'not_archived' | 'all', owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise => { + getLeads: async (limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise => { const localVarPath = `/leads`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -249,10 +320,6 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['start'] = start; } - if (archived_status !== undefined) { - localVarQueryParameter['archived_status'] = archived_status; - } - if (owner_id !== undefined) { localVarQueryParameter['owner_id'] = owner_id; } @@ -441,6 +508,23 @@ export const LeadsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLead(id, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all archived leads + * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. + * @param {number} [start] For pagination, the position that represents the first result for the page + * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. + * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. + * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). + + * @throws {RequiredError} + */ + async getArchivedLeads(limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArchivedLeads(limit, start, owner_id, person_id, organization_id, filter_id, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. * @summary Get one lead @@ -464,11 +548,10 @@ export const LeadsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. * @summary Get all leads * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. * @param {number} [start] For pagination, the position that represents the first result for the page - * @param {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, `All` is used. * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. @@ -477,8 +560,8 @@ export const LeadsApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async getLeads(limit?: number, start?: number, archived_status?: 'archived' | 'not_archived' | 'all', owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeads(limit, start, archived_status, owner_id, person_id, organization_id, filter_id, sort, ); + async getLeads(limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeads(limit, start, owner_id, person_id, organization_id, filter_id, sort, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -541,6 +624,16 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath deleteLead(requestParameters: LeadsApiDeleteLeadRequest, ): Promise { return localVarFp.deleteLead(requestParameters.id, ).then((request) => request(axios, basePath)); }, + /** + * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all archived leads + * @param {LeadsApiGetArchivedLeadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getArchivedLeads(requestParameters: LeadsApiGetArchivedLeadsRequest = {}, ): Promise { + return localVarFp.getArchivedLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, /** * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. * @summary Get one lead @@ -562,14 +655,14 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath return localVarFp.getLeadUsers(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. * @summary Get all leads * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters. * @throws {RequiredError} */ getLeads(requestParameters: LeadsApiGetLeadsRequest = {}, ): Promise { - return localVarFp.getLeads(requestParameters.limit, requestParameters.start, requestParameters.archived_status, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(axios, basePath)); + return localVarFp.getLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(axios, basePath)); }, /** * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. @@ -622,6 +715,62 @@ export interface LeadsApiDeleteLeadRequest { readonly id: string } +/** + * Request parameters for getArchivedLeads operation in LeadsApi. + * @export + * @interface LeadsApiGetArchivedLeadsRequest + */ +export interface LeadsApiGetArchivedLeadsRequest { + /** + * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. + * @type {number} + * @memberof LeadsApiGetArchivedLeads + */ + readonly limit?: number + + /** + * For pagination, the position that represents the first result for the page + * @type {number} + * @memberof LeadsApiGetArchivedLeads + */ + readonly start?: number + + /** + * If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. + * @type {number} + * @memberof LeadsApiGetArchivedLeads + */ + readonly owner_id?: number + + /** + * If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. + * @type {number} + * @memberof LeadsApiGetArchivedLeads + */ + readonly person_id?: number + + /** + * If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. + * @type {number} + * @memberof LeadsApiGetArchivedLeads + */ + readonly organization_id?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof LeadsApiGetArchivedLeads + */ + readonly filter_id?: number + + /** + * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). + * @type {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} + * @memberof LeadsApiGetArchivedLeads + */ + readonly sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time' +} + /** * Request parameters for getLead operation in LeadsApi. * @export @@ -670,13 +819,6 @@ export interface LeadsApiGetLeadsRequest { */ readonly start?: number - /** - * Filtering based on the archived status of a lead. If not provided, `All` is used. - * @type {'archived' | 'not_archived' | 'all'} - * @memberof LeadsApiGetLeads - */ - readonly archived_status?: 'archived' | 'not_archived' | 'all' - /** * If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. * @type {number} @@ -828,6 +970,18 @@ export class LeadsApi extends BaseAPI { return LeadsApiFp(this.configuration).deleteLead(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); } + /** + * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all archived leads + * @param {LeadsApiGetArchivedLeadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public getArchivedLeads(requestParameters: LeadsApiGetArchivedLeadsRequest = {}, ) { + return LeadsApiFp(this.configuration).getArchivedLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + /** * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. * @summary Get one lead @@ -853,7 +1007,7 @@ export class LeadsApi extends BaseAPI { } /** - * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. * @summary Get all leads * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters. @@ -861,7 +1015,7 @@ export class LeadsApi extends BaseAPI { * @memberof LeadsApi */ public getLeads(requestParameters: LeadsApiGetLeadsRequest = {}, ) { - return LeadsApiFp(this.configuration).getLeads(requestParameters.limit, requestParameters.start, requestParameters.archived_status, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + return LeadsApiFp(this.configuration).getLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/versions/v1/api/notes-api.ts b/src/versions/v1/api/notes-api.ts index f2d6d0ba..71a6c04d 100644 --- a/src/versions/v1/api/notes-api.ts +++ b/src/versions/v1/api/notes-api.ts @@ -362,6 +362,7 @@ export const NotesApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [deal_id] The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. * @param {number} [person_id] The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. * @param {number} [org_id] The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. + * @param {number} [project_id] The ID of the project which notes to fetch. If omitted, notes about all projects will be returned. * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. @@ -371,10 +372,11 @@ export const NotesApiAxiosParamCreator = function (configuration?: Configuration * @param {0 | 1} [pinned_to_deal_flag] If set, the results are filtered by note to deal pinning state * @param {0 | 1} [pinned_to_organization_flag] If set, the results are filtered by note to organization pinning state * @param {0 | 1} [pinned_to_person_flag] If set, the results are filtered by note to person pinning state + * @param {0 | 1} [pinned_to_project_flag] If set, the results are filtered by note to project pinning state * @throws {RequiredError} */ - getNotes: async (user_id?: number, lead_id?: string, deal_id?: number, person_id?: number, org_id?: number, start?: number, limit?: number, sort?: string, start_date?: string, end_date?: string, pinned_to_lead_flag?: 0 | 1, pinned_to_deal_flag?: 0 | 1, pinned_to_organization_flag?: 0 | 1, pinned_to_person_flag?: 0 | 1, ): Promise => { + getNotes: async (user_id?: number, lead_id?: string, deal_id?: number, person_id?: number, org_id?: number, project_id?: number, start?: number, limit?: number, sort?: string, start_date?: string, end_date?: string, pinned_to_lead_flag?: 0 | 1, pinned_to_deal_flag?: 0 | 1, pinned_to_organization_flag?: 0 | 1, pinned_to_person_flag?: 0 | 1, pinned_to_project_flag?: 0 | 1, ): Promise => { const localVarPath = `/notes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -414,6 +416,10 @@ export const NotesApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['org_id'] = org_id; } + if (project_id !== undefined) { + localVarQueryParameter['project_id'] = project_id; + } + if (start !== undefined) { localVarQueryParameter['start'] = start; } @@ -454,6 +460,10 @@ export const NotesApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['pinned_to_person_flag'] = pinned_to_person_flag; } + if (pinned_to_project_flag !== undefined) { + localVarQueryParameter['pinned_to_project_flag'] = pinned_to_project_flag; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -660,6 +670,7 @@ export const NotesApiFp = function(configuration?: Configuration) { * @param {number} [deal_id] The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. * @param {number} [person_id] The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. * @param {number} [org_id] The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. + * @param {number} [project_id] The ID of the project which notes to fetch. If omitted, notes about all projects will be returned. * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. @@ -669,11 +680,12 @@ export const NotesApiFp = function(configuration?: Configuration) { * @param {0 | 1} [pinned_to_deal_flag] If set, the results are filtered by note to deal pinning state * @param {0 | 1} [pinned_to_organization_flag] If set, the results are filtered by note to organization pinning state * @param {0 | 1} [pinned_to_person_flag] If set, the results are filtered by note to person pinning state + * @param {0 | 1} [pinned_to_project_flag] If set, the results are filtered by note to project pinning state * @throws {RequiredError} */ - async getNotes(user_id?: number, lead_id?: string, deal_id?: number, person_id?: number, org_id?: number, start?: number, limit?: number, sort?: string, start_date?: string, end_date?: string, pinned_to_lead_flag?: 0 | 1, pinned_to_deal_flag?: 0 | 1, pinned_to_organization_flag?: 0 | 1, pinned_to_person_flag?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getNotes(user_id, lead_id, deal_id, person_id, org_id, start, limit, sort, start_date, end_date, pinned_to_lead_flag, pinned_to_deal_flag, pinned_to_organization_flag, pinned_to_person_flag, ); + async getNotes(user_id?: number, lead_id?: string, deal_id?: number, person_id?: number, org_id?: number, project_id?: number, start?: number, limit?: number, sort?: string, start_date?: string, end_date?: string, pinned_to_lead_flag?: 0 | 1, pinned_to_deal_flag?: 0 | 1, pinned_to_organization_flag?: 0 | 1, pinned_to_person_flag?: 0 | 1, pinned_to_project_flag?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNotes(user_id, lead_id, deal_id, person_id, org_id, project_id, start, limit, sort, start_date, end_date, pinned_to_lead_flag, pinned_to_deal_flag, pinned_to_organization_flag, pinned_to_person_flag, pinned_to_project_flag, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -789,7 +801,7 @@ export const NotesApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getNotes(requestParameters: NotesApiGetNotesRequest = {}, ): Promise { - return localVarFp.getNotes(requestParameters.user_id, requestParameters.lead_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.start_date, requestParameters.end_date, requestParameters.pinned_to_lead_flag, requestParameters.pinned_to_deal_flag, requestParameters.pinned_to_organization_flag, requestParameters.pinned_to_person_flag, ).then((request) => request(axios, basePath)); + return localVarFp.getNotes(requestParameters.user_id, requestParameters.lead_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.project_id, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.start_date, requestParameters.end_date, requestParameters.pinned_to_lead_flag, requestParameters.pinned_to_deal_flag, requestParameters.pinned_to_organization_flag, requestParameters.pinned_to_person_flag, requestParameters.pinned_to_project_flag, ).then((request) => request(axios, basePath)); }, /** * Updates a comment related to a note. @@ -988,6 +1000,13 @@ export interface NotesApiGetNotesRequest { */ readonly org_id?: number + /** + * The ID of the project which notes to fetch. If omitted, notes about all projects will be returned. + * @type {number} + * @memberof NotesApiGetNotes + */ + readonly project_id?: number + /** * Pagination start * @type {number} @@ -1050,6 +1069,13 @@ export interface NotesApiGetNotesRequest { * @memberof NotesApiGetNotes */ readonly pinned_to_person_flag?: 0 | 1 + + /** + * If set, the results are filtered by note to project pinning state + * @type {0 | 1} + * @memberof NotesApiGetNotes + */ + readonly pinned_to_project_flag?: 0 | 1 } /** @@ -1201,7 +1227,7 @@ export class NotesApi extends BaseAPI { * @memberof NotesApi */ public getNotes(requestParameters: NotesApiGetNotesRequest = {}, ) { - return NotesApiFp(this.configuration).getNotes(requestParameters.user_id, requestParameters.lead_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.start_date, requestParameters.end_date, requestParameters.pinned_to_lead_flag, requestParameters.pinned_to_deal_flag, requestParameters.pinned_to_organization_flag, requestParameters.pinned_to_person_flag, ).then((request) => request(this.axios, this.basePath)); + return NotesApiFp(this.configuration).getNotes(requestParameters.user_id, requestParameters.lead_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.project_id, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.start_date, requestParameters.end_date, requestParameters.pinned_to_lead_flag, requestParameters.pinned_to_deal_flag, requestParameters.pinned_to_organization_flag, requestParameters.pinned_to_person_flag, requestParameters.pinned_to_project_flag, ).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/versions/v1/api/organizations-api.ts b/src/versions/v1/api/organizations-api.ts index 71d4c73b..94f5f589 100644 --- a/src/versions/v1/api/organizations-api.ts +++ b/src/versions/v1/api/organizations-api.ts @@ -81,7 +81,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. * @summary Add an organization * @param {AddOrganizationRequest} [AddOrganizationRequest] - + * @deprecated * @throws {RequiredError} */ addOrganization: async (AddOrganizationRequest?: AddOrganizationRequest, ): Promise => { @@ -167,7 +167,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. * @summary Delete an organization * @param {number} id The ID of the organization - + * @deprecated * @throws {RequiredError} */ deleteOrganization: async (id: number, ): Promise => { @@ -250,10 +250,10 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/organizations/{id} instead. * @summary Delete multiple organizations in bulk * @param {string} ids The comma-separated IDs that will be deleted - + * @deprecated * @throws {RequiredError} */ deleteOrganizations: async (ids: string, ): Promise => { @@ -297,7 +297,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. * @summary Get details of an organization * @param {number} id The ID of the organization - + * @deprecated * @throws {RequiredError} */ getOrganization: async (id: number, ): Promise => { @@ -335,14 +335,14 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Lists activities associated with an organization. + * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead. * @summary List activities associated with an organization * @param {number} id The ID of the organization * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities. * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result - + * @deprecated * @throws {RequiredError} */ getOrganizationActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => { @@ -447,7 +447,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Lists deals associated with an organization. + * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead. * @summary List deals associated with an organization * @param {number} id The ID of the organization * @param {number} [start] Pagination start @@ -455,7 +455,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). * @param {0 | 1} [only_primary_association] If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. - + * @deprecated * @throws {RequiredError} */ getOrganizationDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, only_primary_association?: 0 | 1, ): Promise => { @@ -661,12 +661,12 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead. * @summary List persons of an organization * @param {number} id The ID of the organization * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ getOrganizationPersons: async (id: number, start?: number, limit?: number, ): Promise => { @@ -822,7 +822,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). - + * @deprecated * @throws {RequiredError} */ getOrganizations: async (user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise => { @@ -881,15 +881,15 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all organizations (BETA) + * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead. + * @summary Get all organizations collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {number} [owner_id] If supplied, only organizations owned by the given user will be returned * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) - + * @deprecated * @throws {RequiredError} */ getOrganizationsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise => { @@ -1000,7 +1000,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ searchOrganization: async (term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, start?: number, limit?: number, ): Promise => { @@ -1061,7 +1061,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi * @summary Update an organization * @param {number} id The ID of the organization * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest] - + * @deprecated * @throws {RequiredError} */ updateOrganization: async (id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise => { @@ -1116,7 +1116,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. * @summary Add an organization * @param {AddOrganizationRequest} [AddOrganizationRequest] - + * @deprecated * @throws {RequiredError} */ async addOrganization(AddOrganizationRequest?: AddOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1139,7 +1139,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. * @summary Delete an organization * @param {number} id The ID of the organization - + * @deprecated * @throws {RequiredError} */ async deleteOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1159,10 +1159,10 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/organizations/{id} instead. * @summary Delete multiple organizations in bulk * @param {string} ids The comma-separated IDs that will be deleted - + * @deprecated * @throws {RequiredError} */ async deleteOrganizations(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1173,7 +1173,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. * @summary Get details of an organization * @param {number} id The ID of the organization - + * @deprecated * @throws {RequiredError} */ async getOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1181,14 +1181,14 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists activities associated with an organization. + * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead. * @summary List activities associated with an organization * @param {number} id The ID of the organization * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities. * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result - + * @deprecated * @throws {RequiredError} */ async getOrganizationActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1209,7 +1209,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists deals associated with an organization. + * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead. * @summary List deals associated with an organization * @param {number} id The ID of the organization * @param {number} [start] Pagination start @@ -1217,7 +1217,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). * @param {0 | 1} [only_primary_association] If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. - + * @deprecated * @throws {RequiredError} */ async getOrganizationDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, only_primary_association?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1263,12 +1263,12 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead. * @summary List persons of an organization * @param {number} id The ID of the organization * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async getOrganizationPersons(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1310,7 +1310,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). - + * @deprecated * @throws {RequiredError} */ async getOrganizations(user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1318,15 +1318,15 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all organizations (BETA) + * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead. + * @summary Get all organizations collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {number} [owner_id] If supplied, only organizations owned by the given user will be returned * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) - + * @deprecated * @throws {RequiredError} */ async getOrganizationsCollection(cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1353,7 +1353,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async searchOrganization(term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1365,7 +1365,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) { * @summary Update an organization * @param {number} id The ID of the organization * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest] - + * @deprecated * @throws {RequiredError} */ async updateOrganization(id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1386,7 +1386,7 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. * @summary Add an organization * @param {OrganizationsApiAddOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addOrganization(requestParameters: OrganizationsApiAddOrganizationRequest = {}, ): Promise { @@ -1406,7 +1406,7 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. * @summary Delete an organization * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteOrganization(requestParameters: OrganizationsApiDeleteOrganizationRequest, ): Promise { @@ -1423,10 +1423,10 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, return localVarFp.deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath)); }, /** - * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/organizations/{id} instead. * @summary Delete multiple organizations in bulk * @param {OrganizationsApiDeleteOrganizationsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteOrganizations(requestParameters: OrganizationsApiDeleteOrganizationsRequest, ): Promise { @@ -1436,17 +1436,17 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. * @summary Get details of an organization * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, ): Promise { return localVarFp.getOrganization(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Lists activities associated with an organization. + * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead. * @summary List activities associated with an organization * @param {OrganizationsApiGetOrganizationActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getOrganizationActivities(requestParameters: OrganizationsApiGetOrganizationActivitiesRequest, ): Promise { @@ -1463,10 +1463,10 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, return localVarFp.getOrganizationChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).then((request) => request(axios, basePath)); }, /** - * Lists deals associated with an organization. + * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead. * @summary List deals associated with an organization * @param {OrganizationsApiGetOrganizationDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getOrganizationDeals(requestParameters: OrganizationsApiGetOrganizationDealsRequest, ): Promise { @@ -1503,10 +1503,10 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, return localVarFp.getOrganizationMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); }, /** - * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead. * @summary List persons of an organization * @param {OrganizationsApiGetOrganizationPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getOrganizationPersons(requestParameters: OrganizationsApiGetOrganizationPersonsRequest, ): Promise { @@ -1536,17 +1536,17 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, * Returns all organizations. * @summary Get all organizations * @param {OrganizationsApiGetOrganizationsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getOrganizations(requestParameters: OrganizationsApiGetOrganizationsRequest = {}, ): Promise { return localVarFp.getOrganizations(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); }, /** - * Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all organizations (BETA) + * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead. + * @summary Get all organizations collection * @param {OrganizationsApiGetOrganizationsCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getOrganizationsCollection(requestParameters: OrganizationsApiGetOrganizationsCollectionRequest = {}, ): Promise { @@ -1566,7 +1566,7 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search organizations * @param {OrganizationsApiSearchOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ searchOrganization(requestParameters: OrganizationsApiSearchOrganizationRequest, ): Promise { @@ -1576,7 +1576,7 @@ export const OrganizationsApiFactory = function (configuration?: Configuration, * Updates the properties of an organization. * @summary Update an organization * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, ): Promise { @@ -2156,7 +2156,7 @@ export class OrganizationsApi extends BaseAPI { * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. * @summary Add an organization * @param {OrganizationsApiAddOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2180,7 +2180,7 @@ export class OrganizationsApi extends BaseAPI { * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. * @summary Delete an organization * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2201,10 +2201,10 @@ export class OrganizationsApi extends BaseAPI { } /** - * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/organizations/{id} instead. * @summary Delete multiple organizations in bulk * @param {OrganizationsApiDeleteOrganizationsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2216,7 +2216,7 @@ export class OrganizationsApi extends BaseAPI { * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. * @summary Get details of an organization * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2225,10 +2225,10 @@ export class OrganizationsApi extends BaseAPI { } /** - * Lists activities associated with an organization. + * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead. * @summary List activities associated with an organization * @param {OrganizationsApiGetOrganizationActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2249,10 +2249,10 @@ export class OrganizationsApi extends BaseAPI { } /** - * Lists deals associated with an organization. + * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead. * @summary List deals associated with an organization * @param {OrganizationsApiGetOrganizationDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2297,10 +2297,10 @@ export class OrganizationsApi extends BaseAPI { } /** - * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. + * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead. * @summary List persons of an organization * @param {OrganizationsApiGetOrganizationPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2336,7 +2336,7 @@ export class OrganizationsApi extends BaseAPI { * Returns all organizations. * @summary Get all organizations * @param {OrganizationsApiGetOrganizationsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2345,10 +2345,10 @@ export class OrganizationsApi extends BaseAPI { } /** - * Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all organizations (BETA) + * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead. + * @summary Get all organizations collection * @param {OrganizationsApiGetOrganizationsCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2372,7 +2372,7 @@ export class OrganizationsApi extends BaseAPI { * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search organizations * @param {OrganizationsApiSearchOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ @@ -2384,7 +2384,7 @@ export class OrganizationsApi extends BaseAPI { * Updates the properties of an organization. * @summary Update an organization * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof OrganizationsApi */ diff --git a/src/versions/v1/api/persons-api.ts b/src/versions/v1/api/persons-api.ts index 4308afaf..98bef363 100644 --- a/src/versions/v1/api/persons-api.ts +++ b/src/versions/v1/api/persons-api.ts @@ -81,7 +81,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. * @summary Add a person * @param {AddPersonRequest} [AddPersonRequest] - + * @deprecated * @throws {RequiredError} */ addPerson: async (AddPersonRequest?: AddPersonRequest, ): Promise => { @@ -239,7 +239,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {number} id The ID of the person - + * @deprecated * @throws {RequiredError} */ deletePerson: async (id: number, ): Promise => { @@ -363,10 +363,10 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/persons/{id} instead. * @summary Delete multiple persons in bulk * @param {string} ids The comma-separated IDs that will be deleted - + * @deprecated * @throws {RequiredError} */ deletePersons: async (ids: string, ): Promise => { @@ -410,7 +410,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. * @summary Get details of a person * @param {number} id The ID of the person - + * @deprecated * @throws {RequiredError} */ getPerson: async (id: number, ): Promise => { @@ -448,14 +448,14 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Lists activities associated with a person. + * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead. * @summary List activities associated with a person * @param {number} id The ID of the person * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result - + * @deprecated * @throws {RequiredError} */ getPersonActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => { @@ -560,14 +560,14 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Lists deals associated with a person. + * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead. * @summary List deals associated with a person * @param {number} id The ID of the person * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). - + * @deprecated * @throws {RequiredError} */ getPersonDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, ): Promise => { @@ -930,7 +930,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). - + * @deprecated * @throws {RequiredError} */ getPersons: async (user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise => { @@ -989,15 +989,15 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all persons (BETA) + * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead. + * @summary Get all persons collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {number} [owner_id] If supplied, only persons owned by the given user will be returned * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) - + * @deprecated * @throws {RequiredError} */ getPersonsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise => { @@ -1110,7 +1110,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati * @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ searchPersons: async (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', start?: number, limit?: number, ): Promise => { @@ -1234,7 +1234,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. * @summary Add a person * @param {AddPersonRequest} [AddPersonRequest] - + * @deprecated * @throws {RequiredError} */ async addPerson(AddPersonRequest?: AddPersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1273,7 +1273,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {number} id The ID of the person - + * @deprecated * @throws {RequiredError} */ async deletePerson(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1304,10 +1304,10 @@ export const PersonsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/persons/{id} instead. * @summary Delete multiple persons in bulk * @param {string} ids The comma-separated IDs that will be deleted - + * @deprecated * @throws {RequiredError} */ async deletePersons(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1318,7 +1318,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. * @summary Get details of a person * @param {number} id The ID of the person - + * @deprecated * @throws {RequiredError} */ async getPerson(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1326,14 +1326,14 @@ export const PersonsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists activities associated with a person. + * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead. * @summary List activities associated with a person * @param {number} id The ID of the person * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result - + * @deprecated * @throws {RequiredError} */ async getPersonActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1354,14 +1354,14 @@ export const PersonsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists deals associated with a person. + * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead. * @summary List deals associated with a person * @param {number} id The ID of the person * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). - + * @deprecated * @throws {RequiredError} */ async getPersonDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1454,7 +1454,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). - + * @deprecated * @throws {RequiredError} */ async getPersons(user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1462,15 +1462,15 @@ export const PersonsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all persons (BETA) + * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead. + * @summary Get all persons collection * @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 {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. * @param {number} [owner_id] If supplied, only persons owned by the given user will be returned * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) - + * @deprecated * @throws {RequiredError} */ async getPersonsCollection(cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1499,7 +1499,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { * @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -1532,7 +1532,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. * @summary Add a person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addPerson(requestParameters: PersonsApiAddPersonRequest = {}, ): Promise { @@ -1562,7 +1562,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deletePerson(requestParameters: PersonsApiDeletePersonRequest, ): Promise { @@ -1589,10 +1589,10 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa return localVarFp.deletePersonPicture(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/persons/{id} instead. * @summary Delete multiple persons in bulk * @param {PersonsApiDeletePersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deletePersons(requestParameters: PersonsApiDeletePersonsRequest, ): Promise { @@ -1602,17 +1602,17 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. * @summary Get details of a person * @param {PersonsApiGetPersonRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPerson(requestParameters: PersonsApiGetPersonRequest, ): Promise { return localVarFp.getPerson(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Lists activities associated with a person. + * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead. * @summary List activities associated with a person * @param {PersonsApiGetPersonActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPersonActivities(requestParameters: PersonsApiGetPersonActivitiesRequest, ): Promise { @@ -1629,10 +1629,10 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa return localVarFp.getPersonChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).then((request) => request(axios, basePath)); }, /** - * Lists deals associated with a person. + * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead. * @summary List deals associated with a person * @param {PersonsApiGetPersonDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPersonDeals(requestParameters: PersonsApiGetPersonDealsRequest, ): Promise { @@ -1702,17 +1702,17 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa * Returns all persons. * @summary Get all persons * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPersons(requestParameters: PersonsApiGetPersonsRequest = {}, ): Promise { return localVarFp.getPersons(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); }, /** - * Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all persons (BETA) + * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead. + * @summary Get all persons collection * @param {PersonsApiGetPersonsCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPersonsCollection(requestParameters: PersonsApiGetPersonsCollectionRequest = {}, ): Promise { @@ -1732,7 +1732,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @param {PersonsApiSearchPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ searchPersons(requestParameters: PersonsApiSearchPersonsRequest, ): Promise { @@ -2392,7 +2392,7 @@ export class PersonsApi extends BaseAPI { * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. * @summary Add a person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2428,7 +2428,7 @@ export class PersonsApi extends BaseAPI { * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2461,10 +2461,10 @@ export class PersonsApi extends BaseAPI { } /** - * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/persons/{id} instead. * @summary Delete multiple persons in bulk * @param {PersonsApiDeletePersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2476,7 +2476,7 @@ export class PersonsApi extends BaseAPI { * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. * @summary Get details of a person * @param {PersonsApiGetPersonRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2485,10 +2485,10 @@ export class PersonsApi extends BaseAPI { } /** - * Lists activities associated with a person. + * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead. * @summary List activities associated with a person * @param {PersonsApiGetPersonActivitiesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2509,10 +2509,10 @@ export class PersonsApi extends BaseAPI { } /** - * Lists deals associated with a person. + * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead. * @summary List deals associated with a person * @param {PersonsApiGetPersonDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2596,7 +2596,7 @@ export class PersonsApi extends BaseAPI { * Returns all persons. * @summary Get all persons * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2605,10 +2605,10 @@ export class PersonsApi extends BaseAPI { } /** - * Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here. - * @summary Get all persons (BETA) + * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead. + * @summary Get all persons collection * @param {PersonsApiGetPersonsCollectionRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ @@ -2632,7 +2632,7 @@ export class PersonsApi extends BaseAPI { * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @param {PersonsApiSearchPersonsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PersonsApi */ diff --git a/src/versions/v1/api/pipelines-api.ts b/src/versions/v1/api/pipelines-api.ts index cc537827..9f7ca076 100644 --- a/src/versions/v1/api/pipelines-api.ts +++ b/src/versions/v1/api/pipelines-api.ts @@ -51,7 +51,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura * Adds a new pipeline. * @summary Add a new pipeline * @param {PipelineRequest} [PipelineRequest] - + * @deprecated * @throws {RequiredError} */ addPipeline: async (PipelineRequest?: PipelineRequest, ): Promise => { @@ -92,7 +92,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura * Marks a pipeline as deleted. * @summary Delete a pipeline * @param {number} id The ID of the pipeline - + * @deprecated * @throws {RequiredError} */ deletePipeline: async (id: number, ): Promise => { @@ -134,7 +134,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura * @summary Get one pipeline * @param {number} id The ID of the pipeline * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned in `deals_summary` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. - + * @deprecated * @throws {RequiredError} */ getPipeline: async (id: number, totals_convert_currency?: string, ): Promise => { @@ -240,7 +240,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?pipeline_id={id} instead. * @summary Get deals in a pipeline * @param {number} id The ID of the pipeline * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned @@ -251,7 +251,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura * @param {number} [limit] Items shown per page * @param {0 | 1} [get_summary] Whether to include a summary of the pipeline in the `additional_data` or not * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned inside `deals_summary` inside `additional_data` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. Only works when `get_summary` parameter flag is enabled. - + * @deprecated * @throws {RequiredError} */ getPipelineDeals: async (id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, stage_id?: number, start?: number, limit?: number, get_summary?: 0 | 1, totals_convert_currency?: string, ): Promise => { @@ -387,7 +387,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura /** * Returns data about all pipelines. * @summary Get all pipelines - + * @deprecated * @throws {RequiredError} */ getPipelines: async (): Promise => { @@ -426,7 +426,7 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura * @summary Update a pipeline * @param {number} id The ID of the pipeline * @param {PipelineRequest1} [PipelineRequest1] - + * @deprecated * @throws {RequiredError} */ updatePipeline: async (id: number, PipelineRequest1?: PipelineRequest1, ): Promise => { @@ -481,7 +481,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { * Adds a new pipeline. * @summary Add a new pipeline * @param {PipelineRequest} [PipelineRequest] - + * @deprecated * @throws {RequiredError} */ async addPipeline(PipelineRequest?: PipelineRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -492,7 +492,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { * Marks a pipeline as deleted. * @summary Delete a pipeline * @param {number} id The ID of the pipeline - + * @deprecated * @throws {RequiredError} */ async deletePipeline(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -504,7 +504,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { * @summary Get one pipeline * @param {number} id The ID of the pipeline * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned in `deals_summary` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. - + * @deprecated * @throws {RequiredError} */ async getPipeline(id: number, totals_convert_currency?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -526,7 +526,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?pipeline_id={id} instead. * @summary Get deals in a pipeline * @param {number} id The ID of the pipeline * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned @@ -537,7 +537,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { * @param {number} [limit] Items shown per page * @param {0 | 1} [get_summary] Whether to include a summary of the pipeline in the `additional_data` or not * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned inside `deals_summary` inside `additional_data` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. Only works when `get_summary` parameter flag is enabled. - + * @deprecated * @throws {RequiredError} */ async getPipelineDeals(id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, stage_id?: number, start?: number, limit?: number, get_summary?: 0 | 1, totals_convert_currency?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -561,7 +561,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { /** * Returns data about all pipelines. * @summary Get all pipelines - + * @deprecated * @throws {RequiredError} */ async getPipelines(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -573,7 +573,7 @@ export const PipelinesApiFp = function(configuration?: Configuration) { * @summary Update a pipeline * @param {number} id The ID of the pipeline * @param {PipelineRequest1} [PipelineRequest1] - + * @deprecated * @throws {RequiredError} */ async updatePipeline(id: number, PipelineRequest1?: PipelineRequest1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -594,7 +594,7 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base * Adds a new pipeline. * @summary Add a new pipeline * @param {PipelinesApiAddPipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addPipeline(requestParameters: PipelinesApiAddPipelineRequest = {}, ): Promise { @@ -604,7 +604,7 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base * Marks a pipeline as deleted. * @summary Delete a pipeline * @param {PipelinesApiDeletePipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deletePipeline(requestParameters: PipelinesApiDeletePipelineRequest, ): Promise { @@ -614,7 +614,7 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base * Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages. * @summary Get one pipeline * @param {PipelinesApiGetPipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPipeline(requestParameters: PipelinesApiGetPipelineRequest, ): Promise { @@ -631,10 +631,10 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base return localVarFp.getPipelineConversionStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(axios, basePath)); }, /** - * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?pipeline_id={id} instead. * @summary Get deals in a pipeline * @param {PipelinesApiGetPipelineDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getPipelineDeals(requestParameters: PipelinesApiGetPipelineDealsRequest, ): Promise { @@ -653,7 +653,7 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base /** * Returns data about all pipelines. * @summary Get all pipelines - + * @deprecated * @throws {RequiredError} */ getPipelines(): Promise { @@ -663,7 +663,7 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base * Updates the properties of a pipeline. * @summary Update a pipeline * @param {PipelinesApiUpdatePipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updatePipeline(requestParameters: PipelinesApiUpdatePipelineRequest, ): Promise { @@ -893,7 +893,7 @@ export class PipelinesApi extends BaseAPI { * Adds a new pipeline. * @summary Add a new pipeline * @param {PipelinesApiAddPipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PipelinesApi */ @@ -905,7 +905,7 @@ export class PipelinesApi extends BaseAPI { * Marks a pipeline as deleted. * @summary Delete a pipeline * @param {PipelinesApiDeletePipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PipelinesApi */ @@ -917,7 +917,7 @@ export class PipelinesApi extends BaseAPI { * Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages. * @summary Get one pipeline * @param {PipelinesApiGetPipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PipelinesApi */ @@ -938,10 +938,10 @@ export class PipelinesApi extends BaseAPI { } /** - * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?pipeline_id={id} instead. * @summary Get deals in a pipeline * @param {PipelinesApiGetPipelineDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PipelinesApi */ @@ -964,7 +964,7 @@ export class PipelinesApi extends BaseAPI { /** * Returns data about all pipelines. * @summary Get all pipelines - + * @deprecated * @throws {RequiredError} * @memberof PipelinesApi */ @@ -976,7 +976,7 @@ export class PipelinesApi extends BaseAPI { * Updates the properties of a pipeline. * @summary Update a pipeline * @param {PipelinesApiUpdatePipelineRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof PipelinesApi */ diff --git a/src/versions/v1/api/products-api.ts b/src/versions/v1/api/products-api.ts index b35b8133..817173e4 100644 --- a/src/versions/v1/api/products-api.ts +++ b/src/versions/v1/api/products-api.ts @@ -59,7 +59,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. * @summary Add a product * @param {AddProductRequest} [AddProductRequest] - + * @deprecated * @throws {RequiredError} */ addProduct: async (AddProductRequest?: AddProductRequest, ): Promise => { @@ -145,7 +145,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * Marks a product as deleted. After 30 days, the product will be permanently deleted. * @summary Delete a product * @param {number} id The ID of the product - + * @deprecated * @throws {RequiredError} */ deleteProduct: async (id: number, ): Promise => { @@ -231,7 +231,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * Returns data about a specific product. * @summary Get one product * @param {number} id The ID of the product - + * @deprecated * @throws {RequiredError} */ getProduct: async (id: number, ): Promise => { @@ -482,7 +482,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * @param {boolean} [get_summary] If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ getProducts: async (user_id?: number, filter_id?: number, ids?: Array, first_char?: string, get_summary?: boolean, start?: number, limit?: number, ): Promise => { @@ -553,7 +553,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * @param {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ searchProducts: async (term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', start?: number, limit?: number, ): Promise => { @@ -618,7 +618,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat * @summary Update a product * @param {number} id The ID of the product * @param {UpdateProductRequest} [UpdateProductRequest] - + * @deprecated * @throws {RequiredError} */ updateProduct: async (id: number, UpdateProductRequest?: UpdateProductRequest, ): Promise => { @@ -673,7 +673,7 @@ export const ProductsApiFp = function(configuration?: Configuration) { * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. * @summary Add a product * @param {AddProductRequest} [AddProductRequest] - + * @deprecated * @throws {RequiredError} */ async addProduct(AddProductRequest?: AddProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -696,7 +696,7 @@ export const ProductsApiFp = function(configuration?: Configuration) { * Marks a product as deleted. After 30 days, the product will be permanently deleted. * @summary Delete a product * @param {number} id The ID of the product - + * @deprecated * @throws {RequiredError} */ async deleteProduct(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -719,7 +719,7 @@ export const ProductsApiFp = function(configuration?: Configuration) { * Returns data about a specific product. * @summary Get one product * @param {number} id The ID of the product - + * @deprecated * @throws {RequiredError} */ async getProduct(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -788,7 +788,7 @@ export const ProductsApiFp = function(configuration?: Configuration) { * @param {boolean} [get_summary] If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async getProducts(user_id?: number, filter_id?: number, ids?: Array, first_char?: string, get_summary?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -804,7 +804,7 @@ export const ProductsApiFp = function(configuration?: Configuration) { * @param {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async searchProducts(term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -816,7 +816,7 @@ export const ProductsApiFp = function(configuration?: Configuration) { * @summary Update a product * @param {number} id The ID of the product * @param {UpdateProductRequest} [UpdateProductRequest] - + * @deprecated * @throws {RequiredError} */ async updateProduct(id: number, UpdateProductRequest?: UpdateProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -837,7 +837,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. * @summary Add a product * @param {ProductsApiAddProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addProduct(requestParameters: ProductsApiAddProductRequest = {}, ): Promise { @@ -857,7 +857,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * Marks a product as deleted. After 30 days, the product will be permanently deleted. * @summary Delete a product * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteProduct(requestParameters: ProductsApiDeleteProductRequest, ): Promise { @@ -877,7 +877,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * Returns data about a specific product. * @summary Get one product * @param {ProductsApiGetProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getProduct(requestParameters: ProductsApiGetProductRequest, ): Promise { @@ -927,7 +927,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * Returns data about all products. * @summary Get all products * @param {ProductsApiGetProductsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ): Promise { @@ -937,7 +937,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search products * @param {ProductsApiSearchProductsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ searchProducts(requestParameters: ProductsApiSearchProductsRequest, ): Promise { @@ -947,7 +947,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP * Updates product data. * @summary Update a product * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updateProduct(requestParameters: ProductsApiUpdateProductRequest, ): Promise { @@ -1289,7 +1289,7 @@ export class ProductsApi extends BaseAPI { * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. * @summary Add a product * @param {ProductsApiAddProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ProductsApi */ @@ -1313,7 +1313,7 @@ export class ProductsApi extends BaseAPI { * Marks a product as deleted. After 30 days, the product will be permanently deleted. * @summary Delete a product * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ProductsApi */ @@ -1337,7 +1337,7 @@ export class ProductsApi extends BaseAPI { * Returns data about a specific product. * @summary Get one product * @param {ProductsApiGetProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ProductsApi */ @@ -1397,7 +1397,7 @@ export class ProductsApi extends BaseAPI { * Returns data about all products. * @summary Get all products * @param {ProductsApiGetProductsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ProductsApi */ @@ -1409,7 +1409,7 @@ export class ProductsApi extends BaseAPI { * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. * @summary Search products * @param {ProductsApiSearchProductsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ProductsApi */ @@ -1421,7 +1421,7 @@ export class ProductsApi extends BaseAPI { * Updates product data. * @summary Update a product * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof ProductsApi */ diff --git a/src/versions/v1/api/stages-api.ts b/src/versions/v1/api/stages-api.ts index 25db90b8..55779214 100644 --- a/src/versions/v1/api/stages-api.ts +++ b/src/versions/v1/api/stages-api.ts @@ -47,7 +47,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio * Adds a new stage, returns the ID upon success. * @summary Add a new stage * @param {AddStageRequest} [AddStageRequest] - + * @deprecated * @throws {RequiredError} */ addStage: async (AddStageRequest?: AddStageRequest, ): Promise => { @@ -88,7 +88,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio * Marks a stage as deleted. * @summary Delete a stage * @param {number} id The ID of the stage - + * @deprecated * @throws {RequiredError} */ deleteStage: async (id: number, ): Promise => { @@ -126,10 +126,10 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Marks multiple stages as deleted. + * Marks multiple stages as deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/stages/{id} instead. * @summary Delete multiple stages in bulk * @param {string} ids The comma-separated stage IDs to delete - + * @deprecated * @throws {RequiredError} */ deleteStages: async (ids: string, ): Promise => { @@ -174,7 +174,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio * @summary Get one stage * @param {number} id The ID of the stage * @param {0 | 1} [everyone] If `everyone=1` is provided, deals summary will return deals owned by every user - + * @deprecated * @throws {RequiredError} */ getStage: async (id: number, everyone?: 0 | 1, ): Promise => { @@ -216,7 +216,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead. * @summary Get deals in a stage * @param {number} id The ID of the stage * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned @@ -224,7 +224,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio * @param {0 | 1} [everyone] If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ getStageDeals: async (id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, start?: number, limit?: number, ): Promise => { @@ -287,7 +287,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio * @param {number} [pipeline_id] The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched. * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ getStages: async (pipeline_id?: number, start?: number, limit?: number, ): Promise => { @@ -338,7 +338,7 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio * @summary Update stage details * @param {number} id The ID of the stage * @param {UpdateStageRequest} [UpdateStageRequest] - + * @deprecated * @throws {RequiredError} */ updateStage: async (id: number, UpdateStageRequest?: UpdateStageRequest, ): Promise => { @@ -393,7 +393,7 @@ export const StagesApiFp = function(configuration?: Configuration) { * Adds a new stage, returns the ID upon success. * @summary Add a new stage * @param {AddStageRequest} [AddStageRequest] - + * @deprecated * @throws {RequiredError} */ async addStage(AddStageRequest?: AddStageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -404,7 +404,7 @@ export const StagesApiFp = function(configuration?: Configuration) { * Marks a stage as deleted. * @summary Delete a stage * @param {number} id The ID of the stage - + * @deprecated * @throws {RequiredError} */ async deleteStage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -412,10 +412,10 @@ export const StagesApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Marks multiple stages as deleted. + * Marks multiple stages as deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/stages/{id} instead. * @summary Delete multiple stages in bulk * @param {string} ids The comma-separated stage IDs to delete - + * @deprecated * @throws {RequiredError} */ async deleteStages(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -427,7 +427,7 @@ export const StagesApiFp = function(configuration?: Configuration) { * @summary Get one stage * @param {number} id The ID of the stage * @param {0 | 1} [everyone] If `everyone=1` is provided, deals summary will return deals owned by every user - + * @deprecated * @throws {RequiredError} */ async getStage(id: number, everyone?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -435,7 +435,7 @@ export const StagesApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead. * @summary Get deals in a stage * @param {number} id The ID of the stage * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned @@ -443,7 +443,7 @@ export const StagesApiFp = function(configuration?: Configuration) { * @param {0 | 1} [everyone] If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async getStageDeals(id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -456,7 +456,7 @@ export const StagesApiFp = function(configuration?: Configuration) { * @param {number} [pipeline_id] The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched. * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page - + * @deprecated * @throws {RequiredError} */ async getStages(pipeline_id?: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -468,7 +468,7 @@ export const StagesApiFp = function(configuration?: Configuration) { * @summary Update stage details * @param {number} id The ID of the stage * @param {UpdateStageRequest} [UpdateStageRequest] - + * @deprecated * @throws {RequiredError} */ async updateStage(id: number, UpdateStageRequest?: UpdateStageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { @@ -489,7 +489,7 @@ export const StagesApiFactory = function (configuration?: Configuration, basePat * Adds a new stage, returns the ID upon success. * @summary Add a new stage * @param {StagesApiAddStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ addStage(requestParameters: StagesApiAddStageRequest = {}, ): Promise { @@ -499,17 +499,17 @@ export const StagesApiFactory = function (configuration?: Configuration, basePat * Marks a stage as deleted. * @summary Delete a stage * @param {StagesApiDeleteStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteStage(requestParameters: StagesApiDeleteStageRequest, ): Promise { return localVarFp.deleteStage(requestParameters.id, ).then((request) => request(axios, basePath)); }, /** - * Marks multiple stages as deleted. + * Marks multiple stages as deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/stages/{id} instead. * @summary Delete multiple stages in bulk * @param {StagesApiDeleteStagesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ deleteStages(requestParameters: StagesApiDeleteStagesRequest, ): Promise { @@ -519,17 +519,17 @@ export const StagesApiFactory = function (configuration?: Configuration, basePat * Returns data about a specific stage. * @summary Get one stage * @param {StagesApiGetStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getStage(requestParameters: StagesApiGetStageRequest, ): Promise { return localVarFp.getStage(requestParameters.id, requestParameters.everyone, ).then((request) => request(axios, basePath)); }, /** - * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead. * @summary Get deals in a stage * @param {StagesApiGetStageDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getStageDeals(requestParameters: StagesApiGetStageDealsRequest, ): Promise { @@ -539,7 +539,7 @@ export const StagesApiFactory = function (configuration?: Configuration, basePat * Returns data about all stages. * @summary Get all stages * @param {StagesApiGetStagesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ getStages(requestParameters: StagesApiGetStagesRequest = {}, ): Promise { @@ -549,7 +549,7 @@ export const StagesApiFactory = function (configuration?: Configuration, basePat * Updates the properties of a stage. * @summary Update stage details * @param {StagesApiUpdateStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} */ updateStage(requestParameters: StagesApiUpdateStageRequest, ): Promise { @@ -730,7 +730,7 @@ export class StagesApi extends BaseAPI { * Adds a new stage, returns the ID upon success. * @summary Add a new stage * @param {StagesApiAddStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ @@ -742,7 +742,7 @@ export class StagesApi extends BaseAPI { * Marks a stage as deleted. * @summary Delete a stage * @param {StagesApiDeleteStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ @@ -751,10 +751,10 @@ export class StagesApi extends BaseAPI { } /** - * Marks multiple stages as deleted. + * Marks multiple stages as deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/stages/{id} instead. * @summary Delete multiple stages in bulk * @param {StagesApiDeleteStagesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ @@ -766,7 +766,7 @@ export class StagesApi extends BaseAPI { * Returns data about a specific stage. * @summary Get one stage * @param {StagesApiGetStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ @@ -775,10 +775,10 @@ export class StagesApi extends BaseAPI { } /** - * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned. + * Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead. * @summary Get deals in a stage * @param {StagesApiGetStageDealsRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ @@ -790,7 +790,7 @@ export class StagesApi extends BaseAPI { * Returns data about all stages. * @summary Get all stages * @param {StagesApiGetStagesRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ @@ -802,7 +802,7 @@ export class StagesApi extends BaseAPI { * Updates the properties of a stage. * @summary Update stage details * @param {StagesApiUpdateStageRequest} requestParameters Request parameters. - + * @deprecated * @throws {RequiredError} * @memberof StagesApi */ diff --git a/src/versions/v1/models/add-note-request-all-of.ts b/src/versions/v1/models/add-note-request-all-of.ts index 6dc34a7d..b307e8db 100644 --- a/src/versions/v1/models/add-note-request-all-of.ts +++ b/src/versions/v1/models/add-note-request-all-of.ts @@ -26,24 +26,29 @@ export interface AddNoteRequestAllOf { */ 'content': string; /** - * The ID of the lead the note will be attached to. This property is required unless one of (`deal_id/person_id/org_id`) is specified. + * The ID of the lead the note will be attached to. This property is required unless one of (`deal_id/person_id/org_id/project_id`) is specified. * @type {string} */ 'lead_id'?: string; /** - * The ID of the deal the note will be attached to. This property is required unless one of (`lead_id/person_id/org_id`) is specified. + * The ID of the deal the note will be attached to. This property is required unless one of (`lead_id/person_id/org_id/project_id`) is specified. * @type {number} */ 'deal_id'?: number; /** - * The ID of the person this note will be attached to. This property is required unless one of (`deal_id/lead_id/org_id`) is specified. + * The ID of the person this note will be attached to. This property is required unless one of (`deal_id/lead_id/org_id/project_id`) is specified. * @type {number} */ 'person_id'?: number; /** - * The ID of the organization this note will be attached to. This property is required unless one of (`deal_id/lead_id/person_id`) is specified. + * The ID of the organization this note will be attached to. This property is required unless one of (`deal_id/lead_id/person_id/project_id`) is specified. * @type {number} */ 'org_id'?: number; + /** + * The ID of the project the note will be attached to. This property is required unless one of (`deal_id/lead_id/person_id/org_id`) is specified. + * @type {number} + */ + 'project_id'?: number; } diff --git a/src/versions/v1/models/add-note-request-all-of1.ts b/src/versions/v1/models/add-note-request-all-of1.ts index 76eec9b5..81a9164a 100644 --- a/src/versions/v1/models/add-note-request-all-of1.ts +++ b/src/versions/v1/models/add-note-request-all-of1.ts @@ -50,6 +50,11 @@ export interface AddNoteRequestAllOf1 { * @type {number} */ 'pinned_to_person_flag'?: AddNoteRequestAllOf1PinnedToPersonFlagConst; + /** + * + * @type {number} + */ + 'pinned_to_project_flag'?: AddNoteRequestAllOf1PinnedToProjectFlagConst; } export const AddNoteRequestAllOf1PinnedToLeadFlagConst = { @@ -76,5 +81,11 @@ export interface AddNoteRequestAllOf1 { } as const; export type AddNoteRequestAllOf1PinnedToPersonFlagConst = typeof AddNoteRequestAllOf1PinnedToPersonFlagConst[keyof typeof AddNoteRequestAllOf1PinnedToPersonFlagConst]; + export const AddNoteRequestAllOf1PinnedToProjectFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 + } as const; + + export type AddNoteRequestAllOf1PinnedToProjectFlagConst = typeof AddNoteRequestAllOf1PinnedToProjectFlagConst[keyof typeof AddNoteRequestAllOf1PinnedToProjectFlagConst]; diff --git a/src/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.ts b/src/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.ts index 9d5fe547..03166c58 100644 --- a/src/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.ts +++ b/src/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.ts @@ -97,5 +97,10 @@ export interface GetDealSearchResponseAllOfDataItemsInnerItem { * @type {Array} */ 'notes'?: Array; + /** + * A flag indicating whether the deal is archived or not + * @type {boolean} + */ + 'is_archived'?: boolean; } diff --git a/src/versions/v1/models/index.ts b/src/versions/v1/models/index.ts index 7520530b..3b70ea64 100644 --- a/src/versions/v1/models/index.ts +++ b/src/versions/v1/models/index.ts @@ -619,6 +619,7 @@ export * from './note'; export * from './note-deal'; export * from './note-organization'; export * from './note-person'; +export * from './note-project'; export * from './note-request'; export * from './note-request-all-of'; export * from './note-request-all-of1'; diff --git a/src/versions/v1/models/note-project.ts b/src/versions/v1/models/note-project.ts new file mode 100644 index 00000000..832beec1 --- /dev/null +++ b/src/versions/v1/models/note-project.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + + +/** +* The project the note is attached to +* @export +* @interface NoteProject +*/ +export interface NoteProject { + /** + * The title of the project the note is attached to + * @type {string} + */ + 'title'?: string; +} + diff --git a/src/versions/v1/models/note-request-all-of1.ts b/src/versions/v1/models/note-request-all-of1.ts index eff2decd..63fe7754 100644 --- a/src/versions/v1/models/note-request-all-of1.ts +++ b/src/versions/v1/models/note-request-all-of1.ts @@ -40,5 +40,10 @@ export interface NoteRequestAllOf1 { * @type {number} */ 'org_id'?: number; + /** + * The ID of the project the note will be attached to + * @type {number} + */ + 'project_id'?: number; } diff --git a/src/versions/v1/models/note.ts b/src/versions/v1/models/note.ts index 24222183..d0ad4870 100644 --- a/src/versions/v1/models/note.ts +++ b/src/versions/v1/models/note.ts @@ -24,6 +24,9 @@ import { NoteOrganization } from './note-organization'; import { NotePerson } from './note-person'; // May contain unused imports in some cases // @ts-ignore +import { NoteProject } from './note-project'; +// May contain unused imports in some cases +// @ts-ignore import { NoteUser } from './note-user'; /** @@ -93,6 +96,16 @@ export interface Note { */ 'person_id'?: number; /** + * The ID of the project the note is attached to + * @type {number} + */ + 'project_id'?: number; + /** + * + * @type {NoteProject} + */ + 'project'?: NoteProject; + /** * If true, the results are filtered by note to deal pinning state * @type {boolean} */ @@ -108,6 +121,11 @@ export interface Note { */ 'pinned_to_person_flag'?: boolean; /** + * If true, the results are filtered by note to project pinning state + * @type {boolean} + */ + 'pinned_to_project_flag'?: boolean; + /** * The last updated date and time of the note * @type {string} */ diff --git a/src/versions/v2/api/activities-api.ts b/src/versions/v2/api/activities-api.ts index 312e7cf6..728fc2d5 100644 --- a/src/versions/v2/api/activities-api.ts +++ b/src/versions/v2/api/activities-api.ts @@ -127,9 +127,10 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. * @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @param {boolean} [done] If supplied, only activities with specified \'done\' flag value are returned * @param {string} [updated_since] If set, only activities 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 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'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. + * @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 {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. @@ -137,7 +138,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur * @throws {RequiredError} */ - getActivities: async (filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise => { + 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 => { const localVarPath = `/activities`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -185,6 +186,10 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur localVarQueryParameter['org_id'] = org_id; } + if (done !== undefined) { + localVarQueryParameter['done'] = done; + } + if (updated_since !== undefined) { localVarQueryParameter['updated_since'] = updated_since; } @@ -358,9 +363,10 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. * @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @param {boolean} [done] If supplied, only activities with specified \'done\' flag value are returned * @param {string} [updated_since] If set, only activities 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 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'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. + * @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 {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. @@ -368,8 +374,8 @@ export const ActivitiesApiFp = function(configuration?: Configuration) { * @throws {RequiredError} */ - async getActivities(filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: '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, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor, ); + 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> { + 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); }, /** @@ -434,7 +440,7 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas * @throws {RequiredError} */ getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ): Promise { - return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); + return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.done, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); }, /** * Returns the details of a specific activity. @@ -542,6 +548,13 @@ export interface ActivitiesApiGetActivitiesRequest { */ readonly org_id?: number + /** + * If supplied, only activities with specified \'done\' flag value are returned + * @type {boolean} + * @memberof ActivitiesApiGetActivities + */ + readonly done?: boolean + /** * If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @type {string} @@ -557,11 +570,11 @@ export interface ActivitiesApiGetActivitiesRequest { readonly updated_until?: string /** - * The field to sort by. Supported fields: `id`, `update_time`, `add_time`. - * @type {'id' | 'update_time' | 'add_time'} + * The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. + * @type {'id' | 'update_time' | 'add_time' | 'due_date'} * @memberof ActivitiesApiGetActivities */ - readonly sort_by?: 'id' | 'update_time' | 'add_time' + readonly sort_by?: 'id' | 'update_time' | 'add_time' | 'due_date' /** * The sorting direction. Supported values: `asc`, `desc`. @@ -674,7 +687,7 @@ export class ActivitiesApi extends BaseAPI { * @memberof ActivitiesApi */ public getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ) { - return ActivitiesApiFp(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath)); + return ActivitiesApiFp(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.done, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/versions/v2/api/beta-api.ts b/src/versions/v2/api/beta-api.ts index 8f00b98e..12e0b1d0 100644 --- a/src/versions/v2/api/beta-api.ts +++ b/src/versions/v2/api/beta-api.ts @@ -24,10 +24,20 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { AddAInstallmentResponse } from '../models'; // @ts-ignore +import { AddConvertDealToLeadResponse } from '../models'; +// @ts-ignore +import { AddConvertLeadToDealResponse } from '../models'; +// @ts-ignore import { AddInstallmentRequestBody } from '../models'; // @ts-ignore +import { ConvertLeadToDealRequest } from '../models'; +// @ts-ignore import { DeleteInstallmentResponse } from '../models'; // @ts-ignore +import { GetConvertResponse } from '../models'; +// @ts-ignore +import { GetConvertResponse1 } from '../models'; +// @ts-ignore import { GetInstallmentsResponse } from '../models'; // @ts-ignore import { UpdateInstallmentRequestBody } from '../models'; @@ -39,6 +49,92 @@ import { UpdateInstallmentResponse } from '../models'; */ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {number} id The ID of the deal to convert + + * @throws {RequiredError} + */ + convertDealToLead: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('convertDealToLead', 'id', id) + const localVarPath = `/deals/{id}/convert/lead` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {string} id The ID of the lead to convert + * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest] + + * @throws {RequiredError} + */ + convertLeadToDeal: async (id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('convertLeadToDeal', 'id', id) + const localVarPath = `/leads/{id}/convert/deal` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(ConvertLeadToDealRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Removes an installment from a deal. Only available in Advanced and above plans. * @summary Delete an installment from a deal @@ -75,6 +171,51 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {number} id The ID of a deal + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + getDealConversionStatus: async (id: number, conversion_id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getDealConversionStatus', 'id', id) + // verify required parameter 'conversion_id' is not null or undefined + assertParamExists('getDealConversionStatus', 'conversion_id', conversion_id) + const localVarPath = `/deals/{id}/convert/status/{conversion_id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read"], configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; @@ -139,6 +280,51 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {string} id The ID of a lead + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + getLeadConversionStatus: async (id: string, conversion_id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getLeadConversionStatus', 'id', id) + // verify required parameter 'conversion_id' is not null or undefined + assertParamExists('getLeadConversionStatus', 'conversion_id', conversion_id) + const localVarPath = `/leads/{id}/convert/status/{conversion_id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read"], configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; @@ -253,6 +439,29 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration) export const BetaApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BetaApiAxiosParamCreator(configuration) return { + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {number} id The ID of the deal to convert + + * @throws {RequiredError} + */ + async convertDealToLead(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.convertDealToLead(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {string} id The ID of the lead to convert + * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest] + + * @throws {RequiredError} + */ + async convertLeadToDeal(id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.convertLeadToDeal(id, ConvertLeadToDealRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Removes an installment from a deal. Only available in Advanced and above plans. * @summary Delete an installment from a deal @@ -265,6 +474,18 @@ export const BetaApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstallment(id, installment_id, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {number} id The ID of a deal + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + async getDealConversionStatus(id: number, conversion_id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDealConversionStatus(id, conversion_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Lists installments attached to a list of deals. Only available in Advanced and above plans. * @summary List installments added to a list of deals @@ -280,6 +501,18 @@ export const BetaApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {string} id The ID of a lead + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + async getLeadConversionStatus(id: string, conversion_id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadConversionStatus(id, conversion_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans. * @summary Add an installment to a deal @@ -315,6 +548,26 @@ export const BetaApiFp = function(configuration?: Configuration) { export const BetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = BetaApiFp(configuration) return { + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {BetaApiConvertDealToLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + convertDealToLead(requestParameters: BetaApiConvertDealToLeadRequest, ): Promise { + return localVarFp.convertDealToLead(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {BetaApiConvertLeadToDealRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + convertLeadToDeal(requestParameters: BetaApiConvertLeadToDealRequest, ): Promise { + return localVarFp.convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest, ).then((request) => request(axios, basePath)); + }, /** * Removes an installment from a deal. Only available in Advanced and above plans. * @summary Delete an installment from a deal @@ -325,6 +578,16 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath? deleteInstallment(requestParameters: BetaApiDeleteInstallmentRequest, ): Promise { return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(axios, basePath)); }, + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {BetaApiGetDealConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getDealConversionStatus(requestParameters: BetaApiGetDealConversionStatusRequest, ): Promise { + return localVarFp.getDealConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(axios, basePath)); + }, /** * Lists installments attached to a list of deals. Only available in Advanced and above plans. * @summary List installments added to a list of deals @@ -335,6 +598,16 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath? getInstallments(requestParameters: BetaApiGetInstallmentsRequest, ): Promise { return localVarFp.getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).then((request) => request(axios, basePath)); }, + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {BetaApiGetLeadConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getLeadConversionStatus(requestParameters: BetaApiGetLeadConversionStatusRequest, ): Promise { + return localVarFp.getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(axios, basePath)); + }, /** * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans. * @summary Add an installment to a deal @@ -358,6 +631,41 @@ export const BetaApiFactory = function (configuration?: Configuration, basePath? }; }; +/** + * Request parameters for convertDealToLead operation in BetaApi. + * @export + * @interface BetaApiConvertDealToLeadRequest + */ +export interface BetaApiConvertDealToLeadRequest { + /** + * The ID of the deal to convert + * @type {number} + * @memberof BetaApiConvertDealToLead + */ + readonly id: number +} + +/** + * Request parameters for convertLeadToDeal operation in BetaApi. + * @export + * @interface BetaApiConvertLeadToDealRequest + */ +export interface BetaApiConvertLeadToDealRequest { + /** + * The ID of the lead to convert + * @type {string} + * @memberof BetaApiConvertLeadToDeal + */ + readonly id: string + + /** + * + * @type {ConvertLeadToDealRequest} + * @memberof BetaApiConvertLeadToDeal + */ + readonly ConvertLeadToDealRequest?: ConvertLeadToDealRequest +} + /** * Request parameters for deleteInstallment operation in BetaApi. * @export @@ -379,6 +687,27 @@ export interface BetaApiDeleteInstallmentRequest { readonly installment_id: number } +/** + * Request parameters for getDealConversionStatus operation in BetaApi. + * @export + * @interface BetaApiGetDealConversionStatusRequest + */ +export interface BetaApiGetDealConversionStatusRequest { + /** + * The ID of a deal + * @type {number} + * @memberof BetaApiGetDealConversionStatus + */ + readonly id: number + + /** + * The ID of the conversion + * @type {string} + * @memberof BetaApiGetDealConversionStatus + */ + readonly conversion_id: string +} + /** * Request parameters for getInstallments operation in BetaApi. * @export @@ -421,6 +750,27 @@ export interface BetaApiGetInstallmentsRequest { readonly sort_direction?: 'asc' | 'desc' } +/** + * Request parameters for getLeadConversionStatus operation in BetaApi. + * @export + * @interface BetaApiGetLeadConversionStatusRequest + */ +export interface BetaApiGetLeadConversionStatusRequest { + /** + * The ID of a lead + * @type {string} + * @memberof BetaApiGetLeadConversionStatus + */ + readonly id: string + + /** + * The ID of the conversion + * @type {string} + * @memberof BetaApiGetLeadConversionStatus + */ + readonly conversion_id: string +} + /** * Request parameters for postInstallment operation in BetaApi. * @export @@ -477,6 +827,30 @@ export interface BetaApiUpdateInstallmentRequest { * @extends {BaseAPI} */ export class BetaApi extends BaseAPI { + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {BetaApiConvertDealToLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof BetaApi + */ + public convertDealToLead(requestParameters: BetaApiConvertDealToLeadRequest, ) { + return BetaApiFp(this.configuration).convertDealToLead(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {BetaApiConvertLeadToDealRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof BetaApi + */ + public convertLeadToDeal(requestParameters: BetaApiConvertLeadToDealRequest, ) { + return BetaApiFp(this.configuration).convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest, ).then((request) => request(this.axios, this.basePath)); + } + /** * Removes an installment from a deal. Only available in Advanced and above plans. * @summary Delete an installment from a deal @@ -489,6 +863,18 @@ export class BetaApi extends BaseAPI { return BetaApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(this.axios, this.basePath)); } + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {BetaApiGetDealConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof BetaApi + */ + public getDealConversionStatus(requestParameters: BetaApiGetDealConversionStatusRequest, ) { + return BetaApiFp(this.configuration).getDealConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(this.axios, this.basePath)); + } + /** * Lists installments attached to a list of deals. Only available in Advanced and above plans. * @summary List installments added to a list of deals @@ -501,6 +887,18 @@ export class BetaApi extends BaseAPI { return BetaApiFp(this.configuration).getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).then((request) => request(this.axios, this.basePath)); } + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {BetaApiGetLeadConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof BetaApi + */ + public getLeadConversionStatus(requestParameters: BetaApiGetLeadConversionStatusRequest, ) { + return BetaApiFp(this.configuration).getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(this.axios, this.basePath)); + } + /** * Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans. * @summary Add an installment to a deal diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts index 8241ba63..a8d32675 100644 --- a/src/versions/v2/api/deals-api.ts +++ b/src/versions/v2/api/deals-api.ts @@ -28,6 +28,8 @@ import { AddAdditionalDiscountRequestBody } from '../models'; // @ts-ignore import { AddAdditionalDiscountResponse } from '../models'; // @ts-ignore +import { AddConvertDealToLeadResponse } from '../models'; +// @ts-ignore import { AddDealFollowerRequest } from '../models'; // @ts-ignore import { AddDealProductRequest } from '../models'; @@ -52,6 +54,10 @@ import { DeleteInstallmentResponse } from '../models'; // @ts-ignore import { GetAdditionalDiscountsResponse } from '../models'; // @ts-ignore +import { GetConvertResponse } from '../models'; +// @ts-ignore +import { GetConvertResponse1 } from '../models'; +// @ts-ignore import { GetDealSearchResponse } from '../models'; // @ts-ignore import { GetDealsProductsResponse } from '../models'; @@ -214,6 +220,47 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration options: localVarRequestOptions, }; }, + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {number} id The ID of the deal to convert + + * @throws {RequiredError} + */ + convertDealToLead: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('convertDealToLead', 'id', id) + const localVarPath = `/deals/{id}/convert/lead` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Removes a discount from a deal, changing the deal value if the deal has one-time products attached. * @summary Delete a discount from a deal @@ -467,6 +514,123 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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 {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. + * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. + * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. + * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. + * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. + * @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. + * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. + * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. + * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time'} [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', 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); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration) + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (ids !== undefined) { + localVarQueryParameter['ids'] = ids; + } + + if (owner_id !== undefined) { + localVarQueryParameter['owner_id'] = owner_id; + } + + if (person_id !== undefined) { + localVarQueryParameter['person_id'] = person_id; + } + + if (org_id !== undefined) { + localVarQueryParameter['org_id'] = org_id; + } + + if (pipeline_id !== undefined) { + localVarQueryParameter['pipeline_id'] = pipeline_id; + } + + if (stage_id !== undefined) { + localVarQueryParameter['stage_id'] = stage_id; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (updated_since !== undefined) { + localVarQueryParameter['updated_since'] = updated_since; + } + + if (updated_until !== undefined) { + localVarQueryParameter['updated_until'] = updated_until; + } + + if (sort_by !== undefined) { + localVarQueryParameter['sort_by'] = sort_by; + } + + if (sort_direction !== undefined) { + localVarQueryParameter['sort_direction'] = sort_direction; + } + + if (include_fields !== undefined) { + localVarQueryParameter['include_fields'] = include_fields; + } + + if (custom_fields !== undefined) { + localVarQueryParameter['custom_fields'] = custom_fields; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; @@ -518,6 +682,51 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {number} id The ID of a deal + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + getDealConversionStatus: async (id: number, conversion_id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getDealConversionStatus', 'id', id) + // verify required parameter 'conversion_id' is not null or undefined + assertParamExists('getDealConversionStatus', 'conversion_id', conversion_id) + const localVarPath = `/deals/{id}/convert/status/{conversion_id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read"], configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; @@ -691,7 +900,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Returns data about all deals. + * 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. @@ -1347,6 +1556,17 @@ export const DealsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.addDealProduct(id, AddDealProductRequest, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {number} id The ID of the deal to convert + + * @throws {RequiredError} + */ + async convertDealToLead(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.convertDealToLead(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Removes a discount from a deal, changing the deal value if the deal has one-time products attached. * @summary Delete a discount from a deal @@ -1417,6 +1637,32 @@ export const DealsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getAdditionalDiscounts(id, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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 {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. + * @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. + * @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. + * @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. + * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. + * @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. + * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. + * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. + * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time'} [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', 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); + }, /** * Returns the details of a specific deal. * @summary Get details of a deal @@ -1430,6 +1676,18 @@ export const DealsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, include_fields, custom_fields, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {number} id The ID of a deal + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + async getDealConversionStatus(id: number, conversion_id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDealConversionStatus(id, conversion_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Lists users who are following the deal. * @summary List followers of a deal @@ -1472,7 +1730,7 @@ export const DealsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns data about all deals. + * 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. @@ -1661,6 +1919,16 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath addDealProduct(requestParameters: DealsApiAddDealProductRequest, ): Promise { return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(axios, basePath)); }, + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {DealsApiConvertDealToLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + convertDealToLead(requestParameters: DealsApiConvertDealToLeadRequest, ): Promise { + return localVarFp.convertDealToLead(requestParameters.id, ).then((request) => request(axios, basePath)); + }, /** * Removes a discount from a deal, changing the deal value if the deal has one-time products attached. * @summary Delete a discount from a deal @@ -1721,6 +1989,16 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath getAdditionalDiscounts(requestParameters: DealsApiGetAdditionalDiscountsRequest, ): Promise { return localVarFp.getAdditionalDiscounts(requestParameters.id, ).then((request) => request(axios, basePath)); }, + /** + * Returns data about all archived deals. + * @summary Get all archived deals + * @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getArchivedDeals(requestParameters: DealsApiGetArchivedDealsRequest = {}, ): Promise { + return localVarFp.getArchivedDeals(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.person_id, requestParameters.org_id, requestParameters.pipeline_id, requestParameters.stage_id, requestParameters.status, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); + }, /** * Returns the details of a specific deal. * @summary Get details of a deal @@ -1731,6 +2009,16 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath getDeal(requestParameters: DealsApiGetDealRequest, ): Promise { return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(axios, basePath)); }, + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {DealsApiGetDealConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getDealConversionStatus(requestParameters: DealsApiGetDealConversionStatusRequest, ): Promise { + return localVarFp.getDealConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(axios, basePath)); + }, /** * Lists users who are following the deal. * @summary List followers of a deal @@ -1762,7 +2050,7 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath return localVarFp.getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).then((request) => request(axios, basePath)); }, /** - * Returns data about all deals. + * Returns data about all not archived deals. * @summary Get all deals * @param {DealsApiGetDealsRequest} requestParameters Request parameters. @@ -1920,6 +2208,20 @@ export interface DealsApiAddDealProductRequest { readonly AddDealProductRequest?: AddDealProductRequest } +/** + * Request parameters for convertDealToLead operation in DealsApi. + * @export + * @interface DealsApiConvertDealToLeadRequest + */ +export interface DealsApiConvertDealToLeadRequest { + /** + * The ID of the deal to convert + * @type {number} + * @memberof DealsApiConvertDealToLead + */ + readonly id: number +} + /** * Request parameters for deleteAdditionalDiscount operation in DealsApi. * @export @@ -2032,6 +2334,125 @@ export interface DealsApiGetAdditionalDiscountsRequest { readonly id: number } +/** + * Request parameters for getArchivedDeals operation in DealsApi. + * @export + * @interface DealsApiGetArchivedDealsRequest + */ +export interface DealsApiGetArchivedDealsRequest { + /** + * If supplied, only deals matching the specified filter are returned + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly filter_id?: number + + /** + * 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} + * @memberof DealsApiGetArchivedDeals + */ + readonly ids?: string + + /** + * If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly owner_id?: number + + /** + * If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly person_id?: number + + /** + * If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly org_id?: number + + /** + * If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly pipeline_id?: number + + /** + * If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly stage_id?: number + + /** + * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. + * @type {'open' | 'won' | 'lost' | 'deleted'} + * @memberof DealsApiGetArchivedDeals + */ + readonly status?: 'open' | 'won' | 'lost' | 'deleted' + + /** + * If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. + * @type {string} + * @memberof DealsApiGetArchivedDeals + */ + readonly updated_since?: string + + /** + * If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. + * @type {string} + * @memberof DealsApiGetArchivedDeals + */ + readonly updated_until?: string + + /** + * The field to sort by. Supported fields: `id`, `update_time`, `add_time`. + * @type {'id' | 'update_time' | 'add_time'} + * @memberof DealsApiGetArchivedDeals + */ + readonly sort_by?: 'id' | 'update_time' | 'add_time' + + /** + * The sorting direction. Supported values: `asc`, `desc`. + * @type {'asc' | 'desc'} + * @memberof DealsApiGetArchivedDeals + */ + readonly sort_direction?: 'asc' | 'desc' + + /** + * 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'} + * @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' + + /** + * 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} + * @memberof DealsApiGetArchivedDeals + */ + readonly custom_fields?: string + + /** + * 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. + * @type {number} + * @memberof DealsApiGetArchivedDeals + */ + readonly limit?: number + + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof DealsApiGetArchivedDeals + */ + readonly cursor?: string +} + /** * Request parameters for getDeal operation in DealsApi. * @export @@ -2060,6 +2481,27 @@ export interface DealsApiGetDealRequest { readonly custom_fields?: string } +/** + * Request parameters for getDealConversionStatus operation in DealsApi. + * @export + * @interface DealsApiGetDealConversionStatusRequest + */ +export interface DealsApiGetDealConversionStatusRequest { + /** + * The ID of a deal + * @type {number} + * @memberof DealsApiGetDealConversionStatus + */ + readonly id: number + + /** + * The ID of the conversion + * @type {string} + * @memberof DealsApiGetDealConversionStatus + */ + readonly conversion_id: string +} + /** * Request parameters for getDealFollowers operation in DealsApi. * @export @@ -2621,6 +3063,18 @@ export class DealsApi extends BaseAPI { return DealsApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(this.axios, this.basePath)); } + /** + * Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/deals/{deal_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a deal to a lead (BETA) + * @param {DealsApiConvertDealToLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof DealsApi + */ + public convertDealToLead(requestParameters: DealsApiConvertDealToLeadRequest, ) { + return DealsApiFp(this.configuration).convertDealToLead(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + /** * Removes a discount from a deal, changing the deal value if the deal has one-time products attached. * @summary Delete a discount from a deal @@ -2693,6 +3147,18 @@ export class DealsApi extends BaseAPI { return DealsApiFp(this.configuration).getAdditionalDiscounts(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); } + /** + * Returns data about all archived deals. + * @summary Get all archived deals + * @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof DealsApi + */ + public getArchivedDeals(requestParameters: DealsApiGetArchivedDealsRequest = {}, ) { + return DealsApiFp(this.configuration).getArchivedDeals(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.person_id, requestParameters.org_id, requestParameters.pipeline_id, requestParameters.stage_id, requestParameters.status, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath)); + } + /** * Returns the details of a specific deal. * @summary Get details of a deal @@ -2705,6 +3171,18 @@ export class DealsApi extends BaseAPI { return DealsApiFp(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath)); } + /** + * Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Deal conversion status (BETA) + * @param {DealsApiGetDealConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof DealsApi + */ + public getDealConversionStatus(requestParameters: DealsApiGetDealConversionStatusRequest, ) { + return DealsApiFp(this.configuration).getDealConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(this.axios, this.basePath)); + } + /** * Lists users who are following the deal. * @summary List followers of a deal @@ -2742,7 +3220,7 @@ export class DealsApi extends BaseAPI { } /** - * Returns data about all deals. + * Returns data about all not archived deals. * @summary Get all deals * @param {DealsApiGetDealsRequest} requestParameters Request parameters. diff --git a/src/versions/v2/api/leads-api.ts b/src/versions/v2/api/leads-api.ts index 43a185de..fcbd1309 100644 --- a/src/versions/v2/api/leads-api.ts +++ b/src/versions/v2/api/leads-api.ts @@ -22,6 +22,14 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore +import { AddConvertLeadToDealResponse } from '../models'; +// @ts-ignore +import { ConvertLeadToDealRequest } from '../models'; +// @ts-ignore +import { GetConvertResponse } from '../models'; +// @ts-ignore +import { GetConvertResponse1 } from '../models'; +// @ts-ignore import { GetLeadSearchResponse } from '../models'; /** * LeadsApi - axios parameter creator @@ -29,6 +37,96 @@ import { GetLeadSearchResponse } from '../models'; */ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {string} id The ID of the lead to convert + * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest] + + * @throws {RequiredError} + */ + convertLeadToDeal: async (id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('convertLeadToDeal', 'id', id) + const localVarPath = `/leads/{id}/convert/deal` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(ConvertLeadToDealRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {string} id The ID of a lead + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + getLeadConversionStatus: async (id: string, conversion_id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getLeadConversionStatus', 'id', id) + // verify required parameter 'conversion_id' is not null or undefined + assertParamExists('getLeadConversionStatus', 'conversion_id', conversion_id) + const localVarPath = `/leads/{id}/convert/status/{conversion_id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarQueryParameter, "api_token", configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads @@ -119,6 +217,30 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration export const LeadsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = LeadsApiAxiosParamCreator(configuration) return { + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {string} id The ID of the lead to convert + * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest] + + * @throws {RequiredError} + */ + async convertLeadToDeal(id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.convertLeadToDeal(id, ConvertLeadToDealRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {string} id The ID of a lead + * @param {string} conversion_id The ID of the conversion + + * @throws {RequiredError} + */ + async getLeadConversionStatus(id: string, conversion_id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadConversionStatus(id, conversion_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads @@ -147,6 +269,26 @@ export const LeadsApiFp = function(configuration?: Configuration) { export const LeadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = LeadsApiFp(configuration) return { + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest, ): Promise { + return localVarFp.convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest, ): Promise { + return localVarFp.getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(axios, basePath)); + }, /** * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads @@ -160,6 +302,48 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath }; }; +/** + * Request parameters for convertLeadToDeal operation in LeadsApi. + * @export + * @interface LeadsApiConvertLeadToDealRequest + */ +export interface LeadsApiConvertLeadToDealRequest { + /** + * The ID of the lead to convert + * @type {string} + * @memberof LeadsApiConvertLeadToDeal + */ + readonly id: string + + /** + * + * @type {ConvertLeadToDealRequest} + * @memberof LeadsApiConvertLeadToDeal + */ + readonly ConvertLeadToDealRequest?: ConvertLeadToDealRequest +} + +/** + * Request parameters for getLeadConversionStatus operation in LeadsApi. + * @export + * @interface LeadsApiGetLeadConversionStatusRequest + */ +export interface LeadsApiGetLeadConversionStatusRequest { + /** + * The ID of a lead + * @type {string} + * @memberof LeadsApiGetLeadConversionStatus + */ + readonly id: string + + /** + * The ID of the conversion + * @type {string} + * @memberof LeadsApiGetLeadConversionStatus + */ + readonly conversion_id: string +} + /** * Request parameters for searchLeads operation in LeadsApi. * @export @@ -230,6 +414,30 @@ export interface LeadsApiSearchLeadsRequest { * @extends {BaseAPI} */ export class LeadsApi extends BaseAPI { + /** + * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint. + * @summary Convert a lead to a deal (BETA) + * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest, ) { + return LeadsApiFp(this.configuration).convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days. + * @summary Get Lead conversion status (BETA) + * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest, ) { + return LeadsApiFp(this.configuration).getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id, ).then((request) => request(this.axios, this.basePath)); + } + /** * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. * @summary Search leads diff --git a/src/versions/v2/api/products-api.ts b/src/versions/v2/api/products-api.ts index 6077e715..97c2a0ba 100644 --- a/src/versions/v2/api/products-api.ts +++ b/src/versions/v2/api/products-api.ts @@ -131,7 +131,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat // authentication oauth2 required // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration) + await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration) diff --git a/src/versions/v2/models/add-convert-deal-to-lead-response-data.ts b/src/versions/v2/models/add-convert-deal-to-lead-response-data.ts new file mode 100644 index 00000000..ab849dde --- /dev/null +++ b/src/versions/v2/models/add-convert-deal-to-lead-response-data.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + + +/** +* An object containing conversion job id that performs the conversion +* @export +* @interface AddConvertDealToLeadResponseData +*/ +export interface AddConvertDealToLeadResponseData { + /** + * The ID of the conversion job that can be used to retrieve conversion status and details. The ID has UUID format. + * @type {string} + */ + 'conversion_id': string; +} + diff --git a/src/versions/v2/models/add-convert-deal-to-lead-response.ts b/src/versions/v2/models/add-convert-deal-to-lead-response.ts new file mode 100644 index 00000000..248a201f --- /dev/null +++ b/src/versions/v2/models/add-convert-deal-to-lead-response.ts @@ -0,0 +1,42 @@ +/* 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 { AddConvertDealToLeadResponseData } from './add-convert-deal-to-lead-response-data'; + +/** +* +* @export +* @interface AddConvertDealToLeadResponse +*/ +export interface AddConvertDealToLeadResponse { + /** + * + * @type {boolean} + */ + 'success'?: boolean; + /** + * + * @type {AddConvertDealToLeadResponseData} + */ + 'data'?: AddConvertDealToLeadResponseData; + /** + * + * @type {object} + */ + 'additional_data'?: object | null; +} + diff --git a/src/versions/v2/models/add-convert-lead-to-deal-response.ts b/src/versions/v2/models/add-convert-lead-to-deal-response.ts new file mode 100644 index 00000000..9450d578 --- /dev/null +++ b/src/versions/v2/models/add-convert-lead-to-deal-response.ts @@ -0,0 +1,42 @@ +/* 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 { AddConvertDealToLeadResponseData } from './add-convert-deal-to-lead-response-data'; + +/** +* +* @export +* @interface AddConvertLeadToDealResponse +*/ +export interface AddConvertLeadToDealResponse { + /** + * + * @type {boolean} + */ + 'success'?: boolean; + /** + * + * @type {AddConvertDealToLeadResponseData} + */ + 'data'?: AddConvertDealToLeadResponseData; + /** + * + * @type {object} + */ + 'additional_data'?: object | null; +} + diff --git a/src/versions/v2/models/convert-lead-to-deal-request.ts b/src/versions/v2/models/convert-lead-to-deal-request.ts new file mode 100644 index 00000000..8951101f --- /dev/null +++ b/src/versions/v2/models/convert-lead-to-deal-request.ts @@ -0,0 +1,34 @@ +/* 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. + */ + + + +/** +* +* @export +* @interface ConvertLeadToDealRequest +*/ +export interface ConvertLeadToDealRequest { + /** + * The ID of a stage the created deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline. + * @type {number} + */ + 'stage_id'?: number; + /** + * The ID of a pipeline the created deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored. + * @type {number} + */ + 'pipeline_id'?: number; +} + diff --git a/src/versions/v2/models/deal-item.ts b/src/versions/v2/models/deal-item.ts index 25fa5736..d6f258ea 100644 --- a/src/versions/v2/models/deal-item.ts +++ b/src/versions/v2/models/deal-item.ts @@ -81,6 +81,11 @@ export interface DealItem { */ 'stage_change_time'?: string; /** + * Whether the deal is archived or not + * @type {boolean} + */ + 'is_archived'?: boolean; + /** * Whether the deal is deleted or not * @type {boolean} */ diff --git a/src/versions/v2/models/deal-item1.ts b/src/versions/v2/models/deal-item1.ts index 55b49e2c..cca18da5 100644 --- a/src/versions/v2/models/deal-item1.ts +++ b/src/versions/v2/models/deal-item1.ts @@ -81,6 +81,11 @@ export interface DealItem1 { */ 'stage_change_time'?: string; /** + * Whether the deal is archived or not + * @type {boolean} + */ + 'is_archived'?: boolean; + /** * Whether the deal is deleted or not * @type {boolean} */ diff --git a/src/versions/v2/models/get-convert-response.ts b/src/versions/v2/models/get-convert-response.ts new file mode 100644 index 00000000..cc5cbd7c --- /dev/null +++ b/src/versions/v2/models/get-convert-response.ts @@ -0,0 +1,49 @@ +/* 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. + */ + + + +/** +* +* @export +* @interface GetConvertResponse +*/ +export interface GetConvertResponse { + /** + * + * @type {boolean} + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + */ + 'error_info'?: string; + /** + * + * @type {object} + */ + 'data'?: object | null; + /** + * + * @type {object} + */ + 'additional_data'?: object | null; +} + diff --git a/src/versions/v2/models/get-convert-response1-data.ts b/src/versions/v2/models/get-convert-response1-data.ts new file mode 100644 index 00000000..1bde53a3 --- /dev/null +++ b/src/versions/v2/models/get-convert-response1-data.ts @@ -0,0 +1,55 @@ +/* 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. + */ + + + +/** +* An object containing conversion status. After successful conversion the converted entity ID is also present. +* @export +* @interface GetConvertResponse1Data +*/ +export interface GetConvertResponse1Data { + /** + * The ID of the conversion job. The ID can be used to retrieve conversion status and details. The ID has UUID format. + * @type {string} + */ + 'conversion_id': string; + /** + * Status of the conversion job. + * @type {string} + */ + 'status': GetConvertResponse1DataStatusConst; + /** + * The ID of the new lead. + * @type {string} + */ + 'lead_id'?: string; + /** + * The ID of the new deal. + * @type {number} + */ + 'deal_id'?: number; +} + + export const GetConvertResponse1DataStatusConst = { + not_started: 'not_started', + running: 'running', + completed: 'completed', + failed: 'failed', + rejected: 'rejected' + } as const; + + export type GetConvertResponse1DataStatusConst = typeof GetConvertResponse1DataStatusConst[keyof typeof GetConvertResponse1DataStatusConst]; + + diff --git a/src/versions/v2/models/get-convert-response1.ts b/src/versions/v2/models/get-convert-response1.ts new file mode 100644 index 00000000..8399b831 --- /dev/null +++ b/src/versions/v2/models/get-convert-response1.ts @@ -0,0 +1,42 @@ +/* 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 { GetConvertResponse1Data } from './get-convert-response1-data'; + +/** +* +* @export +* @interface GetConvertResponse1 +*/ +export interface GetConvertResponse1 { + /** + * + * @type {boolean} + */ + 'success': boolean; + /** + * + * @type {GetConvertResponse1Data} + */ + 'data': GetConvertResponse1Data; + /** + * + * @type {object} + */ + 'additional_data'?: object | null; +} + diff --git a/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts b/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts index d2607983..7141cbfa 100644 --- a/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts +++ b/src/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.ts @@ -97,5 +97,10 @@ export interface GetDealSearchResponseAllOfDataItemsInnerItem { * @type {Array} */ 'notes'?: Array; + /** + * A flag indicating whether the deal is archived or not + * @type {boolean} + */ + 'is_archived'?: boolean; } diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts index 1e67b440..86211a8e 100644 --- a/src/versions/v2/models/index.ts +++ b/src/versions/v2/models/index.ts @@ -7,6 +7,9 @@ export * from './add-ainstallment-response'; export * from './add-activity-request'; export * from './add-additional-discount-request-body'; export * from './add-additional-discount-response'; +export * from './add-convert-deal-to-lead-response'; +export * from './add-convert-deal-to-lead-response-data'; +export * from './add-convert-lead-to-deal-response'; export * from './add-deal-follower-request'; export * from './add-deal-product-request'; export * from './add-deal-product-response'; @@ -27,6 +30,7 @@ export * from './base-product'; export * from './base-product-all-of'; export * from './base-product-all-of1'; export * from './base-response'; +export * from './convert-lead-to-deal-request'; export * from './deal-item'; export * from './deal-item1'; export * from './deal-product-request-body'; @@ -63,6 +67,9 @@ export * from './get-activities-response-all-of'; export * from './get-activities-response-all-of-additional-data'; export * from './get-additional-discounts-response'; export * from './get-additional-discounts-response-data-inner'; +export * from './get-convert-response'; +export * from './get-convert-response1'; +export * from './get-convert-response1-data'; export * from './get-deal-search-response'; export * from './get-deal-search-response-all-of'; export * from './get-deal-search-response-all-of-data';