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.
Files changed (166) hide show
  1. package/CHANGELOG.md +6 -4
  2. package/api/activities-api.ts +1 -24
  3. package/api/activity-fields-api.ts +1 -24
  4. package/api/activity-types-api.ts +1 -21
  5. package/api/billing-api.ts +1 -24
  6. package/api/call-logs-api.ts +1 -24
  7. package/api/channels-api.ts +1 -24
  8. package/api/currencies-api.ts +1 -24
  9. package/api/deal-fields-api.ts +1 -24
  10. package/api/deals-api.ts +1 -24
  11. package/api/files-api.ts +1 -24
  12. package/api/filters-api.ts +1 -24
  13. package/api/goals-api.ts +1 -24
  14. package/api/item-search-api.ts +1 -24
  15. package/api/lead-labels-api.ts +1 -21
  16. package/api/lead-sources-api.ts +1 -24
  17. package/api/leads-api.ts +1 -24
  18. package/api/legacy-teams-api.ts +1 -24
  19. package/api/mailbox-api.ts +1 -24
  20. package/api/note-fields-api.ts +1 -24
  21. package/api/notes-api.ts +1 -21
  22. package/api/organization-fields-api.ts +1 -24
  23. package/api/organization-relationships-api.ts +1 -24
  24. package/api/organizations-api.ts +1 -24
  25. package/api/permission-sets-api.ts +1 -24
  26. package/api/person-fields-api.ts +1 -21
  27. package/api/persons-api.ts +1 -24
  28. package/api/pipelines-api.ts +1 -24
  29. package/api/product-fields-api.ts +1 -24
  30. package/api/products-api.ts +1 -24
  31. package/api/project-templates-api.ts +1 -24
  32. package/api/projects-api.ts +1 -24
  33. package/api/recents-api.ts +1 -24
  34. package/api/roles-api.ts +1 -24
  35. package/api/stages-api.ts +1 -24
  36. package/api/subscriptions-api.ts +1 -24
  37. package/api/tasks-api.ts +1 -24
  38. package/api/user-connections-api.ts +1 -24
  39. package/api/user-settings-api.ts +1 -24
  40. package/api/users-api.ts +1 -24
  41. package/api/webhooks-api.ts +1 -21
  42. package/base.ts +23 -0
  43. package/common.ts +0 -1
  44. package/configuration.ts +3 -1
  45. package/dist/api/activities-api.js +7 -30
  46. package/dist/api/activity-fields-api.js +1 -24
  47. package/dist/api/activity-types-api.js +0 -20
  48. package/dist/api/billing-api.js +1 -24
  49. package/dist/api/call-logs-api.js +5 -28
  50. package/dist/api/channels-api.js +4 -27
  51. package/dist/api/currencies-api.js +1 -24
  52. package/dist/api/deal-fields-api.js +6 -29
  53. package/dist/api/deals-api.js +28 -51
  54. package/dist/api/files-api.js +11 -34
  55. package/dist/api/filters-api.js +7 -30
  56. package/dist/api/goals-api.js +5 -28
  57. package/dist/api/item-search-api.js +2 -25
  58. package/dist/api/lead-labels-api.js +0 -20
  59. package/dist/api/lead-sources-api.js +1 -24
  60. package/dist/api/leads-api.js +7 -30
  61. package/dist/api/legacy-teams-api.js +8 -31
  62. package/dist/api/mailbox-api.js +7 -30
  63. package/dist/api/note-fields-api.js +1 -24
  64. package/dist/api/notes-api.js +0 -20
  65. package/dist/api/organization-fields-api.js +6 -29
  66. package/dist/api/organization-relationships-api.js +5 -28
  67. package/dist/api/organizations-api.js +19 -42
  68. package/dist/api/permission-sets-api.js +3 -26
  69. package/dist/api/person-fields-api.js +0 -20
  70. package/dist/api/persons-api.js +21 -44
  71. package/dist/api/pipelines-api.js +8 -31
  72. package/dist/api/product-fields-api.js +6 -29
  73. package/dist/api/products-api.js +12 -35
  74. package/dist/api/project-templates-api.js +4 -27
  75. package/dist/api/projects-api.js +14 -37
  76. package/dist/api/recents-api.js +1 -24
  77. package/dist/api/roles-api.js +12 -35
  78. package/dist/api/stages-api.js +7 -30
  79. package/dist/api/subscriptions-api.js +9 -32
  80. package/dist/api/tasks-api.js +5 -28
  81. package/dist/api/user-connections-api.js +1 -24
  82. package/dist/api/user-settings-api.js +1 -24
  83. package/dist/api/users-api.js +10 -33
  84. package/dist/api/webhooks-api.js +0 -20
  85. package/dist/base.js +20 -0
  86. package/dist/common.d.ts +0 -1
  87. package/dist/common.js +1 -2
  88. package/dist/configuration.d.ts +1 -0
  89. package/dist/configuration.js +1 -1
  90. package/dist/esm/api/activities-api.js +0 -23
  91. package/dist/esm/api/activity-fields-api.js +0 -23
  92. package/dist/esm/api/activity-types-api.js +0 -20
  93. package/dist/esm/api/billing-api.js +0 -23
  94. package/dist/esm/api/call-logs-api.js +0 -23
  95. package/dist/esm/api/channels-api.js +0 -23
  96. package/dist/esm/api/currencies-api.js +0 -23
  97. package/dist/esm/api/deal-fields-api.js +0 -23
  98. package/dist/esm/api/deals-api.js +0 -23
  99. package/dist/esm/api/files-api.js +0 -23
  100. package/dist/esm/api/filters-api.js +0 -23
  101. package/dist/esm/api/goals-api.js +0 -23
  102. package/dist/esm/api/item-search-api.js +0 -23
  103. package/dist/esm/api/lead-labels-api.js +0 -20
  104. package/dist/esm/api/lead-sources-api.js +0 -23
  105. package/dist/esm/api/leads-api.js +0 -23
  106. package/dist/esm/api/legacy-teams-api.js +0 -23
  107. package/dist/esm/api/mailbox-api.js +0 -23
  108. package/dist/esm/api/note-fields-api.js +0 -23
  109. package/dist/esm/api/notes-api.js +0 -20
  110. package/dist/esm/api/organization-fields-api.js +0 -23
  111. package/dist/esm/api/organization-relationships-api.js +0 -23
  112. package/dist/esm/api/organizations-api.js +0 -23
  113. package/dist/esm/api/permission-sets-api.js +0 -23
  114. package/dist/esm/api/person-fields-api.js +0 -20
  115. package/dist/esm/api/persons-api.js +0 -23
  116. package/dist/esm/api/pipelines-api.js +0 -23
  117. package/dist/esm/api/product-fields-api.js +0 -23
  118. package/dist/esm/api/products-api.js +0 -23
  119. package/dist/esm/api/project-templates-api.js +0 -23
  120. package/dist/esm/api/projects-api.js +0 -23
  121. package/dist/esm/api/recents-api.js +0 -23
  122. package/dist/esm/api/roles-api.js +0 -23
  123. package/dist/esm/api/stages-api.js +0 -23
  124. package/dist/esm/api/subscriptions-api.js +0 -23
  125. package/dist/esm/api/tasks-api.js +0 -23
  126. package/dist/esm/api/user-connections-api.js +0 -23
  127. package/dist/esm/api/user-settings-api.js +0 -23
  128. package/dist/esm/api/users-api.js +0 -23
  129. package/dist/esm/api/webhooks-api.js +0 -20
  130. package/dist/esm/base.js +20 -0
  131. package/dist/esm/common.d.ts +0 -1
  132. package/dist/esm/common.js +0 -1
  133. package/dist/esm/configuration.d.ts +1 -0
  134. package/dist/esm/configuration.js +1 -1
  135. package/docs/CallLogObject.md +2 -1
  136. package/docs/DealsApi.md +14 -8
  137. package/docs/FiltersApi.md +4 -1
  138. package/docs/GetDeal.md +1 -1
  139. package/docs/GetDealRelatedObjects.md +11 -0
  140. package/docs/GetDealsRelatedObjects.md +3 -3
  141. package/docs/ItemSearchApi.md +2 -2
  142. package/docs/LeadsApi.md +4 -1
  143. package/docs/MailboxApi.md +2 -2
  144. package/docs/MeetingsApi.md +118 -0
  145. package/docs/OrganizationsApi.md +10 -4
  146. package/docs/PersonsApi.md +14 -5
  147. package/docs/PostDealParticipants.md +1 -1
  148. package/docs/PostDealParticipantsRelatedObjects.md +10 -0
  149. package/docs/ProductsApi.md +2 -2
  150. package/docs/RecentsApi.md +2 -2
  151. package/docs/ResponseCallLogObject.md +2 -1
  152. package/docs/UserProviderLinkCreateRequest.md +12 -0
  153. package/docs/UserProviderLinkErrorResponse.md +10 -0
  154. package/docs/UserProviderLinkSuccessResponse.md +10 -0
  155. package/docs/UserProviderLinkSuccessResponseData.md +9 -0
  156. package/docs/UsersApi.md +2 -2
  157. package/package.json +3 -3
  158. package/src/api/MeetingsApi.js +181 -0
  159. package/src/model/GetDealRelatedObjects.js +101 -0
  160. package/src/model/PostDealParticipantsRelatedObjects.js +90 -0
  161. package/src/model/UserProviderLinkCreateRequest.js +120 -0
  162. package/src/model/UserProviderLinkErrorResponse.js +90 -0
  163. package/src/model/UserProviderLinkSuccessResponse.js +90 -0
  164. package/src/model/UserProviderLinkSuccessResponseData.js +79 -0
  165. package/test/functional/access-token.test.js +5 -5
  166. package/test/functional/authorisation.test.js +5 -8
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -254,26 +251,6 @@ export const ProductFieldsApiAxiosParamCreator = function (configuration) {
254
251
  * @export
255
252
  */
256
253
  export const ProductFieldsApiFp = function (configuration) {
257
- /**
258
- * Axios interceptor to add the SDK version as a User-Agent header
259
- * */
260
- globalAxios.interceptors.request.use(function (config) {
261
- const version = require("../../package.json").version;
262
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
263
- return config;
264
- });
265
- /**
266
- * Axios response interceptor to modify response structure
267
- */
268
- globalAxios.interceptors.response.use(function (response) {
269
- return response.hasOwnProperty('success') ? response : response.data;
270
- }, function (error) {
271
- var _a;
272
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
273
- return Promise.reject(error.response.data);
274
- }
275
- return Promise.reject(error);
276
- });
277
254
  const localVarAxiosParamCreator = ProductFieldsApiAxiosParamCreator(configuration);
278
255
  return {
279
256
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -537,26 +534,6 @@ export const ProductsApiAxiosParamCreator = function (configuration) {
537
534
  * @export
538
535
  */
539
536
  export const ProductsApiFp = function (configuration) {
540
- /**
541
- * Axios interceptor to add the SDK version as a User-Agent header
542
- * */
543
- globalAxios.interceptors.request.use(function (config) {
544
- const version = require("../../package.json").version;
545
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
546
- return config;
547
- });
548
- /**
549
- * Axios response interceptor to modify response structure
550
- */
551
- globalAxios.interceptors.response.use(function (response) {
552
- return response.hasOwnProperty('success') ? response : response.data;
553
- }, function (error) {
554
- var _a;
555
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
556
- return Promise.reject(error.response.data);
557
- }
558
- return Promise.reject(error);
559
- });
560
537
  const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration);
561
538
  return {
562
539
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
@@ -182,26 +179,6 @@ export const ProjectTemplatesApiAxiosParamCreator = function (configuration) {
182
179
  * @export
183
180
  */
184
181
  export const ProjectTemplatesApiFp = function (configuration) {
185
- /**
186
- * Axios interceptor to add the SDK version as a User-Agent header
187
- * */
188
- globalAxios.interceptors.request.use(function (config) {
189
- const version = require("../../package.json").version;
190
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
191
- return config;
192
- });
193
- /**
194
- * Axios response interceptor to modify response structure
195
- */
196
- globalAxios.interceptors.response.use(function (response) {
197
- return response.hasOwnProperty('success') ? response : response.data;
198
- }, function (error) {
199
- var _a;
200
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
201
- return Promise.reject(error.response.data);
202
- }
203
- return Promise.reject(error);
204
- });
205
182
  const localVarAxiosParamCreator = ProjectTemplatesApiAxiosParamCreator(configuration);
206
183
  return {
207
184
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -552,26 +549,6 @@ export const ProjectsApiAxiosParamCreator = function (configuration) {
552
549
  * @export
553
550
  */
554
551
  export const ProjectsApiFp = function (configuration) {
555
- /**
556
- * Axios interceptor to add the SDK version as a User-Agent header
557
- * */
558
- globalAxios.interceptors.request.use(function (config) {
559
- const version = require("../../package.json").version;
560
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
561
- return config;
562
- });
563
- /**
564
- * Axios response interceptor to modify response structure
565
- */
566
- globalAxios.interceptors.response.use(function (response) {
567
- return response.hasOwnProperty('success') ? response : response.data;
568
- }, function (error) {
569
- var _a;
570
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
571
- return Promise.reject(error.response.data);
572
- }
573
- return Promise.reject(error);
574
- });
575
552
  const localVarAxiosParamCreator = ProjectsApiAxiosParamCreator(configuration);
576
553
  return {
577
554
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
@@ -90,26 +87,6 @@ export const RecentsApiAxiosParamCreator = function (configuration) {
90
87
  * @export
91
88
  */
92
89
  export const RecentsApiFp = function (configuration) {
93
- /**
94
- * Axios interceptor to add the SDK version as a User-Agent header
95
- * */
96
- globalAxios.interceptors.request.use(function (config) {
97
- const version = require("../../package.json").version;
98
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
99
- return config;
100
- });
101
- /**
102
- * Axios response interceptor to modify response structure
103
- */
104
- globalAxios.interceptors.response.use(function (response) {
105
- return response.hasOwnProperty('success') ? response : response.data;
106
- }, function (error) {
107
- var _a;
108
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
109
- return Promise.reject(error.response.data);
110
- }
111
- return Promise.reject(error);
112
- });
113
90
  const localVarAxiosParamCreator = RecentsApiAxiosParamCreator(configuration);
114
91
  return {
115
92
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -480,26 +477,6 @@ export const RolesApiAxiosParamCreator = function (configuration) {
480
477
  * @export
481
478
  */
482
479
  export const RolesApiFp = function (configuration) {
483
- /**
484
- * Axios interceptor to add the SDK version as a User-Agent header
485
- * */
486
- globalAxios.interceptors.request.use(function (config) {
487
- const version = require("../../package.json").version;
488
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
489
- return config;
490
- });
491
- /**
492
- * Axios response interceptor to modify response structure
493
- */
494
- globalAxios.interceptors.response.use(function (response) {
495
- return response.hasOwnProperty('success') ? response : response.data;
496
- }, function (error) {
497
- var _a;
498
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
499
- return Promise.reject(error.response.data);
500
- }
501
- return Promise.reject(error);
502
- });
503
480
  const localVarAxiosParamCreator = RolesApiAxiosParamCreator(configuration);
504
481
  return {
505
482
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -316,26 +313,6 @@ export const StagesApiAxiosParamCreator = function (configuration) {
316
313
  * @export
317
314
  */
318
315
  export const StagesApiFp = function (configuration) {
319
- /**
320
- * Axios interceptor to add the SDK version as a User-Agent header
321
- * */
322
- globalAxios.interceptors.request.use(function (config) {
323
- const version = require("../../package.json").version;
324
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
325
- return config;
326
- });
327
- /**
328
- * Axios response interceptor to modify response structure
329
- */
330
- globalAxios.interceptors.response.use(function (response) {
331
- return response.hasOwnProperty('success') ? response : response.data;
332
- }, function (error) {
333
- var _a;
334
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
335
- return Promise.reject(error.response.data);
336
- }
337
- return Promise.reject(error);
338
- });
339
316
  const localVarAxiosParamCreator = StagesApiAxiosParamCreator(configuration);
340
317
  return {
341
318
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -355,26 +352,6 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration) {
355
352
  * @export
356
353
  */
357
354
  export const SubscriptionsApiFp = function (configuration) {
358
- /**
359
- * Axios interceptor to add the SDK version as a User-Agent header
360
- * */
361
- globalAxios.interceptors.request.use(function (config) {
362
- const version = require("../../package.json").version;
363
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
364
- return config;
365
- });
366
- /**
367
- * Axios response interceptor to modify response structure
368
- */
369
- globalAxios.interceptors.response.use(function (response) {
370
- return response.hasOwnProperty('success') ? response : response.data;
371
- }, function (error) {
372
- var _a;
373
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
374
- return Promise.reject(error.response.data);
375
- }
376
- return Promise.reject(error);
377
- });
378
355
  const localVarAxiosParamCreator = SubscriptionsApiAxiosParamCreator(configuration);
379
356
  return {
380
357
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -234,26 +231,6 @@ export const TasksApiAxiosParamCreator = function (configuration) {
234
231
  * @export
235
232
  */
236
233
  export const TasksApiFp = function (configuration) {
237
- /**
238
- * Axios interceptor to add the SDK version as a User-Agent header
239
- * */
240
- globalAxios.interceptors.request.use(function (config) {
241
- const version = require("../../package.json").version;
242
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
243
- return config;
244
- });
245
- /**
246
- * Axios response interceptor to modify response structure
247
- */
248
- globalAxios.interceptors.response.use(function (response) {
249
- return response.hasOwnProperty('success') ? response : response.data;
250
- }, function (error) {
251
- var _a;
252
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
253
- return Promise.reject(error.response.data);
254
- }
255
- return Promise.reject(error);
256
- });
257
234
  const localVarAxiosParamCreator = TasksApiAxiosParamCreator(configuration);
258
235
  return {
259
236
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, setApiKeyToObject, setOAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
@@ -72,26 +69,6 @@ export const UserConnectionsApiAxiosParamCreator = function (configuration) {
72
69
  * @export
73
70
  */
74
71
  export const UserConnectionsApiFp = function (configuration) {
75
- /**
76
- * Axios interceptor to add the SDK version as a User-Agent header
77
- * */
78
- globalAxios.interceptors.request.use(function (config) {
79
- const version = require("../../package.json").version;
80
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
81
- return config;
82
- });
83
- /**
84
- * Axios response interceptor to modify response structure
85
- */
86
- globalAxios.interceptors.response.use(function (response) {
87
- return response.hasOwnProperty('success') ? response : response.data;
88
- }, function (error) {
89
- var _a;
90
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
91
- return Promise.reject(error.response.data);
92
- }
93
- return Promise.reject(error);
94
- });
95
72
  const localVarAxiosParamCreator = UserConnectionsApiAxiosParamCreator(configuration);
96
73
  return {
97
74
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, setApiKeyToObject, setOAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
@@ -72,26 +69,6 @@ export const UserSettingsApiAxiosParamCreator = function (configuration) {
72
69
  * @export
73
70
  */
74
71
  export const UserSettingsApiFp = function (configuration) {
75
- /**
76
- * Axios interceptor to add the SDK version as a User-Agent header
77
- * */
78
- globalAxios.interceptors.request.use(function (config) {
79
- const version = require("../../package.json").version;
80
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
81
- return config;
82
- });
83
- /**
84
- * Axios response interceptor to modify response structure
85
- */
86
- globalAxios.interceptors.response.use(function (response) {
87
- return response.hasOwnProperty('success') ? response : response.data;
88
- }, function (error) {
89
- var _a;
90
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
91
- return Promise.reject(error.response.data);
92
- }
93
- return Promise.reject(error);
94
- });
95
72
  const localVarAxiosParamCreator = UserSettingsApiAxiosParamCreator(configuration);
96
73
  return {
97
74
  /**
@@ -21,9 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import globalAxios from 'axios';
24
- // URLSearchParams not necessarily used
25
- // @ts-ignore
26
- import { URL } from 'url';
27
24
  // Some imports not used depending on template conditions
28
25
  // @ts-ignore
29
26
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
@@ -390,26 +387,6 @@ export const UsersApiAxiosParamCreator = function (configuration) {
390
387
  * @export
391
388
  */
392
389
  export const UsersApiFp = function (configuration) {
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
- * Axios response interceptor to modify response structure
403
- */
404
- globalAxios.interceptors.response.use(function (response) {
405
- return response.hasOwnProperty('success') ? response : response.data;
406
- }, function (error) {
407
- var _a;
408
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
409
- return Promise.reject(error.response.data);
410
- }
411
- return Promise.reject(error);
412
- });
413
390
  const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration);
414
391
  return {
415
392
  /**
@@ -136,26 +136,6 @@ export const WebhooksApiAxiosParamCreator = function (configuration) {
136
136
  * @export
137
137
  */
138
138
  export const WebhooksApiFp = function (configuration) {
139
- /**
140
- * Axios interceptor to add the SDK version as a User-Agent header
141
- * */
142
- globalAxios.interceptors.request.use(function (config) {
143
- const version = require("../../package.json").version;
144
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
145
- return config;
146
- });
147
- /**
148
- * Axios response interceptor to modify response structure
149
- */
150
- globalAxios.interceptors.response.use(function (response) {
151
- return response.hasOwnProperty('success') ? response : response.data;
152
- }, function (error) {
153
- var _a;
154
- if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
155
- return Promise.reject(error.response.data);
156
- }
157
- return Promise.reject(error);
158
- });
159
139
  const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration);
160
140
  return {
161
141
  /**
package/dist/esm/base.js CHANGED
@@ -23,6 +23,26 @@ export const COLLECTION_FORMATS = {
23
23
  tsv: "\t",
24
24
  pipes: "|",
25
25
  };
26
+ /**
27
+ * Axios interceptor to add the SDK version as a User-Agent header
28
+ * */
29
+ globalAxios.interceptors.request.use(function (config) {
30
+ const version = require("../package.json").version;
31
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
32
+ return config;
33
+ });
34
+ /**
35
+ * Axios response interceptor to modify response structure
36
+ */
37
+ globalAxios.interceptors.response.use(function (response) {
38
+ return response ? (response.hasOwnProperty('success') ? response : response.data) : response;
39
+ }, function (error) {
40
+ var _a;
41
+ if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
42
+ return Promise.reject(error.response.data);
43
+ }
44
+ return Promise.reject(error);
45
+ });
26
46
  /**
27
47
  *
28
48
  * @export
@@ -12,7 +12,6 @@
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
14
  import { AxiosInstance, AxiosResponse } from 'axios';
15
- import { URL } from 'url';
16
15
  /**
17
16
  *
18
17
  * @export
@@ -21,7 +21,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import { RequiredError } from "./base";
24
- import { URLSearchParams } from 'url';
25
24
  /**
26
25
  *
27
26
  * @export
@@ -21,6 +21,7 @@ export interface Parameters {
21
21
  clientId: string;
22
22
  clientSecret: string;
23
23
  redirectUri: string;
24
+ host?: string;
24
25
  }
25
26
  export type ParamKey = keyof Parameters;
26
27
  export declare class OAuth2Configuration {
@@ -25,7 +25,6 @@ import { stringify } from "qs";
25
25
  ;
26
26
  export class OAuth2Configuration {
27
27
  constructor(params) {
28
- this.host = "https://oauth.pipedrive.com";
29
28
  this.accessToken = null;
30
29
  this.refreshToken = null;
31
30
  this.scope = null;
@@ -124,6 +123,7 @@ export class OAuth2Configuration {
124
123
  this.clientId = this.validateParam(params, 'clientId');
125
124
  this.clientSecret = this.validateParam(params, 'clientSecret');
126
125
  this.redirectUri = this.validateParam(params, 'redirectUri');
126
+ this.host = params.host || "https://oauth.pipedrive.com";
127
127
  }
128
128
  get authorizationUrl() {
129
129
  return `${this.host}/oauth/authorize?client_id=${this.clientId}&redirect_uri=${encodeURIComponent(this.redirectUri)}`;
@@ -15,7 +15,8 @@ Name | Type | Description | Notes
15
15
  **endTime** | **Date** | The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS. |
16
16
  **personId** | **Number** | The ID of the person this call is associated with | [optional]
17
17
  **orgId** | **Number** | The ID of the organization this call is associated with | [optional]
18
- **dealId** | **Number** | The ID of the deal this call is associated with | [optional]
18
+ **dealId** | **Number** | The ID of the deal this call is associated with. A call log can be associated with either a deal or a lead, but not both at once. | [optional]
19
+ **leadId** | **String** | The ID of the lead in the UUID format this call is associated with. A call log can be associated with either a deal or a lead, but not both at once. | [optional]
19
20
  **note** | **String** | The note for the call log in HTML format | [optional]
20
21
 
21
22
 
package/docs/DealsApi.md CHANGED
@@ -1081,7 +1081,7 @@ let opts = {
1081
1081
  'start': 0, // Number | Pagination start
1082
1082
  'limit': 56, // Number | Items shown per page
1083
1083
  'allChanges': "allChanges_example", // String | Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
1084
- 'items': "items_example" // String | A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change)
1084
+ 'items': "items_example" // String | A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
1085
1085
  };
1086
1086
  apiInstance.getDealUpdates(id, opts).then((data) => {
1087
1087
  console.log('API called successfully. Returned data: ' + data);
@@ -1100,7 +1100,7 @@ Name | Type | Description | Notes
1100
1100
  **start** | **Number**| Pagination start | [optional] [default to 0]
1101
1101
  **limit** | **Number**| Items shown per page | [optional]
1102
1102
  **allChanges** | **String**| Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. | [optional]
1103
- **items** | **String**| A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change) | [optional]
1103
+ **items** | **String**| A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change). | [optional]
1104
1104
 
1105
1105
  ### Return type
1106
1106
 
@@ -1134,6 +1134,9 @@ let api_key = apiClient.authentications['api_key'];
1134
1134
  api_key.apiKey = 'YOUR API KEY';
1135
1135
  // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
1136
1136
  //api_key.apiKeyPrefix = 'Token';
1137
+ // Configure OAuth2 access token for authorization: oauth2
1138
+ let oauth2 = apiClient.authentications['oauth2'];
1139
+ oauth2.accessToken = 'YOUR ACCESS TOKEN';
1137
1140
 
1138
1141
  let apiInstance = new Pipedrive.DealsApi(apiClient);
1139
1142
  let id = 56; // Number | The ID of the deal
@@ -1158,7 +1161,7 @@ Name | Type | Description | Notes
1158
1161
 
1159
1162
  ### Authorization
1160
1163
 
1161
- [api_key](../README.md#api_key)
1164
+ [api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
1162
1165
 
1163
1166
  ### HTTP request headers
1164
1167
 
@@ -1326,7 +1329,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN';
1326
1329
 
1327
1330
  let apiInstance = new Pipedrive.DealsApi(apiClient);
1328
1331
  let opts = {
1329
- 'status': "status_example", // String | Only fetch deals with a specific status. open = Open, won = Won, lost = Lost
1332
+ 'status': "status_example", // String | Only fetch deals with a specific status. open = Open, won = Won, lost = Lost.
1330
1333
  'filterId': 56, // Number | <code>user_id</code> will not be considered. Only deals matching the given filter will be returned.
1331
1334
  'userId': 56, // Number | Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`.
1332
1335
  'stageId': 56 // Number | Only deals within the given stage will be returned
@@ -1344,7 +1347,7 @@ apiInstance.getDealsSummary(opts).then((data) => {
1344
1347
 
1345
1348
  Name | Type | Description | Notes
1346
1349
  ------------- | ------------- | ------------- | -------------
1347
- **status** | **String**| Only fetch deals with a specific status. open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost | [optional]
1350
+ **status** | **String**| Only fetch deals with a specific status. open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost. | [optional]
1348
1351
  **filterId** | **Number**| &lt;code&gt;user_id&lt;/code&gt; will not be considered. Only deals matching the given filter will be returned. | [optional]
1349
1352
  **userId** | **Number**| Only deals matching the given user will be returned. &#x60;user_id&#x60; will not be considered if you use &#x60;filter_id&#x60;. | [optional]
1350
1353
  **stageId** | **Number**| Only deals within the given stage will be returned | [optional]
@@ -1386,7 +1389,7 @@ let oauth2 = apiClient.authentications['oauth2'];
1386
1389
  oauth2.accessToken = 'YOUR ACCESS TOKEN';
1387
1390
 
1388
1391
  let apiInstance = new Pipedrive.DealsApi(apiClient);
1389
- let startDate = new Date("2013-10-20"); // Date | The date when the first interval starts. Format: YYYY-MM-DD
1392
+ let startDate = new Date("2013-10-20"); // Date | The date when the first interval starts. Format: YYYY-MM-DD.
1390
1393
  let interval = "interval_example"; // String | The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table>
1391
1394
  let amount = 56; // Number | The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months).
1392
1395
  let fieldKey = "fieldKey_example"; // String | The date field key which deals will be retrieved from
@@ -1410,7 +1413,7 @@ apiInstance.getDealsTimeline(startDate, interval, amount, fieldKey, opts).then((
1410
1413
 
1411
1414
  Name | Type | Description | Notes
1412
1415
  ------------- | ------------- | ------------- | -------------
1413
- **startDate** | **Date**| The date when the first interval starts. Format: YYYY-MM-DD |
1416
+ **startDate** | **Date**| The date when the first interval starts. Format: YYYY-MM-DD. |
1414
1417
  **interval** | **String**| The type of the interval&lt;table&gt;&lt;tr&gt;&lt;th&gt;Value&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;day&#x60;&lt;/td&gt;&lt;td&gt;Day&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;week&#x60;&lt;/td&gt;&lt;td&gt;A full week (7 days) starting from &#x60;start_date&#x60;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;month&#x60;&lt;/td&gt;&lt;td&gt;A full month (depending on the number of days in given month) starting from &#x60;start_date&#x60;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;quarter&#x60;&lt;/td&gt;&lt;td&gt;A full quarter (3 months) starting from &#x60;start_date&#x60;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; |
1415
1418
  **amount** | **Number**| The number of given intervals, starting from &#x60;start_date&#x60;, to fetch. E.g. 3 (months). |
1416
1419
  **fieldKey** | **String**| The date field key which deals will be retrieved from |
@@ -1637,6 +1640,9 @@ let api_key = apiClient.authentications['api_key'];
1637
1640
  api_key.apiKey = 'YOUR API KEY';
1638
1641
  // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
1639
1642
  //api_key.apiKeyPrefix = 'Token';
1643
+ // Configure OAuth2 access token for authorization: oauth2
1644
+ let oauth2 = apiClient.authentications['oauth2'];
1645
+ oauth2.accessToken = 'YOUR ACCESS TOKEN';
1640
1646
 
1641
1647
  let apiInstance = new Pipedrive.DealsApi(apiClient);
1642
1648
  let id = 56; // Number | The ID of the deal
@@ -1667,7 +1673,7 @@ Name | Type | Description | Notes
1667
1673
 
1668
1674
  ### Authorization
1669
1675
 
1670
- [api_key](../README.md#api_key)
1676
+ [api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
1671
1677
 
1672
1678
  ### HTTP request headers
1673
1679