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
@@ -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(localVarQueryParameter, "api_token", configuration);
|
165
|
+
// authentication oauth2 required
|
166
|
+
// oauth required
|
167
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration);
|
168
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
169
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
170
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
171
|
+
return {
|
172
|
+
url: toPathString(localVarUrlObj),
|
173
|
+
options: localVarRequestOptions,
|
174
|
+
};
|
175
|
+
}),
|
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
|
@@ -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(localVarQueryParameter, "api_token", configuration);
|
431
|
+
// authentication oauth2 required
|
432
|
+
// oauth required
|
433
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
434
|
+
if (filter_id !== undefined) {
|
435
|
+
localVarQueryParameter['filter_id'] = filter_id;
|
436
|
+
}
|
437
|
+
if (ids !== undefined) {
|
438
|
+
localVarQueryParameter['ids'] = ids;
|
439
|
+
}
|
440
|
+
if (owner_id !== undefined) {
|
441
|
+
localVarQueryParameter['owner_id'] = owner_id;
|
442
|
+
}
|
443
|
+
if (person_id !== undefined) {
|
444
|
+
localVarQueryParameter['person_id'] = person_id;
|
445
|
+
}
|
446
|
+
if (org_id !== undefined) {
|
447
|
+
localVarQueryParameter['org_id'] = org_id;
|
448
|
+
}
|
449
|
+
if (pipeline_id !== undefined) {
|
450
|
+
localVarQueryParameter['pipeline_id'] = pipeline_id;
|
451
|
+
}
|
452
|
+
if (stage_id !== undefined) {
|
453
|
+
localVarQueryParameter['stage_id'] = stage_id;
|
454
|
+
}
|
455
|
+
if (status !== undefined) {
|
456
|
+
localVarQueryParameter['status'] = status;
|
457
|
+
}
|
458
|
+
if (updated_since !== undefined) {
|
459
|
+
localVarQueryParameter['updated_since'] = updated_since;
|
460
|
+
}
|
461
|
+
if (updated_until !== undefined) {
|
462
|
+
localVarQueryParameter['updated_until'] = updated_until;
|
463
|
+
}
|
464
|
+
if (sort_by !== undefined) {
|
465
|
+
localVarQueryParameter['sort_by'] = sort_by;
|
466
|
+
}
|
467
|
+
if (sort_direction !== undefined) {
|
468
|
+
localVarQueryParameter['sort_direction'] = sort_direction;
|
469
|
+
}
|
470
|
+
if (include_fields !== undefined) {
|
471
|
+
localVarQueryParameter['include_fields'] = include_fields;
|
472
|
+
}
|
473
|
+
if (custom_fields !== undefined) {
|
474
|
+
localVarQueryParameter['custom_fields'] = custom_fields;
|
475
|
+
}
|
476
|
+
if (limit !== undefined) {
|
477
|
+
localVarQueryParameter['limit'] = limit;
|
478
|
+
}
|
479
|
+
if (cursor !== undefined) {
|
480
|
+
localVarQueryParameter['cursor'] = cursor;
|
481
|
+
}
|
482
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
483
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
484
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
485
|
+
return {
|
486
|
+
url: toPathString(localVarUrlObj),
|
487
|
+
options: localVarRequestOptions,
|
488
|
+
};
|
489
|
+
}),
|
362
490
|
/**
|
363
491
|
* Returns the details of a specific deal.
|
364
492
|
* @summary Get details of a deal
|
@@ -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(localVarQueryParameter, "api_token", configuration);
|
559
|
+
// authentication oauth2 required
|
560
|
+
// oauth required
|
561
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read"], configuration);
|
562
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
563
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
564
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
565
|
+
return {
|
566
|
+
url: toPathString(localVarUrlObj),
|
567
|
+
options: localVarRequestOptions,
|
568
|
+
};
|
569
|
+
}),
|
404
570
|
/**
|
405
571
|
* Lists users who are following the deal.
|
406
572
|
* @summary List followers of a deal
|
@@ -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.
|
@@ -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
|
|
@@ -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
|