pipedrive 22.3.1-rc.2 → 22.3.1-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +6 -4
- package/api/activities-api.ts +1 -24
- package/api/activity-fields-api.ts +1 -24
- package/api/activity-types-api.ts +1 -21
- package/api/billing-api.ts +1 -24
- package/api/call-logs-api.ts +1 -24
- package/api/channels-api.ts +1 -24
- package/api/currencies-api.ts +1 -24
- package/api/deal-fields-api.ts +1 -24
- package/api/deals-api.ts +1 -24
- package/api/files-api.ts +1 -24
- package/api/filters-api.ts +1 -24
- package/api/goals-api.ts +1 -24
- package/api/item-search-api.ts +1 -24
- package/api/lead-labels-api.ts +1 -21
- package/api/lead-sources-api.ts +1 -24
- package/api/leads-api.ts +1 -24
- package/api/legacy-teams-api.ts +1 -24
- package/api/mailbox-api.ts +1 -24
- package/api/note-fields-api.ts +1 -24
- package/api/notes-api.ts +1 -21
- package/api/organization-fields-api.ts +1 -24
- package/api/organization-relationships-api.ts +1 -24
- package/api/organizations-api.ts +1 -24
- package/api/permission-sets-api.ts +1 -24
- package/api/person-fields-api.ts +1 -21
- package/api/persons-api.ts +1 -24
- package/api/pipelines-api.ts +1 -24
- package/api/product-fields-api.ts +1 -24
- package/api/products-api.ts +1 -24
- package/api/project-templates-api.ts +1 -24
- package/api/projects-api.ts +1 -24
- package/api/recents-api.ts +1 -24
- package/api/roles-api.ts +1 -24
- package/api/stages-api.ts +1 -24
- package/api/subscriptions-api.ts +1 -24
- package/api/tasks-api.ts +1 -24
- package/api/user-connections-api.ts +1 -24
- package/api/user-settings-api.ts +1 -24
- package/api/users-api.ts +1 -24
- package/api/webhooks-api.ts +1 -21
- package/base.ts +23 -0
- package/common.ts +0 -1
- package/configuration.ts +3 -1
- package/dist/api/activities-api.js +7 -30
- package/dist/api/activity-fields-api.js +1 -24
- package/dist/api/activity-types-api.js +0 -20
- package/dist/api/billing-api.js +1 -24
- package/dist/api/call-logs-api.js +5 -28
- package/dist/api/channels-api.js +4 -27
- package/dist/api/currencies-api.js +1 -24
- package/dist/api/deal-fields-api.js +6 -29
- package/dist/api/deals-api.js +28 -51
- package/dist/api/files-api.js +11 -34
- package/dist/api/filters-api.js +7 -30
- package/dist/api/goals-api.js +5 -28
- package/dist/api/item-search-api.js +2 -25
- package/dist/api/lead-labels-api.js +0 -20
- package/dist/api/lead-sources-api.js +1 -24
- package/dist/api/leads-api.js +7 -30
- package/dist/api/legacy-teams-api.js +8 -31
- package/dist/api/mailbox-api.js +7 -30
- package/dist/api/note-fields-api.js +1 -24
- package/dist/api/notes-api.js +0 -20
- package/dist/api/organization-fields-api.js +6 -29
- package/dist/api/organization-relationships-api.js +5 -28
- package/dist/api/organizations-api.js +19 -42
- package/dist/api/permission-sets-api.js +3 -26
- package/dist/api/person-fields-api.js +0 -20
- package/dist/api/persons-api.js +21 -44
- package/dist/api/pipelines-api.js +8 -31
- package/dist/api/product-fields-api.js +6 -29
- package/dist/api/products-api.js +12 -35
- package/dist/api/project-templates-api.js +4 -27
- package/dist/api/projects-api.js +14 -37
- package/dist/api/recents-api.js +1 -24
- package/dist/api/roles-api.js +12 -35
- package/dist/api/stages-api.js +7 -30
- package/dist/api/subscriptions-api.js +9 -32
- package/dist/api/tasks-api.js +5 -28
- package/dist/api/user-connections-api.js +1 -24
- package/dist/api/user-settings-api.js +1 -24
- package/dist/api/users-api.js +10 -33
- package/dist/api/webhooks-api.js +0 -20
- package/dist/base.js +20 -0
- package/dist/common.d.ts +0 -1
- package/dist/common.js +1 -2
- package/dist/configuration.d.ts +1 -0
- package/dist/configuration.js +1 -1
- package/dist/esm/api/activities-api.js +0 -23
- package/dist/esm/api/activity-fields-api.js +0 -23
- package/dist/esm/api/activity-types-api.js +0 -20
- package/dist/esm/api/billing-api.js +0 -23
- package/dist/esm/api/call-logs-api.js +0 -23
- package/dist/esm/api/channels-api.js +0 -23
- package/dist/esm/api/currencies-api.js +0 -23
- package/dist/esm/api/deal-fields-api.js +0 -23
- package/dist/esm/api/deals-api.js +0 -23
- package/dist/esm/api/files-api.js +0 -23
- package/dist/esm/api/filters-api.js +0 -23
- package/dist/esm/api/goals-api.js +0 -23
- package/dist/esm/api/item-search-api.js +0 -23
- package/dist/esm/api/lead-labels-api.js +0 -20
- package/dist/esm/api/lead-sources-api.js +0 -23
- package/dist/esm/api/leads-api.js +0 -23
- package/dist/esm/api/legacy-teams-api.js +0 -23
- package/dist/esm/api/mailbox-api.js +0 -23
- package/dist/esm/api/note-fields-api.js +0 -23
- package/dist/esm/api/notes-api.js +0 -20
- package/dist/esm/api/organization-fields-api.js +0 -23
- package/dist/esm/api/organization-relationships-api.js +0 -23
- package/dist/esm/api/organizations-api.js +0 -23
- package/dist/esm/api/permission-sets-api.js +0 -23
- package/dist/esm/api/person-fields-api.js +0 -20
- package/dist/esm/api/persons-api.js +0 -23
- package/dist/esm/api/pipelines-api.js +0 -23
- package/dist/esm/api/product-fields-api.js +0 -23
- package/dist/esm/api/products-api.js +0 -23
- package/dist/esm/api/project-templates-api.js +0 -23
- package/dist/esm/api/projects-api.js +0 -23
- package/dist/esm/api/recents-api.js +0 -23
- package/dist/esm/api/roles-api.js +0 -23
- package/dist/esm/api/stages-api.js +0 -23
- package/dist/esm/api/subscriptions-api.js +0 -23
- package/dist/esm/api/tasks-api.js +0 -23
- package/dist/esm/api/user-connections-api.js +0 -23
- package/dist/esm/api/user-settings-api.js +0 -23
- package/dist/esm/api/users-api.js +0 -23
- package/dist/esm/api/webhooks-api.js +0 -20
- package/dist/esm/base.js +20 -0
- package/dist/esm/common.d.ts +0 -1
- package/dist/esm/common.js +0 -1
- package/dist/esm/configuration.d.ts +1 -0
- package/dist/esm/configuration.js +1 -1
- package/docs/CallLogObject.md +2 -1
- package/docs/DealsApi.md +14 -8
- package/docs/FiltersApi.md +4 -1
- package/docs/GetDeal.md +1 -1
- package/docs/GetDealRelatedObjects.md +11 -0
- package/docs/GetDealsRelatedObjects.md +3 -3
- package/docs/ItemSearchApi.md +2 -2
- package/docs/LeadsApi.md +4 -1
- package/docs/MailboxApi.md +2 -2
- package/docs/MeetingsApi.md +118 -0
- package/docs/OrganizationsApi.md +10 -4
- package/docs/PersonsApi.md +14 -5
- package/docs/PostDealParticipants.md +1 -1
- package/docs/PostDealParticipantsRelatedObjects.md +10 -0
- package/docs/ProductsApi.md +2 -2
- package/docs/RecentsApi.md +2 -2
- package/docs/ResponseCallLogObject.md +2 -1
- package/docs/UserProviderLinkCreateRequest.md +12 -0
- package/docs/UserProviderLinkErrorResponse.md +10 -0
- package/docs/UserProviderLinkSuccessResponse.md +10 -0
- package/docs/UserProviderLinkSuccessResponseData.md +9 -0
- package/docs/UsersApi.md +2 -2
- package/package.json +3 -3
- package/src/api/MeetingsApi.js +181 -0
- package/src/model/GetDealRelatedObjects.js +101 -0
- package/src/model/PostDealParticipantsRelatedObjects.js +90 -0
- package/src/model/UserProviderLinkCreateRequest.js +120 -0
- package/src/model/UserProviderLinkErrorResponse.js +90 -0
- package/src/model/UserProviderLinkSuccessResponse.js +90 -0
- package/src/model/UserProviderLinkSuccessResponseData.js +79 -0
- package/test/functional/access-token.test.js +5 -5
- package/test/functional/authorisation.test.js +5 -8
package/dist/api/billing-api.js
CHANGED
@@ -24,9 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
25
|
exports.BillingApi = exports.BillingApiFactory = exports.BillingApiFp = exports.BillingApiAxiosParamCreator = void 0;
|
26
26
|
const axios_1 = require("axios");
|
27
|
-
// URLSearchParams not necessarily used
|
28
|
-
// @ts-ignore
|
29
|
-
const url_1 = require("url");
|
30
27
|
// Some imports not used depending on template conditions
|
31
28
|
// @ts-ignore
|
32
29
|
const common_1 = require("../common");
|
@@ -47,7 +44,7 @@ const BillingApiAxiosParamCreator = function (configuration) {
|
|
47
44
|
getCompanyAddons: () => __awaiter(this, void 0, void 0, function* () {
|
48
45
|
const localVarPath = `/billing/subscriptions/addons`;
|
49
46
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
50
|
-
const localVarUrlObj = new
|
47
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
51
48
|
let baseOptions;
|
52
49
|
if (configuration) {
|
53
50
|
baseOptions = configuration.baseOptions;
|
@@ -76,26 +73,6 @@ exports.BillingApiAxiosParamCreator = BillingApiAxiosParamCreator;
|
|
76
73
|
* @export
|
77
74
|
*/
|
78
75
|
const BillingApiFp = function (configuration) {
|
79
|
-
/**
|
80
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
81
|
-
* */
|
82
|
-
axios_1.default.interceptors.request.use(function (config) {
|
83
|
-
const version = require("../../package.json").version;
|
84
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
85
|
-
return config;
|
86
|
-
});
|
87
|
-
/**
|
88
|
-
* Axios response interceptor to modify response structure
|
89
|
-
*/
|
90
|
-
axios_1.default.interceptors.response.use(function (response) {
|
91
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
92
|
-
}, function (error) {
|
93
|
-
var _a;
|
94
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
95
|
-
return Promise.reject(error.response.data);
|
96
|
-
}
|
97
|
-
return Promise.reject(error);
|
98
|
-
});
|
99
76
|
const localVarAxiosParamCreator = (0, exports.BillingApiAxiosParamCreator)(configuration);
|
100
77
|
return {
|
101
78
|
/**
|
@@ -24,9 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
25
|
exports.CallLogsApi = exports.CallLogsApiFactory = exports.CallLogsApiFp = exports.CallLogsApiAxiosParamCreator = void 0;
|
26
26
|
const axios_1 = require("axios");
|
27
|
-
// URLSearchParams not necessarily used
|
28
|
-
// @ts-ignore
|
29
|
-
const url_1 = require("url");
|
30
27
|
// Some imports not used depending on template conditions
|
31
28
|
// @ts-ignore
|
32
29
|
const common_1 = require("../common");
|
@@ -48,7 +45,7 @@ const CallLogsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addCallLog: (AddCallLogRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/callLogs`;
|
50
47
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
51
|
-
const localVarUrlObj = new
|
48
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
52
49
|
let baseOptions;
|
53
50
|
if (configuration) {
|
54
51
|
baseOptions = configuration.baseOptions;
|
@@ -87,7 +84,7 @@ const CallLogsApiAxiosParamCreator = function (configuration) {
|
|
87
84
|
const localVarPath = `/callLogs/{id}/recordings`
|
88
85
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
89
86
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
90
|
-
const localVarUrlObj = new
|
87
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
91
88
|
let baseOptions;
|
92
89
|
if (configuration) {
|
93
90
|
baseOptions = configuration.baseOptions;
|
@@ -127,7 +124,7 @@ const CallLogsApiAxiosParamCreator = function (configuration) {
|
|
127
124
|
const localVarPath = `/callLogs/{id}`
|
128
125
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
129
126
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
130
|
-
const localVarUrlObj = new
|
127
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
131
128
|
let baseOptions;
|
132
129
|
if (configuration) {
|
133
130
|
baseOptions = configuration.baseOptions;
|
@@ -161,7 +158,7 @@ const CallLogsApiAxiosParamCreator = function (configuration) {
|
|
161
158
|
const localVarPath = `/callLogs/{id}`
|
162
159
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
163
160
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
164
|
-
const localVarUrlObj = new
|
161
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
165
162
|
let baseOptions;
|
166
163
|
if (configuration) {
|
167
164
|
baseOptions = configuration.baseOptions;
|
@@ -193,7 +190,7 @@ const CallLogsApiAxiosParamCreator = function (configuration) {
|
|
193
190
|
getUserCallLogs: (start, limit) => __awaiter(this, void 0, void 0, function* () {
|
194
191
|
const localVarPath = `/callLogs`;
|
195
192
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
196
|
-
const localVarUrlObj = new
|
193
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
197
194
|
let baseOptions;
|
198
195
|
if (configuration) {
|
199
196
|
baseOptions = configuration.baseOptions;
|
@@ -228,26 +225,6 @@ exports.CallLogsApiAxiosParamCreator = CallLogsApiAxiosParamCreator;
|
|
228
225
|
* @export
|
229
226
|
*/
|
230
227
|
const CallLogsApiFp = function (configuration) {
|
231
|
-
/**
|
232
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
233
|
-
* */
|
234
|
-
axios_1.default.interceptors.request.use(function (config) {
|
235
|
-
const version = require("../../package.json").version;
|
236
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
237
|
-
return config;
|
238
|
-
});
|
239
|
-
/**
|
240
|
-
* Axios response interceptor to modify response structure
|
241
|
-
*/
|
242
|
-
axios_1.default.interceptors.response.use(function (response) {
|
243
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
244
|
-
}, function (error) {
|
245
|
-
var _a;
|
246
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
247
|
-
return Promise.reject(error.response.data);
|
248
|
-
}
|
249
|
-
return Promise.reject(error);
|
250
|
-
});
|
251
228
|
const localVarAxiosParamCreator = (0, exports.CallLogsApiAxiosParamCreator)(configuration);
|
252
229
|
return {
|
253
230
|
/**
|
package/dist/api/channels-api.js
CHANGED
@@ -24,9 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
25
|
exports.ChannelsApi = exports.ChannelsApiFactory = exports.ChannelsApiFp = exports.ChannelsApiAxiosParamCreator = void 0;
|
26
26
|
const axios_1 = require("axios");
|
27
|
-
// URLSearchParams not necessarily used
|
28
|
-
// @ts-ignore
|
29
|
-
const url_1 = require("url");
|
30
27
|
// Some imports not used depending on template conditions
|
31
28
|
// @ts-ignore
|
32
29
|
const common_1 = require("../common");
|
@@ -48,7 +45,7 @@ const ChannelsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addChannel: (AddChannelRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/channels`;
|
50
47
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
51
|
-
const localVarUrlObj = new
|
48
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
52
49
|
let baseOptions;
|
53
50
|
if (configuration) {
|
54
51
|
baseOptions = configuration.baseOptions;
|
@@ -84,7 +81,7 @@ const ChannelsApiAxiosParamCreator = function (configuration) {
|
|
84
81
|
const localVarPath = `/channels/{id}`
|
85
82
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
86
83
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
87
|
-
const localVarUrlObj = new
|
84
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
88
85
|
let baseOptions;
|
89
86
|
if (configuration) {
|
90
87
|
baseOptions = configuration.baseOptions;
|
@@ -122,7 +119,7 @@ const ChannelsApiAxiosParamCreator = function (configuration) {
|
|
122
119
|
.replace(`{${"channel-id"}}`, encodeURIComponent(String(channel_id)))
|
123
120
|
.replace(`{${"conversation-id"}}`, encodeURIComponent(String(conversation_id)));
|
124
121
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
125
|
-
const localVarUrlObj = new
|
122
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
126
123
|
let baseOptions;
|
127
124
|
if (configuration) {
|
128
125
|
baseOptions = configuration.baseOptions;
|
@@ -153,7 +150,7 @@ const ChannelsApiAxiosParamCreator = function (configuration) {
|
|
153
150
|
receiveMessage: (ReceiveMessageRequest) => __awaiter(this, void 0, void 0, function* () {
|
154
151
|
const localVarPath = `/channels/messages/receive`;
|
155
152
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
156
|
-
const localVarUrlObj = new
|
153
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
157
154
|
let baseOptions;
|
158
155
|
if (configuration) {
|
159
156
|
baseOptions = configuration.baseOptions;
|
@@ -184,26 +181,6 @@ exports.ChannelsApiAxiosParamCreator = ChannelsApiAxiosParamCreator;
|
|
184
181
|
* @export
|
185
182
|
*/
|
186
183
|
const ChannelsApiFp = function (configuration) {
|
187
|
-
/**
|
188
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
189
|
-
* */
|
190
|
-
axios_1.default.interceptors.request.use(function (config) {
|
191
|
-
const version = require("../../package.json").version;
|
192
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
193
|
-
return config;
|
194
|
-
});
|
195
|
-
/**
|
196
|
-
* Axios response interceptor to modify response structure
|
197
|
-
*/
|
198
|
-
axios_1.default.interceptors.response.use(function (response) {
|
199
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
200
|
-
}, function (error) {
|
201
|
-
var _a;
|
202
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
203
|
-
return Promise.reject(error.response.data);
|
204
|
-
}
|
205
|
-
return Promise.reject(error);
|
206
|
-
});
|
207
184
|
const localVarAxiosParamCreator = (0, exports.ChannelsApiAxiosParamCreator)(configuration);
|
208
185
|
return {
|
209
186
|
/**
|
@@ -24,9 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
25
|
exports.CurrenciesApi = exports.CurrenciesApiFactory = exports.CurrenciesApiFp = exports.CurrenciesApiAxiosParamCreator = void 0;
|
26
26
|
const axios_1 = require("axios");
|
27
|
-
// URLSearchParams not necessarily used
|
28
|
-
// @ts-ignore
|
29
|
-
const url_1 = require("url");
|
30
27
|
// Some imports not used depending on template conditions
|
31
28
|
// @ts-ignore
|
32
29
|
const common_1 = require("../common");
|
@@ -48,7 +45,7 @@ const CurrenciesApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
getCurrencies: (term) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/currencies`;
|
50
47
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
51
|
-
const localVarUrlObj = new
|
48
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
52
49
|
let baseOptions;
|
53
50
|
if (configuration) {
|
54
51
|
baseOptions = configuration.baseOptions;
|
@@ -80,26 +77,6 @@ exports.CurrenciesApiAxiosParamCreator = CurrenciesApiAxiosParamCreator;
|
|
80
77
|
* @export
|
81
78
|
*/
|
82
79
|
const CurrenciesApiFp = function (configuration) {
|
83
|
-
/**
|
84
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
85
|
-
* */
|
86
|
-
axios_1.default.interceptors.request.use(function (config) {
|
87
|
-
const version = require("../../package.json").version;
|
88
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
89
|
-
return config;
|
90
|
-
});
|
91
|
-
/**
|
92
|
-
* Axios response interceptor to modify response structure
|
93
|
-
*/
|
94
|
-
axios_1.default.interceptors.response.use(function (response) {
|
95
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
96
|
-
}, function (error) {
|
97
|
-
var _a;
|
98
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
99
|
-
return Promise.reject(error.response.data);
|
100
|
-
}
|
101
|
-
return Promise.reject(error);
|
102
|
-
});
|
103
80
|
const localVarAxiosParamCreator = (0, exports.CurrenciesApiAxiosParamCreator)(configuration);
|
104
81
|
return {
|
105
82
|
/**
|
@@ -24,9 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
25
|
exports.DealFieldsApi = exports.DealFieldsApiFactory = exports.DealFieldsApiFp = exports.DealFieldsApiAxiosParamCreator = void 0;
|
26
26
|
const axios_1 = require("axios");
|
27
|
-
// URLSearchParams not necessarily used
|
28
|
-
// @ts-ignore
|
29
|
-
const url_1 = require("url");
|
30
27
|
// Some imports not used depending on template conditions
|
31
28
|
// @ts-ignore
|
32
29
|
const common_1 = require("../common");
|
@@ -48,7 +45,7 @@ const DealFieldsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addDealField: (CreateFieldRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/dealFields`;
|
50
47
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
51
|
-
const localVarUrlObj = new
|
48
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
52
49
|
let baseOptions;
|
53
50
|
if (configuration) {
|
54
51
|
baseOptions = configuration.baseOptions;
|
@@ -84,7 +81,7 @@ const DealFieldsApiAxiosParamCreator = function (configuration) {
|
|
84
81
|
const localVarPath = `/dealFields/{id}`
|
85
82
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
86
83
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
87
|
-
const localVarUrlObj = new
|
84
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
88
85
|
let baseOptions;
|
89
86
|
if (configuration) {
|
90
87
|
baseOptions = configuration.baseOptions;
|
@@ -117,7 +114,7 @@ const DealFieldsApiAxiosParamCreator = function (configuration) {
|
|
117
114
|
(0, common_1.assertParamExists)('deleteDealFields', 'ids', ids);
|
118
115
|
const localVarPath = `/dealFields`;
|
119
116
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
120
|
-
const localVarUrlObj = new
|
117
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
121
118
|
let baseOptions;
|
122
119
|
if (configuration) {
|
123
120
|
baseOptions = configuration.baseOptions;
|
@@ -154,7 +151,7 @@ const DealFieldsApiAxiosParamCreator = function (configuration) {
|
|
154
151
|
const localVarPath = `/dealFields/{id}`
|
155
152
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
156
153
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
157
|
-
const localVarUrlObj = new
|
154
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
158
155
|
let baseOptions;
|
159
156
|
if (configuration) {
|
160
157
|
baseOptions = configuration.baseOptions;
|
@@ -186,7 +183,7 @@ const DealFieldsApiAxiosParamCreator = function (configuration) {
|
|
186
183
|
getDealFields: (start, limit) => __awaiter(this, void 0, void 0, function* () {
|
187
184
|
const localVarPath = `/dealFields`;
|
188
185
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
189
|
-
const localVarUrlObj = new
|
186
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
190
187
|
let baseOptions;
|
191
188
|
if (configuration) {
|
192
189
|
baseOptions = configuration.baseOptions;
|
@@ -227,7 +224,7 @@ const DealFieldsApiAxiosParamCreator = function (configuration) {
|
|
227
224
|
const localVarPath = `/dealFields/{id}`
|
228
225
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
229
226
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
230
|
-
const localVarUrlObj = new
|
227
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
231
228
|
let baseOptions;
|
232
229
|
if (configuration) {
|
233
230
|
baseOptions = configuration.baseOptions;
|
@@ -258,26 +255,6 @@ exports.DealFieldsApiAxiosParamCreator = DealFieldsApiAxiosParamCreator;
|
|
258
255
|
* @export
|
259
256
|
*/
|
260
257
|
const DealFieldsApiFp = function (configuration) {
|
261
|
-
/**
|
262
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
263
|
-
* */
|
264
|
-
axios_1.default.interceptors.request.use(function (config) {
|
265
|
-
const version = require("../../package.json").version;
|
266
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
267
|
-
return config;
|
268
|
-
});
|
269
|
-
/**
|
270
|
-
* Axios response interceptor to modify response structure
|
271
|
-
*/
|
272
|
-
axios_1.default.interceptors.response.use(function (response) {
|
273
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
274
|
-
}, function (error) {
|
275
|
-
var _a;
|
276
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
277
|
-
return Promise.reject(error.response.data);
|
278
|
-
}
|
279
|
-
return Promise.reject(error);
|
280
|
-
});
|
281
258
|
const localVarAxiosParamCreator = (0, exports.DealFieldsApiAxiosParamCreator)(configuration);
|
282
259
|
return {
|
283
260
|
/**
|
package/dist/api/deals-api.js
CHANGED
@@ -24,9 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
25
|
exports.DealsApi = exports.DealsApiFactory = exports.DealsApiFp = exports.DealsApiAxiosParamCreator = void 0;
|
26
26
|
const axios_1 = require("axios");
|
27
|
-
// URLSearchParams not necessarily used
|
28
|
-
// @ts-ignore
|
29
|
-
const url_1 = require("url");
|
30
27
|
// Some imports not used depending on template conditions
|
31
28
|
// @ts-ignore
|
32
29
|
const common_1 = require("../common");
|
@@ -48,7 +45,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addDeal: (AddDealRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/deals`;
|
50
47
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
51
|
-
const localVarUrlObj = new
|
48
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
52
49
|
let baseOptions;
|
53
50
|
if (configuration) {
|
54
51
|
baseOptions = configuration.baseOptions;
|
@@ -85,7 +82,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
85
82
|
const localVarPath = `/deals/{id}/followers`
|
86
83
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
87
84
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
88
|
-
const localVarUrlObj = new
|
85
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
89
86
|
let baseOptions;
|
90
87
|
if (configuration) {
|
91
88
|
baseOptions = configuration.baseOptions;
|
@@ -122,7 +119,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
122
119
|
const localVarPath = `/deals/{id}/participants`
|
123
120
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
124
121
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
125
|
-
const localVarUrlObj = new
|
122
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
126
123
|
let baseOptions;
|
127
124
|
if (configuration) {
|
128
125
|
baseOptions = configuration.baseOptions;
|
@@ -159,7 +156,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
159
156
|
const localVarPath = `/deals/{id}/products`
|
160
157
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
161
158
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
162
|
-
const localVarUrlObj = new
|
159
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
163
160
|
let baseOptions;
|
164
161
|
if (configuration) {
|
165
162
|
baseOptions = configuration.baseOptions;
|
@@ -195,7 +192,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
195
192
|
const localVarPath = `/deals/{id}`
|
196
193
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
197
194
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
198
|
-
const localVarUrlObj = new
|
195
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
199
196
|
let baseOptions;
|
200
197
|
if (configuration) {
|
201
198
|
baseOptions = configuration.baseOptions;
|
@@ -233,7 +230,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
233
230
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
234
231
|
.replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_id)));
|
235
232
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
236
|
-
const localVarUrlObj = new
|
233
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
237
234
|
let baseOptions;
|
238
235
|
if (configuration) {
|
239
236
|
baseOptions = configuration.baseOptions;
|
@@ -271,7 +268,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
271
268
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
272
269
|
.replace(`{${"deal_participant_id"}}`, encodeURIComponent(String(deal_participant_id)));
|
273
270
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
274
|
-
const localVarUrlObj = new
|
271
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
275
272
|
let baseOptions;
|
276
273
|
if (configuration) {
|
277
274
|
baseOptions = configuration.baseOptions;
|
@@ -309,7 +306,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
309
306
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
310
307
|
.replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_id)));
|
311
308
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
312
|
-
const localVarUrlObj = new
|
309
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
313
310
|
let baseOptions;
|
314
311
|
if (configuration) {
|
315
312
|
baseOptions = configuration.baseOptions;
|
@@ -342,7 +339,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
342
339
|
(0, common_1.assertParamExists)('deleteDeals', 'ids', ids);
|
343
340
|
const localVarPath = `/deals`;
|
344
341
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
345
|
-
const localVarUrlObj = new
|
342
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
346
343
|
let baseOptions;
|
347
344
|
if (configuration) {
|
348
345
|
baseOptions = configuration.baseOptions;
|
@@ -379,7 +376,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
379
376
|
const localVarPath = `/deals/{id}/duplicate`
|
380
377
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
381
378
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
382
|
-
const localVarUrlObj = new
|
379
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
383
380
|
let baseOptions;
|
384
381
|
if (configuration) {
|
385
382
|
baseOptions = configuration.baseOptions;
|
@@ -413,7 +410,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
413
410
|
const localVarPath = `/deals/{id}`
|
414
411
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
415
412
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
416
|
-
const localVarUrlObj = new
|
413
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
417
414
|
let baseOptions;
|
418
415
|
if (configuration) {
|
419
416
|
baseOptions = configuration.baseOptions;
|
@@ -451,7 +448,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
451
448
|
const localVarPath = `/deals/{id}/activities`
|
452
449
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
453
450
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
454
|
-
const localVarUrlObj = new
|
451
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
455
452
|
let baseOptions;
|
456
453
|
if (configuration) {
|
457
454
|
baseOptions = configuration.baseOptions;
|
@@ -500,7 +497,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
500
497
|
const localVarPath = `/deals/{id}/files`
|
501
498
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
502
499
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
503
|
-
const localVarUrlObj = new
|
500
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
504
501
|
let baseOptions;
|
505
502
|
if (configuration) {
|
506
503
|
baseOptions = configuration.baseOptions;
|
@@ -543,7 +540,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
543
540
|
const localVarPath = `/deals/{id}/followers`
|
544
541
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
545
542
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
546
|
-
const localVarUrlObj = new
|
543
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
547
544
|
let baseOptions;
|
548
545
|
if (configuration) {
|
549
546
|
baseOptions = configuration.baseOptions;
|
@@ -579,7 +576,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
579
576
|
const localVarPath = `/deals/{id}/mailMessages`
|
580
577
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
581
578
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
582
|
-
const localVarUrlObj = new
|
579
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
583
580
|
let baseOptions;
|
584
581
|
if (configuration) {
|
585
582
|
baseOptions = configuration.baseOptions;
|
@@ -621,7 +618,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
621
618
|
const localVarPath = `/deals/{id}/participants`
|
622
619
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
623
620
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
624
|
-
const localVarUrlObj = new
|
621
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
625
622
|
let baseOptions;
|
626
623
|
if (configuration) {
|
627
624
|
baseOptions = configuration.baseOptions;
|
@@ -663,7 +660,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
663
660
|
const localVarPath = `/deals/{id}/persons`
|
664
661
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
665
662
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
666
|
-
const localVarUrlObj = new
|
663
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
667
664
|
let baseOptions;
|
668
665
|
if (configuration) {
|
669
666
|
baseOptions = configuration.baseOptions;
|
@@ -706,7 +703,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
706
703
|
const localVarPath = `/deals/{id}/products`
|
707
704
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
708
705
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
709
|
-
const localVarUrlObj = new
|
706
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
710
707
|
let baseOptions;
|
711
708
|
if (configuration) {
|
712
709
|
baseOptions = configuration.baseOptions;
|
@@ -753,7 +750,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
753
750
|
const localVarPath = `/deals/{id}/flow`
|
754
751
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
755
752
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
756
|
-
const localVarUrlObj = new
|
753
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
757
754
|
let baseOptions;
|
758
755
|
if (configuration) {
|
759
756
|
baseOptions = configuration.baseOptions;
|
@@ -799,7 +796,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
799
796
|
const localVarPath = `/deals/{id}/permittedUsers`
|
800
797
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
801
798
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
802
|
-
const localVarUrlObj = new
|
799
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
803
800
|
let baseOptions;
|
804
801
|
if (configuration) {
|
805
802
|
baseOptions = configuration.baseOptions;
|
@@ -837,7 +834,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
837
834
|
getDeals: (user_id, filter_id, stage_id, status, start, limit, sort, owned_by_you) => __awaiter(this, void 0, void 0, function* () {
|
838
835
|
const localVarPath = `/deals`;
|
839
836
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
840
|
-
const localVarUrlObj = new
|
837
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
841
838
|
let baseOptions;
|
842
839
|
if (configuration) {
|
843
840
|
baseOptions = configuration.baseOptions;
|
@@ -898,7 +895,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
898
895
|
getDealsCollection: (cursor, limit, since, until, user_id, stage_id, status) => __awaiter(this, void 0, void 0, function* () {
|
899
896
|
const localVarPath = `/deals/collection`;
|
900
897
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
901
|
-
const localVarUrlObj = new
|
898
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
902
899
|
let baseOptions;
|
903
900
|
if (configuration) {
|
904
901
|
baseOptions = configuration.baseOptions;
|
@@ -953,7 +950,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
953
950
|
getDealsSummary: (status, filter_id, user_id, stage_id) => __awaiter(this, void 0, void 0, function* () {
|
954
951
|
const localVarPath = `/deals/summary`;
|
955
952
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
956
|
-
const localVarUrlObj = new
|
953
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
957
954
|
let baseOptions;
|
958
955
|
if (configuration) {
|
959
956
|
baseOptions = configuration.baseOptions;
|
@@ -1012,7 +1009,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
1012
1009
|
(0, common_1.assertParamExists)('getDealsTimeline', 'field_key', field_key);
|
1013
1010
|
const localVarPath = `/deals/timeline`;
|
1014
1011
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1015
|
-
const localVarUrlObj = new
|
1012
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1016
1013
|
let baseOptions;
|
1017
1014
|
if (configuration) {
|
1018
1015
|
baseOptions = configuration.baseOptions;
|
@@ -1076,7 +1073,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
1076
1073
|
const localVarPath = `/deals/{id}/merge`
|
1077
1074
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1078
1075
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1079
|
-
const localVarUrlObj = new
|
1076
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1080
1077
|
let baseOptions;
|
1081
1078
|
if (configuration) {
|
1082
1079
|
baseOptions = configuration.baseOptions;
|
@@ -1119,7 +1116,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
1119
1116
|
(0, common_1.assertParamExists)('searchDeals', 'term', term);
|
1120
1117
|
const localVarPath = `/deals/search`;
|
1121
1118
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1122
|
-
const localVarUrlObj = new
|
1119
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1123
1120
|
let baseOptions;
|
1124
1121
|
if (configuration) {
|
1125
1122
|
baseOptions = configuration.baseOptions;
|
@@ -1181,7 +1178,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
1181
1178
|
const localVarPath = `/deals/{id}`
|
1182
1179
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
1183
1180
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1184
|
-
const localVarUrlObj = new
|
1181
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1185
1182
|
let baseOptions;
|
1186
1183
|
if (configuration) {
|
1187
1184
|
baseOptions = configuration.baseOptions;
|
@@ -1222,7 +1219,7 @@ const DealsApiAxiosParamCreator = function (configuration) {
|
|
1222
1219
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
1223
1220
|
.replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_id)));
|
1224
1221
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
1225
|
-
const localVarUrlObj = new
|
1222
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
1226
1223
|
let baseOptions;
|
1227
1224
|
if (configuration) {
|
1228
1225
|
baseOptions = configuration.baseOptions;
|
@@ -1253,26 +1250,6 @@ exports.DealsApiAxiosParamCreator = DealsApiAxiosParamCreator;
|
|
1253
1250
|
* @export
|
1254
1251
|
*/
|
1255
1252
|
const DealsApiFp = function (configuration) {
|
1256
|
-
/**
|
1257
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
1258
|
-
* */
|
1259
|
-
axios_1.default.interceptors.request.use(function (config) {
|
1260
|
-
const version = require("../../package.json").version;
|
1261
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
1262
|
-
return config;
|
1263
|
-
});
|
1264
|
-
/**
|
1265
|
-
* Axios response interceptor to modify response structure
|
1266
|
-
*/
|
1267
|
-
axios_1.default.interceptors.response.use(function (response) {
|
1268
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
1269
|
-
}, function (error) {
|
1270
|
-
var _a;
|
1271
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
1272
|
-
return Promise.reject(error.response.data);
|
1273
|
-
}
|
1274
|
-
return Promise.reject(error);
|
1275
|
-
});
|
1276
1253
|
const localVarAxiosParamCreator = (0, exports.DealsApiAxiosParamCreator)(configuration);
|
1277
1254
|
return {
|
1278
1255
|
/**
|