pipedrive 24.2.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/versions/v1/api/activities-api.d.ts +40 -40
- package/dist/esm/versions/v1/api/activities-api.js +40 -40
- package/dist/esm/versions/v1/api/deals-api.d.ts +413 -91
- package/dist/esm/versions/v1/api/deals-api.js +419 -90
- package/dist/esm/versions/v1/api/item-search-api.d.ts +8 -8
- package/dist/esm/versions/v1/api/item-search-api.js +8 -8
- package/dist/esm/versions/v1/api/leads-api.d.ts +100 -14
- package/dist/esm/versions/v1/api/leads-api.js +107 -14
- package/dist/esm/versions/v1/api/notes-api.d.ts +18 -2
- package/dist/esm/versions/v1/api/notes-api.js +15 -5
- package/dist/esm/versions/v1/api/organizations-api.d.ts +71 -71
- package/dist/esm/versions/v1/api/organizations-api.js +70 -70
- package/dist/esm/versions/v1/api/persons-api.d.ts +59 -59
- package/dist/esm/versions/v1/api/persons-api.js +58 -58
- package/dist/esm/versions/v1/api/pipelines-api.d.ts +28 -28
- package/dist/esm/versions/v1/api/pipelines-api.js +28 -28
- package/dist/esm/versions/v1/api/products-api.d.ts +24 -24
- package/dist/esm/versions/v1/api/products-api.js +24 -24
- package/dist/esm/versions/v1/api/stages-api.d.ts +36 -36
- package/dist/esm/versions/v1/api/stages-api.js +36 -36
- package/dist/esm/versions/v1/api/subscriptions-api.d.ts +36 -36
- package/dist/esm/versions/v1/api/subscriptions-api.js +36 -36
- package/dist/esm/versions/v1/api/webhooks-api.d.ts +4 -4
- package/dist/esm/versions/v1/api/webhooks-api.js +4 -4
- package/dist/esm/versions/v1/base.d.ts +2 -3
- package/dist/esm/versions/v1/configuration.d.ts +2 -2
- package/dist/esm/versions/v1/models/add-note-request-all-of.d.ts +9 -4
- package/dist/esm/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
- package/dist/esm/versions/v1/models/add-note-request-all-of1.js +4 -0
- package/dist/esm/versions/v1/models/add-webhook-request.d.ts +5 -6
- package/dist/esm/versions/v1/models/add-webhook-request.js +4 -5
- package/dist/esm/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/esm/versions/v1/models/index.d.ts +1 -0
- package/dist/esm/versions/v1/models/index.js +1 -0
- package/dist/esm/versions/v1/models/note-project.d.ts +23 -0
- package/dist/esm/versions/v1/models/note-project.js +14 -0
- package/dist/esm/versions/v1/models/note-request-all-of1.d.ts +5 -0
- package/dist/esm/versions/v1/models/note.d.ts +16 -0
- package/dist/esm/versions/v1/models/user-access.d.ts +3 -2
- package/dist/esm/versions/v1/models/user-access.js +4 -3
- package/dist/esm/versions/v1/models/user-access1.d.ts +3 -2
- package/dist/esm/versions/v1/models/user-access1.js +4 -3
- package/dist/esm/versions/v2/api/activities-api.d.ts +15 -7
- package/dist/esm/versions/v2/api/activities-api.js +12 -7
- package/dist/esm/versions/v2/api/beta-api.d.ts +194 -2532
- package/dist/esm/versions/v2/api/beta-api.js +263 -2928
- package/dist/esm/versions/v2/api/deals-api.d.ts +509 -4
- package/dist/esm/versions/v2/api/deals-api.js +589 -4
- package/dist/esm/versions/v2/api/leads-api.d.ts +111 -0
- package/dist/esm/versions/v2/api/leads-api.js +146 -1
- package/dist/esm/versions/v2/api/organizations-api.d.ts +237 -0
- package/dist/esm/versions/v2/api/organizations-api.js +301 -0
- package/dist/esm/versions/v2/api/persons-api.d.ts +245 -8
- package/dist/esm/versions/v2/api/persons-api.js +309 -8
- package/dist/esm/versions/v2/api/products-api.d.ts +237 -0
- package/dist/esm/versions/v2/api/products-api.js +301 -0
- package/dist/esm/versions/v2/api/users-api.d.ts +103 -0
- package/dist/esm/versions/v2/api/users-api.js +140 -0
- package/dist/esm/versions/v2/api.d.ts +1 -0
- package/dist/esm/versions/v2/api.js +1 -0
- package/dist/esm/versions/v2/base.d.ts +2 -3
- package/dist/esm/versions/v2/configuration.d.ts +2 -2
- package/dist/esm/versions/v2/models/activity-item.d.ts +5 -0
- package/dist/esm/versions/v2/models/activity-item1.d.ts +5 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.js +14 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
- package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.js +14 -0
- package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
- package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.js +14 -0
- package/dist/esm/versions/v2/models/add-deal-follower-request.d.ts +23 -0
- package/dist/esm/versions/v2/models/add-deal-follower-request.js +14 -0
- package/dist/esm/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
- package/dist/esm/versions/v2/models/add-follower-response-all-of.js +14 -0
- package/dist/esm/versions/v2/models/add-follower-response.d.ts +18 -0
- package/dist/esm/versions/v2/models/add-follower-response.js +14 -0
- package/dist/esm/versions/v2/models/add-person-request.d.ts +12 -0
- package/dist/esm/versions/v2/models/add-person-request.js +6 -1
- package/dist/esm/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
- package/dist/esm/versions/v2/models/convert-lead-to-deal-request.js +14 -0
- package/dist/esm/versions/v2/models/deal-item.d.ts +5 -0
- package/dist/esm/versions/v2/models/deal-item1.d.ts +5 -0
- package/dist/esm/versions/v2/models/delete-follower-response-data.d.ts +23 -0
- package/dist/esm/versions/v2/models/delete-follower-response-data.js +14 -0
- package/dist/esm/versions/v2/models/delete-follower-response.d.ts +29 -0
- package/dist/esm/versions/v2/models/delete-follower-response.js +14 -0
- package/dist/esm/versions/v2/models/follower-changelog-item.d.ts +38 -0
- package/dist/esm/versions/v2/models/follower-changelog-item.js +14 -0
- package/dist/esm/versions/v2/models/follower-item.d.ts +28 -0
- package/dist/esm/versions/v2/models/follower-item.js +14 -0
- package/dist/esm/versions/v2/models/follower-item1.d.ts +28 -0
- package/dist/esm/versions/v2/models/follower-item1.js +14 -0
- package/dist/esm/versions/v2/models/get-convert-response.d.ts +43 -0
- package/dist/esm/versions/v2/models/get-convert-response.js +14 -0
- package/dist/esm/versions/v2/models/get-convert-response1-data.d.ts +46 -0
- package/dist/esm/versions/v2/models/get-convert-response1-data.js +20 -0
- package/dist/esm/versions/v2/models/get-convert-response1.d.ts +34 -0
- package/dist/esm/versions/v2/models/get-convert-response1.js +14 -0
- package/dist/esm/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.js +14 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
- package/dist/esm/versions/v2/models/get-follower-changelogs-response.js +14 -0
- package/dist/esm/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
- package/dist/esm/versions/v2/models/get-followers-response-all-of.js +14 -0
- package/dist/esm/versions/v2/models/get-followers-response.d.ts +18 -0
- package/dist/esm/versions/v2/models/get-followers-response.js +14 -0
- package/dist/esm/versions/v2/models/index.d.ts +19 -0
- package/dist/esm/versions/v2/models/index.js +19 -0
- package/dist/esm/versions/v2/models/update-person-request.d.ts +12 -0
- package/dist/esm/versions/v2/models/update-person-request.js +6 -1
- package/dist/versions/v1/api/activities-api.d.ts +40 -40
- package/dist/versions/v1/api/activities-api.js +40 -40
- package/dist/versions/v1/api/deals-api.d.ts +413 -91
- package/dist/versions/v1/api/deals-api.js +419 -90
- package/dist/versions/v1/api/item-search-api.d.ts +8 -8
- package/dist/versions/v1/api/item-search-api.js +8 -8
- package/dist/versions/v1/api/leads-api.d.ts +100 -14
- package/dist/versions/v1/api/leads-api.js +107 -14
- package/dist/versions/v1/api/notes-api.d.ts +18 -2
- package/dist/versions/v1/api/notes-api.js +15 -5
- package/dist/versions/v1/api/organizations-api.d.ts +71 -71
- package/dist/versions/v1/api/organizations-api.js +70 -70
- package/dist/versions/v1/api/persons-api.d.ts +59 -59
- package/dist/versions/v1/api/persons-api.js +58 -58
- package/dist/versions/v1/api/pipelines-api.d.ts +28 -28
- package/dist/versions/v1/api/pipelines-api.js +28 -28
- package/dist/versions/v1/api/products-api.d.ts +24 -24
- package/dist/versions/v1/api/products-api.js +24 -24
- package/dist/versions/v1/api/stages-api.d.ts +36 -36
- package/dist/versions/v1/api/stages-api.js +36 -36
- package/dist/versions/v1/api/subscriptions-api.d.ts +36 -36
- package/dist/versions/v1/api/subscriptions-api.js +36 -36
- package/dist/versions/v1/api/webhooks-api.d.ts +4 -4
- package/dist/versions/v1/api/webhooks-api.js +4 -4
- package/dist/versions/v1/base.d.ts +2 -3
- package/dist/versions/v1/configuration.d.ts +2 -2
- package/dist/versions/v1/models/add-note-request-all-of.d.ts +9 -4
- package/dist/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
- package/dist/versions/v1/models/add-note-request-all-of1.js +5 -1
- package/dist/versions/v1/models/add-webhook-request.d.ts +5 -6
- package/dist/versions/v1/models/add-webhook-request.js +4 -5
- package/dist/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/versions/v1/models/index.d.ts +1 -0
- package/dist/versions/v1/models/index.js +1 -0
- package/dist/versions/v1/models/note-project.d.ts +23 -0
- package/dist/versions/v1/models/note-project.js +15 -0
- package/dist/versions/v1/models/note-request-all-of1.d.ts +5 -0
- package/dist/versions/v1/models/note.d.ts +16 -0
- package/dist/versions/v1/models/user-access.d.ts +3 -2
- package/dist/versions/v1/models/user-access.js +4 -3
- package/dist/versions/v1/models/user-access1.d.ts +3 -2
- package/dist/versions/v1/models/user-access1.js +4 -3
- package/dist/versions/v2/api/activities-api.d.ts +15 -7
- package/dist/versions/v2/api/activities-api.js +12 -7
- package/dist/versions/v2/api/beta-api.d.ts +194 -2532
- package/dist/versions/v2/api/beta-api.js +265 -2930
- package/dist/versions/v2/api/deals-api.d.ts +509 -4
- package/dist/versions/v2/api/deals-api.js +589 -4
- package/dist/versions/v2/api/leads-api.d.ts +111 -0
- package/dist/versions/v2/api/leads-api.js +145 -0
- package/dist/versions/v2/api/organizations-api.d.ts +237 -0
- package/dist/versions/v2/api/organizations-api.js +301 -0
- package/dist/versions/v2/api/persons-api.d.ts +245 -8
- package/dist/versions/v2/api/persons-api.js +309 -8
- package/dist/versions/v2/api/products-api.d.ts +237 -0
- package/dist/versions/v2/api/products-api.js +301 -0
- package/dist/versions/v2/api/users-api.d.ts +103 -0
- package/dist/versions/v2/api/users-api.js +150 -0
- package/dist/versions/v2/api.d.ts +1 -0
- package/dist/versions/v2/api.js +1 -0
- package/dist/versions/v2/base.d.ts +2 -3
- package/dist/versions/v2/configuration.d.ts +2 -2
- package/dist/versions/v2/models/activity-item.d.ts +5 -0
- package/dist/versions/v2/models/activity-item1.d.ts +5 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.js +15 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
- package/dist/versions/v2/models/add-convert-deal-to-lead-response.js +15 -0
- package/dist/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
- package/dist/versions/v2/models/add-convert-lead-to-deal-response.js +15 -0
- package/dist/versions/v2/models/add-deal-follower-request.d.ts +23 -0
- package/dist/versions/v2/models/add-deal-follower-request.js +15 -0
- package/dist/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
- package/dist/versions/v2/models/add-follower-response-all-of.js +15 -0
- package/dist/versions/v2/models/add-follower-response.d.ts +18 -0
- package/dist/versions/v2/models/add-follower-response.js +15 -0
- package/dist/versions/v2/models/add-person-request.d.ts +12 -0
- package/dist/versions/v2/models/add-person-request.js +7 -0
- package/dist/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
- package/dist/versions/v2/models/convert-lead-to-deal-request.js +15 -0
- package/dist/versions/v2/models/deal-item.d.ts +5 -0
- package/dist/versions/v2/models/deal-item1.d.ts +5 -0
- package/dist/versions/v2/models/delete-follower-response-data.d.ts +23 -0
- package/dist/versions/v2/models/delete-follower-response-data.js +15 -0
- package/dist/versions/v2/models/delete-follower-response.d.ts +29 -0
- package/dist/versions/v2/models/delete-follower-response.js +15 -0
- package/dist/versions/v2/models/follower-changelog-item.d.ts +38 -0
- package/dist/versions/v2/models/follower-changelog-item.js +15 -0
- package/dist/versions/v2/models/follower-item.d.ts +28 -0
- package/dist/versions/v2/models/follower-item.js +15 -0
- package/dist/versions/v2/models/follower-item1.d.ts +28 -0
- package/dist/versions/v2/models/follower-item1.js +15 -0
- package/dist/versions/v2/models/get-convert-response.d.ts +43 -0
- package/dist/versions/v2/models/get-convert-response.js +15 -0
- package/dist/versions/v2/models/get-convert-response1-data.d.ts +46 -0
- package/dist/versions/v2/models/get-convert-response1-data.js +23 -0
- package/dist/versions/v2/models/get-convert-response1.d.ts +34 -0
- package/dist/versions/v2/models/get-convert-response1.js +15 -0
- package/dist/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
- package/dist/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
- package/dist/versions/v2/models/get-follower-changelogs-response-all-of.js +15 -0
- package/dist/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
- package/dist/versions/v2/models/get-follower-changelogs-response.js +15 -0
- package/dist/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
- package/dist/versions/v2/models/get-followers-response-all-of.js +15 -0
- package/dist/versions/v2/models/get-followers-response.d.ts +18 -0
- package/dist/versions/v2/models/get-followers-response.js +15 -0
- package/dist/versions/v2/models/index.d.ts +19 -0
- package/dist/versions/v2/models/index.js +19 -0
- package/dist/versions/v2/models/update-person-request.d.ts +12 -0
- package/dist/versions/v2/models/update-person-request.js +7 -0
- package/package.json +1 -1
@@ -71,6 +71,43 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
71
71
|
options: localVarRequestOptions,
|
72
72
|
};
|
73
73
|
}),
|
74
|
+
/**
|
75
|
+
* Adds a user as a follower to the deal.
|
76
|
+
* @summary Add a follower to a deal
|
77
|
+
* @param {number} id The ID of the deal
|
78
|
+
* @param {AddDealFollowerRequest} [AddDealFollowerRequest]
|
79
|
+
|
80
|
+
* @throws {RequiredError}
|
81
|
+
*/
|
82
|
+
addDealFollower: (id, AddDealFollowerRequest) => __awaiter(this, void 0, void 0, function* () {
|
83
|
+
// verify required parameter 'id' is not null or undefined
|
84
|
+
(0, common_1.assertParamExists)('addDealFollower', 'id', id);
|
85
|
+
const localVarPath = `/deals/{id}/followers`
|
86
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
87
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
88
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
89
|
+
let baseOptions;
|
90
|
+
if (configuration) {
|
91
|
+
baseOptions = configuration.baseOptions;
|
92
|
+
}
|
93
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
94
|
+
const localVarHeaderParameter = {};
|
95
|
+
const localVarQueryParameter = {};
|
96
|
+
// authentication api_key required
|
97
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
98
|
+
// authentication oauth2 required
|
99
|
+
// oauth required
|
100
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
101
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
102
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
103
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
104
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
105
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddDealFollowerRequest, localVarRequestOptions, configuration);
|
106
|
+
return {
|
107
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
108
|
+
options: localVarRequestOptions,
|
109
|
+
};
|
110
|
+
}),
|
74
111
|
/**
|
75
112
|
* Adds a product to a deal, creating a new item called a deal-product.
|
76
113
|
* @summary Add a product to a deal
|
@@ -108,6 +145,40 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
108
145
|
options: localVarRequestOptions,
|
109
146
|
};
|
110
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
|
+
}),
|
111
182
|
/**
|
112
183
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
113
184
|
* @summary Delete a discount from a deal
|
@@ -180,6 +251,44 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
180
251
|
options: localVarRequestOptions,
|
181
252
|
};
|
182
253
|
}),
|
254
|
+
/**
|
255
|
+
* Deletes a user follower from the deal.
|
256
|
+
* @summary Delete a follower from a deal
|
257
|
+
* @param {number} id The ID of the deal
|
258
|
+
* @param {number} follower_id The ID of the following user
|
259
|
+
|
260
|
+
* @throws {RequiredError}
|
261
|
+
*/
|
262
|
+
deleteDealFollower: (id, follower_id) => __awaiter(this, void 0, void 0, function* () {
|
263
|
+
// verify required parameter 'id' is not null or undefined
|
264
|
+
(0, common_1.assertParamExists)('deleteDealFollower', 'id', id);
|
265
|
+
// verify required parameter 'follower_id' is not null or undefined
|
266
|
+
(0, common_1.assertParamExists)('deleteDealFollower', 'follower_id', follower_id);
|
267
|
+
const localVarPath = `/deals/{id}/followers/{follower_id}`
|
268
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
269
|
+
.replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_id)));
|
270
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
271
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
272
|
+
let baseOptions;
|
273
|
+
if (configuration) {
|
274
|
+
baseOptions = configuration.baseOptions;
|
275
|
+
}
|
276
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
277
|
+
const localVarHeaderParameter = {};
|
278
|
+
const localVarQueryParameter = {};
|
279
|
+
// authentication api_key required
|
280
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
281
|
+
// authentication oauth2 required
|
282
|
+
// oauth required
|
283
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
284
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
285
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
286
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
287
|
+
return {
|
288
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
289
|
+
options: localVarRequestOptions,
|
290
|
+
};
|
291
|
+
}),
|
183
292
|
/**
|
184
293
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
185
294
|
* @summary Delete an attached product from a deal
|
@@ -290,6 +399,100 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
290
399
|
options: localVarRequestOptions,
|
291
400
|
};
|
292
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
|
+
}),
|
293
496
|
/**
|
294
497
|
* Returns the details of a specific deal.
|
295
498
|
* @summary Get details of a deal
|
@@ -332,6 +535,128 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
332
535
|
options: localVarRequestOptions,
|
333
536
|
};
|
334
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
|
+
}),
|
576
|
+
/**
|
577
|
+
* Lists users who are following the deal.
|
578
|
+
* @summary List followers of a deal
|
579
|
+
* @param {number} id The ID of the deal
|
580
|
+
* @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.
|
581
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
582
|
+
|
583
|
+
* @throws {RequiredError}
|
584
|
+
*/
|
585
|
+
getDealFollowers: (id, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
586
|
+
// verify required parameter 'id' is not null or undefined
|
587
|
+
(0, common_1.assertParamExists)('getDealFollowers', 'id', id);
|
588
|
+
const localVarPath = `/deals/{id}/followers`
|
589
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
590
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
591
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
592
|
+
let baseOptions;
|
593
|
+
if (configuration) {
|
594
|
+
baseOptions = configuration.baseOptions;
|
595
|
+
}
|
596
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
597
|
+
const localVarHeaderParameter = {};
|
598
|
+
const localVarQueryParameter = {};
|
599
|
+
// authentication api_key required
|
600
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
601
|
+
// authentication oauth2 required
|
602
|
+
// oauth required
|
603
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
604
|
+
if (limit !== undefined) {
|
605
|
+
localVarQueryParameter['limit'] = limit;
|
606
|
+
}
|
607
|
+
if (cursor !== undefined) {
|
608
|
+
localVarQueryParameter['cursor'] = cursor;
|
609
|
+
}
|
610
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
611
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
612
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
613
|
+
return {
|
614
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
615
|
+
options: localVarRequestOptions,
|
616
|
+
};
|
617
|
+
}),
|
618
|
+
/**
|
619
|
+
* Lists changelogs about users have followed the deal.
|
620
|
+
* @summary List followers changelog of a deal
|
621
|
+
* @param {number} id The ID of the deal
|
622
|
+
* @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.
|
623
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
624
|
+
|
625
|
+
* @throws {RequiredError}
|
626
|
+
*/
|
627
|
+
getDealFollowersChangelog: (id, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
628
|
+
// verify required parameter 'id' is not null or undefined
|
629
|
+
(0, common_1.assertParamExists)('getDealFollowersChangelog', 'id', id);
|
630
|
+
const localVarPath = `/deals/{id}/followers/changelog`
|
631
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
632
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
633
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
634
|
+
let baseOptions;
|
635
|
+
if (configuration) {
|
636
|
+
baseOptions = configuration.baseOptions;
|
637
|
+
}
|
638
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
639
|
+
const localVarHeaderParameter = {};
|
640
|
+
const localVarQueryParameter = {};
|
641
|
+
// authentication api_key required
|
642
|
+
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
643
|
+
// authentication oauth2 required
|
644
|
+
// oauth required
|
645
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
646
|
+
if (limit !== undefined) {
|
647
|
+
localVarQueryParameter['limit'] = limit;
|
648
|
+
}
|
649
|
+
if (cursor !== undefined) {
|
650
|
+
localVarQueryParameter['cursor'] = cursor;
|
651
|
+
}
|
652
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
653
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
654
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
655
|
+
return {
|
656
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
657
|
+
options: localVarRequestOptions,
|
658
|
+
};
|
659
|
+
}),
|
335
660
|
/**
|
336
661
|
* Lists products attached to a deal.
|
337
662
|
* @summary List products attached to a deal
|
@@ -383,7 +708,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
383
708
|
};
|
384
709
|
}),
|
385
710
|
/**
|
386
|
-
* Returns data about all deals.
|
711
|
+
* Returns data about all not archived deals.
|
387
712
|
* @summary Get all deals
|
388
713
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
389
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.
|
@@ -905,6 +1230,20 @@ const DealsApiFp = function (configuration) {
|
|
905
1230
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
906
1231
|
});
|
907
1232
|
},
|
1233
|
+
/**
|
1234
|
+
* Adds a user as a follower to the deal.
|
1235
|
+
* @summary Add a follower to a deal
|
1236
|
+
* @param {number} id The ID of the deal
|
1237
|
+
* @param {AddDealFollowerRequest} [AddDealFollowerRequest]
|
1238
|
+
|
1239
|
+
* @throws {RequiredError}
|
1240
|
+
*/
|
1241
|
+
addDealFollower(id, AddDealFollowerRequest) {
|
1242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1243
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.addDealFollower(id, AddDealFollowerRequest);
|
1244
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1245
|
+
});
|
1246
|
+
},
|
908
1247
|
/**
|
909
1248
|
* Adds a product to a deal, creating a new item called a deal-product.
|
910
1249
|
* @summary Add a product to a deal
|
@@ -919,6 +1258,19 @@ const DealsApiFp = function (configuration) {
|
|
919
1258
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
920
1259
|
});
|
921
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
|
+
},
|
922
1274
|
/**
|
923
1275
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
924
1276
|
* @summary Delete a discount from a deal
|
@@ -946,6 +1298,20 @@ const DealsApiFp = function (configuration) {
|
|
946
1298
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
947
1299
|
});
|
948
1300
|
},
|
1301
|
+
/**
|
1302
|
+
* Deletes a user follower from the deal.
|
1303
|
+
* @summary Delete a follower from a deal
|
1304
|
+
* @param {number} id The ID of the deal
|
1305
|
+
* @param {number} follower_id The ID of the following user
|
1306
|
+
|
1307
|
+
* @throws {RequiredError}
|
1308
|
+
*/
|
1309
|
+
deleteDealFollower(id, follower_id) {
|
1310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1311
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteDealFollower(id, follower_id);
|
1312
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1313
|
+
});
|
1314
|
+
},
|
949
1315
|
/**
|
950
1316
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
951
1317
|
* @summary Delete an attached product from a deal
|
@@ -987,6 +1353,34 @@ const DealsApiFp = function (configuration) {
|
|
987
1353
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
988
1354
|
});
|
989
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
|
+
},
|
990
1384
|
/**
|
991
1385
|
* Returns the details of a specific deal.
|
992
1386
|
* @summary Get details of a deal
|
@@ -1002,6 +1396,50 @@ const DealsApiFp = function (configuration) {
|
|
1002
1396
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1003
1397
|
});
|
1004
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
|
+
},
|
1413
|
+
/**
|
1414
|
+
* Lists users who are following the deal.
|
1415
|
+
* @summary List followers of a deal
|
1416
|
+
* @param {number} id The ID of the deal
|
1417
|
+
* @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.
|
1418
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1419
|
+
|
1420
|
+
* @throws {RequiredError}
|
1421
|
+
*/
|
1422
|
+
getDealFollowers(id, limit, cursor) {
|
1423
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1424
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealFollowers(id, limit, cursor);
|
1425
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1426
|
+
});
|
1427
|
+
},
|
1428
|
+
/**
|
1429
|
+
* Lists changelogs about users have followed the deal.
|
1430
|
+
* @summary List followers changelog of a deal
|
1431
|
+
* @param {number} id The ID of the deal
|
1432
|
+
* @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.
|
1433
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1434
|
+
|
1435
|
+
* @throws {RequiredError}
|
1436
|
+
*/
|
1437
|
+
getDealFollowersChangelog(id, limit, cursor) {
|
1438
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1439
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealFollowersChangelog(id, limit, cursor);
|
1440
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1441
|
+
});
|
1442
|
+
},
|
1005
1443
|
/**
|
1006
1444
|
* Lists products attached to a deal.
|
1007
1445
|
* @summary List products attached to a deal
|
@@ -1020,7 +1458,7 @@ const DealsApiFp = function (configuration) {
|
|
1020
1458
|
});
|
1021
1459
|
},
|
1022
1460
|
/**
|
1023
|
-
* Returns data about all deals.
|
1461
|
+
* Returns data about all not archived deals.
|
1024
1462
|
* @summary Get all deals
|
1025
1463
|
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
1026
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.
|
@@ -1209,6 +1647,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1209
1647
|
addDeal(requestParameters = {}) {
|
1210
1648
|
return localVarFp.addDeal(requestParameters.AddDealRequest).then((request) => request(axios, basePath));
|
1211
1649
|
},
|
1650
|
+
/**
|
1651
|
+
* Adds a user as a follower to the deal.
|
1652
|
+
* @summary Add a follower to a deal
|
1653
|
+
* @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
|
1654
|
+
|
1655
|
+
* @throws {RequiredError}
|
1656
|
+
*/
|
1657
|
+
addDealFollower(requestParameters) {
|
1658
|
+
return localVarFp.addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest).then((request) => request(axios, basePath));
|
1659
|
+
},
|
1212
1660
|
/**
|
1213
1661
|
* Adds a product to a deal, creating a new item called a deal-product.
|
1214
1662
|
* @summary Add a product to a deal
|
@@ -1219,6 +1667,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1219
1667
|
addDealProduct(requestParameters) {
|
1220
1668
|
return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(axios, basePath));
|
1221
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
|
+
},
|
1222
1680
|
/**
|
1223
1681
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1224
1682
|
* @summary Delete a discount from a deal
|
@@ -1239,6 +1697,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1239
1697
|
deleteDeal(requestParameters) {
|
1240
1698
|
return localVarFp.deleteDeal(requestParameters.id).then((request) => request(axios, basePath));
|
1241
1699
|
},
|
1700
|
+
/**
|
1701
|
+
* Deletes a user follower from the deal.
|
1702
|
+
* @summary Delete a follower from a deal
|
1703
|
+
* @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
|
1704
|
+
|
1705
|
+
* @throws {RequiredError}
|
1706
|
+
*/
|
1707
|
+
deleteDealFollower(requestParameters) {
|
1708
|
+
return localVarFp.deleteDealFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(axios, basePath));
|
1709
|
+
},
|
1242
1710
|
/**
|
1243
1711
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
1244
1712
|
* @summary Delete an attached product from a deal
|
@@ -1269,6 +1737,16 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1269
1737
|
getAdditionalDiscounts(requestParameters) {
|
1270
1738
|
return localVarFp.getAdditionalDiscounts(requestParameters.id).then((request) => request(axios, basePath));
|
1271
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
|
+
},
|
1272
1750
|
/**
|
1273
1751
|
* Returns the details of a specific deal.
|
1274
1752
|
* @summary Get details of a deal
|
@@ -1279,6 +1757,36 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1279
1757
|
getDeal(requestParameters) {
|
1280
1758
|
return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
1281
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
|
+
},
|
1770
|
+
/**
|
1771
|
+
* Lists users who are following the deal.
|
1772
|
+
* @summary List followers of a deal
|
1773
|
+
* @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
|
1774
|
+
|
1775
|
+
* @throws {RequiredError}
|
1776
|
+
*/
|
1777
|
+
getDealFollowers(requestParameters) {
|
1778
|
+
return localVarFp.getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
1779
|
+
},
|
1780
|
+
/**
|
1781
|
+
* Lists changelogs about users have followed the deal.
|
1782
|
+
* @summary List followers changelog of a deal
|
1783
|
+
* @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
|
1784
|
+
|
1785
|
+
* @throws {RequiredError}
|
1786
|
+
*/
|
1787
|
+
getDealFollowersChangelog(requestParameters) {
|
1788
|
+
return localVarFp.getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
1789
|
+
},
|
1282
1790
|
/**
|
1283
1791
|
* Lists products attached to a deal.
|
1284
1792
|
* @summary List products attached to a deal
|
@@ -1290,7 +1798,7 @@ const DealsApiFactory = function (configuration, basePath, axios) {
|
|
1290
1798
|
return localVarFp.getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
1291
1799
|
},
|
1292
1800
|
/**
|
1293
|
-
* Returns data about all deals.
|
1801
|
+
* Returns data about all not archived deals.
|
1294
1802
|
* @summary Get all deals
|
1295
1803
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1296
1804
|
|
@@ -1410,6 +1918,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1410
1918
|
addDeal(requestParameters = {}) {
|
1411
1919
|
return (0, exports.DealsApiFp)(this.configuration).addDeal(requestParameters.AddDealRequest).then((request) => request(this.axios, this.basePath));
|
1412
1920
|
}
|
1921
|
+
/**
|
1922
|
+
* Adds a user as a follower to the deal.
|
1923
|
+
* @summary Add a follower to a deal
|
1924
|
+
* @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
|
1925
|
+
|
1926
|
+
* @throws {RequiredError}
|
1927
|
+
* @memberof DealsApi
|
1928
|
+
*/
|
1929
|
+
addDealFollower(requestParameters) {
|
1930
|
+
return (0, exports.DealsApiFp)(this.configuration).addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest).then((request) => request(this.axios, this.basePath));
|
1931
|
+
}
|
1413
1932
|
/**
|
1414
1933
|
* Adds a product to a deal, creating a new item called a deal-product.
|
1415
1934
|
* @summary Add a product to a deal
|
@@ -1421,6 +1940,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1421
1940
|
addDealProduct(requestParameters) {
|
1422
1941
|
return (0, exports.DealsApiFp)(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(this.axios, this.basePath));
|
1423
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
|
+
}
|
1424
1954
|
/**
|
1425
1955
|
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1426
1956
|
* @summary Delete a discount from a deal
|
@@ -1443,6 +1973,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1443
1973
|
deleteDeal(requestParameters) {
|
1444
1974
|
return (0, exports.DealsApiFp)(this.configuration).deleteDeal(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1445
1975
|
}
|
1976
|
+
/**
|
1977
|
+
* Deletes a user follower from the deal.
|
1978
|
+
* @summary Delete a follower from a deal
|
1979
|
+
* @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
|
1980
|
+
|
1981
|
+
* @throws {RequiredError}
|
1982
|
+
* @memberof DealsApi
|
1983
|
+
*/
|
1984
|
+
deleteDealFollower(requestParameters) {
|
1985
|
+
return (0, exports.DealsApiFp)(this.configuration).deleteDealFollower(requestParameters.id, requestParameters.follower_id).then((request) => request(this.axios, this.basePath));
|
1986
|
+
}
|
1446
1987
|
/**
|
1447
1988
|
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
1448
1989
|
* @summary Delete an attached product from a deal
|
@@ -1476,6 +2017,17 @@ class DealsApi extends base_1.BaseAPI {
|
|
1476
2017
|
getAdditionalDiscounts(requestParameters) {
|
1477
2018
|
return (0, exports.DealsApiFp)(this.configuration).getAdditionalDiscounts(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
1478
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
|
+
}
|
1479
2031
|
/**
|
1480
2032
|
* Returns the details of a specific deal.
|
1481
2033
|
* @summary Get details of a deal
|
@@ -1487,6 +2039,39 @@ class DealsApi extends base_1.BaseAPI {
|
|
1487
2039
|
getDeal(requestParameters) {
|
1488
2040
|
return (0, exports.DealsApiFp)(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
1489
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
|
+
}
|
2053
|
+
/**
|
2054
|
+
* Lists users who are following the deal.
|
2055
|
+
* @summary List followers of a deal
|
2056
|
+
* @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
|
2057
|
+
|
2058
|
+
* @throws {RequiredError}
|
2059
|
+
* @memberof DealsApi
|
2060
|
+
*/
|
2061
|
+
getDealFollowers(requestParameters) {
|
2062
|
+
return (0, exports.DealsApiFp)(this.configuration).getDealFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
2063
|
+
}
|
2064
|
+
/**
|
2065
|
+
* Lists changelogs about users have followed the deal.
|
2066
|
+
* @summary List followers changelog of a deal
|
2067
|
+
* @param {DealsApiGetDealFollowersChangelogRequest} requestParameters Request parameters.
|
2068
|
+
|
2069
|
+
* @throws {RequiredError}
|
2070
|
+
* @memberof DealsApi
|
2071
|
+
*/
|
2072
|
+
getDealFollowersChangelog(requestParameters) {
|
2073
|
+
return (0, exports.DealsApiFp)(this.configuration).getDealFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
2074
|
+
}
|
1490
2075
|
/**
|
1491
2076
|
* Lists products attached to a deal.
|
1492
2077
|
* @summary List products attached to a deal
|
@@ -1499,7 +2084,7 @@ class DealsApi extends base_1.BaseAPI {
|
|
1499
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));
|
1500
2085
|
}
|
1501
2086
|
/**
|
1502
|
-
* Returns data about all deals.
|
2087
|
+
* Returns data about all not archived deals.
|
1503
2088
|
* @summary Get all deals
|
1504
2089
|
* @param {DealsApiGetDealsRequest} requestParameters Request parameters.
|
1505
2090
|
|