pipedrive 22.3.1-rc.2 → 22.3.1-rc.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -4
- package/README.md +29 -24
- 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 +31 -0
- package/common.ts +0 -1
- package/configuration.ts +11 -2
- 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 +26 -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 +8 -2
- 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 +26 -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 +8 -2
- package/docs/AddWebhookRequest.md +1 -1
- package/docs/BasicDeal.md +3 -0
- package/docs/CallLogObject.md +2 -1
- package/docs/DealParticipantsChangelog.md +12 -0
- package/docs/DealsApi.md +74 -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/NewDeal.md +3 -0
- package/docs/OrganizationsApi.md +10 -4
- package/docs/ParticipantsChangelog.md +11 -0
- package/docs/ParticipantsChangelogItem.md +12 -0
- 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/UpdateDealRequest.md +3 -0
- 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/migration.md +309 -0
- 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/api/products-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -664,32 +661,12 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
664
661
|
}
|
665
662
|
};
|
666
663
|
|
664
|
+
|
667
665
|
/**
|
668
666
|
* ProductsApi - functional programming interface
|
669
667
|
* @export
|
670
668
|
*/
|
671
669
|
export const ProductsApiFp = function(configuration?: Configuration) {
|
672
|
-
|
673
|
-
/**
|
674
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
675
|
-
* */
|
676
|
-
globalAxios.interceptors.request.use(function (config) {
|
677
|
-
const version = require("../../package.json").version;
|
678
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
679
|
-
return config;
|
680
|
-
});
|
681
|
-
|
682
|
-
/**
|
683
|
-
* Axios response interceptor to modify response structure
|
684
|
-
*/
|
685
|
-
globalAxios.interceptors.response.use(function (response) {
|
686
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
687
|
-
}, function (error) {
|
688
|
-
if(error?.response?.data) {
|
689
|
-
return Promise.reject(error.response.data);
|
690
|
-
}
|
691
|
-
return Promise.reject(error);
|
692
|
-
});
|
693
670
|
const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
|
694
671
|
return {
|
695
672
|
/**
|
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -211,32 +208,12 @@ export const ProjectTemplatesApiAxiosParamCreator = function (configuration?: Co
|
|
211
208
|
}
|
212
209
|
};
|
213
210
|
|
211
|
+
|
214
212
|
/**
|
215
213
|
* ProjectTemplatesApi - functional programming interface
|
216
214
|
* @export
|
217
215
|
*/
|
218
216
|
export const ProjectTemplatesApiFp = function(configuration?: Configuration) {
|
219
|
-
|
220
|
-
/**
|
221
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
222
|
-
* */
|
223
|
-
globalAxios.interceptors.request.use(function (config) {
|
224
|
-
const version = require("../../package.json").version;
|
225
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
226
|
-
return config;
|
227
|
-
});
|
228
|
-
|
229
|
-
/**
|
230
|
-
* Axios response interceptor to modify response structure
|
231
|
-
*/
|
232
|
-
globalAxios.interceptors.response.use(function (response) {
|
233
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
234
|
-
}, function (error) {
|
235
|
-
if(error?.response?.data) {
|
236
|
-
return Promise.reject(error.response.data);
|
237
|
-
}
|
238
|
-
return Promise.reject(error);
|
239
|
-
});
|
240
217
|
const localVarAxiosParamCreator = ProjectTemplatesApiAxiosParamCreator(configuration)
|
241
218
|
return {
|
242
219
|
/**
|
package/api/projects-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -684,32 +681,12 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat
|
|
684
681
|
}
|
685
682
|
};
|
686
683
|
|
684
|
+
|
687
685
|
/**
|
688
686
|
* ProjectsApi - functional programming interface
|
689
687
|
* @export
|
690
688
|
*/
|
691
689
|
export const ProjectsApiFp = function(configuration?: Configuration) {
|
692
|
-
|
693
|
-
/**
|
694
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
695
|
-
* */
|
696
|
-
globalAxios.interceptors.request.use(function (config) {
|
697
|
-
const version = require("../../package.json").version;
|
698
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
699
|
-
return config;
|
700
|
-
});
|
701
|
-
|
702
|
-
/**
|
703
|
-
* Axios response interceptor to modify response structure
|
704
|
-
*/
|
705
|
-
globalAxios.interceptors.response.use(function (response) {
|
706
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
707
|
-
}, function (error) {
|
708
|
-
if(error?.response?.data) {
|
709
|
-
return Promise.reject(error.response.data);
|
710
|
-
}
|
711
|
-
return Promise.reject(error);
|
712
|
-
});
|
713
690
|
const localVarAxiosParamCreator = ProjectsApiAxiosParamCreator(configuration)
|
714
691
|
return {
|
715
692
|
/**
|
package/api/recents-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -94,32 +91,12 @@ export const RecentsApiAxiosParamCreator = function (configuration?: Configurati
|
|
94
91
|
}
|
95
92
|
};
|
96
93
|
|
94
|
+
|
97
95
|
/**
|
98
96
|
* RecentsApi - functional programming interface
|
99
97
|
* @export
|
100
98
|
*/
|
101
99
|
export const RecentsApiFp = function(configuration?: Configuration) {
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
105
|
-
* */
|
106
|
-
globalAxios.interceptors.request.use(function (config) {
|
107
|
-
const version = require("../../package.json").version;
|
108
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
109
|
-
return config;
|
110
|
-
});
|
111
|
-
|
112
|
-
/**
|
113
|
-
* Axios response interceptor to modify response structure
|
114
|
-
*/
|
115
|
-
globalAxios.interceptors.response.use(function (response) {
|
116
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
117
|
-
}, function (error) {
|
118
|
-
if(error?.response?.data) {
|
119
|
-
return Promise.reject(error.response.data);
|
120
|
-
}
|
121
|
-
return Promise.reject(error);
|
122
|
-
});
|
123
100
|
const localVarAxiosParamCreator = RecentsApiAxiosParamCreator(configuration)
|
124
101
|
return {
|
125
102
|
/**
|
package/api/roles-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -600,32 +597,12 @@ export const RolesApiAxiosParamCreator = function (configuration?: Configuration
|
|
600
597
|
}
|
601
598
|
};
|
602
599
|
|
600
|
+
|
603
601
|
/**
|
604
602
|
* RolesApi - functional programming interface
|
605
603
|
* @export
|
606
604
|
*/
|
607
605
|
export const RolesApiFp = function(configuration?: Configuration) {
|
608
|
-
|
609
|
-
/**
|
610
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
611
|
-
* */
|
612
|
-
globalAxios.interceptors.request.use(function (config) {
|
613
|
-
const version = require("../../package.json").version;
|
614
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
615
|
-
return config;
|
616
|
-
});
|
617
|
-
|
618
|
-
/**
|
619
|
-
* Axios response interceptor to modify response structure
|
620
|
-
*/
|
621
|
-
globalAxios.interceptors.response.use(function (response) {
|
622
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
623
|
-
}, function (error) {
|
624
|
-
if(error?.response?.data) {
|
625
|
-
return Promise.reject(error.response.data);
|
626
|
-
}
|
627
|
-
return Promise.reject(error);
|
628
|
-
});
|
629
606
|
const localVarAxiosParamCreator = RolesApiAxiosParamCreator(configuration)
|
630
607
|
return {
|
631
608
|
/**
|
package/api/stages-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -384,32 +381,12 @@ export const StagesApiAxiosParamCreator = function (configuration?: Configuratio
|
|
384
381
|
}
|
385
382
|
};
|
386
383
|
|
384
|
+
|
387
385
|
/**
|
388
386
|
* StagesApi - functional programming interface
|
389
387
|
* @export
|
390
388
|
*/
|
391
389
|
export const StagesApiFp = function(configuration?: Configuration) {
|
392
|
-
|
393
|
-
/**
|
394
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
395
|
-
* */
|
396
|
-
globalAxios.interceptors.request.use(function (config) {
|
397
|
-
const version = require("../../package.json").version;
|
398
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
399
|
-
return config;
|
400
|
-
});
|
401
|
-
|
402
|
-
/**
|
403
|
-
* Axios response interceptor to modify response structure
|
404
|
-
*/
|
405
|
-
globalAxios.interceptors.response.use(function (response) {
|
406
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
407
|
-
}, function (error) {
|
408
|
-
if(error?.response?.data) {
|
409
|
-
return Promise.reject(error.response.data);
|
410
|
-
}
|
411
|
-
return Promise.reject(error);
|
412
|
-
});
|
413
390
|
const localVarAxiosParamCreator = StagesApiAxiosParamCreator(configuration)
|
414
391
|
return {
|
415
392
|
/**
|
package/api/subscriptions-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -428,32 +425,12 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
|
|
428
425
|
}
|
429
426
|
};
|
430
427
|
|
428
|
+
|
431
429
|
/**
|
432
430
|
* SubscriptionsApi - functional programming interface
|
433
431
|
* @export
|
434
432
|
*/
|
435
433
|
export const SubscriptionsApiFp = function(configuration?: Configuration) {
|
436
|
-
|
437
|
-
/**
|
438
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
439
|
-
* */
|
440
|
-
globalAxios.interceptors.request.use(function (config) {
|
441
|
-
const version = require("../../package.json").version;
|
442
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
443
|
-
return config;
|
444
|
-
});
|
445
|
-
|
446
|
-
/**
|
447
|
-
* Axios response interceptor to modify response structure
|
448
|
-
*/
|
449
|
-
globalAxios.interceptors.response.use(function (response) {
|
450
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
451
|
-
}, function (error) {
|
452
|
-
if(error?.response?.data) {
|
453
|
-
return Promise.reject(error.response.data);
|
454
|
-
}
|
455
|
-
return Promise.reject(error);
|
456
|
-
});
|
457
434
|
const localVarAxiosParamCreator = SubscriptionsApiAxiosParamCreator(configuration)
|
458
435
|
return {
|
459
436
|
/**
|
package/api/tasks-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -282,32 +279,12 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
|
|
282
279
|
}
|
283
280
|
};
|
284
281
|
|
282
|
+
|
285
283
|
/**
|
286
284
|
* TasksApi - functional programming interface
|
287
285
|
* @export
|
288
286
|
*/
|
289
287
|
export const TasksApiFp = function(configuration?: Configuration) {
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
293
|
-
* */
|
294
|
-
globalAxios.interceptors.request.use(function (config) {
|
295
|
-
const version = require("../../package.json").version;
|
296
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
297
|
-
return config;
|
298
|
-
});
|
299
|
-
|
300
|
-
/**
|
301
|
-
* Axios response interceptor to modify response structure
|
302
|
-
*/
|
303
|
-
globalAxios.interceptors.response.use(function (response) {
|
304
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
305
|
-
}, function (error) {
|
306
|
-
if(error?.response?.data) {
|
307
|
-
return Promise.reject(error.response.data);
|
308
|
-
}
|
309
|
-
return Promise.reject(error);
|
310
|
-
});
|
311
288
|
const localVarAxiosParamCreator = TasksApiAxiosParamCreator(configuration)
|
312
289
|
return {
|
313
290
|
/**
|
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -74,32 +71,12 @@ export const UserConnectionsApiAxiosParamCreator = function (configuration?: Con
|
|
74
71
|
}
|
75
72
|
};
|
76
73
|
|
74
|
+
|
77
75
|
/**
|
78
76
|
* UserConnectionsApi - functional programming interface
|
79
77
|
* @export
|
80
78
|
*/
|
81
79
|
export const UserConnectionsApiFp = function(configuration?: Configuration) {
|
82
|
-
|
83
|
-
/**
|
84
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
85
|
-
* */
|
86
|
-
globalAxios.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
|
-
/**
|
93
|
-
* Axios response interceptor to modify response structure
|
94
|
-
*/
|
95
|
-
globalAxios.interceptors.response.use(function (response) {
|
96
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
97
|
-
}, function (error) {
|
98
|
-
if(error?.response?.data) {
|
99
|
-
return Promise.reject(error.response.data);
|
100
|
-
}
|
101
|
-
return Promise.reject(error);
|
102
|
-
});
|
103
80
|
const localVarAxiosParamCreator = UserConnectionsApiAxiosParamCreator(configuration)
|
104
81
|
return {
|
105
82
|
/**
|
package/api/user-settings-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -74,32 +71,12 @@ export const UserSettingsApiAxiosParamCreator = function (configuration?: Config
|
|
74
71
|
}
|
75
72
|
};
|
76
73
|
|
74
|
+
|
77
75
|
/**
|
78
76
|
* UserSettingsApi - functional programming interface
|
79
77
|
* @export
|
80
78
|
*/
|
81
79
|
export const UserSettingsApiFp = function(configuration?: Configuration) {
|
82
|
-
|
83
|
-
/**
|
84
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
85
|
-
* */
|
86
|
-
globalAxios.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
|
-
/**
|
93
|
-
* Axios response interceptor to modify response structure
|
94
|
-
*/
|
95
|
-
globalAxios.interceptors.response.use(function (response) {
|
96
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
97
|
-
}, function (error) {
|
98
|
-
if(error?.response?.data) {
|
99
|
-
return Promise.reject(error.response.data);
|
100
|
-
}
|
101
|
-
return Promise.reject(error);
|
102
|
-
});
|
103
80
|
const localVarAxiosParamCreator = UserSettingsApiAxiosParamCreator(configuration)
|
104
81
|
return {
|
105
82
|
/**
|
package/api/users-api.ts
CHANGED
@@ -16,9 +16,6 @@
|
|
16
16
|
import type { Configuration } from '../configuration';
|
17
17
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
18
18
|
import globalAxios from 'axios';
|
19
|
-
// URLSearchParams not necessarily used
|
20
|
-
// @ts-ignore
|
21
|
-
import { URL, URLSearchParams } from 'url';
|
22
19
|
// Some imports not used depending on template conditions
|
23
20
|
// @ts-ignore
|
24
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
@@ -479,32 +476,12 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
479
476
|
}
|
480
477
|
};
|
481
478
|
|
479
|
+
|
482
480
|
/**
|
483
481
|
* UsersApi - functional programming interface
|
484
482
|
* @export
|
485
483
|
*/
|
486
484
|
export const UsersApiFp = function(configuration?: Configuration) {
|
487
|
-
|
488
|
-
/**
|
489
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
490
|
-
* */
|
491
|
-
globalAxios.interceptors.request.use(function (config) {
|
492
|
-
const version = require("../../package.json").version;
|
493
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
494
|
-
return config;
|
495
|
-
});
|
496
|
-
|
497
|
-
/**
|
498
|
-
* Axios response interceptor to modify response structure
|
499
|
-
*/
|
500
|
-
globalAxios.interceptors.response.use(function (response) {
|
501
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
502
|
-
}, function (error) {
|
503
|
-
if(error?.response?.data) {
|
504
|
-
return Promise.reject(error.response.data);
|
505
|
-
}
|
506
|
-
return Promise.reject(error);
|
507
|
-
});
|
508
485
|
const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration)
|
509
486
|
return {
|
510
487
|
/**
|
package/api/webhooks-api.ts
CHANGED
@@ -163,32 +163,12 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
|
|
163
163
|
}
|
164
164
|
};
|
165
165
|
|
166
|
+
|
166
167
|
/**
|
167
168
|
* WebhooksApi - functional programming interface
|
168
169
|
* @export
|
169
170
|
*/
|
170
171
|
export const WebhooksApiFp = function(configuration?: Configuration) {
|
171
|
-
|
172
|
-
/**
|
173
|
-
* Axios interceptor to add the SDK version as a User-Agent header
|
174
|
-
* */
|
175
|
-
globalAxios.interceptors.request.use(function (config) {
|
176
|
-
const version = require("../../package.json").version;
|
177
|
-
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
178
|
-
return config;
|
179
|
-
});
|
180
|
-
|
181
|
-
/**
|
182
|
-
* Axios response interceptor to modify response structure
|
183
|
-
*/
|
184
|
-
globalAxios.interceptors.response.use(function (response) {
|
185
|
-
return response.hasOwnProperty('success') ? response : response.data;
|
186
|
-
}, function (error) {
|
187
|
-
if(error?.response?.data) {
|
188
|
-
return Promise.reject(error.response.data);
|
189
|
-
}
|
190
|
-
return Promise.reject(error);
|
191
|
-
});
|
192
172
|
const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration)
|
193
173
|
return {
|
194
174
|
/**
|
package/base.ts
CHANGED
@@ -41,6 +41,34 @@ export interface RequestArgs {
|
|
41
41
|
url: string;
|
42
42
|
options: AxiosRequestConfig;
|
43
43
|
}
|
44
|
+
/**
|
45
|
+
* Axios interceptor to add the SDK version as a User-Agent header
|
46
|
+
* */
|
47
|
+
globalAxios.interceptors.request.use(function (config) {
|
48
|
+
let version;
|
49
|
+
|
50
|
+
try {
|
51
|
+
version = require('../package.json').version;
|
52
|
+
} catch (error) {
|
53
|
+
version = '22.x';
|
54
|
+
}
|
55
|
+
|
56
|
+
config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
|
57
|
+
|
58
|
+
return config;
|
59
|
+
});
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Axios response interceptor to modify response structure
|
63
|
+
*/
|
64
|
+
globalAxios.interceptors.response.use(function (response) {
|
65
|
+
return response ? (response.hasOwnProperty('success') ? response : response.data) : response;
|
66
|
+
}, function (error) {
|
67
|
+
if(error?.response?.data) {
|
68
|
+
return Promise.reject(error.response.data);
|
69
|
+
}
|
70
|
+
return Promise.reject(error);
|
71
|
+
});
|
44
72
|
|
45
73
|
/**
|
46
74
|
*
|
@@ -72,3 +100,6 @@ export class RequiredError extends Error {
|
|
72
100
|
this.name = "RequiredError"
|
73
101
|
}
|
74
102
|
}
|
103
|
+
|
104
|
+
|
105
|
+
|
package/common.ts
CHANGED
package/configuration.ts
CHANGED
@@ -29,12 +29,13 @@ export interface Parameters {
|
|
29
29
|
clientId: string;
|
30
30
|
clientSecret: string;
|
31
31
|
redirectUri: string;
|
32
|
+
host?:string;
|
32
33
|
};
|
33
34
|
|
34
35
|
export type ParamKey = keyof Parameters;
|
35
36
|
|
36
37
|
export class OAuth2Configuration {
|
37
|
-
private host
|
38
|
+
private host: string;
|
38
39
|
private accessToken: string | null = null;
|
39
40
|
private refreshToken: string | null = null;
|
40
41
|
private scope: string | null = null;
|
@@ -51,6 +52,7 @@ export class OAuth2Configuration {
|
|
51
52
|
this.clientId = this.validateParam(params, 'clientId');
|
52
53
|
this.clientSecret = this.validateParam(params, 'clientSecret');
|
53
54
|
this.redirectUri = this.validateParam(params, 'redirectUri');
|
55
|
+
this.host = params.host || "https://oauth.pipedrive.com";
|
54
56
|
}
|
55
57
|
|
56
58
|
public get authorizationUrl() {
|
@@ -204,7 +206,14 @@ export class OAuth2Configuration {
|
|
204
206
|
}
|
205
207
|
|
206
208
|
private getUserAgent = () => {
|
207
|
-
|
209
|
+
let version;
|
210
|
+
|
211
|
+
try {
|
212
|
+
version = require('../package.json').version;
|
213
|
+
} catch (error) {
|
214
|
+
version = '22.x';
|
215
|
+
}
|
216
|
+
|
208
217
|
return `Pipedrive-SDK-Javascript-${version}`;
|
209
218
|
};
|
210
219
|
|