pipedrive 24.2.0 → 25.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/deals-api.d.ts +3 -3
- package/dist/esm/versions/v1/api/deals-api.js +2 -2
- package/dist/esm/versions/v1/api/organizations-api.d.ts +3 -3
- package/dist/esm/versions/v1/api/organizations-api.js +2 -2
- package/dist/esm/versions/v1/api/persons-api.d.ts +3 -3
- package/dist/esm/versions/v1/api/persons-api.js +2 -2
- 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/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/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/beta-api.d.ts +82 -2632
- package/dist/esm/versions/v2/api/beta-api.js +139 -3090
- package/dist/esm/versions/v2/api/deals-api.d.ts +237 -0
- package/dist/esm/versions/v2/api/deals-api.js +301 -0
- 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 +237 -0
- package/dist/esm/versions/v2/api/persons-api.js +301 -0
- 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/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/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-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 +12 -0
- package/dist/esm/versions/v2/models/index.js +12 -0
- package/dist/versions/v1/api/deals-api.d.ts +3 -3
- package/dist/versions/v1/api/deals-api.js +2 -2
- package/dist/versions/v1/api/organizations-api.d.ts +3 -3
- package/dist/versions/v1/api/organizations-api.js +2 -2
- package/dist/versions/v1/api/persons-api.d.ts +3 -3
- package/dist/versions/v1/api/persons-api.js +2 -2
- 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/models/add-webhook-request.d.ts +5 -6
- package/dist/versions/v1/models/add-webhook-request.js +4 -5
- 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/beta-api.d.ts +82 -2632
- package/dist/versions/v2/api/beta-api.js +141 -3092
- package/dist/versions/v2/api/deals-api.d.ts +237 -0
- package/dist/versions/v2/api/deals-api.js +301 -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 +237 -0
- package/dist/versions/v2/api/persons-api.js +301 -0
- 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/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/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-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 +12 -0
- package/dist/versions/v2/models/index.js +12 -0
- package/package.json +1 -1
@@ -39,83 +39,107 @@ const base_1 = require("../base");
|
|
39
39
|
const BetaApiAxiosParamCreator = function (configuration) {
|
40
40
|
return {
|
41
41
|
/**
|
42
|
-
*
|
43
|
-
* @summary
|
44
|
-
* @param {
|
42
|
+
* Removes an installment from a deal. Only available in Advanced and above plans.
|
43
|
+
* @summary Delete an installment from a deal
|
44
|
+
* @param {number} id The ID of the deal
|
45
|
+
* @param {number} installment_id The ID of the installment
|
45
46
|
|
46
47
|
* @throws {RequiredError}
|
47
48
|
*/
|
48
|
-
|
49
|
-
|
49
|
+
deleteInstallment: (id, installment_id) => __awaiter(this, void 0, void 0, function* () {
|
50
|
+
// verify required parameter 'id' is not null or undefined
|
51
|
+
(0, common_1.assertParamExists)('deleteInstallment', 'id', id);
|
52
|
+
// verify required parameter 'installment_id' is not null or undefined
|
53
|
+
(0, common_1.assertParamExists)('deleteInstallment', 'installment_id', installment_id);
|
54
|
+
const localVarPath = `/deals/{id}/installments/{installment_id}`
|
55
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
56
|
+
.replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
|
50
57
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
51
58
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
52
59
|
let baseOptions;
|
53
60
|
if (configuration) {
|
54
61
|
baseOptions = configuration.baseOptions;
|
55
62
|
}
|
56
|
-
const localVarRequestOptions = Object.assign({ method: '
|
63
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
57
64
|
const localVarHeaderParameter = {};
|
58
65
|
const localVarQueryParameter = {};
|
59
66
|
// authentication api_key required
|
60
67
|
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
61
68
|
// authentication oauth2 required
|
62
69
|
// oauth required
|
63
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["
|
64
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
70
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
65
71
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
66
72
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
67
73
|
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
68
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddActivityRequest, localVarRequestOptions, configuration);
|
69
74
|
return {
|
70
75
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
71
76
|
options: localVarRequestOptions,
|
72
77
|
};
|
73
78
|
}),
|
74
79
|
/**
|
75
|
-
*
|
76
|
-
* @summary
|
77
|
-
* @param {
|
80
|
+
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
81
|
+
* @summary List installments added to a list of deals
|
82
|
+
* @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
|
83
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
84
|
+
* @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.
|
85
|
+
* @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
|
86
|
+
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
78
87
|
|
79
88
|
* @throws {RequiredError}
|
80
89
|
*/
|
81
|
-
|
82
|
-
|
90
|
+
getInstallments: (deal_ids, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
|
91
|
+
// verify required parameter 'deal_ids' is not null or undefined
|
92
|
+
(0, common_1.assertParamExists)('getInstallments', 'deal_ids', deal_ids);
|
93
|
+
const localVarPath = `/deals/installments`;
|
83
94
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
84
95
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
85
96
|
let baseOptions;
|
86
97
|
if (configuration) {
|
87
98
|
baseOptions = configuration.baseOptions;
|
88
99
|
}
|
89
|
-
const localVarRequestOptions = Object.assign({ method: '
|
100
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
90
101
|
const localVarHeaderParameter = {};
|
91
102
|
const localVarQueryParameter = {};
|
92
103
|
// authentication api_key required
|
93
104
|
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
94
105
|
// authentication oauth2 required
|
95
106
|
// oauth required
|
96
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
97
|
-
|
107
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
108
|
+
if (deal_ids) {
|
109
|
+
localVarQueryParameter['deal_ids'] = deal_ids;
|
110
|
+
}
|
111
|
+
if (cursor !== undefined) {
|
112
|
+
localVarQueryParameter['cursor'] = cursor;
|
113
|
+
}
|
114
|
+
if (limit !== undefined) {
|
115
|
+
localVarQueryParameter['limit'] = limit;
|
116
|
+
}
|
117
|
+
if (sort_by !== undefined) {
|
118
|
+
localVarQueryParameter['sort_by'] = sort_by;
|
119
|
+
}
|
120
|
+
if (sort_direction !== undefined) {
|
121
|
+
localVarQueryParameter['sort_direction'] = sort_direction;
|
122
|
+
}
|
98
123
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
99
124
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
100
125
|
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
101
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddDealRequest, localVarRequestOptions, configuration);
|
102
126
|
return {
|
103
127
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
104
128
|
options: localVarRequestOptions,
|
105
129
|
};
|
106
130
|
}),
|
107
131
|
/**
|
108
|
-
* Adds
|
109
|
-
* @summary Add
|
132
|
+
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
133
|
+
* @summary Add an installment to a deal
|
110
134
|
* @param {number} id The ID of the deal
|
111
|
-
* @param {
|
135
|
+
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
|
112
136
|
|
113
137
|
* @throws {RequiredError}
|
114
138
|
*/
|
115
|
-
|
139
|
+
postInstallment: (id, AddInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
|
116
140
|
// verify required parameter 'id' is not null or undefined
|
117
|
-
(0, common_1.assertParamExists)('
|
118
|
-
const localVarPath = `/deals/{id}/
|
141
|
+
(0, common_1.assertParamExists)('postInstallment', 'id', id);
|
142
|
+
const localVarPath = `/deals/{id}/installments`
|
119
143
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
120
144
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
121
145
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
@@ -130,2737 +154,167 @@ const BetaApiAxiosParamCreator = function (configuration) {
|
|
130
154
|
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
131
155
|
// authentication oauth2 required
|
132
156
|
// oauth required
|
133
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["
|
134
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
135
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
136
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
137
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
138
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddDealProductRequest, localVarRequestOptions, configuration);
|
139
|
-
return {
|
140
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
141
|
-
options: localVarRequestOptions,
|
142
|
-
};
|
143
|
-
}),
|
144
|
-
/**
|
145
|
-
* Adds a new organization.
|
146
|
-
* @summary Add a new organization
|
147
|
-
* @param {AddOrganizationRequest} [AddOrganizationRequest]
|
148
|
-
|
149
|
-
* @throws {RequiredError}
|
150
|
-
*/
|
151
|
-
addOrganization: (AddOrganizationRequest) => __awaiter(this, void 0, void 0, function* () {
|
152
|
-
const localVarPath = `/organizations`;
|
153
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
154
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
155
|
-
let baseOptions;
|
156
|
-
if (configuration) {
|
157
|
-
baseOptions = configuration.baseOptions;
|
158
|
-
}
|
159
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
160
|
-
const localVarHeaderParameter = {};
|
161
|
-
const localVarQueryParameter = {};
|
162
|
-
// authentication api_key required
|
163
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
164
|
-
// authentication oauth2 required
|
165
|
-
// oauth required
|
166
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:full"], configuration);
|
157
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
167
158
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
168
159
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
169
160
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
170
161
|
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
171
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
162
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddInstallmentRequestBody, localVarRequestOptions, configuration);
|
172
163
|
return {
|
173
164
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
174
165
|
options: localVarRequestOptions,
|
175
166
|
};
|
176
167
|
}),
|
177
168
|
/**
|
178
|
-
*
|
179
|
-
* @summary
|
180
|
-
* @param {
|
169
|
+
* Edits an installment added to a deal. Only available in Advanced and above plans.
|
170
|
+
* @summary Update an installment added to a deal
|
171
|
+
* @param {number} id The ID of the deal
|
172
|
+
* @param {number} installment_id The ID of the installment
|
173
|
+
* @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
|
181
174
|
|
182
175
|
* @throws {RequiredError}
|
183
176
|
*/
|
184
|
-
|
185
|
-
|
177
|
+
updateInstallment: (id, installment_id, UpdateInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
|
178
|
+
// verify required parameter 'id' is not null or undefined
|
179
|
+
(0, common_1.assertParamExists)('updateInstallment', 'id', id);
|
180
|
+
// verify required parameter 'installment_id' is not null or undefined
|
181
|
+
(0, common_1.assertParamExists)('updateInstallment', 'installment_id', installment_id);
|
182
|
+
const localVarPath = `/deals/{id}/installments/{installment_id}`
|
183
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
184
|
+
.replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
|
186
185
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
187
186
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
188
187
|
let baseOptions;
|
189
188
|
if (configuration) {
|
190
189
|
baseOptions = configuration.baseOptions;
|
191
190
|
}
|
192
|
-
const localVarRequestOptions = Object.assign({ method: '
|
191
|
+
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
193
192
|
const localVarHeaderParameter = {};
|
194
193
|
const localVarQueryParameter = {};
|
195
194
|
// authentication api_key required
|
196
195
|
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
197
196
|
// authentication oauth2 required
|
198
197
|
// oauth required
|
199
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["
|
198
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
200
199
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
201
200
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
202
201
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
203
202
|
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
204
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
203
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateInstallmentRequestBody, localVarRequestOptions, configuration);
|
205
204
|
return {
|
206
205
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
207
206
|
options: localVarRequestOptions,
|
208
207
|
};
|
209
208
|
}),
|
209
|
+
};
|
210
|
+
};
|
211
|
+
exports.BetaApiAxiosParamCreator = BetaApiAxiosParamCreator;
|
212
|
+
/**
|
213
|
+
* BetaApi - functional programming interface
|
214
|
+
* @export
|
215
|
+
*/
|
216
|
+
const BetaApiFp = function (configuration) {
|
217
|
+
const localVarAxiosParamCreator = (0, exports.BetaApiAxiosParamCreator)(configuration);
|
218
|
+
return {
|
210
219
|
/**
|
211
|
-
*
|
212
|
-
* @summary Delete an
|
213
|
-
* @param {number} id The ID of the
|
220
|
+
* Removes an installment from a deal. Only available in Advanced and above plans.
|
221
|
+
* @summary Delete an installment from a deal
|
222
|
+
* @param {number} id The ID of the deal
|
223
|
+
* @param {number} installment_id The ID of the installment
|
214
224
|
|
215
225
|
* @throws {RequiredError}
|
216
226
|
*/
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
224
|
-
let baseOptions;
|
225
|
-
if (configuration) {
|
226
|
-
baseOptions = configuration.baseOptions;
|
227
|
-
}
|
228
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
229
|
-
const localVarHeaderParameter = {};
|
230
|
-
const localVarQueryParameter = {};
|
231
|
-
// authentication api_key required
|
232
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
233
|
-
// authentication oauth2 required
|
234
|
-
// oauth required
|
235
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["activities:full"], configuration);
|
236
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
237
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
238
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
239
|
-
return {
|
240
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
241
|
-
options: localVarRequestOptions,
|
242
|
-
};
|
243
|
-
}),
|
227
|
+
deleteInstallment(id, installment_id) {
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
229
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstallment(id, installment_id);
|
230
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
231
|
+
});
|
232
|
+
},
|
244
233
|
/**
|
245
|
-
*
|
246
|
-
* @summary
|
247
|
-
* @param {number}
|
248
|
-
* @param {
|
234
|
+
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
235
|
+
* @summary List installments added to a list of deals
|
236
|
+
* @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
|
237
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
238
|
+
* @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.
|
239
|
+
* @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
|
240
|
+
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
249
241
|
|
250
242
|
* @throws {RequiredError}
|
251
243
|
*/
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
259
|
-
.replace(`{${"discount_id"}}`, encodeURIComponent(String(discount_id)));
|
260
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
261
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
262
|
-
let baseOptions;
|
263
|
-
if (configuration) {
|
264
|
-
baseOptions = configuration.baseOptions;
|
265
|
-
}
|
266
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
267
|
-
const localVarHeaderParameter = {};
|
268
|
-
const localVarQueryParameter = {};
|
269
|
-
// authentication api_key required
|
270
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
271
|
-
// authentication oauth2 required
|
272
|
-
// oauth required
|
273
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
274
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
275
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
276
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
277
|
-
return {
|
278
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
279
|
-
options: localVarRequestOptions,
|
280
|
-
};
|
281
|
-
}),
|
244
|
+
getInstallments(deal_ids, cursor, limit, sort_by, sort_direction) {
|
245
|
+
return __awaiter(this, void 0, void 0, function* () {
|
246
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction);
|
247
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
248
|
+
});
|
249
|
+
},
|
282
250
|
/**
|
283
|
-
*
|
284
|
-
* @summary
|
251
|
+
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
252
|
+
* @summary Add an installment to a deal
|
285
253
|
* @param {number} id The ID of the deal
|
254
|
+
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
|
286
255
|
|
287
256
|
* @throws {RequiredError}
|
288
257
|
*/
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
296
|
-
let baseOptions;
|
297
|
-
if (configuration) {
|
298
|
-
baseOptions = configuration.baseOptions;
|
299
|
-
}
|
300
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
301
|
-
const localVarHeaderParameter = {};
|
302
|
-
const localVarQueryParameter = {};
|
303
|
-
// authentication api_key required
|
304
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
305
|
-
// authentication oauth2 required
|
306
|
-
// oauth required
|
307
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
308
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
309
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
310
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
311
|
-
return {
|
312
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
313
|
-
options: localVarRequestOptions,
|
314
|
-
};
|
315
|
-
}),
|
258
|
+
postInstallment(id, AddInstallmentRequestBody) {
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
260
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody);
|
261
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
262
|
+
});
|
263
|
+
},
|
316
264
|
/**
|
317
|
-
*
|
318
|
-
* @summary
|
265
|
+
* Edits an installment added to a deal. Only available in Advanced and above plans.
|
266
|
+
* @summary Update an installment added to a deal
|
319
267
|
* @param {number} id The ID of the deal
|
320
|
-
* @param {number}
|
268
|
+
* @param {number} installment_id The ID of the installment
|
269
|
+
* @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
|
321
270
|
|
322
271
|
* @throws {RequiredError}
|
323
272
|
*/
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
const localVarQueryParameter = {};
|
341
|
-
// authentication api_key required
|
342
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
343
|
-
// authentication oauth2 required
|
344
|
-
// oauth required
|
345
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full", "products:full"], configuration);
|
346
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
347
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
348
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
349
|
-
return {
|
350
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
351
|
-
options: localVarRequestOptions,
|
352
|
-
};
|
353
|
-
}),
|
273
|
+
updateInstallment(id, installment_id, UpdateInstallmentRequestBody) {
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
275
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody);
|
276
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
277
|
+
});
|
278
|
+
},
|
279
|
+
};
|
280
|
+
};
|
281
|
+
exports.BetaApiFp = BetaApiFp;
|
282
|
+
/**
|
283
|
+
* BetaApi - factory interface
|
284
|
+
* @export
|
285
|
+
*/
|
286
|
+
const BetaApiFactory = function (configuration, basePath, axios) {
|
287
|
+
const localVarFp = (0, exports.BetaApiFp)(configuration);
|
288
|
+
return {
|
354
289
|
/**
|
355
290
|
* Removes an installment from a deal. Only available in Advanced and above plans.
|
356
291
|
* @summary Delete an installment from a deal
|
357
|
-
* @param {
|
358
|
-
* @param {number} installment_id The ID of the installment
|
292
|
+
* @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
|
359
293
|
|
360
294
|
* @throws {RequiredError}
|
361
295
|
*/
|
362
|
-
deleteInstallment
|
363
|
-
|
364
|
-
(0, common_1.assertParamExists)('deleteInstallment', 'id', id);
|
365
|
-
// verify required parameter 'installment_id' is not null or undefined
|
366
|
-
(0, common_1.assertParamExists)('deleteInstallment', 'installment_id', installment_id);
|
367
|
-
const localVarPath = `/deals/{id}/installments/{installment_id}`
|
368
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
369
|
-
.replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
|
370
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
371
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
372
|
-
let baseOptions;
|
373
|
-
if (configuration) {
|
374
|
-
baseOptions = configuration.baseOptions;
|
375
|
-
}
|
376
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
377
|
-
const localVarHeaderParameter = {};
|
378
|
-
const localVarQueryParameter = {};
|
379
|
-
// authentication api_key required
|
380
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
381
|
-
// authentication oauth2 required
|
382
|
-
// oauth required
|
383
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
384
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
385
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
386
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
387
|
-
return {
|
388
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
389
|
-
options: localVarRequestOptions,
|
390
|
-
};
|
391
|
-
}),
|
392
|
-
/**
|
393
|
-
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
|
394
|
-
* @summary Delete a organization
|
395
|
-
* @param {number} id The ID of the organization
|
396
|
-
|
397
|
-
* @throws {RequiredError}
|
398
|
-
*/
|
399
|
-
deleteOrganization: (id) => __awaiter(this, void 0, void 0, function* () {
|
400
|
-
// verify required parameter 'id' is not null or undefined
|
401
|
-
(0, common_1.assertParamExists)('deleteOrganization', 'id', id);
|
402
|
-
const localVarPath = `/organizations/{id}`
|
403
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
404
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
405
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
406
|
-
let baseOptions;
|
407
|
-
if (configuration) {
|
408
|
-
baseOptions = configuration.baseOptions;
|
409
|
-
}
|
410
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
411
|
-
const localVarHeaderParameter = {};
|
412
|
-
const localVarQueryParameter = {};
|
413
|
-
// authentication api_key required
|
414
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
415
|
-
// authentication oauth2 required
|
416
|
-
// oauth required
|
417
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:full"], configuration);
|
418
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
419
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
420
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
421
|
-
return {
|
422
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
423
|
-
options: localVarRequestOptions,
|
424
|
-
};
|
425
|
-
}),
|
426
|
-
/**
|
427
|
-
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
|
428
|
-
* @summary Delete a person
|
429
|
-
* @param {number} id The ID of the person
|
430
|
-
|
431
|
-
* @throws {RequiredError}
|
432
|
-
*/
|
433
|
-
deletePerson: (id) => __awaiter(this, void 0, void 0, function* () {
|
434
|
-
// verify required parameter 'id' is not null or undefined
|
435
|
-
(0, common_1.assertParamExists)('deletePerson', 'id', id);
|
436
|
-
const localVarPath = `/persons/{id}`
|
437
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
438
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
439
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
440
|
-
let baseOptions;
|
441
|
-
if (configuration) {
|
442
|
-
baseOptions = configuration.baseOptions;
|
443
|
-
}
|
444
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
|
445
|
-
const localVarHeaderParameter = {};
|
446
|
-
const localVarQueryParameter = {};
|
447
|
-
// authentication api_key required
|
448
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
449
|
-
// authentication oauth2 required
|
450
|
-
// oauth required
|
451
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:full"], configuration);
|
452
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
453
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
454
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
455
|
-
return {
|
456
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
457
|
-
options: localVarRequestOptions,
|
458
|
-
};
|
459
|
-
}),
|
460
|
-
/**
|
461
|
-
* Returns data about all activities.
|
462
|
-
* @summary Get all activities
|
463
|
-
* @param {number} [filter_id] If supplied, only activities matching the specified filter are returned
|
464
|
-
* @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.
|
465
|
-
* @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
|
466
|
-
* @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
467
|
-
* @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
|
468
|
-
* @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
|
469
|
-
* @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
470
|
-
* @param {string} [updated_since] If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
471
|
-
* @param {string} [updated_until] If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
472
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
473
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
474
|
-
* @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include
|
475
|
-
* @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.
|
476
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
477
|
-
|
478
|
-
* @throws {RequiredError}
|
479
|
-
*/
|
480
|
-
getActivities: (filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
481
|
-
const localVarPath = `/activities`;
|
482
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
483
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
484
|
-
let baseOptions;
|
485
|
-
if (configuration) {
|
486
|
-
baseOptions = configuration.baseOptions;
|
487
|
-
}
|
488
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
489
|
-
const localVarHeaderParameter = {};
|
490
|
-
const localVarQueryParameter = {};
|
491
|
-
// authentication api_key required
|
492
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
493
|
-
// authentication oauth2 required
|
494
|
-
// oauth required
|
495
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration);
|
496
|
-
if (filter_id !== undefined) {
|
497
|
-
localVarQueryParameter['filter_id'] = filter_id;
|
498
|
-
}
|
499
|
-
if (ids !== undefined) {
|
500
|
-
localVarQueryParameter['ids'] = ids;
|
501
|
-
}
|
502
|
-
if (owner_id !== undefined) {
|
503
|
-
localVarQueryParameter['owner_id'] = owner_id;
|
504
|
-
}
|
505
|
-
if (deal_id !== undefined) {
|
506
|
-
localVarQueryParameter['deal_id'] = deal_id;
|
507
|
-
}
|
508
|
-
if (lead_id !== undefined) {
|
509
|
-
localVarQueryParameter['lead_id'] = lead_id;
|
510
|
-
}
|
511
|
-
if (person_id !== undefined) {
|
512
|
-
localVarQueryParameter['person_id'] = person_id;
|
513
|
-
}
|
514
|
-
if (org_id !== undefined) {
|
515
|
-
localVarQueryParameter['org_id'] = org_id;
|
516
|
-
}
|
517
|
-
if (updated_since !== undefined) {
|
518
|
-
localVarQueryParameter['updated_since'] = updated_since;
|
519
|
-
}
|
520
|
-
if (updated_until !== undefined) {
|
521
|
-
localVarQueryParameter['updated_until'] = updated_until;
|
522
|
-
}
|
523
|
-
if (sort_by !== undefined) {
|
524
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
525
|
-
}
|
526
|
-
if (sort_direction !== undefined) {
|
527
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
528
|
-
}
|
529
|
-
if (include_fields !== undefined) {
|
530
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
531
|
-
}
|
532
|
-
if (limit !== undefined) {
|
533
|
-
localVarQueryParameter['limit'] = limit;
|
534
|
-
}
|
535
|
-
if (cursor !== undefined) {
|
536
|
-
localVarQueryParameter['cursor'] = cursor;
|
537
|
-
}
|
538
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
539
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
540
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
541
|
-
return {
|
542
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
543
|
-
options: localVarRequestOptions,
|
544
|
-
};
|
545
|
-
}),
|
546
|
-
/**
|
547
|
-
* Returns the details of a specific activity.
|
548
|
-
* @summary Get details of an activity
|
549
|
-
* @param {number} id The ID of the activity
|
550
|
-
* @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include
|
551
|
-
|
552
|
-
* @throws {RequiredError}
|
553
|
-
*/
|
554
|
-
getActivity: (id, include_fields) => __awaiter(this, void 0, void 0, function* () {
|
555
|
-
// verify required parameter 'id' is not null or undefined
|
556
|
-
(0, common_1.assertParamExists)('getActivity', 'id', id);
|
557
|
-
const localVarPath = `/activities/{id}`
|
558
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
559
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
560
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
561
|
-
let baseOptions;
|
562
|
-
if (configuration) {
|
563
|
-
baseOptions = configuration.baseOptions;
|
564
|
-
}
|
565
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
566
|
-
const localVarHeaderParameter = {};
|
567
|
-
const localVarQueryParameter = {};
|
568
|
-
// authentication api_key required
|
569
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
570
|
-
// authentication oauth2 required
|
571
|
-
// oauth required
|
572
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration);
|
573
|
-
if (include_fields !== undefined) {
|
574
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
575
|
-
}
|
576
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
577
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
578
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
579
|
-
return {
|
580
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
581
|
-
options: localVarRequestOptions,
|
582
|
-
};
|
583
|
-
}),
|
584
|
-
/**
|
585
|
-
* Lists discounts attached to a deal.
|
586
|
-
* @summary List discounts added to a deal
|
587
|
-
* @param {number} id The ID of the deal
|
588
|
-
|
589
|
-
* @throws {RequiredError}
|
590
|
-
*/
|
591
|
-
getAdditionalDiscounts: (id) => __awaiter(this, void 0, void 0, function* () {
|
592
|
-
// verify required parameter 'id' is not null or undefined
|
593
|
-
(0, common_1.assertParamExists)('getAdditionalDiscounts', 'id', id);
|
594
|
-
const localVarPath = `/deals/{id}/discounts`
|
595
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
596
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
597
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
598
|
-
let baseOptions;
|
599
|
-
if (configuration) {
|
600
|
-
baseOptions = configuration.baseOptions;
|
601
|
-
}
|
602
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
603
|
-
const localVarHeaderParameter = {};
|
604
|
-
const localVarQueryParameter = {};
|
605
|
-
// authentication api_key required
|
606
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
607
|
-
// authentication oauth2 required
|
608
|
-
// oauth required
|
609
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
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
|
-
* Returns the details of a specific deal.
|
620
|
-
* @summary Get details of a deal
|
621
|
-
* @param {number} id The ID of the deal
|
622
|
-
* @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
|
623
|
-
* @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.
|
624
|
-
|
625
|
-
* @throws {RequiredError}
|
626
|
-
*/
|
627
|
-
getDeal: (id, include_fields, custom_fields) => __awaiter(this, void 0, void 0, function* () {
|
628
|
-
// verify required parameter 'id' is not null or undefined
|
629
|
-
(0, common_1.assertParamExists)('getDeal', 'id', id);
|
630
|
-
const localVarPath = `/deals/{id}`
|
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 (include_fields !== undefined) {
|
647
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
648
|
-
}
|
649
|
-
if (custom_fields !== undefined) {
|
650
|
-
localVarQueryParameter['custom_fields'] = custom_fields;
|
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
|
-
}),
|
660
|
-
/**
|
661
|
-
* Lists products attached to a deal.
|
662
|
-
* @summary List products attached to a deal
|
663
|
-
* @param {number} id The ID of the deal
|
664
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
665
|
-
* @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.
|
666
|
-
* @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`.
|
667
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
668
|
-
|
669
|
-
* @throws {RequiredError}
|
670
|
-
*/
|
671
|
-
getDealProducts: (id, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
|
672
|
-
// verify required parameter 'id' is not null or undefined
|
673
|
-
(0, common_1.assertParamExists)('getDealProducts', 'id', id);
|
674
|
-
const localVarPath = `/deals/{id}/products`
|
675
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
676
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
677
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
678
|
-
let baseOptions;
|
679
|
-
if (configuration) {
|
680
|
-
baseOptions = configuration.baseOptions;
|
681
|
-
}
|
682
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
683
|
-
const localVarHeaderParameter = {};
|
684
|
-
const localVarQueryParameter = {};
|
685
|
-
// authentication api_key required
|
686
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
687
|
-
// authentication oauth2 required
|
688
|
-
// oauth required
|
689
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "deals:read", "deals:full"], configuration);
|
690
|
-
if (cursor !== undefined) {
|
691
|
-
localVarQueryParameter['cursor'] = cursor;
|
692
|
-
}
|
693
|
-
if (limit !== undefined) {
|
694
|
-
localVarQueryParameter['limit'] = limit;
|
695
|
-
}
|
696
|
-
if (sort_by !== undefined) {
|
697
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
698
|
-
}
|
699
|
-
if (sort_direction !== undefined) {
|
700
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
701
|
-
}
|
702
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
703
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
704
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
705
|
-
return {
|
706
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
707
|
-
options: localVarRequestOptions,
|
708
|
-
};
|
709
|
-
}),
|
710
|
-
/**
|
711
|
-
* Returns data about all deals.
|
712
|
-
* @summary Get all deals
|
713
|
-
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
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.
|
715
|
-
* @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
|
716
|
-
* @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
|
717
|
-
* @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
718
|
-
* @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
|
719
|
-
* @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
|
720
|
-
* @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.
|
721
|
-
* @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.
|
722
|
-
* @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.
|
723
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
724
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
725
|
-
* @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
|
726
|
-
* @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.
|
727
|
-
* @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.
|
728
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
729
|
-
|
730
|
-
* @throws {RequiredError}
|
731
|
-
*/
|
732
|
-
getDeals: (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* () {
|
733
|
-
const localVarPath = `/deals`;
|
734
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
735
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
736
|
-
let baseOptions;
|
737
|
-
if (configuration) {
|
738
|
-
baseOptions = configuration.baseOptions;
|
739
|
-
}
|
740
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
741
|
-
const localVarHeaderParameter = {};
|
742
|
-
const localVarQueryParameter = {};
|
743
|
-
// authentication api_key required
|
744
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
745
|
-
// authentication oauth2 required
|
746
|
-
// oauth required
|
747
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
748
|
-
if (filter_id !== undefined) {
|
749
|
-
localVarQueryParameter['filter_id'] = filter_id;
|
750
|
-
}
|
751
|
-
if (ids !== undefined) {
|
752
|
-
localVarQueryParameter['ids'] = ids;
|
753
|
-
}
|
754
|
-
if (owner_id !== undefined) {
|
755
|
-
localVarQueryParameter['owner_id'] = owner_id;
|
756
|
-
}
|
757
|
-
if (person_id !== undefined) {
|
758
|
-
localVarQueryParameter['person_id'] = person_id;
|
759
|
-
}
|
760
|
-
if (org_id !== undefined) {
|
761
|
-
localVarQueryParameter['org_id'] = org_id;
|
762
|
-
}
|
763
|
-
if (pipeline_id !== undefined) {
|
764
|
-
localVarQueryParameter['pipeline_id'] = pipeline_id;
|
765
|
-
}
|
766
|
-
if (stage_id !== undefined) {
|
767
|
-
localVarQueryParameter['stage_id'] = stage_id;
|
768
|
-
}
|
769
|
-
if (status !== undefined) {
|
770
|
-
localVarQueryParameter['status'] = status;
|
771
|
-
}
|
772
|
-
if (updated_since !== undefined) {
|
773
|
-
localVarQueryParameter['updated_since'] = updated_since;
|
774
|
-
}
|
775
|
-
if (updated_until !== undefined) {
|
776
|
-
localVarQueryParameter['updated_until'] = updated_until;
|
777
|
-
}
|
778
|
-
if (sort_by !== undefined) {
|
779
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
780
|
-
}
|
781
|
-
if (sort_direction !== undefined) {
|
782
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
783
|
-
}
|
784
|
-
if (include_fields !== undefined) {
|
785
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
786
|
-
}
|
787
|
-
if (custom_fields !== undefined) {
|
788
|
-
localVarQueryParameter['custom_fields'] = custom_fields;
|
789
|
-
}
|
790
|
-
if (limit !== undefined) {
|
791
|
-
localVarQueryParameter['limit'] = limit;
|
792
|
-
}
|
793
|
-
if (cursor !== undefined) {
|
794
|
-
localVarQueryParameter['cursor'] = cursor;
|
795
|
-
}
|
796
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
797
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
798
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
799
|
-
return {
|
800
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
801
|
-
options: localVarRequestOptions,
|
802
|
-
};
|
803
|
-
}),
|
804
|
-
/**
|
805
|
-
* Returns data about products attached to deals
|
806
|
-
* @summary Get deal products of several deals
|
807
|
-
* @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
|
808
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
809
|
-
* @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.
|
810
|
-
* @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`.
|
811
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
812
|
-
|
813
|
-
* @throws {RequiredError}
|
814
|
-
*/
|
815
|
-
getDealsProducts: (deal_ids, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
|
816
|
-
// verify required parameter 'deal_ids' is not null or undefined
|
817
|
-
(0, common_1.assertParamExists)('getDealsProducts', 'deal_ids', deal_ids);
|
818
|
-
const localVarPath = `/deals/products`;
|
819
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
820
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
821
|
-
let baseOptions;
|
822
|
-
if (configuration) {
|
823
|
-
baseOptions = configuration.baseOptions;
|
824
|
-
}
|
825
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
826
|
-
const localVarHeaderParameter = {};
|
827
|
-
const localVarQueryParameter = {};
|
828
|
-
// authentication api_key required
|
829
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
830
|
-
// authentication oauth2 required
|
831
|
-
// oauth required
|
832
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "deals:read", "deals:full"], configuration);
|
833
|
-
if (deal_ids) {
|
834
|
-
localVarQueryParameter['deal_ids'] = deal_ids;
|
835
|
-
}
|
836
|
-
if (cursor !== undefined) {
|
837
|
-
localVarQueryParameter['cursor'] = cursor;
|
838
|
-
}
|
839
|
-
if (limit !== undefined) {
|
840
|
-
localVarQueryParameter['limit'] = limit;
|
841
|
-
}
|
842
|
-
if (sort_by !== undefined) {
|
843
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
844
|
-
}
|
845
|
-
if (sort_direction !== undefined) {
|
846
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
847
|
-
}
|
848
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
849
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
850
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
851
|
-
return {
|
852
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
853
|
-
options: localVarRequestOptions,
|
854
|
-
};
|
855
|
-
}),
|
856
|
-
/**
|
857
|
-
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
858
|
-
* @summary List installments added to a list of deals
|
859
|
-
* @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
|
860
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
861
|
-
* @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.
|
862
|
-
* @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
|
863
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
864
|
-
|
865
|
-
* @throws {RequiredError}
|
866
|
-
*/
|
867
|
-
getInstallments: (deal_ids, cursor, limit, sort_by, sort_direction) => __awaiter(this, void 0, void 0, function* () {
|
868
|
-
// verify required parameter 'deal_ids' is not null or undefined
|
869
|
-
(0, common_1.assertParamExists)('getInstallments', 'deal_ids', deal_ids);
|
870
|
-
const localVarPath = `/deals/installments`;
|
871
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
872
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
873
|
-
let baseOptions;
|
874
|
-
if (configuration) {
|
875
|
-
baseOptions = configuration.baseOptions;
|
876
|
-
}
|
877
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
878
|
-
const localVarHeaderParameter = {};
|
879
|
-
const localVarQueryParameter = {};
|
880
|
-
// authentication api_key required
|
881
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
882
|
-
// authentication oauth2 required
|
883
|
-
// oauth required
|
884
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
885
|
-
if (deal_ids) {
|
886
|
-
localVarQueryParameter['deal_ids'] = deal_ids;
|
887
|
-
}
|
888
|
-
if (cursor !== undefined) {
|
889
|
-
localVarQueryParameter['cursor'] = cursor;
|
890
|
-
}
|
891
|
-
if (limit !== undefined) {
|
892
|
-
localVarQueryParameter['limit'] = limit;
|
893
|
-
}
|
894
|
-
if (sort_by !== undefined) {
|
895
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
896
|
-
}
|
897
|
-
if (sort_direction !== undefined) {
|
898
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
899
|
-
}
|
900
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
901
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
902
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
903
|
-
return {
|
904
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
905
|
-
options: localVarRequestOptions,
|
906
|
-
};
|
907
|
-
}),
|
908
|
-
/**
|
909
|
-
* Returns the details of a specific organization.
|
910
|
-
* @summary Get details of a organization
|
911
|
-
* @param {number} id The ID of the organization
|
912
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [include_fields] Optional comma separated string array of additional fields to include
|
913
|
-
* @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.
|
914
|
-
|
915
|
-
* @throws {RequiredError}
|
916
|
-
*/
|
917
|
-
getOrganization: (id, include_fields, custom_fields) => __awaiter(this, void 0, void 0, function* () {
|
918
|
-
// verify required parameter 'id' is not null or undefined
|
919
|
-
(0, common_1.assertParamExists)('getOrganization', 'id', id);
|
920
|
-
const localVarPath = `/organizations/{id}`
|
921
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
922
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
923
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
924
|
-
let baseOptions;
|
925
|
-
if (configuration) {
|
926
|
-
baseOptions = configuration.baseOptions;
|
927
|
-
}
|
928
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
929
|
-
const localVarHeaderParameter = {};
|
930
|
-
const localVarQueryParameter = {};
|
931
|
-
// authentication api_key required
|
932
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
933
|
-
// authentication oauth2 required
|
934
|
-
// oauth required
|
935
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration);
|
936
|
-
if (include_fields !== undefined) {
|
937
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
938
|
-
}
|
939
|
-
if (custom_fields !== undefined) {
|
940
|
-
localVarQueryParameter['custom_fields'] = custom_fields;
|
941
|
-
}
|
942
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
943
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
944
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
945
|
-
return {
|
946
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
947
|
-
options: localVarRequestOptions,
|
948
|
-
};
|
949
|
-
}),
|
950
|
-
/**
|
951
|
-
* Returns data about all organizations.
|
952
|
-
* @summary Get all organizations
|
953
|
-
* @param {number} [filter_id] If supplied, only organizations matching the specified filter are returned
|
954
|
-
* @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.
|
955
|
-
* @param {number} [owner_id] If supplied, only organization owned by the specified user are returned. If filter_id is provided, this is ignored.
|
956
|
-
* @param {string} [updated_since] If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
957
|
-
* @param {string} [updated_until] If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
958
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
959
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
960
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [include_fields] Optional comma separated string array of additional fields to include
|
961
|
-
* @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.
|
962
|
-
* @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.
|
963
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
964
|
-
|
965
|
-
* @throws {RequiredError}
|
966
|
-
*/
|
967
|
-
getOrganizations: (filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
968
|
-
const localVarPath = `/organizations`;
|
969
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
970
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
971
|
-
let baseOptions;
|
972
|
-
if (configuration) {
|
973
|
-
baseOptions = configuration.baseOptions;
|
974
|
-
}
|
975
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
976
|
-
const localVarHeaderParameter = {};
|
977
|
-
const localVarQueryParameter = {};
|
978
|
-
// authentication api_key required
|
979
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
980
|
-
// authentication oauth2 required
|
981
|
-
// oauth required
|
982
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration);
|
983
|
-
if (filter_id !== undefined) {
|
984
|
-
localVarQueryParameter['filter_id'] = filter_id;
|
985
|
-
}
|
986
|
-
if (ids !== undefined) {
|
987
|
-
localVarQueryParameter['ids'] = ids;
|
988
|
-
}
|
989
|
-
if (owner_id !== undefined) {
|
990
|
-
localVarQueryParameter['owner_id'] = owner_id;
|
991
|
-
}
|
992
|
-
if (updated_since !== undefined) {
|
993
|
-
localVarQueryParameter['updated_since'] = updated_since;
|
994
|
-
}
|
995
|
-
if (updated_until !== undefined) {
|
996
|
-
localVarQueryParameter['updated_until'] = updated_until;
|
997
|
-
}
|
998
|
-
if (sort_by !== undefined) {
|
999
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
1000
|
-
}
|
1001
|
-
if (sort_direction !== undefined) {
|
1002
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
1003
|
-
}
|
1004
|
-
if (include_fields !== undefined) {
|
1005
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1006
|
-
}
|
1007
|
-
if (custom_fields !== undefined) {
|
1008
|
-
localVarQueryParameter['custom_fields'] = custom_fields;
|
1009
|
-
}
|
1010
|
-
if (limit !== undefined) {
|
1011
|
-
localVarQueryParameter['limit'] = limit;
|
1012
|
-
}
|
1013
|
-
if (cursor !== undefined) {
|
1014
|
-
localVarQueryParameter['cursor'] = cursor;
|
1015
|
-
}
|
1016
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1017
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1018
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1019
|
-
return {
|
1020
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1021
|
-
options: localVarRequestOptions,
|
1022
|
-
};
|
1023
|
-
}),
|
1024
|
-
/**
|
1025
|
-
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
1026
|
-
* @summary Get details of a person
|
1027
|
-
* @param {number} id The ID of the person
|
1028
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
|
1029
|
-
* @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.
|
1030
|
-
|
1031
|
-
* @throws {RequiredError}
|
1032
|
-
*/
|
1033
|
-
getPerson: (id, include_fields, custom_fields) => __awaiter(this, void 0, void 0, function* () {
|
1034
|
-
// verify required parameter 'id' is not null or undefined
|
1035
|
-
(0, common_1.assertParamExists)('getPerson', 'id', id);
|
1036
|
-
const localVarPath = `/persons/{id}`
|
1037
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1038
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1039
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1040
|
-
let baseOptions;
|
1041
|
-
if (configuration) {
|
1042
|
-
baseOptions = configuration.baseOptions;
|
1043
|
-
}
|
1044
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1045
|
-
const localVarHeaderParameter = {};
|
1046
|
-
const localVarQueryParameter = {};
|
1047
|
-
// authentication api_key required
|
1048
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1049
|
-
// authentication oauth2 required
|
1050
|
-
// oauth required
|
1051
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration);
|
1052
|
-
if (include_fields !== undefined) {
|
1053
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1054
|
-
}
|
1055
|
-
if (custom_fields !== undefined) {
|
1056
|
-
localVarQueryParameter['custom_fields'] = custom_fields;
|
1057
|
-
}
|
1058
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1059
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1060
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1061
|
-
return {
|
1062
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1063
|
-
options: localVarRequestOptions,
|
1064
|
-
};
|
1065
|
-
}),
|
1066
|
-
/**
|
1067
|
-
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
1068
|
-
* @summary Get all persons
|
1069
|
-
* @param {number} [filter_id] If supplied, only persons matching the specified filter are returned
|
1070
|
-
* @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.
|
1071
|
-
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
1072
|
-
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
1073
|
-
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
1074
|
-
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
1075
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
1076
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
1077
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
|
1078
|
-
* @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.
|
1079
|
-
* @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.
|
1080
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1081
|
-
|
1082
|
-
* @throws {RequiredError}
|
1083
|
-
*/
|
1084
|
-
getPersons: (filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1085
|
-
const localVarPath = `/persons`;
|
1086
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1087
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1088
|
-
let baseOptions;
|
1089
|
-
if (configuration) {
|
1090
|
-
baseOptions = configuration.baseOptions;
|
1091
|
-
}
|
1092
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1093
|
-
const localVarHeaderParameter = {};
|
1094
|
-
const localVarQueryParameter = {};
|
1095
|
-
// authentication api_key required
|
1096
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1097
|
-
// authentication oauth2 required
|
1098
|
-
// oauth required
|
1099
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration);
|
1100
|
-
if (filter_id !== undefined) {
|
1101
|
-
localVarQueryParameter['filter_id'] = filter_id;
|
1102
|
-
}
|
1103
|
-
if (ids !== undefined) {
|
1104
|
-
localVarQueryParameter['ids'] = ids;
|
1105
|
-
}
|
1106
|
-
if (owner_id !== undefined) {
|
1107
|
-
localVarQueryParameter['owner_id'] = owner_id;
|
1108
|
-
}
|
1109
|
-
if (org_id !== undefined) {
|
1110
|
-
localVarQueryParameter['org_id'] = org_id;
|
1111
|
-
}
|
1112
|
-
if (updated_since !== undefined) {
|
1113
|
-
localVarQueryParameter['updated_since'] = updated_since;
|
1114
|
-
}
|
1115
|
-
if (updated_until !== undefined) {
|
1116
|
-
localVarQueryParameter['updated_until'] = updated_until;
|
1117
|
-
}
|
1118
|
-
if (sort_by !== undefined) {
|
1119
|
-
localVarQueryParameter['sort_by'] = sort_by;
|
1120
|
-
}
|
1121
|
-
if (sort_direction !== undefined) {
|
1122
|
-
localVarQueryParameter['sort_direction'] = sort_direction;
|
1123
|
-
}
|
1124
|
-
if (include_fields !== undefined) {
|
1125
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1126
|
-
}
|
1127
|
-
if (custom_fields !== undefined) {
|
1128
|
-
localVarQueryParameter['custom_fields'] = custom_fields;
|
1129
|
-
}
|
1130
|
-
if (limit !== undefined) {
|
1131
|
-
localVarQueryParameter['limit'] = limit;
|
1132
|
-
}
|
1133
|
-
if (cursor !== undefined) {
|
1134
|
-
localVarQueryParameter['cursor'] = cursor;
|
1135
|
-
}
|
1136
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1137
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1138
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1139
|
-
return {
|
1140
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1141
|
-
options: localVarRequestOptions,
|
1142
|
-
};
|
1143
|
-
}),
|
1144
|
-
/**
|
1145
|
-
* Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
|
1146
|
-
* @summary Add a discount to a deal
|
1147
|
-
* @param {number} id The ID of the deal
|
1148
|
-
* @param {AddAdditionalDiscountRequestBody} [AddAdditionalDiscountRequestBody]
|
1149
|
-
|
1150
|
-
* @throws {RequiredError}
|
1151
|
-
*/
|
1152
|
-
postAdditionalDiscount: (id, AddAdditionalDiscountRequestBody) => __awaiter(this, void 0, void 0, function* () {
|
1153
|
-
// verify required parameter 'id' is not null or undefined
|
1154
|
-
(0, common_1.assertParamExists)('postAdditionalDiscount', 'id', id);
|
1155
|
-
const localVarPath = `/deals/{id}/discounts`
|
1156
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1157
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1158
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1159
|
-
let baseOptions;
|
1160
|
-
if (configuration) {
|
1161
|
-
baseOptions = configuration.baseOptions;
|
1162
|
-
}
|
1163
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
1164
|
-
const localVarHeaderParameter = {};
|
1165
|
-
const localVarQueryParameter = {};
|
1166
|
-
// authentication api_key required
|
1167
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1168
|
-
// authentication oauth2 required
|
1169
|
-
// oauth required
|
1170
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
1171
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1172
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1173
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1174
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1175
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddAdditionalDiscountRequestBody, localVarRequestOptions, configuration);
|
1176
|
-
return {
|
1177
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1178
|
-
options: localVarRequestOptions,
|
1179
|
-
};
|
1180
|
-
}),
|
1181
|
-
/**
|
1182
|
-
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
1183
|
-
* @summary Add an installment to a deal
|
1184
|
-
* @param {number} id The ID of the deal
|
1185
|
-
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
|
1186
|
-
|
1187
|
-
* @throws {RequiredError}
|
1188
|
-
*/
|
1189
|
-
postInstallment: (id, AddInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
|
1190
|
-
// verify required parameter 'id' is not null or undefined
|
1191
|
-
(0, common_1.assertParamExists)('postInstallment', 'id', id);
|
1192
|
-
const localVarPath = `/deals/{id}/installments`
|
1193
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1194
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1195
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1196
|
-
let baseOptions;
|
1197
|
-
if (configuration) {
|
1198
|
-
baseOptions = configuration.baseOptions;
|
1199
|
-
}
|
1200
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
1201
|
-
const localVarHeaderParameter = {};
|
1202
|
-
const localVarQueryParameter = {};
|
1203
|
-
// authentication api_key required
|
1204
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1205
|
-
// authentication oauth2 required
|
1206
|
-
// oauth required
|
1207
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
1208
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1209
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1210
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1211
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1212
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddInstallmentRequestBody, localVarRequestOptions, configuration);
|
1213
|
-
return {
|
1214
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1215
|
-
options: localVarRequestOptions,
|
1216
|
-
};
|
1217
|
-
}),
|
1218
|
-
/**
|
1219
|
-
* Searches all deals 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 deals can be filtered by the person ID and the organization ID.
|
1220
|
-
* @summary Search deals
|
1221
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
1222
|
-
* @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
1223
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
1224
|
-
* @param {number} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
|
1225
|
-
* @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
|
1226
|
-
* @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
|
1227
|
-
* @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default
|
1228
|
-
* @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.
|
1229
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1230
|
-
|
1231
|
-
* @throws {RequiredError}
|
1232
|
-
*/
|
1233
|
-
searchDeals: (term, fields, exact_match, person_id, organization_id, status, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1234
|
-
// verify required parameter 'term' is not null or undefined
|
1235
|
-
(0, common_1.assertParamExists)('searchDeals', 'term', term);
|
1236
|
-
const localVarPath = `/deals/search`;
|
1237
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1238
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1239
|
-
let baseOptions;
|
1240
|
-
if (configuration) {
|
1241
|
-
baseOptions = configuration.baseOptions;
|
1242
|
-
}
|
1243
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1244
|
-
const localVarHeaderParameter = {};
|
1245
|
-
const localVarQueryParameter = {};
|
1246
|
-
// authentication api_key required
|
1247
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1248
|
-
// authentication oauth2 required
|
1249
|
-
// oauth required
|
1250
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "search:read"], configuration);
|
1251
|
-
if (term !== undefined) {
|
1252
|
-
localVarQueryParameter['term'] = term;
|
1253
|
-
}
|
1254
|
-
if (fields !== undefined) {
|
1255
|
-
localVarQueryParameter['fields'] = fields;
|
1256
|
-
}
|
1257
|
-
if (exact_match !== undefined) {
|
1258
|
-
localVarQueryParameter['exact_match'] = exact_match;
|
1259
|
-
}
|
1260
|
-
if (person_id !== undefined) {
|
1261
|
-
localVarQueryParameter['person_id'] = person_id;
|
1262
|
-
}
|
1263
|
-
if (organization_id !== undefined) {
|
1264
|
-
localVarQueryParameter['organization_id'] = organization_id;
|
1265
|
-
}
|
1266
|
-
if (status !== undefined) {
|
1267
|
-
localVarQueryParameter['status'] = status;
|
1268
|
-
}
|
1269
|
-
if (include_fields !== undefined) {
|
1270
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1271
|
-
}
|
1272
|
-
if (limit !== undefined) {
|
1273
|
-
localVarQueryParameter['limit'] = limit;
|
1274
|
-
}
|
1275
|
-
if (cursor !== undefined) {
|
1276
|
-
localVarQueryParameter['cursor'] = cursor;
|
1277
|
-
}
|
1278
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1279
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1280
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1281
|
-
return {
|
1282
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1283
|
-
options: localVarRequestOptions,
|
1284
|
-
};
|
1285
|
-
}),
|
1286
|
-
/**
|
1287
|
-
* Performs a search from your choice of item types and fields.
|
1288
|
-
* @summary Perform a search from multiple item types
|
1289
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
1290
|
-
* @param {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all.
|
1291
|
-
* @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`.
|
1292
|
-
* @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
|
1293
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
1294
|
-
* @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default.
|
1295
|
-
* @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.
|
1296
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1297
|
-
|
1298
|
-
* @throws {RequiredError}
|
1299
|
-
*/
|
1300
|
-
searchItem: (term, item_types, fields, search_for_related_items, exact_match, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1301
|
-
// verify required parameter 'term' is not null or undefined
|
1302
|
-
(0, common_1.assertParamExists)('searchItem', 'term', term);
|
1303
|
-
const localVarPath = `/itemSearch`;
|
1304
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1305
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1306
|
-
let baseOptions;
|
1307
|
-
if (configuration) {
|
1308
|
-
baseOptions = configuration.baseOptions;
|
1309
|
-
}
|
1310
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1311
|
-
const localVarHeaderParameter = {};
|
1312
|
-
const localVarQueryParameter = {};
|
1313
|
-
// authentication api_key required
|
1314
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1315
|
-
// authentication oauth2 required
|
1316
|
-
// oauth required
|
1317
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["search:read"], configuration);
|
1318
|
-
if (term !== undefined) {
|
1319
|
-
localVarQueryParameter['term'] = term;
|
1320
|
-
}
|
1321
|
-
if (item_types !== undefined) {
|
1322
|
-
localVarQueryParameter['item_types'] = item_types;
|
1323
|
-
}
|
1324
|
-
if (fields !== undefined) {
|
1325
|
-
localVarQueryParameter['fields'] = fields;
|
1326
|
-
}
|
1327
|
-
if (search_for_related_items !== undefined) {
|
1328
|
-
localVarQueryParameter['search_for_related_items'] = search_for_related_items;
|
1329
|
-
}
|
1330
|
-
if (exact_match !== undefined) {
|
1331
|
-
localVarQueryParameter['exact_match'] = exact_match;
|
1332
|
-
}
|
1333
|
-
if (include_fields !== undefined) {
|
1334
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1335
|
-
}
|
1336
|
-
if (limit !== undefined) {
|
1337
|
-
localVarQueryParameter['limit'] = limit;
|
1338
|
-
}
|
1339
|
-
if (cursor !== undefined) {
|
1340
|
-
localVarQueryParameter['cursor'] = cursor;
|
1341
|
-
}
|
1342
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1343
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1344
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1345
|
-
return {
|
1346
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1347
|
-
options: localVarRequestOptions,
|
1348
|
-
};
|
1349
|
-
}),
|
1350
|
-
/**
|
1351
|
-
* Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
|
1352
|
-
* @summary Perform a search using a specific field from an item type
|
1353
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded.
|
1354
|
-
* @param {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} entity_type The type of the field to perform the search from
|
1355
|
-
* @param {string} field The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
1356
|
-
* @param {'exact' | 'beginning' | 'middle'} [match] The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>.
|
1357
|
-
* @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.
|
1358
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1359
|
-
|
1360
|
-
* @throws {RequiredError}
|
1361
|
-
*/
|
1362
|
-
searchItemByField: (term, entity_type, field, match, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1363
|
-
// verify required parameter 'term' is not null or undefined
|
1364
|
-
(0, common_1.assertParamExists)('searchItemByField', 'term', term);
|
1365
|
-
// verify required parameter 'entity_type' is not null or undefined
|
1366
|
-
(0, common_1.assertParamExists)('searchItemByField', 'entity_type', entity_type);
|
1367
|
-
// verify required parameter 'field' is not null or undefined
|
1368
|
-
(0, common_1.assertParamExists)('searchItemByField', 'field', field);
|
1369
|
-
const localVarPath = `/itemSearch/field`;
|
1370
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1371
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1372
|
-
let baseOptions;
|
1373
|
-
if (configuration) {
|
1374
|
-
baseOptions = configuration.baseOptions;
|
1375
|
-
}
|
1376
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1377
|
-
const localVarHeaderParameter = {};
|
1378
|
-
const localVarQueryParameter = {};
|
1379
|
-
// authentication api_key required
|
1380
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1381
|
-
// authentication oauth2 required
|
1382
|
-
// oauth required
|
1383
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["search:read"], configuration);
|
1384
|
-
if (term !== undefined) {
|
1385
|
-
localVarQueryParameter['term'] = term;
|
1386
|
-
}
|
1387
|
-
if (entity_type !== undefined) {
|
1388
|
-
localVarQueryParameter['entity_type'] = entity_type;
|
1389
|
-
}
|
1390
|
-
if (match !== undefined) {
|
1391
|
-
localVarQueryParameter['match'] = match;
|
1392
|
-
}
|
1393
|
-
if (field !== undefined) {
|
1394
|
-
localVarQueryParameter['field'] = field;
|
1395
|
-
}
|
1396
|
-
if (limit !== undefined) {
|
1397
|
-
localVarQueryParameter['limit'] = limit;
|
1398
|
-
}
|
1399
|
-
if (cursor !== undefined) {
|
1400
|
-
localVarQueryParameter['cursor'] = cursor;
|
1401
|
-
}
|
1402
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1403
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1404
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1405
|
-
return {
|
1406
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1407
|
-
options: localVarRequestOptions,
|
1408
|
-
};
|
1409
|
-
}),
|
1410
|
-
/**
|
1411
|
-
* 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.
|
1412
|
-
* @summary Search leads
|
1413
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
1414
|
-
* @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them.
|
1415
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
1416
|
-
* @param {number} [person_id] Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
|
1417
|
-
* @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
|
1418
|
-
* @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default
|
1419
|
-
* @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.
|
1420
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1421
|
-
|
1422
|
-
* @throws {RequiredError}
|
1423
|
-
*/
|
1424
|
-
searchLeads: (term, fields, exact_match, person_id, organization_id, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1425
|
-
// verify required parameter 'term' is not null or undefined
|
1426
|
-
(0, common_1.assertParamExists)('searchLeads', 'term', term);
|
1427
|
-
const localVarPath = `/leads/search`;
|
1428
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1429
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1430
|
-
let baseOptions;
|
1431
|
-
if (configuration) {
|
1432
|
-
baseOptions = configuration.baseOptions;
|
1433
|
-
}
|
1434
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1435
|
-
const localVarHeaderParameter = {};
|
1436
|
-
const localVarQueryParameter = {};
|
1437
|
-
// authentication api_key required
|
1438
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1439
|
-
// authentication oauth2 required
|
1440
|
-
// oauth required
|
1441
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["leads:read", "leads:full", "search:read"], configuration);
|
1442
|
-
if (term !== undefined) {
|
1443
|
-
localVarQueryParameter['term'] = term;
|
1444
|
-
}
|
1445
|
-
if (fields !== undefined) {
|
1446
|
-
localVarQueryParameter['fields'] = fields;
|
1447
|
-
}
|
1448
|
-
if (exact_match !== undefined) {
|
1449
|
-
localVarQueryParameter['exact_match'] = exact_match;
|
1450
|
-
}
|
1451
|
-
if (person_id !== undefined) {
|
1452
|
-
localVarQueryParameter['person_id'] = person_id;
|
1453
|
-
}
|
1454
|
-
if (organization_id !== undefined) {
|
1455
|
-
localVarQueryParameter['organization_id'] = organization_id;
|
1456
|
-
}
|
1457
|
-
if (include_fields !== undefined) {
|
1458
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1459
|
-
}
|
1460
|
-
if (limit !== undefined) {
|
1461
|
-
localVarQueryParameter['limit'] = limit;
|
1462
|
-
}
|
1463
|
-
if (cursor !== undefined) {
|
1464
|
-
localVarQueryParameter['cursor'] = cursor;
|
1465
|
-
}
|
1466
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1467
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1468
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1469
|
-
return {
|
1470
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1471
|
-
options: localVarRequestOptions,
|
1472
|
-
};
|
1473
|
-
}),
|
1474
|
-
/**
|
1475
|
-
* Searches all organizations by name, address, 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.
|
1476
|
-
* @summary Search organizations
|
1477
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
1478
|
-
* @param {'address' | 'custom_fields' | 'notes' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
1479
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
1480
|
-
* @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.
|
1481
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1482
|
-
|
1483
|
-
* @throws {RequiredError}
|
1484
|
-
*/
|
1485
|
-
searchOrganization: (term, fields, exact_match, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1486
|
-
// verify required parameter 'term' is not null or undefined
|
1487
|
-
(0, common_1.assertParamExists)('searchOrganization', 'term', term);
|
1488
|
-
const localVarPath = `/organizations/search`;
|
1489
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1490
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1491
|
-
let baseOptions;
|
1492
|
-
if (configuration) {
|
1493
|
-
baseOptions = configuration.baseOptions;
|
1494
|
-
}
|
1495
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1496
|
-
const localVarHeaderParameter = {};
|
1497
|
-
const localVarQueryParameter = {};
|
1498
|
-
// authentication api_key required
|
1499
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1500
|
-
// authentication oauth2 required
|
1501
|
-
// oauth required
|
1502
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full", "search:read"], configuration);
|
1503
|
-
if (term !== undefined) {
|
1504
|
-
localVarQueryParameter['term'] = term;
|
1505
|
-
}
|
1506
|
-
if (fields !== undefined) {
|
1507
|
-
localVarQueryParameter['fields'] = fields;
|
1508
|
-
}
|
1509
|
-
if (exact_match !== undefined) {
|
1510
|
-
localVarQueryParameter['exact_match'] = exact_match;
|
1511
|
-
}
|
1512
|
-
if (limit !== undefined) {
|
1513
|
-
localVarQueryParameter['limit'] = limit;
|
1514
|
-
}
|
1515
|
-
if (cursor !== undefined) {
|
1516
|
-
localVarQueryParameter['cursor'] = cursor;
|
1517
|
-
}
|
1518
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1519
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1520
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1521
|
-
return {
|
1522
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1523
|
-
options: localVarRequestOptions,
|
1524
|
-
};
|
1525
|
-
}),
|
1526
|
-
/**
|
1527
|
-
* Searches all persons by name, email, phone, 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 persons can be filtered by organization ID.
|
1528
|
-
* @summary Search persons
|
1529
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
1530
|
-
* @param {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
1531
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
1532
|
-
* @param {number} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
|
1533
|
-
* @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default
|
1534
|
-
* @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.
|
1535
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
1536
|
-
|
1537
|
-
* @throws {RequiredError}
|
1538
|
-
*/
|
1539
|
-
searchPersons: (term, fields, exact_match, organization_id, include_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
1540
|
-
// verify required parameter 'term' is not null or undefined
|
1541
|
-
(0, common_1.assertParamExists)('searchPersons', 'term', term);
|
1542
|
-
const localVarPath = `/persons/search`;
|
1543
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1544
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1545
|
-
let baseOptions;
|
1546
|
-
if (configuration) {
|
1547
|
-
baseOptions = configuration.baseOptions;
|
1548
|
-
}
|
1549
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
|
1550
|
-
const localVarHeaderParameter = {};
|
1551
|
-
const localVarQueryParameter = {};
|
1552
|
-
// authentication api_key required
|
1553
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1554
|
-
// authentication oauth2 required
|
1555
|
-
// oauth required
|
1556
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full", "search:read"], configuration);
|
1557
|
-
if (term !== undefined) {
|
1558
|
-
localVarQueryParameter['term'] = term;
|
1559
|
-
}
|
1560
|
-
if (fields !== undefined) {
|
1561
|
-
localVarQueryParameter['fields'] = fields;
|
1562
|
-
}
|
1563
|
-
if (exact_match !== undefined) {
|
1564
|
-
localVarQueryParameter['exact_match'] = exact_match;
|
1565
|
-
}
|
1566
|
-
if (organization_id !== undefined) {
|
1567
|
-
localVarQueryParameter['organization_id'] = organization_id;
|
1568
|
-
}
|
1569
|
-
if (include_fields !== undefined) {
|
1570
|
-
localVarQueryParameter['include_fields'] = include_fields;
|
1571
|
-
}
|
1572
|
-
if (limit !== undefined) {
|
1573
|
-
localVarQueryParameter['limit'] = limit;
|
1574
|
-
}
|
1575
|
-
if (cursor !== undefined) {
|
1576
|
-
localVarQueryParameter['cursor'] = cursor;
|
1577
|
-
}
|
1578
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1579
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1580
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1581
|
-
return {
|
1582
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1583
|
-
options: localVarRequestOptions,
|
1584
|
-
};
|
1585
|
-
}),
|
1586
|
-
/**
|
1587
|
-
* Updates the properties of an activity.
|
1588
|
-
* @summary Update an activity
|
1589
|
-
* @param {number} id The ID of the activity
|
1590
|
-
* @param {AddActivityRequest} [AddActivityRequest]
|
1591
|
-
|
1592
|
-
* @throws {RequiredError}
|
1593
|
-
*/
|
1594
|
-
updateActivity: (id, AddActivityRequest) => __awaiter(this, void 0, void 0, function* () {
|
1595
|
-
// verify required parameter 'id' is not null or undefined
|
1596
|
-
(0, common_1.assertParamExists)('updateActivity', 'id', id);
|
1597
|
-
const localVarPath = `/activities/{id}`
|
1598
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1599
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1600
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1601
|
-
let baseOptions;
|
1602
|
-
if (configuration) {
|
1603
|
-
baseOptions = configuration.baseOptions;
|
1604
|
-
}
|
1605
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1606
|
-
const localVarHeaderParameter = {};
|
1607
|
-
const localVarQueryParameter = {};
|
1608
|
-
// authentication api_key required
|
1609
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1610
|
-
// authentication oauth2 required
|
1611
|
-
// oauth required
|
1612
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["activities:full"], configuration);
|
1613
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1614
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1615
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1616
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1617
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddActivityRequest, localVarRequestOptions, configuration);
|
1618
|
-
return {
|
1619
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1620
|
-
options: localVarRequestOptions,
|
1621
|
-
};
|
1622
|
-
}),
|
1623
|
-
/**
|
1624
|
-
* Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
|
1625
|
-
* @summary Update a discount added to a deal
|
1626
|
-
* @param {number} id The ID of the deal
|
1627
|
-
* @param {number} discount_id The ID of the discount
|
1628
|
-
* @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
|
1629
|
-
|
1630
|
-
* @throws {RequiredError}
|
1631
|
-
*/
|
1632
|
-
updateAdditionalDiscount: (id, discount_id, UpdateAdditionalDiscountRequestBody) => __awaiter(this, void 0, void 0, function* () {
|
1633
|
-
// verify required parameter 'id' is not null or undefined
|
1634
|
-
(0, common_1.assertParamExists)('updateAdditionalDiscount', 'id', id);
|
1635
|
-
// verify required parameter 'discount_id' is not null or undefined
|
1636
|
-
(0, common_1.assertParamExists)('updateAdditionalDiscount', 'discount_id', discount_id);
|
1637
|
-
const localVarPath = `/deals/{id}/discounts/{discount_id}`
|
1638
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
1639
|
-
.replace(`{${"discount_id"}}`, encodeURIComponent(String(discount_id)));
|
1640
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1641
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1642
|
-
let baseOptions;
|
1643
|
-
if (configuration) {
|
1644
|
-
baseOptions = configuration.baseOptions;
|
1645
|
-
}
|
1646
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1647
|
-
const localVarHeaderParameter = {};
|
1648
|
-
const localVarQueryParameter = {};
|
1649
|
-
// authentication api_key required
|
1650
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1651
|
-
// authentication oauth2 required
|
1652
|
-
// oauth required
|
1653
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
1654
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1655
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1656
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1657
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1658
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateAdditionalDiscountRequestBody, localVarRequestOptions, configuration);
|
1659
|
-
return {
|
1660
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1661
|
-
options: localVarRequestOptions,
|
1662
|
-
};
|
1663
|
-
}),
|
1664
|
-
/**
|
1665
|
-
* Updates the properties of a deal.
|
1666
|
-
* @summary Update a deal
|
1667
|
-
* @param {number} id The ID of the deal
|
1668
|
-
* @param {UpdateDealRequest} [UpdateDealRequest]
|
1669
|
-
|
1670
|
-
* @throws {RequiredError}
|
1671
|
-
*/
|
1672
|
-
updateDeal: (id, UpdateDealRequest) => __awaiter(this, void 0, void 0, function* () {
|
1673
|
-
// verify required parameter 'id' is not null or undefined
|
1674
|
-
(0, common_1.assertParamExists)('updateDeal', 'id', id);
|
1675
|
-
const localVarPath = `/deals/{id}`
|
1676
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1677
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1678
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1679
|
-
let baseOptions;
|
1680
|
-
if (configuration) {
|
1681
|
-
baseOptions = configuration.baseOptions;
|
1682
|
-
}
|
1683
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1684
|
-
const localVarHeaderParameter = {};
|
1685
|
-
const localVarQueryParameter = {};
|
1686
|
-
// authentication api_key required
|
1687
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1688
|
-
// authentication oauth2 required
|
1689
|
-
// oauth required
|
1690
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full"], configuration);
|
1691
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1692
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1693
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1694
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1695
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateDealRequest, localVarRequestOptions, configuration);
|
1696
|
-
return {
|
1697
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1698
|
-
options: localVarRequestOptions,
|
1699
|
-
};
|
1700
|
-
}),
|
1701
|
-
/**
|
1702
|
-
* Updates the details of the product that has been attached to a deal.
|
1703
|
-
* @summary Update the product attached to a deal
|
1704
|
-
* @param {number} id The ID of the deal
|
1705
|
-
* @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal)
|
1706
|
-
* @param {UpdateDealProductRequest} [UpdateDealProductRequest]
|
1707
|
-
|
1708
|
-
* @throws {RequiredError}
|
1709
|
-
*/
|
1710
|
-
updateDealProduct: (id, product_attachment_id, UpdateDealProductRequest) => __awaiter(this, void 0, void 0, function* () {
|
1711
|
-
// verify required parameter 'id' is not null or undefined
|
1712
|
-
(0, common_1.assertParamExists)('updateDealProduct', 'id', id);
|
1713
|
-
// verify required parameter 'product_attachment_id' is not null or undefined
|
1714
|
-
(0, common_1.assertParamExists)('updateDealProduct', 'product_attachment_id', product_attachment_id);
|
1715
|
-
const localVarPath = `/deals/{id}/products/{product_attachment_id}`
|
1716
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
1717
|
-
.replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_id)));
|
1718
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1719
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1720
|
-
let baseOptions;
|
1721
|
-
if (configuration) {
|
1722
|
-
baseOptions = configuration.baseOptions;
|
1723
|
-
}
|
1724
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1725
|
-
const localVarHeaderParameter = {};
|
1726
|
-
const localVarQueryParameter = {};
|
1727
|
-
// authentication api_key required
|
1728
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1729
|
-
// authentication oauth2 required
|
1730
|
-
// oauth required
|
1731
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration);
|
1732
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1733
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1734
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1735
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1736
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateDealProductRequest, localVarRequestOptions, configuration);
|
1737
|
-
return {
|
1738
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1739
|
-
options: localVarRequestOptions,
|
1740
|
-
};
|
1741
|
-
}),
|
1742
|
-
/**
|
1743
|
-
* Edits an installment added to a deal. Only available in Advanced and above plans.
|
1744
|
-
* @summary Update an installment added to a deal
|
1745
|
-
* @param {number} id The ID of the deal
|
1746
|
-
* @param {number} installment_id The ID of the installment
|
1747
|
-
* @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
|
1748
|
-
|
1749
|
-
* @throws {RequiredError}
|
1750
|
-
*/
|
1751
|
-
updateInstallment: (id, installment_id, UpdateInstallmentRequestBody) => __awaiter(this, void 0, void 0, function* () {
|
1752
|
-
// verify required parameter 'id' is not null or undefined
|
1753
|
-
(0, common_1.assertParamExists)('updateInstallment', 'id', id);
|
1754
|
-
// verify required parameter 'installment_id' is not null or undefined
|
1755
|
-
(0, common_1.assertParamExists)('updateInstallment', 'installment_id', installment_id);
|
1756
|
-
const localVarPath = `/deals/{id}/installments/{installment_id}`
|
1757
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
1758
|
-
.replace(`{${"installment_id"}}`, encodeURIComponent(String(installment_id)));
|
1759
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1760
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1761
|
-
let baseOptions;
|
1762
|
-
if (configuration) {
|
1763
|
-
baseOptions = configuration.baseOptions;
|
1764
|
-
}
|
1765
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1766
|
-
const localVarHeaderParameter = {};
|
1767
|
-
const localVarQueryParameter = {};
|
1768
|
-
// authentication api_key required
|
1769
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1770
|
-
// authentication oauth2 required
|
1771
|
-
// oauth required
|
1772
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration);
|
1773
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1774
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1775
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1776
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1777
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateInstallmentRequestBody, localVarRequestOptions, configuration);
|
1778
|
-
return {
|
1779
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1780
|
-
options: localVarRequestOptions,
|
1781
|
-
};
|
1782
|
-
}),
|
1783
|
-
/**
|
1784
|
-
* Updates the properties of a organization.
|
1785
|
-
* @summary Update a organization
|
1786
|
-
* @param {number} id The ID of the organization
|
1787
|
-
* @param {UpdateOrganizationRequest} [UpdateOrganizationRequest]
|
1788
|
-
|
1789
|
-
* @throws {RequiredError}
|
1790
|
-
*/
|
1791
|
-
updateOrganization: (id, UpdateOrganizationRequest) => __awaiter(this, void 0, void 0, function* () {
|
1792
|
-
// verify required parameter 'id' is not null or undefined
|
1793
|
-
(0, common_1.assertParamExists)('updateOrganization', 'id', id);
|
1794
|
-
const localVarPath = `/organizations/{id}`
|
1795
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1796
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1797
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1798
|
-
let baseOptions;
|
1799
|
-
if (configuration) {
|
1800
|
-
baseOptions = configuration.baseOptions;
|
1801
|
-
}
|
1802
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1803
|
-
const localVarHeaderParameter = {};
|
1804
|
-
const localVarQueryParameter = {};
|
1805
|
-
// authentication api_key required
|
1806
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1807
|
-
// authentication oauth2 required
|
1808
|
-
// oauth required
|
1809
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:full"], configuration);
|
1810
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1811
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1812
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1813
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1814
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdateOrganizationRequest, localVarRequestOptions, configuration);
|
1815
|
-
return {
|
1816
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1817
|
-
options: localVarRequestOptions,
|
1818
|
-
};
|
1819
|
-
}),
|
1820
|
-
/**
|
1821
|
-
* Updates the properties of a person.
|
1822
|
-
* @summary Update a person
|
1823
|
-
* @param {number} id The ID of the person
|
1824
|
-
* @param {UpdatePersonRequest} [UpdatePersonRequest]
|
1825
|
-
|
1826
|
-
* @throws {RequiredError}
|
1827
|
-
*/
|
1828
|
-
updatePerson: (id, UpdatePersonRequest) => __awaiter(this, void 0, void 0, function* () {
|
1829
|
-
// verify required parameter 'id' is not null or undefined
|
1830
|
-
(0, common_1.assertParamExists)('updatePerson', 'id', id);
|
1831
|
-
const localVarPath = `/persons/{id}`
|
1832
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1833
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1834
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1835
|
-
let baseOptions;
|
1836
|
-
if (configuration) {
|
1837
|
-
baseOptions = configuration.baseOptions;
|
1838
|
-
}
|
1839
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, baseOptions);
|
1840
|
-
const localVarHeaderParameter = {};
|
1841
|
-
const localVarQueryParameter = {};
|
1842
|
-
// authentication api_key required
|
1843
|
-
yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
|
1844
|
-
// authentication oauth2 required
|
1845
|
-
// oauth required
|
1846
|
-
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["contacts:full"], configuration);
|
1847
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1848
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
1849
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
1850
|
-
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
1851
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdatePersonRequest, localVarRequestOptions, configuration);
|
1852
|
-
return {
|
1853
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
1854
|
-
options: localVarRequestOptions,
|
1855
|
-
};
|
1856
|
-
}),
|
1857
|
-
};
|
1858
|
-
};
|
1859
|
-
exports.BetaApiAxiosParamCreator = BetaApiAxiosParamCreator;
|
1860
|
-
/**
|
1861
|
-
* BetaApi - functional programming interface
|
1862
|
-
* @export
|
1863
|
-
*/
|
1864
|
-
const BetaApiFp = function (configuration) {
|
1865
|
-
const localVarAxiosParamCreator = (0, exports.BetaApiAxiosParamCreator)(configuration);
|
1866
|
-
return {
|
1867
|
-
/**
|
1868
|
-
* Adds a new activity.
|
1869
|
-
* @summary Add a new activity
|
1870
|
-
* @param {AddActivityRequest} [AddActivityRequest]
|
1871
|
-
|
1872
|
-
* @throws {RequiredError}
|
1873
|
-
*/
|
1874
|
-
addActivity(AddActivityRequest) {
|
1875
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1876
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.addActivity(AddActivityRequest);
|
1877
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1878
|
-
});
|
1879
|
-
},
|
1880
|
-
/**
|
1881
|
-
* Adds a new deal.
|
1882
|
-
* @summary Add a new deal
|
1883
|
-
* @param {AddDealRequest} [AddDealRequest]
|
1884
|
-
|
1885
|
-
* @throws {RequiredError}
|
1886
|
-
*/
|
1887
|
-
addDeal(AddDealRequest) {
|
1888
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1889
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.addDeal(AddDealRequest);
|
1890
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1891
|
-
});
|
1892
|
-
},
|
1893
|
-
/**
|
1894
|
-
* Adds a product to a deal, creating a new item called a deal-product.
|
1895
|
-
* @summary Add a product to a deal
|
1896
|
-
* @param {number} id The ID of the deal
|
1897
|
-
* @param {AddDealProductRequest} [AddDealProductRequest]
|
1898
|
-
|
1899
|
-
* @throws {RequiredError}
|
1900
|
-
*/
|
1901
|
-
addDealProduct(id, AddDealProductRequest) {
|
1902
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1903
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.addDealProduct(id, AddDealProductRequest);
|
1904
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1905
|
-
});
|
1906
|
-
},
|
1907
|
-
/**
|
1908
|
-
* Adds a new organization.
|
1909
|
-
* @summary Add a new organization
|
1910
|
-
* @param {AddOrganizationRequest} [AddOrganizationRequest]
|
1911
|
-
|
1912
|
-
* @throws {RequiredError}
|
1913
|
-
*/
|
1914
|
-
addOrganization(AddOrganizationRequest) {
|
1915
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1916
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.addOrganization(AddOrganizationRequest);
|
1917
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1918
|
-
});
|
1919
|
-
},
|
1920
|
-
/**
|
1921
|
-
* Adds a new person.
|
1922
|
-
* @summary Add a new person
|
1923
|
-
* @param {AddPersonRequest} [AddPersonRequest]
|
1924
|
-
|
1925
|
-
* @throws {RequiredError}
|
1926
|
-
*/
|
1927
|
-
addPerson(AddPersonRequest) {
|
1928
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1929
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.addPerson(AddPersonRequest);
|
1930
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1931
|
-
});
|
1932
|
-
},
|
1933
|
-
/**
|
1934
|
-
* Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
|
1935
|
-
* @summary Delete an activity
|
1936
|
-
* @param {number} id The ID of the activity
|
1937
|
-
|
1938
|
-
* @throws {RequiredError}
|
1939
|
-
*/
|
1940
|
-
deleteActivity(id) {
|
1941
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1942
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteActivity(id);
|
1943
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1944
|
-
});
|
1945
|
-
},
|
1946
|
-
/**
|
1947
|
-
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
1948
|
-
* @summary Delete a discount from a deal
|
1949
|
-
* @param {number} id The ID of the deal
|
1950
|
-
* @param {number} discount_id The ID of the discount
|
1951
|
-
|
1952
|
-
* @throws {RequiredError}
|
1953
|
-
*/
|
1954
|
-
deleteAdditionalDiscount(id, discount_id) {
|
1955
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1956
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAdditionalDiscount(id, discount_id);
|
1957
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1958
|
-
});
|
1959
|
-
},
|
1960
|
-
/**
|
1961
|
-
* Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
|
1962
|
-
* @summary Delete a deal
|
1963
|
-
* @param {number} id The ID of the deal
|
1964
|
-
|
1965
|
-
* @throws {RequiredError}
|
1966
|
-
*/
|
1967
|
-
deleteDeal(id) {
|
1968
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1969
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteDeal(id);
|
1970
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1971
|
-
});
|
1972
|
-
},
|
1973
|
-
/**
|
1974
|
-
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
1975
|
-
* @summary Delete an attached product from a deal
|
1976
|
-
* @param {number} id The ID of the deal
|
1977
|
-
* @param {number} product_attachment_id The product attachment ID
|
1978
|
-
|
1979
|
-
* @throws {RequiredError}
|
1980
|
-
*/
|
1981
|
-
deleteDealProduct(id, product_attachment_id) {
|
1982
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1983
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteDealProduct(id, product_attachment_id);
|
1984
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1985
|
-
});
|
1986
|
-
},
|
1987
|
-
/**
|
1988
|
-
* Removes an installment from a deal. Only available in Advanced and above plans.
|
1989
|
-
* @summary Delete an installment from a deal
|
1990
|
-
* @param {number} id The ID of the deal
|
1991
|
-
* @param {number} installment_id The ID of the installment
|
1992
|
-
|
1993
|
-
* @throws {RequiredError}
|
1994
|
-
*/
|
1995
|
-
deleteInstallment(id, installment_id) {
|
1996
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1997
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstallment(id, installment_id);
|
1998
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
1999
|
-
});
|
2000
|
-
},
|
2001
|
-
/**
|
2002
|
-
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
|
2003
|
-
* @summary Delete a organization
|
2004
|
-
* @param {number} id The ID of the organization
|
2005
|
-
|
2006
|
-
* @throws {RequiredError}
|
2007
|
-
*/
|
2008
|
-
deleteOrganization(id) {
|
2009
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2010
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteOrganization(id);
|
2011
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2012
|
-
});
|
2013
|
-
},
|
2014
|
-
/**
|
2015
|
-
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
|
2016
|
-
* @summary Delete a person
|
2017
|
-
* @param {number} id The ID of the person
|
2018
|
-
|
2019
|
-
* @throws {RequiredError}
|
2020
|
-
*/
|
2021
|
-
deletePerson(id) {
|
2022
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2023
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deletePerson(id);
|
2024
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2025
|
-
});
|
2026
|
-
},
|
2027
|
-
/**
|
2028
|
-
* Returns data about all activities.
|
2029
|
-
* @summary Get all activities
|
2030
|
-
* @param {number} [filter_id] If supplied, only activities matching the specified filter are returned
|
2031
|
-
* @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.
|
2032
|
-
* @param {number} [owner_id] If supplied, only activities owned by the specified user are returned. If filter_id is provided, this is ignored.
|
2033
|
-
* @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
2034
|
-
* @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
|
2035
|
-
* @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
|
2036
|
-
* @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
2037
|
-
* @param {string} [updated_since] If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
2038
|
-
* @param {string} [updated_until] If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
2039
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
2040
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2041
|
-
* @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include
|
2042
|
-
* @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.
|
2043
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2044
|
-
|
2045
|
-
* @throws {RequiredError}
|
2046
|
-
*/
|
2047
|
-
getActivities(filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor) {
|
2048
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2049
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getActivities(filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor);
|
2050
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2051
|
-
});
|
2052
|
-
},
|
2053
|
-
/**
|
2054
|
-
* Returns the details of a specific activity.
|
2055
|
-
* @summary Get details of an activity
|
2056
|
-
* @param {number} id The ID of the activity
|
2057
|
-
* @param {'attendees'} [include_fields] Optional comma separated string array of additional fields to include
|
2058
|
-
|
2059
|
-
* @throws {RequiredError}
|
2060
|
-
*/
|
2061
|
-
getActivity(id, include_fields) {
|
2062
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2063
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getActivity(id, include_fields);
|
2064
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2065
|
-
});
|
2066
|
-
},
|
2067
|
-
/**
|
2068
|
-
* Lists discounts attached to a deal.
|
2069
|
-
* @summary List discounts added to a deal
|
2070
|
-
* @param {number} id The ID of the deal
|
2071
|
-
|
2072
|
-
* @throws {RequiredError}
|
2073
|
-
*/
|
2074
|
-
getAdditionalDiscounts(id) {
|
2075
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2076
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAdditionalDiscounts(id);
|
2077
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2078
|
-
});
|
2079
|
-
},
|
2080
|
-
/**
|
2081
|
-
* Returns the details of a specific deal.
|
2082
|
-
* @summary Get details of a deal
|
2083
|
-
* @param {number} id The ID of the deal
|
2084
|
-
* @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
|
2085
|
-
* @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.
|
2086
|
-
|
2087
|
-
* @throws {RequiredError}
|
2088
|
-
*/
|
2089
|
-
getDeal(id, include_fields, custom_fields) {
|
2090
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2091
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDeal(id, include_fields, custom_fields);
|
2092
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2093
|
-
});
|
2094
|
-
},
|
2095
|
-
/**
|
2096
|
-
* Lists products attached to a deal.
|
2097
|
-
* @summary List products attached to a deal
|
2098
|
-
* @param {number} id The ID of the deal
|
2099
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2100
|
-
* @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.
|
2101
|
-
* @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`.
|
2102
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2103
|
-
|
2104
|
-
* @throws {RequiredError}
|
2105
|
-
*/
|
2106
|
-
getDealProducts(id, cursor, limit, sort_by, sort_direction) {
|
2107
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2108
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealProducts(id, cursor, limit, sort_by, sort_direction);
|
2109
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2110
|
-
});
|
2111
|
-
},
|
2112
|
-
/**
|
2113
|
-
* Returns data about all deals.
|
2114
|
-
* @summary Get all deals
|
2115
|
-
* @param {number} [filter_id] If supplied, only deals matching the specified filter are returned
|
2116
|
-
* @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.
|
2117
|
-
* @param {number} [owner_id] If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
|
2118
|
-
* @param {number} [person_id] If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
|
2119
|
-
* @param {number} [org_id] If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
2120
|
-
* @param {number} [pipeline_id] If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
|
2121
|
-
* @param {number} [stage_id] If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
|
2122
|
-
* @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.
|
2123
|
-
* @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.
|
2124
|
-
* @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.
|
2125
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
2126
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2127
|
-
* @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
|
2128
|
-
* @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.
|
2129
|
-
* @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.
|
2130
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2131
|
-
|
2132
|
-
* @throws {RequiredError}
|
2133
|
-
*/
|
2134
|
-
getDeals(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) {
|
2135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2136
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDeals(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);
|
2137
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2138
|
-
});
|
2139
|
-
},
|
2140
|
-
/**
|
2141
|
-
* Returns data about products attached to deals
|
2142
|
-
* @summary Get deal products of several deals
|
2143
|
-
* @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
|
2144
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2145
|
-
* @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.
|
2146
|
-
* @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`.
|
2147
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2148
|
-
|
2149
|
-
* @throws {RequiredError}
|
2150
|
-
*/
|
2151
|
-
getDealsProducts(deal_ids, cursor, limit, sort_by, sort_direction) {
|
2152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2153
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDealsProducts(deal_ids, cursor, limit, sort_by, sort_direction);
|
2154
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2155
|
-
});
|
2156
|
-
},
|
2157
|
-
/**
|
2158
|
-
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
2159
|
-
* @summary List installments added to a list of deals
|
2160
|
-
* @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
|
2161
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2162
|
-
* @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.
|
2163
|
-
* @param {'id' | 'billing_date' | 'deal_id'} [sort_by] The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
|
2164
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2165
|
-
|
2166
|
-
* @throws {RequiredError}
|
2167
|
-
*/
|
2168
|
-
getInstallments(deal_ids, cursor, limit, sort_by, sort_direction) {
|
2169
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2170
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstallments(deal_ids, cursor, limit, sort_by, sort_direction);
|
2171
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2172
|
-
});
|
2173
|
-
},
|
2174
|
-
/**
|
2175
|
-
* Returns the details of a specific organization.
|
2176
|
-
* @summary Get details of a organization
|
2177
|
-
* @param {number} id The ID of the organization
|
2178
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [include_fields] Optional comma separated string array of additional fields to include
|
2179
|
-
* @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.
|
2180
|
-
|
2181
|
-
* @throws {RequiredError}
|
2182
|
-
*/
|
2183
|
-
getOrganization(id, include_fields, custom_fields) {
|
2184
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2185
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrganization(id, include_fields, custom_fields);
|
2186
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2187
|
-
});
|
2188
|
-
},
|
2189
|
-
/**
|
2190
|
-
* Returns data about all organizations.
|
2191
|
-
* @summary Get all organizations
|
2192
|
-
* @param {number} [filter_id] If supplied, only organizations matching the specified filter are returned
|
2193
|
-
* @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.
|
2194
|
-
* @param {number} [owner_id] If supplied, only organization owned by the specified user are returned. If filter_id is provided, this is ignored.
|
2195
|
-
* @param {string} [updated_since] If set, only organizations with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
2196
|
-
* @param {string} [updated_until] If set, only organizations with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
2197
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
2198
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2199
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'email_messages_count' | 'people_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count'} [include_fields] Optional comma separated string array of additional fields to include
|
2200
|
-
* @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.
|
2201
|
-
* @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.
|
2202
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2203
|
-
|
2204
|
-
* @throws {RequiredError}
|
2205
|
-
*/
|
2206
|
-
getOrganizations(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
2207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2208
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrganizations(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
2209
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2210
|
-
});
|
2211
|
-
},
|
2212
|
-
/**
|
2213
|
-
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
2214
|
-
* @summary Get details of a person
|
2215
|
-
* @param {number} id The ID of the person
|
2216
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
|
2217
|
-
* @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.
|
2218
|
-
|
2219
|
-
* @throws {RequiredError}
|
2220
|
-
*/
|
2221
|
-
getPerson(id, include_fields, custom_fields) {
|
2222
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2223
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPerson(id, include_fields, custom_fields);
|
2224
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2225
|
-
});
|
2226
|
-
},
|
2227
|
-
/**
|
2228
|
-
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
2229
|
-
* @summary Get all persons
|
2230
|
-
* @param {number} [filter_id] If supplied, only persons matching the specified filter are returned
|
2231
|
-
* @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.
|
2232
|
-
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
2233
|
-
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
2234
|
-
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
2235
|
-
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
2236
|
-
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
2237
|
-
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
|
2238
|
-
* @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled.
|
2239
|
-
* @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.
|
2240
|
-
* @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.
|
2241
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2242
|
-
|
2243
|
-
* @throws {RequiredError}
|
2244
|
-
*/
|
2245
|
-
getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
2246
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2247
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
2248
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2249
|
-
});
|
2250
|
-
},
|
2251
|
-
/**
|
2252
|
-
* Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
|
2253
|
-
* @summary Add a discount to a deal
|
2254
|
-
* @param {number} id The ID of the deal
|
2255
|
-
* @param {AddAdditionalDiscountRequestBody} [AddAdditionalDiscountRequestBody]
|
2256
|
-
|
2257
|
-
* @throws {RequiredError}
|
2258
|
-
*/
|
2259
|
-
postAdditionalDiscount(id, AddAdditionalDiscountRequestBody) {
|
2260
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2261
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.postAdditionalDiscount(id, AddAdditionalDiscountRequestBody);
|
2262
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2263
|
-
});
|
2264
|
-
},
|
2265
|
-
/**
|
2266
|
-
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
2267
|
-
* @summary Add an installment to a deal
|
2268
|
-
* @param {number} id The ID of the deal
|
2269
|
-
* @param {AddInstallmentRequestBody} [AddInstallmentRequestBody]
|
2270
|
-
|
2271
|
-
* @throws {RequiredError}
|
2272
|
-
*/
|
2273
|
-
postInstallment(id, AddInstallmentRequestBody) {
|
2274
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2275
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.postInstallment(id, AddInstallmentRequestBody);
|
2276
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2277
|
-
});
|
2278
|
-
},
|
2279
|
-
/**
|
2280
|
-
* Searches all deals 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 deals can be filtered by the person ID and the organization ID.
|
2281
|
-
* @summary Search deals
|
2282
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
2283
|
-
* @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
2284
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
2285
|
-
* @param {number} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
|
2286
|
-
* @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
|
2287
|
-
* @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
|
2288
|
-
* @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default
|
2289
|
-
* @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.
|
2290
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2291
|
-
|
2292
|
-
* @throws {RequiredError}
|
2293
|
-
*/
|
2294
|
-
searchDeals(term, fields, exact_match, person_id, organization_id, status, include_fields, limit, cursor) {
|
2295
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2296
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchDeals(term, fields, exact_match, person_id, organization_id, status, include_fields, limit, cursor);
|
2297
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2298
|
-
});
|
2299
|
-
},
|
2300
|
-
/**
|
2301
|
-
* Performs a search from your choice of item types and fields.
|
2302
|
-
* @summary Perform a search from multiple item types
|
2303
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
2304
|
-
* @param {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all.
|
2305
|
-
* @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`.
|
2306
|
-
* @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
|
2307
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
2308
|
-
* @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default.
|
2309
|
-
* @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.
|
2310
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2311
|
-
|
2312
|
-
* @throws {RequiredError}
|
2313
|
-
*/
|
2314
|
-
searchItem(term, item_types, fields, search_for_related_items, exact_match, include_fields, limit, cursor) {
|
2315
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2316
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchItem(term, item_types, fields, search_for_related_items, exact_match, include_fields, limit, cursor);
|
2317
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2318
|
-
});
|
2319
|
-
},
|
2320
|
-
/**
|
2321
|
-
* Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
|
2322
|
-
* @summary Perform a search using a specific field from an item type
|
2323
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded.
|
2324
|
-
* @param {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} entity_type The type of the field to perform the search from
|
2325
|
-
* @param {string} field The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
2326
|
-
* @param {'exact' | 'beginning' | 'middle'} [match] The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>.
|
2327
|
-
* @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.
|
2328
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2329
|
-
|
2330
|
-
* @throws {RequiredError}
|
2331
|
-
*/
|
2332
|
-
searchItemByField(term, entity_type, field, match, limit, cursor) {
|
2333
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2334
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchItemByField(term, entity_type, field, match, limit, cursor);
|
2335
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2336
|
-
});
|
2337
|
-
},
|
2338
|
-
/**
|
2339
|
-
* 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.
|
2340
|
-
* @summary Search leads
|
2341
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
2342
|
-
* @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them.
|
2343
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
2344
|
-
* @param {number} [person_id] Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
|
2345
|
-
* @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
|
2346
|
-
* @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default
|
2347
|
-
* @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.
|
2348
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2349
|
-
|
2350
|
-
* @throws {RequiredError}
|
2351
|
-
*/
|
2352
|
-
searchLeads(term, fields, exact_match, person_id, organization_id, include_fields, limit, cursor) {
|
2353
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2354
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchLeads(term, fields, exact_match, person_id, organization_id, include_fields, limit, cursor);
|
2355
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2356
|
-
});
|
2357
|
-
},
|
2358
|
-
/**
|
2359
|
-
* Searches all organizations by name, address, 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.
|
2360
|
-
* @summary Search organizations
|
2361
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
2362
|
-
* @param {'address' | 'custom_fields' | 'notes' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
2363
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
2364
|
-
* @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.
|
2365
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2366
|
-
|
2367
|
-
* @throws {RequiredError}
|
2368
|
-
*/
|
2369
|
-
searchOrganization(term, fields, exact_match, limit, cursor) {
|
2370
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2371
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchOrganization(term, fields, exact_match, limit, cursor);
|
2372
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2373
|
-
});
|
2374
|
-
},
|
2375
|
-
/**
|
2376
|
-
* Searches all persons by name, email, phone, 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 persons can be filtered by organization ID.
|
2377
|
-
* @summary Search persons
|
2378
|
-
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
|
2379
|
-
* @param {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
|
2380
|
-
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
|
2381
|
-
* @param {number} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000.
|
2382
|
-
* @param {'person.picture'} [include_fields] Supports including optional fields in the results which are not provided by default
|
2383
|
-
* @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.
|
2384
|
-
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
2385
|
-
|
2386
|
-
* @throws {RequiredError}
|
2387
|
-
*/
|
2388
|
-
searchPersons(term, fields, exact_match, organization_id, include_fields, limit, cursor) {
|
2389
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2390
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchPersons(term, fields, exact_match, organization_id, include_fields, limit, cursor);
|
2391
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2392
|
-
});
|
2393
|
-
},
|
2394
|
-
/**
|
2395
|
-
* Updates the properties of an activity.
|
2396
|
-
* @summary Update an activity
|
2397
|
-
* @param {number} id The ID of the activity
|
2398
|
-
* @param {AddActivityRequest} [AddActivityRequest]
|
2399
|
-
|
2400
|
-
* @throws {RequiredError}
|
2401
|
-
*/
|
2402
|
-
updateActivity(id, AddActivityRequest) {
|
2403
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2404
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateActivity(id, AddActivityRequest);
|
2405
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2406
|
-
});
|
2407
|
-
},
|
2408
|
-
/**
|
2409
|
-
* Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
|
2410
|
-
* @summary Update a discount added to a deal
|
2411
|
-
* @param {number} id The ID of the deal
|
2412
|
-
* @param {number} discount_id The ID of the discount
|
2413
|
-
* @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
|
2414
|
-
|
2415
|
-
* @throws {RequiredError}
|
2416
|
-
*/
|
2417
|
-
updateAdditionalDiscount(id, discount_id, UpdateAdditionalDiscountRequestBody) {
|
2418
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2419
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAdditionalDiscount(id, discount_id, UpdateAdditionalDiscountRequestBody);
|
2420
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2421
|
-
});
|
2422
|
-
},
|
2423
|
-
/**
|
2424
|
-
* Updates the properties of a deal.
|
2425
|
-
* @summary Update a deal
|
2426
|
-
* @param {number} id The ID of the deal
|
2427
|
-
* @param {UpdateDealRequest} [UpdateDealRequest]
|
2428
|
-
|
2429
|
-
* @throws {RequiredError}
|
2430
|
-
*/
|
2431
|
-
updateDeal(id, UpdateDealRequest) {
|
2432
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2433
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateDeal(id, UpdateDealRequest);
|
2434
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2435
|
-
});
|
2436
|
-
},
|
2437
|
-
/**
|
2438
|
-
* Updates the details of the product that has been attached to a deal.
|
2439
|
-
* @summary Update the product attached to a deal
|
2440
|
-
* @param {number} id The ID of the deal
|
2441
|
-
* @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal)
|
2442
|
-
* @param {UpdateDealProductRequest} [UpdateDealProductRequest]
|
2443
|
-
|
2444
|
-
* @throws {RequiredError}
|
2445
|
-
*/
|
2446
|
-
updateDealProduct(id, product_attachment_id, UpdateDealProductRequest) {
|
2447
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2448
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateDealProduct(id, product_attachment_id, UpdateDealProductRequest);
|
2449
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2450
|
-
});
|
2451
|
-
},
|
2452
|
-
/**
|
2453
|
-
* Edits an installment added to a deal. Only available in Advanced and above plans.
|
2454
|
-
* @summary Update an installment added to a deal
|
2455
|
-
* @param {number} id The ID of the deal
|
2456
|
-
* @param {number} installment_id The ID of the installment
|
2457
|
-
* @param {UpdateInstallmentRequestBody} [UpdateInstallmentRequestBody]
|
2458
|
-
|
2459
|
-
* @throws {RequiredError}
|
2460
|
-
*/
|
2461
|
-
updateInstallment(id, installment_id, UpdateInstallmentRequestBody) {
|
2462
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2463
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateInstallment(id, installment_id, UpdateInstallmentRequestBody);
|
2464
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2465
|
-
});
|
2466
|
-
},
|
2467
|
-
/**
|
2468
|
-
* Updates the properties of a organization.
|
2469
|
-
* @summary Update a organization
|
2470
|
-
* @param {number} id The ID of the organization
|
2471
|
-
* @param {UpdateOrganizationRequest} [UpdateOrganizationRequest]
|
2472
|
-
|
2473
|
-
* @throws {RequiredError}
|
2474
|
-
*/
|
2475
|
-
updateOrganization(id, UpdateOrganizationRequest) {
|
2476
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2477
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateOrganization(id, UpdateOrganizationRequest);
|
2478
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2479
|
-
});
|
2480
|
-
},
|
2481
|
-
/**
|
2482
|
-
* Updates the properties of a person.
|
2483
|
-
* @summary Update a person
|
2484
|
-
* @param {number} id The ID of the person
|
2485
|
-
* @param {UpdatePersonRequest} [UpdatePersonRequest]
|
2486
|
-
|
2487
|
-
* @throws {RequiredError}
|
2488
|
-
*/
|
2489
|
-
updatePerson(id, UpdatePersonRequest) {
|
2490
|
-
return __awaiter(this, void 0, void 0, function* () {
|
2491
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest);
|
2492
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
2493
|
-
});
|
2494
|
-
},
|
2495
|
-
};
|
2496
|
-
};
|
2497
|
-
exports.BetaApiFp = BetaApiFp;
|
2498
|
-
/**
|
2499
|
-
* BetaApi - factory interface
|
2500
|
-
* @export
|
2501
|
-
*/
|
2502
|
-
const BetaApiFactory = function (configuration, basePath, axios) {
|
2503
|
-
const localVarFp = (0, exports.BetaApiFp)(configuration);
|
2504
|
-
return {
|
2505
|
-
/**
|
2506
|
-
* Adds a new activity.
|
2507
|
-
* @summary Add a new activity
|
2508
|
-
* @param {BetaApiAddActivityRequest} requestParameters Request parameters.
|
2509
|
-
|
2510
|
-
* @throws {RequiredError}
|
2511
|
-
*/
|
2512
|
-
addActivity(requestParameters = {}) {
|
2513
|
-
return localVarFp.addActivity(requestParameters.AddActivityRequest).then((request) => request(axios, basePath));
|
2514
|
-
},
|
2515
|
-
/**
|
2516
|
-
* Adds a new deal.
|
2517
|
-
* @summary Add a new deal
|
2518
|
-
* @param {BetaApiAddDealRequest} requestParameters Request parameters.
|
2519
|
-
|
2520
|
-
* @throws {RequiredError}
|
2521
|
-
*/
|
2522
|
-
addDeal(requestParameters = {}) {
|
2523
|
-
return localVarFp.addDeal(requestParameters.AddDealRequest).then((request) => request(axios, basePath));
|
2524
|
-
},
|
2525
|
-
/**
|
2526
|
-
* Adds a product to a deal, creating a new item called a deal-product.
|
2527
|
-
* @summary Add a product to a deal
|
2528
|
-
* @param {BetaApiAddDealProductRequest} requestParameters Request parameters.
|
2529
|
-
|
2530
|
-
* @throws {RequiredError}
|
2531
|
-
*/
|
2532
|
-
addDealProduct(requestParameters) {
|
2533
|
-
return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(axios, basePath));
|
2534
|
-
},
|
2535
|
-
/**
|
2536
|
-
* Adds a new organization.
|
2537
|
-
* @summary Add a new organization
|
2538
|
-
* @param {BetaApiAddOrganizationRequest} requestParameters Request parameters.
|
2539
|
-
|
2540
|
-
* @throws {RequiredError}
|
2541
|
-
*/
|
2542
|
-
addOrganization(requestParameters = {}) {
|
2543
|
-
return localVarFp.addOrganization(requestParameters.AddOrganizationRequest).then((request) => request(axios, basePath));
|
2544
|
-
},
|
2545
|
-
/**
|
2546
|
-
* Adds a new person.
|
2547
|
-
* @summary Add a new person
|
2548
|
-
* @param {BetaApiAddPersonRequest} requestParameters Request parameters.
|
2549
|
-
|
2550
|
-
* @throws {RequiredError}
|
2551
|
-
*/
|
2552
|
-
addPerson(requestParameters = {}) {
|
2553
|
-
return localVarFp.addPerson(requestParameters.AddPersonRequest).then((request) => request(axios, basePath));
|
2554
|
-
},
|
2555
|
-
/**
|
2556
|
-
* Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
|
2557
|
-
* @summary Delete an activity
|
2558
|
-
* @param {BetaApiDeleteActivityRequest} requestParameters Request parameters.
|
2559
|
-
|
2560
|
-
* @throws {RequiredError}
|
2561
|
-
*/
|
2562
|
-
deleteActivity(requestParameters) {
|
2563
|
-
return localVarFp.deleteActivity(requestParameters.id).then((request) => request(axios, basePath));
|
2564
|
-
},
|
2565
|
-
/**
|
2566
|
-
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
2567
|
-
* @summary Delete a discount from a deal
|
2568
|
-
* @param {BetaApiDeleteAdditionalDiscountRequest} requestParameters Request parameters.
|
2569
|
-
|
2570
|
-
* @throws {RequiredError}
|
2571
|
-
*/
|
2572
|
-
deleteAdditionalDiscount(requestParameters) {
|
2573
|
-
return localVarFp.deleteAdditionalDiscount(requestParameters.id, requestParameters.discount_id).then((request) => request(axios, basePath));
|
2574
|
-
},
|
2575
|
-
/**
|
2576
|
-
* Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
|
2577
|
-
* @summary Delete a deal
|
2578
|
-
* @param {BetaApiDeleteDealRequest} requestParameters Request parameters.
|
2579
|
-
|
2580
|
-
* @throws {RequiredError}
|
2581
|
-
*/
|
2582
|
-
deleteDeal(requestParameters) {
|
2583
|
-
return localVarFp.deleteDeal(requestParameters.id).then((request) => request(axios, basePath));
|
2584
|
-
},
|
2585
|
-
/**
|
2586
|
-
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
2587
|
-
* @summary Delete an attached product from a deal
|
2588
|
-
* @param {BetaApiDeleteDealProductRequest} requestParameters Request parameters.
|
2589
|
-
|
2590
|
-
* @throws {RequiredError}
|
2591
|
-
*/
|
2592
|
-
deleteDealProduct(requestParameters) {
|
2593
|
-
return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(axios, basePath));
|
2594
|
-
},
|
2595
|
-
/**
|
2596
|
-
* Removes an installment from a deal. Only available in Advanced and above plans.
|
2597
|
-
* @summary Delete an installment from a deal
|
2598
|
-
* @param {BetaApiDeleteInstallmentRequest} requestParameters Request parameters.
|
2599
|
-
|
2600
|
-
* @throws {RequiredError}
|
2601
|
-
*/
|
2602
|
-
deleteInstallment(requestParameters) {
|
2603
|
-
return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(axios, basePath));
|
2604
|
-
},
|
2605
|
-
/**
|
2606
|
-
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
|
2607
|
-
* @summary Delete a organization
|
2608
|
-
* @param {BetaApiDeleteOrganizationRequest} requestParameters Request parameters.
|
2609
|
-
|
2610
|
-
* @throws {RequiredError}
|
2611
|
-
*/
|
2612
|
-
deleteOrganization(requestParameters) {
|
2613
|
-
return localVarFp.deleteOrganization(requestParameters.id).then((request) => request(axios, basePath));
|
2614
|
-
},
|
2615
|
-
/**
|
2616
|
-
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
|
2617
|
-
* @summary Delete a person
|
2618
|
-
* @param {BetaApiDeletePersonRequest} requestParameters Request parameters.
|
2619
|
-
|
2620
|
-
* @throws {RequiredError}
|
2621
|
-
*/
|
2622
|
-
deletePerson(requestParameters) {
|
2623
|
-
return localVarFp.deletePerson(requestParameters.id).then((request) => request(axios, basePath));
|
2624
|
-
},
|
2625
|
-
/**
|
2626
|
-
* Returns data about all activities.
|
2627
|
-
* @summary Get all activities
|
2628
|
-
* @param {BetaApiGetActivitiesRequest} requestParameters Request parameters.
|
2629
|
-
|
2630
|
-
* @throws {RequiredError}
|
2631
|
-
*/
|
2632
|
-
getActivities(requestParameters = {}) {
|
2633
|
-
return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2634
|
-
},
|
2635
|
-
/**
|
2636
|
-
* Returns the details of a specific activity.
|
2637
|
-
* @summary Get details of an activity
|
2638
|
-
* @param {BetaApiGetActivityRequest} requestParameters Request parameters.
|
2639
|
-
|
2640
|
-
* @throws {RequiredError}
|
2641
|
-
*/
|
2642
|
-
getActivity(requestParameters) {
|
2643
|
-
return localVarFp.getActivity(requestParameters.id, requestParameters.include_fields).then((request) => request(axios, basePath));
|
2644
|
-
},
|
2645
|
-
/**
|
2646
|
-
* Lists discounts attached to a deal.
|
2647
|
-
* @summary List discounts added to a deal
|
2648
|
-
* @param {BetaApiGetAdditionalDiscountsRequest} requestParameters Request parameters.
|
2649
|
-
|
2650
|
-
* @throws {RequiredError}
|
2651
|
-
*/
|
2652
|
-
getAdditionalDiscounts(requestParameters) {
|
2653
|
-
return localVarFp.getAdditionalDiscounts(requestParameters.id).then((request) => request(axios, basePath));
|
2654
|
-
},
|
2655
|
-
/**
|
2656
|
-
* Returns the details of a specific deal.
|
2657
|
-
* @summary Get details of a deal
|
2658
|
-
* @param {BetaApiGetDealRequest} requestParameters Request parameters.
|
2659
|
-
|
2660
|
-
* @throws {RequiredError}
|
2661
|
-
*/
|
2662
|
-
getDeal(requestParameters) {
|
2663
|
-
return localVarFp.getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
2664
|
-
},
|
2665
|
-
/**
|
2666
|
-
* Lists products attached to a deal.
|
2667
|
-
* @summary List products attached to a deal
|
2668
|
-
* @param {BetaApiGetDealProductsRequest} requestParameters Request parameters.
|
2669
|
-
|
2670
|
-
* @throws {RequiredError}
|
2671
|
-
*/
|
2672
|
-
getDealProducts(requestParameters) {
|
2673
|
-
return localVarFp.getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
2674
|
-
},
|
2675
|
-
/**
|
2676
|
-
* Returns data about all deals.
|
2677
|
-
* @summary Get all deals
|
2678
|
-
* @param {BetaApiGetDealsRequest} requestParameters Request parameters.
|
2679
|
-
|
2680
|
-
* @throws {RequiredError}
|
2681
|
-
*/
|
2682
|
-
getDeals(requestParameters = {}) {
|
2683
|
-
return localVarFp.getDeals(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));
|
2684
|
-
},
|
2685
|
-
/**
|
2686
|
-
* Returns data about products attached to deals
|
2687
|
-
* @summary Get deal products of several deals
|
2688
|
-
* @param {BetaApiGetDealsProductsRequest} requestParameters Request parameters.
|
2689
|
-
|
2690
|
-
* @throws {RequiredError}
|
2691
|
-
*/
|
2692
|
-
getDealsProducts(requestParameters) {
|
2693
|
-
return localVarFp.getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
2694
|
-
},
|
2695
|
-
/**
|
2696
|
-
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
2697
|
-
* @summary List installments added to a list of deals
|
2698
|
-
* @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
|
2699
|
-
|
2700
|
-
* @throws {RequiredError}
|
2701
|
-
*/
|
2702
|
-
getInstallments(requestParameters) {
|
2703
|
-
return localVarFp.getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
2704
|
-
},
|
2705
|
-
/**
|
2706
|
-
* Returns the details of a specific organization.
|
2707
|
-
* @summary Get details of a organization
|
2708
|
-
* @param {BetaApiGetOrganizationRequest} requestParameters Request parameters.
|
2709
|
-
|
2710
|
-
* @throws {RequiredError}
|
2711
|
-
*/
|
2712
|
-
getOrganization(requestParameters) {
|
2713
|
-
return localVarFp.getOrganization(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
2714
|
-
},
|
2715
|
-
/**
|
2716
|
-
* Returns data about all organizations.
|
2717
|
-
* @summary Get all organizations
|
2718
|
-
* @param {BetaApiGetOrganizationsRequest} requestParameters Request parameters.
|
2719
|
-
|
2720
|
-
* @throws {RequiredError}
|
2721
|
-
*/
|
2722
|
-
getOrganizations(requestParameters = {}) {
|
2723
|
-
return localVarFp.getOrganizations(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, 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));
|
2724
|
-
},
|
2725
|
-
/**
|
2726
|
-
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
2727
|
-
* @summary Get details of a person
|
2728
|
-
* @param {BetaApiGetPersonRequest} requestParameters Request parameters.
|
2729
|
-
|
2730
|
-
* @throws {RequiredError}
|
2731
|
-
*/
|
2732
|
-
getPerson(requestParameters) {
|
2733
|
-
return localVarFp.getPerson(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(axios, basePath));
|
2734
|
-
},
|
2735
|
-
/**
|
2736
|
-
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
2737
|
-
* @summary Get all persons
|
2738
|
-
* @param {BetaApiGetPersonsRequest} requestParameters Request parameters.
|
2739
|
-
|
2740
|
-
* @throws {RequiredError}
|
2741
|
-
*/
|
2742
|
-
getPersons(requestParameters = {}) {
|
2743
|
-
return localVarFp.getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, 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));
|
2744
|
-
},
|
2745
|
-
/**
|
2746
|
-
* Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
|
2747
|
-
* @summary Add a discount to a deal
|
2748
|
-
* @param {BetaApiPostAdditionalDiscountRequest} requestParameters Request parameters.
|
2749
|
-
|
2750
|
-
* @throws {RequiredError}
|
2751
|
-
*/
|
2752
|
-
postAdditionalDiscount(requestParameters) {
|
2753
|
-
return localVarFp.postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(axios, basePath));
|
2754
|
-
},
|
2755
|
-
/**
|
2756
|
-
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
2757
|
-
* @summary Add an installment to a deal
|
2758
|
-
* @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
|
2759
|
-
|
2760
|
-
* @throws {RequiredError}
|
2761
|
-
*/
|
2762
|
-
postInstallment(requestParameters) {
|
2763
|
-
return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(axios, basePath));
|
2764
|
-
},
|
2765
|
-
/**
|
2766
|
-
* Searches all deals 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 deals can be filtered by the person ID and the organization ID.
|
2767
|
-
* @summary Search deals
|
2768
|
-
* @param {BetaApiSearchDealsRequest} requestParameters Request parameters.
|
2769
|
-
|
2770
|
-
* @throws {RequiredError}
|
2771
|
-
*/
|
2772
|
-
searchDeals(requestParameters) {
|
2773
|
-
return localVarFp.searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2774
|
-
},
|
2775
|
-
/**
|
2776
|
-
* Performs a search from your choice of item types and fields.
|
2777
|
-
* @summary Perform a search from multiple item types
|
2778
|
-
* @param {BetaApiSearchItemRequest} requestParameters Request parameters.
|
2779
|
-
|
2780
|
-
* @throws {RequiredError}
|
2781
|
-
*/
|
2782
|
-
searchItem(requestParameters) {
|
2783
|
-
return localVarFp.searchItem(requestParameters.term, requestParameters.item_types, requestParameters.fields, requestParameters.search_for_related_items, requestParameters.exact_match, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2784
|
-
},
|
2785
|
-
/**
|
2786
|
-
* Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
|
2787
|
-
* @summary Perform a search using a specific field from an item type
|
2788
|
-
* @param {BetaApiSearchItemByFieldRequest} requestParameters Request parameters.
|
2789
|
-
|
2790
|
-
* @throws {RequiredError}
|
2791
|
-
*/
|
2792
|
-
searchItemByField(requestParameters) {
|
2793
|
-
return localVarFp.searchItemByField(requestParameters.term, requestParameters.entity_type, requestParameters.field, requestParameters.match, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2794
|
-
},
|
2795
|
-
/**
|
2796
|
-
* 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.
|
2797
|
-
* @summary Search leads
|
2798
|
-
* @param {BetaApiSearchLeadsRequest} requestParameters Request parameters.
|
2799
|
-
|
2800
|
-
* @throws {RequiredError}
|
2801
|
-
*/
|
2802
|
-
searchLeads(requestParameters) {
|
2803
|
-
return localVarFp.searchLeads(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2804
|
-
},
|
2805
|
-
/**
|
2806
|
-
* Searches all organizations by name, address, 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.
|
2807
|
-
* @summary Search organizations
|
2808
|
-
* @param {BetaApiSearchOrganizationRequest} requestParameters Request parameters.
|
2809
|
-
|
2810
|
-
* @throws {RequiredError}
|
2811
|
-
*/
|
2812
|
-
searchOrganization(requestParameters) {
|
2813
|
-
return localVarFp.searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2814
|
-
},
|
2815
|
-
/**
|
2816
|
-
* Searches all persons by name, email, phone, 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 persons can be filtered by organization ID.
|
2817
|
-
* @summary Search persons
|
2818
|
-
* @param {BetaApiSearchPersonsRequest} requestParameters Request parameters.
|
2819
|
-
|
2820
|
-
* @throws {RequiredError}
|
2821
|
-
*/
|
2822
|
-
searchPersons(requestParameters) {
|
2823
|
-
return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
2824
|
-
},
|
2825
|
-
/**
|
2826
|
-
* Updates the properties of an activity.
|
2827
|
-
* @summary Update an activity
|
2828
|
-
* @param {BetaApiUpdateActivityRequest} requestParameters Request parameters.
|
2829
|
-
|
2830
|
-
* @throws {RequiredError}
|
2831
|
-
*/
|
2832
|
-
updateActivity(requestParameters) {
|
2833
|
-
return localVarFp.updateActivity(requestParameters.id, requestParameters.AddActivityRequest).then((request) => request(axios, basePath));
|
2834
|
-
},
|
2835
|
-
/**
|
2836
|
-
* Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
|
2837
|
-
* @summary Update a discount added to a deal
|
2838
|
-
* @param {BetaApiUpdateAdditionalDiscountRequest} requestParameters Request parameters.
|
2839
|
-
|
2840
|
-
* @throws {RequiredError}
|
2841
|
-
*/
|
2842
|
-
updateAdditionalDiscount(requestParameters) {
|
2843
|
-
return localVarFp.updateAdditionalDiscount(requestParameters.id, requestParameters.discount_id, requestParameters.UpdateAdditionalDiscountRequestBody).then((request) => request(axios, basePath));
|
296
|
+
deleteInstallment(requestParameters) {
|
297
|
+
return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(axios, basePath));
|
2844
298
|
},
|
2845
299
|
/**
|
2846
|
-
*
|
2847
|
-
* @summary
|
2848
|
-
* @param {
|
300
|
+
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
301
|
+
* @summary List installments added to a list of deals
|
302
|
+
* @param {BetaApiGetInstallmentsRequest} requestParameters Request parameters.
|
2849
303
|
|
2850
304
|
* @throws {RequiredError}
|
2851
305
|
*/
|
2852
|
-
|
2853
|
-
return localVarFp.
|
306
|
+
getInstallments(requestParameters) {
|
307
|
+
return localVarFp.getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(axios, basePath));
|
2854
308
|
},
|
2855
309
|
/**
|
2856
|
-
*
|
2857
|
-
* @summary
|
2858
|
-
* @param {
|
310
|
+
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
311
|
+
* @summary Add an installment to a deal
|
312
|
+
* @param {BetaApiPostInstallmentRequest} requestParameters Request parameters.
|
2859
313
|
|
2860
314
|
* @throws {RequiredError}
|
2861
315
|
*/
|
2862
|
-
|
2863
|
-
return localVarFp.
|
316
|
+
postInstallment(requestParameters) {
|
317
|
+
return localVarFp.postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(axios, basePath));
|
2864
318
|
},
|
2865
319
|
/**
|
2866
320
|
* Edits an installment added to a deal. Only available in Advanced and above plans.
|
@@ -2872,26 +326,6 @@ const BetaApiFactory = function (configuration, basePath, axios) {
|
|
2872
326
|
updateInstallment(requestParameters) {
|
2873
327
|
return localVarFp.updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(axios, basePath));
|
2874
328
|
},
|
2875
|
-
/**
|
2876
|
-
* Updates the properties of a organization.
|
2877
|
-
* @summary Update a organization
|
2878
|
-
* @param {BetaApiUpdateOrganizationRequest} requestParameters Request parameters.
|
2879
|
-
|
2880
|
-
* @throws {RequiredError}
|
2881
|
-
*/
|
2882
|
-
updateOrganization(requestParameters) {
|
2883
|
-
return localVarFp.updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest).then((request) => request(axios, basePath));
|
2884
|
-
},
|
2885
|
-
/**
|
2886
|
-
* Updates the properties of a person.
|
2887
|
-
* @summary Update a person
|
2888
|
-
* @param {BetaApiUpdatePersonRequest} requestParameters Request parameters.
|
2889
|
-
|
2890
|
-
* @throws {RequiredError}
|
2891
|
-
*/
|
2892
|
-
updatePerson(requestParameters) {
|
2893
|
-
return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest).then((request) => request(axios, basePath));
|
2894
|
-
},
|
2895
329
|
};
|
2896
330
|
};
|
2897
331
|
exports.BetaApiFactory = BetaApiFactory;
|
@@ -2902,105 +336,6 @@ exports.BetaApiFactory = BetaApiFactory;
|
|
2902
336
|
* @extends {BaseAPI}
|
2903
337
|
*/
|
2904
338
|
class BetaApi extends base_1.BaseAPI {
|
2905
|
-
/**
|
2906
|
-
* Adds a new activity.
|
2907
|
-
* @summary Add a new activity
|
2908
|
-
* @param {BetaApiAddActivityRequest} requestParameters Request parameters.
|
2909
|
-
|
2910
|
-
* @throws {RequiredError}
|
2911
|
-
* @memberof BetaApi
|
2912
|
-
*/
|
2913
|
-
addActivity(requestParameters = {}) {
|
2914
|
-
return (0, exports.BetaApiFp)(this.configuration).addActivity(requestParameters.AddActivityRequest).then((request) => request(this.axios, this.basePath));
|
2915
|
-
}
|
2916
|
-
/**
|
2917
|
-
* Adds a new deal.
|
2918
|
-
* @summary Add a new deal
|
2919
|
-
* @param {BetaApiAddDealRequest} requestParameters Request parameters.
|
2920
|
-
|
2921
|
-
* @throws {RequiredError}
|
2922
|
-
* @memberof BetaApi
|
2923
|
-
*/
|
2924
|
-
addDeal(requestParameters = {}) {
|
2925
|
-
return (0, exports.BetaApiFp)(this.configuration).addDeal(requestParameters.AddDealRequest).then((request) => request(this.axios, this.basePath));
|
2926
|
-
}
|
2927
|
-
/**
|
2928
|
-
* Adds a product to a deal, creating a new item called a deal-product.
|
2929
|
-
* @summary Add a product to a deal
|
2930
|
-
* @param {BetaApiAddDealProductRequest} requestParameters Request parameters.
|
2931
|
-
|
2932
|
-
* @throws {RequiredError}
|
2933
|
-
* @memberof BetaApi
|
2934
|
-
*/
|
2935
|
-
addDealProduct(requestParameters) {
|
2936
|
-
return (0, exports.BetaApiFp)(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(this.axios, this.basePath));
|
2937
|
-
}
|
2938
|
-
/**
|
2939
|
-
* Adds a new organization.
|
2940
|
-
* @summary Add a new organization
|
2941
|
-
* @param {BetaApiAddOrganizationRequest} requestParameters Request parameters.
|
2942
|
-
|
2943
|
-
* @throws {RequiredError}
|
2944
|
-
* @memberof BetaApi
|
2945
|
-
*/
|
2946
|
-
addOrganization(requestParameters = {}) {
|
2947
|
-
return (0, exports.BetaApiFp)(this.configuration).addOrganization(requestParameters.AddOrganizationRequest).then((request) => request(this.axios, this.basePath));
|
2948
|
-
}
|
2949
|
-
/**
|
2950
|
-
* Adds a new person.
|
2951
|
-
* @summary Add a new person
|
2952
|
-
* @param {BetaApiAddPersonRequest} requestParameters Request parameters.
|
2953
|
-
|
2954
|
-
* @throws {RequiredError}
|
2955
|
-
* @memberof BetaApi
|
2956
|
-
*/
|
2957
|
-
addPerson(requestParameters = {}) {
|
2958
|
-
return (0, exports.BetaApiFp)(this.configuration).addPerson(requestParameters.AddPersonRequest).then((request) => request(this.axios, this.basePath));
|
2959
|
-
}
|
2960
|
-
/**
|
2961
|
-
* Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
|
2962
|
-
* @summary Delete an activity
|
2963
|
-
* @param {BetaApiDeleteActivityRequest} requestParameters Request parameters.
|
2964
|
-
|
2965
|
-
* @throws {RequiredError}
|
2966
|
-
* @memberof BetaApi
|
2967
|
-
*/
|
2968
|
-
deleteActivity(requestParameters) {
|
2969
|
-
return (0, exports.BetaApiFp)(this.configuration).deleteActivity(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
2970
|
-
}
|
2971
|
-
/**
|
2972
|
-
* Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
|
2973
|
-
* @summary Delete a discount from a deal
|
2974
|
-
* @param {BetaApiDeleteAdditionalDiscountRequest} requestParameters Request parameters.
|
2975
|
-
|
2976
|
-
* @throws {RequiredError}
|
2977
|
-
* @memberof BetaApi
|
2978
|
-
*/
|
2979
|
-
deleteAdditionalDiscount(requestParameters) {
|
2980
|
-
return (0, exports.BetaApiFp)(this.configuration).deleteAdditionalDiscount(requestParameters.id, requestParameters.discount_id).then((request) => request(this.axios, this.basePath));
|
2981
|
-
}
|
2982
|
-
/**
|
2983
|
-
* Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
|
2984
|
-
* @summary Delete a deal
|
2985
|
-
* @param {BetaApiDeleteDealRequest} requestParameters Request parameters.
|
2986
|
-
|
2987
|
-
* @throws {RequiredError}
|
2988
|
-
* @memberof BetaApi
|
2989
|
-
*/
|
2990
|
-
deleteDeal(requestParameters) {
|
2991
|
-
return (0, exports.BetaApiFp)(this.configuration).deleteDeal(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
2992
|
-
}
|
2993
|
-
/**
|
2994
|
-
* Deletes a product attachment from a deal, using the `product_attachment_id`.
|
2995
|
-
* @summary Delete an attached product from a deal
|
2996
|
-
* @param {BetaApiDeleteDealProductRequest} requestParameters Request parameters.
|
2997
|
-
|
2998
|
-
* @throws {RequiredError}
|
2999
|
-
* @memberof BetaApi
|
3000
|
-
*/
|
3001
|
-
deleteDealProduct(requestParameters) {
|
3002
|
-
return (0, exports.BetaApiFp)(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id).then((request) => request(this.axios, this.basePath));
|
3003
|
-
}
|
3004
339
|
/**
|
3005
340
|
* Removes an installment from a deal. Only available in Advanced and above plans.
|
3006
341
|
* @summary Delete an installment from a deal
|
@@ -3012,105 +347,6 @@ class BetaApi extends base_1.BaseAPI {
|
|
3012
347
|
deleteInstallment(requestParameters) {
|
3013
348
|
return (0, exports.BetaApiFp)(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(this.axios, this.basePath));
|
3014
349
|
}
|
3015
|
-
/**
|
3016
|
-
* Marks a organization as deleted. After 30 days, the organization will be permanently deleted.
|
3017
|
-
* @summary Delete a organization
|
3018
|
-
* @param {BetaApiDeleteOrganizationRequest} requestParameters Request parameters.
|
3019
|
-
|
3020
|
-
* @throws {RequiredError}
|
3021
|
-
* @memberof BetaApi
|
3022
|
-
*/
|
3023
|
-
deleteOrganization(requestParameters) {
|
3024
|
-
return (0, exports.BetaApiFp)(this.configuration).deleteOrganization(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
3025
|
-
}
|
3026
|
-
/**
|
3027
|
-
* Marks a person as deleted. After 30 days, the person will be permanently deleted.
|
3028
|
-
* @summary Delete a person
|
3029
|
-
* @param {BetaApiDeletePersonRequest} requestParameters Request parameters.
|
3030
|
-
|
3031
|
-
* @throws {RequiredError}
|
3032
|
-
* @memberof BetaApi
|
3033
|
-
*/
|
3034
|
-
deletePerson(requestParameters) {
|
3035
|
-
return (0, exports.BetaApiFp)(this.configuration).deletePerson(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
3036
|
-
}
|
3037
|
-
/**
|
3038
|
-
* Returns data about all activities.
|
3039
|
-
* @summary Get all activities
|
3040
|
-
* @param {BetaApiGetActivitiesRequest} requestParameters Request parameters.
|
3041
|
-
|
3042
|
-
* @throws {RequiredError}
|
3043
|
-
* @memberof BetaApi
|
3044
|
-
*/
|
3045
|
-
getActivities(requestParameters = {}) {
|
3046
|
-
return (0, exports.BetaApiFp)(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3047
|
-
}
|
3048
|
-
/**
|
3049
|
-
* Returns the details of a specific activity.
|
3050
|
-
* @summary Get details of an activity
|
3051
|
-
* @param {BetaApiGetActivityRequest} requestParameters Request parameters.
|
3052
|
-
|
3053
|
-
* @throws {RequiredError}
|
3054
|
-
* @memberof BetaApi
|
3055
|
-
*/
|
3056
|
-
getActivity(requestParameters) {
|
3057
|
-
return (0, exports.BetaApiFp)(this.configuration).getActivity(requestParameters.id, requestParameters.include_fields).then((request) => request(this.axios, this.basePath));
|
3058
|
-
}
|
3059
|
-
/**
|
3060
|
-
* Lists discounts attached to a deal.
|
3061
|
-
* @summary List discounts added to a deal
|
3062
|
-
* @param {BetaApiGetAdditionalDiscountsRequest} requestParameters Request parameters.
|
3063
|
-
|
3064
|
-
* @throws {RequiredError}
|
3065
|
-
* @memberof BetaApi
|
3066
|
-
*/
|
3067
|
-
getAdditionalDiscounts(requestParameters) {
|
3068
|
-
return (0, exports.BetaApiFp)(this.configuration).getAdditionalDiscounts(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
3069
|
-
}
|
3070
|
-
/**
|
3071
|
-
* Returns the details of a specific deal.
|
3072
|
-
* @summary Get details of a deal
|
3073
|
-
* @param {BetaApiGetDealRequest} requestParameters Request parameters.
|
3074
|
-
|
3075
|
-
* @throws {RequiredError}
|
3076
|
-
* @memberof BetaApi
|
3077
|
-
*/
|
3078
|
-
getDeal(requestParameters) {
|
3079
|
-
return (0, exports.BetaApiFp)(this.configuration).getDeal(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
3080
|
-
}
|
3081
|
-
/**
|
3082
|
-
* Lists products attached to a deal.
|
3083
|
-
* @summary List products attached to a deal
|
3084
|
-
* @param {BetaApiGetDealProductsRequest} requestParameters Request parameters.
|
3085
|
-
|
3086
|
-
* @throws {RequiredError}
|
3087
|
-
* @memberof BetaApi
|
3088
|
-
*/
|
3089
|
-
getDealProducts(requestParameters) {
|
3090
|
-
return (0, exports.BetaApiFp)(this.configuration).getDealProducts(requestParameters.id, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
|
3091
|
-
}
|
3092
|
-
/**
|
3093
|
-
* Returns data about all deals.
|
3094
|
-
* @summary Get all deals
|
3095
|
-
* @param {BetaApiGetDealsRequest} requestParameters Request parameters.
|
3096
|
-
|
3097
|
-
* @throws {RequiredError}
|
3098
|
-
* @memberof BetaApi
|
3099
|
-
*/
|
3100
|
-
getDeals(requestParameters = {}) {
|
3101
|
-
return (0, exports.BetaApiFp)(this.configuration).getDeals(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));
|
3102
|
-
}
|
3103
|
-
/**
|
3104
|
-
* Returns data about products attached to deals
|
3105
|
-
* @summary Get deal products of several deals
|
3106
|
-
* @param {BetaApiGetDealsProductsRequest} requestParameters Request parameters.
|
3107
|
-
|
3108
|
-
* @throws {RequiredError}
|
3109
|
-
* @memberof BetaApi
|
3110
|
-
*/
|
3111
|
-
getDealsProducts(requestParameters) {
|
3112
|
-
return (0, exports.BetaApiFp)(this.configuration).getDealsProducts(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
|
3113
|
-
}
|
3114
350
|
/**
|
3115
351
|
* Lists installments attached to a list of deals. Only available in Advanced and above plans.
|
3116
352
|
* @summary List installments added to a list of deals
|
@@ -3122,61 +358,6 @@ class BetaApi extends base_1.BaseAPI {
|
|
3122
358
|
getInstallments(requestParameters) {
|
3123
359
|
return (0, exports.BetaApiFp)(this.configuration).getInstallments(requestParameters.deal_ids, requestParameters.cursor, requestParameters.limit, requestParameters.sort_by, requestParameters.sort_direction).then((request) => request(this.axios, this.basePath));
|
3124
360
|
}
|
3125
|
-
/**
|
3126
|
-
* Returns the details of a specific organization.
|
3127
|
-
* @summary Get details of a organization
|
3128
|
-
* @param {BetaApiGetOrganizationRequest} requestParameters Request parameters.
|
3129
|
-
|
3130
|
-
* @throws {RequiredError}
|
3131
|
-
* @memberof BetaApi
|
3132
|
-
*/
|
3133
|
-
getOrganization(requestParameters) {
|
3134
|
-
return (0, exports.BetaApiFp)(this.configuration).getOrganization(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
3135
|
-
}
|
3136
|
-
/**
|
3137
|
-
* Returns data about all organizations.
|
3138
|
-
* @summary Get all organizations
|
3139
|
-
* @param {BetaApiGetOrganizationsRequest} requestParameters Request parameters.
|
3140
|
-
|
3141
|
-
* @throws {RequiredError}
|
3142
|
-
* @memberof BetaApi
|
3143
|
-
*/
|
3144
|
-
getOrganizations(requestParameters = {}) {
|
3145
|
-
return (0, exports.BetaApiFp)(this.configuration).getOrganizations(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, 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));
|
3146
|
-
}
|
3147
|
-
/**
|
3148
|
-
* Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
3149
|
-
* @summary Get details of a person
|
3150
|
-
* @param {BetaApiGetPersonRequest} requestParameters Request parameters.
|
3151
|
-
|
3152
|
-
* @throws {RequiredError}
|
3153
|
-
* @memberof BetaApi
|
3154
|
-
*/
|
3155
|
-
getPerson(requestParameters) {
|
3156
|
-
return (0, exports.BetaApiFp)(this.configuration).getPerson(requestParameters.id, requestParameters.include_fields, requestParameters.custom_fields).then((request) => request(this.axios, this.basePath));
|
3157
|
-
}
|
3158
|
-
/**
|
3159
|
-
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
|
3160
|
-
* @summary Get all persons
|
3161
|
-
* @param {BetaApiGetPersonsRequest} requestParameters Request parameters.
|
3162
|
-
|
3163
|
-
* @throws {RequiredError}
|
3164
|
-
* @memberof BetaApi
|
3165
|
-
*/
|
3166
|
-
getPersons(requestParameters = {}) {
|
3167
|
-
return (0, exports.BetaApiFp)(this.configuration).getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, 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));
|
3168
|
-
}
|
3169
|
-
/**
|
3170
|
-
* Adds a discount to a deal changing, the deal value if the deal has one-time products attached.
|
3171
|
-
* @summary Add a discount to a deal
|
3172
|
-
* @param {BetaApiPostAdditionalDiscountRequest} requestParameters Request parameters.
|
3173
|
-
|
3174
|
-
* @throws {RequiredError}
|
3175
|
-
* @memberof BetaApi
|
3176
|
-
*/
|
3177
|
-
postAdditionalDiscount(requestParameters) {
|
3178
|
-
return (0, exports.BetaApiFp)(this.configuration).postAdditionalDiscount(requestParameters.id, requestParameters.AddAdditionalDiscountRequestBody).then((request) => request(this.axios, this.basePath));
|
3179
|
-
}
|
3180
361
|
/**
|
3181
362
|
* Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Advanced and above plans.
|
3182
363
|
* @summary Add an installment to a deal
|
@@ -3188,116 +369,6 @@ class BetaApi extends base_1.BaseAPI {
|
|
3188
369
|
postInstallment(requestParameters) {
|
3189
370
|
return (0, exports.BetaApiFp)(this.configuration).postInstallment(requestParameters.id, requestParameters.AddInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
|
3190
371
|
}
|
3191
|
-
/**
|
3192
|
-
* Searches all deals 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 deals can be filtered by the person ID and the organization ID.
|
3193
|
-
* @summary Search deals
|
3194
|
-
* @param {BetaApiSearchDealsRequest} requestParameters Request parameters.
|
3195
|
-
|
3196
|
-
* @throws {RequiredError}
|
3197
|
-
* @memberof BetaApi
|
3198
|
-
*/
|
3199
|
-
searchDeals(requestParameters) {
|
3200
|
-
return (0, exports.BetaApiFp)(this.configuration).searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3201
|
-
}
|
3202
|
-
/**
|
3203
|
-
* Performs a search from your choice of item types and fields.
|
3204
|
-
* @summary Perform a search from multiple item types
|
3205
|
-
* @param {BetaApiSearchItemRequest} requestParameters Request parameters.
|
3206
|
-
|
3207
|
-
* @throws {RequiredError}
|
3208
|
-
* @memberof BetaApi
|
3209
|
-
*/
|
3210
|
-
searchItem(requestParameters) {
|
3211
|
-
return (0, exports.BetaApiFp)(this.configuration).searchItem(requestParameters.term, requestParameters.item_types, requestParameters.fields, requestParameters.search_for_related_items, requestParameters.exact_match, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3212
|
-
}
|
3213
|
-
/**
|
3214
|
-
* Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
|
3215
|
-
* @summary Perform a search using a specific field from an item type
|
3216
|
-
* @param {BetaApiSearchItemByFieldRequest} requestParameters Request parameters.
|
3217
|
-
|
3218
|
-
* @throws {RequiredError}
|
3219
|
-
* @memberof BetaApi
|
3220
|
-
*/
|
3221
|
-
searchItemByField(requestParameters) {
|
3222
|
-
return (0, exports.BetaApiFp)(this.configuration).searchItemByField(requestParameters.term, requestParameters.entity_type, requestParameters.field, requestParameters.match, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3223
|
-
}
|
3224
|
-
/**
|
3225
|
-
* 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.
|
3226
|
-
* @summary Search leads
|
3227
|
-
* @param {BetaApiSearchLeadsRequest} requestParameters Request parameters.
|
3228
|
-
|
3229
|
-
* @throws {RequiredError}
|
3230
|
-
* @memberof BetaApi
|
3231
|
-
*/
|
3232
|
-
searchLeads(requestParameters) {
|
3233
|
-
return (0, exports.BetaApiFp)(this.configuration).searchLeads(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3234
|
-
}
|
3235
|
-
/**
|
3236
|
-
* Searches all organizations by name, address, 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.
|
3237
|
-
* @summary Search organizations
|
3238
|
-
* @param {BetaApiSearchOrganizationRequest} requestParameters Request parameters.
|
3239
|
-
|
3240
|
-
* @throws {RequiredError}
|
3241
|
-
* @memberof BetaApi
|
3242
|
-
*/
|
3243
|
-
searchOrganization(requestParameters) {
|
3244
|
-
return (0, exports.BetaApiFp)(this.configuration).searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3245
|
-
}
|
3246
|
-
/**
|
3247
|
-
* Searches all persons by name, email, phone, 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 persons can be filtered by organization ID.
|
3248
|
-
* @summary Search persons
|
3249
|
-
* @param {BetaApiSearchPersonsRequest} requestParameters Request parameters.
|
3250
|
-
|
3251
|
-
* @throws {RequiredError}
|
3252
|
-
* @memberof BetaApi
|
3253
|
-
*/
|
3254
|
-
searchPersons(requestParameters) {
|
3255
|
-
return (0, exports.BetaApiFp)(this.configuration).searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
3256
|
-
}
|
3257
|
-
/**
|
3258
|
-
* Updates the properties of an activity.
|
3259
|
-
* @summary Update an activity
|
3260
|
-
* @param {BetaApiUpdateActivityRequest} requestParameters Request parameters.
|
3261
|
-
|
3262
|
-
* @throws {RequiredError}
|
3263
|
-
* @memberof BetaApi
|
3264
|
-
*/
|
3265
|
-
updateActivity(requestParameters) {
|
3266
|
-
return (0, exports.BetaApiFp)(this.configuration).updateActivity(requestParameters.id, requestParameters.AddActivityRequest).then((request) => request(this.axios, this.basePath));
|
3267
|
-
}
|
3268
|
-
/**
|
3269
|
-
* Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
|
3270
|
-
* @summary Update a discount added to a deal
|
3271
|
-
* @param {BetaApiUpdateAdditionalDiscountRequest} requestParameters Request parameters.
|
3272
|
-
|
3273
|
-
* @throws {RequiredError}
|
3274
|
-
* @memberof BetaApi
|
3275
|
-
*/
|
3276
|
-
updateAdditionalDiscount(requestParameters) {
|
3277
|
-
return (0, exports.BetaApiFp)(this.configuration).updateAdditionalDiscount(requestParameters.id, requestParameters.discount_id, requestParameters.UpdateAdditionalDiscountRequestBody).then((request) => request(this.axios, this.basePath));
|
3278
|
-
}
|
3279
|
-
/**
|
3280
|
-
* Updates the properties of a deal.
|
3281
|
-
* @summary Update a deal
|
3282
|
-
* @param {BetaApiUpdateDealRequest} requestParameters Request parameters.
|
3283
|
-
|
3284
|
-
* @throws {RequiredError}
|
3285
|
-
* @memberof BetaApi
|
3286
|
-
*/
|
3287
|
-
updateDeal(requestParameters) {
|
3288
|
-
return (0, exports.BetaApiFp)(this.configuration).updateDeal(requestParameters.id, requestParameters.UpdateDealRequest).then((request) => request(this.axios, this.basePath));
|
3289
|
-
}
|
3290
|
-
/**
|
3291
|
-
* Updates the details of the product that has been attached to a deal.
|
3292
|
-
* @summary Update the product attached to a deal
|
3293
|
-
* @param {BetaApiUpdateDealProductRequest} requestParameters Request parameters.
|
3294
|
-
|
3295
|
-
* @throws {RequiredError}
|
3296
|
-
* @memberof BetaApi
|
3297
|
-
*/
|
3298
|
-
updateDealProduct(requestParameters) {
|
3299
|
-
return (0, exports.BetaApiFp)(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest).then((request) => request(this.axios, this.basePath));
|
3300
|
-
}
|
3301
372
|
/**
|
3302
373
|
* Edits an installment added to a deal. Only available in Advanced and above plans.
|
3303
374
|
* @summary Update an installment added to a deal
|
@@ -3309,27 +380,5 @@ class BetaApi extends base_1.BaseAPI {
|
|
3309
380
|
updateInstallment(requestParameters) {
|
3310
381
|
return (0, exports.BetaApiFp)(this.configuration).updateInstallment(requestParameters.id, requestParameters.installment_id, requestParameters.UpdateInstallmentRequestBody).then((request) => request(this.axios, this.basePath));
|
3311
382
|
}
|
3312
|
-
/**
|
3313
|
-
* Updates the properties of a organization.
|
3314
|
-
* @summary Update a organization
|
3315
|
-
* @param {BetaApiUpdateOrganizationRequest} requestParameters Request parameters.
|
3316
|
-
|
3317
|
-
* @throws {RequiredError}
|
3318
|
-
* @memberof BetaApi
|
3319
|
-
*/
|
3320
|
-
updateOrganization(requestParameters) {
|
3321
|
-
return (0, exports.BetaApiFp)(this.configuration).updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest).then((request) => request(this.axios, this.basePath));
|
3322
|
-
}
|
3323
|
-
/**
|
3324
|
-
* Updates the properties of a person.
|
3325
|
-
* @summary Update a person
|
3326
|
-
* @param {BetaApiUpdatePersonRequest} requestParameters Request parameters.
|
3327
|
-
|
3328
|
-
* @throws {RequiredError}
|
3329
|
-
* @memberof BetaApi
|
3330
|
-
*/
|
3331
|
-
updatePerson(requestParameters) {
|
3332
|
-
return (0, exports.BetaApiFp)(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest).then((request) => request(this.axios, this.basePath));
|
3333
|
-
}
|
3334
383
|
}
|
3335
384
|
exports.BetaApi = BetaApi;
|