pipedrive 18.1.4 → 19.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +21 -1
  2. package/dist/api/ActivitiesApi.js +72 -0
  3. package/dist/api/DealsApi.js +78 -12
  4. package/dist/api/LeadsApi.js +56 -0
  5. package/dist/api/ProductsApi.js +6 -6
  6. package/dist/api/RolesApi.js +125 -0
  7. package/dist/api/StagesApi.js +7 -1
  8. package/dist/index.js +108 -3
  9. package/dist/model/ActivityCollectionResponseObject.js +637 -0
  10. package/dist/model/ActivityCollectionResponseObjectAllOf.js +346 -0
  11. package/dist/model/ActivityObjectFragment.js +11 -11
  12. package/dist/model/ActivityPostObject.js +32 -17
  13. package/dist/model/ActivityPostObjectAllOf.js +10 -0
  14. package/dist/model/ActivityPutObject.js +32 -17
  15. package/dist/model/ActivityPutObjectAllOf.js +10 -0
  16. package/dist/model/ActivityResponseObject.js +55 -45
  17. package/dist/model/ActivityResponseObjectAllOf.js +22 -22
  18. package/dist/model/AddProductAttachmentDetails.js +28 -27
  19. package/dist/model/AddProductRequestBody.js +18 -11
  20. package/dist/model/AddWebhookRequest.js +29 -0
  21. package/dist/model/AdditionalDataWithCursorPagination.js +79 -0
  22. package/dist/model/AdditionalDataWithOffsetPagination.js +79 -0
  23. package/dist/model/BaseDeal.js +4 -4
  24. package/dist/model/BaseProduct.js +10 -7
  25. package/dist/model/BasicDealProduct.js +18 -7
  26. package/dist/model/DealCollectionResponseObject.js +278 -0
  27. package/dist/model/DealNonStrict.js +7 -7
  28. package/dist/model/DealNonStrictWithDetails.js +7 -7
  29. package/dist/model/DealProductUnitDuration.js +61 -0
  30. package/dist/model/DealStrict.js +7 -7
  31. package/dist/model/DealStrictWithMergeId.js +7 -7
  32. package/dist/model/DeleteDealProductData.js +0 -10
  33. package/dist/model/GetActivitiesCollectionResponse200.js +97 -0
  34. package/dist/model/GetComments.js +3 -3
  35. package/dist/model/GetDealsCollection.js +98 -0
  36. package/dist/model/GetNotes.js +3 -3
  37. package/dist/model/GetRolePipelines.js +108 -0
  38. package/dist/model/GetRolePipelinesAllOf.js +78 -0
  39. package/dist/model/GetRolePipelinesAllOfData.js +89 -0
  40. package/dist/model/ListProductFilesResponse.js +124 -0
  41. package/dist/model/ListProductFilesResponseAllOf.js +89 -0
  42. package/dist/model/NewDealProduct.js +29 -12
  43. package/dist/model/PersonListProduct.js +10 -7
  44. package/dist/model/ProductAttachmentDetails.js +28 -22
  45. package/dist/model/ProductBaseDeal.js +2 -2
  46. package/dist/model/ProductFileItem.js +219 -0
  47. package/dist/model/ProductRequest.js +10 -7
  48. package/dist/model/ProductWithArrayPrices.js +18 -11
  49. package/dist/model/ProductWithObjectPrices.js +18 -11
  50. package/dist/model/PutRolePipelinesBody.js +81 -0
  51. package/dist/model/UpdateDealProduct.js +176 -0
  52. package/dist/model/UpdateProductRequestBody.js +18 -11
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -274,6 +274,7 @@ Class | Method | HTTP request | Description
274
274
  *Pipedrive.ActivitiesApi* | [**deleteActivities**](docs/ActivitiesApi.md#deleteActivities) | **DELETE** /activities | Delete multiple activities in bulk
275
275
  *Pipedrive.ActivitiesApi* | [**deleteActivity**](docs/ActivitiesApi.md#deleteActivity) | **DELETE** /activities/{id} | Delete an activity
276
276
  *Pipedrive.ActivitiesApi* | [**getActivities**](docs/ActivitiesApi.md#getActivities) | **GET** /activities | Get all activities assigned to a particular user
277
+ *Pipedrive.ActivitiesApi* | [**getActivitiesCollection**](docs/ActivitiesApi.md#getActivitiesCollection) | **GET** /activities/collection | Get all activities (BETA)
277
278
  *Pipedrive.ActivitiesApi* | [**getActivity**](docs/ActivitiesApi.md#getActivity) | **GET** /activities/{id} | Get details of an activity
278
279
  *Pipedrive.ActivitiesApi* | [**updateActivity**](docs/ActivitiesApi.md#updateActivity) | **PUT** /activities/{id} | Update an activity
279
280
  *Pipedrive.ActivityFieldsApi* | [**getActivityFields**](docs/ActivityFieldsApi.md#getActivityFields) | **GET** /activityFields | Get all activity fields
@@ -320,6 +321,7 @@ Class | Method | HTTP request | Description
320
321
  *Pipedrive.DealsApi* | [**getDealUpdates**](docs/DealsApi.md#getDealUpdates) | **GET** /deals/{id}/flow | List updates about a deal
321
322
  *Pipedrive.DealsApi* | [**getDealUsers**](docs/DealsApi.md#getDealUsers) | **GET** /deals/{id}/permittedUsers | List permitted users
322
323
  *Pipedrive.DealsApi* | [**getDeals**](docs/DealsApi.md#getDeals) | **GET** /deals | Get all deals
324
+ *Pipedrive.DealsApi* | [**getDealsCollection**](docs/DealsApi.md#getDealsCollection) | **GET** /deals/collection | Get all deals (BETA)
323
325
  *Pipedrive.DealsApi* | [**getDealsSummary**](docs/DealsApi.md#getDealsSummary) | **GET** /deals/summary | Get deals summary
324
326
  *Pipedrive.DealsApi* | [**getDealsTimeline**](docs/DealsApi.md#getDealsTimeline) | **GET** /deals/timeline | Get deals timeline
325
327
  *Pipedrive.DealsApi* | [**mergeDeals**](docs/DealsApi.md#mergeDeals) | **PUT** /deals/{id}/merge | Merge two deals
@@ -356,6 +358,7 @@ Class | Method | HTTP request | Description
356
358
  *Pipedrive.LeadsApi* | [**addLead**](docs/LeadsApi.md#addLead) | **POST** /leads | Add a lead
357
359
  *Pipedrive.LeadsApi* | [**deleteLead**](docs/LeadsApi.md#deleteLead) | **DELETE** /leads/{id} | Delete a lead
358
360
  *Pipedrive.LeadsApi* | [**getLead**](docs/LeadsApi.md#getLead) | **GET** /leads/{id} | Get one lead
361
+ *Pipedrive.LeadsApi* | [**getLeadUsers**](docs/LeadsApi.md#getLeadUsers) | **GET** /leads/{id}/permittedUsers | List permitted users
359
362
  *Pipedrive.LeadsApi* | [**getLeads**](docs/LeadsApi.md#getLeads) | **GET** /leads | Get all leads
360
363
  *Pipedrive.LeadsApi* | [**searchLeads**](docs/LeadsApi.md#searchLeads) | **GET** /leads/search | Search leads
361
364
  *Pipedrive.LeadsApi* | [**updateLead**](docs/LeadsApi.md#updateLead) | **PATCH** /leads/{id} | Update a lead
@@ -476,9 +479,11 @@ Class | Method | HTTP request | Description
476
479
  *Pipedrive.RolesApi* | [**deleteRoleAssignment**](docs/RolesApi.md#deleteRoleAssignment) | **DELETE** /roles/{id}/assignments | Delete a role assignment
477
480
  *Pipedrive.RolesApi* | [**getRole**](docs/RolesApi.md#getRole) | **GET** /roles/{id} | Get one role
478
481
  *Pipedrive.RolesApi* | [**getRoleAssignments**](docs/RolesApi.md#getRoleAssignments) | **GET** /roles/{id}/assignments | List role assignments
482
+ *Pipedrive.RolesApi* | [**getRolePipelines**](docs/RolesApi.md#getRolePipelines) | **GET** /roles/{id}/pipelines | List pipeline visibility for a role
479
483
  *Pipedrive.RolesApi* | [**getRoleSettings**](docs/RolesApi.md#getRoleSettings) | **GET** /roles/{id}/settings | List role settings
480
484
  *Pipedrive.RolesApi* | [**getRoles**](docs/RolesApi.md#getRoles) | **GET** /roles | Get all roles
481
485
  *Pipedrive.RolesApi* | [**updateRole**](docs/RolesApi.md#updateRole) | **PUT** /roles/{id} | Update role details
486
+ *Pipedrive.RolesApi* | [**updateRolePipelines**](docs/RolesApi.md#updateRolePipelines) | **PUT** /roles/{id}/pipelines | Update pipeline visibility for a role
482
487
  *Pipedrive.StagesApi* | [**addStage**](docs/StagesApi.md#addStage) | **POST** /stages | Add a new stage
483
488
  *Pipedrive.StagesApi* | [**deleteStage**](docs/StagesApi.md#deleteStage) | **DELETE** /stages/{id} | Delete a stage
484
489
  *Pipedrive.StagesApi* | [**deleteStages**](docs/StagesApi.md#deleteStages) | **DELETE** /stages | Delete multiple stages in bulk
@@ -514,6 +519,8 @@ Class | Method | HTTP request | Description
514
519
 
515
520
  ## Documentation for Models
516
521
 
522
+ - [Pipedrive.ActivityCollectionResponseObject](docs/ActivityCollectionResponseObject.md)
523
+ - [Pipedrive.ActivityCollectionResponseObjectAllOf](docs/ActivityCollectionResponseObjectAllOf.md)
517
524
  - [Pipedrive.ActivityDistributionData](docs/ActivityDistributionData.md)
518
525
  - [Pipedrive.ActivityDistributionDataActivityDistribution](docs/ActivityDistributionDataActivityDistribution.md)
519
526
  - [Pipedrive.ActivityDistributionDataActivityDistributionASSIGNEDTOUSERID](docs/ActivityDistributionDataActivityDistributionASSIGNEDTOUSERID.md)
@@ -576,7 +583,8 @@ Class | Method | HTTP request | Description
576
583
  - [Pipedrive.AddedDealFollowerData](docs/AddedDealFollowerData.md)
577
584
  - [Pipedrive.AdditionalBaseOrganizationItemInfo](docs/AdditionalBaseOrganizationItemInfo.md)
578
585
  - [Pipedrive.AdditionalData](docs/AdditionalData.md)
579
- - [Pipedrive.AdditionalDataWithPagination](docs/AdditionalDataWithPagination.md)
586
+ - [Pipedrive.AdditionalDataWithCursorPagination](docs/AdditionalDataWithCursorPagination.md)
587
+ - [Pipedrive.AdditionalDataWithOffsetPagination](docs/AdditionalDataWithOffsetPagination.md)
580
588
  - [Pipedrive.AdditionalDataWithPaginationDetails](docs/AdditionalDataWithPaginationDetails.md)
581
589
  - [Pipedrive.AdditionalMergePersonInfo](docs/AdditionalMergePersonInfo.md)
582
590
  - [Pipedrive.AdditionalPersonInfo](docs/AdditionalPersonInfo.md)
@@ -650,6 +658,7 @@ Class | Method | HTTP request | Description
650
658
  - [Pipedrive.CreateRemoteFileAndLinkItToItem](docs/CreateRemoteFileAndLinkItToItem.md)
651
659
  - [Pipedrive.CreateTeam](docs/CreateTeam.md)
652
660
  - [Pipedrive.Currencies](docs/Currencies.md)
661
+ - [Pipedrive.DealCollectionResponseObject](docs/DealCollectionResponseObject.md)
653
662
  - [Pipedrive.DealCountAndActivityInfo](docs/DealCountAndActivityInfo.md)
654
663
  - [Pipedrive.DealFlowResponse](docs/DealFlowResponse.md)
655
664
  - [Pipedrive.DealFlowResponseAllOf](docs/DealFlowResponseAllOf.md)
@@ -676,6 +685,7 @@ Class | Method | HTTP request | Description
676
685
  - [Pipedrive.DealPersonDataPhone](docs/DealPersonDataPhone.md)
677
686
  - [Pipedrive.DealPersonDataWithId](docs/DealPersonDataWithId.md)
678
687
  - [Pipedrive.DealPersonDataWithIdAllOf](docs/DealPersonDataWithIdAllOf.md)
688
+ - [Pipedrive.DealProductUnitDuration](docs/DealProductUnitDuration.md)
679
689
  - [Pipedrive.DealSearchItem](docs/DealSearchItem.md)
680
690
  - [Pipedrive.DealSearchItemItem](docs/DealSearchItemItem.md)
681
691
  - [Pipedrive.DealSearchItemItemOrganization](docs/DealSearchItemItemOrganization.md)
@@ -796,6 +806,7 @@ Class | Method | HTTP request | Description
796
806
  - [Pipedrive.FollowerDataWithIDAllOf](docs/FollowerDataWithIDAllOf.md)
797
807
  - [Pipedrive.FullRole](docs/FullRole.md)
798
808
  - [Pipedrive.FullRoleAllOf](docs/FullRoleAllOf.md)
809
+ - [Pipedrive.GetActivitiesCollectionResponse200](docs/GetActivitiesCollectionResponse200.md)
799
810
  - [Pipedrive.GetActivitiesResponse200](docs/GetActivitiesResponse200.md)
800
811
  - [Pipedrive.GetActivitiesResponse200RelatedObjects](docs/GetActivitiesResponse200RelatedObjects.md)
801
812
  - [Pipedrive.GetActivityResponse200](docs/GetActivityResponse200.md)
@@ -812,6 +823,7 @@ Class | Method | HTTP request | Description
812
823
  - [Pipedrive.GetDeal](docs/GetDeal.md)
813
824
  - [Pipedrive.GetDealAdditionalData](docs/GetDealAdditionalData.md)
814
825
  - [Pipedrive.GetDeals](docs/GetDeals.md)
826
+ - [Pipedrive.GetDealsCollection](docs/GetDealsCollection.md)
815
827
  - [Pipedrive.GetDealsConversionRatesInPipeline](docs/GetDealsConversionRatesInPipeline.md)
816
828
  - [Pipedrive.GetDealsConversionRatesInPipelineAllOf](docs/GetDealsConversionRatesInPipelineAllOf.md)
817
829
  - [Pipedrive.GetDealsConversionRatesInPipelineAllOfData](docs/GetDealsConversionRatesInPipelineAllOfData.md)
@@ -854,6 +866,9 @@ Class | Method | HTTP request | Description
854
866
  - [Pipedrive.GetRoleAllOfAdditionalData](docs/GetRoleAllOfAdditionalData.md)
855
867
  - [Pipedrive.GetRoleAssignments](docs/GetRoleAssignments.md)
856
868
  - [Pipedrive.GetRoleAssignmentsAllOf](docs/GetRoleAssignmentsAllOf.md)
869
+ - [Pipedrive.GetRolePipelines](docs/GetRolePipelines.md)
870
+ - [Pipedrive.GetRolePipelinesAllOf](docs/GetRolePipelinesAllOf.md)
871
+ - [Pipedrive.GetRolePipelinesAllOfData](docs/GetRolePipelinesAllOfData.md)
857
872
  - [Pipedrive.GetRoleSettings](docs/GetRoleSettings.md)
858
873
  - [Pipedrive.GetRoleSettingsAllOf](docs/GetRoleSettingsAllOf.md)
859
874
  - [Pipedrive.GetRoles](docs/GetRoles.md)
@@ -927,6 +942,8 @@ Class | Method | HTTP request | Description
927
942
  - [Pipedrive.ListPersonsResponseAllOfRelatedObjects](docs/ListPersonsResponseAllOfRelatedObjects.md)
928
943
  - [Pipedrive.ListProductAdditionalData](docs/ListProductAdditionalData.md)
929
944
  - [Pipedrive.ListProductAdditionalDataAllOf](docs/ListProductAdditionalDataAllOf.md)
945
+ - [Pipedrive.ListProductFilesResponse](docs/ListProductFilesResponse.md)
946
+ - [Pipedrive.ListProductFilesResponseAllOf](docs/ListProductFilesResponseAllOf.md)
930
947
  - [Pipedrive.ListProductFollowersResponse](docs/ListProductFollowersResponse.md)
931
948
  - [Pipedrive.ListProductFollowersResponseAllOf](docs/ListProductFollowersResponseAllOf.md)
932
949
  - [Pipedrive.ListProductFollowersResponseAllOfData](docs/ListProductFollowersResponseAllOfData.md)
@@ -1102,6 +1119,7 @@ Class | Method | HTTP request | Description
1102
1119
  - [Pipedrive.ProductBaseDeal](docs/ProductBaseDeal.md)
1103
1120
  - [Pipedrive.ProductField](docs/ProductField.md)
1104
1121
  - [Pipedrive.ProductFieldAllOf](docs/ProductFieldAllOf.md)
1122
+ - [Pipedrive.ProductFileItem](docs/ProductFileItem.md)
1105
1123
  - [Pipedrive.ProductListItem](docs/ProductListItem.md)
1106
1124
  - [Pipedrive.ProductRequest](docs/ProductRequest.md)
1107
1125
  - [Pipedrive.ProductResponse](docs/ProductResponse.md)
@@ -1117,6 +1135,7 @@ Class | Method | HTTP request | Description
1117
1135
  - [Pipedrive.PutRole](docs/PutRole.md)
1118
1136
  - [Pipedrive.PutRoleAllOf](docs/PutRoleAllOf.md)
1119
1137
  - [Pipedrive.PutRoleAllOfData](docs/PutRoleAllOfData.md)
1138
+ - [Pipedrive.PutRolePipelinesBody](docs/PutRolePipelinesBody.md)
1120
1139
  - [Pipedrive.RecentDataProduct](docs/RecentDataProduct.md)
1121
1140
  - [Pipedrive.RecentsActivity](docs/RecentsActivity.md)
1122
1141
  - [Pipedrive.RecentsActivityType](docs/RecentsActivityType.md)
@@ -1178,6 +1197,7 @@ Class | Method | HTTP request | Description
1178
1197
  - [Pipedrive.TeamsAllOf](docs/TeamsAllOf.md)
1179
1198
  - [Pipedrive.Unauthorized](docs/Unauthorized.md)
1180
1199
  - [Pipedrive.UpdateActivityResponse200](docs/UpdateActivityResponse200.md)
1200
+ - [Pipedrive.UpdateDealProduct](docs/UpdateDealProduct.md)
1181
1201
  - [Pipedrive.UpdateDealRequest](docs/UpdateDealRequest.md)
1182
1202
  - [Pipedrive.UpdateFile](docs/UpdateFile.md)
1183
1203
  - [Pipedrive.UpdateFilterRequest](docs/UpdateFilterRequest.md)
@@ -14,6 +14,8 @@ var _ActivityPutObject = _interopRequireDefault(require("../model/ActivityPutObj
14
14
  var _AddActivityResponse = _interopRequireDefault(require("../model/AddActivityResponse200"));
15
15
  var _DeleteActivitiesResponse = _interopRequireDefault(require("../model/DeleteActivitiesResponse200"));
16
16
  var _DeleteActivityResponse = _interopRequireDefault(require("../model/DeleteActivityResponse200"));
17
+ var _FailResponse = _interopRequireDefault(require("../model/FailResponse"));
18
+ var _GetActivitiesCollectionResponse = _interopRequireDefault(require("../model/GetActivitiesCollectionResponse200"));
17
19
  var _GetActivitiesResponse = _interopRequireDefault(require("../model/GetActivitiesResponse200"));
18
20
  var _GetActivityResponse = _interopRequireDefault(require("../model/GetActivityResponse200"));
19
21
  var _NumberBoolean = _interopRequireDefault(require("../model/NumberBoolean"));
@@ -271,6 +273,76 @@ var ActivitiesApi = /*#__PURE__*/function () {
271
273
  });
272
274
  }
273
275
 
276
+ /**
277
+ * Get all activities (BETA)
278
+ * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href=\"https://support.pipedrive.com/en/article/global-user-management\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
279
+ * @param {Object} opts Optional parameters
280
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
281
+ * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
282
+ * @param {String} opts.since The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
283
+ * @param {String} opts.until The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
284
+ * @param {Number} opts.userId The ID of the user whose activities will be fetched. If omitted, all activities are returned.
285
+ * @param {module:model/NumberBoolean} opts.done Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both done and not done activities.
286
+ * @param {String} opts.type The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
287
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetActivitiesCollectionResponse200} and HTTP response
288
+ */
289
+ }, {
290
+ key: "getActivitiesCollectionWithHttpInfo",
291
+ value: function getActivitiesCollectionWithHttpInfo(opts) {
292
+ opts = opts || {};
293
+ var postBody = null;
294
+ var pathParams = {};
295
+ var queryParams = {
296
+ 'cursor': opts['cursor'] === undefined ? opts['cursor'] : opts['cursor'],
297
+ 'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit'],
298
+ 'since': opts['since'] === undefined ? opts['since'] : opts['since'],
299
+ 'until': opts['until'] === undefined ? opts['until'] : opts['until'],
300
+ 'user_id': opts['user_id'] === undefined ? opts['userId'] : opts['user_id'],
301
+ 'done': opts['done'] === undefined ? opts['done'] : opts['done'],
302
+ 'type': opts['type'] === undefined ? opts['type'] : opts['type']
303
+ };
304
+ var headerParams = {};
305
+ var formParams = {};
306
+ var formParamArray = [];
307
+ var contentTypes = [];
308
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
309
+ var isJSON = contentTypes.includes('application/json');
310
+ if (isJSON) {
311
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
312
+ } else if (isURLEncoded) {
313
+ for (var key in opts) {
314
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
315
+ formParams[key] = opts[key];
316
+ }
317
+ }
318
+ }
319
+ var authNames = ['api_key', 'oauth2'];
320
+ var accepts = ['application/json'];
321
+ var returnType = _GetActivitiesCollectionResponse["default"];
322
+ return this.apiClient.callApi('/activities/collection', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
323
+ }
324
+
325
+ /**
326
+ * Get all activities (BETA)
327
+ * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href=\"https://support.pipedrive.com/en/article/global-user-management\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
328
+ * @param {Object} opts Optional parameters
329
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
330
+ * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
331
+ * @param {String} opts.since The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
332
+ * @param {String} opts.until The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
333
+ * @param {Number} opts.userId The ID of the user whose activities will be fetched. If omitted, all activities are returned.
334
+ * @param {module:model/NumberBoolean} opts.done Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both done and not done activities.
335
+ * @param {String} opts.type The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
336
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetActivitiesCollectionResponse200}
337
+ */
338
+ }, {
339
+ key: "getActivitiesCollection",
340
+ value: function getActivitiesCollection(opts) {
341
+ return this.getActivitiesCollectionWithHttpInfo(opts).then(function (response_and_data) {
342
+ return response_and_data;
343
+ });
344
+ }
345
+
274
346
  /**
275
347
  * Get details of an activity
276
348
  * Returns the details of a specific activity.
@@ -12,7 +12,6 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
12
12
  var _AddDealFollowerRequest = _interopRequireDefault(require("../model/AddDealFollowerRequest"));
13
13
  var _AddDealParticipantRequest = _interopRequireDefault(require("../model/AddDealParticipantRequest"));
14
14
  var _AddedDealFollower = _interopRequireDefault(require("../model/AddedDealFollower"));
15
- var _BasicDealProduct = _interopRequireDefault(require("../model/BasicDealProduct"));
16
15
  var _DealFlowResponse = _interopRequireDefault(require("../model/DealFlowResponse"));
17
16
  var _DealListActivitiesResponse = _interopRequireDefault(require("../model/DealListActivitiesResponse"));
18
17
  var _DealParticipants = _interopRequireDefault(require("../model/DealParticipants"));
@@ -22,10 +21,12 @@ var _DeleteDealFollower = _interopRequireDefault(require("../model/DeleteDealFol
22
21
  var _DeleteDealParticipant = _interopRequireDefault(require("../model/DeleteDealParticipant"));
23
22
  var _DeleteDealProduct = _interopRequireDefault(require("../model/DeleteDealProduct"));
24
23
  var _DeleteMultipleDeals = _interopRequireDefault(require("../model/DeleteMultipleDeals"));
24
+ var _FailResponse = _interopRequireDefault(require("../model/FailResponse"));
25
25
  var _GetAddProductAttachementDetails = _interopRequireDefault(require("../model/GetAddProductAttachementDetails"));
26
26
  var _GetAddedDeal = _interopRequireDefault(require("../model/GetAddedDeal"));
27
27
  var _GetDeal = _interopRequireDefault(require("../model/GetDeal"));
28
28
  var _GetDeals = _interopRequireDefault(require("../model/GetDeals"));
29
+ var _GetDealsCollection = _interopRequireDefault(require("../model/GetDealsCollection"));
29
30
  var _GetDealsSummary = _interopRequireDefault(require("../model/GetDealsSummary"));
30
31
  var _GetDealsTimeline = _interopRequireDefault(require("../model/GetDealsTimeline"));
31
32
  var _GetDuplicatedDeal = _interopRequireDefault(require("../model/GetDuplicatedDeal"));
@@ -42,6 +43,7 @@ var _NewDeal = _interopRequireDefault(require("../model/NewDeal"));
42
43
  var _NewDealProduct = _interopRequireDefault(require("../model/NewDealProduct"));
43
44
  var _NumberBoolean = _interopRequireDefault(require("../model/NumberBoolean"));
44
45
  var _PostDealParticipants = _interopRequireDefault(require("../model/PostDealParticipants"));
46
+ var _UpdateDealProduct = _interopRequireDefault(require("../model/UpdateDealProduct"));
45
47
  var _UpdateDealRequest = _interopRequireDefault(require("../model/UpdateDealRequest"));
46
48
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
47
49
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -481,7 +483,7 @@ var DealsApi = /*#__PURE__*/function () {
481
483
  * Delete an attached product from a deal
482
484
  * Deletes a product attachment from a deal, using the `product_attachment_id`.
483
485
  * @param {Number} id The ID of the deal
484
- * @param {Number} productAttachmentId The product attachment ID. This is returned as `product_attachment_id` after attaching a product to a deal or as id when listing the products attached to a deal.
486
+ * @param {Number} productAttachmentId The product attachment ID
485
487
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDealProduct} and HTTP response
486
488
  */
487
489
  }, {
@@ -529,7 +531,7 @@ var DealsApi = /*#__PURE__*/function () {
529
531
  * Delete an attached product from a deal
530
532
  * Deletes a product attachment from a deal, using the `product_attachment_id`.
531
533
  * @param {Number} id The ID of the deal
532
- * @param {Number} productAttachmentId The product attachment ID. This is returned as `product_attachment_id` after attaching a product to a deal or as id when listing the products attached to a deal.
534
+ * @param {Number} productAttachmentId The product attachment ID
533
535
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDealProduct}
534
536
  */
535
537
  }, {
@@ -1354,6 +1356,76 @@ var DealsApi = /*#__PURE__*/function () {
1354
1356
  });
1355
1357
  }
1356
1358
 
1359
+ /**
1360
+ * Get all deals (BETA)
1361
+ * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href=\"https://support.pipedrive.com/en/article/global-user-management\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
1362
+ * @param {Object} opts Optional parameters
1363
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
1364
+ * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1365
+ * @param {String} opts.since The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
1366
+ * @param {String} opts.until The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
1367
+ * @param {Number} opts.userId If supplied, only deals matching the given user will be returned
1368
+ * @param {Number} opts.stageId If supplied, only deals within the given stage will be returned
1369
+ * @param {module:model/String} opts.status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
1370
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDealsCollection} and HTTP response
1371
+ */
1372
+ }, {
1373
+ key: "getDealsCollectionWithHttpInfo",
1374
+ value: function getDealsCollectionWithHttpInfo(opts) {
1375
+ opts = opts || {};
1376
+ var postBody = null;
1377
+ var pathParams = {};
1378
+ var queryParams = {
1379
+ 'cursor': opts['cursor'] === undefined ? opts['cursor'] : opts['cursor'],
1380
+ 'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit'],
1381
+ 'since': opts['since'] === undefined ? opts['since'] : opts['since'],
1382
+ 'until': opts['until'] === undefined ? opts['until'] : opts['until'],
1383
+ 'user_id': opts['user_id'] === undefined ? opts['userId'] : opts['user_id'],
1384
+ 'stage_id': opts['stage_id'] === undefined ? opts['stageId'] : opts['stage_id'],
1385
+ 'status': opts['status'] === undefined ? opts['status'] : opts['status']
1386
+ };
1387
+ var headerParams = {};
1388
+ var formParams = {};
1389
+ var formParamArray = [];
1390
+ var contentTypes = [];
1391
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
1392
+ var isJSON = contentTypes.includes('application/json');
1393
+ if (isJSON) {
1394
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
1395
+ } else if (isURLEncoded) {
1396
+ for (var key in opts) {
1397
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
1398
+ formParams[key] = opts[key];
1399
+ }
1400
+ }
1401
+ }
1402
+ var authNames = ['api_key', 'oauth2'];
1403
+ var accepts = ['application/json'];
1404
+ var returnType = _GetDealsCollection["default"];
1405
+ return this.apiClient.callApi('/deals/collection', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1406
+ }
1407
+
1408
+ /**
1409
+ * Get all deals (BETA)
1410
+ * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href=\"https://support.pipedrive.com/en/article/global-user-management\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
1411
+ * @param {Object} opts Optional parameters
1412
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
1413
+ * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1414
+ * @param {String} opts.since The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
1415
+ * @param {String} opts.until The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
1416
+ * @param {Number} opts.userId If supplied, only deals matching the given user will be returned
1417
+ * @param {Number} opts.stageId If supplied, only deals within the given stage will be returned
1418
+ * @param {module:model/String} opts.status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
1419
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDealsCollection}
1420
+ */
1421
+ }, {
1422
+ key: "getDealsCollection",
1423
+ value: function getDealsCollection(opts) {
1424
+ return this.getDealsCollectionWithHttpInfo(opts).then(function (response_and_data) {
1425
+ return response_and_data;
1426
+ });
1427
+ }
1428
+
1357
1429
  /**
1358
1430
  * Get deals summary
1359
1431
  * Returns a summary of all the deals.
@@ -1719,14 +1791,14 @@ var DealsApi = /*#__PURE__*/function () {
1719
1791
  * @param {Number} id The ID of the deal
1720
1792
  * @param {Number} productAttachmentId The ID of the deal-product (the ID of the product attached to the deal)
1721
1793
  * @param {Object} opts Optional parameters
1722
- * @param {module:model/BasicDealProduct} opts.basicDealProduct
1794
+ * @param {module:model/UpdateDealProduct} opts.updateDealProduct
1723
1795
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProductAttachementDetails} and HTTP response
1724
1796
  */
1725
1797
  }, {
1726
1798
  key: "updateDealProductWithHttpInfo",
1727
1799
  value: function updateDealProductWithHttpInfo(id, productAttachmentId, opts) {
1728
1800
  opts = opts || {};
1729
- var postBody = opts['basicDealProduct'];
1801
+ var postBody = opts['updateDealProduct'];
1730
1802
 
1731
1803
  // verify the required parameter 'id' is set
1732
1804
  if (id === undefined || id === null) {
@@ -1740,12 +1812,6 @@ var DealsApi = /*#__PURE__*/function () {
1740
1812
  if (opts['product_id'] === undefined || opts['product_id'] === null) {
1741
1813
  throw new Error("Missing the required parameter 'product_id' when calling updateDealProduct");
1742
1814
  }
1743
- if (opts['item_price'] === undefined || opts['item_price'] === null) {
1744
- throw new Error("Missing the required parameter 'item_price' when calling updateDealProduct");
1745
- }
1746
- if (opts['quantity'] === undefined || opts['quantity'] === null) {
1747
- throw new Error("Missing the required parameter 'quantity' when calling updateDealProduct");
1748
- }
1749
1815
  var pathParams = {
1750
1816
  'id': id,
1751
1817
  'product_attachment_id': productAttachmentId
@@ -1778,7 +1844,7 @@ var DealsApi = /*#__PURE__*/function () {
1778
1844
  * @param {Number} id The ID of the deal
1779
1845
  * @param {Number} productAttachmentId The ID of the deal-product (the ID of the product attached to the deal)
1780
1846
  * @param {Object} opts Optional parameters
1781
- * @param {module:model/BasicDealProduct} opts.basicDealProduct
1847
+ * @param {module:model/UpdateDealProduct} opts.updateDealProduct
1782
1848
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProductAttachementDetails}
1783
1849
  */
1784
1850
  }, {
@@ -16,6 +16,7 @@ var _LeadResponse = _interopRequireDefault(require("../model/LeadResponse404"));
16
16
  var _LeadSearchResponse = _interopRequireDefault(require("../model/LeadSearchResponse"));
17
17
  var _OneLeadResponse = _interopRequireDefault(require("../model/OneLeadResponse200"));
18
18
  var _UpdateLeadRequest = _interopRequireDefault(require("../model/UpdateLeadRequest"));
19
+ var _UserIDs = _interopRequireDefault(require("../model/UserIDs"));
19
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
21
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
22
  /**
@@ -199,6 +200,61 @@ var LeadsApi = /*#__PURE__*/function () {
199
200
  });
200
201
  }
201
202
 
203
+ /**
204
+ * List permitted users
205
+ * Lists the users permitted to access a lead.
206
+ * @param {String} id The ID of the lead
207
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserIDs} and HTTP response
208
+ */
209
+ }, {
210
+ key: "getLeadUsersWithHttpInfo",
211
+ value: function getLeadUsersWithHttpInfo(id) {
212
+ var opts = {};
213
+ var postBody = null;
214
+
215
+ // verify the required parameter 'id' is set
216
+ if (id === undefined || id === null) {
217
+ throw new Error("Missing the required parameter 'id' when calling getLeadUsers");
218
+ }
219
+ var pathParams = {
220
+ 'id': id
221
+ };
222
+ var queryParams = {};
223
+ var headerParams = {};
224
+ var formParams = {};
225
+ var formParamArray = [];
226
+ var contentTypes = [];
227
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
228
+ var isJSON = contentTypes.includes('application/json');
229
+ if (isJSON) {
230
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
231
+ } else if (isURLEncoded) {
232
+ for (var key in opts) {
233
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
234
+ formParams[key] = opts[key];
235
+ }
236
+ }
237
+ }
238
+ var authNames = ['api_key'];
239
+ var accepts = ['application/json'];
240
+ var returnType = _UserIDs["default"];
241
+ return this.apiClient.callApi('/leads/{id}/permittedUsers', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
242
+ }
243
+
244
+ /**
245
+ * List permitted users
246
+ * Lists the users permitted to access a lead.
247
+ * @param {String} id The ID of the lead
248
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserIDs}
249
+ */
250
+ }, {
251
+ key: "getLeadUsers",
252
+ value: function getLeadUsers(id) {
253
+ return this.getLeadUsersWithHttpInfo(id).then(function (response_and_data) {
254
+ return response_and_data;
255
+ });
256
+ }
257
+
202
258
  /**
203
259
  * Get all leads
204
260
  * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.
@@ -14,7 +14,7 @@ var _AddProductRequestBody = _interopRequireDefault(require("../model/AddProduct
14
14
  var _DeleteProductFollowerResponse = _interopRequireDefault(require("../model/DeleteProductFollowerResponse"));
15
15
  var _DeleteProductResponse = _interopRequireDefault(require("../model/DeleteProductResponse"));
16
16
  var _ListDealsResponse = _interopRequireDefault(require("../model/ListDealsResponse"));
17
- var _ListFilesResponse = _interopRequireDefault(require("../model/ListFilesResponse"));
17
+ var _ListProductFilesResponse = _interopRequireDefault(require("../model/ListProductFilesResponse"));
18
18
  var _ListProductFollowersResponse = _interopRequireDefault(require("../model/ListProductFollowersResponse"));
19
19
  var _NewFollowerResponse = _interopRequireDefault(require("../model/NewFollowerResponse"));
20
20
  var _ProductResponse = _interopRequireDefault(require("../model/ProductResponse"));
@@ -402,8 +402,8 @@ var ProductsApi = /*#__PURE__*/function () {
402
402
  * @param {Object} opts Optional parameters
403
403
  * @param {Number} opts.start Pagination start (default to 0)
404
404
  * @param {Number} opts.limit Items shown per page
405
- * @param {String} opts.sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
406
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListFilesResponse} and HTTP response
405
+ * @param {String} opts.sort The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`
406
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListProductFilesResponse} and HTTP response
407
407
  */
408
408
  }, {
409
409
  key: "getProductFilesWithHttpInfo",
@@ -440,7 +440,7 @@ var ProductsApi = /*#__PURE__*/function () {
440
440
  }
441
441
  var authNames = ['api_key', 'oauth2'];
442
442
  var accepts = ['application/json'];
443
- var returnType = _ListFilesResponse["default"];
443
+ var returnType = _ListProductFilesResponse["default"];
444
444
  return this.apiClient.callApi('/products/{id}/files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
445
445
  }
446
446
 
@@ -451,8 +451,8 @@ var ProductsApi = /*#__PURE__*/function () {
451
451
  * @param {Object} opts Optional parameters
452
452
  * @param {Number} opts.start Pagination start (default to 0)
453
453
  * @param {Number} opts.limit Items shown per page
454
- * @param {String} opts.sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
455
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListFilesResponse}
454
+ * @param {String} opts.sort The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`
455
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListProductFilesResponse}
456
456
  */
457
457
  }, {
458
458
  key: "getProductFiles",