pipedrive 25.0.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 +410 -88
- package/dist/esm/versions/v1/api/deals-api.js +417 -88
- 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 +68 -68
- package/dist/esm/versions/v1/api/organizations-api.js +68 -68
- package/dist/esm/versions/v1/api/persons-api.d.ts +56 -56
- package/dist/esm/versions/v1/api/persons-api.js +56 -56
- 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/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 +12 -7
- package/dist/esm/versions/v2/api/beta-api.d.ts +212 -0
- package/dist/esm/versions/v2/api/beta-api.js +286 -0
- package/dist/esm/versions/v2/api/deals-api.d.ts +272 -4
- package/dist/esm/versions/v2/api/deals-api.js +288 -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/persons-api.d.ts +8 -8
- package/dist/esm/versions/v2/api/persons-api.js +8 -8
- package/dist/esm/versions/v2/api/products-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 +40 -40
- package/dist/versions/v1/api/deals-api.d.ts +410 -88
- package/dist/versions/v1/api/deals-api.js +417 -88
- 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 +68 -68
- package/dist/versions/v1/api/organizations-api.js +68 -68
- package/dist/versions/v1/api/persons-api.d.ts +56 -56
- package/dist/versions/v1/api/persons-api.js +56 -56
- 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/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 +12 -7
- package/dist/versions/v2/api/beta-api.d.ts +212 -0
- package/dist/versions/v2/api/beta-api.js +286 -0
- package/dist/versions/v2/api/deals-api.d.ts +272 -4
- package/dist/versions/v2/api/deals-api.js +288 -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/persons-api.d.ts +8 -8
- package/dist/versions/v2/api/persons-api.js +8 -8
- package/dist/versions/v2/api/products-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
@@ -145,6 +145,40 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
145
145
|
options: localVarRequestOptions,
|
146
146
|
};
|
147
147
|
}),
|
148
|
+
/**
|
149
|
+
* 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.
|
150
|
+
* @summary Convert a deal to a lead (BETA)
|
151
|
+
* @param {number} id The ID of the deal to convert
|
152
|
+
|
153
|
+
* @throws {RequiredError}
|
154
|
+
*/
|
155
|
+
convertDealToLead: (id) => __awaiter(this, void 0, void 0, function* () {
|
156
|
+
// verify required parameter 'id' is not null or undefined
|
157
|
+
(0, common_1.assertParamExists)('convertDealToLead', 'id', id);
|
158
|
+
const localVarPath = `/deals/{id}/convert/lead`
|
159
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
160
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
161
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
162
|
+
let baseOptions;
|
163
|
+
if (configuration) {
|
164
|
+
baseOptions = configuration.baseOptions;
|
165
|
+
}
|
166
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
167
|
+
const localVarHeaderParameter = {};
|
168
|
+
const localVarQueryParameter = {};
|
169
|
+
// authentication api_key required
|
170
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
171
|
+
// authentication oauth2 required
|
172
|
+
// oauth required
|
173
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration);
|
174
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
175
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
176
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
177
|
+
return {
|
178
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
179
|
+
options: localVarRequestOptions,
|
180
|
+
};
|
181
|
+
}),
|
148
182
|
/**
|
149
183
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
150
184
|
* @summary Delete a discount from a deal
|
@@ -365,6 +399,100 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
365
399
|
options: localVarRequestOptions,
|
366
400
|
};
|
367
401
|
}),
|
402
|
+
/**
|
403
|
+
* Returns data about all archived deals.
|
404
|
+
* @summary Get all archived deals
|
405
|
+
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
406
|
+
* @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.
|
407
|
+
* @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
|
408
|
+
* @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
|
409
|
+
* @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
410
|
+
* @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
|
411
|
+
* @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
|
412
|
+
* @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.
|
413
|
+
* @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.
|
414
|
+
* @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.
|
415
|
+
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
416
|
+
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
417
|
+
* @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
|
418
|
+
* @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.
|
419
|
+
* @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.
|
420
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
421
|
+
|
422
|
+
* @throws {RequiredError}
|
423
|
+
*/
|
424
|
+
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* () {
|
425
|
+
const localVarPath = `/deals/archived`;
|
426
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
427
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
428
|
+
let baseOptions;
|
429
|
+
if (configuration) {
|
430
|
+
baseOptions = configuration.baseOptions;
|
431
|
+
}
|
432
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
433
|
+
const localVarHeaderParameter = {};
|
434
|
+
const localVarQueryParameter = {};
|
435
|
+
// authentication api_key required
|
436
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
437
|
+
// authentication oauth2 required
|
438
|
+
// oauth required
|
439
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
440
|
+
if (filter_id !== undefined) {
|
441
|
+
localVarQueryParameter['filter_id'] = filter_id;
|
442
|
+
}
|
443
|
+
if (ids !== undefined) {
|
444
|
+
localVarQueryParameter['ids'] = ids;
|
445
|
+
}
|
446
|
+
if (owner_id !== undefined) {
|
447
|
+
localVarQueryParameter['owner_id'] = owner_id;
|
448
|
+
}
|
449
|
+
if (person_id !== undefined) {
|
450
|
+
localVarQueryParameter['person_id'] = person_id;
|
451
|
+
}
|
452
|
+
if (org_id !== undefined) {
|
453
|
+
localVarQueryParameter['org_id'] = org_id;
|
454
|
+
}
|
455
|
+
if (pipeline_id !== undefined) {
|
456
|
+
localVarQueryParameter['pipeline_id'] = pipeline_id;
|
457
|
+
}
|
458
|
+
if (stage_id !== undefined) {
|
459
|
+
localVarQueryParameter['stage_id'] = stage_id;
|
460
|
+
}
|
461
|
+
if (status !== undefined) {
|
462
|
+
localVarQueryParameter['status'] = status;
|
463
|
+
}
|
464
|
+
if (updated_since !== undefined) {
|
465
|
+
localVarQueryParameter['updated_since'] = updated_since;
|
466
|
+
}
|
467
|
+
if (updated_until !== undefined) {
|
468
|
+
localVarQueryParameter['updated_until'] = updated_until;
|
469
|
+
}
|
470
|
+
if (sort_by !== undefined) {
|
471
|
+
localVarQueryParameter['sort_by'] = sort_by;
|
472
|
+
}
|
473
|
+
if (sort_direction !== undefined) {
|
474
|
+
localVarQueryParameter['sort_direction'] = sort_direction;
|
475
|
+
}
|
476
|
+
if (include_fields !== undefined) {
|
477
|
+
localVarQueryParameter['include_fields'] = include_fields;
|
478
|
+
}
|
479
|
+
if (custom_fields !== undefined) {
|
480
|
+
localVarQueryParameter['custom_fields'] = custom_fields;
|
481
|
+
}
|
482
|
+
if (limit !== undefined) {
|
483
|
+
localVarQueryParameter['limit'] = limit;
|
484
|
+
}
|
485
|
+
if (cursor !== undefined) {
|
486
|
+
localVarQueryParameter['cursor'] = cursor;
|
487
|
+
}
|
488
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
489
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
490
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
491
|
+
return {
|
492
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
493
|
+
options: localVarRequestOptions,
|
494
|
+
};
|
495
|
+
}),
|
368
496
|
/**
|
369
497
|
* Returns the details of a specific deal.
|
370
498
|
* @summary Get details of a deal
|
@@ -407,6 +535,44 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
407
535
|
options: localVarRequestOptions,
|
408
536
|
};
|
409
537
|
}),
|
538
|
+
/**
|
539
|
+
* 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.
|
540
|
+
* @summary Get Deal conversion status (BETA)
|
541
|
+
* @param {number} id The ID of a deal
|
542
|
+
* @param {string} conversion_id The ID of the conversion
|
543
|
+
|
544
|
+
* @throws {RequiredError}
|
545
|
+
*/
|
546
|
+
getDealConversionStatus: (id, conversion_id) => __awaiter(this, void 0, void 0, function* () {
|
547
|
+
// verify required parameter 'id' is not null or undefined
|
548
|
+
(0, common_1.assertParamExists)('getDealConversionStatus', 'id', id);
|
549
|
+
// verify required parameter 'conversion_id' is not null or undefined
|
550
|
+
(0, common_1.assertParamExists)('getDealConversionStatus', 'conversion_id', conversion_id);
|
551
|
+
const localVarPath = `/deals/{id}/convert/status/{conversion_id}`
|
552
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
553
|
+
.replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id)));
|
554
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
555
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
556
|
+
let baseOptions;
|
557
|
+
if (configuration) {
|
558
|
+
baseOptions = configuration.baseOptions;
|
559
|
+
}
|
560
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
561
|
+
const localVarHeaderParameter = {};
|
562
|
+
const localVarQueryParameter = {};
|
563
|
+
// authentication api_key required
|
564
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
565
|
+
// authentication oauth2 required
|
566
|
+
// oauth required
|
567
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read"], configuration);
|
568
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
569
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
570
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
571
|
+
return {
|
572
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
573
|
+
options: localVarRequestOptions,
|
574
|
+
};
|
575
|
+
}),
|
410
576
|
/**
|
411
577
|
* Lists users who are following the deal.
|
412
578
|
* @summary List followers of a deal
|
@@ -542,7 +708,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
542
708
|
};
|
543
709
|
}),
|
544
710
|
/**
|
545
|
-
* Returns data about all deals.
|
711
|
+
* Returns data about all not archived deals.
|
546
712
|
* @summary Get all deals
|
547
713
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
548
714
|
* @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.
|
@@ -1092,6 +1258,19 @@ const DealsApiFp = function (configuration) {
|
|
1092
1258
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1093
1259
|
});
|
1094
1260
|
},
|
1261
|
+
/**
|
1262
|
+
* 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.
|
1263
|
+
* @summary Convert a deal to a lead (BETA)
|
1264
|
+
* @param {number} id The ID of the deal to convert
|
1265
|
+
|
1266
|
+
* @throws {RequiredError}
|
1267
|
+
*/
|
1268
|
+
convertDealToLead(id) {
|
1269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1270
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.convertDealToLead(id);
|
1271
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1272
|
+
});
|
1273
|
+
},
|
1095
1274
|
/**
|
1096
1275
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1097
1276
|
* @summary Delete a discount from a deal
|
@@ -1174,6 +1353,34 @@ const DealsApiFp = function (configuration) {
|
|
1174
1353
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1175
1354
|
});
|
1176
1355
|
},
|
1356
|
+
/**
|
1357
|
+
* Returns data about all archived deals.
|
1358
|
+
* @summary Get all archived deals
|
1359
|
+
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
1360
|
+
* @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.
|
1361
|
+
* @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
|
1362
|
+
* @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
|
1363
|
+
* @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
1364
|
+
* @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
|
1365
|
+
* @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
|
1366
|
+
* @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.
|
1367
|
+
* @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.
|
1368
|
+
* @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.
|
1369
|
+
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
1370
|
+
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
1371
|
+
* @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
|
1372
|
+
* @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.
|
1373
|
+
* @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.
|
1374
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1375
|
+
|
1376
|
+
* @throws {RequiredError}
|
1377
|
+
*/
|
1378
|
+
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) {
|
1379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1380
|
+
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);
|
1381
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1382
|
+
});
|
1383
|
+
},
|
1177
1384
|
/**
|
1178
1385
|
* Returns the details of a specific deal.
|
1179
1386
|
* @summary Get details of a deal
|
@@ -1189,6 +1396,20 @@ const DealsApiFp = function (configuration) {
|
|
1189
1396
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1190
1397
|
});
|
1191
1398
|
},
|
1399
|
+
/**
|
1400
|
+
* 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.
|
1401
|
+
* @summary Get Deal conversion status (BETA)
|
1402
|
+
* @param {number} id The ID of a deal
|
1403
|
+
* @param {string} conversion_id The ID of the conversion
|
1404
|
+
|
1405
|
+
* @throws {RequiredError}
|
1406
|
+
*/
|
1407
|
+
getDealConversionStatus(id, conversion_id) {
|
1408
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1409
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealConversionStatus(id, conversion_id);
|
1410
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1411
|
+
});
|
1412
|
+
},
|
1192
1413
|
/**
|
1193
1414
|
* Lists users who are following the deal.
|
1194
1415
|
* @summary List followers of a deal
|
@@ -1237,7 +1458,7 @@ const DealsApiFp = function (configuration) {
|
|
1237
1458
|
});
|
1238
1459
|
},
|
1239
1460
|
/**
|
1240
|
-
* Returns data about all deals.
|
1461
|
+
* Returns data about all not archived deals.
|
1241
1462
|
* @summary Get all deals
|
1242
1463
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
1243
1464
|
* @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.
|
@@ -1446,6 +1667,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1446
1667
|
addDealProduct(requestParameters) {
|
1447
1668
|
return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(axios, basePath));
|
1448
1669
|
},
|
1670
|
+
/**
|
1671
|
+
* 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.
|
1672
|
+
* @summary Convert a deal to a lead (BETA)
|
1673
|
+
* @param {DealsApiConvertDealToLeadRequest} requestParameters Request parameters.
|
1674
|
+
|
1675
|
+
* @throws {RequiredError}
|
1676
|
+
*/
|
1677
|
+
convertDealToLead(requestParameters) {
|
1678
|
+
return localVarFp.convertDealToLead(requestParameters.id).then((request) => request(axios, basePath));
|
1679
|
+
},
|
1449
1680
|
/**
|
1450
1681
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1451
1682
|
* @summary Delete a discount from a deal
|
@@ -1506,6 +1737,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1506
1737
|
getAdditionalDiscounts(requestParameters) {
|
1507
1738
|
return localVarFp.getAdditionalDiscounts(requestParameters.id).then((request) => request(axios, basePath));
|
1508
1739
|
},
|
1740
|
+
/**
|
1741
|
+
* Returns data about all archived deals.
|
1742
|
+
* @summary Get all archived deals
|
1743
|
+
* @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters.
|
1744
|
+
|
1745
|
+
* @throws {RequiredError}
|
1746
|
+
*/
|
1747
|
+
getArchivedDeals(requestParameters = {}) {
|
1748
|
+
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));
|
1749
|
+
},
|
1509
1750
|
/**
|
1510
1751
|
* Returns the details of a specific deal.
|
1511
1752
|
* @summary Get details of a deal
|
@@ -1516,6 +1757,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1516
1757
|
getDeal(requestParameters) {
|
1517
1758
|
return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
1518
1759
|
},
|
1760
|
+
/**
|
1761
|
+
* 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.
|
1762
|
+
* @summary Get Deal conversion status (BETA)
|
1763
|
+
* @param {DealsApiGetDealConversionStatusRequest} requestParameters Request parameters.
|
1764
|
+
|
1765
|
+
* @throws {RequiredError}
|
1766
|
+
*/
|
1767
|
+
getDealConversionStatus(requestParameters) {
|
1768
|
+
return localVarFp.getDealConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(axios, basePath));
|
1769
|
+
},
|
1519
1770
|
/**
|
1520
1771
|
* Lists users who are following the deal.
|
1521
1772
|
* @summary List followers of a deal
|
@@ -1547,7 +1798,7 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1547
1798
|
return localVarFp.getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
1548
1799
|
},
|
1549
1800
|
/**
|
1550
|
-
* Returns data about all deals.
|
1801
|
+
* Returns data about all not archived deals.
|
1551
1802
|
* @summary Get all deals
|
1552
1803
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1553
1804
|
|
@@ -1689,6 +1940,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1689
1940
|
addDealProduct(requestParameters) {
|
1690
1941
|
return (0, exports.DealsApiFp)(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(this.axios, this.basePath));
|
1691
1942
|
}
|
1943
|
+
/**
|
1944
|
+
* 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.
|
1945
|
+
* @summary Convert a deal to a lead (BETA)
|
1946
|
+
* @param {DealsApiConvertDealToLeadRequest} requestParameters Request parameters.
|
1947
|
+
|
1948
|
+
* @throws {RequiredError}
|
1949
|
+
* @memberof DealsApi
|
1950
|
+
*/
|
1951
|
+
convertDealToLead(requestParameters) {
|
1952
|
+
return (0, exports.DealsApiFp)(this.configuration).convertDealToLead(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1953
|
+
}
|
1692
1954
|
/**
|
1693
1955
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1694
1956
|
* @summary Delete a discount from a deal
|
@@ -1755,6 +2017,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1755
2017
|
getAdditionalDiscounts(requestParameters) {
|
1756
2018
|
return (0, exports.DealsApiFp)(this.configuration).getAdditionalDiscounts(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1757
2019
|
}
|
2020
|
+
/**
|
2021
|
+
* Returns data about all archived deals.
|
2022
|
+
* @summary Get all archived deals
|
2023
|
+
* @param {DealsApiGetArchivedDealsRequest} requestParameters Request parameters.
|
2024
|
+
|
2025
|
+
* @throws {RequiredError}
|
2026
|
+
* @memberof DealsApi
|
2027
|
+
*/
|
2028
|
+
getArchivedDeals(requestParameters = {}) {
|
2029
|
+
return (0, exports.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));
|
2030
|
+
}
|
1758
2031
|
/**
|
1759
2032
|
* Returns the details of a specific deal.
|
1760
2033
|
* @summary Get details of a deal
|
@@ -1766,6 +2039,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1766
2039
|
getDeal(requestParameters) {
|
1767
2040
|
return (0, exports.DealsApiFp)(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
1768
2041
|
}
|
2042
|
+
/**
|
2043
|
+
* 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.
|
2044
|
+
* @summary Get Deal conversion status (BETA)
|
2045
|
+
* @param {DealsApiGetDealConversionStatusRequest} requestParameters Request parameters.
|
2046
|
+
|
2047
|
+
* @throws {RequiredError}
|
2048
|
+
* @memberof DealsApi
|
2049
|
+
*/
|
2050
|
+
getDealConversionStatus(requestParameters) {
|
2051
|
+
return (0, exports.DealsApiFp)(this.configuration).getDealConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(this.axios, this.basePath));
|
2052
|
+
}
|
1769
2053
|
/**
|
1770
2054
|
* Lists users who are following the deal.
|
1771
2055
|
* @summary List followers of a deal
|
@@ -1800,7 +2084,7 @@ class DealsApi extends base_1.BaseAPI {
|
|
1800
2084
|
return (0, exports.DealsApiFp)(this.configuration).getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
|
1801
2085
|
}
|
1802
2086
|
/**
|
1803
|
-
* Returns data about all deals.
|
2087
|
+
* Returns data about all not archived deals.
|
1804
2088
|
* @summary Get all deals
|
1805
2089
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1806
2090
|
|
@@ -12,12 +12,33 @@
|
|
12
12
|
import type { Configuration } from '../configuration';
|
13
13
|
import type { AxiosInstance } from 'axios';
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
15
|
+
import { AddConvertLeadToDealResponse } from '../models';
|
16
|
+
import { ConvertLeadToDealRequest } from '../models';
|
17
|
+
import { GetConvertResponse1 } from '../models';
|
15
18
|
import { GetLeadSearchResponse } from '../models';
|
16
19
|
/**
|
17
20
|
* LeadsApi - axios parameter creator
|
18
21
|
* @export
|
19
22
|
*/
|
20
23
|
export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration) => {
|
24
|
+
/**
|
25
|
+
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
|
26
|
+
* @summary Convert a lead to a deal (BETA)
|
27
|
+
* @param {string} id The ID of the lead to convert
|
28
|
+
* @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
|
29
|
+
|
30
|
+
* @throws {RequiredError}
|
31
|
+
*/
|
32
|
+
convertLeadToDeal: (id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest) => Promise<RequestArgs>;
|
33
|
+
/**
|
34
|
+
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
35
|
+
* @summary Get Lead conversion status (BETA)
|
36
|
+
* @param {string} id The ID of a lead
|
37
|
+
* @param {string} conversion_id The ID of the conversion
|
38
|
+
|
39
|
+
* @throws {RequiredError}
|
40
|
+
*/
|
41
|
+
getLeadConversionStatus: (id: string, conversion_id: string) => Promise<RequestArgs>;
|
21
42
|
/**
|
22
43
|
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
|
23
44
|
* @summary Search leads
|
@@ -39,6 +60,24 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
|
|
39
60
|
* @export
|
40
61
|
*/
|
41
62
|
export declare const LeadsApiFp: (configuration?: Configuration) => {
|
63
|
+
/**
|
64
|
+
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
|
65
|
+
* @summary Convert a lead to a deal (BETA)
|
66
|
+
* @param {string} id The ID of the lead to convert
|
67
|
+
* @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
|
68
|
+
|
69
|
+
* @throws {RequiredError}
|
70
|
+
*/
|
71
|
+
convertLeadToDeal(id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddConvertLeadToDealResponse>>;
|
72
|
+
/**
|
73
|
+
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
74
|
+
* @summary Get Lead conversion status (BETA)
|
75
|
+
* @param {string} id The ID of a lead
|
76
|
+
* @param {string} conversion_id The ID of the conversion
|
77
|
+
|
78
|
+
* @throws {RequiredError}
|
79
|
+
*/
|
80
|
+
getLeadConversionStatus(id: string, conversion_id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetConvertResponse1>>;
|
42
81
|
/**
|
43
82
|
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
|
44
83
|
* @summary Search leads
|
@@ -60,6 +99,22 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
|
|
60
99
|
* @export
|
61
100
|
*/
|
62
101
|
export declare const LeadsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
102
|
+
/**
|
103
|
+
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
|
104
|
+
* @summary Convert a lead to a deal (BETA)
|
105
|
+
* @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
|
106
|
+
|
107
|
+
* @throws {RequiredError}
|
108
|
+
*/
|
109
|
+
convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest): Promise<AddConvertLeadToDealResponse>;
|
110
|
+
/**
|
111
|
+
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
112
|
+
* @summary Get Lead conversion status (BETA)
|
113
|
+
* @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
|
114
|
+
|
115
|
+
* @throws {RequiredError}
|
116
|
+
*/
|
117
|
+
getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest): Promise<GetConvertResponse1>;
|
63
118
|
/**
|
64
119
|
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
|
65
120
|
* @summary Search leads
|
@@ -69,6 +124,44 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
|
|
69
124
|
*/
|
70
125
|
searchLeads(requestParameters: LeadsApiSearchLeadsRequest): Promise<GetLeadSearchResponse>;
|
71
126
|
};
|
127
|
+
/**
|
128
|
+
* Request parameters for convertLeadToDeal operation in LeadsApi.
|
129
|
+
* @export
|
130
|
+
* @interface LeadsApiConvertLeadToDealRequest
|
131
|
+
*/
|
132
|
+
export interface LeadsApiConvertLeadToDealRequest {
|
133
|
+
/**
|
134
|
+
* The ID of the lead to convert
|
135
|
+
* @type {string}
|
136
|
+
* @memberof LeadsApiConvertLeadToDeal
|
137
|
+
*/
|
138
|
+
readonly id: string;
|
139
|
+
/**
|
140
|
+
*
|
141
|
+
* @type {ConvertLeadToDealRequest}
|
142
|
+
* @memberof LeadsApiConvertLeadToDeal
|
143
|
+
*/
|
144
|
+
readonly ConvertLeadToDealRequest?: ConvertLeadToDealRequest;
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* Request parameters for getLeadConversionStatus operation in LeadsApi.
|
148
|
+
* @export
|
149
|
+
* @interface LeadsApiGetLeadConversionStatusRequest
|
150
|
+
*/
|
151
|
+
export interface LeadsApiGetLeadConversionStatusRequest {
|
152
|
+
/**
|
153
|
+
* The ID of a lead
|
154
|
+
* @type {string}
|
155
|
+
* @memberof LeadsApiGetLeadConversionStatus
|
156
|
+
*/
|
157
|
+
readonly id: string;
|
158
|
+
/**
|
159
|
+
* The ID of the conversion
|
160
|
+
* @type {string}
|
161
|
+
* @memberof LeadsApiGetLeadConversionStatus
|
162
|
+
*/
|
163
|
+
readonly conversion_id: string;
|
164
|
+
}
|
72
165
|
/**
|
73
166
|
* Request parameters for searchLeads operation in LeadsApi.
|
74
167
|
* @export
|
@@ -131,6 +224,24 @@ export interface LeadsApiSearchLeadsRequest {
|
|
131
224
|
* @extends {BaseAPI}
|
132
225
|
*/
|
133
226
|
export declare class LeadsApi extends BaseAPI {
|
227
|
+
/**
|
228
|
+
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
|
229
|
+
* @summary Convert a lead to a deal (BETA)
|
230
|
+
* @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
|
231
|
+
|
232
|
+
* @throws {RequiredError}
|
233
|
+
* @memberof LeadsApi
|
234
|
+
*/
|
235
|
+
convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest): Promise<AddConvertLeadToDealResponse>;
|
236
|
+
/**
|
237
|
+
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
|
238
|
+
* @summary Get Lead conversion status (BETA)
|
239
|
+
* @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
|
240
|
+
|
241
|
+
* @throws {RequiredError}
|
242
|
+
* @memberof LeadsApi
|
243
|
+
*/
|
244
|
+
getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest): Promise<GetConvertResponse1>;
|
134
245
|
/**
|
135
246
|
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
|
136
247
|
* @summary Search leads
|