diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74e4c2ed..7139c699 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,25 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
## [Unreleased]
+### Changed
+- Updated `item_price` field data type in products from integer -> number for products and deal products
+### Fixed
+- Added missing `partnership` value for user access apps list
+
+### Added
+- Notice informing the users of the upcoming Subscriptions API deprecation:
+ - `GET /v1/subscriptions/{id}`
+ - `GET /v1/subscriptions/find/{dealId}`
+ - `GET /v1/subscriptions/{id}/payments`
+ - `POST /v1/subscriptions/recurring`
+ - `POST /v1/subscriptions/installment`
+ - `PUT /v1/subscriptions/recurring/{id}`
+ - `PUT /v1/subscriptions/installment/{id}`
+ - `PUT /v1/subscriptions/recurring/{id}/cancel`
+ - `DELETE /v1/subscriptions/{id}`
+
+### Changed
+- Updated Webhooks endpoints to v2, including available event_action and event_object properties
## [24.2.0] - 2025-03-12
### Added
diff --git a/docs/v2.md b/docs/v2.md
index c50383d6..19b8a1c2 100644
--- a/docs/v2.md
+++ b/docs/v2.md
@@ -9,53 +9,22 @@ 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 | addActivity | **POST** /activities | Add a new activity
-BetaApi | addDeal | **POST** /deals | Add a new deal
-BetaApi | addDealProduct | **POST** /deals/{id}/products | Add a product to a deal
-BetaApi | addOrganization | **POST** /organizations | Add a new organization
-BetaApi | addPerson | **POST** /persons | Add a new person
-BetaApi | deleteActivity | **DELETE** /activities/{id} | Delete an activity
-BetaApi | deleteAdditionalDiscount | **DELETE** /deals/{id}/discounts/{discount_id} | Delete a discount from a deal
-BetaApi | deleteDeal | **DELETE** /deals/{id} | Delete a deal
-BetaApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
BetaApi | deleteInstallment | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal
-BetaApi | deleteOrganization | **DELETE** /organizations/{id} | Delete a organization
-BetaApi | deletePerson | **DELETE** /persons/{id} | Delete a person
-BetaApi | getActivities | **GET** /activities | Get all activities
-BetaApi | getActivity | **GET** /activities/{id} | Get details of an activity
-BetaApi | getAdditionalDiscounts | **GET** /deals/{id}/discounts | List discounts added to a deal
-BetaApi | getDeal | **GET** /deals/{id} | Get details of a deal
-BetaApi | getDealProducts | **GET** /deals/{id}/products | List products attached to a deal
-BetaApi | getDeals | **GET** /deals | Get all deals
-BetaApi | getDealsProducts | **GET** /deals/products | Get deal products of several deals
BetaApi | getInstallments | **GET** /deals/installments | List installments added to a list of deals
-BetaApi | getOrganization | **GET** /organizations/{id} | Get details of a organization
-BetaApi | getOrganizations | **GET** /organizations | Get all organizations
-BetaApi | getPerson | **GET** /persons/{id} | Get details of a person
-BetaApi | getPersons | **GET** /persons | Get all persons
-BetaApi | postAdditionalDiscount | **POST** /deals/{id}/discounts | Add a discount to a deal
BetaApi | postInstallment | **POST** /deals/{id}/installments | Add an installment to a deal
-BetaApi | searchDeals | **GET** /deals/search | Search deals
-BetaApi | searchItem | **GET** /itemSearch | Perform a search from multiple item types
-BetaApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type
-BetaApi | searchLeads | **GET** /leads/search | Search leads
-BetaApi | searchOrganization | **GET** /organizations/search | Search organizations
-BetaApi | searchPersons | **GET** /persons/search | Search persons
-BetaApi | updateActivity | **PATCH** /activities/{id} | Update an activity
-BetaApi | updateAdditionalDiscount | **PATCH** /deals/{id}/discounts/{discount_id} | Update a discount added to a deal
-BetaApi | updateDeal | **PATCH** /deals/{id} | Update a deal
-BetaApi | updateDealProduct | **PATCH** /deals/{id}/products/{product_attachment_id} | Update the product attached to a deal
BetaApi | updateInstallment | **PATCH** /deals/{id}/installments/{installment_id} | Update an installment added to a deal
-BetaApi | updateOrganization | **PATCH** /organizations/{id} | Update a organization
-BetaApi | updatePerson | **PATCH** /persons/{id} | Update a person
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 | 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 | getDeal | **GET** /deals/{id} | Get details of a deal
+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
DealsApi | getDeals | **GET** /deals | Get all deals
DealsApi | getDealsProducts | **GET** /deals/products | Get deal products of several deals
@@ -71,14 +40,22 @@ ItemSearchApi | searchItem | **GET** /itemSearch | Perform a search from multipl
ItemSearchApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type
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
OrganizationsApi | deleteOrganization | **DELETE** /organizations/{id} | Delete a organization
+OrganizationsApi | deleteOrganizationFollower | **DELETE** /organizations/{id}/followers/{follower_id} | Delete a follower from an organization
OrganizationsApi | getOrganization | **GET** /organizations/{id} | Get details of a organization
+OrganizationsApi | getOrganizationFollowers | **GET** /organizations/{id}/followers | List followers of an organization
+OrganizationsApi | getOrganizationFollowersChangelog | **GET** /organizations/{id}/followers/changelog | List followers changelog of an organization
OrganizationsApi | getOrganizations | **GET** /organizations | Get all organizations
OrganizationsApi | searchOrganization | **GET** /organizations/search | Search organizations
OrganizationsApi | updateOrganization | **PATCH** /organizations/{id} | Update a organization
PersonsApi | addPerson | **POST** /persons | Add a new person
+PersonsApi | addPersonFollower | **POST** /persons/{id}/followers | Add a follower to a person
PersonsApi | deletePerson | **DELETE** /persons/{id} | Delete a person
+PersonsApi | deletePersonFollower | **DELETE** /persons/{id}/followers/{follower_id} | Delete a follower from a person
PersonsApi | getPerson | **GET** /persons/{id} | Get details of a person
+PersonsApi | getPersonFollowers | **GET** /persons/{id}/followers | List followers of a person
+PersonsApi | getPersonFollowersChangelog | **GET** /persons/{id}/followers/changelog | List followers changelog of a person
PersonsApi | getPersons | **GET** /persons | Get all persons
PersonsApi | searchPersons | **GET** /persons/search | Search persons
PersonsApi | updatePerson | **PATCH** /persons/{id} | Update a person
@@ -88,10 +65,14 @@ PipelinesApi | getPipeline | **GET** /pipelines/{id} | Get one pipeline
PipelinesApi | getPipelines | **GET** /pipelines | Get all pipelines
PipelinesApi | updatePipeline | **PATCH** /pipelines/{id} | Update a pipeline
ProductsApi | addProduct | **POST** /products | Add a product
+ProductsApi | addProductFollower | **POST** /products/{id}/followers | Add a follower to a product
ProductsApi | addProductVariation | **POST** /products/{id}/variations | Add a product variation
ProductsApi | deleteProduct | **DELETE** /products/{id} | Delete a product
+ProductsApi | deleteProductFollower | **DELETE** /products/{id}/followers/{follower_id} | Delete a follower from a product
ProductsApi | deleteProductVariation | **DELETE** /products/{id}/variations/{product_variation_id} | Delete a product variation
ProductsApi | getProduct | **GET** /products/{id} | Get one product
+ProductsApi | getProductFollowers | **GET** /products/{id}/followers | List followers of a product
+ProductsApi | getProductFollowersChangelog | **GET** /products/{id}/followers/changelog | List followers changelog of a product
ProductsApi | getProductVariations | **GET** /products/{id}/variations | Get all product variations
ProductsApi | getProducts | **GET** /products | Get all products
ProductsApi | searchProducts | **GET** /products/search | Search products
@@ -102,6 +83,7 @@ StagesApi | deleteStage | **DELETE** /stages/{id} | Delete a stage
StagesApi | getStage | **GET** /stages/{id} | Get one stage
StagesApi | getStages | **GET** /stages | Get all stages
StagesApi | updateStage | **PATCH** /stages/{id} | Update stage details
+UsersApi | getUserFollowers | **GET** /users/{id}/followers | List followers of a user
## Documentation for Authorization
diff --git a/src/versions/v1/api/deals-api.ts b/src/versions/v1/api/deals-api.ts
index bd08ae09..05e04849 100644
--- a/src/versions/v1/api/deals-api.ts
+++ b/src/versions/v1/api/deals-api.ts
@@ -322,7 +322,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
* Deletes a follower from a deal.
* @summary Delete a follower from a deal
* @param {number} id The ID of the deal
- * @param {number} follower_id The ID of the follower
+ * @param {number} follower_id The ID of the relationship between the follower and the deal
* @throws {RequiredError}
*/
@@ -1749,7 +1749,7 @@ export const DealsApiFp = function(configuration?: Configuration) {
* Deletes a follower from a deal.
* @summary Delete a follower from a deal
* @param {number} id The ID of the deal
- * @param {number} follower_id The ID of the follower
+ * @param {number} follower_id The ID of the relationship between the follower and the deal
* @throws {RequiredError}
*/
@@ -2502,7 +2502,7 @@ export interface DealsApiDeleteDealFollowerRequest {
readonly id: number
/**
- * The ID of the follower
+ * The ID of the relationship between the follower and the deal
* @type {number}
* @memberof DealsApiDeleteDealFollower
*/
diff --git a/src/versions/v1/api/organizations-api.ts b/src/versions/v1/api/organizations-api.ts
index 8dfaf916..71d4c73b 100644
--- a/src/versions/v1/api/organizations-api.ts
+++ b/src/versions/v1/api/organizations-api.ts
@@ -208,7 +208,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
* Deletes a follower from an organization. You can retrieve the `follower_id` from the List followers of an organization endpoint.
* @summary Delete a follower from an organization
* @param {number} id The ID of the organization
- * @param {number} follower_id The ID of the follower
+ * @param {number} follower_id The ID of the relationship between the follower and the organization
* @throws {RequiredError}
*/
@@ -1150,7 +1150,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
* Deletes a follower from an organization. You can retrieve the `follower_id` from the List followers of an organization endpoint.
* @summary Delete a follower from an organization
* @param {number} id The ID of the organization
- * @param {number} follower_id The ID of the follower
+ * @param {number} follower_id The ID of the relationship between the follower and the organization
* @throws {RequiredError}
*/
@@ -1648,7 +1648,7 @@ export interface OrganizationsApiDeleteOrganizationFollowerRequest {
readonly id: number
/**
- * The ID of the follower
+ * The ID of the relationship between the follower and the organization
* @type {number}
* @memberof OrganizationsApiDeleteOrganizationFollower
*/
diff --git a/src/versions/v1/api/persons-api.ts b/src/versions/v1/api/persons-api.ts
index edfb766c..4308afaf 100644
--- a/src/versions/v1/api/persons-api.ts
+++ b/src/versions/v1/api/persons-api.ts
@@ -280,7 +280,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
* Deletes a follower from a person.
* @summary Delete a follower from a person
* @param {number} id The ID of the person
- * @param {number} follower_id The ID of the follower
+ * @param {number} follower_id The ID of the relationship between the follower and the person
* @throws {RequiredError}
*/
@@ -1284,7 +1284,7 @@ export const PersonsApiFp = function(configuration?: Configuration) {
* Deletes a follower from a person.
* @summary Delete a follower from a person
* @param {number} id The ID of the person
- * @param {number} follower_id The ID of the follower
+ * @param {number} follower_id The ID of the relationship between the follower and the person
* @throws {RequiredError}
*/
@@ -1863,7 +1863,7 @@ export interface PersonsApiDeletePersonFollowerRequest {
readonly id: number
/**
- * The ID of the follower
+ * The ID of the relationship between the follower and the person
* @type {number}
* @memberof PersonsApiDeletePersonFollower
*/
diff --git a/src/versions/v1/api/subscriptions-api.ts b/src/versions/v1/api/subscriptions-api.ts
index 8d5ec4fb..b11375e7 100644
--- a/src/versions/v1/api/subscriptions-api.ts
+++ b/src/versions/v1/api/subscriptions-api.ts
@@ -45,7 +45,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* Adds a new recurring subscription.
* @summary Add a recurring subscription
* @param {AddRecurringSubscriptionRequest} [AddRecurringSubscriptionRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
addRecurringSubscription: async (AddRecurringSubscriptionRequest?: AddRecurringSubscriptionRequest, ): Promise => {
@@ -86,7 +86,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* Adds a new installment subscription.
* @summary Add an installment subscription
* @param {AddSubscriptionInstallmentRequest} [AddSubscriptionInstallmentRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
addSubscriptionInstallment: async (AddSubscriptionInstallmentRequest?: AddSubscriptionInstallmentRequest, ): Promise => {
@@ -128,7 +128,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* @summary Cancel a recurring subscription
* @param {number} id The ID of the subscription
* @param {CancelRecurringSubscriptionRequest} [CancelRecurringSubscriptionRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
cancelRecurringSubscription: async (id: number, CancelRecurringSubscriptionRequest?: CancelRecurringSubscriptionRequest, ): Promise => {
@@ -172,7 +172,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* Marks an installment or a recurring subscription as deleted.
* @summary Delete a subscription
* @param {number} id The ID of the subscription
-
+ * @deprecated
* @throws {RequiredError}
*/
deleteSubscription: async (id: number, ): Promise => {
@@ -213,7 +213,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* Returns details of an installment or a recurring subscription by the deal ID.
* @summary Find subscription by deal
* @param {number} dealId The ID of the deal
-
+ * @deprecated
* @throws {RequiredError}
*/
findSubscriptionByDeal: async (dealId: number, ): Promise => {
@@ -254,7 +254,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* Returns details of an installment or a recurring subscription.
* @summary Get details of a subscription
* @param {number} id The ID of the subscription
-
+ * @deprecated
* @throws {RequiredError}
*/
getSubscription: async (id: number, ): Promise => {
@@ -295,7 +295,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* Returns all payments of an installment or recurring subscription.
* @summary Get all payments of a subscription
* @param {number} id The ID of the subscription
-
+ * @deprecated
* @throws {RequiredError}
*/
getSubscriptionPayments: async (id: number, ): Promise => {
@@ -337,7 +337,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* @summary Update a recurring subscription
* @param {number} id The ID of the subscription
* @param {UpdateRecurringSubscriptionRequest} [UpdateRecurringSubscriptionRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
updateRecurringSubscription: async (id: number, UpdateRecurringSubscriptionRequest?: UpdateRecurringSubscriptionRequest, ): Promise => {
@@ -382,7 +382,7 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
* @summary Update an installment subscription
* @param {number} id The ID of the subscription
* @param {UpdateSubscriptionInstallmentRequest} [UpdateSubscriptionInstallmentRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
updateSubscriptionInstallment: async (id: number, UpdateSubscriptionInstallmentRequest?: UpdateSubscriptionInstallmentRequest, ): Promise => {
@@ -437,7 +437,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* Adds a new recurring subscription.
* @summary Add a recurring subscription
* @param {AddRecurringSubscriptionRequest} [AddRecurringSubscriptionRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
async addRecurringSubscription(AddRecurringSubscriptionRequest?: AddRecurringSubscriptionRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -448,7 +448,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* Adds a new installment subscription.
* @summary Add an installment subscription
* @param {AddSubscriptionInstallmentRequest} [AddSubscriptionInstallmentRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
async addSubscriptionInstallment(AddSubscriptionInstallmentRequest?: AddSubscriptionInstallmentRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -460,7 +460,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* @summary Cancel a recurring subscription
* @param {number} id The ID of the subscription
* @param {CancelRecurringSubscriptionRequest} [CancelRecurringSubscriptionRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
async cancelRecurringSubscription(id: number, CancelRecurringSubscriptionRequest?: CancelRecurringSubscriptionRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -471,7 +471,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* Marks an installment or a recurring subscription as deleted.
* @summary Delete a subscription
* @param {number} id The ID of the subscription
-
+ * @deprecated
* @throws {RequiredError}
*/
async deleteSubscription(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -482,7 +482,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* Returns details of an installment or a recurring subscription by the deal ID.
* @summary Find subscription by deal
* @param {number} dealId The ID of the deal
-
+ * @deprecated
* @throws {RequiredError}
*/
async findSubscriptionByDeal(dealId: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -493,7 +493,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* Returns details of an installment or a recurring subscription.
* @summary Get details of a subscription
* @param {number} id The ID of the subscription
-
+ * @deprecated
* @throws {RequiredError}
*/
async getSubscription(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -504,7 +504,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* Returns all payments of an installment or recurring subscription.
* @summary Get all payments of a subscription
* @param {number} id The ID of the subscription
-
+ * @deprecated
* @throws {RequiredError}
*/
async getSubscriptionPayments(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -516,7 +516,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* @summary Update a recurring subscription
* @param {number} id The ID of the subscription
* @param {UpdateRecurringSubscriptionRequest} [UpdateRecurringSubscriptionRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
async updateRecurringSubscription(id: number, UpdateRecurringSubscriptionRequest?: UpdateRecurringSubscriptionRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -528,7 +528,7 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
* @summary Update an installment subscription
* @param {number} id The ID of the subscription
* @param {UpdateSubscriptionInstallmentRequest} [UpdateSubscriptionInstallmentRequest]
-
+ * @deprecated
* @throws {RequiredError}
*/
async updateSubscriptionInstallment(id: number, UpdateSubscriptionInstallmentRequest?: UpdateSubscriptionInstallmentRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
@@ -549,7 +549,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Adds a new recurring subscription.
* @summary Add a recurring subscription
* @param {SubscriptionsApiAddRecurringSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
addRecurringSubscription(requestParameters: SubscriptionsApiAddRecurringSubscriptionRequest = {}, ): Promise {
@@ -559,7 +559,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Adds a new installment subscription.
* @summary Add an installment subscription
* @param {SubscriptionsApiAddSubscriptionInstallmentRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
addSubscriptionInstallment(requestParameters: SubscriptionsApiAddSubscriptionInstallmentRequest = {}, ): Promise {
@@ -569,7 +569,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Cancels a recurring subscription.
* @summary Cancel a recurring subscription
* @param {SubscriptionsApiCancelRecurringSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
cancelRecurringSubscription(requestParameters: SubscriptionsApiCancelRecurringSubscriptionRequest, ): Promise {
@@ -579,7 +579,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Marks an installment or a recurring subscription as deleted.
* @summary Delete a subscription
* @param {SubscriptionsApiDeleteSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
deleteSubscription(requestParameters: SubscriptionsApiDeleteSubscriptionRequest, ): Promise {
@@ -589,7 +589,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Returns details of an installment or a recurring subscription by the deal ID.
* @summary Find subscription by deal
* @param {SubscriptionsApiFindSubscriptionByDealRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
findSubscriptionByDeal(requestParameters: SubscriptionsApiFindSubscriptionByDealRequest, ): Promise {
@@ -599,7 +599,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Returns details of an installment or a recurring subscription.
* @summary Get details of a subscription
* @param {SubscriptionsApiGetSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
getSubscription(requestParameters: SubscriptionsApiGetSubscriptionRequest, ): Promise {
@@ -609,7 +609,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Returns all payments of an installment or recurring subscription.
* @summary Get all payments of a subscription
* @param {SubscriptionsApiGetSubscriptionPaymentsRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
getSubscriptionPayments(requestParameters: SubscriptionsApiGetSubscriptionPaymentsRequest, ): Promise {
@@ -619,7 +619,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Updates a recurring subscription.
* @summary Update a recurring subscription
* @param {SubscriptionsApiUpdateRecurringSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
updateRecurringSubscription(requestParameters: SubscriptionsApiUpdateRecurringSubscriptionRequest, ): Promise {
@@ -629,7 +629,7 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
* Updates an installment subscription.
* @summary Update an installment subscription
* @param {SubscriptionsApiUpdateSubscriptionInstallmentRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
*/
updateSubscriptionInstallment(requestParameters: SubscriptionsApiUpdateSubscriptionInstallmentRequest, ): Promise {
@@ -796,7 +796,7 @@ export class SubscriptionsApi extends BaseAPI {
* Adds a new recurring subscription.
* @summary Add a recurring subscription
* @param {SubscriptionsApiAddRecurringSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -808,7 +808,7 @@ export class SubscriptionsApi extends BaseAPI {
* Adds a new installment subscription.
* @summary Add an installment subscription
* @param {SubscriptionsApiAddSubscriptionInstallmentRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -820,7 +820,7 @@ export class SubscriptionsApi extends BaseAPI {
* Cancels a recurring subscription.
* @summary Cancel a recurring subscription
* @param {SubscriptionsApiCancelRecurringSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -832,7 +832,7 @@ export class SubscriptionsApi extends BaseAPI {
* Marks an installment or a recurring subscription as deleted.
* @summary Delete a subscription
* @param {SubscriptionsApiDeleteSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -844,7 +844,7 @@ export class SubscriptionsApi extends BaseAPI {
* Returns details of an installment or a recurring subscription by the deal ID.
* @summary Find subscription by deal
* @param {SubscriptionsApiFindSubscriptionByDealRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -856,7 +856,7 @@ export class SubscriptionsApi extends BaseAPI {
* Returns details of an installment or a recurring subscription.
* @summary Get details of a subscription
* @param {SubscriptionsApiGetSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -868,7 +868,7 @@ export class SubscriptionsApi extends BaseAPI {
* Returns all payments of an installment or recurring subscription.
* @summary Get all payments of a subscription
* @param {SubscriptionsApiGetSubscriptionPaymentsRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -880,7 +880,7 @@ export class SubscriptionsApi extends BaseAPI {
* Updates a recurring subscription.
* @summary Update a recurring subscription
* @param {SubscriptionsApiUpdateRecurringSubscriptionRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
@@ -892,7 +892,7 @@ export class SubscriptionsApi extends BaseAPI {
* Updates an installment subscription.
* @summary Update an installment subscription
* @param {SubscriptionsApiUpdateSubscriptionInstallmentRequest} requestParameters Request parameters.
-
+ * @deprecated
* @throws {RequiredError}
* @memberof SubscriptionsApi
*/
diff --git a/src/versions/v1/api/webhooks-api.ts b/src/versions/v1/api/webhooks-api.ts
index d8a98c65..edea8e28 100644
--- a/src/versions/v1/api/webhooks-api.ts
+++ b/src/versions/v1/api/webhooks-api.ts
@@ -42,7 +42,7 @@ import { WebhooksBadRequestResponse } from '../models';
export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
- * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
+ * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `create.deal` for any newly added deals, `delete.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
* @summary Create a new Webhook
* @param {AddWebhookRequest} [AddWebhookRequest]
@@ -172,7 +172,7 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration)
return {
/**
- * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
+ * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `create.deal` for any newly added deals, `delete.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
* @summary Create a new Webhook
* @param {AddWebhookRequest} [AddWebhookRequest]
@@ -214,7 +214,7 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
const localVarFp = WebhooksApiFp(configuration)
return {
/**
- * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
+ * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `create.deal` for any newly added deals, `delete.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
* @summary Create a new Webhook
* @param {WebhooksApiAddWebhookRequest} requestParameters Request parameters.
@@ -281,7 +281,7 @@ export interface WebhooksApiDeleteWebhookRequest {
*/
export class WebhooksApi extends BaseAPI {
/**
- * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
+ * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `create.deal` for any newly added deals, `delete.persons` for any deleted persons, etc. See the guide for Webhooks for more details.
* @summary Create a new Webhook
* @param {WebhooksApiAddWebhookRequest} requestParameters Request parameters.
diff --git a/src/versions/v1/models/add-webhook-request.ts b/src/versions/v1/models/add-webhook-request.ts
index 05629e05..9b270aed 100644
--- a/src/versions/v1/models/add-webhook-request.ts
+++ b/src/versions/v1/models/add-webhook-request.ts
@@ -51,25 +51,24 @@ export interface AddWebhookRequest {
*/
'http_auth_password'?: string;
/**
- * The webhook\'s version. NB! Webhooks v2 will become the default from March 17th, 2025. See this Changelog post for more details.
+ * The webhook\'s version. NB! Webhooks v2 is the default from March 17th, 2025. See this Changelog post for more details.
* @type {string}
*/
'version'?: AddWebhookRequestVersionConst;
}
export const AddWebhookRequestEventActionConst = {
- added: 'added',
- updated: 'updated',
- merged: 'merged',
- deleted: 'deleted',
+ create: 'create',
+ change: 'change',
+ delete: 'delete',
Star: '*'
} as const;
export type AddWebhookRequestEventActionConst = typeof AddWebhookRequestEventActionConst[keyof typeof AddWebhookRequestEventActionConst];
export const AddWebhookRequestEventObjectConst = {
activity: 'activity',
- activityType: 'activityType',
deal: 'deal',
+ lead: 'lead',
note: 'note',
organization: 'organization',
person: 'person',
diff --git a/src/versions/v1/models/user-access.ts b/src/versions/v1/models/user-access.ts
index afd9b3d6..348615ea 100644
--- a/src/versions/v1/models/user-access.ts
+++ b/src/versions/v1/models/user-access.ts
@@ -38,11 +38,12 @@ export interface UserAccess {
}
export const UserAccessAppConst = {
+ global: 'global',
sales: 'sales',
- projects: 'projects',
campaigns: 'campaigns',
- global: 'global',
- account_settings: 'account_settings'
+ projects: 'projects',
+ account_settings: 'account_settings',
+ partnership: 'partnership'
} as const;
export type UserAccessAppConst = typeof UserAccessAppConst[keyof typeof UserAccessAppConst];
diff --git a/src/versions/v1/models/user-access1.ts b/src/versions/v1/models/user-access1.ts
index feca2904..63724c4f 100644
--- a/src/versions/v1/models/user-access1.ts
+++ b/src/versions/v1/models/user-access1.ts
@@ -38,11 +38,12 @@ export interface UserAccess1 {
}
export const UserAccess1AppConst = {
+ global: 'global',
sales: 'sales',
- projects: 'projects',
campaigns: 'campaigns',
- global: 'global',
- account_settings: 'account_settings'
+ projects: 'projects',
+ account_settings: 'account_settings',
+ partnership: 'partnership'
} as const;
export type UserAccess1AppConst = typeof UserAccess1AppConst[keyof typeof UserAccess1AppConst];
diff --git a/src/versions/v2/api.ts b/src/versions/v2/api.ts
index 09a949c4..9d558e6c 100644
--- a/src/versions/v2/api.ts
+++ b/src/versions/v2/api.ts
@@ -24,4 +24,5 @@ export * from './api/persons-api';
export * from './api/pipelines-api';
export * from './api/products-api';
export * from './api/stages-api';
+export * from './api/users-api';
diff --git a/src/versions/v2/api/beta-api.ts b/src/versions/v2/api/beta-api.ts
index fcacc30a..8f00b98e 100644
--- a/src/versions/v2/api/beta-api.ts
+++ b/src/versions/v2/api/beta-api.ts
@@ -24,87 +24,15 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
// @ts-ignore
import { AddAInstallmentResponse } from '../models';
// @ts-ignore
-import { AddActivityRequest } from '../models';
-// @ts-ignore
-import { AddAdditionalDiscountRequestBody } from '../models';
-// @ts-ignore
-import { AddAdditionalDiscountResponse } from '../models';
-// @ts-ignore
-import { AddDealProductRequest } from '../models';
-// @ts-ignore
-import { AddDealProductResponse } from '../models';
-// @ts-ignore
-import { AddDealRequest } from '../models';
-// @ts-ignore
import { AddInstallmentRequestBody } from '../models';
// @ts-ignore
-import { AddOrganizationRequest } from '../models';
-// @ts-ignore
-import { AddPersonRequest } from '../models';
-// @ts-ignore
-import { DeleteActivityResponse } from '../models';
-// @ts-ignore
-import { DeleteAdditionalDiscountResponse } from '../models';
-// @ts-ignore
-import { DeleteDealProductResponse } from '../models';
-// @ts-ignore
-import { DeleteDealResponse } from '../models';
-// @ts-ignore
import { DeleteInstallmentResponse } from '../models';
// @ts-ignore
-import { DeleteOrganizationResponse } from '../models';
-// @ts-ignore
-import { DeletePersonResponse } from '../models';
-// @ts-ignore
-import { GetActivitiesResponse } from '../models';
-// @ts-ignore
-import { GetAdditionalDiscountsResponse } from '../models';
-// @ts-ignore
-import { GetDealSearchResponse } from '../models';
-// @ts-ignore
-import { GetDealsProductsResponse } from '../models';
-// @ts-ignore
-import { GetDealsResponse } from '../models';
-// @ts-ignore
import { GetInstallmentsResponse } from '../models';
// @ts-ignore
-import { GetItemSearchFieldResponse } from '../models';
-// @ts-ignore
-import { GetItemSearchResponse } from '../models';
-// @ts-ignore
-import { GetLeadSearchResponse } from '../models';
-// @ts-ignore
-import { GetOrganizationSearchResponse } from '../models';
-// @ts-ignore
-import { GetOrganizationsResponse } from '../models';
-// @ts-ignore
-import { GetPersonSearchResponse } from '../models';
-// @ts-ignore
-import { GetPersonsResponse } from '../models';
-// @ts-ignore
-import { UpdateAdditionalDiscountRequestBody } from '../models';
-// @ts-ignore
-import { UpdateAdditionalDiscountResponse } from '../models';
-// @ts-ignore
-import { UpdateDealProductRequest } from '../models';
-// @ts-ignore
-import { UpdateDealRequest } from '../models';
-// @ts-ignore
import { UpdateInstallmentRequestBody } from '../models';
// @ts-ignore
import { UpdateInstallmentResponse } from '../models';
-// @ts-ignore
-import { UpdateOrganizationRequest } from '../models';
-// @ts-ignore
-import { UpdatePersonRequest } from '../models';
-// @ts-ignore
-import { UpsertActivityResponse } from '../models';
-// @ts-ignore
-import { UpsertDealResponse } from '../models';
-// @ts-ignore
-import { UpsertOrganizationResponse } from '../models';
-// @ts-ignore
-import { UpsertPersonResponse } from '../models';
/**
* BetaApi - axios parameter creator
* @export
@@ -112,14 +40,21 @@ import { UpsertPersonResponse } from '../models';
export const BetaApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
- * Adds a new activity.
- * @summary Add a new activity
- * @param {AddActivityRequest} [AddActivityRequest]
+ * Removes an installment from a deal. Only available in Advanced and above plans.
+ * @summary Delete an installment from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} installment_id The ID of the installment
* @throws {RequiredError}
*/
- addActivity: async (AddActivityRequest?: AddActivityRequest, ): Promise => {
- const localVarPath = `/activities`;
+ deleteInstallment: async (id: number, installment_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteInstallment', 'id', id)
+ // verify required parameter 'installment_id' is not null or undefined
+ assertParamExists('deleteInstallment', 'installment_id', installment_id)
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
@@ -127,7 +62,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -136,16 +71,13 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddActivityRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -153,14 +85,20 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * Adds a new deal.
- * @summary Add a new deal
- * @param {AddDealRequest} [AddDealRequest]
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * @summary List installments added to a list of deals
+ * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
* @throws {RequiredError}
*/
- addDeal: async (AddDealRequest?: AddDealRequest, ): Promise => {
- const localVarPath = `/deals`;
+ getInstallments: async (deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'billing_date' | 'deal_id', sort_direction?: 'asc' | 'desc', ): Promise => {
+ // verify required parameter 'deal_ids' is not null or undefined
+ assertParamExists('getInstallments', 'deal_ids', deal_ids)
+ const localVarPath = `/deals/installments`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
@@ -168,7 +106,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -177,16 +115,33 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+ if (deal_ids) {
+ localVarQueryParameter['deal_ids'] = deal_ids;
+ }
+
+ if (cursor !== undefined) {
+ localVarQueryParameter['cursor'] = cursor;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (sort_by !== undefined) {
+ localVarQueryParameter['sort_by'] = sort_by;
+ }
+
+ if (sort_direction !== undefined) {
+ localVarQueryParameter['sort_direction'] = sort_direction;
+ }
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddDealRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -194,17 +149,17 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * Adds a product to a deal, creating a new item called a deal-product.
- * @summary Add a product to a deal
+ * 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
* @param {number} id The ID of the deal
- * @param {AddDealProductRequest} [AddDealProductRequest]
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
* @throws {RequiredError}
*/
- addDealProduct: async (id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise => {
+ postInstallment: async (id: number, AddInstallmentRequestBody?: AddInstallmentRequestBody, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('addDealProduct', 'id', id)
- const localVarPath = `/deals/{id}/products`
+ assertParamExists('postInstallment', 'id', id)
+ const localVarPath = `/deals/{id}/installments`
.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);
@@ -222,7 +177,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
@@ -231,7 +186,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddDealProductRequest, localVarRequestOptions, configuration)
+ localVarRequestOptions.data = serializeDataIfNeeded(AddInstallmentRequestBody, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -239,14 +194,22 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
};
},
/**
- * Adds a new organization.
- * @summary Add a new organization
- * @param {AddOrganizationRequest} [AddOrganizationRequest]
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * @summary Update an installment added to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} installment_id The ID of the installment
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
* @throws {RequiredError}
*/
- addOrganization: async (AddOrganizationRequest?: AddOrganizationRequest, ): Promise => {
- const localVarPath = `/organizations`;
+ updateInstallment: async (id: number, installment_id: number, UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateInstallment', 'id', id)
+ // verify required parameter 'installment_id' is not null or undefined
+ assertParamExists('updateInstallment', 'installment_id', installment_id)
+ const localVarPath = `/deals/{id}/installments/{installment_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
@@ -254,7 +217,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions };
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -263,7 +226,7 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
@@ -272,4655 +235,258 @@ export const BetaApiAxiosParamCreator = function (configuration?: Configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddOrganizationRequest, localVarRequestOptions, configuration)
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateInstallmentRequestBody, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
+ }
+};
+
+
+/**
+ * BetaApi - functional programming interface
+ * @export
+ */
+export const BetaApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = BetaApiAxiosParamCreator(configuration)
+ return {
/**
- * Adds a new person.
- * @summary Add a new person
- * @param {AddPersonRequest} [AddPersonRequest]
+ * Removes an installment from a deal. Only available in Advanced and above plans.
+ * @summary Delete an installment from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} installment_id The ID of the installment
* @throws {RequiredError}
*/
- addPerson: async (AddPersonRequest?: AddPersonRequest, ): Promise => {
- const localVarPath = `/persons`;
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
- 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", ["contacts:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddPersonRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ async deleteInstallment(id: number, installment_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstallment(id, installment_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * @summary List installments added to a list of deals
+ * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
+ * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
* @throws {RequiredError}
*/
- deleteActivity: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteActivity', 'id', id)
- const localVarPath = `/activities/{id}`
- .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: 'DELETE', ...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", ["activities:full"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ async getInstallments(deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'billing_date' | 'deal_id', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction, );
+ 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
+ * 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
* @param {number} id The ID of the deal
- * @param {number} discount_id The ID of the discount
+ * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
* @throws {RequiredError}
*/
- deleteAdditionalDiscount: async (id: number, discount_id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteAdditionalDiscount', 'id', id)
- // verify required parameter 'discount_id' is not null or undefined
- assertParamExists('deleteAdditionalDiscount', 'discount_id', discount_id)
- const localVarPath = `/deals/{id}/discounts/{discount_id}`
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
- .replace(`{${"discount_id"}}`, encodeURIComponent(String(discount_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: 'DELETE', ...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)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ async postInstallment(id: number, AddInstallmentRequestBody?: AddInstallmentRequestBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * @summary Update an installment added to a deal
* @param {number} id The ID of the deal
+ * @param {number} installment_id The ID of the installment
+ * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
* @throws {RequiredError}
*/
- deleteDeal: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteDeal', 'id', id)
- const localVarPath = `/deals/{id}`
- .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;
- }
+ async updateInstallment(id: number, installment_id: number, UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
- const localVarRequestOptions = { method: 'DELETE', ...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"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Deletes a product attachment from a deal, using the `product_attachment_id`.
- * @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
-
- * @throws {RequiredError}
- */
- deleteDealProduct: async (id: number, product_attachment_id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteDealProduct', 'id', id)
- // verify required parameter 'product_attachment_id' is not null or undefined
- assertParamExists('deleteDealProduct', 'product_attachment_id', product_attachment_id)
- const localVarPath = `/deals/{id}/products/{product_attachment_id}`
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
- .replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_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: 'DELETE', ...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", "products:full"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
+/**
+ * BetaApi - factory interface
+ * @export
+ */
+export const BetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = BetaApiFp(configuration)
+ return {
/**
* Removes an installment from a deal. Only available in Advanced and above plans.
* @summary Delete an installment from a deal
- * @param {number} id The ID of the deal
- * @param {number} installment_id The ID of the installment
+ * @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
- deleteInstallment: async (id: number, installment_id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteInstallment', 'id', id)
- // verify required parameter 'installment_id' is not null or undefined
- assertParamExists('deleteInstallment', 'installment_id', installment_id)
- const localVarPath = `/deals/{id}/installments/{installment_id}`
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
- .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_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: 'DELETE', ...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)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ deleteInstallment(requestParameters: BetaApiDeleteInstallmentRequest, ): Promise {
+ return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(axios, basePath));
},
/**
- * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete a organization
- * @param {number} id The ID of the organization
+ * Lists installments attached to a list of deals. Only available in Advanced and above plans.
+ * @summary List installments added to a list of deals
+ * @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
- deleteOrganization: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteOrganization', 'id', id)
- const localVarPath = `/organizations/{id}`
- .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: 'DELETE', ...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", ["contacts:full"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ 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));
},
/**
- * 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
+ * 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
+ * @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
- deletePerson: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deletePerson', 'id', id)
- const localVarPath = `/persons/{id}`
- .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: 'DELETE', ...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", ["contacts:full"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ postInstallment(requestParameters: BetaApiPostInstallmentRequest, ): Promise {
+ return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody, ).then((request) => request(axios, basePath));
},
/**
- * Returns data about all activities.
- * @summary Get all activities
- * @param {number} [filter_id] If supplied, only activities matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
- * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
- * @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 {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 {'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.
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * Edits an installment added to a deal. Only available in Advanced and above plans.
+ * @summary Update an installment added to a deal
+ * @param {BetaApiUpdateInstallmentRequest} requestParameters Request parameters.
* @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 => {
- const localVarPath = `/activities`;
- // 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", ["activities:read", "activities: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 (deal_id !== undefined) {
- localVarQueryParameter['deal_id'] = deal_id;
- }
-
- if (lead_id !== undefined) {
- localVarQueryParameter['lead_id'] = lead_id;
- }
-
- if (person_id !== undefined) {
- localVarQueryParameter['person_id'] = person_id;
- }
-
- if (org_id !== undefined) {
- localVarQueryParameter['org_id'] = org_id;
- }
-
- 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 (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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
+ updateInstallment(requestParameters: BetaApiUpdateInstallmentRequest, ): Promise {
+ return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody, ).then((request) => request(axios, basePath));
},
- /**
- * Returns the details of a specific activity.
- * @summary Get details of an activity
- * @param {number} id The ID of the activity
- * @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include
-
- * @throws {RequiredError}
- */
- getActivity: async (id: number, include_fields?: 'attendees', ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getActivity', 'id', id)
- const localVarPath = `/activities/{id}`
- .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: '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", ["activities:read", "activities:full"], configuration)
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_fields;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Lists discounts attached to a deal.
- * @summary List discounts added to a deal
- * @param {number} id The ID of the deal
-
- * @throws {RequiredError}
- */
- getAdditionalDiscounts: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getAdditionalDiscounts', 'id', id)
- const localVarPath = `/deals/{id}/discounts`
- .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: '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)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns the details of a specific deal.
- * @summary Get details of a deal
- * @param {number} id The ID of the deal
- * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time'} [include_fields] Optional comma separated string array of additional fields to include
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
-
- * @throws {RequiredError}
- */
- getDeal: async (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time', custom_fields?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getDeal', 'id', id)
- const localVarPath = `/deals/{id}`
- .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: '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 (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_fields;
- }
-
- if (custom_fields !== undefined) {
- localVarQueryParameter['custom_fields'] = custom_fields;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
- * @param {number} id The ID of the deal
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
-
- * @throws {RequiredError}
- */
- getDealProducts: async (id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getDealProducts', 'id', id)
- const localVarPath = `/deals/{id}/products`
- .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: '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", ["products:read", "products:full", "deals:read", "deals:full"], configuration)
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (sort_by !== undefined) {
- localVarQueryParameter['sort_by'] = sort_by;
- }
-
- if (sort_direction !== undefined) {
- localVarQueryParameter['sort_direction'] = sort_direction;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about all deals.
- * @summary Get all deals
- * @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {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}
- */
- getDeals: async (filter_id?: number, ids?: string, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time', custom_fields?: string, limit?: number, cursor?: string, ): Promise => {
- const localVarPath = `/deals`;
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
- 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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about products attached to deals
- * @summary Get deal products of several deals
- * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
-
- * @throws {RequiredError}
- */
- getDealsProducts: async (deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise => {
- // verify required parameter 'deal_ids' is not null or undefined
- assertParamExists('getDealsProducts', 'deal_ids', deal_ids)
- const localVarPath = `/deals/products`;
- // 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", ["products:read", "products:full", "deals:read", "deals:full"], configuration)
-
- if (deal_ids) {
- localVarQueryParameter['deal_ids'] = deal_ids;
- }
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (sort_by !== undefined) {
- localVarQueryParameter['sort_by'] = sort_by;
- }
-
- if (sort_direction !== undefined) {
- localVarQueryParameter['sort_direction'] = sort_direction;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Lists installments attached to a list of deals. Only available in Advanced and above plans.
- * @summary List installments added to a list of deals
- * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
-
- * @throws {RequiredError}
- */
- getInstallments: async (deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'billing_date' | 'deal_id', sort_direction?: 'asc' | 'desc', ): Promise => {
- // verify required parameter 'deal_ids' is not null or undefined
- assertParamExists('getInstallments', 'deal_ids', deal_ids)
- const localVarPath = `/deals/installments`;
- // 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 (deal_ids) {
- localVarQueryParameter['deal_ids'] = deal_ids;
- }
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (sort_by !== undefined) {
- localVarQueryParameter['sort_by'] = sort_by;
- }
-
- if (sort_direction !== undefined) {
- localVarQueryParameter['sort_direction'] = sort_direction;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns the details of a specific organization.
- * @summary Get details of a organization
- * @param {number} id The ID of the organization
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [include_fields] Optional comma separated string array of additional fields to include
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
-
- * @throws {RequiredError}
- */
- getOrganization: async (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count', custom_fields?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganization', 'id', id)
- const localVarPath = `/organizations/{id}`
- .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: '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", ["contacts:read", "contacts:full"], configuration)
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_fields;
- }
-
- if (custom_fields !== undefined) {
- localVarQueryParameter['custom_fields'] = custom_fields;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about all organizations.
- * @summary Get all organizations
- * @param {number} [filter_id] If supplied, only organizations matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {number} [owner_id] If supplied, only organization owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @param {string} [updated_since] If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @param {string} [updated_until] If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [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}
- */
- getOrganizations: async (filter_id?: number, ids?: string, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count', custom_fields?: string, limit?: number, cursor?: string, ): Promise => {
- const localVarPath = `/organizations`;
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
- 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", ["contacts:read", "contacts: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 (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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get details of a person
- * @param {number} id The ID of the person
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
-
- * @throws {RequiredError}
- */
- getPerson: async (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getPerson', 'id', id)
- const localVarPath = `/persons/{id}`
- .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: '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", ["contacts:read", "contacts:full"], configuration)
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_fields;
- }
-
- if (custom_fields !== undefined) {
- localVarQueryParameter['custom_fields'] = custom_fields;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get all persons
- * @param {number} [filter_id] If supplied, only persons matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
- * @param {string} [updated_since] If set, only persons 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 persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
- * @param {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}
- */
- getPersons: async (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string, ): Promise => {
- const localVarPath = `/persons`;
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
- 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", ["contacts:read", "contacts: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 (org_id !== undefined) {
- localVarQueryParameter['org_id'] = org_id;
- }
-
- 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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
- * @summary Add a discount to a deal
- * @param {number} id The ID of the deal
- * @param {AddAdditionalDiscountRequestBody} [AddAdditionalDiscountRequestBody]
-
- * @throws {RequiredError}
- */
- postAdditionalDiscount: async (id: number, AddAdditionalDiscountRequestBody?: AddAdditionalDiscountRequestBody, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('postAdditionalDiscount', 'id', id)
- const localVarPath = `/deals/{id}/discounts`
- .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:read", "deals:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddAdditionalDiscountRequestBody, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * 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
- * @param {number} id The ID of the deal
- * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
-
- * @throws {RequiredError}
- */
- postInstallment: async (id: number, AddInstallmentRequestBody?: AddInstallmentRequestBody, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('postInstallment', 'id', id)
- const localVarPath = `/deals/{id}/installments`
- .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:read", "deals:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddInstallmentRequestBody, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @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} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
- * @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
- * @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
- * @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @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}
- */
- 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', limit?: number, cursor?: string, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchDeals', 'term', term)
- const localVarPath = `/deals/search`;
- // 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", "search:read"], configuration)
-
- if (term !== undefined) {
- localVarQueryParameter['term'] = term;
- }
-
- if (fields !== undefined) {
- localVarQueryParameter['fields'] = fields;
- }
-
- if (exact_match !== undefined) {
- localVarQueryParameter['exact_match'] = exact_match;
- }
-
- if (person_id !== undefined) {
- localVarQueryParameter['person_id'] = person_id;
- }
-
- if (organization_id !== undefined) {
- localVarQueryParameter['organization_id'] = organization_id;
- }
-
- if (status !== undefined) {
- localVarQueryParameter['status'] = status;
- }
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Performs a search from your choice of item types and fields.
- * @summary Perform a search from multiple item types
- * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all.
- * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`.
- * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
- * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @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} [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}
- */
- 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', limit?: number, cursor?: string, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchItem', 'term', term)
- const localVarPath = `/itemSearch`;
- // 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", ["search:read"], configuration)
-
- if (term !== undefined) {
- localVarQueryParameter['term'] = term;
- }
-
- if (item_types !== undefined) {
- localVarQueryParameter['item_types'] = item_types;
- }
-
- if (fields !== undefined) {
- localVarQueryParameter['fields'] = fields;
- }
-
- if (search_for_related_items !== undefined) {
- localVarQueryParameter['search_for_related_items'] = search_for_related_items;
- }
-
- if (exact_match !== undefined) {
- localVarQueryParameter['exact_match'] = exact_match;
- }
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded.
- * @param {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} entity_type The type of the field to perform the search from
- * @param {string} field The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @param {'exact' | 'beginning' | 'middle'} [match] The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>.
- * @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}
- */
- searchItemByField: async (term: string, entity_type: 'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project', field: string, match?: 'exact' | 'beginning' | 'middle', limit?: number, cursor?: string, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchItemByField', 'term', term)
- // verify required parameter 'entity_type' is not null or undefined
- assertParamExists('searchItemByField', 'entity_type', entity_type)
- // verify required parameter 'field' is not null or undefined
- assertParamExists('searchItemByField', 'field', field)
- const localVarPath = `/itemSearch/field`;
- // 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", ["search:read"], configuration)
-
- if (term !== undefined) {
- localVarQueryParameter['term'] = term;
- }
-
- if (entity_type !== undefined) {
- localVarQueryParameter['entity_type'] = entity_type;
- }
-
- if (match !== undefined) {
- localVarQueryParameter['match'] = match;
- }
-
- if (field !== undefined) {
- localVarQueryParameter['field'] = field;
- }
-
- 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, };
-
- 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
- * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them.
- * @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} [person_id] Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
- * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
- * @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @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}
- */
- searchLeads: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', limit?: number, cursor?: string, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchLeads', 'term', term)
- const localVarPath = `/leads/search`;
- // 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", "search:read"], configuration)
-
- if (term !== undefined) {
- localVarQueryParameter['term'] = term;
- }
-
- if (fields !== undefined) {
- localVarQueryParameter['fields'] = fields;
- }
-
- if (exact_match !== undefined) {
- localVarQueryParameter['exact_match'] = exact_match;
- }
-
- if (person_id !== undefined) {
- localVarQueryParameter['person_id'] = person_id;
- }
-
- if (organization_id !== undefined) {
- localVarQueryParameter['organization_id'] = organization_id;
- }
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'address' | 'custom_fields' | 'notes' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @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} [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}
- */
- searchOrganization: async (term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, limit?: number, cursor?: string, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchOrganization', 'term', term)
- const localVarPath = `/organizations/search`;
- // 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", ["contacts:read", "contacts:full", "search:read"], configuration)
-
- if (term !== undefined) {
- localVarQueryParameter['term'] = term;
- }
-
- if (fields !== undefined) {
- localVarQueryParameter['fields'] = fields;
- }
-
- if (exact_match !== undefined) {
- localVarQueryParameter['exact_match'] = exact_match;
- }
-
- 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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @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} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
- * @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @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}
- */
- searchPersons: async (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchPersons', 'term', term)
- const localVarPath = `/persons/search`;
- // 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", ["contacts:read", "contacts:full", "search:read"], configuration)
-
- if (term !== undefined) {
- localVarQueryParameter['term'] = term;
- }
-
- if (fields !== undefined) {
- localVarQueryParameter['fields'] = fields;
- }
-
- if (exact_match !== undefined) {
- localVarQueryParameter['exact_match'] = exact_match;
- }
-
- if (organization_id !== undefined) {
- localVarQueryParameter['organization_id'] = organization_id;
- }
-
- if (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of an activity.
- * @summary Update an activity
- * @param {number} id The ID of the activity
- * @param {AddActivityRequest} [AddActivityRequest]
-
- * @throws {RequiredError}
- */
- updateActivity: async (id: number, AddActivityRequest?: AddActivityRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateActivity', 'id', id)
- const localVarPath = `/activities/{id}`
- .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: 'PATCH', ...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", ["activities:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddActivityRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
- * @summary Update a discount added to a deal
- * @param {number} id The ID of the deal
- * @param {number} discount_id The ID of the discount
- * @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
-
- * @throws {RequiredError}
- */
- updateAdditionalDiscount: async (id: number, discount_id: number, UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateAdditionalDiscount', 'id', id)
- // verify required parameter 'discount_id' is not null or undefined
- assertParamExists('updateAdditionalDiscount', 'discount_id', discount_id)
- const localVarPath = `/deals/{id}/discounts/{discount_id}`
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
- .replace(`{${"discount_id"}}`, encodeURIComponent(String(discount_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: 'PATCH', ...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)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateAdditionalDiscountRequestBody, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a deal.
- * @summary Update a deal
- * @param {number} id The ID of the deal
- * @param {UpdateDealRequest} [UpdateDealRequest]
-
- * @throws {RequiredError}
- */
- updateDeal: async (id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateDeal', 'id', id)
- const localVarPath = `/deals/{id}`
- .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: 'PATCH', ...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"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateDealRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the details of the product that has been attached to a deal.
- * @summary Update the product attached to a deal
- * @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]
-
- * @throws {RequiredError}
- */
- updateDealProduct: async (id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateDealProduct', 'id', id)
- // verify required parameter 'product_attachment_id' is not null or undefined
- assertParamExists('updateDealProduct', 'product_attachment_id', product_attachment_id)
- const localVarPath = `/deals/{id}/products/{product_attachment_id}`
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
- .replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_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: 'PATCH', ...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", ["products:full", "deals:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateDealProductRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
- * @summary Update an installment added to a deal
- * @param {number} id The ID of the deal
- * @param {number} installment_id The ID of the installment
- * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
-
- * @throws {RequiredError}
- */
- updateInstallment: async (id: number, installment_id: number, UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateInstallment', 'id', id)
- // verify required parameter 'installment_id' is not null or undefined
- assertParamExists('updateInstallment', 'installment_id', installment_id)
- const localVarPath = `/deals/{id}/installments/{installment_id}`
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
- .replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_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: 'PATCH', ...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)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateInstallmentRequestBody, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a organization.
- * @summary Update a organization
- * @param {number} id The ID of the organization
- * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest]
-
- * @throws {RequiredError}
- */
- updateOrganization: async (id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateOrganization', 'id', id)
- const localVarPath = `/organizations/{id}`
- .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: 'PATCH', ...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", ["contacts:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateOrganizationRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a person.
- * @summary Update a person
- * @param {number} id The ID of the person
- * @param {UpdatePersonRequest} [UpdatePersonRequest]
-
- * @throws {RequiredError}
- */
- updatePerson: async (id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updatePerson', 'id', id)
- const localVarPath = `/persons/{id}`
- .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: 'PATCH', ...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", ["contacts:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdatePersonRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- }
-};
-
-
-/**
- * BetaApi - functional programming interface
- * @export
- */
-export const BetaApiFp = function(configuration?: Configuration) {
- const localVarAxiosParamCreator = BetaApiAxiosParamCreator(configuration)
- return {
- /**
- * Adds a new activity.
- * @summary Add a new activity
- * @param {AddActivityRequest} [AddActivityRequest]
-
- * @throws {RequiredError}
- */
- async addActivity(AddActivityRequest?: AddActivityRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addActivity(AddActivityRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Adds a new deal.
- * @summary Add a new deal
- * @param {AddDealRequest} [AddDealRequest]
-
- * @throws {RequiredError}
- */
- async addDeal(AddDealRequest?: AddDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addDeal(AddDealRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Adds a product to a deal, creating a new item called a deal-product.
- * @summary Add a product to a deal
- * @param {number} id The ID of the deal
- * @param {AddDealProductRequest} [AddDealProductRequest]
-
- * @throws {RequiredError}
- */
- async addDealProduct(id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addDealProduct(id, AddDealProductRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Adds a new organization.
- * @summary Add a new organization
- * @param {AddOrganizationRequest} [AddOrganizationRequest]
-
- * @throws {RequiredError}
- */
- async addOrganization(AddOrganizationRequest?: AddOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganization(AddOrganizationRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Adds a new person.
- * @summary Add a new person
- * @param {AddPersonRequest} [AddPersonRequest]
-
- * @throws {RequiredError}
- */
- async addPerson(AddPersonRequest?: AddPersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addPerson(AddPersonRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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
-
- * @throws {RequiredError}
- */
- async deleteActivity(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteActivity(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
- * @param {number} id The ID of the deal
- * @param {number} discount_id The ID of the discount
-
- * @throws {RequiredError}
- */
- async deleteAdditionalDiscount(id: number, discount_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAdditionalDiscount(id, discount_id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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
-
- * @throws {RequiredError}
- */
- async deleteDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDeal(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Deletes a product attachment from a deal, using the `product_attachment_id`.
- * @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
-
- * @throws {RequiredError}
- */
- async deleteDealProduct(id: number, product_attachment_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealProduct(id, product_attachment_id, );
- 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
- * @param {number} id The ID of the deal
- * @param {number} installment_id The ID of the installment
-
- * @throws {RequiredError}
- */
- async deleteInstallment(id: number, installment_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstallment(id, installment_id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete a organization
- * @param {number} id The ID of the organization
-
- * @throws {RequiredError}
- */
- async deleteOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganization(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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
-
- * @throws {RequiredError}
- */
- async deletePerson(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deletePerson(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about all activities.
- * @summary Get all activities
- * @param {number} [filter_id] If supplied, only activities matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
- * @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
- * @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 {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 {'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.
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
-
- * @throws {RequiredError}
- */
- async getActivities(filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, 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, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns the details of a specific activity.
- * @summary Get details of an activity
- * @param {number} id The ID of the activity
- * @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include
-
- * @throws {RequiredError}
- */
- async getActivity(id: number, include_fields?: 'attendees', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getActivity(id, include_fields, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Lists discounts attached to a deal.
- * @summary List discounts added to a deal
- * @param {number} id The ID of the deal
-
- * @throws {RequiredError}
- */
- async getAdditionalDiscounts(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getAdditionalDiscounts(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns the details of a specific deal.
- * @summary Get details of a deal
- * @param {number} id The ID of the deal
- * @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time'} [include_fields] Optional comma separated string array of additional fields to include
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
-
- * @throws {RequiredError}
- */
- async getDeal(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time', custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, include_fields, custom_fields, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
- * @param {number} id The ID of the deal
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
-
- * @throws {RequiredError}
- */
- async getDealProducts(id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealProducts(id, cursor, limit, sort_by, sort_direction, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about all deals.
- * @summary Get all deals
- * @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {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 getDeals(filter_id?: number, ids?: string, owner_id?: number, person_id?: number, org_id?: number, pipeline_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time', custom_fields?: string, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDeals(filter_id, ids, owner_id, person_id, org_id, pipeline_id, stage_id, status, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about products attached to deals
- * @summary Get deal products of several deals
- * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
-
- * @throws {RequiredError}
- */
- async getDealsProducts(deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsProducts(deal_ids, cursor, limit, sort_by, sort_direction, );
- 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
- * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
-
- * @throws {RequiredError}
- */
- async getInstallments(deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'billing_date' | 'deal_id', sort_direction?: 'asc' | 'desc', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns the details of a specific organization.
- * @summary Get details of a organization
- * @param {number} id The ID of the organization
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [include_fields] Optional comma separated string array of additional fields to include
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
-
- * @throws {RequiredError}
- */
- async getOrganization(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count', custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(id, include_fields, custom_fields, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about all organizations.
- * @summary Get all organizations
- * @param {number} [filter_id] If supplied, only organizations matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {number} [owner_id] If supplied, only organization owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @param {string} [updated_since] If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @param {string} [updated_until] If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [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 getOrganizations(filter_id?: number, ids?: string, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count', custom_fields?: string, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizations(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get details of a person
- * @param {number} id The ID of the person
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
-
- * @throws {RequiredError}
- */
- async getPerson(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPerson(id, include_fields, custom_fields, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get all persons
- * @param {number} [filter_id] If supplied, only persons matching the specified filter are returned
- * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
- * @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
- * @param {string} [updated_since] If set, only persons 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 persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
- * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
- * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
- * @param {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 getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
- * @summary Add a discount to a deal
- * @param {number} id The ID of the deal
- * @param {AddAdditionalDiscountRequestBody} [AddAdditionalDiscountRequestBody]
-
- * @throws {RequiredError}
- */
- async postAdditionalDiscount(id: number, AddAdditionalDiscountRequestBody?: AddAdditionalDiscountRequestBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.postAdditionalDiscount(id, AddAdditionalDiscountRequestBody, );
- 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
- * @param {number} id The ID of the deal
- * @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
-
- * @throws {RequiredError}
- */
- async postInstallment(id: number, AddInstallmentRequestBody?: AddInstallmentRequestBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @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} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
- * @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
- * @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
- * @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @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 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', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchDeals(term, fields, exact_match, person_id, organization_id, status, include_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Performs a search from your choice of item types and fields.
- * @summary Perform a search from multiple item types
- * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all.
- * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`.
- * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
- * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @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} [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 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', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchItem(term, item_types, fields, search_for_related_items, exact_match, include_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded.
- * @param {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} entity_type The type of the field to perform the search from
- * @param {string} field The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @param {'exact' | 'beginning' | 'middle'} [match] The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>.
- * @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 searchItemByField(term: string, entity_type: 'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project', field: string, match?: 'exact' | 'beginning' | 'middle', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchItemByField(term, entity_type, field, match, limit, cursor, );
- 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
- * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them.
- * @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} [person_id] Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
- * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
- * @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @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 searchLeads(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchLeads(term, fields, exact_match, person_id, organization_id, include_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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 {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'address' | 'custom_fields' | 'notes' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @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} [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 searchOrganization(term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchOrganization(term, fields, exact_match, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * 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 {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @param {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @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} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
- * @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @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 searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchPersons(term, fields, exact_match, organization_id, include_fields, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of an activity.
- * @summary Update an activity
- * @param {number} id The ID of the activity
- * @param {AddActivityRequest} [AddActivityRequest]
-
- * @throws {RequiredError}
- */
- async updateActivity(id: number, AddActivityRequest?: AddActivityRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateActivity(id, AddActivityRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
- * @summary Update a discount added to a deal
- * @param {number} id The ID of the deal
- * @param {number} discount_id The ID of the discount
- * @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
-
- * @throws {RequiredError}
- */
- async updateAdditionalDiscount(id: number, discount_id: number, UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateAdditionalDiscount(id, discount_id, UpdateAdditionalDiscountRequestBody, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a deal.
- * @summary Update a deal
- * @param {number} id The ID of the deal
- * @param {UpdateDealRequest} [UpdateDealRequest]
-
- * @throws {RequiredError}
- */
- async updateDeal(id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateDeal(id, UpdateDealRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the details of the product that has been attached to a deal.
- * @summary Update the product attached to a deal
- * @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]
-
- * @throws {RequiredError}
- */
- async updateDealProduct(id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateDealProduct(id, product_attachment_id, UpdateDealProductRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
- * @summary Update an installment added to a deal
- * @param {number} id The ID of the deal
- * @param {number} installment_id The ID of the installment
- * @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
-
- * @throws {RequiredError}
- */
- async updateInstallment(id: number, installment_id: number, UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a organization.
- * @summary Update a organization
- * @param {number} id The ID of the organization
- * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest]
-
- * @throws {RequiredError}
- */
- async updateOrganization(id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization(id, UpdateOrganizationRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a person.
- * @summary Update a person
- * @param {number} id The ID of the person
- * @param {UpdatePersonRequest} [UpdatePersonRequest]
-
- * @throws {RequiredError}
- */
- async updatePerson(id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- }
-};
-
-/**
- * BetaApi - factory interface
- * @export
- */
-export const BetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
- const localVarFp = BetaApiFp(configuration)
- return {
- /**
- * Adds a new activity.
- * @summary Add a new activity
- * @param {BetaApiAddActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- addActivity(requestParameters: BetaApiAddActivityRequest = {}, ): Promise {
- return localVarFp.addActivity(requestParameters.AddActivityRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Adds a new deal.
- * @summary Add a new deal
- * @param {BetaApiAddDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- addDeal(requestParameters: BetaApiAddDealRequest = {}, ): Promise {
- return localVarFp.addDeal(requestParameters.AddDealRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Adds a product to a deal, creating a new item called a deal-product.
- * @summary Add a product to a deal
- * @param {BetaApiAddDealProductRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- addDealProduct(requestParameters: BetaApiAddDealProductRequest, ): Promise {
- return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Adds a new organization.
- * @summary Add a new organization
- * @param {BetaApiAddOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- addOrganization(requestParameters: BetaApiAddOrganizationRequest = {}, ): Promise {
- return localVarFp.addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Adds a new person.
- * @summary Add a new person
- * @param {BetaApiAddPersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- addPerson(requestParameters: BetaApiAddPersonRequest = {}, ): Promise {
- return localVarFp.addPerson(requestParameters.AddPersonRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
- * @summary Delete an activity
- * @param {BetaApiDeleteActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deleteActivity(requestParameters: BetaApiDeleteActivityRequest, ): Promise {
- return localVarFp.deleteActivity(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
- * @param {BetaApiDeleteAdditionalDiscountRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deleteAdditionalDiscount(requestParameters: BetaApiDeleteAdditionalDiscountRequest, ): Promise {
- return localVarFp.deleteAdditionalDiscount(requestParameters.id, requestParameters.discount_id, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
- * @param {BetaApiDeleteDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deleteDeal(requestParameters: BetaApiDeleteDealRequest, ): Promise {
- return localVarFp.deleteDeal(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Deletes a product attachment from a deal, using the `product_attachment_id`.
- * @summary Delete an attached product from a deal
- * @param {BetaApiDeleteDealProductRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deleteDealProduct(requestParameters: BetaApiDeleteDealProductRequest, ): Promise {
- return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).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
- * @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deleteInstallment(requestParameters: BetaApiDeleteInstallmentRequest, ): Promise {
- return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete a organization
- * @param {BetaApiDeleteOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deleteOrganization(requestParameters: BetaApiDeleteOrganizationRequest, ): Promise {
- return localVarFp.deleteOrganization(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks a person as deleted. After 30 days, the person will be permanently deleted.
- * @summary Delete a person
- * @param {BetaApiDeletePersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- deletePerson(requestParameters: BetaApiDeletePersonRequest, ): Promise {
- return localVarFp.deletePerson(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns data about all activities.
- * @summary Get all activities
- * @param {BetaApiGetActivitiesRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getActivities(requestParameters: BetaApiGetActivitiesRequest = {}, ): 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));
- },
- /**
- * Returns the details of a specific activity.
- * @summary Get details of an activity
- * @param {BetaApiGetActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getActivity(requestParameters: BetaApiGetActivityRequest, ): Promise {
- return localVarFp.getActivity(requestParameters.id, requestParameters.include_fields, ).then((request) => request(axios, basePath));
- },
- /**
- * Lists discounts attached to a deal.
- * @summary List discounts added to a deal
- * @param {BetaApiGetAdditionalDiscountsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getAdditionalDiscounts(requestParameters: BetaApiGetAdditionalDiscountsRequest, ): Promise {
- return localVarFp.getAdditionalDiscounts(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns the details of a specific deal.
- * @summary Get details of a deal
- * @param {BetaApiGetDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getDeal(requestParameters: BetaApiGetDealRequest, ): Promise {
- return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
- },
- /**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
- * @param {BetaApiGetDealProductsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getDealProducts(requestParameters: BetaApiGetDealProductsRequest, ): Promise {
- 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.
- * @summary Get all deals
- * @param {BetaApiGetDealsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getDeals(requestParameters: BetaApiGetDealsRequest = {}, ): Promise {
- return localVarFp.getDeals(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 data about products attached to deals
- * @summary Get deal products of several deals
- * @param {BetaApiGetDealsProductsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getDealsProducts(requestParameters: BetaApiGetDealsProductsRequest, ): Promise {
- return localVarFp.getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).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
- * @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- 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 the details of a specific organization.
- * @summary Get details of a organization
- * @param {BetaApiGetOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getOrganization(requestParameters: BetaApiGetOrganizationRequest, ): Promise {
- return localVarFp.getOrganization(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns data about all organizations.
- * @summary Get all organizations
- * @param {BetaApiGetOrganizationsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getOrganizations(requestParameters: BetaApiGetOrganizationsRequest = {}, ): Promise {
- return localVarFp.getOrganizations(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, 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 person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get details of a person
- * @param {BetaApiGetPersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getPerson(requestParameters: BetaApiGetPersonRequest, ): Promise {
- return localVarFp.getPerson(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get all persons
- * @param {BetaApiGetPersonsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- getPersons(requestParameters: BetaApiGetPersonsRequest = {}, ): Promise {
- return localVarFp.getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, 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));
- },
- /**
- * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
- * @summary Add a discount to a deal
- * @param {BetaApiPostAdditionalDiscountRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- postAdditionalDiscount(requestParameters: BetaApiPostAdditionalDiscountRequest, ): Promise {
- return localVarFp.postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody, ).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
- * @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- postInstallment(requestParameters: BetaApiPostInstallmentRequest, ): Promise {
- return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody, ).then((request) => request(axios, 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 {BetaApiSearchDealsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- searchDeals(requestParameters: BetaApiSearchDealsRequest, ): Promise {
- return localVarFp.searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
- },
- /**
- * Performs a search from your choice of item types and fields.
- * @summary Perform a search from multiple item types
- * @param {BetaApiSearchItemRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- searchItem(requestParameters: BetaApiSearchItemRequest, ): Promise {
- return localVarFp.searchItem(requestParameters.term, requestParameters.item_types, requestParameters.fields, requestParameters.search_for_related_items, requestParameters.exact_match, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
- },
- /**
- * 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 {BetaApiSearchItemByFieldRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- searchItemByField(requestParameters: BetaApiSearchItemByFieldRequest, ): Promise {
- return localVarFp.searchItemByField(requestParameters.term, requestParameters.entity_type, requestParameters.field, requestParameters.match, requestParameters.limit, requestParameters.cursor, ).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
- * @param {BetaApiSearchLeadsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- searchLeads(requestParameters: BetaApiSearchLeadsRequest, ): Promise {
- return localVarFp.searchLeads(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
- },
- /**
- * 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 {BetaApiSearchOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- searchOrganization(requestParameters: BetaApiSearchOrganizationRequest, ): Promise {
- return localVarFp.searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
- },
- /**
- * 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 {BetaApiSearchPersonsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- searchPersons(requestParameters: BetaApiSearchPersonsRequest, ): Promise {
- return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of an activity.
- * @summary Update an activity
- * @param {BetaApiUpdateActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updateActivity(requestParameters: BetaApiUpdateActivityRequest, ): Promise {
- return localVarFp.updateActivity(requestParameters.id, requestParameters.AddActivityRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
- * @summary Update a discount added to a deal
- * @param {BetaApiUpdateAdditionalDiscountRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updateAdditionalDiscount(requestParameters: BetaApiUpdateAdditionalDiscountRequest, ): Promise {
- return localVarFp.updateAdditionalDiscount(requestParameters.id, requestParameters.discount_id, requestParameters.UpdateAdditionalDiscountRequestBody, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a deal.
- * @summary Update a deal
- * @param {BetaApiUpdateDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updateDeal(requestParameters: BetaApiUpdateDealRequest, ): Promise {
- return localVarFp.updateDeal(requestParameters.id, requestParameters.UpdateDealRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the details of the product that has been attached to a deal.
- * @summary Update the product attached to a deal
- * @param {BetaApiUpdateDealProductRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updateDealProduct(requestParameters: BetaApiUpdateDealProductRequest, ): Promise {
- return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Edits an installment added to a deal. Only available in Advanced and above plans.
- * @summary Update an installment added to a deal
- * @param {BetaApiUpdateInstallmentRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updateInstallment(requestParameters: BetaApiUpdateInstallmentRequest, ): Promise {
- return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a organization.
- * @summary Update a organization
- * @param {BetaApiUpdateOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updateOrganization(requestParameters: BetaApiUpdateOrganizationRequest, ): Promise {
- return localVarFp.updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a person.
- * @summary Update a person
- * @param {BetaApiUpdatePersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- updatePerson(requestParameters: BetaApiUpdatePersonRequest, ): Promise {
- return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(axios, basePath));
- },
- };
-};
-
-/**
- * Request parameters for addActivity operation in BetaApi.
- * @export
- * @interface BetaApiAddActivityRequest
- */
-export interface BetaApiAddActivityRequest {
- /**
- *
- * @type {AddActivityRequest}
- * @memberof BetaApiAddActivity
- */
- readonly AddActivityRequest?: AddActivityRequest
-}
-
-/**
- * Request parameters for addDeal operation in BetaApi.
- * @export
- * @interface BetaApiAddDealRequest
- */
-export interface BetaApiAddDealRequest {
- /**
- *
- * @type {AddDealRequest}
- * @memberof BetaApiAddDeal
- */
- readonly AddDealRequest?: AddDealRequest
-}
-
-/**
- * Request parameters for addDealProduct operation in BetaApi.
- * @export
- * @interface BetaApiAddDealProductRequest
- */
-export interface BetaApiAddDealProductRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiAddDealProduct
- */
- readonly id: number
-
- /**
- *
- * @type {AddDealProductRequest}
- * @memberof BetaApiAddDealProduct
- */
- readonly AddDealProductRequest?: AddDealProductRequest
-}
-
-/**
- * Request parameters for addOrganization operation in BetaApi.
- * @export
- * @interface BetaApiAddOrganizationRequest
- */
-export interface BetaApiAddOrganizationRequest {
- /**
- *
- * @type {AddOrganizationRequest}
- * @memberof BetaApiAddOrganization
- */
- readonly AddOrganizationRequest?: AddOrganizationRequest
-}
-
-/**
- * Request parameters for addPerson operation in BetaApi.
- * @export
- * @interface BetaApiAddPersonRequest
- */
-export interface BetaApiAddPersonRequest {
- /**
- *
- * @type {AddPersonRequest}
- * @memberof BetaApiAddPerson
- */
- readonly AddPersonRequest?: AddPersonRequest
-}
-
-/**
- * Request parameters for deleteActivity operation in BetaApi.
- * @export
- * @interface BetaApiDeleteActivityRequest
- */
-export interface BetaApiDeleteActivityRequest {
- /**
- * The ID of the activity
- * @type {number}
- * @memberof BetaApiDeleteActivity
- */
- readonly id: number
-}
-
-/**
- * Request parameters for deleteAdditionalDiscount operation in BetaApi.
- * @export
- * @interface BetaApiDeleteAdditionalDiscountRequest
- */
-export interface BetaApiDeleteAdditionalDiscountRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiDeleteAdditionalDiscount
- */
- readonly id: number
-
- /**
- * The ID of the discount
- * @type {number}
- * @memberof BetaApiDeleteAdditionalDiscount
- */
- readonly discount_id: number
-}
-
-/**
- * Request parameters for deleteDeal operation in BetaApi.
- * @export
- * @interface BetaApiDeleteDealRequest
- */
-export interface BetaApiDeleteDealRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiDeleteDeal
- */
- readonly id: number
-}
-
-/**
- * Request parameters for deleteDealProduct operation in BetaApi.
- * @export
- * @interface BetaApiDeleteDealProductRequest
- */
-export interface BetaApiDeleteDealProductRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiDeleteDealProduct
- */
- readonly id: number
-
- /**
- * The product attachment ID
- * @type {number}
- * @memberof BetaApiDeleteDealProduct
- */
- readonly product_attachment_id: number
-}
-
-/**
- * Request parameters for deleteInstallment operation in BetaApi.
- * @export
- * @interface BetaApiDeleteInstallmentRequest
- */
-export interface BetaApiDeleteInstallmentRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiDeleteInstallment
- */
- readonly id: number
-
- /**
- * The ID of the installment
- * @type {number}
- * @memberof BetaApiDeleteInstallment
- */
- readonly installment_id: number
-}
-
-/**
- * Request parameters for deleteOrganization operation in BetaApi.
- * @export
- * @interface BetaApiDeleteOrganizationRequest
- */
-export interface BetaApiDeleteOrganizationRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof BetaApiDeleteOrganization
- */
- readonly id: number
-}
-
-/**
- * Request parameters for deletePerson operation in BetaApi.
- * @export
- * @interface BetaApiDeletePersonRequest
- */
-export interface BetaApiDeletePersonRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof BetaApiDeletePerson
- */
- readonly id: number
-}
-
-/**
- * Request parameters for getActivities operation in BetaApi.
- * @export
- * @interface BetaApiGetActivitiesRequest
- */
-export interface BetaApiGetActivitiesRequest {
- /**
- * If supplied, only activities matching the specified filter are returned
- * @type {number}
- * @memberof BetaApiGetActivities
- */
- 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 BetaApiGetActivities
- */
- readonly ids?: string
-
- /**
- * If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetActivities
- */
- readonly owner_id?: number
-
- /**
- * If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetActivities
- */
- readonly deal_id?: number
-
- /**
- * If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
- * @type {string}
- * @memberof BetaApiGetActivities
- */
- readonly lead_id?: string
-
- /**
- * If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetActivities
- */
- readonly person_id?: number
-
- /**
- * If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetActivities
- */
- readonly org_id?: number
-
- /**
- * 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}
- * @memberof BetaApiGetActivities
- */
- readonly updated_since?: string
-
- /**
- * If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @type {string}
- * @memberof BetaApiGetActivities
- */
- readonly updated_until?: string
-
- /**
- * The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @type {'id' | 'update_time' | 'add_time'}
- * @memberof BetaApiGetActivities
- */
- readonly sort_by?: 'id' | 'update_time' | 'add_time'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetActivities
- */
- readonly sort_direction?: 'asc' | 'desc'
-
- /**
- * Optional comma separated string array of additional fields to include
- * @type {'attendees'}
- * @memberof BetaApiGetActivities
- */
- readonly include_fields?: 'attendees'
-
- /**
- * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @type {number}
- * @memberof BetaApiGetActivities
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetActivities
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for getActivity operation in BetaApi.
- * @export
- * @interface BetaApiGetActivityRequest
- */
-export interface BetaApiGetActivityRequest {
- /**
- * The ID of the activity
- * @type {number}
- * @memberof BetaApiGetActivity
- */
- readonly id: number
-
- /**
- * Optional comma separated string array of additional fields to include
- * @type {'attendees'}
- * @memberof BetaApiGetActivity
- */
- readonly include_fields?: 'attendees'
-}
-
-/**
- * Request parameters for getAdditionalDiscounts operation in BetaApi.
- * @export
- * @interface BetaApiGetAdditionalDiscountsRequest
- */
-export interface BetaApiGetAdditionalDiscountsRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiGetAdditionalDiscounts
- */
- readonly id: number
-}
-
-/**
- * Request parameters for getDeal operation in BetaApi.
- * @export
- * @interface BetaApiGetDealRequest
- */
-export interface BetaApiGetDealRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiGetDeal
- */
- readonly id: number
-
- /**
- * 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 BetaApiGetDeal
- */
- 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 BetaApiGetDeal
- */
- readonly custom_fields?: string
-}
-
-/**
- * Request parameters for getDealProducts operation in BetaApi.
- * @export
- * @interface BetaApiGetDealProductsRequest
- */
-export interface BetaApiGetDealProductsRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiGetDealProducts
- */
- readonly id: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetDealProducts
- */
- readonly cursor?: 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 BetaApiGetDealProducts
- */
- readonly limit?: number
-
- /**
- * The field to sort by. Supported fields: `id`, `add_time`, `update_time`.
- * @type {'id' | 'add_time' | 'update_time'}
- * @memberof BetaApiGetDealProducts
- */
- readonly sort_by?: 'id' | 'add_time' | 'update_time'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetDealProducts
- */
- readonly sort_direction?: 'asc' | 'desc'
-}
-
-/**
- * Request parameters for getDeals operation in BetaApi.
- * @export
- * @interface BetaApiGetDealsRequest
- */
-export interface BetaApiGetDealsRequest {
- /**
- * If supplied, only deals matching the specified filter are returned
- * @type {number}
- * @memberof BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- readonly updated_until?: string
-
- /**
- * The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @type {'id' | 'update_time' | 'add_time'}
- * @memberof BetaApiGetDeals
- */
- readonly sort_by?: 'id' | 'update_time' | 'add_time'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- 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 BetaApiGetDeals
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetDeals
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for getDealsProducts operation in BetaApi.
- * @export
- * @interface BetaApiGetDealsProductsRequest
- */
-export interface BetaApiGetDealsProductsRequest {
- /**
- * An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
- * @type {Array}
- * @memberof BetaApiGetDealsProducts
- */
- readonly deal_ids: Array
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetDealsProducts
- */
- readonly cursor?: 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 BetaApiGetDealsProducts
- */
- readonly limit?: number
-
- /**
- * The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`.
- * @type {'id' | 'deal_id' | 'add_time' | 'update_time'}
- * @memberof BetaApiGetDealsProducts
- */
- readonly sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetDealsProducts
- */
- readonly sort_direction?: 'asc' | 'desc'
-}
-
-/**
- * Request parameters for getInstallments operation in BetaApi.
- * @export
- * @interface BetaApiGetInstallmentsRequest
- */
-export interface BetaApiGetInstallmentsRequest {
- /**
- * An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
- * @type {Array}
- * @memberof BetaApiGetInstallments
- */
- readonly deal_ids: Array
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetInstallments
- */
- readonly cursor?: 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 BetaApiGetInstallments
- */
- readonly limit?: number
-
- /**
- * The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
- * @type {'id' | 'billing_date' | 'deal_id'}
- * @memberof BetaApiGetInstallments
- */
- readonly sort_by?: 'id' | 'billing_date' | 'deal_id'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetInstallments
- */
- readonly sort_direction?: 'asc' | 'desc'
-}
-
-/**
- * Request parameters for getOrganization operation in BetaApi.
- * @export
- * @interface BetaApiGetOrganizationRequest
- */
-export interface BetaApiGetOrganizationRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof BetaApiGetOrganization
- */
- readonly id: number
-
- /**
- * Optional comma separated string array of additional fields to include
- * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'}
- * @memberof BetaApiGetOrganization
- */
- readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'
-
- /**
- * 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 BetaApiGetOrganization
- */
- readonly custom_fields?: string
-}
-
-/**
- * Request parameters for getOrganizations operation in BetaApi.
- * @export
- * @interface BetaApiGetOrganizationsRequest
- */
-export interface BetaApiGetOrganizationsRequest {
- /**
- * If supplied, only organizations matching the specified filter are returned
- * @type {number}
- * @memberof BetaApiGetOrganizations
- */
- 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 BetaApiGetOrganizations
- */
- readonly ids?: string
-
- /**
- * If supplied, only organization owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetOrganizations
- */
- readonly owner_id?: number
-
- /**
- * If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @type {string}
- * @memberof BetaApiGetOrganizations
- */
- readonly updated_since?: string
-
- /**
- * If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @type {string}
- * @memberof BetaApiGetOrganizations
- */
- readonly updated_until?: string
-
- /**
- * The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @type {'id' | 'update_time' | 'add_time'}
- * @memberof BetaApiGetOrganizations
- */
- readonly sort_by?: 'id' | 'update_time' | 'add_time'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetOrganizations
- */
- readonly sort_direction?: 'asc' | 'desc'
-
- /**
- * Optional comma separated string array of additional fields to include
- * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'}
- * @memberof BetaApiGetOrganizations
- */
- readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'
-
- /**
- * 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 BetaApiGetOrganizations
- */
- 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 BetaApiGetOrganizations
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetOrganizations
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for getPerson operation in BetaApi.
- * @export
- * @interface BetaApiGetPersonRequest
- */
-export interface BetaApiGetPersonRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof BetaApiGetPerson
- */
- readonly id: number
-
- /**
- * Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
- * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'}
- * @memberof BetaApiGetPerson
- */
- readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'
-
- /**
- * 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 BetaApiGetPerson
- */
- readonly custom_fields?: string
-}
-
-/**
- * Request parameters for getPersons operation in BetaApi.
- * @export
- * @interface BetaApiGetPersonsRequest
- */
-export interface BetaApiGetPersonsRequest {
- /**
- * If supplied, only persons matching the specified filter are returned
- * @type {number}
- * @memberof BetaApiGetPersons
- */
- 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 BetaApiGetPersons
- */
- readonly ids?: string
-
- /**
- * If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetPersons
- */
- readonly owner_id?: number
-
- /**
- * If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
- * @type {number}
- * @memberof BetaApiGetPersons
- */
- readonly org_id?: number
-
- /**
- * If set, only persons 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 BetaApiGetPersons
- */
- readonly updated_since?: string
-
- /**
- * If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
- * @type {string}
- * @memberof BetaApiGetPersons
- */
- readonly updated_until?: string
-
- /**
- * The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
- * @type {'id' | 'update_time' | 'add_time'}
- * @memberof BetaApiGetPersons
- */
- readonly sort_by?: 'id' | 'update_time' | 'add_time'
-
- /**
- * The sorting direction. Supported values: `asc`, `desc`.
- * @type {'asc' | 'desc'}
- * @memberof BetaApiGetPersons
- */
- readonly sort_direction?: 'asc' | 'desc'
-
- /**
- * Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
- * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'}
- * @memberof BetaApiGetPersons
- */
- readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'
-
- /**
- * 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 BetaApiGetPersons
- */
- 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 BetaApiGetPersons
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiGetPersons
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for postAdditionalDiscount operation in BetaApi.
- * @export
- * @interface BetaApiPostAdditionalDiscountRequest
- */
-export interface BetaApiPostAdditionalDiscountRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiPostAdditionalDiscount
- */
- readonly id: number
-
- /**
- *
- * @type {AddAdditionalDiscountRequestBody}
- * @memberof BetaApiPostAdditionalDiscount
- */
- readonly AddAdditionalDiscountRequestBody?: AddAdditionalDiscountRequestBody
-}
-
-/**
- * Request parameters for postInstallment operation in BetaApi.
- * @export
- * @interface BetaApiPostInstallmentRequest
- */
-export interface BetaApiPostInstallmentRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiPostInstallment
- */
- readonly id: number
-
- /**
- *
- * @type {AddInstallmentRequestBody}
- * @memberof BetaApiPostInstallment
- */
- readonly AddInstallmentRequestBody?: AddInstallmentRequestBody
-}
-
-/**
- * Request parameters for searchDeals operation in BetaApi.
- * @export
- * @interface BetaApiSearchDealsRequest
- */
-export interface BetaApiSearchDealsRequest {
- /**
- * The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @type {string}
- * @memberof BetaApiSearchDeals
- */
- readonly term: string
-
- /**
- * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @type {'custom_fields' | 'notes' | 'title'}
- * @memberof BetaApiSearchDeals
- */
- readonly fields?: 'custom_fields' | 'notes' | 'title'
-
- /**
- * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @type {boolean}
- * @memberof BetaApiSearchDeals
- */
- readonly exact_match?: boolean
-
- /**
- * Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
- * @type {number}
- * @memberof BetaApiSearchDeals
- */
- readonly person_id?: number
-
- /**
- * Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
- * @type {number}
- * @memberof BetaApiSearchDeals
- */
- readonly organization_id?: number
-
- /**
- * Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
- * @type {'open' | 'won' | 'lost'}
- * @memberof BetaApiSearchDeals
- */
- readonly status?: 'open' | 'won' | 'lost'
-
- /**
- * Supports including optional fields in the results which are not provided by default
- * @type {'deal.cc_email'}
- * @memberof BetaApiSearchDeals
- */
- readonly include_fields?: 'deal.cc_email'
-
- /**
- * 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 BetaApiSearchDeals
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiSearchDeals
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for searchItem operation in BetaApi.
- * @export
- * @interface BetaApiSearchItemRequest
- */
-export interface BetaApiSearchItemRequest {
- /**
- * The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @type {string}
- * @memberof BetaApiSearchItem
- */
- readonly term: string
-
- /**
- * A comma-separated string array. The type of items to perform the search from. Defaults to all.
- * @type {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'}
- * @memberof BetaApiSearchItem
- */
- readonly item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'
-
- /**
- * A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`.
- * @type {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'}
- * @memberof BetaApiSearchItem
- */
- readonly fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'
-
- /**
- * When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
- * @type {boolean}
- * @memberof BetaApiSearchItem
- */
- readonly search_for_related_items?: boolean
-
- /**
- * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @type {boolean}
- * @memberof BetaApiSearchItem
- */
- readonly exact_match?: boolean
-
- /**
- * A comma-separated string array. Supports including optional fields in the results which are not provided by default.
- * @type {'deal.cc_email' | 'person.picture' | 'product.price'}
- * @memberof BetaApiSearchItem
- */
- readonly include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price'
-
- /**
- * 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 BetaApiSearchItem
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiSearchItem
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for searchItemByField operation in BetaApi.
- * @export
- * @interface BetaApiSearchItemByFieldRequest
- */
-export interface BetaApiSearchItemByFieldRequest {
- /**
- * The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded.
- * @type {string}
- * @memberof BetaApiSearchItemByField
- */
- readonly term: string
-
- /**
- * The type of the field to perform the search from
- * @type {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'}
- * @memberof BetaApiSearchItemByField
- */
- readonly entity_type: 'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'
-
- /**
- * The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @type {string}
- * @memberof BetaApiSearchItemByField
- */
- readonly field: string
-
- /**
- * The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>.
- * @type {'exact' | 'beginning' | 'middle'}
- * @memberof BetaApiSearchItemByField
- */
- readonly match?: 'exact' | 'beginning' | 'middle'
-
- /**
- * 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 BetaApiSearchItemByField
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiSearchItemByField
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for searchLeads operation in BetaApi.
- * @export
- * @interface BetaApiSearchLeadsRequest
- */
-export interface BetaApiSearchLeadsRequest {
- /**
- * The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @type {string}
- * @memberof BetaApiSearchLeads
- */
- readonly term: string
-
- /**
- * A comma-separated string array. The fields to perform the search from. Defaults to all of them.
- * @type {'custom_fields' | 'notes' | 'title'}
- * @memberof BetaApiSearchLeads
- */
- readonly fields?: 'custom_fields' | 'notes' | 'title'
-
- /**
- * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @type {boolean}
- * @memberof BetaApiSearchLeads
- */
- readonly exact_match?: boolean
-
- /**
- * Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
- * @type {number}
- * @memberof BetaApiSearchLeads
- */
- readonly person_id?: number
-
- /**
- * Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
- * @type {number}
- * @memberof BetaApiSearchLeads
- */
- readonly organization_id?: number
-
- /**
- * Supports including optional fields in the results which are not provided by default
- * @type {'lead.was_seen'}
- * @memberof BetaApiSearchLeads
- */
- readonly include_fields?: 'lead.was_seen'
-
- /**
- * 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 BetaApiSearchLeads
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiSearchLeads
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for searchOrganization operation in BetaApi.
- * @export
- * @interface BetaApiSearchOrganizationRequest
- */
-export interface BetaApiSearchOrganizationRequest {
- /**
- * The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @type {string}
- * @memberof BetaApiSearchOrganization
- */
- readonly term: string
-
- /**
- * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @type {'address' | 'custom_fields' | 'notes' | 'name'}
- * @memberof BetaApiSearchOrganization
- */
- readonly fields?: 'address' | 'custom_fields' | 'notes' | 'name'
-
- /**
- * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @type {boolean}
- * @memberof BetaApiSearchOrganization
- */
- readonly exact_match?: boolean
-
- /**
- * 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 BetaApiSearchOrganization
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiSearchOrganization
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for searchPersons operation in BetaApi.
- * @export
- * @interface BetaApiSearchPersonsRequest
- */
-export interface BetaApiSearchPersonsRequest {
- /**
- * The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
- * @type {string}
- * @memberof BetaApiSearchPersons
- */
- readonly term: string
-
- /**
- * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
- * @type {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'}
- * @memberof BetaApiSearchPersons
- */
- readonly fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name'
-
- /**
- * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @type {boolean}
- * @memberof BetaApiSearchPersons
- */
- readonly exact_match?: boolean
-
- /**
- * Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
- * @type {number}
- * @memberof BetaApiSearchPersons
- */
- readonly organization_id?: number
-
- /**
- * Supports including optional fields in the results which are not provided by default
- * @type {'person.picture'}
- * @memberof BetaApiSearchPersons
- */
- readonly include_fields?: 'person.picture'
-
- /**
- * 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 BetaApiSearchPersons
- */
- readonly limit?: number
-
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof BetaApiSearchPersons
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for updateActivity operation in BetaApi.
- * @export
- * @interface BetaApiUpdateActivityRequest
- */
-export interface BetaApiUpdateActivityRequest {
- /**
- * The ID of the activity
- * @type {number}
- * @memberof BetaApiUpdateActivity
- */
- readonly id: number
-
- /**
- *
- * @type {AddActivityRequest}
- * @memberof BetaApiUpdateActivity
- */
- readonly AddActivityRequest?: AddActivityRequest
-}
-
-/**
- * Request parameters for updateAdditionalDiscount operation in BetaApi.
- * @export
- * @interface BetaApiUpdateAdditionalDiscountRequest
- */
-export interface BetaApiUpdateAdditionalDiscountRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiUpdateAdditionalDiscount
- */
- readonly id: number
-
- /**
- * The ID of the discount
- * @type {number}
- * @memberof BetaApiUpdateAdditionalDiscount
- */
- readonly discount_id: number
-
- /**
- *
- * @type {UpdateAdditionalDiscountRequestBody}
- * @memberof BetaApiUpdateAdditionalDiscount
- */
- readonly UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody
-}
-
-/**
- * Request parameters for updateDeal operation in BetaApi.
- * @export
- * @interface BetaApiUpdateDealRequest
- */
-export interface BetaApiUpdateDealRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiUpdateDeal
- */
- readonly id: number
-
- /**
- *
- * @type {UpdateDealRequest}
- * @memberof BetaApiUpdateDeal
- */
- readonly UpdateDealRequest?: UpdateDealRequest
-}
-
-/**
- * Request parameters for updateDealProduct operation in BetaApi.
- * @export
- * @interface BetaApiUpdateDealProductRequest
- */
-export interface BetaApiUpdateDealProductRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiUpdateDealProduct
- */
- readonly id: number
-
- /**
- * The ID of the deal-product (the ID of the product attached to the deal)
- * @type {number}
- * @memberof BetaApiUpdateDealProduct
- */
- readonly product_attachment_id: number
-
- /**
- *
- * @type {UpdateDealProductRequest}
- * @memberof BetaApiUpdateDealProduct
- */
- readonly UpdateDealProductRequest?: UpdateDealProductRequest
-}
-
-/**
- * Request parameters for updateInstallment operation in BetaApi.
- * @export
- * @interface BetaApiUpdateInstallmentRequest
- */
-export interface BetaApiUpdateInstallmentRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof BetaApiUpdateInstallment
- */
- readonly id: number
-
- /**
- * The ID of the installment
- * @type {number}
- * @memberof BetaApiUpdateInstallment
- */
- readonly installment_id: number
-
- /**
- *
- * @type {UpdateInstallmentRequestBody}
- * @memberof BetaApiUpdateInstallment
- */
- readonly UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody
-}
-
-/**
- * Request parameters for updateOrganization operation in BetaApi.
- * @export
- * @interface BetaApiUpdateOrganizationRequest
- */
-export interface BetaApiUpdateOrganizationRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof BetaApiUpdateOrganization
- */
- readonly id: number
-
- /**
- *
- * @type {UpdateOrganizationRequest}
- * @memberof BetaApiUpdateOrganization
- */
- readonly UpdateOrganizationRequest?: UpdateOrganizationRequest
-}
-
-/**
- * Request parameters for updatePerson operation in BetaApi.
- * @export
- * @interface BetaApiUpdatePersonRequest
- */
-export interface BetaApiUpdatePersonRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof BetaApiUpdatePerson
- */
- readonly id: number
-
- /**
- *
- * @type {UpdatePersonRequest}
- * @memberof BetaApiUpdatePerson
- */
- readonly UpdatePersonRequest?: UpdatePersonRequest
-}
+ };
+};
/**
- * BetaApi - object-oriented interface
+ * Request parameters for deleteInstallment operation in BetaApi.
* @export
- * @class BetaApi
- * @extends {BaseAPI}
- */
-export class BetaApi extends BaseAPI {
- /**
- * Adds a new activity.
- * @summary Add a new activity
- * @param {BetaApiAddActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public addActivity(requestParameters: BetaApiAddActivityRequest = {}, ) {
- return BetaApiFp(this.configuration).addActivity(requestParameters.AddActivityRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Adds a new deal.
- * @summary Add a new deal
- * @param {BetaApiAddDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public addDeal(requestParameters: BetaApiAddDealRequest = {}, ) {
- return BetaApiFp(this.configuration).addDeal(requestParameters.AddDealRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Adds a product to a deal, creating a new item called a deal-product.
- * @summary Add a product to a deal
- * @param {BetaApiAddDealProductRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public addDealProduct(requestParameters: BetaApiAddDealProductRequest, ) {
- return BetaApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Adds a new organization.
- * @summary Add a new organization
- * @param {BetaApiAddOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public addOrganization(requestParameters: BetaApiAddOrganizationRequest = {}, ) {
- return BetaApiFp(this.configuration).addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Adds a new person.
- * @summary Add a new person
- * @param {BetaApiAddPersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public addPerson(requestParameters: BetaApiAddPersonRequest = {}, ) {
- return BetaApiFp(this.configuration).addPerson(requestParameters.AddPersonRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
- * @summary Delete an activity
- * @param {BetaApiDeleteActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public deleteActivity(requestParameters: BetaApiDeleteActivityRequest, ) {
- return BetaApiFp(this.configuration).deleteActivity(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
+ * @interface BetaApiDeleteInstallmentRequest
+ */
+export interface BetaApiDeleteInstallmentRequest {
/**
- * 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
- * @param {BetaApiDeleteAdditionalDiscountRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The ID of the deal
+ * @type {number}
+ * @memberof BetaApiDeleteInstallment
*/
- public deleteAdditionalDiscount(requestParameters: BetaApiDeleteAdditionalDiscountRequest, ) {
- return BetaApiFp(this.configuration).deleteAdditionalDiscount(requestParameters.id, requestParameters.discount_id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly id: number
/**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
- * @param {BetaApiDeleteDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The ID of the installment
+ * @type {number}
+ * @memberof BetaApiDeleteInstallment
*/
- public deleteDeal(requestParameters: BetaApiDeleteDealRequest, ) {
- return BetaApiFp(this.configuration).deleteDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly installment_id: number
+}
+/**
+ * Request parameters for getInstallments operation in BetaApi.
+ * @export
+ * @interface BetaApiGetInstallmentsRequest
+ */
+export interface BetaApiGetInstallmentsRequest {
/**
- * Deletes a product attachment from a deal, using the `product_attachment_id`.
- * @summary Delete an attached product from a deal
- * @param {BetaApiDeleteDealProductRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
+ * @type {Array}
+ * @memberof BetaApiGetInstallments
*/
- public deleteDealProduct(requestParameters: BetaApiDeleteDealProductRequest, ) {
- return BetaApiFp(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly deal_ids: Array
/**
- * Removes an installment from a deal. Only available in Advanced and above plans.
- * @summary Delete an installment from a deal
- * @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof BetaApiGetInstallments
*/
- public deleteInstallment(requestParameters: BetaApiDeleteInstallmentRequest, ) {
- return BetaApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly cursor?: string
/**
- * Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete a organization
- * @param {BetaApiDeleteOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * 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 BetaApiGetInstallments
*/
- public deleteOrganization(requestParameters: BetaApiDeleteOrganizationRequest, ) {
- return BetaApiFp(this.configuration).deleteOrganization(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly limit?: number
/**
- * Marks a person as deleted. After 30 days, the person will be permanently deleted.
- * @summary Delete a person
- * @param {BetaApiDeletePersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
+ * @type {'id' | 'billing_date' | 'deal_id'}
+ * @memberof BetaApiGetInstallments
*/
- public deletePerson(requestParameters: BetaApiDeletePersonRequest, ) {
- return BetaApiFp(this.configuration).deletePerson(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly sort_by?: 'id' | 'billing_date' | 'deal_id'
/**
- * Returns data about all activities.
- * @summary Get all activities
- * @param {BetaApiGetActivitiesRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The sorting direction. Supported values: `asc`, `desc`.
+ * @type {'asc' | 'desc'}
+ * @memberof BetaApiGetInstallments
*/
- public getActivities(requestParameters: BetaApiGetActivitiesRequest = {}, ) {
- return BetaApiFp(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));
- }
+ readonly sort_direction?: 'asc' | 'desc'
+}
+/**
+ * Request parameters for postInstallment operation in BetaApi.
+ * @export
+ * @interface BetaApiPostInstallmentRequest
+ */
+export interface BetaApiPostInstallmentRequest {
/**
- * Returns the details of a specific activity.
- * @summary Get details of an activity
- * @param {BetaApiGetActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The ID of the deal
+ * @type {number}
+ * @memberof BetaApiPostInstallment
*/
- public getActivity(requestParameters: BetaApiGetActivityRequest, ) {
- return BetaApiFp(this.configuration).getActivity(requestParameters.id, requestParameters.include_fields, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly id: number
/**
- * Lists discounts attached to a deal.
- * @summary List discounts added to a deal
- * @param {BetaApiGetAdditionalDiscountsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ *
+ * @type {AddInstallmentRequestBody}
+ * @memberof BetaApiPostInstallment
*/
- public getAdditionalDiscounts(requestParameters: BetaApiGetAdditionalDiscountsRequest, ) {
- return BetaApiFp(this.configuration).getAdditionalDiscounts(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly AddInstallmentRequestBody?: AddInstallmentRequestBody
+}
+/**
+ * Request parameters for updateInstallment operation in BetaApi.
+ * @export
+ * @interface BetaApiUpdateInstallmentRequest
+ */
+export interface BetaApiUpdateInstallmentRequest {
/**
- * Returns the details of a specific deal.
- * @summary Get details of a deal
- * @param {BetaApiGetDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The ID of the deal
+ * @type {number}
+ * @memberof BetaApiUpdateInstallment
*/
- public getDeal(requestParameters: BetaApiGetDealRequest, ) {
- return BetaApiFp(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly id: number
/**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
- * @param {BetaApiGetDealProductsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ * The ID of the installment
+ * @type {number}
+ * @memberof BetaApiUpdateInstallment
*/
- public getDealProducts(requestParameters: BetaApiGetDealProductsRequest, ) {
- return BetaApiFp(this.configuration).getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).then((request) => request(this.axios, this.basePath));
- }
+ readonly installment_id: number
/**
- * Returns data about all deals.
- * @summary Get all deals
- * @param {BetaApiGetDealsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
+ *
+ * @type {UpdateInstallmentRequestBody}
+ * @memberof BetaApiUpdateInstallment
*/
- public getDeals(requestParameters: BetaApiGetDealsRequest = {}, ) {
- return BetaApiFp(this.configuration).getDeals(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));
- }
+ readonly UpdateInstallmentRequestBody?: UpdateInstallmentRequestBody
+}
+/**
+ * BetaApi - object-oriented interface
+ * @export
+ * @class BetaApi
+ * @extends {BaseAPI}
+ */
+export class BetaApi extends BaseAPI {
/**
- * Returns data about products attached to deals
- * @summary Get deal products of several deals
- * @param {BetaApiGetDealsProductsRequest} requestParameters Request parameters.
+ * Removes an installment from a deal. Only available in Advanced and above plans.
+ * @summary Delete an installment from a deal
+ * @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof BetaApi
*/
- public getDealsProducts(requestParameters: BetaApiGetDealsProductsRequest, ) {
- return BetaApiFp(this.configuration).getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction, ).then((request) => request(this.axios, this.basePath));
+ public deleteInstallment(requestParameters: BetaApiDeleteInstallmentRequest, ) {
+ return BetaApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id, ).then((request) => request(this.axios, this.basePath));
}
/**
@@ -4935,66 +501,6 @@ 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 the details of a specific organization.
- * @summary Get details of a organization
- * @param {BetaApiGetOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public getOrganization(requestParameters: BetaApiGetOrganizationRequest, ) {
- return BetaApiFp(this.configuration).getOrganization(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns data about all organizations.
- * @summary Get all organizations
- * @param {BetaApiGetOrganizationsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public getOrganizations(requestParameters: BetaApiGetOrganizationsRequest = {}, ) {
- return BetaApiFp(this.configuration).getOrganizations(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, 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 person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get details of a person
- * @param {BetaApiGetPersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public getPerson(requestParameters: BetaApiGetPersonRequest, ) {
- return BetaApiFp(this.configuration).getPerson(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
- * @summary Get all persons
- * @param {BetaApiGetPersonsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public getPersons(requestParameters: BetaApiGetPersonsRequest = {}, ) {
- return BetaApiFp(this.configuration).getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, 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));
- }
-
- /**
- * Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
- * @summary Add a discount to a deal
- * @param {BetaApiPostAdditionalDiscountRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public postAdditionalDiscount(requestParameters: BetaApiPostAdditionalDiscountRequest, ) {
- return BetaApiFp(this.configuration).postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody, ).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
@@ -5007,126 +513,6 @@ export class BetaApi extends BaseAPI {
return BetaApiFp(this.configuration).postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody, ).then((request) => request(this.axios, this.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 {BetaApiSearchDealsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public searchDeals(requestParameters: BetaApiSearchDealsRequest, ) {
- return BetaApiFp(this.configuration).searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Performs a search from your choice of item types and fields.
- * @summary Perform a search from multiple item types
- * @param {BetaApiSearchItemRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public searchItem(requestParameters: BetaApiSearchItemRequest, ) {
- return BetaApiFp(this.configuration).searchItem(requestParameters.term, requestParameters.item_types, requestParameters.fields, requestParameters.search_for_related_items, requestParameters.exact_match, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * 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 {BetaApiSearchItemByFieldRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public searchItemByField(requestParameters: BetaApiSearchItemByFieldRequest, ) {
- return BetaApiFp(this.configuration).searchItemByField(requestParameters.term, requestParameters.entity_type, requestParameters.field, requestParameters.match, requestParameters.limit, requestParameters.cursor, ).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
- * @param {BetaApiSearchLeadsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public searchLeads(requestParameters: BetaApiSearchLeadsRequest, ) {
- return BetaApiFp(this.configuration).searchLeads(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * 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 {BetaApiSearchOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public searchOrganization(requestParameters: BetaApiSearchOrganizationRequest, ) {
- return BetaApiFp(this.configuration).searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * 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 {BetaApiSearchPersonsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public searchPersons(requestParameters: BetaApiSearchPersonsRequest, ) {
- return BetaApiFp(this.configuration).searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of an activity.
- * @summary Update an activity
- * @param {BetaApiUpdateActivityRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public updateActivity(requestParameters: BetaApiUpdateActivityRequest, ) {
- return BetaApiFp(this.configuration).updateActivity(requestParameters.id, requestParameters.AddActivityRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
- * @summary Update a discount added to a deal
- * @param {BetaApiUpdateAdditionalDiscountRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public updateAdditionalDiscount(requestParameters: BetaApiUpdateAdditionalDiscountRequest, ) {
- return BetaApiFp(this.configuration).updateAdditionalDiscount(requestParameters.id, requestParameters.discount_id, requestParameters.UpdateAdditionalDiscountRequestBody, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of a deal.
- * @summary Update a deal
- * @param {BetaApiUpdateDealRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public updateDeal(requestParameters: BetaApiUpdateDealRequest, ) {
- return BetaApiFp(this.configuration).updateDeal(requestParameters.id, requestParameters.UpdateDealRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the details of the product that has been attached to a deal.
- * @summary Update the product attached to a deal
- * @param {BetaApiUpdateDealProductRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public updateDealProduct(requestParameters: BetaApiUpdateDealProductRequest, ) {
- return BetaApiFp(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Edits an installment added to a deal. Only available in Advanced and above plans.
* @summary Update an installment added to a deal
@@ -5138,28 +524,4 @@ export class BetaApi extends BaseAPI {
public updateInstallment(requestParameters: BetaApiUpdateInstallmentRequest, ) {
return BetaApiFp(this.configuration).updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody, ).then((request) => request(this.axios, this.basePath));
}
-
- /**
- * Updates the properties of a organization.
- * @summary Update a organization
- * @param {BetaApiUpdateOrganizationRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public updateOrganization(requestParameters: BetaApiUpdateOrganizationRequest, ) {
- return BetaApiFp(this.configuration).updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of a person.
- * @summary Update a person
- * @param {BetaApiUpdatePersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof BetaApi
- */
- public updatePerson(requestParameters: BetaApiUpdatePersonRequest, ) {
- return BetaApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v2/api/deals-api.ts b/src/versions/v2/api/deals-api.ts
index 891a5a84..8241ba63 100644
--- a/src/versions/v2/api/deals-api.ts
+++ b/src/versions/v2/api/deals-api.ts
@@ -28,12 +28,16 @@ import { AddAdditionalDiscountRequestBody } from '../models';
// @ts-ignore
import { AddAdditionalDiscountResponse } from '../models';
// @ts-ignore
+import { AddDealFollowerRequest } from '../models';
+// @ts-ignore
import { AddDealProductRequest } from '../models';
// @ts-ignore
import { AddDealProductResponse } from '../models';
// @ts-ignore
import { AddDealRequest } from '../models';
// @ts-ignore
+import { AddFollowerResponse } from '../models';
+// @ts-ignore
import { AddInstallmentRequestBody } from '../models';
// @ts-ignore
import { DeleteAdditionalDiscountResponse } from '../models';
@@ -42,6 +46,8 @@ import { DeleteDealProductResponse } from '../models';
// @ts-ignore
import { DeleteDealResponse } from '../models';
// @ts-ignore
+import { DeleteFollowerResponse } from '../models';
+// @ts-ignore
import { DeleteInstallmentResponse } from '../models';
// @ts-ignore
import { GetAdditionalDiscountsResponse } from '../models';
@@ -52,6 +58,10 @@ import { GetDealsProductsResponse } from '../models';
// @ts-ignore
import { GetDealsResponse } from '../models';
// @ts-ignore
+import { GetFollowerChangelogsResponse } from '../models';
+// @ts-ignore
+import { GetFollowersResponse } from '../models';
+// @ts-ignore
import { GetInstallmentsResponse } from '../models';
// @ts-ignore
import { UpdateAdditionalDiscountRequestBody } from '../models';
@@ -114,6 +124,51 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
options: localVarRequestOptions,
};
},
+ /**
+ * Adds a user as a follower to the deal.
+ * @summary Add a follower to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ addDealFollower: async (id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addDealFollower', 'id', id)
+ const localVarPath = `/deals/{id}/followers`
+ .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"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealFollowerRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
/**
* Adds a product to a deal, creating a new item called a deal-product.
* @summary Add a product to a deal
@@ -236,6 +291,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,
+ };
+ },
+ /**
+ * Deletes a user follower from the deal.
+ * @summary Delete a follower from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ deleteDealFollower: async (id: number, follower_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteDealFollower', 'id', id)
+ // verify required parameter 'follower_id' is not null or undefined
+ assertParamExists('deleteDealFollower', 'follower_id', follower_id)
+ const localVarPath = `/deals/{id}/followers/{follower_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_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: 'DELETE', ...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"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -418,6 +518,108 @@ 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,
+ };
+ },
+ /**
+ * Lists users who are following the deal.
+ * @summary List followers of a deal
+ * @param {number} id The ID of the deal
+ * @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}
+ */
+ getDealFollowers: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealFollowers', 'id', id)
+ const localVarPath = `/deals/{id}/followers`
+ .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: '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 (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, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists changelogs about users have followed the deal.
+ * @summary List followers changelog of a deal
+ * @param {number} id The ID of the deal
+ * @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}
+ */
+ getDealFollowersChangelog: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealFollowersChangelog', 'id', id)
+ const localVarPath = `/deals/{id}/followers/changelog`
+ .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: '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 (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, };
@@ -1121,6 +1323,18 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addDeal(AddDealRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Adds a user as a follower to the deal.
+ * @summary Add a follower to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ async addDealFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addDealFollower(id, AddDealFollowerRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Adds a product to a deal, creating a new item called a deal-product.
* @summary Add a product to a deal
@@ -1156,6 +1370,18 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDeal(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Deletes a user follower from the deal.
+ * @summary Delete a follower from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ async deleteDealFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealFollower(id, follower_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Deletes a product attachment from a deal, using the `product_attachment_id`.
* @summary Delete an attached product from a deal
@@ -1204,6 +1430,32 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, include_fields, custom_fields, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Lists users who are following the deal.
+ * @summary List followers of a deal
+ * @param {number} id The ID of the deal
+ * @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 getDealFollowers(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealFollowers(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists changelogs about users have followed the deal.
+ * @summary List followers changelog of a deal
+ * @param {number} id The ID of the deal
+ * @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 getDealFollowersChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealFollowersChangelog(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Lists products attached to a deal.
* @summary List products attached to a deal
@@ -1389,6 +1641,16 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
addDeal(requestParameters: DealsApiAddDealRequest = {}, ): Promise {
return localVarFp.addDeal(requestParameters.AddDealRequest, ).then((request) => request(axios, basePath));
},
+ /**
+ * Adds a user as a follower to the deal.
+ * @summary Add a follower to a deal
+ * @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addDealFollower(requestParameters: DealsApiAddDealFollowerRequest, ): Promise {
+ return localVarFp.addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(axios, basePath));
+ },
/**
* Adds a product to a deal, creating a new item called a deal-product.
* @summary Add a product to a deal
@@ -1419,6 +1681,16 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
deleteDeal(requestParameters: DealsApiDeleteDealRequest, ): Promise {
return localVarFp.deleteDeal(requestParameters.id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Deletes a user follower from the deal.
+ * @summary Delete a follower from a deal
+ * @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDealFollower(requestParameters: DealsApiDeleteDealFollowerRequest, ): Promise {
+ return localVarFp.deleteDealFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
+ },
/**
* Deletes a product attachment from a deal, using the `product_attachment_id`.
* @summary Delete an attached product from a deal
@@ -1459,6 +1731,26 @@ 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));
},
+ /**
+ * Lists users who are following the deal.
+ * @summary List followers of a deal
+ * @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealFollowers(requestParameters: DealsApiGetDealFollowersRequest, ): Promise {
+ return localVarFp.getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists changelogs about users have followed the deal.
+ * @summary List followers changelog of a deal
+ * @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealFollowersChangelog(requestParameters: DealsApiGetDealFollowersChangelogRequest, ): Promise {
+ return localVarFp.getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
/**
* Lists products attached to a deal.
* @summary List products attached to a deal
@@ -1586,6 +1878,27 @@ export interface DealsApiAddDealRequest {
readonly AddDealRequest?: AddDealRequest
}
+/**
+ * Request parameters for addDealFollower operation in DealsApi.
+ * @export
+ * @interface DealsApiAddDealFollowerRequest
+ */
+export interface DealsApiAddDealFollowerRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiAddDealFollower
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealFollowerRequest}
+ * @memberof DealsApiAddDealFollower
+ */
+ readonly AddDealFollowerRequest?: AddDealFollowerRequest
+}
+
/**
* Request parameters for addDealProduct operation in DealsApi.
* @export
@@ -1642,6 +1955,27 @@ export interface DealsApiDeleteDealRequest {
readonly id: number
}
+/**
+ * Request parameters for deleteDealFollower operation in DealsApi.
+ * @export
+ * @interface DealsApiDeleteDealFollowerRequest
+ */
+export interface DealsApiDeleteDealFollowerRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiDeleteDealFollower
+ */
+ readonly id: number
+
+ /**
+ * The ID of the following user
+ * @type {number}
+ * @memberof DealsApiDeleteDealFollower
+ */
+ readonly follower_id: number
+}
+
/**
* Request parameters for deleteDealProduct operation in DealsApi.
* @export
@@ -1726,6 +2060,62 @@ export interface DealsApiGetDealRequest {
readonly custom_fields?: string
}
+/**
+ * Request parameters for getDealFollowers operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealFollowersRequest
+ */
+export interface DealsApiGetDealFollowersRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealFollowers
+ */
+ readonly id: number
+
+ /**
+ * 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 DealsApiGetDealFollowers
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof DealsApiGetDealFollowers
+ */
+ readonly cursor?: string
+}
+
+/**
+ * Request parameters for getDealFollowersChangelog operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealFollowersChangelogRequest
+ */
+export interface DealsApiGetDealFollowersChangelogRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealFollowersChangelog
+ */
+ readonly id: number
+
+ /**
+ * 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 DealsApiGetDealFollowersChangelog
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof DealsApiGetDealFollowersChangelog
+ */
+ readonly cursor?: string
+}
+
/**
* Request parameters for getDealProducts operation in DealsApi.
* @export
@@ -2207,6 +2597,18 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).addDeal(requestParameters.AddDealRequest, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Adds a user as a follower to the deal.
+ * @summary Add a follower to a deal
+ * @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public addDealFollower(requestParameters: DealsApiAddDealFollowerRequest, ) {
+ return DealsApiFp(this.configuration).addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Adds a product to a deal, creating a new item called a deal-product.
* @summary Add a product to a deal
@@ -2243,6 +2645,18 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).deleteDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Deletes a user follower from the deal.
+ * @summary Delete a follower from a deal
+ * @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public deleteDealFollower(requestParameters: DealsApiDeleteDealFollowerRequest, ) {
+ return DealsApiFp(this.configuration).deleteDealFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Deletes a product attachment from a deal, using the `product_attachment_id`.
* @summary Delete an attached product from a deal
@@ -2291,6 +2705,30 @@ 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));
}
+ /**
+ * Lists users who are following the deal.
+ * @summary List followers of a deal
+ * @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealFollowers(requestParameters: DealsApiGetDealFollowersRequest, ) {
+ return DealsApiFp(this.configuration).getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists changelogs about users have followed the deal.
+ * @summary List followers changelog of a deal
+ * @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealFollowersChangelog(requestParameters: DealsApiGetDealFollowersChangelogRequest, ) {
+ return DealsApiFp(this.configuration).getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Lists products attached to a deal.
* @summary List products attached to a deal
diff --git a/src/versions/v2/api/organizations-api.ts b/src/versions/v2/api/organizations-api.ts
index 10045267..81f4a0d3 100644
--- a/src/versions/v2/api/organizations-api.ts
+++ b/src/versions/v2/api/organizations-api.ts
@@ -22,10 +22,20 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
+import { AddDealFollowerRequest } from '../models';
+// @ts-ignore
+import { AddFollowerResponse } from '../models';
+// @ts-ignore
import { AddOrganizationRequest } from '../models';
// @ts-ignore
+import { DeleteFollowerResponse } from '../models';
+// @ts-ignore
import { DeleteOrganizationResponse } from '../models';
// @ts-ignore
+import { GetFollowerChangelogsResponse } from '../models';
+// @ts-ignore
+import { GetFollowersResponse } from '../models';
+// @ts-ignore
import { GetOrganizationSearchResponse } from '../models';
// @ts-ignore
import { GetOrganizationsResponse } from '../models';
@@ -80,6 +90,51 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
options: localVarRequestOptions,
};
},
+ /**
+ * Adds a user as a follower to the organization.
+ * @summary Add a follower to an organization
+ * @param {number} id The ID of the organization
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ addOrganizationFollower: async (id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addOrganizationFollower', 'id', id)
+ const localVarPath = `/organizations/{id}/followers`
+ .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", ["contacts:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealFollowerRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
/**
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
* @summary Delete a organization
@@ -112,6 +167,51 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a user follower from the organization.
+ * @summary Delete a follower from an organization
+ * @param {number} id The ID of the organization
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ deleteOrganizationFollower: async (id: number, follower_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteOrganizationFollower', 'id', id)
+ // verify required parameter 'follower_id' is not null or undefined
+ assertParamExists('deleteOrganizationFollower', 'follower_id', follower_id)
+ const localVarPath = `/organizations/{id}/followers/{follower_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_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: 'DELETE', ...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", ["contacts:full"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -163,6 +263,108 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists users who are following the organization.
+ * @summary List followers of an organization
+ * @param {number} id The ID of the organization
+ * @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}
+ */
+ getOrganizationFollowers: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getOrganizationFollowers', 'id', id)
+ const localVarPath = `/organizations/{id}/followers`
+ .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: '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", ["contacts:read", "contacts:full"], configuration)
+
+ 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, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists changelogs about users have followed the organization.
+ * @summary List followers changelog of an organization
+ * @param {number} id The ID of the organization
+ * @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}
+ */
+ getOrganizationFollowersChangelog: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getOrganizationFollowersChangelog', 'id', id)
+ const localVarPath = `/organizations/{id}/followers/changelog`
+ .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: '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", ["contacts:read", "contacts:full"], configuration)
+
+ 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, };
@@ -395,6 +597,18 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganization(AddOrganizationRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Adds a user as a follower to the organization.
+ * @summary Add a follower to an organization
+ * @param {number} id The ID of the organization
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ async addOrganizationFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganizationFollower(id, AddDealFollowerRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
* @summary Delete a organization
@@ -406,6 +620,18 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganization(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Deletes a user follower from the organization.
+ * @summary Delete a follower from an organization
+ * @param {number} id The ID of the organization
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ async deleteOrganizationFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationFollower(id, follower_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns the details of a specific organization.
* @summary Get details of a organization
@@ -419,6 +645,32 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(id, include_fields, custom_fields, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Lists users who are following the organization.
+ * @summary List followers of an organization
+ * @param {number} id The ID of the organization
+ * @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 getOrganizationFollowers(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationFollowers(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists changelogs about users have followed the organization.
+ * @summary List followers changelog of an organization
+ * @param {number} id The ID of the organization
+ * @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 getOrganizationFollowersChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationFollowersChangelog(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns data about all organizations.
* @summary Get all organizations
@@ -487,6 +739,16 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
addOrganization(requestParameters: OrganizationsApiAddOrganizationRequest = {}, ): Promise {
return localVarFp.addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(axios, basePath));
},
+ /**
+ * Adds a user as a follower to the organization.
+ * @summary Add a follower to an organization
+ * @param {OrganizationsApiAddOrganizationFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addOrganizationFollower(requestParameters: OrganizationsApiAddOrganizationFollowerRequest, ): Promise {
+ return localVarFp.addOrganizationFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(axios, basePath));
+ },
/**
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
* @summary Delete a organization
@@ -497,6 +759,16 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
deleteOrganization(requestParameters: OrganizationsApiDeleteOrganizationRequest, ): Promise {
return localVarFp.deleteOrganization(requestParameters.id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Deletes a user follower from the organization.
+ * @summary Delete a follower from an organization
+ * @param {OrganizationsApiDeleteOrganizationFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteOrganizationFollower(requestParameters: OrganizationsApiDeleteOrganizationFollowerRequest, ): Promise {
+ return localVarFp.deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
+ },
/**
* Returns the details of a specific organization.
* @summary Get details of a organization
@@ -507,6 +779,26 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, ): Promise {
return localVarFp.getOrganization(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
},
+ /**
+ * Lists users who are following the organization.
+ * @summary List followers of an organization
+ * @param {OrganizationsApiGetOrganizationFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getOrganizationFollowers(requestParameters: OrganizationsApiGetOrganizationFollowersRequest, ): Promise {
+ return localVarFp.getOrganizationFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists changelogs about users have followed the organization.
+ * @summary List followers changelog of an organization
+ * @param {OrganizationsApiGetOrganizationFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getOrganizationFollowersChangelog(requestParameters: OrganizationsApiGetOrganizationFollowersChangelogRequest, ): Promise {
+ return localVarFp.getOrganizationFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
/**
* Returns data about all organizations.
* @summary Get all organizations
@@ -554,6 +846,27 @@ export interface OrganizationsApiAddOrganizationRequest {
readonly AddOrganizationRequest?: AddOrganizationRequest
}
+/**
+ * Request parameters for addOrganizationFollower operation in OrganizationsApi.
+ * @export
+ * @interface OrganizationsApiAddOrganizationFollowerRequest
+ */
+export interface OrganizationsApiAddOrganizationFollowerRequest {
+ /**
+ * The ID of the organization
+ * @type {number}
+ * @memberof OrganizationsApiAddOrganizationFollower
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealFollowerRequest}
+ * @memberof OrganizationsApiAddOrganizationFollower
+ */
+ readonly AddDealFollowerRequest?: AddDealFollowerRequest
+}
+
/**
* Request parameters for deleteOrganization operation in OrganizationsApi.
* @export
@@ -568,6 +881,27 @@ export interface OrganizationsApiDeleteOrganizationRequest {
readonly id: number
}
+/**
+ * Request parameters for deleteOrganizationFollower operation in OrganizationsApi.
+ * @export
+ * @interface OrganizationsApiDeleteOrganizationFollowerRequest
+ */
+export interface OrganizationsApiDeleteOrganizationFollowerRequest {
+ /**
+ * The ID of the organization
+ * @type {number}
+ * @memberof OrganizationsApiDeleteOrganizationFollower
+ */
+ readonly id: number
+
+ /**
+ * The ID of the following user
+ * @type {number}
+ * @memberof OrganizationsApiDeleteOrganizationFollower
+ */
+ readonly follower_id: number
+}
+
/**
* Request parameters for getOrganization operation in OrganizationsApi.
* @export
@@ -596,6 +930,62 @@ export interface OrganizationsApiGetOrganizationRequest {
readonly custom_fields?: string
}
+/**
+ * Request parameters for getOrganizationFollowers operation in OrganizationsApi.
+ * @export
+ * @interface OrganizationsApiGetOrganizationFollowersRequest
+ */
+export interface OrganizationsApiGetOrganizationFollowersRequest {
+ /**
+ * The ID of the organization
+ * @type {number}
+ * @memberof OrganizationsApiGetOrganizationFollowers
+ */
+ readonly id: number
+
+ /**
+ * 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 OrganizationsApiGetOrganizationFollowers
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof OrganizationsApiGetOrganizationFollowers
+ */
+ readonly cursor?: string
+}
+
+/**
+ * Request parameters for getOrganizationFollowersChangelog operation in OrganizationsApi.
+ * @export
+ * @interface OrganizationsApiGetOrganizationFollowersChangelogRequest
+ */
+export interface OrganizationsApiGetOrganizationFollowersChangelogRequest {
+ /**
+ * The ID of the organization
+ * @type {number}
+ * @memberof OrganizationsApiGetOrganizationFollowersChangelog
+ */
+ readonly id: number
+
+ /**
+ * 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 OrganizationsApiGetOrganizationFollowersChangelog
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof OrganizationsApiGetOrganizationFollowersChangelog
+ */
+ readonly cursor?: string
+}
+
/**
* Request parameters for getOrganizations operation in OrganizationsApi.
* @export
@@ -762,6 +1152,18 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Adds a user as a follower to the organization.
+ * @summary Add a follower to an organization
+ * @param {OrganizationsApiAddOrganizationFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof OrganizationsApi
+ */
+ public addOrganizationFollower(requestParameters: OrganizationsApiAddOrganizationFollowerRequest, ) {
+ return OrganizationsApiFp(this.configuration).addOrganizationFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
* @summary Delete a organization
@@ -774,6 +1176,18 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).deleteOrganization(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Deletes a user follower from the organization.
+ * @summary Delete a follower from an organization
+ * @param {OrganizationsApiDeleteOrganizationFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof OrganizationsApi
+ */
+ public deleteOrganizationFollower(requestParameters: OrganizationsApiDeleteOrganizationFollowerRequest, ) {
+ return OrganizationsApiFp(this.configuration).deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns the details of a specific organization.
* @summary Get details of a organization
@@ -786,6 +1200,30 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).getOrganization(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Lists users who are following the organization.
+ * @summary List followers of an organization
+ * @param {OrganizationsApiGetOrganizationFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof OrganizationsApi
+ */
+ public getOrganizationFollowers(requestParameters: OrganizationsApiGetOrganizationFollowersRequest, ) {
+ return OrganizationsApiFp(this.configuration).getOrganizationFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists changelogs about users have followed the organization.
+ * @summary List followers changelog of an organization
+ * @param {OrganizationsApiGetOrganizationFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof OrganizationsApi
+ */
+ public getOrganizationFollowersChangelog(requestParameters: OrganizationsApiGetOrganizationFollowersChangelogRequest, ) {
+ return OrganizationsApiFp(this.configuration).getOrganizationFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns data about all organizations.
* @summary Get all organizations
diff --git a/src/versions/v2/api/persons-api.ts b/src/versions/v2/api/persons-api.ts
index ffb68361..f42d8647 100644
--- a/src/versions/v2/api/persons-api.ts
+++ b/src/versions/v2/api/persons-api.ts
@@ -22,10 +22,20 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
+import { AddDealFollowerRequest } from '../models';
+// @ts-ignore
+import { AddFollowerResponse } from '../models';
+// @ts-ignore
import { AddPersonRequest } from '../models';
// @ts-ignore
+import { DeleteFollowerResponse } from '../models';
+// @ts-ignore
import { DeletePersonResponse } from '../models';
// @ts-ignore
+import { GetFollowerChangelogsResponse } from '../models';
+// @ts-ignore
+import { GetFollowersResponse } from '../models';
+// @ts-ignore
import { GetPersonSearchResponse } from '../models';
// @ts-ignore
import { GetPersonsResponse } from '../models';
@@ -80,6 +90,51 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
options: localVarRequestOptions,
};
},
+ /**
+ * Adds a user as a follower to the person.
+ * @summary Add a follower to a person
+ * @param {number} id The ID of the person
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ addPersonFollower: async (id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addPersonFollower', 'id', id)
+ const localVarPath = `/persons/{id}/followers`
+ .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", ["contacts:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealFollowerRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
/**
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
* @summary Delete a person
@@ -112,6 +167,51 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a user follower from the person.
+ * @summary Delete a follower from a person
+ * @param {number} id The ID of the person
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ deletePersonFollower: async (id: number, follower_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deletePersonFollower', 'id', id)
+ // verify required parameter 'follower_id' is not null or undefined
+ assertParamExists('deletePersonFollower', 'follower_id', follower_id)
+ const localVarPath = `/persons/{id}/followers/{follower_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_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: 'DELETE', ...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", ["contacts:full"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -163,6 +263,108 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists users who are following the person.
+ * @summary List followers of a person
+ * @param {number} id The ID of the person
+ * @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}
+ */
+ getPersonFollowers: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getPersonFollowers', 'id', id)
+ const localVarPath = `/persons/{id}/followers`
+ .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: '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", ["contacts:read", "contacts:full"], configuration)
+
+ 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, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists changelogs about users have followed the person.
+ * @summary List followers changelog of a person
+ * @param {number} id The ID of the person
+ * @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}
+ */
+ getPersonFollowersChangelog: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getPersonFollowersChangelog', 'id', id)
+ const localVarPath = `/persons/{id}/followers/changelog`
+ .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: '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", ["contacts:read", "contacts:full"], configuration)
+
+ 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, };
@@ -410,6 +612,18 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addPerson(AddPersonRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Adds a user as a follower to the person.
+ * @summary Add a follower to a person
+ * @param {number} id The ID of the person
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ async addPersonFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addPersonFollower(id, AddDealFollowerRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
* @summary Delete a person
@@ -421,6 +635,18 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePerson(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Deletes a user follower from the person.
+ * @summary Delete a follower from a person
+ * @param {number} id The ID of the person
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ async deletePersonFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonFollower(id, follower_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get details of a person
@@ -434,6 +660,32 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPerson(id, include_fields, custom_fields, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Lists users who are following the person.
+ * @summary List followers of a person
+ * @param {number} id The ID of the person
+ * @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 getPersonFollowers(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFollowers(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists changelogs about users have followed the person.
+ * @summary List followers changelog of a person
+ * @param {number} id The ID of the person
+ * @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 getPersonFollowersChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFollowersChangelog(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get all persons
@@ -505,6 +757,16 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
addPerson(requestParameters: PersonsApiAddPersonRequest = {}, ): Promise {
return localVarFp.addPerson(requestParameters.AddPersonRequest, ).then((request) => request(axios, basePath));
},
+ /**
+ * Adds a user as a follower to the person.
+ * @summary Add a follower to a person
+ * @param {PersonsApiAddPersonFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addPersonFollower(requestParameters: PersonsApiAddPersonFollowerRequest, ): Promise {
+ return localVarFp.addPersonFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(axios, basePath));
+ },
/**
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
* @summary Delete a person
@@ -515,6 +777,16 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
deletePerson(requestParameters: PersonsApiDeletePersonRequest, ): Promise {
return localVarFp.deletePerson(requestParameters.id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Deletes a user follower from the person.
+ * @summary Delete a follower from a person
+ * @param {PersonsApiDeletePersonFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deletePersonFollower(requestParameters: PersonsApiDeletePersonFollowerRequest, ): Promise {
+ return localVarFp.deletePersonFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
+ },
/**
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get details of a person
@@ -525,6 +797,26 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
getPerson(requestParameters: PersonsApiGetPersonRequest, ): Promise {
return localVarFp.getPerson(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(axios, basePath));
},
+ /**
+ * Lists users who are following the person.
+ * @summary List followers of a person
+ * @param {PersonsApiGetPersonFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getPersonFollowers(requestParameters: PersonsApiGetPersonFollowersRequest, ): Promise {
+ return localVarFp.getPersonFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists changelogs about users have followed the person.
+ * @summary List followers changelog of a person
+ * @param {PersonsApiGetPersonFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getPersonFollowersChangelog(requestParameters: PersonsApiGetPersonFollowersChangelogRequest, ): Promise {
+ return localVarFp.getPersonFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
/**
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get all persons
@@ -572,6 +864,27 @@ export interface PersonsApiAddPersonRequest {
readonly AddPersonRequest?: AddPersonRequest
}
+/**
+ * Request parameters for addPersonFollower operation in PersonsApi.
+ * @export
+ * @interface PersonsApiAddPersonFollowerRequest
+ */
+export interface PersonsApiAddPersonFollowerRequest {
+ /**
+ * The ID of the person
+ * @type {number}
+ * @memberof PersonsApiAddPersonFollower
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealFollowerRequest}
+ * @memberof PersonsApiAddPersonFollower
+ */
+ readonly AddDealFollowerRequest?: AddDealFollowerRequest
+}
+
/**
* Request parameters for deletePerson operation in PersonsApi.
* @export
@@ -586,6 +899,27 @@ export interface PersonsApiDeletePersonRequest {
readonly id: number
}
+/**
+ * Request parameters for deletePersonFollower operation in PersonsApi.
+ * @export
+ * @interface PersonsApiDeletePersonFollowerRequest
+ */
+export interface PersonsApiDeletePersonFollowerRequest {
+ /**
+ * The ID of the person
+ * @type {number}
+ * @memberof PersonsApiDeletePersonFollower
+ */
+ readonly id: number
+
+ /**
+ * The ID of the following user
+ * @type {number}
+ * @memberof PersonsApiDeletePersonFollower
+ */
+ readonly follower_id: number
+}
+
/**
* Request parameters for getPerson operation in PersonsApi.
* @export
@@ -614,6 +948,62 @@ export interface PersonsApiGetPersonRequest {
readonly custom_fields?: string
}
+/**
+ * Request parameters for getPersonFollowers operation in PersonsApi.
+ * @export
+ * @interface PersonsApiGetPersonFollowersRequest
+ */
+export interface PersonsApiGetPersonFollowersRequest {
+ /**
+ * The ID of the person
+ * @type {number}
+ * @memberof PersonsApiGetPersonFollowers
+ */
+ readonly id: number
+
+ /**
+ * 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 PersonsApiGetPersonFollowers
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof PersonsApiGetPersonFollowers
+ */
+ readonly cursor?: string
+}
+
+/**
+ * Request parameters for getPersonFollowersChangelog operation in PersonsApi.
+ * @export
+ * @interface PersonsApiGetPersonFollowersChangelogRequest
+ */
+export interface PersonsApiGetPersonFollowersChangelogRequest {
+ /**
+ * The ID of the person
+ * @type {number}
+ * @memberof PersonsApiGetPersonFollowersChangelog
+ */
+ readonly id: number
+
+ /**
+ * 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 PersonsApiGetPersonFollowersChangelog
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof PersonsApiGetPersonFollowersChangelog
+ */
+ readonly cursor?: string
+}
+
/**
* Request parameters for getPersons operation in PersonsApi.
* @export
@@ -801,6 +1191,18 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).addPerson(requestParameters.AddPersonRequest, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Adds a user as a follower to the person.
+ * @summary Add a follower to a person
+ * @param {PersonsApiAddPersonFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof PersonsApi
+ */
+ public addPersonFollower(requestParameters: PersonsApiAddPersonFollowerRequest, ) {
+ return PersonsApiFp(this.configuration).addPersonFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
* @summary Delete a person
@@ -813,6 +1215,18 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).deletePerson(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Deletes a user follower from the person.
+ * @summary Delete a follower from a person
+ * @param {PersonsApiDeletePersonFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof PersonsApi
+ */
+ public deletePersonFollower(requestParameters: PersonsApiDeletePersonFollowerRequest, ) {
+ return PersonsApiFp(this.configuration).deletePersonFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get details of a person
@@ -825,6 +1239,30 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).getPerson(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Lists users who are following the person.
+ * @summary List followers of a person
+ * @param {PersonsApiGetPersonFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof PersonsApi
+ */
+ public getPersonFollowers(requestParameters: PersonsApiGetPersonFollowersRequest, ) {
+ return PersonsApiFp(this.configuration).getPersonFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists changelogs about users have followed the person.
+ * @summary List followers changelog of a person
+ * @param {PersonsApiGetPersonFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof PersonsApi
+ */
+ public getPersonFollowersChangelog(requestParameters: PersonsApiGetPersonFollowersChangelogRequest, ) {
+ return PersonsApiFp(this.configuration).getPersonFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get all persons
diff --git a/src/versions/v2/api/products-api.ts b/src/versions/v2/api/products-api.ts
index 75cfd025..6077e715 100644
--- a/src/versions/v2/api/products-api.ts
+++ b/src/versions/v2/api/products-api.ts
@@ -22,14 +22,24 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
+import { AddDealFollowerRequest } from '../models';
+// @ts-ignore
+import { AddFollowerResponse } from '../models';
+// @ts-ignore
import { AddProductRequest } from '../models';
// @ts-ignore
import { AddProductVariationRequest } from '../models';
// @ts-ignore
+import { DeleteFollowerResponse } from '../models';
+// @ts-ignore
import { DeleteProductResponse } from '../models';
// @ts-ignore
import { DeleteProductVariationResponse } from '../models';
// @ts-ignore
+import { GetFollowerChangelogsResponse } from '../models';
+// @ts-ignore
+import { GetFollowersResponse } from '../models';
+// @ts-ignore
import { GetProductResponse } from '../models';
// @ts-ignore
import { GetProductSearchResponse } from '../models';
@@ -92,6 +102,51 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
options: localVarRequestOptions,
};
},
+ /**
+ * Adds a user as a follower to the product.
+ * @summary Add a follower to a product
+ * @param {number} id The ID of the product
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ addProductFollower: async (id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addProductFollower', 'id', id)
+ const localVarPath = `/products/{id}/followers`
+ .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", [], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealFollowerRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
/**
* Adds a new product variation.
* @summary Add a product variation
@@ -169,6 +224,51 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a user follower from the product.
+ * @summary Delete a follower from a product
+ * @param {number} id The ID of the product
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ deleteProductFollower: async (id: number, follower_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteProductFollower', 'id', id)
+ // verify required parameter 'follower_id' is not null or undefined
+ assertParamExists('deleteProductFollower', 'follower_id', follower_id)
+ const localVarPath = `/products/{id}/followers/{follower_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_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: 'DELETE', ...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", ["products:full"], configuration)
+
+
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -255,6 +355,108 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists users who are following the product.
+ * @summary List followers of a product
+ * @param {number} id The ID of the product
+ * @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}
+ */
+ getProductFollowers: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getProductFollowers', 'id', id)
+ const localVarPath = `/products/{id}/followers`
+ .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: '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", ["products:read", "products:full"], configuration)
+
+ 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, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists changelogs about users have followed the product.
+ * @summary List followers changelog of a product
+ * @param {number} id The ID of the product
+ * @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}
+ */
+ getProductFollowersChangelog: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getProductFollowersChangelog', 'id', id)
+ const localVarPath = `/products/{id}/followers/changelog`
+ .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: '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", ["products:read", "products:full"], configuration)
+
+ 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, };
@@ -577,6 +779,18 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addProduct(AddProductRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Adds a user as a follower to the product.
+ * @summary Add a follower to a product
+ * @param {number} id The ID of the product
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ async addProductFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addProductFollower(id, AddDealFollowerRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Adds a new product variation.
* @summary Add a product variation
@@ -600,6 +814,18 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProduct(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Deletes a user follower from the product.
+ * @summary Delete a follower from a product
+ * @param {number} id The ID of the product
+ * @param {number} follower_id The ID of the following user
+
+ * @throws {RequiredError}
+ */
+ async deleteProductFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductFollower(id, follower_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Deletes a product variation.
* @summary Delete a product variation
@@ -623,6 +849,32 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getProduct(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
+ /**
+ * Lists users who are following the product.
+ * @summary List followers of a product
+ * @param {number} id The ID of the product
+ * @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 getProductFollowers(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFollowers(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists changelogs about users have followed the product.
+ * @summary List followers changelog of a product
+ * @param {number} id The ID of the product
+ * @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 getProductFollowersChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFollowersChangelog(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
/**
* Returns data about all product variations.
* @summary Get all product variations
@@ -715,6 +967,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
addProduct(requestParameters: ProductsApiAddProductRequest = {}, ): Promise {
return localVarFp.addProduct(requestParameters.AddProductRequest, ).then((request) => request(axios, basePath));
},
+ /**
+ * Adds a user as a follower to the product.
+ * @summary Add a follower to a product
+ * @param {ProductsApiAddProductFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest, ): Promise {
+ return localVarFp.addProductFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(axios, basePath));
+ },
/**
* Adds a new product variation.
* @summary Add a product variation
@@ -735,6 +997,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
deleteProduct(requestParameters: ProductsApiDeleteProductRequest, ): Promise {
return localVarFp.deleteProduct(requestParameters.id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Deletes a user follower from the product.
+ * @summary Delete a follower from a product
+ * @param {ProductsApiDeleteProductFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest, ): Promise {
+ return localVarFp.deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
+ },
/**
* Deletes a product variation.
* @summary Delete a product variation
@@ -755,6 +1027,26 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
getProduct(requestParameters: ProductsApiGetProductRequest, ): Promise {
return localVarFp.getProduct(requestParameters.id, ).then((request) => request(axios, basePath));
},
+ /**
+ * Lists users who are following the product.
+ * @summary List followers of a product
+ * @param {ProductsApiGetProductFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getProductFollowers(requestParameters: ProductsApiGetProductFollowersRequest, ): Promise {
+ return localVarFp.getProductFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists changelogs about users have followed the product.
+ * @summary List followers changelog of a product
+ * @param {ProductsApiGetProductFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getProductFollowersChangelog(requestParameters: ProductsApiGetProductFollowersChangelogRequest, ): Promise {
+ return localVarFp.getProductFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
/**
* Returns data about all product variations.
* @summary Get all product variations
@@ -822,6 +1114,27 @@ export interface ProductsApiAddProductRequest {
readonly AddProductRequest?: AddProductRequest
}
+/**
+ * Request parameters for addProductFollower operation in ProductsApi.
+ * @export
+ * @interface ProductsApiAddProductFollowerRequest
+ */
+export interface ProductsApiAddProductFollowerRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiAddProductFollower
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealFollowerRequest}
+ * @memberof ProductsApiAddProductFollower
+ */
+ readonly AddDealFollowerRequest?: AddDealFollowerRequest
+}
+
/**
* Request parameters for addProductVariation operation in ProductsApi.
* @export
@@ -857,6 +1170,27 @@ export interface ProductsApiDeleteProductRequest {
readonly id: number
}
+/**
+ * Request parameters for deleteProductFollower operation in ProductsApi.
+ * @export
+ * @interface ProductsApiDeleteProductFollowerRequest
+ */
+export interface ProductsApiDeleteProductFollowerRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiDeleteProductFollower
+ */
+ readonly id: number
+
+ /**
+ * The ID of the following user
+ * @type {number}
+ * @memberof ProductsApiDeleteProductFollower
+ */
+ readonly follower_id: number
+}
+
/**
* Request parameters for deleteProductVariation operation in ProductsApi.
* @export
@@ -892,6 +1226,62 @@ export interface ProductsApiGetProductRequest {
readonly id: number
}
+/**
+ * Request parameters for getProductFollowers operation in ProductsApi.
+ * @export
+ * @interface ProductsApiGetProductFollowersRequest
+ */
+export interface ProductsApiGetProductFollowersRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiGetProductFollowers
+ */
+ readonly id: number
+
+ /**
+ * 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 ProductsApiGetProductFollowers
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof ProductsApiGetProductFollowers
+ */
+ readonly cursor?: string
+}
+
+/**
+ * Request parameters for getProductFollowersChangelog operation in ProductsApi.
+ * @export
+ * @interface ProductsApiGetProductFollowersChangelogRequest
+ */
+export interface ProductsApiGetProductFollowersChangelogRequest {
+ /**
+ * The ID of the product
+ * @type {number}
+ * @memberof ProductsApiGetProductFollowersChangelog
+ */
+ readonly id: number
+
+ /**
+ * 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 ProductsApiGetProductFollowersChangelog
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof ProductsApiGetProductFollowersChangelog
+ */
+ readonly cursor?: string
+}
+
/**
* Request parameters for getProductVariations operation in ProductsApi.
* @export
@@ -1100,6 +1490,18 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).addProduct(requestParameters.AddProductRequest, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Adds a user as a follower to the product.
+ * @summary Add a follower to a product
+ * @param {ProductsApiAddProductFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest, ) {
+ return ProductsApiFp(this.configuration).addProductFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Adds a new product variation.
* @summary Add a product variation
@@ -1124,6 +1526,18 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).deleteProduct(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Deletes a user follower from the product.
+ * @summary Delete a follower from a product
+ * @param {ProductsApiDeleteProductFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest, ) {
+ return ProductsApiFp(this.configuration).deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Deletes a product variation.
* @summary Delete a product variation
@@ -1148,6 +1562,30 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).getProduct(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
+ /**
+ * Lists users who are following the product.
+ * @summary List followers of a product
+ * @param {ProductsApiGetProductFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public getProductFollowers(requestParameters: ProductsApiGetProductFollowersRequest, ) {
+ return ProductsApiFp(this.configuration).getProductFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists changelogs about users have followed the product.
+ * @summary List followers changelog of a product
+ * @param {ProductsApiGetProductFollowersChangelogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ProductsApi
+ */
+ public getProductFollowersChangelog(requestParameters: ProductsApiGetProductFollowersChangelogRequest, ) {
+ return ProductsApiFp(this.configuration).getProductFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+
/**
* Returns data about all product variations.
* @summary Get all product variations
diff --git a/src/versions/v2/api/users-api.ts b/src/versions/v2/api/users-api.ts
new file mode 100644
index 00000000..df7ae26d
--- /dev/null
+++ b/src/versions/v2/api/users-api.ts
@@ -0,0 +1,176 @@
+/* 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.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { GetFollowersResponse } from '../models';
+/**
+ * UsersApi - axios parameter creator
+ * @export
+ */
+export const UsersApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Lists users who are following the user.
+ * @summary List followers of a user
+ * @param {number} id The ID of the user
+ * @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}
+ */
+ getUserFollowers: async (id: number, limit?: number, cursor?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getUserFollowers', 'id', id)
+ const localVarPath = `/users/{id}/followers`
+ .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: '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", ["users:read"], configuration)
+
+ 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, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+
+/**
+ * UsersApi - functional programming interface
+ * @export
+ */
+export const UsersApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Lists users who are following the user.
+ * @summary List followers of a user
+ * @param {number} id The ID of the user
+ * @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 getUserFollowers(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUserFollowers(id, limit, cursor, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * UsersApi - factory interface
+ * @export
+ */
+export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = UsersApiFp(configuration)
+ return {
+ /**
+ * Lists users who are following the user.
+ * @summary List followers of a user
+ * @param {UsersApiGetUserFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getUserFollowers(requestParameters: UsersApiGetUserFollowersRequest, ): Promise {
+ return localVarFp.getUserFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for getUserFollowers operation in UsersApi.
+ * @export
+ * @interface UsersApiGetUserFollowersRequest
+ */
+export interface UsersApiGetUserFollowersRequest {
+ /**
+ * The ID of the user
+ * @type {number}
+ * @memberof UsersApiGetUserFollowers
+ */
+ readonly id: number
+
+ /**
+ * 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 UsersApiGetUserFollowers
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof UsersApiGetUserFollowers
+ */
+ readonly cursor?: string
+}
+
+/**
+ * UsersApi - object-oriented interface
+ * @export
+ * @class UsersApi
+ * @extends {BaseAPI}
+ */
+export class UsersApi extends BaseAPI {
+ /**
+ * Lists users who are following the user.
+ * @summary List followers of a user
+ * @param {UsersApiGetUserFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof UsersApi
+ */
+ public getUserFollowers(requestParameters: UsersApiGetUserFollowersRequest, ) {
+ return UsersApiFp(this.configuration).getUserFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/src/versions/v2/models/add-deal-follower-request.ts b/src/versions/v2/models/add-deal-follower-request.ts
new file mode 100644
index 00000000..934a5860
--- /dev/null
+++ b/src/versions/v2/models/add-deal-follower-request.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.
+ */
+
+
+
+/**
+*
+* @export
+* @interface AddDealFollowerRequest
+*/
+export interface AddDealFollowerRequest {
+ /**
+ * The ID of the user to add as a follower
+ * @type {number}
+ */
+ 'user_id': number;
+}
+
diff --git a/src/versions/v2/models/add-follower-response-all-of.ts b/src/versions/v2/models/add-follower-response-all-of.ts
new file mode 100644
index 00000000..3c069136
--- /dev/null
+++ b/src/versions/v2/models/add-follower-response-all-of.ts
@@ -0,0 +1,32 @@
+/* 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 { FollowerItem1 } from './follower-item1';
+
+/**
+*
+* @export
+* @interface AddFollowerResponseAllOf
+*/
+export interface AddFollowerResponseAllOf {
+ /**
+ *
+ * @type {FollowerItem1}
+ */
+ 'data'?: FollowerItem1;
+}
+
diff --git a/src/versions/v2/models/add-follower-response.ts b/src/versions/v2/models/add-follower-response.ts
new file mode 100644
index 00000000..fc644409
--- /dev/null
+++ b/src/versions/v2/models/add-follower-response.ts
@@ -0,0 +1,32 @@
+/* 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 { AddFollowerResponseAllOf } from './add-follower-response-all-of';
+// May contain unused imports in some cases
+// @ts-ignore
+import { BaseResponse } from './base-response';
+// May contain unused imports in some cases
+// @ts-ignore
+import { FollowerItem1 } from './follower-item1';
+
+/**
+ * @type AddFollowerResponse
+ * @export
+ */
+export type AddFollowerResponse = AddFollowerResponseAllOf & BaseResponse;
+
+
diff --git a/src/versions/v2/models/delete-follower-response-data.ts b/src/versions/v2/models/delete-follower-response-data.ts
new file mode 100644
index 00000000..bec0c884
--- /dev/null
+++ b/src/versions/v2/models/delete-follower-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.
+ */
+
+
+
+/**
+*
+* @export
+* @interface DeleteFollowerResponseData
+*/
+export interface DeleteFollowerResponseData {
+ /**
+ * Deleted follower user ID
+ * @type {number}
+ */
+ 'user_id'?: number;
+}
+
diff --git a/src/versions/v2/models/delete-follower-response.ts b/src/versions/v2/models/delete-follower-response.ts
new file mode 100644
index 00000000..99cb5a07
--- /dev/null
+++ b/src/versions/v2/models/delete-follower-response.ts
@@ -0,0 +1,37 @@
+/* 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 { DeleteFollowerResponseData } from './delete-follower-response-data';
+
+/**
+*
+* @export
+* @interface DeleteFollowerResponse
+*/
+export interface DeleteFollowerResponse {
+ /**
+ * If the response is successful or not
+ * @type {boolean}
+ */
+ 'success'?: boolean;
+ /**
+ *
+ * @type {DeleteFollowerResponseData}
+ */
+ 'data'?: DeleteFollowerResponseData;
+}
+
diff --git a/src/versions/v2/models/follower-changelog-item.ts b/src/versions/v2/models/follower-changelog-item.ts
new file mode 100644
index 00000000..7501a292
--- /dev/null
+++ b/src/versions/v2/models/follower-changelog-item.ts
@@ -0,0 +1,44 @@
+/* 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 FollowerChangelogItem
+*/
+export interface FollowerChangelogItem {
+ /**
+ * The type of change
+ * @type {string}
+ */
+ 'action'?: string;
+ /**
+ * The ID of the user who did the change
+ * @type {number}
+ */
+ 'actor_user_id'?: number;
+ /**
+ * The ID of the user who was following the entity
+ * @type {number}
+ */
+ 'follower_user_id'?: number;
+ /**
+ * The time at which the change happened
+ * @type {string}
+ */
+ 'time'?: string;
+}
+
diff --git a/src/versions/v2/models/follower-item.ts b/src/versions/v2/models/follower-item.ts
new file mode 100644
index 00000000..4eed4f20
--- /dev/null
+++ b/src/versions/v2/models/follower-item.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 FollowerItem
+*/
+export interface FollowerItem {
+ /**
+ * The ID of the user following the entity
+ * @type {number}
+ */
+ 'user_id'?: number;
+ /**
+ * The add time of the following
+ * @type {string}
+ */
+ 'add_time'?: string;
+}
+
diff --git a/src/versions/v2/models/follower-item1.ts b/src/versions/v2/models/follower-item1.ts
new file mode 100644
index 00000000..87b4f6f4
--- /dev/null
+++ b/src/versions/v2/models/follower-item1.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.
+ */
+
+
+
+/**
+* The follower object
+* @export
+* @interface FollowerItem1
+*/
+export interface FollowerItem1 {
+ /**
+ * The ID of the user following the entity
+ * @type {number}
+ */
+ 'user_id'?: number;
+ /**
+ * The add time of the following
+ * @type {string}
+ */
+ 'add_time'?: string;
+}
+
diff --git a/src/versions/v2/models/get-follower-changelogs-response-all-of.ts b/src/versions/v2/models/get-follower-changelogs-response-all-of.ts
new file mode 100644
index 00000000..459a8a36
--- /dev/null
+++ b/src/versions/v2/models/get-follower-changelogs-response-all-of.ts
@@ -0,0 +1,40 @@
+/* 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 { FollowerChangelogItem } from './follower-changelog-item';
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetActivitiesResponseAllOfAdditionalData } from './get-activities-response-all-of-additional-data';
+
+/**
+*
+* @export
+* @interface GetFollowerChangelogsResponseAllOf
+*/
+export interface GetFollowerChangelogsResponseAllOf {
+ /**
+ * Follower changelogs array
+ * @type {Array}
+ */
+ 'data'?: Array;
+ /**
+ *
+ * @type {GetActivitiesResponseAllOfAdditionalData}
+ */
+ 'additional_data'?: GetActivitiesResponseAllOfAdditionalData;
+}
+
diff --git a/src/versions/v2/models/get-follower-changelogs-response.ts b/src/versions/v2/models/get-follower-changelogs-response.ts
new file mode 100644
index 00000000..087e5cce
--- /dev/null
+++ b/src/versions/v2/models/get-follower-changelogs-response.ts
@@ -0,0 +1,35 @@
+/* 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 { BaseResponse } from './base-response';
+// May contain unused imports in some cases
+// @ts-ignore
+import { FollowerChangelogItem } from './follower-changelog-item';
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetActivitiesResponseAllOfAdditionalData } from './get-activities-response-all-of-additional-data';
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetFollowerChangelogsResponseAllOf } from './get-follower-changelogs-response-all-of';
+
+/**
+ * @type GetFollowerChangelogsResponse
+ * @export
+ */
+export type GetFollowerChangelogsResponse = BaseResponse & GetFollowerChangelogsResponseAllOf;
+
+
diff --git a/src/versions/v2/models/get-followers-response-all-of.ts b/src/versions/v2/models/get-followers-response-all-of.ts
new file mode 100644
index 00000000..5a28f820
--- /dev/null
+++ b/src/versions/v2/models/get-followers-response-all-of.ts
@@ -0,0 +1,40 @@
+/* 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 { FollowerItem } from './follower-item';
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetActivitiesResponseAllOfAdditionalData } from './get-activities-response-all-of-additional-data';
+
+/**
+*
+* @export
+* @interface GetFollowersResponseAllOf
+*/
+export interface GetFollowersResponseAllOf {
+ /**
+ * Followers array
+ * @type {Array}
+ */
+ 'data'?: Array;
+ /**
+ *
+ * @type {GetActivitiesResponseAllOfAdditionalData}
+ */
+ 'additional_data'?: GetActivitiesResponseAllOfAdditionalData;
+}
+
diff --git a/src/versions/v2/models/get-followers-response.ts b/src/versions/v2/models/get-followers-response.ts
new file mode 100644
index 00000000..113dfbf4
--- /dev/null
+++ b/src/versions/v2/models/get-followers-response.ts
@@ -0,0 +1,35 @@
+/* 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 { BaseResponse } from './base-response';
+// May contain unused imports in some cases
+// @ts-ignore
+import { FollowerItem } from './follower-item';
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetActivitiesResponseAllOfAdditionalData } from './get-activities-response-all-of-additional-data';
+// May contain unused imports in some cases
+// @ts-ignore
+import { GetFollowersResponseAllOf } from './get-followers-response-all-of';
+
+/**
+ * @type GetFollowersResponse
+ * @export
+ */
+export type GetFollowersResponse = BaseResponse & GetFollowersResponseAllOf;
+
+
diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts
index ee0633d1..1e67b440 100644
--- a/src/versions/v2/models/index.ts
+++ b/src/versions/v2/models/index.ts
@@ -7,9 +7,12 @@ 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-deal-follower-request';
export * from './add-deal-product-request';
export * from './add-deal-product-response';
export * from './add-deal-request';
+export * from './add-follower-response';
+export * from './add-follower-response-all-of';
export * from './add-installment-request-body';
export * from './add-organization-request';
export * from './add-person-request';
@@ -36,6 +39,8 @@ export * from './delete-deal-product-response';
export * from './delete-deal-product-response-data';
export * from './delete-deal-response';
export * from './delete-deal-response-data';
+export * from './delete-follower-response';
+export * from './delete-follower-response-data';
export * from './delete-installment-response';
export * from './delete-installment-response-data';
export * from './delete-organization-response';
@@ -50,6 +55,9 @@ export * from './delete-product-variation-response';
export * from './delete-product-variation-response-data';
export * from './delete-stage-response';
export * from './delete-stage-response-data';
+export * from './follower-changelog-item';
+export * from './follower-item';
+export * from './follower-item1';
export * from './get-activities-response';
export * from './get-activities-response-all-of';
export * from './get-activities-response-all-of-additional-data';
@@ -73,6 +81,10 @@ export * from './get-deals-products-response-data-inner-all-of2';
export * from './get-deals-products-response-data-inner-all-of3';
export * from './get-deals-response';
export * from './get-deals-response-all-of';
+export * from './get-follower-changelogs-response';
+export * from './get-follower-changelogs-response-all-of';
+export * from './get-followers-response';
+export * from './get-followers-response-all-of';
export * from './get-installments-response';
export * from './get-installments-response-data-inner';
export * from './get-item-search-field-response';