pipedrive 25.0.0 → 27.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 +47 -47
- package/dist/esm/versions/v1/api/activity-fields-api.js +1 -1
- package/dist/esm/versions/v1/api/activity-types-api.js +5 -5
- package/dist/esm/versions/v1/api/billing-api.js +1 -1
- package/dist/esm/versions/v1/api/call-logs-api.js +5 -5
- package/dist/esm/versions/v1/api/channels-api.js +4 -4
- package/dist/esm/versions/v1/api/currencies-api.js +1 -1
- package/dist/esm/versions/v1/api/deal-fields-api.js +6 -6
- package/dist/esm/versions/v1/api/deals-api.d.ts +410 -88
- package/dist/esm/versions/v1/api/deals-api.js +447 -118
- package/dist/esm/versions/v1/api/files-api.js +8 -8
- package/dist/esm/versions/v1/api/filters-api.js +7 -7
- package/dist/esm/versions/v1/api/goals-api.js +5 -5
- package/dist/esm/versions/v1/api/item-search-api.d.ts +8 -8
- package/dist/esm/versions/v1/api/item-search-api.js +10 -10
- package/dist/esm/versions/v1/api/lead-labels-api.js +4 -4
- package/dist/esm/versions/v1/api/lead-sources-api.js +1 -1
- package/dist/esm/versions/v1/api/leads-api.d.ts +100 -14
- package/dist/esm/versions/v1/api/leads-api.js +114 -21
- package/dist/esm/versions/v1/api/legacy-teams-api.js +8 -8
- package/dist/esm/versions/v1/api/mailbox-api.js +6 -6
- package/dist/esm/versions/v1/api/meetings-api.js +2 -2
- package/dist/esm/versions/v1/api/note-fields-api.js +1 -1
- package/dist/esm/versions/v1/api/notes-api.d.ts +18 -2
- package/dist/esm/versions/v1/api/notes-api.js +25 -15
- package/dist/esm/versions/v1/api/organization-fields-api.js +6 -6
- package/dist/esm/versions/v1/api/organization-relationships-api.js +5 -5
- package/dist/esm/versions/v1/api/organizations-api.d.ts +68 -68
- package/dist/esm/versions/v1/api/organizations-api.js +88 -88
- package/dist/esm/versions/v1/api/permission-sets-api.js +3 -3
- package/dist/esm/versions/v1/api/person-fields-api.js +6 -6
- package/dist/esm/versions/v1/api/persons-api.d.ts +56 -56
- package/dist/esm/versions/v1/api/persons-api.js +78 -78
- package/dist/esm/versions/v1/api/pipelines-api.d.ts +28 -28
- package/dist/esm/versions/v1/api/pipelines-api.js +36 -36
- package/dist/esm/versions/v1/api/product-fields-api.js +6 -6
- package/dist/esm/versions/v1/api/products-api.d.ts +24 -24
- package/dist/esm/versions/v1/api/products-api.js +36 -36
- package/dist/esm/versions/v1/api/project-templates-api.js +4 -4
- package/dist/esm/versions/v1/api/projects-api.js +14 -14
- package/dist/esm/versions/v1/api/recents-api.js +1 -1
- package/dist/esm/versions/v1/api/roles-api.js +12 -12
- package/dist/esm/versions/v1/api/stages-api.d.ts +36 -36
- package/dist/esm/versions/v1/api/stages-api.js +43 -43
- package/dist/esm/versions/v1/api/subscriptions-api.js +9 -9
- package/dist/esm/versions/v1/api/tasks-api.js +5 -5
- package/dist/esm/versions/v1/api/user-connections-api.js +1 -1
- package/dist/esm/versions/v1/api/user-settings-api.js +1 -1
- package/dist/esm/versions/v1/api/users-api.js +10 -10
- package/dist/esm/versions/v1/api/webhooks-api.js +3 -3
- 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/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/v2/api/activities-api.d.ts +15 -7
- package/dist/esm/versions/v2/api/activities-api.js +17 -12
- package/dist/esm/versions/v2/api/beta-api.d.ts +212 -0
- package/dist/esm/versions/v2/api/beta-api.js +290 -4
- package/dist/esm/versions/v2/api/deals-api.d.ts +272 -4
- package/dist/esm/versions/v2/api/deals-api.js +311 -27
- package/dist/esm/versions/v2/api/item-search-api.js +2 -2
- package/dist/esm/versions/v2/api/leads-api.d.ts +111 -0
- package/dist/esm/versions/v2/api/leads-api.js +147 -2
- package/dist/esm/versions/v2/api/organizations-api.js +10 -10
- package/dist/esm/versions/v2/api/persons-api.d.ts +8 -8
- package/dist/esm/versions/v2/api/persons-api.js +18 -18
- package/dist/esm/versions/v2/api/pipelines-api.js +5 -5
- package/dist/esm/versions/v2/api/products-api.js +15 -15
- package/dist/esm/versions/v2/api/stages-api.js +5 -5
- package/dist/esm/versions/v2/api/users-api.js +1 -1
- 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-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/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/index.d.ts +7 -0
- package/dist/esm/versions/v2/models/index.js +7 -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 +47 -47
- package/dist/versions/v1/api/activity-fields-api.js +1 -1
- package/dist/versions/v1/api/activity-types-api.js +5 -5
- package/dist/versions/v1/api/billing-api.js +1 -1
- package/dist/versions/v1/api/call-logs-api.js +5 -5
- package/dist/versions/v1/api/channels-api.js +4 -4
- package/dist/versions/v1/api/currencies-api.js +1 -1
- package/dist/versions/v1/api/deal-fields-api.js +6 -6
- package/dist/versions/v1/api/deals-api.d.ts +410 -88
- package/dist/versions/v1/api/deals-api.js +447 -118
- package/dist/versions/v1/api/files-api.js +8 -8
- package/dist/versions/v1/api/filters-api.js +7 -7
- package/dist/versions/v1/api/goals-api.js +5 -5
- package/dist/versions/v1/api/item-search-api.d.ts +8 -8
- package/dist/versions/v1/api/item-search-api.js +10 -10
- package/dist/versions/v1/api/lead-labels-api.js +4 -4
- package/dist/versions/v1/api/lead-sources-api.js +1 -1
- package/dist/versions/v1/api/leads-api.d.ts +100 -14
- package/dist/versions/v1/api/leads-api.js +114 -21
- package/dist/versions/v1/api/legacy-teams-api.js +8 -8
- package/dist/versions/v1/api/mailbox-api.js +6 -6
- package/dist/versions/v1/api/meetings-api.js +2 -2
- package/dist/versions/v1/api/note-fields-api.js +1 -1
- package/dist/versions/v1/api/notes-api.d.ts +18 -2
- package/dist/versions/v1/api/notes-api.js +25 -15
- package/dist/versions/v1/api/organization-fields-api.js +6 -6
- package/dist/versions/v1/api/organization-relationships-api.js +5 -5
- package/dist/versions/v1/api/organizations-api.d.ts +68 -68
- package/dist/versions/v1/api/organizations-api.js +88 -88
- package/dist/versions/v1/api/permission-sets-api.js +3 -3
- package/dist/versions/v1/api/person-fields-api.js +6 -6
- package/dist/versions/v1/api/persons-api.d.ts +56 -56
- package/dist/versions/v1/api/persons-api.js +78 -78
- package/dist/versions/v1/api/pipelines-api.d.ts +28 -28
- package/dist/versions/v1/api/pipelines-api.js +36 -36
- package/dist/versions/v1/api/product-fields-api.js +6 -6
- package/dist/versions/v1/api/products-api.d.ts +24 -24
- package/dist/versions/v1/api/products-api.js +36 -36
- package/dist/versions/v1/api/project-templates-api.js +4 -4
- package/dist/versions/v1/api/projects-api.js +14 -14
- package/dist/versions/v1/api/recents-api.js +1 -1
- package/dist/versions/v1/api/roles-api.js +12 -12
- package/dist/versions/v1/api/stages-api.d.ts +36 -36
- package/dist/versions/v1/api/stages-api.js +43 -43
- package/dist/versions/v1/api/subscriptions-api.js +9 -9
- package/dist/versions/v1/api/tasks-api.js +5 -5
- package/dist/versions/v1/api/user-connections-api.js +1 -1
- package/dist/versions/v1/api/user-settings-api.js +1 -1
- package/dist/versions/v1/api/users-api.js +10 -10
- package/dist/versions/v1/api/webhooks-api.js +3 -3
- 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/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/v2/api/activities-api.d.ts +15 -7
- package/dist/versions/v2/api/activities-api.js +17 -12
- package/dist/versions/v2/api/beta-api.d.ts +212 -0
- package/dist/versions/v2/api/beta-api.js +290 -4
- package/dist/versions/v2/api/deals-api.d.ts +272 -4
- package/dist/versions/v2/api/deals-api.js +311 -27
- package/dist/versions/v2/api/item-search-api.js +2 -2
- package/dist/versions/v2/api/leads-api.d.ts +111 -0
- package/dist/versions/v2/api/leads-api.js +146 -1
- package/dist/versions/v2/api/organizations-api.js +10 -10
- package/dist/versions/v2/api/persons-api.d.ts +8 -8
- package/dist/versions/v2/api/persons-api.js +18 -18
- package/dist/versions/v2/api/pipelines-api.js +5 -5
- package/dist/versions/v2/api/products-api.js +15 -15
- package/dist/versions/v2/api/stages-api.js +5 -5
- package/dist/versions/v2/api/users-api.js +1 -1
- 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-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/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/index.d.ts +7 -0
- package/dist/versions/v2/models/index.js +7 -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
@@ -51,7 +51,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
51
51
|
const localVarHeaderParameter = {};
|
52
52
|
const localVarQueryParameter = {};
|
53
53
|
// authentication api_key required
|
54
|
-
yield setApiKeyToObject(
|
54
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
55
55
|
// authentication oauth2 required
|
56
56
|
// oauth required
|
57
57
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
@@ -88,7 +88,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
88
88
|
const localVarHeaderParameter = {};
|
89
89
|
const localVarQueryParameter = {};
|
90
90
|
// authentication api_key required
|
91
|
-
yield setApiKeyToObject(
|
91
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
92
92
|
// authentication oauth2 required
|
93
93
|
// oauth required
|
94
94
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
@@ -125,7 +125,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
125
125
|
const localVarHeaderParameter = {};
|
126
126
|
const localVarQueryParameter = {};
|
127
127
|
// authentication api_key required
|
128
|
-
yield setApiKeyToObject(
|
128
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
129
129
|
// authentication oauth2 required
|
130
130
|
// oauth required
|
131
131
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration);
|
@@ -139,6 +139,40 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
139
139
|
options: localVarRequestOptions,
|
140
140
|
};
|
141
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(localVarHeaderParameter, "x-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
|
+
}),
|
142
176
|
/**
|
143
177
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
144
178
|
* @summary Delete a discount from a deal
|
@@ -165,7 +199,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
165
199
|
const localVarHeaderParameter = {};
|
166
200
|
const localVarQueryParameter = {};
|
167
201
|
// authentication api_key required
|
168
|
-
yield setApiKeyToObject(
|
202
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
169
203
|
// authentication oauth2 required
|
170
204
|
// oauth required
|
171
205
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -199,7 +233,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
199
233
|
const localVarHeaderParameter = {};
|
200
234
|
const localVarQueryParameter = {};
|
201
235
|
// authentication api_key required
|
202
|
-
yield setApiKeyToObject(
|
236
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
203
237
|
// authentication oauth2 required
|
204
238
|
// oauth required
|
205
239
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
@@ -237,7 +271,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
237
271
|
const localVarHeaderParameter = {};
|
238
272
|
const localVarQueryParameter = {};
|
239
273
|
// authentication api_key required
|
240
|
-
yield setApiKeyToObject(
|
274
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
241
275
|
// authentication oauth2 required
|
242
276
|
// oauth required
|
243
277
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
@@ -275,7 +309,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
275
309
|
const localVarHeaderParameter = {};
|
276
310
|
const localVarQueryParameter = {};
|
277
311
|
// authentication api_key required
|
278
|
-
yield setApiKeyToObject(
|
312
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
279
313
|
// authentication oauth2 required
|
280
314
|
// oauth required
|
281
315
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "products:full"], configuration);
|
@@ -313,7 +347,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
313
347
|
const localVarHeaderParameter = {};
|
314
348
|
const localVarQueryParameter = {};
|
315
349
|
// authentication api_key required
|
316
|
-
yield setApiKeyToObject(
|
350
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
317
351
|
// authentication oauth2 required
|
318
352
|
// oauth required
|
319
353
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -347,7 +381,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
347
381
|
const localVarHeaderParameter = {};
|
348
382
|
const localVarQueryParameter = {};
|
349
383
|
// authentication api_key required
|
350
|
-
yield setApiKeyToObject(
|
384
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
351
385
|
// authentication oauth2 required
|
352
386
|
// oauth required
|
353
387
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -359,6 +393,100 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
359
393
|
options: localVarRequestOptions,
|
360
394
|
};
|
361
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(localVarHeaderParameter, "x-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
|
+
}),
|
362
490
|
/**
|
363
491
|
* Returns the details of a specific deal.
|
364
492
|
* @summary Get details of a deal
|
@@ -383,7 +511,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
383
511
|
const localVarHeaderParameter = {};
|
384
512
|
const localVarQueryParameter = {};
|
385
513
|
// authentication api_key required
|
386
|
-
yield setApiKeyToObject(
|
514
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
387
515
|
// authentication oauth2 required
|
388
516
|
// oauth required
|
389
517
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -401,6 +529,44 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
401
529
|
options: localVarRequestOptions,
|
402
530
|
};
|
403
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(localVarHeaderParameter, "x-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
|
+
}),
|
404
570
|
/**
|
405
571
|
* Lists users who are following the deal.
|
406
572
|
* @summary List followers of a deal
|
@@ -425,7 +591,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
425
591
|
const localVarHeaderParameter = {};
|
426
592
|
const localVarQueryParameter = {};
|
427
593
|
// authentication api_key required
|
428
|
-
yield setApiKeyToObject(
|
594
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
429
595
|
// authentication oauth2 required
|
430
596
|
// oauth required
|
431
597
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -467,7 +633,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
467
633
|
const localVarHeaderParameter = {};
|
468
634
|
const localVarQueryParameter = {};
|
469
635
|
// authentication api_key required
|
470
|
-
yield setApiKeyToObject(
|
636
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
471
637
|
// authentication oauth2 required
|
472
638
|
// oauth required
|
473
639
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -511,7 +677,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
511
677
|
const localVarHeaderParameter = {};
|
512
678
|
const localVarQueryParameter = {};
|
513
679
|
// authentication api_key required
|
514
|
-
yield setApiKeyToObject(
|
680
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
515
681
|
// authentication oauth2 required
|
516
682
|
// oauth required
|
517
683
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "deals:read", "deals:full"], configuration);
|
@@ -536,7 +702,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
536
702
|
};
|
537
703
|
}),
|
538
704
|
/**
|
539
|
-
* Returns data about all deals.
|
705
|
+
* Returns data about all not archived deals.
|
540
706
|
* @summary Get all deals
|
541
707
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
542
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.
|
@@ -569,7 +735,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
569
735
|
const localVarHeaderParameter = {};
|
570
736
|
const localVarQueryParameter = {};
|
571
737
|
// authentication api_key required
|
572
|
-
yield setApiKeyToObject(
|
738
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
573
739
|
// authentication oauth2 required
|
574
740
|
// oauth required
|
575
741
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -654,7 +820,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
654
820
|
const localVarHeaderParameter = {};
|
655
821
|
const localVarQueryParameter = {};
|
656
822
|
// authentication api_key required
|
657
|
-
yield setApiKeyToObject(
|
823
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
658
824
|
// authentication oauth2 required
|
659
825
|
// oauth required
|
660
826
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "deals:read", "deals:full"], configuration);
|
@@ -706,7 +872,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
706
872
|
const localVarHeaderParameter = {};
|
707
873
|
const localVarQueryParameter = {};
|
708
874
|
// authentication api_key required
|
709
|
-
yield setApiKeyToObject(
|
875
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
710
876
|
// authentication oauth2 required
|
711
877
|
// oauth required
|
712
878
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -756,7 +922,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
756
922
|
const localVarHeaderParameter = {};
|
757
923
|
const localVarQueryParameter = {};
|
758
924
|
// authentication api_key required
|
759
|
-
yield setApiKeyToObject(
|
925
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
760
926
|
// authentication oauth2 required
|
761
927
|
// oauth required
|
762
928
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -793,7 +959,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
793
959
|
const localVarHeaderParameter = {};
|
794
960
|
const localVarQueryParameter = {};
|
795
961
|
// authentication api_key required
|
796
|
-
yield setApiKeyToObject(
|
962
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
797
963
|
// authentication oauth2 required
|
798
964
|
// oauth required
|
799
965
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -836,7 +1002,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
836
1002
|
const localVarHeaderParameter = {};
|
837
1003
|
const localVarQueryParameter = {};
|
838
1004
|
// authentication api_key required
|
839
|
-
yield setApiKeyToObject(
|
1005
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
840
1006
|
// authentication oauth2 required
|
841
1007
|
// oauth required
|
842
1008
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "search:read"], configuration);
|
@@ -902,7 +1068,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
902
1068
|
const localVarHeaderParameter = {};
|
903
1069
|
const localVarQueryParameter = {};
|
904
1070
|
// authentication api_key required
|
905
|
-
yield setApiKeyToObject(
|
1071
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
906
1072
|
// authentication oauth2 required
|
907
1073
|
// oauth required
|
908
1074
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -939,7 +1105,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
939
1105
|
const localVarHeaderParameter = {};
|
940
1106
|
const localVarQueryParameter = {};
|
941
1107
|
// authentication api_key required
|
942
|
-
yield setApiKeyToObject(
|
1108
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
943
1109
|
// authentication oauth2 required
|
944
1110
|
// oauth required
|
945
1111
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
@@ -980,7 +1146,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
980
1146
|
const localVarHeaderParameter = {};
|
981
1147
|
const localVarQueryParameter = {};
|
982
1148
|
// authentication api_key required
|
983
|
-
yield setApiKeyToObject(
|
1149
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
984
1150
|
// authentication oauth2 required
|
985
1151
|
// oauth required
|
986
1152
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration);
|
@@ -1021,7 +1187,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
|
|
1021
1187
|
const localVarHeaderParameter = {};
|
1022
1188
|
const localVarQueryParameter = {};
|
1023
1189
|
// authentication api_key required
|
1024
|
-
yield setApiKeyToObject(
|
1190
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
1025
1191
|
// authentication oauth2 required
|
1026
1192
|
// oauth required
|
1027
1193
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
@@ -1085,6 +1251,19 @@ export const DealsApiFp = function (configuration) {
|
|
1085
1251
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1086
1252
|
});
|
1087
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
|
+
},
|
1088
1267
|
/**
|
1089
1268
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1090
1269
|
* @summary Delete a discount from a deal
|
@@ -1167,6 +1346,34 @@ export const DealsApiFp = function (configuration) {
|
|
1167
1346
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1168
1347
|
});
|
1169
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
|
+
},
|
1170
1377
|
/**
|
1171
1378
|
* Returns the details of a specific deal.
|
1172
1379
|
* @summary Get details of a deal
|
@@ -1182,6 +1389,20 @@ export const DealsApiFp = function (configuration) {
|
|
1182
1389
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
1183
1390
|
});
|
1184
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
|
+
},
|
1185
1406
|
/**
|
1186
1407
|
* Lists users who are following the deal.
|
1187
1408
|
* @summary List followers of a deal
|
@@ -1230,7 +1451,7 @@ export const DealsApiFp = function (configuration) {
|
|
1230
1451
|
});
|
1231
1452
|
},
|
1232
1453
|
/**
|
1233
|
-
* Returns data about all deals.
|
1454
|
+
* Returns data about all not archived deals.
|
1234
1455
|
* @summary Get all deals
|
1235
1456
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
1236
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.
|
@@ -1438,6 +1659,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1438
1659
|
addDealProduct(requestParameters) {
|
1439
1660
|
return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(axios, basePath));
|
1440
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
|
+
},
|
1441
1672
|
/**
|
1442
1673
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1443
1674
|
* @summary Delete a discount from a deal
|
@@ -1498,6 +1729,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1498
1729
|
getAdditionalDiscounts(requestParameters) {
|
1499
1730
|
return localVarFp.getAdditionalDiscounts(requestParameters.id).then((request) => request(axios, basePath));
|
1500
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
|
+
},
|
1501
1742
|
/**
|
1502
1743
|
* Returns the details of a specific deal.
|
1503
1744
|
* @summary Get details of a deal
|
@@ -1508,6 +1749,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1508
1749
|
getDeal(requestParameters) {
|
1509
1750
|
return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
1510
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
|
+
},
|
1511
1762
|
/**
|
1512
1763
|
* Lists users who are following the deal.
|
1513
1764
|
* @summary List followers of a deal
|
@@ -1539,7 +1790,7 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1539
1790
|
return localVarFp.getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
1540
1791
|
},
|
1541
1792
|
/**
|
1542
|
-
* Returns data about all deals.
|
1793
|
+
* Returns data about all not archived deals.
|
1543
1794
|
* @summary Get all deals
|
1544
1795
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1545
1796
|
|
@@ -1680,6 +1931,17 @@ export class DealsApi extends BaseAPI {
|
|
1680
1931
|
addDealProduct(requestParameters) {
|
1681
1932
|
return DealsApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(this.axios, this.basePath));
|
1682
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
|
+
}
|
1683
1945
|
/**
|
1684
1946
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1685
1947
|
* @summary Delete a discount from a deal
|
@@ -1746,6 +2008,17 @@ export class DealsApi extends BaseAPI {
|
|
1746
2008
|
getAdditionalDiscounts(requestParameters) {
|
1747
2009
|
return DealsApiFp(this.configuration).getAdditionalDiscounts(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1748
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
|
+
}
|
1749
2022
|
/**
|
1750
2023
|
* Returns the details of a specific deal.
|
1751
2024
|
* @summary Get details of a deal
|
@@ -1757,6 +2030,17 @@ export class DealsApi extends BaseAPI {
|
|
1757
2030
|
getDeal(requestParameters) {
|
1758
2031
|
return DealsApiFp(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
1759
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
|
+
}
|
1760
2044
|
/**
|
1761
2045
|
* Lists users who are following the deal.
|
1762
2046
|
* @summary List followers of a deal
|
@@ -1791,7 +2075,7 @@ export class DealsApi extends BaseAPI {
|
|
1791
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));
|
1792
2076
|
}
|
1793
2077
|
/**
|
1794
|
-
* Returns data about all deals.
|
2078
|
+
* Returns data about all not archived deals.
|
1795
2079
|
* @summary Get all deals
|
1796
2080
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1797
2081
|
|
@@ -60,7 +60,7 @@ export const ItemSearchApiAxiosParamCreator = function (configuration) {
|
|
60
60
|
const localVarHeaderParameter = {};
|
61
61
|
const localVarQueryParameter = {};
|
62
62
|
// authentication api_key required
|
63
|
-
yield setApiKeyToObject(
|
63
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
64
64
|
// authentication oauth2 required
|
65
65
|
// oauth required
|
66
66
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["search:read"], configuration);
|
@@ -126,7 +126,7 @@ export const ItemSearchApiAxiosParamCreator = function (configuration) {
|
|
126
126
|
const localVarHeaderParameter = {};
|
127
127
|
const localVarQueryParameter = {};
|
128
128
|
// authentication api_key required
|
129
|
-
yield setApiKeyToObject(
|
129
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
130
130
|
// authentication oauth2 required
|
131
131
|
// oauth required
|
132
132
|
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["search:read"], configuration);
|