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/persons-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.PersonsApi = exports.PersonsApiFactory = exports.PersonsApiFp = exports.PersonsApiAxiosParamCreator = 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 PersonsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addPerson: (AddPersonRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/persons`;
|
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 PersonsApiAxiosParamCreator = function (configuration) {
|
|
85
82
|
const localVarPath = `/persons/{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;
|
@@ -128,7 +125,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
128
125
|
const localVarPath = `/persons/{id}/picture`
|
129
126
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
130
127
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
131
|
-
const localVarUrlObj = new
|
128
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
132
129
|
let baseOptions;
|
133
130
|
if (configuration) {
|
134
131
|
baseOptions = configuration.baseOptions;
|
@@ -180,7 +177,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
180
177
|
const localVarPath = `/persons/{id}`
|
181
178
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
182
179
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
183
|
-
const localVarUrlObj = new
|
180
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
184
181
|
let baseOptions;
|
185
182
|
if (configuration) {
|
186
183
|
baseOptions = configuration.baseOptions;
|
@@ -218,7 +215,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
218
215
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
219
216
|
.replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_id)));
|
220
217
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
221
|
-
const localVarUrlObj = new
|
218
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
222
219
|
let baseOptions;
|
223
220
|
if (configuration) {
|
224
221
|
baseOptions = configuration.baseOptions;
|
@@ -252,7 +249,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
252
249
|
const localVarPath = `/persons/{id}/picture`
|
253
250
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
254
251
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
255
|
-
const localVarUrlObj = new
|
252
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
256
253
|
let baseOptions;
|
257
254
|
if (configuration) {
|
258
255
|
baseOptions = configuration.baseOptions;
|
@@ -285,7 +282,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
285
282
|
(0, common_1.assertParamExists)('deletePersons', 'ids', ids);
|
286
283
|
const localVarPath = `/persons`;
|
287
284
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
288
|
-
const localVarUrlObj = new
|
285
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
289
286
|
let baseOptions;
|
290
287
|
if (configuration) {
|
291
288
|
baseOptions = configuration.baseOptions;
|
@@ -322,7 +319,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
322
319
|
const localVarPath = `/persons/{id}`
|
323
320
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
324
321
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
325
|
-
const localVarUrlObj = new
|
322
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
326
323
|
let baseOptions;
|
327
324
|
if (configuration) {
|
328
325
|
baseOptions = configuration.baseOptions;
|
@@ -360,7 +357,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
360
357
|
const localVarPath = `/persons/{id}/activities`
|
361
358
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
362
359
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
363
|
-
const localVarUrlObj = new
|
360
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
364
361
|
let baseOptions;
|
365
362
|
if (configuration) {
|
366
363
|
baseOptions = configuration.baseOptions;
|
@@ -410,7 +407,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
410
407
|
const localVarPath = `/persons/{id}/deals`
|
411
408
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
412
409
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
413
|
-
const localVarUrlObj = new
|
410
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
414
411
|
let baseOptions;
|
415
412
|
if (configuration) {
|
416
413
|
baseOptions = configuration.baseOptions;
|
@@ -459,7 +456,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
459
456
|
const localVarPath = `/persons/{id}/files`
|
460
457
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
461
458
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
462
|
-
const localVarUrlObj = new
|
459
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
463
460
|
let baseOptions;
|
464
461
|
if (configuration) {
|
465
462
|
baseOptions = configuration.baseOptions;
|
@@ -502,7 +499,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
502
499
|
const localVarPath = `/persons/{id}/followers`
|
503
500
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
504
501
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
505
|
-
const localVarUrlObj = new
|
502
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
506
503
|
let baseOptions;
|
507
504
|
if (configuration) {
|
508
505
|
baseOptions = configuration.baseOptions;
|
@@ -538,7 +535,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
538
535
|
const localVarPath = `/persons/{id}/mailMessages`
|
539
536
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
540
537
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
541
|
-
const localVarUrlObj = new
|
538
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
542
539
|
let baseOptions;
|
543
540
|
if (configuration) {
|
544
541
|
baseOptions = configuration.baseOptions;
|
@@ -580,7 +577,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
580
577
|
const localVarPath = `/persons/{id}/products`
|
581
578
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
582
579
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
583
|
-
const localVarUrlObj = new
|
580
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
584
581
|
let baseOptions;
|
585
582
|
if (configuration) {
|
586
583
|
baseOptions = configuration.baseOptions;
|
@@ -624,7 +621,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
624
621
|
const localVarPath = `/persons/{id}/flow`
|
625
622
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
626
623
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
627
|
-
const localVarUrlObj = new
|
624
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
628
625
|
let baseOptions;
|
629
626
|
if (configuration) {
|
630
627
|
baseOptions = configuration.baseOptions;
|
@@ -670,7 +667,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
670
667
|
const localVarPath = `/persons/{id}/permittedUsers`
|
671
668
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
672
669
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
673
|
-
const localVarUrlObj = new
|
670
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
674
671
|
let baseOptions;
|
675
672
|
if (configuration) {
|
676
673
|
baseOptions = configuration.baseOptions;
|
@@ -706,7 +703,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
706
703
|
getPersons: (user_id, filter_id, first_char, start, limit, sort) => __awaiter(this, void 0, void 0, function* () {
|
707
704
|
const localVarPath = `/persons`;
|
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;
|
@@ -760,7 +757,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
760
757
|
getPersonsCollection: (cursor, limit, since, until, owner_id, first_char) => __awaiter(this, void 0, void 0, function* () {
|
761
758
|
const localVarPath = `/persons/collection`;
|
762
759
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
763
|
-
const localVarUrlObj = new
|
760
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
764
761
|
let baseOptions;
|
765
762
|
if (configuration) {
|
766
763
|
baseOptions = configuration.baseOptions;
|
@@ -813,7 +810,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
813
810
|
const localVarPath = `/persons/{id}/merge`
|
814
811
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
815
812
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
816
|
-
const localVarUrlObj = new
|
813
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
817
814
|
let baseOptions;
|
818
815
|
if (configuration) {
|
819
816
|
baseOptions = configuration.baseOptions;
|
@@ -854,7 +851,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
854
851
|
(0, common_1.assertParamExists)('searchPersons', 'term', term);
|
855
852
|
const localVarPath = `/persons/search`;
|
856
853
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
857
|
-
const localVarUrlObj = new
|
854
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
858
855
|
let baseOptions;
|
859
856
|
if (configuration) {
|
860
857
|
baseOptions = configuration.baseOptions;
|
@@ -910,7 +907,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
910
907
|
const localVarPath = `/persons/{id}`
|
911
908
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
912
909
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
913
|
-
const localVarUrlObj = new
|
910
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
914
911
|
let baseOptions;
|
915
912
|
if (configuration) {
|
916
913
|
baseOptions = configuration.baseOptions;
|
@@ -941,26 +938,6 @@ exports.PersonsApiAxiosParamCreator = PersonsApiAxiosParamCreator;
|
|
941
938
|
* @export
|
942
939
|
*/
|
943
940
|
const PersonsApiFp = function (configuration) {
|
944
|
-
/**
|
945
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
946
|
-
* */
|
947
|
-
axios_1.default.interceptors.request.use(function (config) {
|
948
|
-
const version = require("../../package.json").version;
|
949
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
950
|
-
return config;
|
951
|
-
});
|
952
|
-
/**
|
953
|
-
* Axios response interceptor to modify response structure
|
954
|
-
*/
|
955
|
-
axios_1.default.interceptors.response.use(function (response) {
|
956
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
957
|
-
}, function (error) {
|
958
|
-
var _a;
|
959
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
960
|
-
return Promise.reject(error.response.data);
|
961
|
-
}
|
962
|
-
return Promise.reject(error);
|
963
|
-
});
|
964
941
|
const localVarAxiosParamCreator = (0, exports.PersonsApiAxiosParamCreator)(configuration);
|
965
942
|
return {
|
966
943
|
/**
|
@@ -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.PipelinesApi = exports.PipelinesApiFactory = exports.PipelinesApiFp = exports.PipelinesApiAxiosParamCreator = 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 PipelinesApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addPipeline: (PipelineRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/pipelines`;
|
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 PipelinesApiAxiosParamCreator = function (configuration) {
|
|
84
81
|
const localVarPath = `/pipelines/{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;
|
@@ -119,7 +116,7 @@ const PipelinesApiAxiosParamCreator = function (configuration) {
|
|
119
116
|
const localVarPath = `/pipelines/{id}`
|
120
117
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
121
118
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
122
|
-
const localVarUrlObj = new
|
119
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
123
120
|
let baseOptions;
|
124
121
|
if (configuration) {
|
125
122
|
baseOptions = configuration.baseOptions;
|
@@ -163,7 +160,7 @@ const PipelinesApiAxiosParamCreator = function (configuration) {
|
|
163
160
|
const localVarPath = `/pipelines/{id}/conversion_statistics`
|
164
161
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
165
162
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
166
|
-
const localVarUrlObj = new
|
163
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
167
164
|
let baseOptions;
|
168
165
|
if (configuration) {
|
169
166
|
baseOptions = configuration.baseOptions;
|
@@ -218,7 +215,7 @@ const PipelinesApiAxiosParamCreator = function (configuration) {
|
|
218
215
|
const localVarPath = `/pipelines/{id}/deals`
|
219
216
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
220
217
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
221
|
-
const localVarUrlObj = new
|
218
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
222
219
|
let baseOptions;
|
223
220
|
if (configuration) {
|
224
221
|
baseOptions = configuration.baseOptions;
|
@@ -283,7 +280,7 @@ const PipelinesApiAxiosParamCreator = function (configuration) {
|
|
283
280
|
const localVarPath = `/pipelines/{id}/movement_statistics`
|
284
281
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
285
282
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
286
|
-
const localVarUrlObj = new
|
283
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
287
284
|
let baseOptions;
|
288
285
|
if (configuration) {
|
289
286
|
baseOptions = configuration.baseOptions;
|
@@ -326,7 +323,7 @@ const PipelinesApiAxiosParamCreator = function (configuration) {
|
|
326
323
|
getPipelines: () => __awaiter(this, void 0, void 0, function* () {
|
327
324
|
const localVarPath = `/pipelines`;
|
328
325
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
329
|
-
const localVarUrlObj = new
|
326
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
330
327
|
let baseOptions;
|
331
328
|
if (configuration) {
|
332
329
|
baseOptions = configuration.baseOptions;
|
@@ -361,7 +358,7 @@ const PipelinesApiAxiosParamCreator = function (configuration) {
|
|
361
358
|
const localVarPath = `/pipelines/{id}`
|
362
359
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
363
360
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
364
|
-
const localVarUrlObj = new
|
361
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
365
362
|
let baseOptions;
|
366
363
|
if (configuration) {
|
367
364
|
baseOptions = configuration.baseOptions;
|
@@ -392,26 +389,6 @@ exports.PipelinesApiAxiosParamCreator = PipelinesApiAxiosParamCreator;
|
|
392
389
|
* @export
|
393
390
|
*/
|
394
391
|
const PipelinesApiFp = function (configuration) {
|
395
|
-
/**
|
396
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
397
|
-
* */
|
398
|
-
axios_1.default.interceptors.request.use(function (config) {
|
399
|
-
const version = require("../../package.json").version;
|
400
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
401
|
-
return config;
|
402
|
-
});
|
403
|
-
/**
|
404
|
-
* Axios response interceptor to modify response structure
|
405
|
-
*/
|
406
|
-
axios_1.default.interceptors.response.use(function (response) {
|
407
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
408
|
-
}, function (error) {
|
409
|
-
var _a;
|
410
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
411
|
-
return Promise.reject(error.response.data);
|
412
|
-
}
|
413
|
-
return Promise.reject(error);
|
414
|
-
});
|
415
392
|
const localVarAxiosParamCreator = (0, exports.PipelinesApiAxiosParamCreator)(configuration);
|
416
393
|
return {
|
417
394
|
/**
|
@@ -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.ProductFieldsApi = exports.ProductFieldsApiFactory = exports.ProductFieldsApiFp = exports.ProductFieldsApiAxiosParamCreator = 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 ProductFieldsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addProductField: (ProductFieldAllOf) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/productFields`;
|
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 ProductFieldsApiAxiosParamCreator = function (configuration) {
|
|
84
81
|
const localVarPath = `/productFields/{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 ProductFieldsApiAxiosParamCreator = function (configuration) {
|
|
117
114
|
(0, common_1.assertParamExists)('deleteProductFields', 'ids', ids);
|
118
115
|
const localVarPath = `/productFields`;
|
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 ProductFieldsApiAxiosParamCreator = function (configuration) {
|
|
154
151
|
const localVarPath = `/productFields/{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 ProductFieldsApiAxiosParamCreator = function (configuration) {
|
|
186
183
|
getProductFields: (start, limit) => __awaiter(this, void 0, void 0, function* () {
|
187
184
|
const localVarPath = `/productFields`;
|
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 ProductFieldsApiAxiosParamCreator = function (configuration) {
|
|
227
224
|
const localVarPath = `/productFields/{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.ProductFieldsApiAxiosParamCreator = ProductFieldsApiAxiosParamCreator;
|
|
258
255
|
* @export
|
259
256
|
*/
|
260
257
|
const ProductFieldsApiFp = 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.ProductFieldsApiAxiosParamCreator)(configuration);
|
282
259
|
return {
|
283
260
|
/**
|
package/dist/api/products-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.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = 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 ProductsApiAxiosParamCreator = function (configuration) {
|
|
48
45
|
addProduct: (AddProductRequest) => __awaiter(this, void 0, void 0, function* () {
|
49
46
|
const localVarPath = `/products`;
|
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 ProductsApiAxiosParamCreator = function (configuration) {
|
|
85
82
|
const localVarPath = `/products/{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;
|
@@ -121,7 +118,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
121
118
|
const localVarPath = `/products/{id}`
|
122
119
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
123
120
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
124
|
-
const localVarUrlObj = new
|
121
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
125
122
|
let baseOptions;
|
126
123
|
if (configuration) {
|
127
124
|
baseOptions = configuration.baseOptions;
|
@@ -159,7 +156,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
159
156
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
160
157
|
.replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_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;
|
@@ -193,7 +190,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
193
190
|
const localVarPath = `/products/{id}`
|
194
191
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
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;
|
@@ -230,7 +227,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
230
227
|
const localVarPath = `/products/{id}/deals`
|
231
228
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
232
229
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
233
|
-
const localVarUrlObj = new
|
230
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
234
231
|
let baseOptions;
|
235
232
|
if (configuration) {
|
236
233
|
baseOptions = configuration.baseOptions;
|
@@ -276,7 +273,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
276
273
|
const localVarPath = `/products/{id}/files`
|
277
274
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
278
275
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
279
|
-
const localVarUrlObj = new
|
276
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
280
277
|
let baseOptions;
|
281
278
|
if (configuration) {
|
282
279
|
baseOptions = configuration.baseOptions;
|
@@ -321,7 +318,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
321
318
|
const localVarPath = `/products/{id}/followers`
|
322
319
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
323
320
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
324
|
-
const localVarUrlObj = new
|
321
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
325
322
|
let baseOptions;
|
326
323
|
if (configuration) {
|
327
324
|
baseOptions = configuration.baseOptions;
|
@@ -361,7 +358,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
361
358
|
const localVarPath = `/products/{id}/permittedUsers`
|
362
359
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
363
360
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
364
|
-
const localVarUrlObj = new
|
361
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
365
362
|
let baseOptions;
|
366
363
|
if (configuration) {
|
367
364
|
baseOptions = configuration.baseOptions;
|
@@ -398,7 +395,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
398
395
|
getProducts: (user_id, filter_id, ids, first_char, get_summary, start, limit) => __awaiter(this, void 0, void 0, function* () {
|
399
396
|
const localVarPath = `/products`;
|
400
397
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
401
|
-
const localVarUrlObj = new
|
398
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
402
399
|
let baseOptions;
|
403
400
|
if (configuration) {
|
404
401
|
baseOptions = configuration.baseOptions;
|
@@ -457,7 +454,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
457
454
|
(0, common_1.assertParamExists)('searchProducts', 'term', term);
|
458
455
|
const localVarPath = `/products/search`;
|
459
456
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
460
|
-
const localVarUrlObj = new
|
457
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
461
458
|
let baseOptions;
|
462
459
|
if (configuration) {
|
463
460
|
baseOptions = configuration.baseOptions;
|
@@ -510,7 +507,7 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
510
507
|
const localVarPath = `/products/{id}`
|
511
508
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
512
509
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
513
|
-
const localVarUrlObj = new
|
510
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
514
511
|
let baseOptions;
|
515
512
|
if (configuration) {
|
516
513
|
baseOptions = configuration.baseOptions;
|
@@ -541,26 +538,6 @@ exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
|
|
541
538
|
* @export
|
542
539
|
*/
|
543
540
|
const ProductsApiFp = function (configuration) {
|
544
|
-
/**
|
545
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
546
|
-
* */
|
547
|
-
axios_1.default.interceptors.request.use(function (config) {
|
548
|
-
const version = require("../../package.json").version;
|
549
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
550
|
-
return config;
|
551
|
-
});
|
552
|
-
/**
|
553
|
-
* Axios response interceptor to modify response structure
|
554
|
-
*/
|
555
|
-
axios_1.default.interceptors.response.use(function (response) {
|
556
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
557
|
-
}, function (error) {
|
558
|
-
var _a;
|
559
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
560
|
-
return Promise.reject(error.response.data);
|
561
|
-
}
|
562
|
-
return Promise.reject(error);
|
563
|
-
});
|
564
541
|
const localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
|
565
542
|
return {
|
566
543
|
/**
|
@@ -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.ProjectTemplatesApi = exports.ProjectTemplatesApiFactory = exports.ProjectTemplatesApiFp = exports.ProjectTemplatesApiAxiosParamCreator = 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");
|
@@ -51,7 +48,7 @@ const ProjectTemplatesApiAxiosParamCreator = function (configuration) {
|
|
51
48
|
const localVarPath = `/projectTemplates/{id}`
|
52
49
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
53
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
54
|
-
const localVarUrlObj = new
|
51
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
55
52
|
let baseOptions;
|
56
53
|
if (configuration) {
|
57
54
|
baseOptions = configuration.baseOptions;
|
@@ -83,7 +80,7 @@ const ProjectTemplatesApiAxiosParamCreator = function (configuration) {
|
|
83
80
|
getProjectTemplates: (cursor, limit) => __awaiter(this, void 0, void 0, function* () {
|
84
81
|
const localVarPath = `/projectTemplates`;
|
85
82
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
86
|
-
const localVarUrlObj = new
|
83
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
87
84
|
let baseOptions;
|
88
85
|
if (configuration) {
|
89
86
|
baseOptions = configuration.baseOptions;
|
@@ -123,7 +120,7 @@ const ProjectTemplatesApiAxiosParamCreator = function (configuration) {
|
|
123
120
|
const localVarPath = `/projects/boards/{id}`
|
124
121
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
125
122
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
126
|
-
const localVarUrlObj = new
|
123
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
127
124
|
let baseOptions;
|
128
125
|
if (configuration) {
|
129
126
|
baseOptions = configuration.baseOptions;
|
@@ -157,7 +154,7 @@ const ProjectTemplatesApiAxiosParamCreator = function (configuration) {
|
|
157
154
|
const localVarPath = `/projects/phases/{id}`
|
158
155
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
159
156
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
160
|
-
const localVarUrlObj = new
|
157
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
161
158
|
let baseOptions;
|
162
159
|
if (configuration) {
|
163
160
|
baseOptions = configuration.baseOptions;
|
@@ -186,26 +183,6 @@ exports.ProjectTemplatesApiAxiosParamCreator = ProjectTemplatesApiAxiosParamCrea
|
|
186
183
|
* @export
|
187
184
|
*/
|
188
185
|
const ProjectTemplatesApiFp = function (configuration) {
|
189
|
-
/**
|
190
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
191
|
-
* */
|
192
|
-
axios_1.default.interceptors.request.use(function (config) {
|
193
|
-
const version = require("../../package.json").version;
|
194
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
195
|
-
return config;
|
196
|
-
});
|
197
|
-
/**
|
198
|
-
* Axios response interceptor to modify response structure
|
199
|
-
*/
|
200
|
-
axios_1.default.interceptors.response.use(function (response) {
|
201
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
202
|
-
}, function (error) {
|
203
|
-
var _a;
|
204
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
205
|
-
return Promise.reject(error.response.data);
|
206
|
-
}
|
207
|
-
return Promise.reject(error);
|
208
|
-
});
|
209
186
|
const localVarAxiosParamCreator = (0, exports.ProjectTemplatesApiAxiosParamCreator)(configuration);
|
210
187
|
return {
|
211
188
|
/**
|