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