diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51872896..ac99f7bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,66 @@ 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]
+### Removed
+- Removed deprecated v1 endpoints that have v2 equivalents. See the [deprecation announcement](https://developers.pipedrive.com/changelog/post/deprecation-of-selected-api-v1-endpoints) for details. Please migrate to the corresponding v2 endpoints listed below:
+ - `GET /v1/activities` → `GET /api/v2/activities`
+ - `GET /v1/activities/collection` → `GET /api/v2/activities`
+ - `GET /v1/activities/{id}` → `GET /api/v2/activities/{id}`
+ - `POST /v1/activities` → `POST /api/v2/activities`
+ - `PUT /v1/activities/{id}` → `PATCH /api/v2/activities/{id}`
+ - `DELETE /v1/activities/{id}` → `DELETE /api/v2/activities/{id}`
+ - `GET /v1/deals` → `GET /api/v2/deals`
+ - `GET /v1/deals/collection` → `GET /api/v2/deals`
+ - `GET /v1/deals/{id}` → `GET /api/v2/deals/{id}`
+ - `GET /v1/deals/search` → `GET /api/v2/deals/search`
+ - `POST /v1/deals` → `POST /api/v2/deals`
+ - `PUT /v1/deals/{id}` → `PATCH /api/v2/deals/{id}`
+ - `DELETE /v1/deals/{id}` → `DELETE /api/v2/deals/{id}`
+ - `GET /v1/deals/{id}/activities` → `GET /api/v2/activities?deal_id={id}`
+ - `GET /v1/deals/{id}/persons` → `GET /api/v2/persons?deal_id={id}`
+ - `GET /v1/deals/{id}/products` → `GET /api/v2/deals/{id}/products`
+ - `POST /v1/deals/{id}/products` → `POST /api/v2/deals/{id}/products`
+ - `PUT /v1/deals/{id}/products/{product_attachment_id}` → `PATCH /api/v2/deals/{id}/products/{product_attachment_id}`
+ - `DELETE /v1/deals/{id}/products/{product_attachment_id}` → `DELETE /api/v2/deals/{id}/products/{product_attachment_id}`
+ - `GET /v1/itemSearch` → `GET /api/v2/itemSearch`
+ - `GET /v1/itemSearch/field` → `GET /api/v2/itemSearch/field`
+ - `GET /v1/organizations` → `GET /api/v2/organizations`
+ - `GET /v1/organizations/collection` → `GET /api/v2/organizations`
+ - `GET /v1/organizations/{id}` → `GET /api/v2/organizations/{id}`
+ - `GET /v1/organizations/search` → `GET /api/v2/organizations/search`
+ - `POST /v1/organizations` → `POST /api/v2/organizations`
+ - `PUT /v1/organizations/{id}` → `PATCH /api/v2/organizations/{id}`
+ - `DELETE /v1/organizations/{id}` → `DELETE /api/v2/organizations/{id}`
+ - `GET /v1/organizations/{id}/deals` → `GET /api/v2/deals?org_id={id}`
+ - `GET /v1/organizations/{id}/activities` → `GET /api/v2/activities?org_id={id}`
+ - `GET /v1/organizations/{id}/persons` → `GET /api/v2/persons?org_id={id}`
+ - `GET /v1/persons` → `GET /api/v2/persons`
+ - `GET /v1/persons/collection` → `GET /api/v2/persons`
+ - `GET /v1/persons/{id}` → `GET /api/v2/persons/{id}`
+ - `GET /v1/persons/search` → `GET /api/v2/persons/search`
+ - `POST /v1/persons` → `POST /api/v2/persons`
+ - `PUT /v1/persons/{id}` → `PATCH /api/v2/persons/{id}`
+ - `DELETE /v1/persons/{id}` → `DELETE /api/v2/persons/{id}`
+ - `GET /v1/persons/{id}/deals` → `GET /api/v2/deals?person_id={id}`
+ - `GET /v1/persons/{id}/activities` → `GET /api/v2/activities?person_id={id}`
+ - `GET /v1/pipelines` → `GET /api/v2/pipelines`
+ - `GET /v1/pipelines/{id}` → `GET /api/v2/pipelines/{id}`
+ - `POST /v1/pipelines` → `POST /api/v2/pipelines`
+ - `PUT /v1/pipelines/{id}` → `PATCH /api/v2/pipelines/{id}`
+ - `DELETE /v1/pipelines/{id}` → `DELETE /api/v2/pipelines/{id}`
+ - `GET /v1/products` → `GET /api/v2/products`
+ - `GET /v1/products/{id}` → `GET /api/v2/products/{id}`
+ - `GET /v1/products/search` → `GET /api/v2/products/search`
+ - `POST /v1/products` → `POST /api/v2/products`
+ - `PUT /v1/products/{id}` → `PATCH /api/v2/products/{id}`
+ - `DELETE /v1/products/{id}` → `DELETE /api/v2/products/{id}`
+ - `GET /v1/stages` → `GET /api/v2/stages`
+ - `GET /v1/stages/{id}` → `GET /api/v2/stages/{id}`
+ - `POST /v1/stages` → `POST /api/v2/stages`
+ - `PUT /v1/stages/{id}` → `PATCH /api/v2/stages/{id}`
+ - `DELETE /v1/stages/{id}` → `DELETE /api/v2/stages/{id}`
+### Fixed
+- Made `picture_id`, `org_id`, `label`, `last_name`, `cc_email`, `last_incoming_mail_time`, and `last_outgoing_mail_time` nullable in person and organization schemas to match real API behavior
## [31.6.0] - 2026-03-05
### Changed
diff --git a/README.md b/README.md
index eed7baee..af080ed1 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ You can retrieve the api_token from your existing Pipedrive account’s settings
```typescript
import express from "express";
-import { Configuration, DealsApi } from "pipedrive/v1";
+import { Configuration, DealsApi } from "pipedrive/v2";
const app = express();
@@ -73,7 +73,7 @@ To set up authentication in the API client, you need the following information.
Next, initialize the API client as follows:
```typescript
-import { OAuth2Configuration, Configuration } from 'pipedrive/v1';
+import { OAuth2Configuration, Configuration } from 'pipedrive/v2';
// Configuration parameters and credentials
const oauth2 = new OAuth2Configuration({
@@ -150,7 +150,7 @@ This code snippet stores the access token in a session for an express applicatio
import express from "express";
import cookieParse from "cookie-parser";
import cookeSession from "cookie-session";
-import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive/v1";
+import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive/v2";
const app = express();
@@ -194,7 +194,7 @@ It then redirects back to the base endpoint for calling endpoints from the SDK.
```typescript
import express from "express";
-import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive/v1";
+import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive/v2";
import cookieParser from "cookie-parser";
import cookieSession from "cookie-session";
diff --git a/docs/v1.md b/docs/v1.md
index d1465d55..dd8765ab 100644
--- a/docs/v1.md
+++ b/docs/v1.md
@@ -4,12 +4,6 @@ All URIs are relative to _https://api.pipedrive.com/v1_
Class | Method | HTTP request | Description |
------------ | ------------- | ------------- | ------------- |
-ActivitiesApi | addActivity | **POST** /activities | Add an activity
-ActivitiesApi | deleteActivity | **DELETE** /activities/{id} | Delete an activity
-ActivitiesApi | getActivities | **GET** /activities | Get all activities assigned to a particular user
-ActivitiesApi | getActivitiesCollection | **GET** /activities/collection | Get all activities collection
-ActivitiesApi | getActivity | **GET** /activities/{id} | Get details of an activity
-ActivitiesApi | updateActivity | **PUT** /activities/{id} | Update an activity
ActivityFieldsApi | getActivityFields | **GET** /activityFields | Get all activity fields
ActivityTypesApi | addActivityType | **POST** /activityTypes | Add new activity type
ActivityTypesApi | deleteActivityType | **DELETE** /activityTypes/{id} | Delete an activity type
@@ -32,38 +26,25 @@ DealFieldsApi | deleteDealFields | **DELETE** /dealFields | Delete multiple deal
DealFieldsApi | getDealField | **GET** /dealFields/{id} | Get one deal field
DealFieldsApi | getDealFields | **GET** /dealFields | Get all deal fields
DealFieldsApi | updateDealField | **PUT** /dealFields/{id} | Update a deal field
-DealsApi | addDeal | **POST** /deals | Add a deal
DealsApi | addDealFollower | **POST** /deals/{id}/followers | Add a follower to a deal
DealsApi | addDealParticipant | **POST** /deals/{id}/participants | Add a participant to a deal
-DealsApi | addDealProduct | **POST** /deals/{id}/products | Add a product to 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 | deleteDealParticipant | **DELETE** /deals/{id}/participants/{deal_participant_id} | Delete a participant from a deal
-DealsApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
DealsApi | duplicateDeal | **POST** /deals/{id}/duplicate | Duplicate deal
DealsApi | getArchivedDeals | **GET** /deals/archived | Get all archived deals
DealsApi | getArchivedDealsSummary | **GET** /deals/summary/archived | Get archived deals summary
DealsApi | getArchivedDealsTimeline | **GET** /deals/timeline/archived | Get archived deals timeline
-DealsApi | getDeal | **GET** /deals/{id} | Get details of a deal
-DealsApi | getDealActivities | **GET** /deals/{id}/activities | List activities associated with a deal
DealsApi | getDealChangelog | **GET** /deals/{id}/changelog | List updates about deal field values
DealsApi | getDealFiles | **GET** /deals/{id}/files | List files attached to a deal
DealsApi | getDealFollowers | **GET** /deals/{id}/followers | List followers of a deal
DealsApi | getDealMailMessages | **GET** /deals/{id}/mailMessages | List mail messages associated with a deal
DealsApi | getDealParticipants | **GET** /deals/{id}/participants | List participants of a deal
DealsApi | getDealParticipantsChangelog | **GET** /deals/{id}/participantsChangelog | List updates about participants of a deal
-DealsApi | getDealPersons | **GET** /deals/{id}/persons | List all persons associated with a deal
-DealsApi | getDealProducts | **GET** /deals/{id}/products | List products attached to a deal
DealsApi | getDealUpdates | **GET** /deals/{id}/flow | List updates about a deal
DealsApi | getDealUsers | **GET** /deals/{id}/permittedUsers | List permitted users
-DealsApi | getDeals | **GET** /deals | Get all deals
-DealsApi | getDealsCollection | **GET** /deals/collection | Get all deals collection
DealsApi | getDealsSummary | **GET** /deals/summary | Get deals summary
DealsApi | getDealsTimeline | **GET** /deals/timeline | Get deals timeline
DealsApi | mergeDeals | **PUT** /deals/{id}/merge | Merge two deals
-DealsApi | searchDeals | **GET** /deals/search | Search deals
-DealsApi | updateDeal | **PUT** /deals/{id} | Update a deal
-DealsApi | updateDealProduct | **PUT** /deals/{id}/products/{product_attachment_id} | Update the product attached to a deal
FilesApi | addFile | **POST** /files | Add file
FilesApi | addFileAndLinkIt | **POST** /files/remote | Create a remote file and link it to an item
FilesApi | deleteFile | **DELETE** /files/{id} | Delete a file
@@ -84,8 +65,6 @@ GoalsApi | deleteGoal | **DELETE** /goals/{id} | Delete existing goal
GoalsApi | getGoalResult | **GET** /goals/{id}/results | Get result of a goal
GoalsApi | getGoals | **GET** /goals/find | Find goals
GoalsApi | updateGoal | **PUT** /goals/{id} | Update existing goal
-ItemSearchApi | searchItem | **GET** /itemSearch | Perform a search from multiple item types
-ItemSearchApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type
LeadFieldsApi | getLeadFields | **GET** /leadFields | Get all lead fields
LeadLabelsApi | addLeadLabel | **POST** /leadLabels | Add a lead label
LeadLabelsApi | deleteLeadLabel | **DELETE** /leadLabels/{id} | Delete a lead label
@@ -138,25 +117,15 @@ OrganizationRelationshipsApi | deleteOrganizationRelationship | **DELETE** /orga
OrganizationRelationshipsApi | getOrganizationRelationship | **GET** /organizationRelationships/{id} | Get one organization relationship
OrganizationRelationshipsApi | getOrganizationRelationships | **GET** /organizationRelationships | Get all relationships for organization
OrganizationRelationshipsApi | updateOrganizationRelationship | **PUT** /organizationRelationships/{id} | Update an organization relationship
-OrganizationsApi | addOrganization | **POST** /organizations | Add an organization
OrganizationsApi | addOrganizationFollower | **POST** /organizations/{id}/followers | Add a follower to an organization
-OrganizationsApi | deleteOrganization | **DELETE** /organizations/{id} | Delete an organization
OrganizationsApi | deleteOrganizationFollower | **DELETE** /organizations/{id}/followers/{follower_id} | Delete a follower from an organization
-OrganizationsApi | getOrganization | **GET** /organizations/{id} | Get details of an organization
-OrganizationsApi | getOrganizationActivities | **GET** /organizations/{id}/activities | List activities associated with an organization
OrganizationsApi | getOrganizationChangelog | **GET** /organizations/{id}/changelog | List updates about organization field values
-OrganizationsApi | getOrganizationDeals | **GET** /organizations/{id}/deals | List deals associated with an organization
OrganizationsApi | getOrganizationFiles | **GET** /organizations/{id}/files | List files attached to an organization
OrganizationsApi | getOrganizationFollowers | **GET** /organizations/{id}/followers | List followers of an organization
OrganizationsApi | getOrganizationMailMessages | **GET** /organizations/{id}/mailMessages | List mail messages associated with an organization
-OrganizationsApi | getOrganizationPersons | **GET** /organizations/{id}/persons | List persons of an organization
OrganizationsApi | getOrganizationUpdates | **GET** /organizations/{id}/flow | List updates about an organization
OrganizationsApi | getOrganizationUsers | **GET** /organizations/{id}/permittedUsers | List permitted users
-OrganizationsApi | getOrganizations | **GET** /organizations | Get all organizations
-OrganizationsApi | getOrganizationsCollection | **GET** /organizations/collection | Get all organizations collection
OrganizationsApi | mergeOrganizations | **PUT** /organizations/{id}/merge | Merge two organizations
-OrganizationsApi | searchOrganization | **GET** /organizations/search | Search organizations
-OrganizationsApi | updateOrganization | **PUT** /organizations/{id} | Update an organization
PermissionSetsApi | getPermissionSet | **GET** /permissionSets/{id} | Get one permission set
PermissionSetsApi | getPermissionSetAssignments | **GET** /permissionSets/{id}/assignments | List permission set assignments
PermissionSetsApi | getPermissionSets | **GET** /permissionSets | Get all permission sets
@@ -166,53 +135,33 @@ PersonFieldsApi | deletePersonFields | **DELETE** /personFields | Delete multipl
PersonFieldsApi | getPersonField | **GET** /personFields/{id} | Get one person field
PersonFieldsApi | getPersonFields | **GET** /personFields | Get all person fields
PersonFieldsApi | updatePersonField | **PUT** /personFields/{id} | Update a person field
-PersonsApi | addPerson | **POST** /persons | Add a person
PersonsApi | addPersonFollower | **POST** /persons/{id}/followers | Add a follower to a person
PersonsApi | addPersonPicture | **POST** /persons/{id}/picture | Add person picture
-PersonsApi | deletePerson | **DELETE** /persons/{id} | Delete a person
PersonsApi | deletePersonFollower | **DELETE** /persons/{id}/followers/{follower_id} | Delete a follower from a person
PersonsApi | deletePersonPicture | **DELETE** /persons/{id}/picture | Delete person picture
-PersonsApi | getPerson | **GET** /persons/{id} | Get details of a person
-PersonsApi | getPersonActivities | **GET** /persons/{id}/activities | List activities associated with a person
PersonsApi | getPersonChangelog | **GET** /persons/{id}/changelog | List updates about person field values
-PersonsApi | getPersonDeals | **GET** /persons/{id}/deals | List deals associated with a person
PersonsApi | getPersonFiles | **GET** /persons/{id}/files | List files attached to a person
PersonsApi | getPersonFollowers | **GET** /persons/{id}/followers | List followers of a person
PersonsApi | getPersonMailMessages | **GET** /persons/{id}/mailMessages | List mail messages associated with a person
PersonsApi | getPersonProducts | **GET** /persons/{id}/products | List products associated with a person
PersonsApi | getPersonUpdates | **GET** /persons/{id}/flow | List updates about a person
PersonsApi | getPersonUsers | **GET** /persons/{id}/permittedUsers | List permitted users
-PersonsApi | getPersons | **GET** /persons | Get all persons
-PersonsApi | getPersonsCollection | **GET** /persons/collection | Get all persons collection
PersonsApi | mergePersons | **PUT** /persons/{id}/merge | Merge two persons
-PersonsApi | searchPersons | **GET** /persons/search | Search persons
-PersonsApi | updatePerson | **PUT** /persons/{id} | Update a person
-PipelinesApi | addPipeline | **POST** /pipelines | Add a new pipeline
-PipelinesApi | deletePipeline | **DELETE** /pipelines/{id} | Delete a pipeline
-PipelinesApi | getPipeline | **GET** /pipelines/{id} | Get one pipeline
PipelinesApi | getPipelineConversionStatistics | **GET** /pipelines/{id}/conversion_statistics | Get deals conversion rates in pipeline
PipelinesApi | getPipelineDeals | **GET** /pipelines/{id}/deals | Get deals in a pipeline
PipelinesApi | getPipelineMovementStatistics | **GET** /pipelines/{id}/movement_statistics | Get deals movements in pipeline
-PipelinesApi | getPipelines | **GET** /pipelines | Get all pipelines
-PipelinesApi | updatePipeline | **PUT** /pipelines/{id} | Update a pipeline
ProductFieldsApi | addProductField | **POST** /productFields | Add a new product field
ProductFieldsApi | deleteProductField | **DELETE** /productFields/{id} | Delete a product field
ProductFieldsApi | deleteProductFields | **DELETE** /productFields | Delete multiple product fields in bulk
ProductFieldsApi | getProductField | **GET** /productFields/{id} | Get one product field
ProductFieldsApi | getProductFields | **GET** /productFields | Get all product fields
ProductFieldsApi | updateProductField | **PUT** /productFields/{id} | Update a product field
-ProductsApi | addProduct | **POST** /products | Add a product
ProductsApi | addProductFollower | **POST** /products/{id}/followers | Add a follower to a product
-ProductsApi | deleteProduct | **DELETE** /products/{id} | Delete a product
ProductsApi | deleteProductFollower | **DELETE** /products/{id}/followers/{follower_id} | Delete a follower from a product
-ProductsApi | getProduct | **GET** /products/{id} | Get one product
ProductsApi | getProductDeals | **GET** /products/{id}/deals | Get deals where a product is attached to
ProductsApi | getProductFiles | **GET** /products/{id}/files | List files attached to a product
ProductsApi | getProductFollowers | **GET** /products/{id}/followers | List followers of a product
ProductsApi | getProductUsers | **GET** /products/{id}/permittedUsers | List permitted users
-ProductsApi | getProducts | **GET** /products | Get all products
-ProductsApi | searchProducts | **GET** /products/search | Search products
-ProductsApi | updateProduct | **PUT** /products/{id} | Update a product
ProjectTemplatesApi | getProjectTemplate | **GET** /projectTemplates/{id} | Get details of a template
ProjectTemplatesApi | getProjectTemplates | **GET** /projectTemplates | Get all project templates
ProjectTemplatesApi | getProjectsBoard | **GET** /projects/boards/{id} | Get details of a board
@@ -244,12 +193,7 @@ RolesApi | getRoleSettings | **GET** /roles/{id}/settings | List role settings
RolesApi | getRoles | **GET** /roles | Get all roles
RolesApi | updateRole | **PUT** /roles/{id} | Update role details
RolesApi | updateRolePipelines | **PUT** /roles/{id}/pipelines | Update pipeline visibility for a role
-StagesApi | addStage | **POST** /stages | Add a new stage
-StagesApi | deleteStage | **DELETE** /stages/{id} | Delete a stage
-StagesApi | getStage | **GET** /stages/{id} | Get one stage
StagesApi | getStageDeals | **GET** /stages/{id}/deals | Get deals in a stage
-StagesApi | getStages | **GET** /stages | Get all stages
-StagesApi | updateStage | **PUT** /stages/{id} | Update stage details
TasksApi | addTask | **POST** /tasks | Add a task
TasksApi | deleteTask | **DELETE** /tasks/{id} | Delete a task
TasksApi | getTask | **GET** /tasks/{id} | Get details of a task
diff --git a/src/versions/v1/api.ts b/src/versions/v1/api.ts
index f0f65ace..45a4e1e7 100644
--- a/src/versions/v1/api.ts
+++ b/src/versions/v1/api.ts
@@ -14,7 +14,6 @@
-export * from './api/activities-api';
export * from './api/activity-fields-api';
export * from './api/activity-types-api';
export * from './api/billing-api';
@@ -26,7 +25,6 @@ export * from './api/deals-api';
export * from './api/files-api';
export * from './api/filters-api';
export * from './api/goals-api';
-export * from './api/item-search-api';
export * from './api/lead-fields-api';
export * from './api/lead-labels-api';
export * from './api/lead-sources-api';
diff --git a/src/versions/v1/api/deals-api.ts b/src/versions/v1/api/deals-api.ts
index 3ac71fba..40419f80 100644
--- a/src/versions/v1/api/deals-api.ts
+++ b/src/versions/v1/api/deals-api.ts
@@ -28,44 +28,22 @@ import { AddDealFollowerResponse } from '../models';
// @ts-ignore
import { AddDealParticipantRequest } from '../models';
// @ts-ignore
-import { AddDealProductRequest } from '../models';
-// @ts-ignore
-import { AddDealRequest } from '../models';
-// @ts-ignore
import { AddParticipantsResponse } from '../models';
// @ts-ignore
import { DeleteDealFollowerResponse } from '../models';
// @ts-ignore
import { DeleteDealParticipantResponse } from '../models';
// @ts-ignore
-import { DeleteDealProductResponse } from '../models';
-// @ts-ignore
-import { DeleteDealResponse } from '../models';
-// @ts-ignore
-import { FailResponse } from '../models';
-// @ts-ignore
-import { GetAddProductAttachmentDetailsResponse } from '../models';
-// @ts-ignore
-import { GetAddedDealResponse } from '../models';
-// @ts-ignore
import { GetAssociatedFilesResponse } from '../models';
// @ts-ignore
import { GetAssociatedMailMessagesResponse } from '../models';
// @ts-ignore
import { GetChangelogResponse } from '../models';
// @ts-ignore
-import { GetDealActivitiesResponse } from '../models';
-// @ts-ignore
import { GetDealParticipantsResponse } from '../models';
// @ts-ignore
-import { GetDealResponse } from '../models';
-// @ts-ignore
-import { GetDealSearchResponse } from '../models';
-// @ts-ignore
import { GetDealUpdatesResponse } from '../models';
// @ts-ignore
-import { GetDealsCollectionResponse } from '../models';
-// @ts-ignore
import { GetDealsResponse } from '../models';
// @ts-ignore
import { GetDealsSummaryResponse } from '../models';
@@ -82,64 +60,13 @@ import { GetParticipantsChangelogResponse } from '../models';
// @ts-ignore
import { GetPermittedUsersResponse } from '../models';
// @ts-ignore
-import { GetPersonsResponse } from '../models';
-// @ts-ignore
-import { GetProductAttachmentDetailsResponse } from '../models';
-// @ts-ignore
-import { GetProductsResponse } from '../models';
-// @ts-ignore
import { MergeDealsRequest } from '../models';
-// @ts-ignore
-import { UpdateDealProductRequest } from '../models';
-// @ts-ignore
-import { UpdateDealRequest } from '../models';
/**
* DealsApi - axios parameter creator
* @export
*/
export const DealsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
- /**
- * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
- * @summary Add a deal
- * @param {AddDealRequest} [AddDealRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- addDeal: async (AddDealRequest?: AddDealRequest, ): Promise => {
- 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: 'POST', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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(AddDealRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
/**
* Adds a follower to a deal.
* @summary Add a follower to a deal
@@ -230,92 +157,6 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
options: localVarRequestOptions,
};
},
- /**
- * 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]
- * @deprecated
- * @throws {RequiredError}
- */
- addDealProduct: async (id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('addDealProduct', '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: 'POST', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "products:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddDealProductRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
- * @param {number} id The ID of the deal
- * @deprecated
- * @throws {RequiredError}
- */
- deleteDeal: async (id: number, ): Promise => {
- // 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;
- }
-
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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 follower from a deal.
* @summary Delete a follower from a deal
@@ -397,51 +238,6 @@ 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 product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled
- * @summary Delete an attached product from a deal
- * @param {number} id The ID of the deal
- * @param {number} product_attachment_id The product attachment ID
- * @deprecated
- * @throws {RequiredError}
- */
- deleteDealProduct: async (id: number, product_attachment_id: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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, };
@@ -734,108 +530,6 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
- * @summary Get details of a deal
- * @param {number} id The ID of the deal
- * @deprecated
- * @throws {RequiredError}
- */
- getDeal: async (id: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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,
- };
- },
- /**
- * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead.
- * @summary List activities associated with a deal
- * @param {number} id The ID of the deal
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
- * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
- * @deprecated
- * @throws {RequiredError}
- */
- getDealActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getDealActivities', 'id', id)
- const localVarPath = `/deals/{id}/activities`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (done !== undefined) {
- localVarQueryParameter['done'] = done;
- }
-
- if (exclude !== undefined) {
- localVarQueryParameter['exclude'] = exclude;
- }
-
-
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -1147,18 +841,20 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
};
},
/**
- * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead.
- * @summary List all persons associated with a deal
+ * Lists updates about a deal.
+ * @summary List updates about a deal
* @param {number} id The ID of the deal
* @param {number} [start] Pagination start
* @param {number} [limit] Items shown per page
- * @deprecated
+ * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
+ * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
+
* @throws {RequiredError}
*/
- getDealPersons: async (id: number, start?: number, limit?: number, ): Promise => {
+ getDealUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getDealPersons', 'id', id)
- const localVarPath = `/deals/{id}/persons`
+ assertParamExists('getDealUpdates', 'id', id)
+ const localVarPath = `/deals/{id}/flow`
.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);
@@ -1176,116 +872,7 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- 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 {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [include_product_data] Whether to fetch product data along with each attached product (1) or not (0, default)
- * @deprecated
- * @throws {RequiredError}
- */
- getDealProducts: async (id: number, start?: number, limit?: number, include_product_data?: 0 | 1, ): Promise => {
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (include_product_data !== undefined) {
- localVarQueryParameter['include_product_data'] = include_product_data;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Lists updates about a deal.
- * @summary List updates about a deal
- * @param {number} id The ID of the deal
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
- * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
-
- * @throws {RequiredError}
- */
- getDealUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getDealUpdates', 'id', id)
- const localVarPath = `/deals/{id}/flow`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
if (start !== undefined) {
localVarQueryParameter['start'] = start;
@@ -1346,155 +933,6 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns all not archived deals. For more information, see the tutorial for getting all deals.
- * @summary Get all deals
- * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
- * @param {number} [filter_id] The ID of the filter to use
- * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
- * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
- * @deprecated
- * @throws {RequiredError}
- */
- getDeals: async (user_id?: number, filter_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise => {
- 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
-
- if (user_id !== undefined) {
- localVarQueryParameter['user_id'] = user_id;
- }
-
- if (filter_id !== undefined) {
- localVarQueryParameter['filter_id'] = filter_id;
- }
-
- if (stage_id !== undefined) {
- localVarQueryParameter['stage_id'] = stage_id;
- }
-
- if (status !== undefined) {
- localVarQueryParameter['status'] = status;
- }
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (sort !== undefined) {
- localVarQueryParameter['sort'] = sort;
- }
-
- if (owned_by_you !== undefined) {
- localVarQueryParameter['owned_by_you'] = owned_by_you;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead.
- * @summary Get all deals collection
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {number} [user_id] If supplied, only deals matching the given user will be returned
- * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
- * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @deprecated
- * @throws {RequiredError}
- */
- getDealsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', ): Promise => {
- const localVarPath = `/deals/collection`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (since !== undefined) {
- localVarQueryParameter['since'] = since;
- }
-
- if (until !== undefined) {
- localVarQueryParameter['until'] = until;
- }
-
- if (user_id !== undefined) {
- localVarQueryParameter['user_id'] = user_id;
- }
-
- if (stage_id !== undefined) {
- localVarQueryParameter['stage_id'] = stage_id;
- }
-
- if (status !== undefined) {
- localVarQueryParameter['status'] = status;
- }
-
-
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -1698,184 +1136,6 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
localVarRequestOptions.data = serializeDataIfNeeded(MergeDealsRequest, 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} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- searchDeals: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: 'deal.cc_email', start?: number, limit?: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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 (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
- * @summary Update a deal
- * @param {number} id The ID of the deal
- * @param {UpdateDealRequest} [UpdateDealRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- updateDeal: async (id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise => {
- // 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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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]
- * @deprecated
- * @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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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(UpdateDealProductRequest, localVarRequestOptions, configuration)
-
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -1892,17 +1152,6 @@ export const DealsApiAxiosParamCreator = function (configuration?: Configuration
export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = DealsApiAxiosParamCreator(configuration)
return {
- /**
- * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
- * @summary Add a deal
- * @param {AddDealRequest} [AddDealRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async addDeal(AddDealRequest?: AddDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addDeal(AddDealRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Adds a follower to a deal.
* @summary Add a follower to a deal
@@ -1927,29 +1176,6 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addDealParticipant(id, AddDealParticipantRequest, );
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]
- * @deprecated
- * @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);
- },
- /**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
- * @param {number} id The ID of the deal
- * @deprecated
- * @throws {RequiredError}
- */
- async deleteDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDeal(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Deletes a follower from a deal.
* @summary Delete a follower from a deal
@@ -1974,18 +1200,6 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealParticipant(id, deal_participant_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled
- * @summary Delete an attached product from a deal
- * @param {number} id The ID of the deal
- * @param {number} product_attachment_id The product attachment ID
- * @deprecated
- * @throws {RequiredError}
- */
- async deleteDealProduct(id: number, product_attachment_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealProduct(id, product_attachment_id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Duplicates a deal.
* @summary Duplicate deal
@@ -2053,32 +1267,6 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getArchivedDealsTimeline(start_date, interval, amount, field_key, user_id, pipeline_id, filter_id, exclude_deals, totals_convert_currency, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
- * @summary Get details of a deal
- * @param {number} id The ID of the deal
- * @deprecated
- * @throws {RequiredError}
- */
- async getDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead.
- * @summary List activities associated with a deal
- * @param {number} id The ID of the deal
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
- * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
- * @deprecated
- * @throws {RequiredError}
- */
- async getDealActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealActivities(id, start, limit, done, exclude, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists updates about field values of a deal.
* @summary List updates about deal field values
@@ -2132,55 +1320,28 @@ export const DealsApiFp = function(configuration?: Configuration) {
},
/**
* Lists the participants associated with a deal.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
- * @summary List participants of a deal
- * @param {number} id The ID of the deal
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
-
- * @throws {RequiredError}
- */
- async getDealParticipants(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealParticipants(id, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination.
- * @summary List updates about participants of a deal
- * @param {number} id The ID of the deal
- * @param {number} [limit] Items shown per page
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
-
- * @throws {RequiredError}
- */
- async getDealParticipantsChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealParticipantsChangelog(id, limit, cursor, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead.
- * @summary List all persons associated with a deal
+ * @summary List participants of a deal
* @param {number} id The ID of the deal
* @param {number} [start] Pagination start
* @param {number} [limit] Items shown per page
- * @deprecated
+
* @throws {RequiredError}
*/
- async getDealPersons(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealPersons(id, start, limit, );
+ async getDealParticipants(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealParticipants(id, start, limit, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
+ * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination.
+ * @summary List updates about participants of a deal
* @param {number} id The ID of the deal
- * @param {number} [start] Pagination start
* @param {number} [limit] Items shown per page
- * @param {0 | 1} [include_product_data] Whether to fetch product data along with each attached product (1) or not (0, default)
- * @deprecated
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+
* @throws {RequiredError}
*/
- async getDealProducts(id: number, start?: number, limit?: number, include_product_data?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealProducts(id, start, limit, include_product_data, );
+ async getDealParticipantsChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealParticipantsChangelog(id, limit, cursor, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
@@ -2209,41 +1370,6 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getDealUsers(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns all not archived deals. For more information, see the tutorial for getting all deals.
- * @summary Get all deals
- * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
- * @param {number} [filter_id] The ID of the filter to use
- * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
- * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
- * @deprecated
- * @throws {RequiredError}
- */
- async getDeals(user_id?: number, filter_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDeals(user_id, filter_id, stage_id, status, start, limit, sort, owned_by_you, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead.
- * @summary Get all deals collection
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {number} [user_id] If supplied, only deals matching the given user will be returned
- * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
- * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @deprecated
- * @throws {RequiredError}
- */
- async getDealsCollection(cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsCollection(cursor, limit, since, until, user_id, stage_id, status, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Returns a summary of all not archived deals.
* @summary Get deals summary
@@ -2290,50 +1416,6 @@ export const DealsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.mergeDeals(id, MergeDealsRequest, );
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} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async searchDeals(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: 'deal.cc_email', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchDeals(term, fields, exact_match, person_id, organization_id, status, include_fields, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
- * @summary Update a deal
- * @param {number} id The ID of the deal
- * @param {UpdateDealRequest} [UpdateDealRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async updateDeal(id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- 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]
- * @deprecated
- * @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);
- },
}
};
@@ -2344,16 +1426,6 @@ export const DealsApiFp = function(configuration?: Configuration) {
export const DealsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = DealsApiFp(configuration)
return {
- /**
- * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
- * @summary Add a deal
- * @param {DealsApiAddDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addDeal(requestParameters: DealsApiAddDealRequest = {}, ): Promise {
- return localVarFp.addDeal(requestParameters.AddDealRequest, ).then((request) => request(axios, basePath));
- },
/**
* Adds a follower to a deal.
* @summary Add a follower to a deal
@@ -2374,26 +1446,6 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
addDealParticipant(requestParameters: DealsApiAddDealParticipantRequest, ): Promise {
return localVarFp.addDealParticipant(requestParameters.id, requestParameters.AddDealParticipantRequest, ).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 {DealsApiAddDealProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addDealProduct(requestParameters: DealsApiAddDealProductRequest, ): Promise {
- return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
- * @param {DealsApiDeleteDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deleteDeal(requestParameters: DealsApiDeleteDealRequest, ): Promise {
- return localVarFp.deleteDeal(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* Deletes a follower from a deal.
* @summary Delete a follower from a deal
@@ -2414,16 +1466,6 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
deleteDealParticipant(requestParameters: DealsApiDeleteDealParticipantRequest, ): Promise {
return localVarFp.deleteDealParticipant(requestParameters.id, requestParameters.deal_participant_id, ).then((request) => request(axios, basePath));
},
- /**
- * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled
- * @summary Delete an attached product from a deal
- * @param {DealsApiDeleteDealProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deleteDealProduct(requestParameters: DealsApiDeleteDealProductRequest, ): Promise {
- return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(axios, basePath));
- },
/**
* Duplicates a deal.
* @summary Duplicate deal
@@ -2464,26 +1506,6 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
getArchivedDealsTimeline(requestParameters: DealsApiGetArchivedDealsTimelineRequest, ): Promise {
return localVarFp.getArchivedDealsTimeline(requestParameters.start_date, requestParameters.interval, requestParameters.amount, requestParameters.field_key, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.filter_id, requestParameters.exclude_deals, requestParameters.totals_convert_currency, ).then((request) => request(axios, basePath));
},
- /**
- * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
- * @summary Get details of a deal
- * @param {DealsApiGetDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getDeal(requestParameters: DealsApiGetDealRequest, ): Promise {
- return localVarFp.getDeal(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead.
- * @summary List activities associated with a deal
- * @param {DealsApiGetDealActivitiesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getDealActivities(requestParameters: DealsApiGetDealActivitiesRequest, ): Promise {
- return localVarFp.getDealActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(axios, basePath));
- },
/**
* Lists updates about field values of a deal.
* @summary List updates about deal field values
@@ -2544,26 +1566,6 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
getDealParticipantsChangelog(requestParameters: DealsApiGetDealParticipantsChangelogRequest, ): Promise {
return localVarFp.getDealParticipantsChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
},
- /**
- * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead.
- * @summary List all persons associated with a deal
- * @param {DealsApiGetDealPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getDealPersons(requestParameters: DealsApiGetDealPersonsRequest, ): Promise {
- return localVarFp.getDealPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
- * @param {DealsApiGetDealProductsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getDealProducts(requestParameters: DealsApiGetDealProductsRequest, ): Promise {
- return localVarFp.getDealProducts(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.include_product_data, ).then((request) => request(axios, basePath));
- },
/**
* Lists updates about a deal.
* @summary List updates about a deal
@@ -2584,26 +1586,6 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
getDealUsers(requestParameters: DealsApiGetDealUsersRequest, ): Promise {
return localVarFp.getDealUsers(requestParameters.id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns all not archived deals. For more information, see the tutorial for getting all deals.
- * @summary Get all deals
- * @param {DealsApiGetDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getDeals(requestParameters: DealsApiGetDealsRequest = {}, ): Promise {
- return localVarFp.getDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead.
- * @summary Get all deals collection
- * @param {DealsApiGetDealsCollectionRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getDealsCollection(requestParameters: DealsApiGetDealsCollectionRequest = {}, ): Promise {
- return localVarFp.getDealsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.stage_id, requestParameters.status, ).then((request) => request(axios, basePath));
- },
/**
* Returns a summary of all not archived deals.
* @summary Get deals summary
@@ -2634,53 +1616,9 @@ export const DealsApiFactory = function (configuration?: Configuration, basePath
mergeDeals(requestParameters: DealsApiMergeDealsRequest, ): Promise {
return localVarFp.mergeDeals(requestParameters.id, requestParameters.MergeDealsRequest, ).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 {DealsApiSearchDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- searchDeals(requestParameters: DealsApiSearchDealsRequest, ): Promise {
- return localVarFp.searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
- * @summary Update a deal
- * @param {DealsApiUpdateDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- updateDeal(requestParameters: DealsApiUpdateDealRequest, ): Promise {
- 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 {DealsApiUpdateDealProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- updateDealProduct(requestParameters: DealsApiUpdateDealProductRequest, ): Promise {
- return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(axios, basePath));
- },
};
};
-/**
- * Request parameters for addDeal operation in DealsApi.
- * @export
- * @interface DealsApiAddDealRequest
- */
-export interface DealsApiAddDealRequest {
- /**
- *
- * @type {AddDealRequest}
- * @memberof DealsApiAddDeal
- */
- readonly AddDealRequest?: AddDealRequest
-}
-
/**
* Request parameters for addDealFollower operation in DealsApi.
* @export
@@ -2723,41 +1661,6 @@ export interface DealsApiAddDealParticipantRequest {
readonly AddDealParticipantRequest?: AddDealParticipantRequest
}
-/**
- * Request parameters for addDealProduct operation in DealsApi.
- * @export
- * @interface DealsApiAddDealProductRequest
- */
-export interface DealsApiAddDealProductRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiAddDealProduct
- */
- readonly id: number
-
- /**
- *
- * @type {AddDealProductRequest}
- * @memberof DealsApiAddDealProduct
- */
- readonly AddDealProductRequest?: AddDealProductRequest
-}
-
-/**
- * Request parameters for deleteDeal operation in DealsApi.
- * @export
- * @interface DealsApiDeleteDealRequest
- */
-export interface DealsApiDeleteDealRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiDeleteDeal
- */
- readonly id: number
-}
-
/**
* Request parameters for deleteDealFollower operation in DealsApi.
* @export
@@ -2800,27 +1703,6 @@ export interface DealsApiDeleteDealParticipantRequest {
readonly deal_participant_id: number
}
-/**
- * Request parameters for deleteDealProduct operation in DealsApi.
- * @export
- * @interface DealsApiDeleteDealProductRequest
- */
-export interface DealsApiDeleteDealProductRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiDeleteDealProduct
- */
- readonly id: number
-
- /**
- * The product attachment ID
- * @type {number}
- * @memberof DealsApiDeleteDealProduct
- */
- readonly product_attachment_id: number
-}
-
/**
* Request parameters for duplicateDeal operation in DealsApi.
* @export
@@ -3038,62 +1920,6 @@ export interface DealsApiGetArchivedDealsTimelineRequest {
readonly totals_convert_currency?: string
}
-/**
- * Request parameters for getDeal operation in DealsApi.
- * @export
- * @interface DealsApiGetDealRequest
- */
-export interface DealsApiGetDealRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiGetDeal
- */
- readonly id: number
-}
-
-/**
- * Request parameters for getDealActivities operation in DealsApi.
- * @export
- * @interface DealsApiGetDealActivitiesRequest
- */
-export interface DealsApiGetDealActivitiesRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiGetDealActivities
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof DealsApiGetDealActivities
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof DealsApiGetDealActivities
- */
- readonly limit?: number
-
- /**
- * Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
- * @type {0 | 1}
- * @memberof DealsApiGetDealActivities
- */
- readonly done?: 0 | 1
-
- /**
- * A comma-separated string of activity IDs to exclude from result
- * @type {string}
- * @memberof DealsApiGetDealActivities
- */
- readonly exclude?: string
-}
-
/**
* Request parameters for getDealChangelog operation in DealsApi.
* @export
@@ -3250,72 +2076,9 @@ export interface DealsApiGetDealParticipantsChangelogRequest {
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
- * @memberof DealsApiGetDealParticipantsChangelog
- */
- readonly cursor?: string
-}
-
-/**
- * Request parameters for getDealPersons operation in DealsApi.
- * @export
- * @interface DealsApiGetDealPersonsRequest
- */
-export interface DealsApiGetDealPersonsRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiGetDealPersons
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof DealsApiGetDealPersons
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof DealsApiGetDealPersons
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for getDealProducts operation in DealsApi.
- * @export
- * @interface DealsApiGetDealProductsRequest
- */
-export interface DealsApiGetDealProductsRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiGetDealProducts
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof DealsApiGetDealProducts
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof DealsApiGetDealProducts
- */
- readonly limit?: number
-
- /**
- * Whether to fetch product data along with each attached product (1) or not (0, default)
- * @type {0 | 1}
- * @memberof DealsApiGetDealProducts
+ * @memberof DealsApiGetDealParticipantsChangelog
*/
- readonly include_product_data?: 0 | 1
+ readonly cursor?: string
}
/**
@@ -3374,125 +2137,6 @@ export interface DealsApiGetDealUsersRequest {
readonly id: number
}
-/**
- * Request parameters for getDeals operation in DealsApi.
- * @export
- * @interface DealsApiGetDealsRequest
- */
-export interface DealsApiGetDealsRequest {
- /**
- * If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
- * @type {number}
- * @memberof DealsApiGetDeals
- */
- readonly user_id?: number
-
- /**
- * The ID of the filter to use
- * @type {number}
- * @memberof DealsApiGetDeals
- */
- readonly filter_id?: number
-
- /**
- * If supplied, only deals within the given stage will be returned
- * @type {number}
- * @memberof DealsApiGetDeals
- */
- readonly stage_id?: number
-
- /**
- * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @type {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'}
- * @memberof DealsApiGetDeals
- */
- readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'
-
- /**
- * Pagination start
- * @type {number}
- * @memberof DealsApiGetDeals
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof DealsApiGetDeals
- */
- readonly limit?: number
-
- /**
- * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @type {string}
- * @memberof DealsApiGetDeals
- */
- readonly sort?: string
-
- /**
- * When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
- * @type {0 | 1}
- * @memberof DealsApiGetDeals
- */
- readonly owned_by_you?: 0 | 1
-}
-
-/**
- * Request parameters for getDealsCollection operation in DealsApi.
- * @export
- * @interface DealsApiGetDealsCollectionRequest
- */
-export interface DealsApiGetDealsCollectionRequest {
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof DealsApiGetDealsCollection
- */
- 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 DealsApiGetDealsCollection
- */
- readonly limit?: number
-
- /**
- * The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @type {string}
- * @memberof DealsApiGetDealsCollection
- */
- readonly since?: string
-
- /**
- * The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @type {string}
- * @memberof DealsApiGetDealsCollection
- */
- readonly until?: string
-
- /**
- * If supplied, only deals matching the given user will be returned
- * @type {number}
- * @memberof DealsApiGetDealsCollection
- */
- readonly user_id?: number
-
- /**
- * If supplied, only deals within the given stage will be returned
- * @type {number}
- * @memberof DealsApiGetDealsCollection
- */
- readonly stage_id?: number
-
- /**
- * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @type {'open' | 'won' | 'lost' | 'deleted'}
- * @memberof DealsApiGetDealsCollection
- */
- readonly status?: 'open' | 'won' | 'lost' | 'deleted'
-}
-
/**
* Request parameters for getDealsSummary operation in DealsApi.
* @export
@@ -3626,125 +2270,6 @@ export interface DealsApiMergeDealsRequest {
readonly MergeDealsRequest?: MergeDealsRequest
}
-/**
- * Request parameters for searchDeals operation in DealsApi.
- * @export
- * @interface DealsApiSearchDealsRequest
- */
-export interface DealsApiSearchDealsRequest {
- /**
- * 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 DealsApiSearchDeals
- */
- 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 DealsApiSearchDeals
- */
- 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 DealsApiSearchDeals
- */
- 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 DealsApiSearchDeals
- */
- 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 DealsApiSearchDeals
- */
- 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 DealsApiSearchDeals
- */
- readonly status?: 'open' | 'won' | 'lost'
-
- /**
- * Supports including optional fields in the results which are not provided by default
- * @type {'deal.cc_email'}
- * @memberof DealsApiSearchDeals
- */
- readonly include_fields?: 'deal.cc_email'
-
- /**
- * Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @type {number}
- * @memberof DealsApiSearchDeals
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof DealsApiSearchDeals
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for updateDeal operation in DealsApi.
- * @export
- * @interface DealsApiUpdateDealRequest
- */
-export interface DealsApiUpdateDealRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiUpdateDeal
- */
- readonly id: number
-
- /**
- *
- * @type {UpdateDealRequest}
- * @memberof DealsApiUpdateDeal
- */
- readonly UpdateDealRequest?: UpdateDealRequest
-}
-
-/**
- * Request parameters for updateDealProduct operation in DealsApi.
- * @export
- * @interface DealsApiUpdateDealProductRequest
- */
-export interface DealsApiUpdateDealProductRequest {
- /**
- * The ID of the deal
- * @type {number}
- * @memberof DealsApiUpdateDealProduct
- */
- readonly id: number
-
- /**
- * The ID of the deal-product (the ID of the product attached to the deal)
- * @type {number}
- * @memberof DealsApiUpdateDealProduct
- */
- readonly product_attachment_id: number
-
- /**
- *
- * @type {UpdateDealProductRequest}
- * @memberof DealsApiUpdateDealProduct
- */
- readonly UpdateDealProductRequest?: UpdateDealProductRequest
-}
-
/**
* DealsApi - object-oriented interface
* @export
@@ -3752,18 +2277,6 @@ export interface DealsApiUpdateDealProductRequest {
* @extends {BaseAPI}
*/
export class DealsApi extends BaseAPI {
- /**
- * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
- * @summary Add a deal
- * @param {DealsApiAddDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public addDeal(requestParameters: DealsApiAddDealRequest = {}, ) {
- return DealsApiFp(this.configuration).addDeal(requestParameters.AddDealRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Adds a follower to a deal.
* @summary Add a follower to a deal
@@ -3788,30 +2301,6 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).addDealParticipant(requestParameters.id, requestParameters.AddDealParticipantRequest, ).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 {DealsApiAddDealProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public addDealProduct(requestParameters: DealsApiAddDealProductRequest, ) {
- return DealsApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
- * @summary Delete a deal
- * @param {DealsApiDeleteDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public deleteDeal(requestParameters: DealsApiDeleteDealRequest, ) {
- return DealsApiFp(this.configuration).deleteDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Deletes a follower from a deal.
* @summary Delete a follower from a deal
@@ -3836,18 +2325,6 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).deleteDealParticipant(requestParameters.id, requestParameters.deal_participant_id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled
- * @summary Delete an attached product from a deal
- * @param {DealsApiDeleteDealProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public deleteDealProduct(requestParameters: DealsApiDeleteDealProductRequest, ) {
- return DealsApiFp(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Duplicates a deal.
* @summary Duplicate deal
@@ -3896,30 +2373,6 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).getArchivedDealsTimeline(requestParameters.start_date, requestParameters.interval, requestParameters.amount, requestParameters.field_key, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.filter_id, requestParameters.exclude_deals, requestParameters.totals_convert_currency, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
- * @summary Get details of a deal
- * @param {DealsApiGetDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public getDeal(requestParameters: DealsApiGetDealRequest, ) {
- return DealsApiFp(this.configuration).getDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead.
- * @summary List activities associated with a deal
- * @param {DealsApiGetDealActivitiesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public getDealActivities(requestParameters: DealsApiGetDealActivitiesRequest, ) {
- return DealsApiFp(this.configuration).getDealActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists updates about field values of a deal.
* @summary List updates about deal field values
@@ -3992,30 +2445,6 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).getDealParticipantsChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead.
- * @summary List all persons associated with a deal
- * @param {DealsApiGetDealPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public getDealPersons(requestParameters: DealsApiGetDealPersonsRequest, ) {
- return DealsApiFp(this.configuration).getDealPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Lists products attached to a deal.
- * @summary List products attached to a deal
- * @param {DealsApiGetDealProductsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public getDealProducts(requestParameters: DealsApiGetDealProductsRequest, ) {
- return DealsApiFp(this.configuration).getDealProducts(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.include_product_data, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists updates about a deal.
* @summary List updates about a deal
@@ -4040,30 +2469,6 @@ export class DealsApi extends BaseAPI {
return DealsApiFp(this.configuration).getDealUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns all not archived deals. For more information, see the tutorial for getting all deals.
- * @summary Get all deals
- * @param {DealsApiGetDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public getDeals(requestParameters: DealsApiGetDealsRequest = {}, ) {
- return DealsApiFp(this.configuration).getDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead.
- * @summary Get all deals collection
- * @param {DealsApiGetDealsCollectionRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public getDealsCollection(requestParameters: DealsApiGetDealsCollectionRequest = {}, ) {
- return DealsApiFp(this.configuration).getDealsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.stage_id, requestParameters.status, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Returns a summary of all not archived deals.
* @summary Get deals summary
@@ -4099,40 +2504,4 @@ export class DealsApi extends BaseAPI {
public mergeDeals(requestParameters: DealsApiMergeDealsRequest, ) {
return DealsApiFp(this.configuration).mergeDeals(requestParameters.id, requestParameters.MergeDealsRequest, ).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 {DealsApiSearchDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public searchDeals(requestParameters: DealsApiSearchDealsRequest, ) {
- return DealsApiFp(this.configuration).searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
- * @summary Update a deal
- * @param {DealsApiUpdateDealRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public updateDeal(requestParameters: DealsApiUpdateDealRequest, ) {
- return DealsApiFp(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 {DealsApiUpdateDealProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof DealsApi
- */
- public updateDealProduct(requestParameters: DealsApiUpdateDealProductRequest, ) {
- return DealsApiFp(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v1/api/organizations-api.ts b/src/versions/v1/api/organizations-api.ts
index 16a57681..8a7c0adc 100644
--- a/src/versions/v1/api/organizations-api.ts
+++ b/src/versions/v1/api/organizations-api.ts
@@ -26,20 +26,8 @@ import { AddOrganizationFollowerRequest } from '../models';
// @ts-ignore
import { AddOrganizationFollowerResponse } from '../models';
// @ts-ignore
-import { AddOrganizationRequest } from '../models';
-// @ts-ignore
-import { AddOrganizationResponse } from '../models';
-// @ts-ignore
import { DeleteOrganizationFollowerResponse } from '../models';
// @ts-ignore
-import { DeleteOrganizationResponse } from '../models';
-// @ts-ignore
-import { FailResponse } from '../models';
-// @ts-ignore
-import { GetAssociatedActivitiesResponse } from '../models';
-// @ts-ignore
-import { GetAssociatedDealsResponse } from '../models';
-// @ts-ignore
import { GetAssociatedFilesResponse } from '../models';
// @ts-ignore
import { GetAssociatedFollowersResponse } from '../models';
@@ -50,72 +38,17 @@ import { GetAssociatedOrganizationUpdatesResponse } from '../models';
// @ts-ignore
import { GetChangelogResponse } from '../models';
// @ts-ignore
-import { GetOrganizationResponse } from '../models';
-// @ts-ignore
-import { GetOrganizationSearchResponse } from '../models';
-// @ts-ignore
-import { GetOrganizationsCollection200Response } from '../models';
-// @ts-ignore
-import { GetOrganizationsResponse } from '../models';
-// @ts-ignore
import { GetPermittedUsersResponse1 } from '../models';
// @ts-ignore
-import { GetPersonsResponse } from '../models';
-// @ts-ignore
import { MergeOrganizationsRequest } from '../models';
// @ts-ignore
import { MergeOrganizationsResponse } from '../models';
-// @ts-ignore
-import { UpdateOrganizationRequest } from '../models';
-// @ts-ignore
-import { UpdateOrganizationResponse } from '../models';
/**
* OrganizationsApi - axios parameter creator
* @export
*/
export const OrganizationsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
- /**
- * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization.
- * @summary Add an organization
- * @param {AddOrganizationRequest} [AddOrganizationRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- addOrganization: async (AddOrganizationRequest?: AddOrganizationRequest, ): Promise => {
- 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: 'POST', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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(AddOrganizationRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
/**
* Adds a follower to an organization.
* @summary Add a follower to an organization
@@ -161,47 +94,6 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
options: localVarRequestOptions,
};
},
- /**
- * Marks an organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete an organization
- * @param {number} id The ID of the organization
- * @deprecated
- * @throws {RequiredError}
- */
- deleteOrganization: async (id: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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,
- };
- },
/**
* 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
@@ -248,16 +140,18 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields.
- * @summary Get details of an organization
+ * Lists updates about field values of an organization.
+ * @summary List updates about organization field values
* @param {number} id The ID of the organization
- * @deprecated
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] Items shown per page
+
* @throws {RequiredError}
*/
- getOrganization: async (id: number, ): Promise => {
+ getOrganizationChangelog: async (id: number, cursor?: string, limit?: number, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganization', 'id', id)
- const localVarPath = `/organizations/{id}`
+ assertParamExists('getOrganizationChangelog', 'id', id)
+ const localVarPath = `/organizations/{id}/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);
@@ -275,7 +169,15 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
+
+ if (cursor !== undefined) {
+ localVarQueryParameter['cursor'] = cursor;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
@@ -289,20 +191,19 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead.
- * @summary List activities associated with an organization
+ * Lists files associated with an organization.
+ * @summary List files attached to an organization
* @param {number} id The ID of the organization
* @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities.
- * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
- * @deprecated
+ * @param {number} [limit] Items shown per page. Please note that a maximum value of 100 is allowed.
+ * @param {string} [sort] Supported fields: `id`, `update_time`
+
* @throws {RequiredError}
*/
- getOrganizationActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => {
+ getOrganizationFiles: async (id: number, start?: number, limit?: number, sort?: string, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationActivities', 'id', id)
- const localVarPath = `/organizations/{id}/activities`
+ assertParamExists('getOrganizationFiles', 'id', id)
+ const localVarPath = `/organizations/{id}/files`
.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);
@@ -320,7 +221,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
if (start !== undefined) {
localVarQueryParameter['start'] = start;
@@ -330,12 +231,8 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
localVarQueryParameter['limit'] = limit;
}
- if (done !== undefined) {
- localVarQueryParameter['done'] = done;
- }
-
- if (exclude !== undefined) {
- localVarQueryParameter['exclude'] = exclude;
+ if (sort !== undefined) {
+ localVarQueryParameter['sort'] = sort;
}
@@ -350,18 +247,16 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Lists updates about field values of an organization.
- * @summary List updates about organization field values
+ * Lists the followers of an organization.
+ * @summary List followers of an organization
* @param {number} id The ID of the organization
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] Items shown per page
* @throws {RequiredError}
*/
- getOrganizationChangelog: async (id: number, cursor?: string, limit?: number, ): Promise => {
+ getOrganizationFollowers: async (id: number, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationChangelog', 'id', id)
- const localVarPath = `/organizations/{id}/changelog`
+ 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);
@@ -379,15 +274,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
@@ -401,21 +288,18 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead.
- * @summary List deals associated with an organization
+ * Lists mail messages associated with an organization.
+ * @summary List mail messages associated with an organization
* @param {number} id The ID of the organization
* @param {number} [start] Pagination start
* @param {number} [limit] Items shown per page
- * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @param {0 | 1} [only_primary_association] If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization.
- * @deprecated
+
* @throws {RequiredError}
*/
- getOrganizationDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, only_primary_association?: 0 | 1, ): Promise => {
+ getOrganizationMailMessages: async (id: number, start?: number, limit?: number, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationDeals', 'id', id)
- const localVarPath = `/organizations/{id}/deals`
+ assertParamExists('getOrganizationMailMessages', 'id', id)
+ const localVarPath = `/organizations/{id}/mailMessages`
.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);
@@ -433,7 +317,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["mail:read", "mail:full"], configuration)
if (start !== undefined) {
localVarQueryParameter['start'] = start;
@@ -443,18 +327,6 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
localVarQueryParameter['limit'] = limit;
}
- if (status !== undefined) {
- localVarQueryParameter['status'] = status;
- }
-
- if (sort !== undefined) {
- localVarQueryParameter['sort'] = sort;
- }
-
- if (only_primary_association !== undefined) {
- localVarQueryParameter['only_primary_association'] = only_primary_association;
- }
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -467,19 +339,20 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Lists files associated with an organization.
- * @summary List files attached to an organization
+ * Lists updates about an organization.
+ * @summary List updates about an organization
* @param {number} id The ID of the organization
* @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page. Please note that a maximum value of 100 is allowed.
- * @param {string} [sort] Supported fields: `id`, `update_time`
+ * @param {number} [limit] Items shown per page
+ * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted, returns changes without custom field updates.
+ * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document).
* @throws {RequiredError}
*/
- getOrganizationFiles: async (id: number, start?: number, limit?: number, sort?: string, ): Promise => {
+ getOrganizationUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationFiles', 'id', id)
- const localVarPath = `/organizations/{id}/files`
+ assertParamExists('getOrganizationUpdates', 'id', id)
+ const localVarPath = `/organizations/{id}/flow`
.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);
@@ -497,7 +370,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
if (start !== undefined) {
localVarQueryParameter['start'] = start;
@@ -507,8 +380,12 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
localVarQueryParameter['limit'] = limit;
}
- if (sort !== undefined) {
- localVarQueryParameter['sort'] = sort;
+ if (all_changes !== undefined) {
+ localVarQueryParameter['all_changes'] = all_changes;
+ }
+
+ if (items !== undefined) {
+ localVarQueryParameter['items'] = items;
}
@@ -523,16 +400,16 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Lists the followers of an organization.
- * @summary List followers of an organization
+ * List users permitted to access an organization.
+ * @summary List permitted users
* @param {number} id The ID of the organization
* @throws {RequiredError}
*/
- getOrganizationFollowers: async (id: number, ): Promise => {
+ getOrganizationUsers: async (id: number, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationFollowers', 'id', id)
- const localVarPath = `/organizations/{id}/followers`
+ assertParamExists('getOrganizationUsers', 'id', id)
+ const localVarPath = `/organizations/{id}/permittedUsers`
.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);
@@ -564,18 +441,17 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
};
},
/**
- * Lists mail messages associated with an organization.
- * @summary List mail messages associated with an organization
+ * Merges an organization with another organization. For more information, see the tutorial for merging two organizations.
+ * @summary Merge two organizations
* @param {number} id The ID of the organization
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
+ * @param {MergeOrganizationsRequest} [MergeOrganizationsRequest]
* @throws {RequiredError}
*/
- getOrganizationMailMessages: async (id: number, start?: number, limit?: number, ): Promise => {
+ mergeOrganizations: async (id: number, MergeOrganizationsRequest?: MergeOrganizationsRequest, ): Promise => {
// verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationMailMessages', 'id', id)
- const localVarPath = `/organizations/{id}/mailMessages`
+ assertParamExists('mergeOrganizations', 'id', id)
+ const localVarPath = `/organizations/{id}/merge`
.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);
@@ -584,7 +460,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -593,518 +469,50 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["mail:read", "mail:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
+ 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(MergeOrganizationsRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
+ }
+};
+
+
+/**
+ * OrganizationsApi - functional programming interface
+ * @export
+ */
+export const OrganizationsApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = OrganizationsApiAxiosParamCreator(configuration)
+ return {
/**
- * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead.
- * @summary List persons of an organization
+ * Adds a follower to an organization.
+ * @summary Add a follower to an organization
* @param {number} id The ID of the organization
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @deprecated
+ * @param {AddOrganizationFollowerRequest} [AddOrganizationFollowerRequest]
+
* @throws {RequiredError}
*/
- getOrganizationPersons: async (id: number, start?: number, limit?: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationPersons', 'id', id)
- const localVarPath = `/organizations/{id}/persons`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Lists updates about an organization.
- * @summary List updates about an organization
- * @param {number} id The ID of the organization
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted, returns changes without custom field updates.
- * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document).
-
- * @throws {RequiredError}
- */
- getOrganizationUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationUpdates', 'id', id)
- const localVarPath = `/organizations/{id}/flow`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (all_changes !== undefined) {
- localVarQueryParameter['all_changes'] = all_changes;
- }
-
- if (items !== undefined) {
- localVarQueryParameter['items'] = items;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * List users permitted to access an organization.
- * @summary List permitted users
- * @param {number} id The ID of the organization
-
- * @throws {RequiredError}
- */
- getOrganizationUsers: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getOrganizationUsers', 'id', id)
- const localVarPath = `/organizations/{id}/permittedUsers`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns all organizations.
- * @summary Get all organizations
- * @param {number} [user_id] If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
- * @param {number} [filter_id] The ID of the filter to use
- * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizations: async (user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise => {
- 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
- if (user_id !== undefined) {
- localVarQueryParameter['user_id'] = user_id;
- }
-
- if (filter_id !== undefined) {
- localVarQueryParameter['filter_id'] = filter_id;
- }
-
- if (first_char !== undefined) {
- localVarQueryParameter['first_char'] = first_char;
- }
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (sort !== undefined) {
- localVarQueryParameter['sort'] = sort;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead.
- * @summary Get all organizations collection
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {number} [owner_id] If supplied, only organizations owned by the given user will be returned
- * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizationsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise => {
- const localVarPath = `/organizations/collection`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (since !== undefined) {
- localVarQueryParameter['since'] = since;
- }
-
- if (until !== undefined) {
- localVarQueryParameter['until'] = until;
- }
-
- if (owner_id !== undefined) {
- localVarQueryParameter['owner_id'] = owner_id;
- }
-
- if (first_char !== undefined) {
- localVarQueryParameter['first_char'] = first_char;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Merges an organization with another organization. For more information, see the tutorial for merging two organizations.
- * @summary Merge two organizations
- * @param {number} id The ID of the organization
- * @param {MergeOrganizationsRequest} [MergeOrganizationsRequest]
-
- * @throws {RequiredError}
- */
- mergeOrganizations: async (id: number, MergeOrganizationsRequest?: MergeOrganizationsRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('mergeOrganizations', 'id', id)
- const localVarPath = `/organizations/{id}/merge`
- .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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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(MergeOrganizationsRequest, localVarRequestOptions, configuration)
-
- 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} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- searchOrganization: async (term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, start?: number, limit?: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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 (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- 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 organization.
- * @summary Update an organization
- * @param {number} id The ID of the organization
- * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- updateOrganization: async (id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise => {
- // 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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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,
- };
- },
- }
-};
-
-
-/**
- * OrganizationsApi - functional programming interface
- * @export
- */
-export const OrganizationsApiFp = function(configuration?: Configuration) {
- const localVarAxiosParamCreator = OrganizationsApiAxiosParamCreator(configuration)
- return {
- /**
- * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization.
- * @summary Add an organization
- * @param {AddOrganizationRequest} [AddOrganizationRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async addOrganization(AddOrganizationRequest?: AddOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganization(AddOrganizationRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Adds a follower to an organization.
- * @summary Add a follower to an organization
- * @param {number} id The ID of the organization
- * @param {AddOrganizationFollowerRequest} [AddOrganizationFollowerRequest]
-
- * @throws {RequiredError}
- */
- async addOrganizationFollower(id: number, AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganizationFollower(id, AddOrganizationFollowerRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Marks an organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete an organization
- * @param {number} id The ID of the organization
- * @deprecated
- * @throws {RequiredError}
- */
- async deleteOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganization(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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 relationship between the follower and the organization
+ async addOrganizationFollower(id: number, AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganizationFollower(id, AddOrganizationFollowerRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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 relationship between the follower and the organization
* @throws {RequiredError}
*/
@@ -1112,32 +520,6 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationFollower(id, follower_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields.
- * @summary Get details of an organization
- * @param {number} id The ID of the organization
- * @deprecated
- * @throws {RequiredError}
- */
- async getOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead.
- * @summary List activities associated with an organization
- * @param {number} id The ID of the organization
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities.
- * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
- * @deprecated
- * @throws {RequiredError}
- */
- async getOrganizationActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationActivities(id, start, limit, done, exclude, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists updates about field values of an organization.
* @summary List updates about organization field values
@@ -1151,22 +533,6 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationChangelog(id, cursor, limit, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead.
- * @summary List deals associated with an organization
- * @param {number} id The ID of the organization
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @param {0 | 1} [only_primary_association] If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization.
- * @deprecated
- * @throws {RequiredError}
- */
- async getOrganizationDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, only_primary_association?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationDeals(id, start, limit, status, sort, only_primary_association, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists files associated with an organization.
* @summary List files attached to an organization
@@ -1205,19 +571,6 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationMailMessages(id, start, limit, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead.
- * @summary List persons of an organization
- * @param {number} id The ID of the organization
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async getOrganizationPersons(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationPersons(id, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists updates about an organization.
* @summary List updates about an organization
@@ -1244,38 +597,6 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationUsers(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns all organizations.
- * @summary Get all organizations
- * @param {number} [user_id] If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
- * @param {number} [filter_id] The ID of the filter to use
- * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @deprecated
- * @throws {RequiredError}
- */
- async getOrganizations(user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizations(user_id, filter_id, first_char, start, limit, sort, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead.
- * @summary Get all organizations collection
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {number} [owner_id] If supplied, only organizations owned by the given user will be returned
- * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
- * @deprecated
- * @throws {RequiredError}
- */
- async getOrganizationsCollection(cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationsCollection(cursor, limit, since, until, owner_id, first_char, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Merges an organization with another organization. For more information, see the tutorial for merging two organizations.
* @summary Merge two organizations
@@ -1288,33 +609,6 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.mergeOrganizations(id, MergeOrganizationsRequest, );
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} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async searchOrganization(term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchOrganization(term, fields, exact_match, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of an organization.
- * @summary Update an organization
- * @param {number} id The ID of the organization
- * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async updateOrganization(id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization(id, UpdateOrganizationRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
}
};
@@ -1325,16 +619,6 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
export const OrganizationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = OrganizationsApiFp(configuration)
return {
- /**
- * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization.
- * @summary Add an organization
- * @param {OrganizationsApiAddOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addOrganization(requestParameters: OrganizationsApiAddOrganizationRequest = {}, ): Promise {
- return localVarFp.addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(axios, basePath));
- },
/**
* Adds a follower to an organization.
* @summary Add a follower to an organization
@@ -1345,16 +629,6 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
addOrganizationFollower(requestParameters: OrganizationsApiAddOrganizationFollowerRequest, ): Promise {
return localVarFp.addOrganizationFollower(requestParameters.id, requestParameters.AddOrganizationFollowerRequest, ).then((request) => request(axios, basePath));
},
- /**
- * Marks an organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete an organization
- * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deleteOrganization(requestParameters: OrganizationsApiDeleteOrganizationRequest, ): Promise {
- return localVarFp.deleteOrganization(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* 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
@@ -1365,26 +639,6 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
deleteOrganizationFollower(requestParameters: OrganizationsApiDeleteOrganizationFollowerRequest, ): Promise {
return localVarFp.deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields.
- * @summary Get details of an organization
- * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, ): Promise {
- return localVarFp.getOrganization(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead.
- * @summary List activities associated with an organization
- * @param {OrganizationsApiGetOrganizationActivitiesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizationActivities(requestParameters: OrganizationsApiGetOrganizationActivitiesRequest, ): Promise {
- return localVarFp.getOrganizationActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(axios, basePath));
- },
/**
* Lists updates about field values of an organization.
* @summary List updates about organization field values
@@ -1395,16 +649,6 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
getOrganizationChangelog(requestParameters: OrganizationsApiGetOrganizationChangelogRequest, ): Promise {
return localVarFp.getOrganizationChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).then((request) => request(axios, basePath));
},
- /**
- * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead.
- * @summary List deals associated with an organization
- * @param {OrganizationsApiGetOrganizationDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizationDeals(requestParameters: OrganizationsApiGetOrganizationDealsRequest, ): Promise {
- return localVarFp.getOrganizationDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, requestParameters.only_primary_association, ).then((request) => request(axios, basePath));
- },
/**
* Lists files associated with an organization.
* @summary List files attached to an organization
@@ -1435,16 +679,6 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
getOrganizationMailMessages(requestParameters: OrganizationsApiGetOrganizationMailMessagesRequest, ): Promise {
return localVarFp.getOrganizationMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
},
- /**
- * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead.
- * @summary List persons of an organization
- * @param {OrganizationsApiGetOrganizationPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizationPersons(requestParameters: OrganizationsApiGetOrganizationPersonsRequest, ): Promise {
- return localVarFp.getOrganizationPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
/**
* Lists updates about an organization.
* @summary List updates about an organization
@@ -1465,26 +699,6 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
getOrganizationUsers(requestParameters: OrganizationsApiGetOrganizationUsersRequest, ): Promise {
return localVarFp.getOrganizationUsers(requestParameters.id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns all organizations.
- * @summary Get all organizations
- * @param {OrganizationsApiGetOrganizationsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizations(requestParameters: OrganizationsApiGetOrganizationsRequest = {}, ): Promise {
- return localVarFp.getOrganizations(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead.
- * @summary Get all organizations collection
- * @param {OrganizationsApiGetOrganizationsCollectionRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getOrganizationsCollection(requestParameters: OrganizationsApiGetOrganizationsCollectionRequest = {}, ): Promise {
- return localVarFp.getOrganizationsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(axios, basePath));
- },
/**
* Merges an organization with another organization. For more information, see the tutorial for merging two organizations.
* @summary Merge two organizations
@@ -1492,156 +706,52 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
* @throws {RequiredError}
*/
- mergeOrganizations(requestParameters: OrganizationsApiMergeOrganizationsRequest, ): Promise {
- return localVarFp.mergeOrganizations(requestParameters.id, requestParameters.MergeOrganizationsRequest, ).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 {OrganizationsApiSearchOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- searchOrganization(requestParameters: OrganizationsApiSearchOrganizationRequest, ): Promise {
- return localVarFp.searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of an organization.
- * @summary Update an organization
- * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, ): Promise {
- return localVarFp.updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest, ).then((request) => request(axios, basePath));
- },
- };
-};
-
-/**
- * Request parameters for addOrganization operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiAddOrganizationRequest
- */
-export interface OrganizationsApiAddOrganizationRequest {
- /**
- *
- * @type {AddOrganizationRequest}
- * @memberof OrganizationsApiAddOrganization
- */
- 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 {AddOrganizationFollowerRequest}
- * @memberof OrganizationsApiAddOrganizationFollower
- */
- readonly AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest
-}
-
-/**
- * Request parameters for deleteOrganization operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiDeleteOrganizationRequest
- */
-export interface OrganizationsApiDeleteOrganizationRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof OrganizationsApiDeleteOrganization
- */
- 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 relationship between the follower and the organization
- * @type {number}
- * @memberof OrganizationsApiDeleteOrganizationFollower
- */
- readonly follower_id: number
-}
+ mergeOrganizations(requestParameters: OrganizationsApiMergeOrganizationsRequest, ): Promise {
+ return localVarFp.mergeOrganizations(requestParameters.id, requestParameters.MergeOrganizationsRequest, ).then((request) => request(axios, basePath));
+ },
+ };
+};
/**
- * Request parameters for getOrganization operation in OrganizationsApi.
+ * Request parameters for addOrganizationFollower operation in OrganizationsApi.
* @export
- * @interface OrganizationsApiGetOrganizationRequest
+ * @interface OrganizationsApiAddOrganizationFollowerRequest
*/
-export interface OrganizationsApiGetOrganizationRequest {
+export interface OrganizationsApiAddOrganizationFollowerRequest {
/**
* The ID of the organization
* @type {number}
- * @memberof OrganizationsApiGetOrganization
+ * @memberof OrganizationsApiAddOrganizationFollower
*/
readonly id: number
+
+ /**
+ *
+ * @type {AddOrganizationFollowerRequest}
+ * @memberof OrganizationsApiAddOrganizationFollower
+ */
+ readonly AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest
}
/**
- * Request parameters for getOrganizationActivities operation in OrganizationsApi.
+ * Request parameters for deleteOrganizationFollower operation in OrganizationsApi.
* @export
- * @interface OrganizationsApiGetOrganizationActivitiesRequest
+ * @interface OrganizationsApiDeleteOrganizationFollowerRequest
*/
-export interface OrganizationsApiGetOrganizationActivitiesRequest {
+export interface OrganizationsApiDeleteOrganizationFollowerRequest {
/**
* The ID of the organization
* @type {number}
- * @memberof OrganizationsApiGetOrganizationActivities
+ * @memberof OrganizationsApiDeleteOrganizationFollower
*/
readonly id: number
/**
- * Pagination start
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationActivities
- */
- readonly start?: number
-
- /**
- * Items shown per page
+ * The ID of the relationship between the follower and the organization
* @type {number}
- * @memberof OrganizationsApiGetOrganizationActivities
- */
- readonly limit?: number
-
- /**
- * Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities.
- * @type {0 | 1}
- * @memberof OrganizationsApiGetOrganizationActivities
- */
- readonly done?: 0 | 1
-
- /**
- * A comma-separated string of activity IDs to exclude from result
- * @type {string}
- * @memberof OrganizationsApiGetOrganizationActivities
+ * @memberof OrganizationsApiDeleteOrganizationFollower
*/
- readonly exclude?: string
+ readonly follower_id: number
}
/**
@@ -1672,55 +782,6 @@ export interface OrganizationsApiGetOrganizationChangelogRequest {
readonly limit?: number
}
-/**
- * Request parameters for getOrganizationDeals operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiGetOrganizationDealsRequest
- */
-export interface OrganizationsApiGetOrganizationDealsRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationDeals
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationDeals
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationDeals
- */
- readonly limit?: number
-
- /**
- * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @type {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'}
- * @memberof OrganizationsApiGetOrganizationDeals
- */
- readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'
-
- /**
- * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @type {string}
- * @memberof OrganizationsApiGetOrganizationDeals
- */
- readonly sort?: string
-
- /**
- * If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization.
- * @type {0 | 1}
- * @memberof OrganizationsApiGetOrganizationDeals
- */
- readonly only_primary_association?: 0 | 1
-}
-
/**
* Request parameters for getOrganizationFiles operation in OrganizationsApi.
* @export
@@ -1798,34 +859,6 @@ export interface OrganizationsApiGetOrganizationMailMessagesRequest {
readonly limit?: number
}
-/**
- * Request parameters for getOrganizationPersons operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiGetOrganizationPersonsRequest
- */
-export interface OrganizationsApiGetOrganizationPersonsRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationPersons
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationPersons
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationPersons
- */
- readonly limit?: number
-}
-
/**
* Request parameters for getOrganizationUpdates operation in OrganizationsApi.
* @export
@@ -1882,104 +915,6 @@ export interface OrganizationsApiGetOrganizationUsersRequest {
readonly id: number
}
-/**
- * Request parameters for getOrganizations operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiGetOrganizationsRequest
- */
-export interface OrganizationsApiGetOrganizationsRequest {
- /**
- * If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
- * @type {number}
- * @memberof OrganizationsApiGetOrganizations
- */
- readonly user_id?: number
-
- /**
- * The ID of the filter to use
- * @type {number}
- * @memberof OrganizationsApiGetOrganizations
- */
- readonly filter_id?: number
-
- /**
- * If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
- * @type {string}
- * @memberof OrganizationsApiGetOrganizations
- */
- readonly first_char?: string
-
- /**
- * Pagination start
- * @type {number}
- * @memberof OrganizationsApiGetOrganizations
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof OrganizationsApiGetOrganizations
- */
- readonly limit?: number
-
- /**
- * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @type {string}
- * @memberof OrganizationsApiGetOrganizations
- */
- readonly sort?: string
-}
-
-/**
- * Request parameters for getOrganizationsCollection operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiGetOrganizationsCollectionRequest
- */
-export interface OrganizationsApiGetOrganizationsCollectionRequest {
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof OrganizationsApiGetOrganizationsCollection
- */
- 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 OrganizationsApiGetOrganizationsCollection
- */
- readonly limit?: number
-
- /**
- * The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @type {string}
- * @memberof OrganizationsApiGetOrganizationsCollection
- */
- readonly since?: string
-
- /**
- * The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @type {string}
- * @memberof OrganizationsApiGetOrganizationsCollection
- */
- readonly until?: string
-
- /**
- * If supplied, only organizations owned by the given user will be returned
- * @type {number}
- * @memberof OrganizationsApiGetOrganizationsCollection
- */
- readonly owner_id?: number
-
- /**
- * If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
- * @type {string}
- * @memberof OrganizationsApiGetOrganizationsCollection
- */
- readonly first_char?: string
-}
-
/**
* Request parameters for mergeOrganizations operation in OrganizationsApi.
* @export
@@ -2001,69 +936,6 @@ export interface OrganizationsApiMergeOrganizationsRequest {
readonly MergeOrganizationsRequest?: MergeOrganizationsRequest
}
-/**
- * Request parameters for searchOrganization operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiSearchOrganizationRequest
- */
-export interface OrganizationsApiSearchOrganizationRequest {
- /**
- * 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 OrganizationsApiSearchOrganization
- */
- 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 OrganizationsApiSearchOrganization
- */
- 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 OrganizationsApiSearchOrganization
- */
- readonly exact_match?: boolean
-
- /**
- * Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @type {number}
- * @memberof OrganizationsApiSearchOrganization
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof OrganizationsApiSearchOrganization
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for updateOrganization operation in OrganizationsApi.
- * @export
- * @interface OrganizationsApiUpdateOrganizationRequest
- */
-export interface OrganizationsApiUpdateOrganizationRequest {
- /**
- * The ID of the organization
- * @type {number}
- * @memberof OrganizationsApiUpdateOrganization
- */
- readonly id: number
-
- /**
- *
- * @type {UpdateOrganizationRequest}
- * @memberof OrganizationsApiUpdateOrganization
- */
- readonly UpdateOrganizationRequest?: UpdateOrganizationRequest
-}
-
/**
* OrganizationsApi - object-oriented interface
* @export
@@ -2071,18 +943,6 @@ export interface OrganizationsApiUpdateOrganizationRequest {
* @extends {BaseAPI}
*/
export class OrganizationsApi extends BaseAPI {
- /**
- * Adds a new organization. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the organizationFields and look for `key` values. For more information, see the tutorial for adding an organization.
- * @summary Add an organization
- * @param {OrganizationsApiAddOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public addOrganization(requestParameters: OrganizationsApiAddOrganizationRequest = {}, ) {
- return OrganizationsApiFp(this.configuration).addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Adds a follower to an organization.
* @summary Add a follower to an organization
@@ -2095,18 +955,6 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).addOrganizationFollower(requestParameters.id, requestParameters.AddOrganizationFollowerRequest, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Marks an organization as deleted. After 30 days, the organization will be permanently deleted.
- * @summary Delete an organization
- * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public deleteOrganization(requestParameters: OrganizationsApiDeleteOrganizationRequest, ) {
- return OrganizationsApiFp(this.configuration).deleteOrganization(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* 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
@@ -2119,30 +967,6 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields.
- * @summary Get details of an organization
- * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, ) {
- return OrganizationsApiFp(this.configuration).getOrganization(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead.
- * @summary List activities associated with an organization
- * @param {OrganizationsApiGetOrganizationActivitiesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public getOrganizationActivities(requestParameters: OrganizationsApiGetOrganizationActivitiesRequest, ) {
- return OrganizationsApiFp(this.configuration).getOrganizationActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists updates about field values of an organization.
* @summary List updates about organization field values
@@ -2155,18 +979,6 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).getOrganizationChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead.
- * @summary List deals associated with an organization
- * @param {OrganizationsApiGetOrganizationDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public getOrganizationDeals(requestParameters: OrganizationsApiGetOrganizationDealsRequest, ) {
- return OrganizationsApiFp(this.configuration).getOrganizationDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, requestParameters.only_primary_association, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists files associated with an organization.
* @summary List files attached to an organization
@@ -2203,18 +1015,6 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).getOrganizationMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead.
- * @summary List persons of an organization
- * @param {OrganizationsApiGetOrganizationPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public getOrganizationPersons(requestParameters: OrganizationsApiGetOrganizationPersonsRequest, ) {
- return OrganizationsApiFp(this.configuration).getOrganizationPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists updates about an organization.
* @summary List updates about an organization
@@ -2239,30 +1039,6 @@ export class OrganizationsApi extends BaseAPI {
return OrganizationsApiFp(this.configuration).getOrganizationUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns all organizations.
- * @summary Get all organizations
- * @param {OrganizationsApiGetOrganizationsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public getOrganizations(requestParameters: OrganizationsApiGetOrganizationsRequest = {}, ) {
- return OrganizationsApiFp(this.configuration).getOrganizations(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead.
- * @summary Get all organizations collection
- * @param {OrganizationsApiGetOrganizationsCollectionRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public getOrganizationsCollection(requestParameters: OrganizationsApiGetOrganizationsCollectionRequest = {}, ) {
- return OrganizationsApiFp(this.configuration).getOrganizationsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Merges an organization with another organization. For more information, see the tutorial for merging two organizations.
* @summary Merge two organizations
@@ -2274,28 +1050,4 @@ export class OrganizationsApi extends BaseAPI {
public mergeOrganizations(requestParameters: OrganizationsApiMergeOrganizationsRequest, ) {
return OrganizationsApiFp(this.configuration).mergeOrganizations(requestParameters.id, requestParameters.MergeOrganizationsRequest, ).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 {OrganizationsApiSearchOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public searchOrganization(requestParameters: OrganizationsApiSearchOrganizationRequest, ) {
- return OrganizationsApiFp(this.configuration).searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of an organization.
- * @summary Update an organization
- * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof OrganizationsApi
- */
- public updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, ) {
- return OrganizationsApiFp(this.configuration).updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v1/api/persons-api.ts b/src/versions/v1/api/persons-api.ts
index bc3ffa79..45c6808c 100644
--- a/src/versions/v1/api/persons-api.ts
+++ b/src/versions/v1/api/persons-api.ts
@@ -28,18 +28,8 @@ import { AddPersonFollowerResponse } from '../models';
// @ts-ignore
import { AddPersonPictureResponse } from '../models';
// @ts-ignore
-import { AddPersonRequest } from '../models';
-// @ts-ignore
-import { AddPersonResponse } from '../models';
-// @ts-ignore
import { DeletePersonResponse } from '../models';
// @ts-ignore
-import { FailResponse } from '../models';
-// @ts-ignore
-import { GetAssociatedActivitiesResponse } from '../models';
-// @ts-ignore
-import { GetAssociatedDealsResponse } from '../models';
-// @ts-ignore
import { GetAssociatedFilesResponse } from '../models';
// @ts-ignore
import { GetAssociatedMailMessagesResponse } from '../models';
@@ -52,70 +42,17 @@ import { GetListFollowersResponse } from '../models';
// @ts-ignore
import { GetPermittedUsersResponse1 } from '../models';
// @ts-ignore
-import { GetPersonDetailsResponse } from '../models';
-// @ts-ignore
import { GetPersonProductsResponse } from '../models';
// @ts-ignore
-import { GetPersonSearchResponse } from '../models';
-// @ts-ignore
-import { GetPersonsCollection200Response } from '../models';
-// @ts-ignore
-import { GetPersonsResponse1 } from '../models';
-// @ts-ignore
import { MergePersonsRequest } from '../models';
// @ts-ignore
import { MergePersonsResponse } from '../models';
-// @ts-ignore
-import { UpdatePersonRequest } from '../models';
-// @ts-ignore
-import { UpdatePersonResponse } from '../models';
/**
* PersonsApi - axios parameter creator
* @export
*/
export const PersonsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
- /**
- * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary Add a person
- * @param {AddPersonRequest} [AddPersonRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- addPerson: async (AddPersonRequest?: AddPersonRequest, ): Promise => {
- 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(localVarHeaderParameter, "x-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,
- };
- },
/**
* Adds a follower to a person.
* @summary Add a follower to a person
@@ -233,47 +170,6 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
options: localVarRequestOptions,
};
},
- /**
- * Marks a person as deleted. After 30 days, the person will be permanently deleted.
- * @summary Delete a person
- * @param {number} id The ID of the person
- * @deprecated
- * @throws {RequiredError}
- */
- deletePerson: async (id: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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,
- };
- },
/**
* Deletes a follower from a person.
* @summary Delete a follower from a person
@@ -351,108 +247,6 @@ 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,
- };
- },
- /**
- * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
- * @summary Get details of a person
- * @param {number} id The ID of the person
- * @deprecated
- * @throws {RequiredError}
- */
- getPerson: async (id: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead.
- * @summary List activities associated with a person
- * @param {number} id The ID of the person
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
- * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
- * @deprecated
- * @throws {RequiredError}
- */
- getPersonActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getPersonActivities', 'id', id)
- const localVarPath = `/persons/{id}/activities`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (done !== undefined) {
- localVarQueryParameter['done'] = done;
- }
-
- if (exclude !== undefined) {
- localVarQueryParameter['exclude'] = exclude;
- }
-
-
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -504,67 +298,6 @@ 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 deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead.
- * @summary List deals associated with a person
- * @param {number} id The ID of the person
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @deprecated
- * @throws {RequiredError}
- */
- getPersonDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getPersonDeals', 'id', id)
- const localVarPath = `/persons/{id}/deals`
- .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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (status !== undefined) {
- localVarQueryParameter['status'] = status;
- }
-
- if (sort !== undefined) {
- localVarQueryParameter['sort'] = sort;
- }
-
-
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -876,19 +609,18 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
};
},
/**
- * Returns all persons.
- * @summary Get all persons
- * @param {number} [user_id] If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
- * @param {number} [filter_id] The ID of the filter to use
- * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @deprecated
+ * Merges a person with another person. For more information, see the tutorial for merging two persons.
+ * @summary Merge two persons
+ * @param {number} id The ID of the person
+ * @param {MergePersonsRequest} [MergePersonsRequest]
+
* @throws {RequiredError}
*/
- getPersons: async (user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise => {
- const localVarPath = `/persons`;
+ mergePersons: async (id: number, MergePersonsRequest?: MergePersonsRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('mergePersons', 'id', id)
+ const localVarPath = `/persons/{id}/merge`
+ .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;
@@ -896,7 +628,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
baseOptions = configuration.baseOptions;
}
- const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
@@ -905,268 +637,16 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
// authentication oauth2 required
// oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
- if (user_id !== undefined) {
- localVarQueryParameter['user_id'] = user_id;
- }
-
- if (filter_id !== undefined) {
- localVarQueryParameter['filter_id'] = filter_id;
- }
-
- if (first_char !== undefined) {
- localVarQueryParameter['first_char'] = first_char;
- }
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (sort !== undefined) {
- localVarQueryParameter['sort'] = sort;
- }
+ 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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead.
- * @summary Get all persons collection
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {number} [owner_id] If supplied, only persons owned by the given user will be returned
- * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
- * @deprecated
- * @throws {RequiredError}
- */
- getPersonsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise => {
- const localVarPath = `/persons/collection`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
-
- if (cursor !== undefined) {
- localVarQueryParameter['cursor'] = cursor;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
- if (since !== undefined) {
- localVarQueryParameter['since'] = since;
- }
-
- if (until !== undefined) {
- localVarQueryParameter['until'] = until;
- }
-
- if (owner_id !== undefined) {
- localVarQueryParameter['owner_id'] = owner_id;
- }
-
- if (first_char !== undefined) {
- localVarQueryParameter['first_char'] = first_char;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Merges a person with another person. For more information, see the tutorial for merging two persons.
- * @summary Merge two persons
- * @param {number} id The ID of the person
- * @param {MergePersonsRequest} [MergePersonsRequest]
-
- * @throws {RequiredError}
- */
- mergePersons: async (id: number, MergePersonsRequest?: MergePersonsRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('mergePersons', 'id', id)
- const localVarPath = `/persons/{id}/merge`
- .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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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(MergePersonsRequest, localVarRequestOptions, configuration)
-
- 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} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- searchPersons: async (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', start?: number, limit?: number, ): Promise => {
- // 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(localVarHeaderParameter, "x-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 (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary 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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-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)
+ localVarRequestOptions.data = serializeDataIfNeeded(MergePersonsRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
@@ -1184,17 +664,6 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = PersonsApiAxiosParamCreator(configuration)
return {
- /**
- * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary Add a person
- * @param {AddPersonRequest} [AddPersonRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async addPerson(AddPersonRequest?: AddPersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addPerson(AddPersonRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Adds a follower to a person.
* @summary Add a follower to a person
@@ -1223,17 +692,6 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addPersonPicture(id, file, crop_x, crop_y, crop_width, crop_height, );
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
- * @deprecated
- * @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);
- },
/**
* Deletes a follower from a person.
* @summary Delete a follower from a person
@@ -1257,32 +715,6 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonPicture(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
- * @summary Get details of a person
- * @param {number} id The ID of the person
- * @deprecated
- * @throws {RequiredError}
- */
- async getPerson(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPerson(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead.
- * @summary List activities associated with a person
- * @param {number} id The ID of the person
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
- * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
- * @deprecated
- * @throws {RequiredError}
- */
- async getPersonActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonActivities(id, start, limit, done, exclude, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists updates about field values of a person.
* @summary List updates about person field values
@@ -1296,21 +728,6 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonChangelog(id, cursor, limit, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead.
- * @summary List deals associated with a person
- * @param {number} id The ID of the person
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @deprecated
- * @throws {RequiredError}
- */
- async getPersonDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonDeals(id, start, limit, status, sort, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists files associated with a person.
* @summary List files attached to a person
@@ -1388,38 +805,6 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonUsers(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns all persons.
- * @summary Get all persons
- * @param {number} [user_id] If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
- * @param {number} [filter_id] The ID of the filter to use
- * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @deprecated
- * @throws {RequiredError}
- */
- async getPersons(user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPersons(user_id, filter_id, first_char, start, limit, sort, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead.
- * @summary Get all persons collection
- * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
- * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
- * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @param {number} [owner_id] If supplied, only persons owned by the given user will be returned
- * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
- * @deprecated
- * @throws {RequiredError}
- */
- async getPersonsCollection(cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonsCollection(cursor, limit, since, until, owner_id, first_char, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Merges a person with another person. For more information, see the tutorial for merging two persons.
* @summary Merge two persons
@@ -1432,35 +817,6 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.mergePersons(id, MergePersonsRequest, );
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} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchPersons(term, fields, exact_match, organization_id, include_fields, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary 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);
- },
}
};
@@ -1471,16 +827,6 @@ export const PersonsApiFp = function(configuration?: Configuration) {
export const PersonsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = PersonsApiFp(configuration)
return {
- /**
- * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary Add a person
- * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addPerson(requestParameters: PersonsApiAddPersonRequest = {}, ): Promise {
- return localVarFp.addPerson(requestParameters.AddPersonRequest, ).then((request) => request(axios, basePath));
- },
/**
* Adds a follower to a person.
* @summary Add a follower to a person
@@ -1501,16 +847,6 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
addPersonPicture(requestParameters: PersonsApiAddPersonPictureRequest, ): Promise {
return localVarFp.addPersonPicture(requestParameters.id, requestParameters.file, requestParameters.crop_x, requestParameters.crop_y, requestParameters.crop_width, requestParameters.crop_height, ).then((request) => request(axios, basePath));
},
- /**
- * Marks a person as deleted. After 30 days, the person will be permanently deleted.
- * @summary Delete a person
- * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deletePerson(requestParameters: PersonsApiDeletePersonRequest, ): Promise {
- return localVarFp.deletePerson(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* Deletes a follower from a person.
* @summary Delete a follower from a person
@@ -1531,26 +867,6 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
deletePersonPicture(requestParameters: PersonsApiDeletePersonPictureRequest, ): Promise {
return localVarFp.deletePersonPicture(requestParameters.id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
- * @summary Get details of a person
- * @param {PersonsApiGetPersonRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getPerson(requestParameters: PersonsApiGetPersonRequest, ): Promise {
- return localVarFp.getPerson(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead.
- * @summary List activities associated with a person
- * @param {PersonsApiGetPersonActivitiesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getPersonActivities(requestParameters: PersonsApiGetPersonActivitiesRequest, ): Promise {
- return localVarFp.getPersonActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(axios, basePath));
- },
/**
* Lists updates about field values of a person.
* @summary List updates about person field values
@@ -1561,16 +877,6 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
getPersonChangelog(requestParameters: PersonsApiGetPersonChangelogRequest, ): Promise {
return localVarFp.getPersonChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).then((request) => request(axios, basePath));
},
- /**
- * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead.
- * @summary List deals associated with a person
- * @param {PersonsApiGetPersonDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getPersonDeals(requestParameters: PersonsApiGetPersonDealsRequest, ): Promise {
- return localVarFp.getPersonDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, ).then((request) => request(axios, basePath));
- },
/**
* Lists files associated with a person.
* @summary List files attached to a person
@@ -1631,73 +937,19 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
getPersonUsers(requestParameters: PersonsApiGetPersonUsersRequest, ): Promise {
return localVarFp.getPersonUsers(requestParameters.id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns all persons.
- * @summary Get all persons
- * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getPersons(requestParameters: PersonsApiGetPersonsRequest = {}, ): Promise {
- return localVarFp.getPersons(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead.
- * @summary Get all persons collection
- * @param {PersonsApiGetPersonsCollectionRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getPersonsCollection(requestParameters: PersonsApiGetPersonsCollectionRequest = {}, ): Promise {
- return localVarFp.getPersonsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(axios, basePath));
- },
/**
* Merges a person with another person. For more information, see the tutorial for merging two persons.
- * @summary Merge two persons
- * @param {PersonsApiMergePersonsRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- */
- mergePersons(requestParameters: PersonsApiMergePersonsRequest, ): Promise {
- return localVarFp.mergePersons(requestParameters.id, requestParameters.MergePersonsRequest, ).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 {PersonsApiSearchPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- searchPersons(requestParameters: PersonsApiSearchPersonsRequest, ): Promise {
- return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary Update a person
- * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
+ * @summary Merge two persons
+ * @param {PersonsApiMergePersonsRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
- updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ): Promise {
- return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(axios, basePath));
+ mergePersons(requestParameters: PersonsApiMergePersonsRequest, ): Promise {
+ return localVarFp.mergePersons(requestParameters.id, requestParameters.MergePersonsRequest, ).then((request) => request(axios, basePath));
},
};
};
-/**
- * Request parameters for addPerson operation in PersonsApi.
- * @export
- * @interface PersonsApiAddPersonRequest
- */
-export interface PersonsApiAddPersonRequest {
- /**
- *
- * @type {AddPersonRequest}
- * @memberof PersonsApiAddPerson
- */
- readonly AddPersonRequest?: AddPersonRequest
-}
-
/**
* Request parameters for addPersonFollower operation in PersonsApi.
* @export
@@ -1768,20 +1020,6 @@ export interface PersonsApiAddPersonPictureRequest {
readonly crop_height?: number
}
-/**
- * Request parameters for deletePerson operation in PersonsApi.
- * @export
- * @interface PersonsApiDeletePersonRequest
- */
-export interface PersonsApiDeletePersonRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof PersonsApiDeletePerson
- */
- readonly id: number
-}
-
/**
* Request parameters for deletePersonFollower operation in PersonsApi.
* @export
@@ -1817,62 +1055,6 @@ export interface PersonsApiDeletePersonPictureRequest {
readonly id: number
}
-/**
- * Request parameters for getPerson operation in PersonsApi.
- * @export
- * @interface PersonsApiGetPersonRequest
- */
-export interface PersonsApiGetPersonRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof PersonsApiGetPerson
- */
- readonly id: number
-}
-
-/**
- * Request parameters for getPersonActivities operation in PersonsApi.
- * @export
- * @interface PersonsApiGetPersonActivitiesRequest
- */
-export interface PersonsApiGetPersonActivitiesRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof PersonsApiGetPersonActivities
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof PersonsApiGetPersonActivities
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof PersonsApiGetPersonActivities
- */
- readonly limit?: number
-
- /**
- * Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
- * @type {0 | 1}
- * @memberof PersonsApiGetPersonActivities
- */
- readonly done?: 0 | 1
-
- /**
- * A comma-separated string of activity IDs to exclude from result
- * @type {string}
- * @memberof PersonsApiGetPersonActivities
- */
- readonly exclude?: string
-}
-
/**
* Request parameters for getPersonChangelog operation in PersonsApi.
* @export
@@ -1901,48 +1083,6 @@ export interface PersonsApiGetPersonChangelogRequest {
readonly limit?: number
}
-/**
- * Request parameters for getPersonDeals operation in PersonsApi.
- * @export
- * @interface PersonsApiGetPersonDealsRequest
- */
-export interface PersonsApiGetPersonDealsRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof PersonsApiGetPersonDeals
- */
- readonly id: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof PersonsApiGetPersonDeals
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof PersonsApiGetPersonDeals
- */
- readonly limit?: number
-
- /**
- * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
- * @type {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'}
- * @memberof PersonsApiGetPersonDeals
- */
- readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'
-
- /**
- * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @type {string}
- * @memberof PersonsApiGetPersonDeals
- */
- readonly sort?: string
-}
-
/**
* Request parameters for getPersonFiles operation in PersonsApi.
* @export
@@ -2104,104 +1244,6 @@ export interface PersonsApiGetPersonUsersRequest {
readonly id: number
}
-/**
- * Request parameters for getPersons operation in PersonsApi.
- * @export
- * @interface PersonsApiGetPersonsRequest
- */
-export interface PersonsApiGetPersonsRequest {
- /**
- * If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
- * @type {number}
- * @memberof PersonsApiGetPersons
- */
- readonly user_id?: number
-
- /**
- * The ID of the filter to use
- * @type {number}
- * @memberof PersonsApiGetPersons
- */
- readonly filter_id?: number
-
- /**
- * If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
- * @type {string}
- * @memberof PersonsApiGetPersons
- */
- readonly first_char?: string
-
- /**
- * Pagination start
- * @type {number}
- * @memberof PersonsApiGetPersons
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof PersonsApiGetPersons
- */
- readonly limit?: number
-
- /**
- * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
- * @type {string}
- * @memberof PersonsApiGetPersons
- */
- readonly sort?: string
-}
-
-/**
- * Request parameters for getPersonsCollection operation in PersonsApi.
- * @export
- * @interface PersonsApiGetPersonsCollectionRequest
- */
-export interface PersonsApiGetPersonsCollectionRequest {
- /**
- * For pagination, the marker (an opaque string value) representing the first item on the next page
- * @type {string}
- * @memberof PersonsApiGetPersonsCollection
- */
- 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 PersonsApiGetPersonsCollection
- */
- readonly limit?: number
-
- /**
- * The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @type {string}
- * @memberof PersonsApiGetPersonsCollection
- */
- readonly since?: string
-
- /**
- * The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
- * @type {string}
- * @memberof PersonsApiGetPersonsCollection
- */
- readonly until?: string
-
- /**
- * If supplied, only persons owned by the given user will be returned
- * @type {number}
- * @memberof PersonsApiGetPersonsCollection
- */
- readonly owner_id?: number
-
- /**
- * If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive)
- * @type {string}
- * @memberof PersonsApiGetPersonsCollection
- */
- readonly first_char?: string
-}
-
/**
* Request parameters for mergePersons operation in PersonsApi.
* @export
@@ -2223,83 +1265,6 @@ export interface PersonsApiMergePersonsRequest {
readonly MergePersonsRequest?: MergePersonsRequest
}
-/**
- * Request parameters for searchPersons operation in PersonsApi.
- * @export
- * @interface PersonsApiSearchPersonsRequest
- */
-export interface PersonsApiSearchPersonsRequest {
- /**
- * 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 PersonsApiSearchPersons
- */
- 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 PersonsApiSearchPersons
- */
- 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 PersonsApiSearchPersons
- */
- 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 PersonsApiSearchPersons
- */
- readonly organization_id?: number
-
- /**
- * Supports including optional fields in the results which are not provided by default
- * @type {'person.picture'}
- * @memberof PersonsApiSearchPersons
- */
- readonly include_fields?: 'person.picture'
-
- /**
- * Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @type {number}
- * @memberof PersonsApiSearchPersons
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof PersonsApiSearchPersons
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for updatePerson operation in PersonsApi.
- * @export
- * @interface PersonsApiUpdatePersonRequest
- */
-export interface PersonsApiUpdatePersonRequest {
- /**
- * The ID of the person
- * @type {number}
- * @memberof PersonsApiUpdatePerson
- */
- readonly id: number
-
- /**
- *
- * @type {UpdatePersonRequest}
- * @memberof PersonsApiUpdatePerson
- */
- readonly UpdatePersonRequest?: UpdatePersonRequest
-}
-
/**
* PersonsApi - object-oriented interface
* @export
@@ -2307,18 +1272,6 @@ export interface PersonsApiUpdatePersonRequest {
* @extends {BaseAPI}
*/
export class PersonsApi extends BaseAPI {
- /**
- * Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary Add a person
- * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public addPerson(requestParameters: PersonsApiAddPersonRequest = {}, ) {
- return PersonsApiFp(this.configuration).addPerson(requestParameters.AddPersonRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Adds a follower to a person.
* @summary Add a follower to a person
@@ -2343,18 +1296,6 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).addPersonPicture(requestParameters.id, requestParameters.file, requestParameters.crop_x, requestParameters.crop_y, requestParameters.crop_width, requestParameters.crop_height, ).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
- * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public deletePerson(requestParameters: PersonsApiDeletePersonRequest, ) {
- return PersonsApiFp(this.configuration).deletePerson(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Deletes a follower from a person.
* @summary Delete a follower from a person
@@ -2379,30 +1320,6 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).deletePersonPicture(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
- * @summary Get details of a person
- * @param {PersonsApiGetPersonRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public getPerson(requestParameters: PersonsApiGetPersonRequest, ) {
- return PersonsApiFp(this.configuration).getPerson(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead.
- * @summary List activities associated with a person
- * @param {PersonsApiGetPersonActivitiesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public getPersonActivities(requestParameters: PersonsApiGetPersonActivitiesRequest, ) {
- return PersonsApiFp(this.configuration).getPersonActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists updates about field values of a person.
* @summary List updates about person field values
@@ -2415,18 +1332,6 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).getPersonChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead.
- * @summary List deals associated with a person
- * @param {PersonsApiGetPersonDealsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public getPersonDeals(requestParameters: PersonsApiGetPersonDealsRequest, ) {
- return PersonsApiFp(this.configuration).getPersonDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists files associated with a person.
* @summary List files attached to a person
@@ -2499,30 +1404,6 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).getPersonUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns all persons.
- * @summary Get all persons
- * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public getPersons(requestParameters: PersonsApiGetPersonsRequest = {}, ) {
- return PersonsApiFp(this.configuration).getPersons(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead.
- * @summary Get all persons collection
- * @param {PersonsApiGetPersonsCollectionRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public getPersonsCollection(requestParameters: PersonsApiGetPersonsCollectionRequest = {}, ) {
- return PersonsApiFp(this.configuration).getPersonsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Merges a person with another person. For more information, see the tutorial for merging two persons.
* @summary Merge two persons
@@ -2534,28 +1415,4 @@ export class PersonsApi extends BaseAPI {
public mergePersons(requestParameters: PersonsApiMergePersonsRequest, ) {
return PersonsApiFp(this.configuration).mergePersons(requestParameters.id, requestParameters.MergePersonsRequest, ).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 {PersonsApiSearchPersonsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public searchPersons(requestParameters: PersonsApiSearchPersonsRequest, ) {
- return PersonsApiFp(this.configuration).searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
- * @summary Update a person
- * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
-
- * @throws {RequiredError}
- * @memberof PersonsApi
- */
- public updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ) {
- return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v1/api/pipelines-api.ts b/src/versions/v1/api/pipelines-api.ts
index 116dafed..68a32558 100644
--- a/src/versions/v1/api/pipelines-api.ts
+++ b/src/versions/v1/api/pipelines-api.ts
@@ -22,154 +22,17 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
-import { AddPipelineResponse } from '../models';
-// @ts-ignore
-import { DeletePipelineResponse } from '../models';
-// @ts-ignore
import { GetPipelineDealsConversionRatesInResponse } from '../models';
// @ts-ignore
import { GetPipelineDealsMovementsStatisticsResponse } from '../models';
// @ts-ignore
-import { GetPipelineResponse } from '../models';
-// @ts-ignore
-import { GetPipelinesResponse } from '../models';
-// @ts-ignore
import { GetStageDealsResponse } from '../models';
-// @ts-ignore
-import { PipelineRequest } from '../models';
-// @ts-ignore
-import { PipelineRequest1 } from '../models';
-// @ts-ignore
-import { UpdatePipelineResponse } from '../models';
/**
* PipelinesApi - axios parameter creator
* @export
*/
export const PipelinesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
- /**
- * Adds a new pipeline.
- * @summary Add a new pipeline
- * @param {PipelineRequest} [PipelineRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- addPipeline: async (PipelineRequest?: PipelineRequest, ): Promise => {
- const localVarPath = `/pipelines`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(PipelineRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Marks a pipeline as deleted.
- * @summary Delete a pipeline
- * @param {number} id The ID of the pipeline
- * @deprecated
- * @throws {RequiredError}
- */
- deletePipeline: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deletePipeline', 'id', id)
- const localVarPath = `/pipelines/{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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about a specific pipeline.
- * @summary Get one pipeline
- * @param {number} id The ID of the pipeline
- * @deprecated
- * @throws {RequiredError}
- */
- getPipeline: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getPipeline', 'id', id)
- const localVarPath = `/pipelines/{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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
/**
* Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period.
* @summary Get deals conversion rates in pipeline
@@ -374,88 +237,6 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about all pipelines.
- * @summary Get all pipelines
- * @deprecated
- * @throws {RequiredError}
- */
- getPipelines: async (): Promise => {
- const localVarPath = `/pipelines`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a pipeline.
- * @summary Update a pipeline
- * @param {number} id The ID of the pipeline
- * @param {PipelineRequest1} [PipelineRequest1]
- * @deprecated
- * @throws {RequiredError}
- */
- updatePipeline: async (id: number, PipelineRequest1?: PipelineRequest1, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updatePipeline', 'id', id)
- const localVarPath = `/pipelines/{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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(PipelineRequest1, localVarRequestOptions, configuration)
-
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -472,39 +253,6 @@ export const PipelinesApiAxiosParamCreator = function (configuration?: Configura
export const PipelinesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = PipelinesApiAxiosParamCreator(configuration)
return {
- /**
- * Adds a new pipeline.
- * @summary Add a new pipeline
- * @param {PipelineRequest} [PipelineRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async addPipeline(PipelineRequest?: PipelineRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addPipeline(PipelineRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Marks a pipeline as deleted.
- * @summary Delete a pipeline
- * @param {number} id The ID of the pipeline
- * @deprecated
- * @throws {RequiredError}
- */
- async deletePipeline(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deletePipeline(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about a specific pipeline.
- * @summary Get one pipeline
- * @param {number} id The ID of the pipeline
- * @deprecated
- * @throws {RequiredError}
- */
- async getPipeline(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPipeline(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period.
* @summary Get deals conversion rates in pipeline
@@ -552,28 +300,6 @@ export const PipelinesApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPipelineMovementStatistics(id, start_date, end_date, user_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns data about all pipelines.
- * @summary Get all pipelines
- * @deprecated
- * @throws {RequiredError}
- */
- async getPipelines(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPipelines();
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a pipeline.
- * @summary Update a pipeline
- * @param {number} id The ID of the pipeline
- * @param {PipelineRequest1} [PipelineRequest1]
- * @deprecated
- * @throws {RequiredError}
- */
- async updatePipeline(id: number, PipelineRequest1?: PipelineRequest1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updatePipeline(id, PipelineRequest1, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
}
};
@@ -584,36 +310,6 @@ export const PipelinesApiFp = function(configuration?: Configuration) {
export const PipelinesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = PipelinesApiFp(configuration)
return {
- /**
- * Adds a new pipeline.
- * @summary Add a new pipeline
- * @param {PipelinesApiAddPipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addPipeline(requestParameters: PipelinesApiAddPipelineRequest = {}, ): Promise {
- return localVarFp.addPipeline(requestParameters.PipelineRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks a pipeline as deleted.
- * @summary Delete a pipeline
- * @param {PipelinesApiDeletePipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deletePipeline(requestParameters: PipelinesApiDeletePipelineRequest, ): Promise {
- return localVarFp.deletePipeline(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns data about a specific pipeline.
- * @summary Get one pipeline
- * @param {PipelinesApiGetPipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getPipeline(requestParameters: PipelinesApiGetPipelineRequest, ): Promise {
- return localVarFp.getPipeline(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period.
* @summary Get deals conversion rates in pipeline
@@ -644,70 +340,9 @@ export const PipelinesApiFactory = function (configuration?: Configuration, base
getPipelineMovementStatistics(requestParameters: PipelinesApiGetPipelineMovementStatisticsRequest, ): Promise {
return localVarFp.getPipelineMovementStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns data about all pipelines.
- * @summary Get all pipelines
- * @deprecated
- * @throws {RequiredError}
- */
- getPipelines(): Promise {
- return localVarFp.getPipelines().then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a pipeline.
- * @summary Update a pipeline
- * @param {PipelinesApiUpdatePipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- updatePipeline(requestParameters: PipelinesApiUpdatePipelineRequest, ): Promise {
- return localVarFp.updatePipeline(requestParameters.id, requestParameters.PipelineRequest1, ).then((request) => request(axios, basePath));
- },
};
};
-/**
- * Request parameters for addPipeline operation in PipelinesApi.
- * @export
- * @interface PipelinesApiAddPipelineRequest
- */
-export interface PipelinesApiAddPipelineRequest {
- /**
- *
- * @type {PipelineRequest}
- * @memberof PipelinesApiAddPipeline
- */
- readonly PipelineRequest?: PipelineRequest
-}
-
-/**
- * Request parameters for deletePipeline operation in PipelinesApi.
- * @export
- * @interface PipelinesApiDeletePipelineRequest
- */
-export interface PipelinesApiDeletePipelineRequest {
- /**
- * The ID of the pipeline
- * @type {number}
- * @memberof PipelinesApiDeletePipeline
- */
- readonly id: number
-}
-
-/**
- * Request parameters for getPipeline operation in PipelinesApi.
- * @export
- * @interface PipelinesApiGetPipelineRequest
- */
-export interface PipelinesApiGetPipelineRequest {
- /**
- * The ID of the pipeline
- * @type {number}
- * @memberof PipelinesApiGetPipeline
- */
- readonly id: number
-}
-
/**
* Request parameters for getPipelineConversionStatistics operation in PipelinesApi.
* @export
@@ -848,27 +483,6 @@ export interface PipelinesApiGetPipelineMovementStatisticsRequest {
readonly user_id?: number
}
-/**
- * Request parameters for updatePipeline operation in PipelinesApi.
- * @export
- * @interface PipelinesApiUpdatePipelineRequest
- */
-export interface PipelinesApiUpdatePipelineRequest {
- /**
- * The ID of the pipeline
- * @type {number}
- * @memberof PipelinesApiUpdatePipeline
- */
- readonly id: number
-
- /**
- *
- * @type {PipelineRequest1}
- * @memberof PipelinesApiUpdatePipeline
- */
- readonly PipelineRequest1?: PipelineRequest1
-}
-
/**
* PipelinesApi - object-oriented interface
* @export
@@ -876,42 +490,6 @@ export interface PipelinesApiUpdatePipelineRequest {
* @extends {BaseAPI}
*/
export class PipelinesApi extends BaseAPI {
- /**
- * Adds a new pipeline.
- * @summary Add a new pipeline
- * @param {PipelinesApiAddPipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PipelinesApi
- */
- public addPipeline(requestParameters: PipelinesApiAddPipelineRequest = {}, ) {
- return PipelinesApiFp(this.configuration).addPipeline(requestParameters.PipelineRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Marks a pipeline as deleted.
- * @summary Delete a pipeline
- * @param {PipelinesApiDeletePipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PipelinesApi
- */
- public deletePipeline(requestParameters: PipelinesApiDeletePipelineRequest, ) {
- return PipelinesApiFp(this.configuration).deletePipeline(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns data about a specific pipeline.
- * @summary Get one pipeline
- * @param {PipelinesApiGetPipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PipelinesApi
- */
- public getPipeline(requestParameters: PipelinesApiGetPipelineRequest, ) {
- return PipelinesApiFp(this.configuration).getPipeline(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period.
* @summary Get deals conversion rates in pipeline
@@ -947,27 +525,4 @@ export class PipelinesApi extends BaseAPI {
public getPipelineMovementStatistics(requestParameters: PipelinesApiGetPipelineMovementStatisticsRequest, ) {
return PipelinesApiFp(this.configuration).getPipelineMovementStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(this.axios, this.basePath));
}
-
- /**
- * Returns data about all pipelines.
- * @summary Get all pipelines
- * @deprecated
- * @throws {RequiredError}
- * @memberof PipelinesApi
- */
- public getPipelines() {
- return PipelinesApiFp(this.configuration).getPipelines().then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of a pipeline.
- * @summary Update a pipeline
- * @param {PipelinesApiUpdatePipelineRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof PipelinesApi
- */
- public updatePipeline(requestParameters: PipelinesApiUpdatePipelineRequest, ) {
- return PipelinesApiFp(this.configuration).updatePipeline(requestParameters.id, requestParameters.PipelineRequest1, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v1/api/products-api.ts b/src/versions/v1/api/products-api.ts
index ae6e013a..c2f64b54 100644
--- a/src/versions/v1/api/products-api.ts
+++ b/src/versions/v1/api/products-api.ts
@@ -26,28 +26,14 @@ import { AddNewFollowerResponse } from '../models';
// @ts-ignore
import { AddProductFollowerRequest } from '../models';
// @ts-ignore
-import { AddProductRequest } from '../models';
-// @ts-ignore
import { DeleteProductFollowerResponse } from '../models';
// @ts-ignore
-import { DeleteProductResponse } from '../models';
-// @ts-ignore
import { GetAssociatedDealsResponse } from '../models';
// @ts-ignore
import { GetAssociatedProductFilesResponse } from '../models';
// @ts-ignore
import { GetProductFollowersResponse } from '../models';
// @ts-ignore
-import { GetProductResponse } from '../models';
-// @ts-ignore
-import { GetProductSearchResponse } from '../models';
-// @ts-ignore
-import { GetProductsResponse1 } from '../models';
-// @ts-ignore
-import { UpdateProductRequest } from '../models';
-// @ts-ignore
-import { UpdateProductResponse } from '../models';
-// @ts-ignore
import { UserIds } from '../models';
/**
* ProductsApi - axios parameter creator
@@ -55,47 +41,6 @@ import { UserIds } from '../models';
*/
export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
- /**
- * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
- * @summary Add a product
- * @param {AddProductRequest} [AddProductRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- addProduct: async (AddProductRequest?: AddProductRequest, ): Promise => {
- const localVarPath = `/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: 'POST', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddProductRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
/**
* Adds a follower to a product.
* @summary Add a follower to a product
@@ -141,47 +86,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
options: localVarRequestOptions,
};
},
- /**
- * Marks a product as deleted. After 30 days, the product will be permanently deleted.
- * @summary Delete a product
- * @param {number} id The ID of the product
- * @deprecated
- * @throws {RequiredError}
- */
- deleteProduct: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteProduct', 'id', id)
- const localVarPath = `/products/{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(localVarHeaderParameter, "x-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, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
/**
* Deletes a follower from a product.
* @summary Delete a follower from a product
@@ -218,47 +122,6 @@ 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,
- };
- },
- /**
- * Returns data about a specific product.
- * @summary Get one product
- * @param {number} id The ID of the product
- * @deprecated
- * @throws {RequiredError}
- */
- getProduct: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getProduct', 'id', id)
- const localVarPath = `/products/{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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration)
-
-
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
@@ -467,192 +330,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about all products.
- * @summary Get all products
- * @param {number} [user_id] If supplied, only products owned by the given user will be returned
- * @param {number} [filter_id] The ID of the filter to use
- * @param {Array} [ids] An array of integers with the IDs of the products that should be returned in the response
- * @param {string} [first_char] If supplied, only products whose name starts with the specified letter will be returned (case-insensitive)
- * @param {boolean} [get_summary] If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- getProducts: async (user_id?: number, filter_id?: number, ids?: Array, first_char?: string, get_summary?: boolean, start?: number, limit?: number, ): Promise => {
- const localVarPath = `/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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration)
-
- if (user_id !== undefined) {
- localVarQueryParameter['user_id'] = user_id;
- }
-
- if (filter_id !== undefined) {
- localVarQueryParameter['filter_id'] = filter_id;
- }
-
- if (ids) {
- localVarQueryParameter['ids'] = ids;
- }
-
- if (first_char !== undefined) {
- localVarQueryParameter['first_char'] = first_char;
- }
-
- if (get_summary !== undefined) {
- localVarQueryParameter['get_summary'] = get_summary;
- }
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
- * @summary Search products
- * @param {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 {'code' | 'custom_fields' | '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 {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- searchProducts: async (term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', start?: number, limit?: number, ): Promise => {
- // verify required parameter 'term' is not null or undefined
- assertParamExists('searchProducts', 'term', term)
- const localVarPath = `/products/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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products: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 (include_fields !== undefined) {
- localVarQueryParameter['include_fields'] = include_fields;
- }
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates product data.
- * @summary Update a product
- * @param {number} id The ID of the product
- * @param {UpdateProductRequest} [UpdateProductRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- updateProduct: async (id: number, UpdateProductRequest?: UpdateProductRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateProduct', 'id', id)
- const localVarPath = `/products/{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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateProductRequest, localVarRequestOptions, configuration)
-
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -669,17 +346,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
return {
- /**
- * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
- * @summary Add a product
- * @param {AddProductRequest} [AddProductRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async addProduct(AddProductRequest?: AddProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addProduct(AddProductRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Adds a follower to a product.
* @summary Add a follower to a product
@@ -692,17 +358,6 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.addProductFollower(id, AddProductFollowerRequest, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Marks a product as deleted. After 30 days, the product will be permanently deleted.
- * @summary Delete a product
- * @param {number} id The ID of the product
- * @deprecated
- * @throws {RequiredError}
- */
- async deleteProduct(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProduct(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Deletes a follower from a product.
* @summary Delete a follower from a product
@@ -715,17 +370,6 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductFollower(id, follower_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns data about a specific product.
- * @summary Get one product
- * @param {number} id The ID of the product
- * @deprecated
- * @throws {RequiredError}
- */
- async getProduct(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getProduct(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Returns data about deals that have a product attached to it.
* @summary Get deals where a product is attached to
@@ -778,51 +422,6 @@ export const ProductsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductUsers(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns data about all products.
- * @summary Get all products
- * @param {number} [user_id] If supplied, only products owned by the given user will be returned
- * @param {number} [filter_id] The ID of the filter to use
- * @param {Array} [ids] An array of integers with the IDs of the products that should be returned in the response
- * @param {string} [first_char] If supplied, only products whose name starts with the specified letter will be returned (case-insensitive)
- * @param {boolean} [get_summary] If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async getProducts(user_id?: number, filter_id?: number, ids?: Array, first_char?: string, get_summary?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(user_id, filter_id, ids, first_char, get_summary, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
- * @summary Search products
- * @param {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 {'code' | 'custom_fields' | '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 {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default
- * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async searchProducts(term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchProducts(term, fields, exact_match, include_fields, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates product data.
- * @summary Update a product
- * @param {number} id The ID of the product
- * @param {UpdateProductRequest} [UpdateProductRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async updateProduct(id: number, UpdateProductRequest?: UpdateProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateProduct(id, UpdateProductRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
}
};
@@ -833,16 +432,6 @@ export const ProductsApiFp = function(configuration?: Configuration) {
export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ProductsApiFp(configuration)
return {
- /**
- * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
- * @summary Add a product
- * @param {ProductsApiAddProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addProduct(requestParameters: ProductsApiAddProductRequest = {}, ): Promise {
- return localVarFp.addProduct(requestParameters.AddProductRequest, ).then((request) => request(axios, basePath));
- },
/**
* Adds a follower to a product.
* @summary Add a follower to a product
@@ -853,16 +442,6 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest, ): Promise {
return localVarFp.addProductFollower(requestParameters.id, requestParameters.AddProductFollowerRequest, ).then((request) => request(axios, basePath));
},
- /**
- * Marks a product as deleted. After 30 days, the product will be permanently deleted.
- * @summary Delete a product
- * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deleteProduct(requestParameters: ProductsApiDeleteProductRequest, ): Promise {
- return localVarFp.deleteProduct(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* Deletes a follower from a product.
* @summary Delete a follower from a product
@@ -873,16 +452,6 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest, ): Promise {
return localVarFp.deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns data about a specific product.
- * @summary Get one product
- * @param {ProductsApiGetProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getProduct(requestParameters: ProductsApiGetProductRequest, ): Promise {
- return localVarFp.getProduct(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* Returns data about deals that have a product attached to it.
* @summary Get deals where a product is attached to
@@ -923,53 +492,9 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
getProductUsers(requestParameters: ProductsApiGetProductUsersRequest, ): Promise {
return localVarFp.getProductUsers(requestParameters.id, ).then((request) => request(axios, basePath));
},
- /**
- * Returns data about all products.
- * @summary Get all products
- * @param {ProductsApiGetProductsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ): Promise {
- return localVarFp.getProducts(requestParameters.user_id, requestParameters.filter_id, requestParameters.ids, requestParameters.first_char, requestParameters.get_summary, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
- * @summary Search products
- * @param {ProductsApiSearchProductsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- searchProducts(requestParameters: ProductsApiSearchProductsRequest, ): Promise {
- return localVarFp.searchProducts(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates product data.
- * @summary Update a product
- * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- updateProduct(requestParameters: ProductsApiUpdateProductRequest, ): Promise {
- return localVarFp.updateProduct(requestParameters.id, requestParameters.UpdateProductRequest, ).then((request) => request(axios, basePath));
- },
};
};
-/**
- * Request parameters for addProduct operation in ProductsApi.
- * @export
- * @interface ProductsApiAddProductRequest
- */
-export interface ProductsApiAddProductRequest {
- /**
- *
- * @type {AddProductRequest}
- * @memberof ProductsApiAddProduct
- */
- readonly AddProductRequest?: AddProductRequest
-}
-
/**
* Request parameters for addProductFollower operation in ProductsApi.
* @export
@@ -991,20 +516,6 @@ export interface ProductsApiAddProductFollowerRequest {
readonly AddProductFollowerRequest?: AddProductFollowerRequest
}
-/**
- * Request parameters for deleteProduct operation in ProductsApi.
- * @export
- * @interface ProductsApiDeleteProductRequest
- */
-export interface ProductsApiDeleteProductRequest {
- /**
- * The ID of the product
- * @type {number}
- * @memberof ProductsApiDeleteProduct
- */
- readonly id: number
-}
-
/**
* Request parameters for deleteProductFollower operation in ProductsApi.
* @export
@@ -1026,20 +537,6 @@ export interface ProductsApiDeleteProductFollowerRequest {
readonly follower_id: number
}
-/**
- * Request parameters for getProduct operation in ProductsApi.
- * @export
- * @interface ProductsApiGetProductRequest
- */
-export interface ProductsApiGetProductRequest {
- /**
- * The ID of the product
- * @type {number}
- * @memberof ProductsApiGetProduct
- */
- readonly id: number
-}
-
/**
* Request parameters for getProductDeals operation in ProductsApi.
* @export
@@ -1152,132 +649,6 @@ export interface ProductsApiGetProductUsersRequest {
readonly id: number
}
-/**
- * Request parameters for getProducts operation in ProductsApi.
- * @export
- * @interface ProductsApiGetProductsRequest
- */
-export interface ProductsApiGetProductsRequest {
- /**
- * If supplied, only products owned by the given user will be returned
- * @type {number}
- * @memberof ProductsApiGetProducts
- */
- readonly user_id?: number
-
- /**
- * The ID of the filter to use
- * @type {number}
- * @memberof ProductsApiGetProducts
- */
- readonly filter_id?: number
-
- /**
- * An array of integers with the IDs of the products that should be returned in the response
- * @type {Array}
- * @memberof ProductsApiGetProducts
- */
- readonly ids?: Array
-
- /**
- * If supplied, only products whose name starts with the specified letter will be returned (case-insensitive)
- * @type {string}
- * @memberof ProductsApiGetProducts
- */
- readonly first_char?: string
-
- /**
- * If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property
- * @type {boolean}
- * @memberof ProductsApiGetProducts
- */
- readonly get_summary?: boolean
-
- /**
- * Pagination start
- * @type {number}
- * @memberof ProductsApiGetProducts
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof ProductsApiGetProducts
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for searchProducts operation in ProductsApi.
- * @export
- * @interface ProductsApiSearchProductsRequest
- */
-export interface ProductsApiSearchProductsRequest {
- /**
- * 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 ProductsApiSearchProducts
- */
- 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 {'code' | 'custom_fields' | 'name'}
- * @memberof ProductsApiSearchProducts
- */
- readonly fields?: 'code' | 'custom_fields' | 'name'
-
- /**
- * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
- * @type {boolean}
- * @memberof ProductsApiSearchProducts
- */
- readonly exact_match?: boolean
-
- /**
- * Supports including optional fields in the results which are not provided by default
- * @type {'product.price'}
- * @memberof ProductsApiSearchProducts
- */
- readonly include_fields?: 'product.price'
-
- /**
- * Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
- * @type {number}
- * @memberof ProductsApiSearchProducts
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof ProductsApiSearchProducts
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for updateProduct operation in ProductsApi.
- * @export
- * @interface ProductsApiUpdateProductRequest
- */
-export interface ProductsApiUpdateProductRequest {
- /**
- * The ID of the product
- * @type {number}
- * @memberof ProductsApiUpdateProduct
- */
- readonly id: number
-
- /**
- *
- * @type {UpdateProductRequest}
- * @memberof ProductsApiUpdateProduct
- */
- readonly UpdateProductRequest?: UpdateProductRequest
-}
-
/**
* ProductsApi - object-oriented interface
* @export
@@ -1285,18 +656,6 @@ export interface ProductsApiUpdateProductRequest {
* @extends {BaseAPI}
*/
export class ProductsApi extends BaseAPI {
- /**
- * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
- * @summary Add a product
- * @param {ProductsApiAddProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof ProductsApi
- */
- public addProduct(requestParameters: ProductsApiAddProductRequest = {}, ) {
- return ProductsApiFp(this.configuration).addProduct(requestParameters.AddProductRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Adds a follower to a product.
* @summary Add a follower to a product
@@ -1309,18 +668,6 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).addProductFollower(requestParameters.id, requestParameters.AddProductFollowerRequest, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Marks a product as deleted. After 30 days, the product will be permanently deleted.
- * @summary Delete a product
- * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof ProductsApi
- */
- public deleteProduct(requestParameters: ProductsApiDeleteProductRequest, ) {
- return ProductsApiFp(this.configuration).deleteProduct(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Deletes a follower from a product.
* @summary Delete a follower from a product
@@ -1333,18 +680,6 @@ export class ProductsApi extends BaseAPI {
return ProductsApiFp(this.configuration).deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
}
- /**
- * Returns data about a specific product.
- * @summary Get one product
- * @param {ProductsApiGetProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof ProductsApi
- */
- public getProduct(requestParameters: ProductsApiGetProductRequest, ) {
- return ProductsApiFp(this.configuration).getProduct(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Returns data about deals that have a product attached to it.
* @summary Get deals where a product is attached to
@@ -1392,40 +727,4 @@ export class ProductsApi extends BaseAPI {
public getProductUsers(requestParameters: ProductsApiGetProductUsersRequest, ) {
return ProductsApiFp(this.configuration).getProductUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}
-
- /**
- * Returns data about all products.
- * @summary Get all products
- * @param {ProductsApiGetProductsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof ProductsApi
- */
- public getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ) {
- return ProductsApiFp(this.configuration).getProducts(requestParameters.user_id, requestParameters.filter_id, requestParameters.ids, requestParameters.first_char, requestParameters.get_summary, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
- * @summary Search products
- * @param {ProductsApiSearchProductsRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof ProductsApi
- */
- public searchProducts(requestParameters: ProductsApiSearchProductsRequest, ) {
- return ProductsApiFp(this.configuration).searchProducts(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates product data.
- * @summary Update a product
- * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof ProductsApi
- */
- public updateProduct(requestParameters: ProductsApiUpdateProductRequest, ) {
- return ProductsApiFp(this.configuration).updateProduct(requestParameters.id, requestParameters.UpdateProductRequest, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v1/api/stages-api.ts b/src/versions/v1/api/stages-api.ts
index ccaa25e6..b30497e6 100644
--- a/src/versions/v1/api/stages-api.ts
+++ b/src/versions/v1/api/stages-api.ts
@@ -22,148 +22,13 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
-import { AddStageRequest } from '../models';
-// @ts-ignore
-import { DeleteStageResponse } from '../models';
-// @ts-ignore
import { GetStageDealsResponse } from '../models';
-// @ts-ignore
-import { GetStageResponse } from '../models';
-// @ts-ignore
-import { GetStagesResponse } from '../models';
-// @ts-ignore
-import { UpdateStageRequest } from '../models';
-// @ts-ignore
-import { UpsertStageResponse } from '../models';
/**
* StagesApi - axios parameter creator
* @export
*/
export const StagesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
- /**
- * Adds a new stage, returns the ID upon success.
- * @summary Add a new stage
- * @param {AddStageRequest} [AddStageRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- addStage: async (AddStageRequest?: AddStageRequest, ): Promise => {
- const localVarPath = `/stages`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(AddStageRequest, localVarRequestOptions, configuration)
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Marks a stage as deleted.
- * @summary Delete a stage
- * @param {number} id The ID of the stage
- * @deprecated
- * @throws {RequiredError}
- */
- deleteStage: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('deleteStage', 'id', id)
- const localVarPath = `/stages/{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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about a specific stage.
- * @summary Get one stage
- * @param {number} id The ID of the stage
- * @deprecated
- * @throws {RequiredError}
- */
- getStage: async (id: number, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('getStage', 'id', id)
- const localVarPath = `/stages/{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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin"], configuration)
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
/**
* Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead.
* @summary Get deals in a stage
@@ -225,103 +90,6 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Returns data about all stages.
- * @summary Get all stages
- * @param {number} [pipeline_id] The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched.
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- getStages: async (pipeline_id?: number, start?: number, limit?: number, ): Promise => {
- const localVarPath = `/stages`;
- // 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(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin"], configuration)
-
- if (pipeline_id !== undefined) {
- localVarQueryParameter['pipeline_id'] = pipeline_id;
- }
-
- if (start !== undefined) {
- localVarQueryParameter['start'] = start;
- }
-
- if (limit !== undefined) {
- localVarQueryParameter['limit'] = limit;
- }
-
-
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
-
- return {
- url: toPathString(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- * Updates the properties of a stage.
- * @summary Update stage details
- * @param {number} id The ID of the stage
- * @param {UpdateStageRequest} [UpdateStageRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- updateStage: async (id: number, UpdateStageRequest?: UpdateStageRequest, ): Promise => {
- // verify required parameter 'id' is not null or undefined
- assertParamExists('updateStage', 'id', id)
- const localVarPath = `/stages/{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: 'PUT', ...baseOptions };
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- // authentication api_key required
- await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)
-
- // authentication oauth2 required
- // oauth required
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
-
-
-
- localVarHeaderParameter['Content-Type'] = 'application/json';
-
- setSearchParams(localVarUrlObj, localVarQueryParameter);
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
- localVarRequestOptions.data = serializeDataIfNeeded(UpdateStageRequest, localVarRequestOptions, configuration)
-
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -338,39 +106,6 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio
export const StagesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = StagesApiAxiosParamCreator(configuration)
return {
- /**
- * Adds a new stage, returns the ID upon success.
- * @summary Add a new stage
- * @param {AddStageRequest} [AddStageRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async addStage(AddStageRequest?: AddStageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.addStage(AddStageRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Marks a stage as deleted.
- * @summary Delete a stage
- * @param {number} id The ID of the stage
- * @deprecated
- * @throws {RequiredError}
- */
- async deleteStage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStage(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Returns data about a specific stage.
- * @summary Get one stage
- * @param {number} id The ID of the stage
- * @deprecated
- * @throws {RequiredError}
- */
- async getStage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getStage(id, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
/**
* Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead.
* @summary Get deals in a stage
@@ -387,31 +122,6 @@ export const StagesApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getStageDeals(id, filter_id, user_id, everyone, start, limit, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
- /**
- * Returns data about all stages.
- * @summary Get all stages
- * @param {number} [pipeline_id] The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched.
- * @param {number} [start] Pagination start
- * @param {number} [limit] Items shown per page
- * @deprecated
- * @throws {RequiredError}
- */
- async getStages(pipeline_id?: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.getStages(pipeline_id, start, limit, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
- /**
- * Updates the properties of a stage.
- * @summary Update stage details
- * @param {number} id The ID of the stage
- * @param {UpdateStageRequest} [UpdateStageRequest]
- * @deprecated
- * @throws {RequiredError}
- */
- async updateStage(id: number, UpdateStageRequest?: UpdateStageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateStage(id, UpdateStageRequest, );
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
- },
}
};
@@ -422,36 +132,6 @@ export const StagesApiFp = function(configuration?: Configuration) {
export const StagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = StagesApiFp(configuration)
return {
- /**
- * Adds a new stage, returns the ID upon success.
- * @summary Add a new stage
- * @param {StagesApiAddStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- addStage(requestParameters: StagesApiAddStageRequest = {}, ): Promise {
- return localVarFp.addStage(requestParameters.AddStageRequest, ).then((request) => request(axios, basePath));
- },
- /**
- * Marks a stage as deleted.
- * @summary Delete a stage
- * @param {StagesApiDeleteStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- deleteStage(requestParameters: StagesApiDeleteStageRequest, ): Promise {
- return localVarFp.deleteStage(requestParameters.id, ).then((request) => request(axios, basePath));
- },
- /**
- * Returns data about a specific stage.
- * @summary Get one stage
- * @param {StagesApiGetStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getStage(requestParameters: StagesApiGetStageRequest, ): Promise {
- return localVarFp.getStage(requestParameters.id, ).then((request) => request(axios, basePath));
- },
/**
* Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead.
* @summary Get deals in a stage
@@ -462,71 +142,9 @@ export const StagesApiFactory = function (configuration?: Configuration, basePat
getStageDeals(requestParameters: StagesApiGetStageDealsRequest, ): Promise {
return localVarFp.getStageDeals(requestParameters.id, requestParameters.filter_id, requestParameters.user_id, requestParameters.everyone, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
},
- /**
- * Returns data about all stages.
- * @summary Get all stages
- * @param {StagesApiGetStagesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- getStages(requestParameters: StagesApiGetStagesRequest = {}, ): Promise {
- return localVarFp.getStages(requestParameters.pipeline_id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
- },
- /**
- * Updates the properties of a stage.
- * @summary Update stage details
- * @param {StagesApiUpdateStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- */
- updateStage(requestParameters: StagesApiUpdateStageRequest, ): Promise {
- return localVarFp.updateStage(requestParameters.id, requestParameters.UpdateStageRequest, ).then((request) => request(axios, basePath));
- },
};
};
-/**
- * Request parameters for addStage operation in StagesApi.
- * @export
- * @interface StagesApiAddStageRequest
- */
-export interface StagesApiAddStageRequest {
- /**
- *
- * @type {AddStageRequest}
- * @memberof StagesApiAddStage
- */
- readonly AddStageRequest?: AddStageRequest
-}
-
-/**
- * Request parameters for deleteStage operation in StagesApi.
- * @export
- * @interface StagesApiDeleteStageRequest
- */
-export interface StagesApiDeleteStageRequest {
- /**
- * The ID of the stage
- * @type {number}
- * @memberof StagesApiDeleteStage
- */
- readonly id: number
-}
-
-/**
- * Request parameters for getStage operation in StagesApi.
- * @export
- * @interface StagesApiGetStageRequest
- */
-export interface StagesApiGetStageRequest {
- /**
- * The ID of the stage
- * @type {number}
- * @memberof StagesApiGetStage
- */
- readonly id: number
-}
-
/**
* Request parameters for getStageDeals operation in StagesApi.
* @export
@@ -576,55 +194,6 @@ export interface StagesApiGetStageDealsRequest {
readonly limit?: number
}
-/**
- * Request parameters for getStages operation in StagesApi.
- * @export
- * @interface StagesApiGetStagesRequest
- */
-export interface StagesApiGetStagesRequest {
- /**
- * The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched.
- * @type {number}
- * @memberof StagesApiGetStages
- */
- readonly pipeline_id?: number
-
- /**
- * Pagination start
- * @type {number}
- * @memberof StagesApiGetStages
- */
- readonly start?: number
-
- /**
- * Items shown per page
- * @type {number}
- * @memberof StagesApiGetStages
- */
- readonly limit?: number
-}
-
-/**
- * Request parameters for updateStage operation in StagesApi.
- * @export
- * @interface StagesApiUpdateStageRequest
- */
-export interface StagesApiUpdateStageRequest {
- /**
- * The ID of the stage
- * @type {number}
- * @memberof StagesApiUpdateStage
- */
- readonly id: number
-
- /**
- *
- * @type {UpdateStageRequest}
- * @memberof StagesApiUpdateStage
- */
- readonly UpdateStageRequest?: UpdateStageRequest
-}
-
/**
* StagesApi - object-oriented interface
* @export
@@ -632,42 +201,6 @@ export interface StagesApiUpdateStageRequest {
* @extends {BaseAPI}
*/
export class StagesApi extends BaseAPI {
- /**
- * Adds a new stage, returns the ID upon success.
- * @summary Add a new stage
- * @param {StagesApiAddStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof StagesApi
- */
- public addStage(requestParameters: StagesApiAddStageRequest = {}, ) {
- return StagesApiFp(this.configuration).addStage(requestParameters.AddStageRequest, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Marks a stage as deleted.
- * @summary Delete a stage
- * @param {StagesApiDeleteStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof StagesApi
- */
- public deleteStage(requestParameters: StagesApiDeleteStageRequest, ) {
- return StagesApiFp(this.configuration).deleteStage(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Returns data about a specific stage.
- * @summary Get one stage
- * @param {StagesApiGetStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof StagesApi
- */
- public getStage(requestParameters: StagesApiGetStageRequest, ) {
- return StagesApiFp(this.configuration).getStage(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
- }
-
/**
* Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead.
* @summary Get deals in a stage
@@ -679,28 +212,4 @@ export class StagesApi extends BaseAPI {
public getStageDeals(requestParameters: StagesApiGetStageDealsRequest, ) {
return StagesApiFp(this.configuration).getStageDeals(requestParameters.id, requestParameters.filter_id, requestParameters.user_id, requestParameters.everyone, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
}
-
- /**
- * Returns data about all stages.
- * @summary Get all stages
- * @param {StagesApiGetStagesRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof StagesApi
- */
- public getStages(requestParameters: StagesApiGetStagesRequest = {}, ) {
- return StagesApiFp(this.configuration).getStages(requestParameters.pipeline_id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
- }
-
- /**
- * Updates the properties of a stage.
- * @summary Update stage details
- * @param {StagesApiUpdateStageRequest} requestParameters Request parameters.
- * @deprecated
- * @throws {RequiredError}
- * @memberof StagesApi
- */
- public updateStage(requestParameters: StagesApiUpdateStageRequest, ) {
- return StagesApiFp(this.configuration).updateStage(requestParameters.id, requestParameters.UpdateStageRequest, ).then((request) => request(this.axios, this.basePath));
- }
}
diff --git a/src/versions/v1/models/activity-all-of.ts b/src/versions/v1/models/activity-all-of.ts
index e1d6078d..e5ad1c6c 100644
--- a/src/versions/v1/models/activity-all-of.ts
+++ b/src/versions/v1/models/activity-all-of.ts
@@ -21,54 +21,259 @@
*/
export interface ActivityAllOf {
/**
- * The due date of the activity. Format: YYYY-MM-DD
+ * The ID of the activity, generated when the activity was created
+ * @type {number}
+ */
+ 'id': number;
+ /**
+ * The note of the activity (HTML format)
+ * @type {string}
+ */
+ 'note': string;
+ /**
+ * Whether the activity is done or not
+ * @type {boolean}
+ */
+ 'done': boolean;
+ /**
+ * The subject of the activity
+ * @type {string}
+ */
+ 'subject': string;
+ /**
+ * The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes.
+ * @type {string}
+ */
+ 'type': string;
+ /**
+ * The ID of the user whom the activity is assigned to
+ * @type {number}
+ */
+ 'user_id': number;
+ /**
+ * List of multiple persons (participants) this activity is associated with
+ * @type {Array