pipedrive 24.2.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/versions/v1/api/activities-api.d.ts +40 -40
- package/dist/esm/versions/v1/api/activities-api.js +40 -40
- package/dist/esm/versions/v1/api/deals-api.d.ts +413 -91
- package/dist/esm/versions/v1/api/deals-api.js +419 -90
- package/dist/esm/versions/v1/api/item-search-api.d.ts +8 -8
- package/dist/esm/versions/v1/api/item-search-api.js +8 -8
- package/dist/esm/versions/v1/api/leads-api.d.ts +100 -14
- package/dist/esm/versions/v1/api/leads-api.js +107 -14
- package/dist/esm/versions/v1/api/notes-api.d.ts +18 -2
- package/dist/esm/versions/v1/api/notes-api.js +15 -5
- package/dist/esm/versions/v1/api/organizations-api.d.ts +71 -71
- package/dist/esm/versions/v1/api/organizations-api.js +70 -70
- package/dist/esm/versions/v1/api/persons-api.d.ts +59 -59
- package/dist/esm/versions/v1/api/persons-api.js +58 -58
- package/dist/esm/versions/v1/api/pipelines-api.d.ts +28 -28
- package/dist/esm/versions/v1/api/pipelines-api.js +28 -28
- package/dist/esm/versions/v1/api/products-api.d.ts +24 -24
- package/dist/esm/versions/v1/api/products-api.js +24 -24
- package/dist/esm/versions/v1/api/stages-api.d.ts +36 -36
- package/dist/esm/versions/v1/api/stages-api.js +36 -36
- package/dist/esm/versions/v1/api/subscriptions-api.d.ts +36 -36
- package/dist/esm/versions/v1/api/subscriptions-api.js +36 -36
- package/dist/esm/versions/v1/api/webhooks-api.d.ts +4 -4
- package/dist/esm/versions/v1/api/webhooks-api.js +4 -4
- package/dist/esm/versions/v1/base.d.ts +2 -3
- package/dist/esm/versions/v1/configuration.d.ts +2 -2
- package/dist/esm/versions/v1/models/add-note-request-all-of.d.ts +9 -4
- package/dist/esm/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
- package/dist/esm/versions/v1/models/add-note-request-all-of1.js +4 -0
- package/dist/esm/versions/v1/models/add-webhook-request.d.ts +5 -6
- package/dist/esm/versions/v1/models/add-webhook-request.js +4 -5
- package/dist/esm/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/esm/versions/v1/models/index.d.ts +1 -0
- package/dist/esm/versions/v1/models/index.js +1 -0
- package/dist/esm/versions/v1/models/note-project.d.ts +23 -0
- package/dist/esm/versions/v1/models/note-project.js +14 -0
- package/dist/esm/versions/v1/models/note-request-all-of1.d.ts +5 -0
- package/dist/esm/versions/v1/models/note.d.ts +16 -0
- package/dist/esm/versions/v1/models/user-access.d.ts +3 -2
- package/dist/esm/versions/v1/models/user-access.js +4 -3
- package/dist/esm/versions/v1/models/user-access1.d.ts +3 -2
- package/dist/esm/versions/v1/models/user-access1.js +4 -3
- package/dist/esm/versions/v2/api/activities-api.d.ts +15 -7
- package/dist/esm/versions/v2/api/activities-api.js +12 -7
- package/dist/esm/versions/v2/api/beta-api.d.ts +194 -2532
- package/dist/esm/versions/v2/api/beta-api.js +263 -2928
- package/dist/esm/versions/v2/api/deals-api.d.ts +509 -4
- package/dist/esm/versions/v2/api/deals-api.js +589 -4
- package/dist/esm/versions/v2/api/leads-api.d.ts +111 -0
- package/dist/esm/versions/v2/api/leads-api.js +146 -1
- package/dist/esm/versions/v2/api/organizations-api.d.ts +237 -0
- package/dist/esm/versions/v2/api/organizations-api.js +301 -0
- package/dist/esm/versions/v2/api/persons-api.d.ts +245 -8
- package/dist/esm/versions/v2/api/persons-api.js +309 -8
- package/dist/esm/versions/v2/api/products-api.d.ts +237 -0
- package/dist/esm/versions/v2/api/products-api.js +301 -0
- package/dist/esm/versions/v2/api/users-api.d.ts +103 -0
- package/dist/esm/versions/v2/api/users-api.js +140 -0
- package/dist/esm/versions/v2/api.d.ts +1 -0
- package/dist/esm/versions/v2/api.js +1 -0
- package/dist/esm/versions/v2/base.d.ts +2 -3
- package/dist/esm/versions/v2/configuration.d.ts +2 -2
- package/dist/esm/versions/v2/models/activity-item.d.ts +5 -0
- package/dist/esm/versions/v2/models/activity-item1.d.ts +5 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.js +14 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.js +14 -0
- package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
- package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.js +14 -0
- package/dist/esm/versions/v2/models/add-deal-follower-request.d.ts +23 -0
- package/dist/esm/versions/v2/models/add-deal-follower-request.js +14 -0
- package/dist/esm/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
- package/dist/esm/versions/v2/models/add-follower-response-all-of.js +14 -0
- package/dist/esm/versions/v2/models/add-follower-response.d.ts +18 -0
- package/dist/esm/versions/v2/models/add-follower-response.js +14 -0
- package/dist/esm/versions/v2/models/add-person-request.d.ts +12 -0
- package/dist/esm/versions/v2/models/add-person-request.js +6 -1
- package/dist/esm/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
- package/dist/esm/versions/v2/models/convert-lead-to-deal-request.js +14 -0
- package/dist/esm/versions/v2/models/deal-item.d.ts +5 -0
- package/dist/esm/versions/v2/models/deal-item1.d.ts +5 -0
- package/dist/esm/versions/v2/models/delete-follower-response-data.d.ts +23 -0
- package/dist/esm/versions/v2/models/delete-follower-response-data.js +14 -0
- package/dist/esm/versions/v2/models/delete-follower-response.d.ts +29 -0
- package/dist/esm/versions/v2/models/delete-follower-response.js +14 -0
- package/dist/esm/versions/v2/models/follower-changelog-item.d.ts +38 -0
- package/dist/esm/versions/v2/models/follower-changelog-item.js +14 -0
- package/dist/esm/versions/v2/models/follower-item.d.ts +28 -0
- package/dist/esm/versions/v2/models/follower-item.js +14 -0
- package/dist/esm/versions/v2/models/follower-item1.d.ts +28 -0
- package/dist/esm/versions/v2/models/follower-item1.js +14 -0
- package/dist/esm/versions/v2/models/get-convert-response.d.ts +43 -0
- package/dist/esm/versions/v2/models/get-convert-response.js +14 -0
- package/dist/esm/versions/v2/models/get-convert-response1-data.d.ts +46 -0
- package/dist/esm/versions/v2/models/get-convert-response1-data.js +20 -0
- package/dist/esm/versions/v2/models/get-convert-response1.d.ts +34 -0
- package/dist/esm/versions/v2/models/get-convert-response1.js +14 -0
- package/dist/esm/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.js +14 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response.js +14 -0
- package/dist/esm/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
- package/dist/esm/versions/v2/models/get-followers-response-all-of.js +14 -0
- package/dist/esm/versions/v2/models/get-followers-response.d.ts +18 -0
- package/dist/esm/versions/v2/models/get-followers-response.js +14 -0
- package/dist/esm/versions/v2/models/index.d.ts +19 -0
- package/dist/esm/versions/v2/models/index.js +19 -0
- package/dist/esm/versions/v2/models/update-person-request.d.ts +12 -0
- package/dist/esm/versions/v2/models/update-person-request.js +6 -1
- package/dist/versions/v1/api/activities-api.d.ts +40 -40
- package/dist/versions/v1/api/activities-api.js +40 -40
- package/dist/versions/v1/api/deals-api.d.ts +413 -91
- package/dist/versions/v1/api/deals-api.js +419 -90
- package/dist/versions/v1/api/item-search-api.d.ts +8 -8
- package/dist/versions/v1/api/item-search-api.js +8 -8
- package/dist/versions/v1/api/leads-api.d.ts +100 -14
- package/dist/versions/v1/api/leads-api.js +107 -14
- package/dist/versions/v1/api/notes-api.d.ts +18 -2
- package/dist/versions/v1/api/notes-api.js +15 -5
- package/dist/versions/v1/api/organizations-api.d.ts +71 -71
- package/dist/versions/v1/api/organizations-api.js +70 -70
- package/dist/versions/v1/api/persons-api.d.ts +59 -59
- package/dist/versions/v1/api/persons-api.js +58 -58
- package/dist/versions/v1/api/pipelines-api.d.ts +28 -28
- package/dist/versions/v1/api/pipelines-api.js +28 -28
- package/dist/versions/v1/api/products-api.d.ts +24 -24
- package/dist/versions/v1/api/products-api.js +24 -24
- package/dist/versions/v1/api/stages-api.d.ts +36 -36
- package/dist/versions/v1/api/stages-api.js +36 -36
- package/dist/versions/v1/api/subscriptions-api.d.ts +36 -36
- package/dist/versions/v1/api/subscriptions-api.js +36 -36
- package/dist/versions/v1/api/webhooks-api.d.ts +4 -4
- package/dist/versions/v1/api/webhooks-api.js +4 -4
- package/dist/versions/v1/base.d.ts +2 -3
- package/dist/versions/v1/configuration.d.ts +2 -2
- package/dist/versions/v1/models/add-note-request-all-of.d.ts +9 -4
- package/dist/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
- package/dist/versions/v1/models/add-note-request-all-of1.js +5 -1
- package/dist/versions/v1/models/add-webhook-request.d.ts +5 -6
- package/dist/versions/v1/models/add-webhook-request.js +4 -5
- package/dist/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/versions/v1/models/index.d.ts +1 -0
- package/dist/versions/v1/models/index.js +1 -0
- package/dist/versions/v1/models/note-project.d.ts +23 -0
- package/dist/versions/v1/models/note-project.js +15 -0
- package/dist/versions/v1/models/note-request-all-of1.d.ts +5 -0
- package/dist/versions/v1/models/note.d.ts +16 -0
- package/dist/versions/v1/models/user-access.d.ts +3 -2
- package/dist/versions/v1/models/user-access.js +4 -3
- package/dist/versions/v1/models/user-access1.d.ts +3 -2
- package/dist/versions/v1/models/user-access1.js +4 -3
- package/dist/versions/v2/api/activities-api.d.ts +15 -7
- package/dist/versions/v2/api/activities-api.js +12 -7
- package/dist/versions/v2/api/beta-api.d.ts +194 -2532
- package/dist/versions/v2/api/beta-api.js +265 -2930
- package/dist/versions/v2/api/deals-api.d.ts +509 -4
- package/dist/versions/v2/api/deals-api.js +589 -4
- package/dist/versions/v2/api/leads-api.d.ts +111 -0
- package/dist/versions/v2/api/leads-api.js +145 -0
- package/dist/versions/v2/api/organizations-api.d.ts +237 -0
- package/dist/versions/v2/api/organizations-api.js +301 -0
- package/dist/versions/v2/api/persons-api.d.ts +245 -8
- package/dist/versions/v2/api/persons-api.js +309 -8
- package/dist/versions/v2/api/products-api.d.ts +237 -0
- package/dist/versions/v2/api/products-api.js +301 -0
- package/dist/versions/v2/api/users-api.d.ts +103 -0
- package/dist/versions/v2/api/users-api.js +150 -0
- package/dist/versions/v2/api.d.ts +1 -0
- package/dist/versions/v2/api.js +1 -0
- package/dist/versions/v2/base.d.ts +2 -3
- package/dist/versions/v2/configuration.d.ts +2 -2
- package/dist/versions/v2/models/activity-item.d.ts +5 -0
- package/dist/versions/v2/models/activity-item1.d.ts +5 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.js +15 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response.js +15 -0
- package/dist/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
- package/dist/versions/v2/models/add-convert-lead-to-deal-response.js +15 -0
- package/dist/versions/v2/models/add-deal-follower-request.d.ts +23 -0
- package/dist/versions/v2/models/add-deal-follower-request.js +15 -0
- package/dist/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
- package/dist/versions/v2/models/add-follower-response-all-of.js +15 -0
- package/dist/versions/v2/models/add-follower-response.d.ts +18 -0
- package/dist/versions/v2/models/add-follower-response.js +15 -0
- package/dist/versions/v2/models/add-person-request.d.ts +12 -0
- package/dist/versions/v2/models/add-person-request.js +7 -0
- package/dist/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
- package/dist/versions/v2/models/convert-lead-to-deal-request.js +15 -0
- package/dist/versions/v2/models/deal-item.d.ts +5 -0
- package/dist/versions/v2/models/deal-item1.d.ts +5 -0
- package/dist/versions/v2/models/delete-follower-response-data.d.ts +23 -0
- package/dist/versions/v2/models/delete-follower-response-data.js +15 -0
- package/dist/versions/v2/models/delete-follower-response.d.ts +29 -0
- package/dist/versions/v2/models/delete-follower-response.js +15 -0
- package/dist/versions/v2/models/follower-changelog-item.d.ts +38 -0
- package/dist/versions/v2/models/follower-changelog-item.js +15 -0
- package/dist/versions/v2/models/follower-item.d.ts +28 -0
- package/dist/versions/v2/models/follower-item.js +15 -0
- package/dist/versions/v2/models/follower-item1.d.ts +28 -0
- package/dist/versions/v2/models/follower-item1.js +15 -0
- package/dist/versions/v2/models/get-convert-response.d.ts +43 -0
- package/dist/versions/v2/models/get-convert-response.js +15 -0
- package/dist/versions/v2/models/get-convert-response1-data.d.ts +46 -0
- package/dist/versions/v2/models/get-convert-response1-data.js +23 -0
- package/dist/versions/v2/models/get-convert-response1.d.ts +34 -0
- package/dist/versions/v2/models/get-convert-response1.js +15 -0
- package/dist/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
- package/dist/versions/v2/models/get-follower-changelogs-response-all-of.js +15 -0
- package/dist/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
- package/dist/versions/v2/models/get-follower-changelogs-response.js +15 -0
- package/dist/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
- package/dist/versions/v2/models/get-followers-response-all-of.js +15 -0
- package/dist/versions/v2/models/get-followers-response.d.ts +18 -0
- package/dist/versions/v2/models/get-followers-response.js +15 -0
- package/dist/versions/v2/models/index.d.ts +19 -0
- package/dist/versions/v2/models/index.js +19 -0
- package/dist/versions/v2/models/update-person-request.d.ts +12 -0
- package/dist/versions/v2/models/update-person-request.js +7 -0
- package/package.json +1 -1
@@ -65,6 +65,43 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
65
65
|
options: localVarRequestOptions,
|
66
66
|
};
|
67
67
|
}),
|
68
|
+
/**
|
69
|
+
* Adds a user as a follower to the deal.
|
70
|
+
* @summary Add a follower to a deal
|
71
|
+
* @param {number} id The ID of the deal
|
72
|
+
* @param {AddDealFollowerRequest} [AddDealFollowerRequest]
|
73
|
+
|
74
|
+
* @throws {RequiredError}
|
75
|
+
*/
|
76
|
+
addDealFollower: (id, AddDealFollowerRequest) => __awaiter(this, void 0, void 0, function* () {
|
77
|
+
// verify required parameter 'id' is not null or undefined
|
78
|
+
assertParamExists('addDealFollower', 'id', id);
|
79
|
+
const localVarPath = `/deals/{id}/followers`
|
80
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
81
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
82
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
83
|
+
let baseOptions;
|
84
|
+
if (configuration) {
|
85
|
+
baseOptions = configuration.baseOptions;
|
86
|
+
}
|
87
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
88
|
+
const localVarHeaderParameter = {};
|
89
|
+
const localVarQueryParameter = {};
|
90
|
+
// authentication api_key required
|
91
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
92
|
+
// authentication oauth2 required
|
93
|
+
// oauth required
|
94
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
95
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
96
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
97
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
98
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
99
|
+
localVarRequestOptions.data = serializeDataIfNeeded(AddDealFollowerRequest, localVarRequestOptions, configuration);
|
100
|
+
return {
|
101
|
+
url: toPathString(localVarUrlObj),
|
102
|
+
options: localVarRequestOptions,
|
103
|
+
};
|
104
|
+
}),
|
68
105
|
/**
|
69
106
|
* Adds a product to a deal, creating a new item called a deal-product.
|
70
107
|
* @summary Add a product to a deal
|
@@ -102,6 +139,40 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
102
139
|
options: localVarRequestOptions,
|
103
140
|
};
|
104
141
|
}),
|
142
|
+
/**
|
143
|
+
* Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
|
144
|
+
* @summary Convert a deal to a lead (BETA)
|
145
|
+
* @param {number} id The ID of the deal to convert
|
146
|
+
|
147
|
+
* @throws {RequiredError}
|
148
|
+
*/
|
149
|
+
convertDealToLead: (id) => __awaiter(this, void 0, void 0, function* () {
|
150
|
+
// verify required parameter 'id' is not null or undefined
|
151
|
+
assertParamExists('convertDealToLead', 'id', id);
|
152
|
+
const localVarPath = `/deals/{id}/convert/lead`
|
153
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
154
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
155
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
156
|
+
let baseOptions;
|
157
|
+
if (configuration) {
|
158
|
+
baseOptions = configuration.baseOptions;
|
159
|
+
}
|
160
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
161
|
+
const localVarHeaderParameter = {};
|
162
|
+
const localVarQueryParameter = {};
|
163
|
+
// authentication api_key required
|
164
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
165
|
+
// authentication oauth2 required
|
166
|
+
// oauth required
|
167
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration);
|
168
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
169
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
170
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
171
|
+
return {
|
172
|
+
url: toPathString(localVarUrlObj),
|
173
|
+
options: localVarRequestOptions,
|
174
|
+
};
|
175
|
+
}),
|
105
176
|
/**
|
106
177
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
107
178
|
* @summary Delete a discount from a deal
|
@@ -174,6 +245,44 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
174
245
|
options: localVarRequestOptions,
|
175
246
|
};
|
176
247
|
}),
|
248
|
+
/**
|
249
|
+
* Deletes a user follower from the deal.
|
250
|
+
* @summary Delete a follower from a deal
|
251
|
+
* @param {number} id The ID of the deal
|
252
|
+
* @param {number} follower_id The ID of the following user
|
253
|
+
|
254
|
+
* @throws {RequiredError}
|
255
|
+
*/
|
256
|
+
deleteDealFollower: (id, follower_id) => __awaiter(this, void 0, void 0, function* () {
|
257
|
+
// verify required parameter 'id' is not null or undefined
|
258
|
+
assertParamExists('deleteDealFollower', 'id', id);
|
259
|
+
// verify required parameter 'follower_id' is not null or undefined
|
260
|
+
assertParamExists('deleteDealFollower', 'follower_id', follower_id);
|
261
|
+
const localVarPath = `/deals/{id}/followers/{follower_id}`
|
262
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
263
|
+
.replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_id)));
|
264
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
265
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
266
|
+
let baseOptions;
|
267
|
+
if (configuration) {
|
268
|
+
baseOptions = configuration.baseOptions;
|
269
|
+
}
|
270
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
271
|
+
const localVarHeaderParameter = {};
|
272
|
+
const localVarQueryParameter = {};
|
273
|
+
// authentication api_key required
|
274
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
275
|
+
// authentication oauth2 required
|
276
|
+
// oauth required
|
277
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
278
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
279
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
280
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
281
|
+
return {
|
282
|
+
url: toPathString(localVarUrlObj),
|
283
|
+
options: localVarRequestOptions,
|
284
|
+
};
|
285
|
+
}),
|
177
286
|
/**
|
178
287
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
179
288
|
* @summary Delete an attached product from a deal
|
@@ -284,6 +393,100 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
284
393
|
options: localVarRequestOptions,
|
285
394
|
};
|
286
395
|
}),
|
396
|
+
/**
|
397
|
+
* Returns data about all archived deals.
|
398
|
+
* @summary Get all archived deals
|
399
|
+
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
400
|
+
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
401
|
+
* @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
|
402
|
+
* @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
|
403
|
+
* @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
404
|
+
* @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
|
405
|
+
* @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
|
406
|
+
* @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored.
|
407
|
+
* @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
408
|
+
* @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
409
|
+
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
410
|
+
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
411
|
+
* @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time'} [include_fields] Optional comma separated string array of additional fields to include
|
412
|
+
* @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
|
413
|
+
* @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.
|
414
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
415
|
+
|
416
|
+
* @throws {RequiredError}
|
417
|
+
*/
|
418
|
+
getArchivedDeals: (filter_id, ids, owner_id, person_id, org_id, pipeline_id, stage_id, status, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
419
|
+
const localVarPath = `/deals/archived`;
|
420
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
421
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
422
|
+
let baseOptions;
|
423
|
+
if (configuration) {
|
424
|
+
baseOptions = configuration.baseOptions;
|
425
|
+
}
|
426
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
427
|
+
const localVarHeaderParameter = {};
|
428
|
+
const localVarQueryParameter = {};
|
429
|
+
// authentication api_key required
|
430
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
431
|
+
// authentication oauth2 required
|
432
|
+
// oauth required
|
433
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
434
|
+
if (filter_id !== undefined) {
|
435
|
+
localVarQueryParameter['filter_id'] = filter_id;
|
436
|
+
}
|
437
|
+
if (ids !== undefined) {
|
438
|
+
localVarQueryParameter['ids'] = ids;
|
439
|
+
}
|
440
|
+
if (owner_id !== undefined) {
|
441
|
+
localVarQueryParameter['owner_id'] = owner_id;
|
442
|
+
}
|
443
|
+
if (person_id !== undefined) {
|
444
|
+
localVarQueryParameter['person_id'] = person_id;
|
445
|
+
}
|
446
|
+
if (org_id !== undefined) {
|
447
|
+
localVarQueryParameter['org_id'] = org_id;
|
448
|
+
}
|
449
|
+
if (pipeline_id !== undefined) {
|
450
|
+
localVarQueryParameter['pipeline_id'] = pipeline_id;
|
451
|
+
}
|
452
|
+
if (stage_id !== undefined) {
|
453
|
+
localVarQueryParameter['stage_id'] = stage_id;
|
454
|
+
}
|
455
|
+
if (status !== undefined) {
|
456
|
+
localVarQueryParameter['status'] = status;
|
457
|
+
}
|
458
|
+
if (updated_since !== undefined) {
|
459
|
+
localVarQueryParameter['updated_since'] = updated_since;
|
460
|
+
}
|
461
|
+
if (updated_until !== undefined) {
|
462
|
+
localVarQueryParameter['updated_until'] = updated_until;
|
463
|
+
}
|
464
|
+
if (sort_by !== undefined) {
|
465
|
+
localVarQueryParameter['sort_by'] = sort_by;
|
466
|
+
}
|
467
|
+
if (sort_direction !== undefined) {
|
468
|
+
localVarQueryParameter['sort_direction'] = sort_direction;
|
469
|
+
}
|
470
|
+
if (include_fields !== undefined) {
|
471
|
+
localVarQueryParameter['include_fields'] = include_fields;
|
472
|
+
}
|
473
|
+
if (custom_fields !== undefined) {
|
474
|
+
localVarQueryParameter['custom_fields'] = custom_fields;
|
475
|
+
}
|
476
|
+
if (limit !== undefined) {
|
477
|
+
localVarQueryParameter['limit'] = limit;
|
478
|
+
}
|
479
|
+
if (cursor !== undefined) {
|
480
|
+
localVarQueryParameter['cursor'] = cursor;
|
481
|
+
}
|
482
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
483
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
484
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
485
|
+
return {
|
486
|
+
url: toPathString(localVarUrlObj),
|
487
|
+
options: localVarRequestOptions,
|
488
|
+
};
|
489
|
+
}),
|
287
490
|
/**
|
288
491
|
* Returns the details of a specific deal.
|
289
492
|
* @summary Get details of a deal
|
@@ -326,6 +529,128 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
326
529
|
options: localVarRequestOptions,
|
327
530
|
};
|
328
531
|
}),
|
532
|
+
/**
|
533
|
+
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
534
|
+
* @summary Get Deal conversion status (BETA)
|
535
|
+
* @param {number} id The ID of a deal
|
536
|
+
* @param {string} conversion_id The ID of the conversion
|
537
|
+
|
538
|
+
* @throws {RequiredError}
|
539
|
+
*/
|
540
|
+
getDealConversionStatus: (id, conversion_id) => __awaiter(this, void 0, void 0, function* () {
|
541
|
+
// verify required parameter 'id' is not null or undefined
|
542
|
+
assertParamExists('getDealConversionStatus', 'id', id);
|
543
|
+
// verify required parameter 'conversion_id' is not null or undefined
|
544
|
+
assertParamExists('getDealConversionStatus', 'conversion_id', conversion_id);
|
545
|
+
const localVarPath = `/deals/{id}/convert/status/{conversion_id}`
|
546
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
547
|
+
.replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id)));
|
548
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
549
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
550
|
+
let baseOptions;
|
551
|
+
if (configuration) {
|
552
|
+
baseOptions = configuration.baseOptions;
|
553
|
+
}
|
554
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
555
|
+
const localVarHeaderParameter = {};
|
556
|
+
const localVarQueryParameter = {};
|
557
|
+
// authentication api_key required
|
558
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
559
|
+
// authentication oauth2 required
|
560
|
+
// oauth required
|
561
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read"], configuration);
|
562
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
563
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
564
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
565
|
+
return {
|
566
|
+
url: toPathString(localVarUrlObj),
|
567
|
+
options: localVarRequestOptions,
|
568
|
+
};
|
569
|
+
}),
|
570
|
+
/**
|
571
|
+
* Lists users who are following the deal.
|
572
|
+
* @summary List followers of a deal
|
573
|
+
* @param {number} id The ID of the deal
|
574
|
+
* @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.
|
575
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
576
|
+
|
577
|
+
* @throws {RequiredError}
|
578
|
+
*/
|
579
|
+
getDealFollowers: (id, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
580
|
+
// verify required parameter 'id' is not null or undefined
|
581
|
+
assertParamExists('getDealFollowers', 'id', id);
|
582
|
+
const localVarPath = `/deals/{id}/followers`
|
583
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
584
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
585
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
586
|
+
let baseOptions;
|
587
|
+
if (configuration) {
|
588
|
+
baseOptions = configuration.baseOptions;
|
589
|
+
}
|
590
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
591
|
+
const localVarHeaderParameter = {};
|
592
|
+
const localVarQueryParameter = {};
|
593
|
+
// authentication api_key required
|
594
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
595
|
+
// authentication oauth2 required
|
596
|
+
// oauth required
|
597
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
598
|
+
if (limit !== undefined) {
|
599
|
+
localVarQueryParameter['limit'] = limit;
|
600
|
+
}
|
601
|
+
if (cursor !== undefined) {
|
602
|
+
localVarQueryParameter['cursor'] = cursor;
|
603
|
+
}
|
604
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
605
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
606
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
607
|
+
return {
|
608
|
+
url: toPathString(localVarUrlObj),
|
609
|
+
options: localVarRequestOptions,
|
610
|
+
};
|
611
|
+
}),
|
612
|
+
/**
|
613
|
+
* Lists changelogs about users have followed the deal.
|
614
|
+
* @summary List followers changelog of a deal
|
615
|
+
* @param {number} id The ID of the deal
|
616
|
+
* @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.
|
617
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
618
|
+
|
619
|
+
* @throws {RequiredError}
|
620
|
+
*/
|
621
|
+
getDealFollowersChangelog: (id, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
622
|
+
// verify required parameter 'id' is not null or undefined
|
623
|
+
assertParamExists('getDealFollowersChangelog', 'id', id);
|
624
|
+
const localVarPath = `/deals/{id}/followers/changelog`
|
625
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
626
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
627
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
628
|
+
let baseOptions;
|
629
|
+
if (configuration) {
|
630
|
+
baseOptions = configuration.baseOptions;
|
631
|
+
}
|
632
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
633
|
+
const localVarHeaderParameter = {};
|
634
|
+
const localVarQueryParameter = {};
|
635
|
+
// authentication api_key required
|
636
|
+
yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
|
637
|
+
// authentication oauth2 required
|
638
|
+
// oauth required
|
639
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
640
|
+
if (limit !== undefined) {
|
641
|
+
localVarQueryParameter['limit'] = limit;
|
642
|
+
}
|
643
|
+
if (cursor !== undefined) {
|
644
|
+
localVarQueryParameter['cursor'] = cursor;
|
645
|
+
}
|
646
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
647
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
648
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
649
|
+
return {
|
650
|
+
url: toPathString(localVarUrlObj),
|
651
|
+
options: localVarRequestOptions,
|
652
|
+
};
|
653
|
+
}),
|
329
654
|
/**
|
330
655
|
* Lists products attached to a deal.
|
331
656
|
* @summary List products attached to a deal
|
@@ -377,7 +702,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
377
702
|
};
|
378
703
|
}),
|
379
704
|
/**
|
380
|
-
* Returns data about all deals.
|
705
|
+
* Returns data about all not archived deals.
|
381
706
|
* @summary Get all deals
|
382
707
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
383
708
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
@@ -898,6 +1223,20 @@ export const DealsApiFp = function (configuration) {
|
|
898
1223
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
899
1224
|
});
|
900
1225
|
},
|
1226
|
+
/**
|
1227
|
+
* Adds a user as a follower to the deal.
|
1228
|
+
* @summary Add a follower to a deal
|
1229
|
+
* @param {number} id The ID of the deal
|
1230
|
+
* @param {AddDealFollowerRequest} [AddDealFollowerRequest]
|
1231
|
+
|
1232
|
+
* @throws {RequiredError}
|
1233
|
+
*/
|
1234
|
+
addDealFollower(id, AddDealFollowerRequest) {
|
1235
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1236
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.addDealFollower(id, AddDealFollowerRequest);
|
1237
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1238
|
+
});
|
1239
|
+
},
|
901
1240
|
/**
|
902
1241
|
* Adds a product to a deal, creating a new item called a deal-product.
|
903
1242
|
* @summary Add a product to a deal
|
@@ -912,6 +1251,19 @@ export const DealsApiFp = function (configuration) {
|
|
912
1251
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
913
1252
|
});
|
914
1253
|
},
|
1254
|
+
/**
|
1255
|
+
* Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
|
1256
|
+
* @summary Convert a deal to a lead (BETA)
|
1257
|
+
* @param {number} id The ID of the deal to convert
|
1258
|
+
|
1259
|
+
* @throws {RequiredError}
|
1260
|
+
*/
|
1261
|
+
convertDealToLead(id) {
|
1262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1263
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.convertDealToLead(id);
|
1264
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1265
|
+
});
|
1266
|
+
},
|
915
1267
|
/**
|
916
1268
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
917
1269
|
* @summary Delete a discount from a deal
|
@@ -939,6 +1291,20 @@ export const DealsApiFp = function (configuration) {
|
|
939
1291
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
940
1292
|
});
|
941
1293
|
},
|
1294
|
+
/**
|
1295
|
+
* Deletes a user follower from the deal.
|
1296
|
+
* @summary Delete a follower from a deal
|
1297
|
+
* @param {number} id The ID of the deal
|
1298
|
+
* @param {number} follower_id The ID of the following user
|
1299
|
+
|
1300
|
+
* @throws {RequiredError}
|
1301
|
+
*/
|
1302
|
+
deleteDealFollower(id, follower_id) {
|
1303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1304
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteDealFollower(id, follower_id);
|
1305
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1306
|
+
});
|
1307
|
+
},
|
942
1308
|
/**
|
943
1309
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
944
1310
|
* @summary Delete an attached product from a deal
|
@@ -980,6 +1346,34 @@ export const DealsApiFp = function (configuration) {
|
|
980
1346
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
981
1347
|
});
|
982
1348
|
},
|
1349
|
+
/**
|
1350
|
+
* Returns data about all archived deals.
|
1351
|
+
* @summary Get all archived deals
|
1352
|
+
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
1353
|
+
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
1354
|
+
* @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
|
1355
|
+
* @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
|
1356
|
+
* @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
1357
|
+
* @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
|
1358
|
+
* @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
|
1359
|
+
* @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored.
|
1360
|
+
* @param {string} [updated_since] If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
1361
|
+
* @param {string} [updated_until] If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
1362
|
+
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
1363
|
+
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
1364
|
+
* @param {'next_activity_id' | 'last_activity_id' | 'first_won_time' | 'products_count' | 'files_count' | 'notes_count' | 'followers_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'participants_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time'} [include_fields] Optional comma separated string array of additional fields to include
|
1365
|
+
* @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed.
|
1366
|
+
* @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.
|
1367
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1368
|
+
|
1369
|
+
* @throws {RequiredError}
|
1370
|
+
*/
|
1371
|
+
getArchivedDeals(filter_id, ids, owner_id, person_id, org_id, pipeline_id, stage_id, status, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
1372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1373
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getArchivedDeals(filter_id, ids, owner_id, person_id, org_id, pipeline_id, stage_id, status, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
1374
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1375
|
+
});
|
1376
|
+
},
|
983
1377
|
/**
|
984
1378
|
* Returns the details of a specific deal.
|
985
1379
|
* @summary Get details of a deal
|
@@ -995,6 +1389,50 @@ export const DealsApiFp = function (configuration) {
|
|
995
1389
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
996
1390
|
});
|
997
1391
|
},
|
1392
|
+
/**
|
1393
|
+
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
1394
|
+
* @summary Get Deal conversion status (BETA)
|
1395
|
+
* @param {number} id The ID of a deal
|
1396
|
+
* @param {string} conversion_id The ID of the conversion
|
1397
|
+
|
1398
|
+
* @throws {RequiredError}
|
1399
|
+
*/
|
1400
|
+
getDealConversionStatus(id, conversion_id) {
|
1401
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1402
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealConversionStatus(id, conversion_id);
|
1403
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1404
|
+
});
|
1405
|
+
},
|
1406
|
+
/**
|
1407
|
+
* Lists users who are following the deal.
|
1408
|
+
* @summary List followers of a deal
|
1409
|
+
* @param {number} id The ID of the deal
|
1410
|
+
* @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.
|
1411
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1412
|
+
|
1413
|
+
* @throws {RequiredError}
|
1414
|
+
*/
|
1415
|
+
getDealFollowers(id, limit, cursor) {
|
1416
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1417
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealFollowers(id, limit, cursor);
|
1418
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1419
|
+
});
|
1420
|
+
},
|
1421
|
+
/**
|
1422
|
+
* Lists changelogs about users have followed the deal.
|
1423
|
+
* @summary List followers changelog of a deal
|
1424
|
+
* @param {number} id The ID of the deal
|
1425
|
+
* @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.
|
1426
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1427
|
+
|
1428
|
+
* @throws {RequiredError}
|
1429
|
+
*/
|
1430
|
+
getDealFollowersChangelog(id, limit, cursor) {
|
1431
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1432
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealFollowersChangelog(id, limit, cursor);
|
1433
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1434
|
+
});
|
1435
|
+
},
|
998
1436
|
/**
|
999
1437
|
* Lists products attached to a deal.
|
1000
1438
|
* @summary List products attached to a deal
|
@@ -1013,7 +1451,7 @@ export const DealsApiFp = function (configuration) {
|
|
1013
1451
|
});
|
1014
1452
|
},
|
1015
1453
|
/**
|
1016
|
-
* Returns data about all deals.
|
1454
|
+
* Returns data about all not archived deals.
|
1017
1455
|
* @summary Get all deals
|
1018
1456
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
1019
1457
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
@@ -1201,6 +1639,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1201
1639
|
addDeal(requestParameters = {}) {
|
1202
1640
|
return localVarFp.addDeal(requestParameters.AddDealRequest).then((request) => request(axios, basePath));
|
1203
1641
|
},
|
1642
|
+
/**
|
1643
|
+
* Adds a user as a follower to the deal.
|
1644
|
+
* @summary Add a follower to a deal
|
1645
|
+
* @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
|
1646
|
+
|
1647
|
+
* @throws {RequiredError}
|
1648
|
+
*/
|
1649
|
+
addDealFollower(requestParameters) {
|
1650
|
+
return localVarFp.addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest).then((request) => request(axios, basePath));
|
1651
|
+
},
|
1204
1652
|
/**
|
1205
1653
|
* Adds a product to a deal, creating a new item called a deal-product.
|
1206
1654
|
* @summary Add a product to a deal
|
@@ -1211,6 +1659,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1211
1659
|
addDealProduct(requestParameters) {
|
1212
1660
|
return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(axios, basePath));
|
1213
1661
|
},
|
1662
|
+
/**
|
1663
|
+
* Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
|
1664
|
+
* @summary Convert a deal to a lead (BETA)
|
1665
|
+
* @param {DealsApiConvertDealToLeadRequest} requestParameters Request parameters.
|
1666
|
+
|
1667
|
+
* @throws {RequiredError}
|
1668
|
+
*/
|
1669
|
+
convertDealToLead(requestParameters) {
|
1670
|
+
return localVarFp.convertDealToLead(requestParameters.id).then((request) => request(axios, basePath));
|
1671
|
+
},
|
1214
1672
|
/**
|
1215
1673
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1216
1674
|
* @summary Delete a discount from a deal
|
@@ -1231,6 +1689,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1231
1689
|
deleteDeal(requestParameters) {
|
1232
1690
|
return localVarFp.deleteDeal(requestParameters.id).then((request) => request(axios, basePath));
|
1233
1691
|
},
|
1692
|
+
/**
|
1693
|
+
* Deletes a user follower from the deal.
|
1694
|
+
* @summary Delete a follower from a deal
|
1695
|
+
* @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
|
1696
|
+
|
1697
|
+
* @throws {RequiredError}
|
1698
|
+
*/
|
1699
|
+
deleteDealFollower(requestParameters) {
|
1700
|
+
return localVarFp.deleteDealFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(axios, basePath));
|
1701
|
+
},
|
1234
1702
|
/**
|
1235
1703
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
1236
1704
|
* @summary Delete an attached product from a deal
|
@@ -1261,6 +1729,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1261
1729
|
getAdditionalDiscounts(requestParameters) {
|
1262
1730
|
return localVarFp.getAdditionalDiscounts(requestParameters.id).then((request) => request(axios, basePath));
|
1263
1731
|
},
|
1732
|
+
/**
|
1733
|
+
* Returns data about all archived deals.
|
1734
|
+
* @summary Get all archived deals
|
1735
|
+
* @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters.
|
1736
|
+
|
1737
|
+
* @throws {RequiredError}
|
1738
|
+
*/
|
1739
|
+
getArchivedDeals(requestParameters = {}) {
|
1740
|
+
return localVarFp.getArchivedDeals(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.person_id, requestParameters.org_id, requestParameters.pipeline_id, requestParameters.stage_id, requestParameters.status, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
1741
|
+
},
|
1264
1742
|
/**
|
1265
1743
|
* Returns the details of a specific deal.
|
1266
1744
|
* @summary Get details of a deal
|
@@ -1271,6 +1749,36 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1271
1749
|
getDeal(requestParameters) {
|
1272
1750
|
return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
1273
1751
|
},
|
1752
|
+
/**
|
1753
|
+
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
1754
|
+
* @summary Get Deal conversion status (BETA)
|
1755
|
+
* @param {DealsApiGetDealConversionStatusRequest} requestParameters Request parameters.
|
1756
|
+
|
1757
|
+
* @throws {RequiredError}
|
1758
|
+
*/
|
1759
|
+
getDealConversionStatus(requestParameters) {
|
1760
|
+
return localVarFp.getDealConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(axios, basePath));
|
1761
|
+
},
|
1762
|
+
/**
|
1763
|
+
* Lists users who are following the deal.
|
1764
|
+
* @summary List followers of a deal
|
1765
|
+
* @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
|
1766
|
+
|
1767
|
+
* @throws {RequiredError}
|
1768
|
+
*/
|
1769
|
+
getDealFollowers(requestParameters) {
|
1770
|
+
return localVarFp.getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
1771
|
+
},
|
1772
|
+
/**
|
1773
|
+
* Lists changelogs about users have followed the deal.
|
1774
|
+
* @summary List followers changelog of a deal
|
1775
|
+
* @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
|
1776
|
+
|
1777
|
+
* @throws {RequiredError}
|
1778
|
+
*/
|
1779
|
+
getDealFollowersChangelog(requestParameters) {
|
1780
|
+
return localVarFp.getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
1781
|
+
},
|
1274
1782
|
/**
|
1275
1783
|
* Lists products attached to a deal.
|
1276
1784
|
* @summary List products attached to a deal
|
@@ -1282,7 +1790,7 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1282
1790
|
return localVarFp.getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
1283
1791
|
},
|
1284
1792
|
/**
|
1285
|
-
* Returns data about all deals.
|
1793
|
+
* Returns data about all not archived deals.
|
1286
1794
|
* @summary Get all deals
|
1287
1795
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1288
1796
|
|
@@ -1401,6 +1909,17 @@ export class DealsApi extends BaseAPI {
|
|
1401
1909
|
addDeal(requestParameters = {}) {
|
1402
1910
|
return DealsApiFp(this.configuration).addDeal(requestParameters.AddDealRequest).then((request) => request(this.axios, this.basePath));
|
1403
1911
|
}
|
1912
|
+
/**
|
1913
|
+
* Adds a user as a follower to the deal.
|
1914
|
+
* @summary Add a follower to a deal
|
1915
|
+
* @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
|
1916
|
+
|
1917
|
+
* @throws {RequiredError}
|
1918
|
+
* @memberof DealsApi
|
1919
|
+
*/
|
1920
|
+
addDealFollower(requestParameters) {
|
1921
|
+
return DealsApiFp(this.configuration).addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest).then((request) => request(this.axios, this.basePath));
|
1922
|
+
}
|
1404
1923
|
/**
|
1405
1924
|
* Adds a product to a deal, creating a new item called a deal-product.
|
1406
1925
|
* @summary Add a product to a deal
|
@@ -1412,6 +1931,17 @@ export class DealsApi extends BaseAPI {
|
|
1412
1931
|
addDealProduct(requestParameters) {
|
1413
1932
|
return DealsApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(this.axios, this.basePath));
|
1414
1933
|
}
|
1934
|
+
/**
|
1935
|
+
* Initiates a conversion of a deal to a lead. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
|
1936
|
+
* @summary Convert a deal to a lead (BETA)
|
1937
|
+
* @param {DealsApiConvertDealToLeadRequest} requestParameters Request parameters.
|
1938
|
+
|
1939
|
+
* @throws {RequiredError}
|
1940
|
+
* @memberof DealsApi
|
1941
|
+
*/
|
1942
|
+
convertDealToLead(requestParameters) {
|
1943
|
+
return DealsApiFp(this.configuration).convertDealToLead(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1944
|
+
}
|
1415
1945
|
/**
|
1416
1946
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1417
1947
|
* @summary Delete a discount from a deal
|
@@ -1434,6 +1964,17 @@ export class DealsApi extends BaseAPI {
|
|
1434
1964
|
deleteDeal(requestParameters) {
|
1435
1965
|
return DealsApiFp(this.configuration).deleteDeal(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1436
1966
|
}
|
1967
|
+
/**
|
1968
|
+
* Deletes a user follower from the deal.
|
1969
|
+
* @summary Delete a follower from a deal
|
1970
|
+
* @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
|
1971
|
+
|
1972
|
+
* @throws {RequiredError}
|
1973
|
+
* @memberof DealsApi
|
1974
|
+
*/
|
1975
|
+
deleteDealFollower(requestParameters) {
|
1976
|
+
return DealsApiFp(this.configuration).deleteDealFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(this.axios, this.basePath));
|
1977
|
+
}
|
1437
1978
|
/**
|
1438
1979
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
1439
1980
|
* @summary Delete an attached product from a deal
|
@@ -1467,6 +2008,17 @@ export class DealsApi extends BaseAPI {
|
|
1467
2008
|
getAdditionalDiscounts(requestParameters) {
|
1468
2009
|
return DealsApiFp(this.configuration).getAdditionalDiscounts(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1469
2010
|
}
|
2011
|
+
/**
|
2012
|
+
* Returns data about all archived deals.
|
2013
|
+
* @summary Get all archived deals
|
2014
|
+
* @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters.
|
2015
|
+
|
2016
|
+
* @throws {RequiredError}
|
2017
|
+
* @memberof DealsApi
|
2018
|
+
*/
|
2019
|
+
getArchivedDeals(requestParameters = {}) {
|
2020
|
+
return DealsApiFp(this.configuration).getArchivedDeals(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.person_id, requestParameters.org_id, requestParameters.pipeline_id, requestParameters.stage_id, requestParameters.status, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
2021
|
+
}
|
1470
2022
|
/**
|
1471
2023
|
* Returns the details of a specific deal.
|
1472
2024
|
* @summary Get details of a deal
|
@@ -1478,6 +2030,39 @@ export class DealsApi extends BaseAPI {
|
|
1478
2030
|
getDeal(requestParameters) {
|
1479
2031
|
return DealsApiFp(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
1480
2032
|
}
|
2033
|
+
/**
|
2034
|
+
* Returns information about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Lead ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
2035
|
+
* @summary Get Deal conversion status (BETA)
|
2036
|
+
* @param {DealsApiGetDealConversionStatusRequest} requestParameters Request parameters.
|
2037
|
+
|
2038
|
+
* @throws {RequiredError}
|
2039
|
+
* @memberof DealsApi
|
2040
|
+
*/
|
2041
|
+
getDealConversionStatus(requestParameters) {
|
2042
|
+
return DealsApiFp(this.configuration).getDealConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(this.axios, this.basePath));
|
2043
|
+
}
|
2044
|
+
/**
|
2045
|
+
* Lists users who are following the deal.
|
2046
|
+
* @summary List followers of a deal
|
2047
|
+
* @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
|
2048
|
+
|
2049
|
+
* @throws {RequiredError}
|
2050
|
+
* @memberof DealsApi
|
2051
|
+
*/
|
2052
|
+
getDealFollowers(requestParameters) {
|
2053
|
+
return DealsApiFp(this.configuration).getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
2054
|
+
}
|
2055
|
+
/**
|
2056
|
+
* Lists changelogs about users have followed the deal.
|
2057
|
+
* @summary List followers changelog of a deal
|
2058
|
+
* @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
|
2059
|
+
|
2060
|
+
* @throws {RequiredError}
|
2061
|
+
* @memberof DealsApi
|
2062
|
+
*/
|
2063
|
+
getDealFollowersChangelog(requestParameters) {
|
2064
|
+
return DealsApiFp(this.configuration).getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
2065
|
+
}
|
1481
2066
|
/**
|
1482
2067
|
* Lists products attached to a deal.
|
1483
2068
|
* @summary List products attached to a deal
|
@@ -1490,7 +2075,7 @@ export class DealsApi extends BaseAPI {
|
|
1490
2075
|
return DealsApiFp(this.configuration).getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
|
1491
2076
|
}
|
1492
2077
|
/**
|
1493
|
-
* Returns data about all deals.
|
2078
|
+
* Returns data about all not archived deals.
|
1494
2079
|
* @summary Get all deals
|
1495
2080
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1496
2081
|
|