pipedrive 18.1.4 → 19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +21 -1
- package/dist/api/ActivitiesApi.js +76 -5
- package/dist/api/DealsApi.js +91 -25
- package/dist/api/LeadsApi.js +56 -0
- package/dist/api/ProductsApi.js +6 -6
- package/dist/api/RolesApi.js +125 -0
- package/dist/api/StagesApi.js +7 -1
- package/dist/index.js +108 -3
- package/dist/model/ActivityCollectionResponseObject.js +637 -0
- package/dist/model/ActivityCollectionResponseObjectAllOf.js +346 -0
- package/dist/model/ActivityObjectFragment.js +11 -11
- package/dist/model/ActivityPostObject.js +32 -17
- package/dist/model/ActivityPostObjectAllOf.js +10 -0
- package/dist/model/ActivityPutObject.js +32 -17
- package/dist/model/ActivityPutObjectAllOf.js +10 -0
- package/dist/model/ActivityResponseObject.js +55 -45
- package/dist/model/ActivityResponseObjectAllOf.js +22 -22
- package/dist/model/AddProductAttachmentDetails.js +29 -28
- package/dist/model/AddProductRequestBody.js +18 -11
- package/dist/model/AddWebhookRequest.js +29 -0
- package/dist/model/AdditionalDataWithCursorPagination.js +79 -0
- package/dist/model/AdditionalDataWithOffsetPagination.js +79 -0
- package/dist/model/BaseDeal.js +1 -1
- package/dist/model/BaseProduct.js +10 -7
- package/dist/model/BasicDealProduct.js +19 -8
- package/dist/model/DealCollectionResponseObject.js +278 -0
- package/dist/model/DealNonStrict.js +2 -2
- package/dist/model/DealNonStrictWithDetails.js +2 -2
- package/dist/model/DealProductUnitDuration.js +61 -0
- package/dist/model/DealStrict.js +2 -2
- package/dist/model/DealStrictWithMergeId.js +2 -2
- package/dist/model/DeleteDealProductData.js +0 -10
- package/dist/model/GetActivitiesCollectionResponse200.js +97 -0
- package/dist/model/GetComments.js +3 -3
- package/dist/model/GetDealsCollection.js +98 -0
- package/dist/model/GetNotes.js +3 -3
- package/dist/model/GetRolePipelines.js +108 -0
- package/dist/model/GetRolePipelinesAllOf.js +78 -0
- package/dist/model/GetRolePipelinesAllOfData.js +89 -0
- package/dist/model/ListProductFilesResponse.js +124 -0
- package/dist/model/ListProductFilesResponseAllOf.js +89 -0
- package/dist/model/NewDealProduct.js +30 -13
- package/dist/model/PersonListProduct.js +10 -7
- package/dist/model/ProductAttachmentDetails.js +29 -23
- package/dist/model/ProductBaseDeal.js +1 -1
- package/dist/model/ProductFileItem.js +219 -0
- package/dist/model/ProductRequest.js +10 -7
- package/dist/model/ProductWithArrayPrices.js +18 -11
- package/dist/model/ProductWithObjectPrices.js +18 -11
- package/dist/model/PutRolePipelinesBody.js +81 -0
- package/dist/model/UpdateDealProduct.js +176 -0
- package/dist/model/UpdateProductRequestBody.js +18 -11
- 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.
|
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,7 @@ 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 _GetActivitiesCollectionResponse = _interopRequireDefault(require("../model/GetActivitiesCollectionResponse200"));
|
17
18
|
var _GetActivitiesResponse = _interopRequireDefault(require("../model/GetActivitiesResponse200"));
|
18
19
|
var _GetActivityResponse = _interopRequireDefault(require("../model/GetActivityResponse200"));
|
19
20
|
var _NumberBoolean = _interopRequireDefault(require("../model/NumberBoolean"));
|
@@ -27,7 +28,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
27
28
|
*/
|
28
29
|
var ActivitiesApi = /*#__PURE__*/function () {
|
29
30
|
/**
|
30
|
-
* Constructs a new ActivitiesApi.
|
31
|
+
* Constructs a new ActivitiesApi.
|
31
32
|
* @alias module:api/ActivitiesApi
|
32
33
|
* @class
|
33
34
|
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
@@ -42,7 +43,7 @@ var ActivitiesApi = /*#__PURE__*/function () {
|
|
42
43
|
* Add an activity
|
43
44
|
* Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-an-activity\" target=\"_blank\" rel=\"noopener noreferrer\">adding an activity</a>.
|
44
45
|
* @param {Object} opts Optional parameters
|
45
|
-
* @param {module:model/ActivityPostObject} opts.activityPostObject
|
46
|
+
* @param {module:model/ActivityPostObject} opts.activityPostObject
|
46
47
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddActivityResponse200} and HTTP response
|
47
48
|
*/
|
48
49
|
(0, _createClass2["default"])(ActivitiesApi, [{
|
@@ -77,7 +78,7 @@ var ActivitiesApi = /*#__PURE__*/function () {
|
|
77
78
|
* Add an activity
|
78
79
|
* Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-an-activity\" target=\"_blank\" rel=\"noopener noreferrer\">adding an activity</a>.
|
79
80
|
* @param {Object} opts Optional parameters
|
80
|
-
* @param {module:model/ActivityPostObject} opts.activityPostObject
|
81
|
+
* @param {module:model/ActivityPostObject} opts.activityPostObject
|
81
82
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddActivityResponse200}
|
82
83
|
*/
|
83
84
|
}, {
|
@@ -271,6 +272,76 @@ var ActivitiesApi = /*#__PURE__*/function () {
|
|
271
272
|
});
|
272
273
|
}
|
273
274
|
|
275
|
+
/**
|
276
|
+
* Get all activities (BETA)
|
277
|
+
* 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>.
|
278
|
+
* @param {Object} opts Optional parameters
|
279
|
+
* @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
|
280
|
+
* @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.
|
281
|
+
* @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.
|
282
|
+
* @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.
|
283
|
+
* @param {Number} opts.userId The ID of the user whose activities will be fetched. If omitted, all activities are returned.
|
284
|
+
* @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.
|
285
|
+
* @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.
|
286
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetActivitiesCollectionResponse200} and HTTP response
|
287
|
+
*/
|
288
|
+
}, {
|
289
|
+
key: "getActivitiesCollectionWithHttpInfo",
|
290
|
+
value: function getActivitiesCollectionWithHttpInfo(opts) {
|
291
|
+
opts = opts || {};
|
292
|
+
var postBody = null;
|
293
|
+
var pathParams = {};
|
294
|
+
var queryParams = {
|
295
|
+
'cursor': opts['cursor'] === undefined ? opts['cursor'] : opts['cursor'],
|
296
|
+
'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit'],
|
297
|
+
'since': opts['since'] === undefined ? opts['since'] : opts['since'],
|
298
|
+
'until': opts['until'] === undefined ? opts['until'] : opts['until'],
|
299
|
+
'user_id': opts['user_id'] === undefined ? opts['userId'] : opts['user_id'],
|
300
|
+
'done': opts['done'] === undefined ? opts['done'] : opts['done'],
|
301
|
+
'type': opts['type'] === undefined ? opts['type'] : opts['type']
|
302
|
+
};
|
303
|
+
var headerParams = {};
|
304
|
+
var formParams = {};
|
305
|
+
var formParamArray = [];
|
306
|
+
var contentTypes = [];
|
307
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
308
|
+
var isJSON = contentTypes.includes('application/json');
|
309
|
+
if (isJSON) {
|
310
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
311
|
+
} else if (isURLEncoded) {
|
312
|
+
for (var key in opts) {
|
313
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
314
|
+
formParams[key] = opts[key];
|
315
|
+
}
|
316
|
+
}
|
317
|
+
}
|
318
|
+
var authNames = ['api_key', 'oauth2'];
|
319
|
+
var accepts = ['application/json'];
|
320
|
+
var returnType = _GetActivitiesCollectionResponse["default"];
|
321
|
+
return this.apiClient.callApi('/activities/collection', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
322
|
+
}
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Get all activities (BETA)
|
326
|
+
* 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>.
|
327
|
+
* @param {Object} opts Optional parameters
|
328
|
+
* @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
|
329
|
+
* @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.
|
330
|
+
* @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.
|
331
|
+
* @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.
|
332
|
+
* @param {Number} opts.userId The ID of the user whose activities will be fetched. If omitted, all activities are returned.
|
333
|
+
* @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.
|
334
|
+
* @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.
|
335
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetActivitiesCollectionResponse200}
|
336
|
+
*/
|
337
|
+
}, {
|
338
|
+
key: "getActivitiesCollection",
|
339
|
+
value: function getActivitiesCollection(opts) {
|
340
|
+
return this.getActivitiesCollectionWithHttpInfo(opts).then(function (response_and_data) {
|
341
|
+
return response_and_data;
|
342
|
+
});
|
343
|
+
}
|
344
|
+
|
274
345
|
/**
|
275
346
|
* Get details of an activity
|
276
347
|
* Returns the details of a specific activity.
|
@@ -331,7 +402,7 @@ var ActivitiesApi = /*#__PURE__*/function () {
|
|
331
402
|
* Updates an activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
|
332
403
|
* @param {Number} id The ID of the activity
|
333
404
|
* @param {Object} opts Optional parameters
|
334
|
-
* @param {module:model/ActivityPutObject} opts.activityPutObject
|
405
|
+
* @param {module:model/ActivityPutObject} opts.activityPutObject
|
335
406
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateActivityResponse200} and HTTP response
|
336
407
|
*/
|
337
408
|
}, {
|
@@ -374,7 +445,7 @@ var ActivitiesApi = /*#__PURE__*/function () {
|
|
374
445
|
* Updates an activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
|
375
446
|
* @param {Number} id The ID of the activity
|
376
447
|
* @param {Object} opts Optional parameters
|
377
|
-
* @param {module:model/ActivityPutObject} opts.activityPutObject
|
448
|
+
* @param {module:model/ActivityPutObject} opts.activityPutObject
|
378
449
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateActivityResponse200}
|
379
450
|
*/
|
380
451
|
}, {
|
package/dist/api/DealsApi.js
CHANGED
@@ -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; }
|
@@ -52,7 +54,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
52
54
|
*/
|
53
55
|
var DealsApi = /*#__PURE__*/function () {
|
54
56
|
/**
|
55
|
-
* Constructs a new DealsApi.
|
57
|
+
* Constructs a new DealsApi.
|
56
58
|
* @alias module:api/DealsApi
|
57
59
|
* @class
|
58
60
|
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
@@ -67,7 +69,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
67
69
|
* Add a deal
|
68
70
|
* Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>.
|
69
71
|
* @param {Object} opts Optional parameters
|
70
|
-
* @param {module:model/NewDeal} opts.newDeal
|
72
|
+
* @param {module:model/NewDeal} opts.newDeal
|
71
73
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAddedDeal} and HTTP response
|
72
74
|
*/
|
73
75
|
(0, _createClass2["default"])(DealsApi, [{
|
@@ -102,7 +104,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
102
104
|
* Add a deal
|
103
105
|
* Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>.
|
104
106
|
* @param {Object} opts Optional parameters
|
105
|
-
* @param {module:model/NewDeal} opts.newDeal
|
107
|
+
* @param {module:model/NewDeal} opts.newDeal
|
106
108
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAddedDeal}
|
107
109
|
*/
|
108
110
|
}, {
|
@@ -118,7 +120,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
118
120
|
* Adds a follower to a deal.
|
119
121
|
* @param {Number} id The ID of the deal
|
120
122
|
* @param {Object} opts Optional parameters
|
121
|
-
* @param {module:model/AddDealFollowerRequest} opts.addDealFollowerRequest
|
123
|
+
* @param {module:model/AddDealFollowerRequest} opts.addDealFollowerRequest
|
122
124
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddedDealFollower} and HTTP response
|
123
125
|
*/
|
124
126
|
}, {
|
@@ -164,7 +166,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
164
166
|
* Adds a follower to a deal.
|
165
167
|
* @param {Number} id The ID of the deal
|
166
168
|
* @param {Object} opts Optional parameters
|
167
|
-
* @param {module:model/AddDealFollowerRequest} opts.addDealFollowerRequest
|
169
|
+
* @param {module:model/AddDealFollowerRequest} opts.addDealFollowerRequest
|
168
170
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddedDealFollower}
|
169
171
|
*/
|
170
172
|
}, {
|
@@ -180,7 +182,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
180
182
|
* Adds a participant to a deal.
|
181
183
|
* @param {Number} id The ID of the deal
|
182
184
|
* @param {Object} opts Optional parameters
|
183
|
-
* @param {module:model/AddDealParticipantRequest} opts.addDealParticipantRequest
|
185
|
+
* @param {module:model/AddDealParticipantRequest} opts.addDealParticipantRequest
|
184
186
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PostDealParticipants} and HTTP response
|
185
187
|
*/
|
186
188
|
}, {
|
@@ -226,7 +228,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
226
228
|
* Adds a participant to a deal.
|
227
229
|
* @param {Number} id The ID of the deal
|
228
230
|
* @param {Object} opts Optional parameters
|
229
|
-
* @param {module:model/AddDealParticipantRequest} opts.addDealParticipantRequest
|
231
|
+
* @param {module:model/AddDealParticipantRequest} opts.addDealParticipantRequest
|
230
232
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PostDealParticipants}
|
231
233
|
*/
|
232
234
|
}, {
|
@@ -242,7 +244,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
242
244
|
* Adds a product to a deal, creating a new item called a deal-product.
|
243
245
|
* @param {Number} id The ID of the deal
|
244
246
|
* @param {Object} opts Optional parameters
|
245
|
-
* @param {module:model/NewDealProduct} opts.newDealProduct
|
247
|
+
* @param {module:model/NewDealProduct} opts.newDealProduct
|
246
248
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAddProductAttachementDetails} and HTTP response
|
247
249
|
*/
|
248
250
|
}, {
|
@@ -285,7 +287,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
285
287
|
* Adds a product to a deal, creating a new item called a deal-product.
|
286
288
|
* @param {Number} id The ID of the deal
|
287
289
|
* @param {Object} opts Optional parameters
|
288
|
-
* @param {module:model/NewDealProduct} opts.newDealProduct
|
290
|
+
* @param {module:model/NewDealProduct} opts.newDealProduct
|
289
291
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAddProductAttachementDetails}
|
290
292
|
*/
|
291
293
|
}, {
|
@@ -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
|
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
|
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.
|
@@ -1516,7 +1588,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1516
1588
|
* Merges a deal with another deal. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/merging-two-deals\" target=\"_blank\" rel=\"noopener noreferrer\">merging two deals</a>.
|
1517
1589
|
* @param {Number} id The ID of the deal
|
1518
1590
|
* @param {Object} opts Optional parameters
|
1519
|
-
* @param {module:model/MergeDealsRequest} opts.mergeDealsRequest
|
1591
|
+
* @param {module:model/MergeDealsRequest} opts.mergeDealsRequest
|
1520
1592
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetMergedDeal} and HTTP response
|
1521
1593
|
*/
|
1522
1594
|
}, {
|
@@ -1562,7 +1634,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1562
1634
|
* Merges a deal with another deal. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/merging-two-deals\" target=\"_blank\" rel=\"noopener noreferrer\">merging two deals</a>.
|
1563
1635
|
* @param {Number} id The ID of the deal
|
1564
1636
|
* @param {Object} opts Optional parameters
|
1565
|
-
* @param {module:model/MergeDealsRequest} opts.mergeDealsRequest
|
1637
|
+
* @param {module:model/MergeDealsRequest} opts.mergeDealsRequest
|
1566
1638
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetMergedDeal}
|
1567
1639
|
*/
|
1568
1640
|
}, {
|
@@ -1659,7 +1731,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1659
1731
|
* Updates the properties of a deal. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/updating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">updating a deal</a>.
|
1660
1732
|
* @param {Number} id The ID of the deal
|
1661
1733
|
* @param {Object} opts Optional parameters
|
1662
|
-
* @param {module:model/UpdateDealRequest} opts.updateDealRequest
|
1734
|
+
* @param {module:model/UpdateDealRequest} opts.updateDealRequest
|
1663
1735
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAddedDeal} and HTTP response
|
1664
1736
|
*/
|
1665
1737
|
}, {
|
@@ -1702,7 +1774,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1702
1774
|
* Updates the properties of a deal. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/updating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">updating a deal</a>.
|
1703
1775
|
* @param {Number} id The ID of the deal
|
1704
1776
|
* @param {Object} opts Optional parameters
|
1705
|
-
* @param {module:model/UpdateDealRequest} opts.updateDealRequest
|
1777
|
+
* @param {module:model/UpdateDealRequest} opts.updateDealRequest
|
1706
1778
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAddedDeal}
|
1707
1779
|
*/
|
1708
1780
|
}, {
|
@@ -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/
|
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['
|
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/
|
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
|
}, {
|
package/dist/api/LeadsApi.js
CHANGED
@@ -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.
|