pipedrive 13.2.4 → 13.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +12 -1
  3. package/dist/api/DealsApi.js +8 -0
  4. package/dist/api/LeadsApi.js +92 -1
  5. package/dist/api/OrganizationsApi.js +4 -0
  6. package/dist/api/PersonsApi.js +17 -10
  7. package/dist/api/ProductsApi.js +5 -5
  8. package/dist/api/StagesApi.js +11 -5
  9. package/dist/index.js +88 -8
  10. package/dist/model/ActivityObjectFragment.js +11 -0
  11. package/dist/model/ActivityPostObject.js +17 -0
  12. package/dist/model/ActivityPutObject.js +17 -0
  13. package/dist/model/ActivityResponseObject.js +17 -11
  14. package/dist/model/AddLeadRequest.js +1 -1
  15. package/dist/model/AddNoteRequest.js +7 -4
  16. package/dist/model/AddProductAttachmentDetails.js +11 -4
  17. package/dist/model/AddProductRequestBody.js +16 -5
  18. package/dist/model/BasicDeal.js +33 -7
  19. package/dist/model/BasicDealProduct.js +8 -3
  20. package/dist/model/BasicOrganization.js +6 -3
  21. package/dist/model/BasicPerson.js +6 -3
  22. package/dist/model/FilterType.js +1 -0
  23. package/dist/model/LeadSearchItem.js +102 -0
  24. package/dist/model/LeadSearchItemItem.js +234 -0
  25. package/dist/model/LeadSearchItemItemOrganization.js +101 -0
  26. package/dist/model/LeadSearchItemItemOwner.js +90 -0
  27. package/dist/model/LeadSearchItemItemPerson.js +101 -0
  28. package/dist/model/LeadSearchResponse.js +147 -0
  29. package/dist/model/LeadSearchResponseAllOf.js +103 -0
  30. package/dist/model/LeadSearchResponseAllOfData.js +92 -0
  31. package/dist/model/NewDeal.js +40 -8
  32. package/dist/model/NewDealProduct.js +6 -33
  33. package/dist/model/NewOrganization.js +1 -1
  34. package/dist/model/NewPerson.js +1 -1
  35. package/dist/model/Note.js +1 -1
  36. package/dist/model/NoteParams.js +6 -3
  37. package/dist/model/OptionalNameObject.js +90 -0
  38. package/dist/model/ProductAttachmentDetails.js +11 -4
  39. package/dist/model/ProductRequest.js +1 -12
  40. package/dist/model/RequiredNameObject.js +93 -0
  41. package/dist/model/UpdateDealRequest.js +40 -8
  42. package/dist/model/UpdateLeadRequest.js +1 -1
  43. package/dist/model/UpdateProductRequestBody.js +254 -0
  44. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,28 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## 13.2.7
12
+ ## Changed
13
+ - Added `everyone` parameter to `GET /v1/stages/{id}` endpoint
14
+ - Updated `/v1/deals` endpoint `stage_id` and added `pipeline_id` descriptions
15
+
16
+ ## 13.2.6
17
+ ## Changed
18
+ - Updated `POST /products`: parameter `name` is required
19
+ - Updated `PUT /deals/:dealId/products`: parameter `quantity` and `item_price` are required
20
+ - Updated `POST /deals/:dealId/products`: parameter `quantity` and `item_price` are required
21
+ -
22
+
23
+ ## 13.2.5
24
+ ## Changed
25
+ - Updated `POST /notes`: parameter `content` is required
26
+ - Updated `POST /organizations`: parameter `name` is required
27
+ - Updated `POST /persons`: parameter `name` is required
28
+ - Updated `DELETE /persons`: parameter `ids` is required
29
+ - Updated `visible_to` parameter for `POST /deals` and `PUT /deals/{id}` to include type `number`
30
+ - Updated `visible_to` parameter for `POST /persons` and `PUT /persons/{id}` to include type `number`
31
+ - Updated `visible_to` parameter for `POST /organizations` and `PUT /organizations/{id}` to include type `number`
32
+
11
33
  ## 13.2.4
12
34
  ### Fixed
13
35
  - Added quotation marks to fix formatting for Organizations endpoint `visible_to` parameter
package/README.md CHANGED
@@ -348,6 +348,7 @@ Class | Method | HTTP request | Description
348
348
  *Pipedrive.LeadsApi* | [**deleteLead**](docs/LeadsApi.md#deleteLead) | **DELETE** /leads/{id} | Delete a lead
349
349
  *Pipedrive.LeadsApi* | [**getLead**](docs/LeadsApi.md#getLead) | **GET** /leads/{id} | Get one lead
350
350
  *Pipedrive.LeadsApi* | [**getLeads**](docs/LeadsApi.md#getLeads) | **GET** /leads | Get all leads
351
+ *Pipedrive.LeadsApi* | [**searchLeads**](docs/LeadsApi.md#searchLeads) | **GET** /leads/search | Search leads
351
352
  *Pipedrive.LeadsApi* | [**updateLead**](docs/LeadsApi.md#updateLead) | **PATCH** /leads/{id} | Update a lead
352
353
  *Pipedrive.MailboxApi* | [**deleteMailThread**](docs/MailboxApi.md#deleteMailThread) | **DELETE** /mailbox/mailThreads/{id} | Delete mail thread
353
354
  *Pipedrive.MailboxApi* | [**getMailMessage**](docs/MailboxApi.md#getMailMessage) | **GET** /mailbox/mailMessages/{id} | Get one mail message
@@ -871,6 +872,14 @@ Class | Method | HTTP request | Description
871
872
  - [Pipedrive.LeadLabelResponse](docs/LeadLabelResponse.md)
872
873
  - [Pipedrive.LeadResponse](docs/LeadResponse.md)
873
874
  - [Pipedrive.LeadResponse404](docs/LeadResponse404.md)
875
+ - [Pipedrive.LeadSearchItem](docs/LeadSearchItem.md)
876
+ - [Pipedrive.LeadSearchItemItem](docs/LeadSearchItemItem.md)
877
+ - [Pipedrive.LeadSearchItemItemOrganization](docs/LeadSearchItemItemOrganization.md)
878
+ - [Pipedrive.LeadSearchItemItemOwner](docs/LeadSearchItemItemOwner.md)
879
+ - [Pipedrive.LeadSearchItemItemPerson](docs/LeadSearchItemItemPerson.md)
880
+ - [Pipedrive.LeadSearchResponse](docs/LeadSearchResponse.md)
881
+ - [Pipedrive.LeadSearchResponseAllOf](docs/LeadSearchResponseAllOf.md)
882
+ - [Pipedrive.LeadSearchResponseAllOfData](docs/LeadSearchResponseAllOfData.md)
874
883
  - [Pipedrive.LeadValue](docs/LeadValue.md)
875
884
  - [Pipedrive.LinkRemoteFileToItem](docs/LinkRemoteFileToItem.md)
876
885
  - [Pipedrive.ListActivitiesResponse](docs/ListActivitiesResponse.md)
@@ -936,7 +945,6 @@ Class | Method | HTTP request | Description
936
945
  - [Pipedrive.NewDeal](docs/NewDeal.md)
937
946
  - [Pipedrive.NewDealAllOf](docs/NewDealAllOf.md)
938
947
  - [Pipedrive.NewDealProduct](docs/NewDealProduct.md)
939
- - [Pipedrive.NewDealProductAllOf](docs/NewDealProductAllOf.md)
940
948
  - [Pipedrive.NewFollowerResponse](docs/NewFollowerResponse.md)
941
949
  - [Pipedrive.NewFollowerResponseData](docs/NewFollowerResponseData.md)
942
950
  - [Pipedrive.NewGoal](docs/NewGoal.md)
@@ -957,6 +965,7 @@ Class | Method | HTTP request | Description
957
965
  - [Pipedrive.NumberBooleanDefault1](docs/NumberBooleanDefault1.md)
958
966
  - [Pipedrive.ObjectPrices](docs/ObjectPrices.md)
959
967
  - [Pipedrive.OneLeadResponse200](docs/OneLeadResponse200.md)
968
+ - [Pipedrive.OptionalNameObject](docs/OptionalNameObject.md)
960
969
  - [Pipedrive.OrgAndOwnerId](docs/OrgAndOwnerId.md)
961
970
  - [Pipedrive.OrganizationAddressInfo](docs/OrganizationAddressInfo.md)
962
971
  - [Pipedrive.OrganizationCountAndAddressInfo](docs/OrganizationCountAndAddressInfo.md)
@@ -1112,6 +1121,7 @@ Class | Method | HTTP request | Description
1112
1121
  - [Pipedrive.RelationshipOrganizationInfoItem](docs/RelationshipOrganizationInfoItem.md)
1113
1122
  - [Pipedrive.RelationshipOrganizationInfoItemAllOf](docs/RelationshipOrganizationInfoItemAllOf.md)
1114
1123
  - [Pipedrive.RelationshipOrganizationInfoItemWithActiveFlag](docs/RelationshipOrganizationInfoItemWithActiveFlag.md)
1124
+ - [Pipedrive.RequiredNameObject](docs/RequiredNameObject.md)
1115
1125
  - [Pipedrive.RequredTitleParameter](docs/RequredTitleParameter.md)
1116
1126
  - [Pipedrive.ResponseCallLogObject](docs/ResponseCallLogObject.md)
1117
1127
  - [Pipedrive.ResponseCallLogObjectAllOf](docs/ResponseCallLogObjectAllOf.md)
@@ -1150,6 +1160,7 @@ Class | Method | HTTP request | Description
1150
1160
  - [Pipedrive.UpdateLeadLabelRequest](docs/UpdateLeadLabelRequest.md)
1151
1161
  - [Pipedrive.UpdateLeadRequest](docs/UpdateLeadRequest.md)
1152
1162
  - [Pipedrive.UpdatePersonResponse](docs/UpdatePersonResponse.md)
1163
+ - [Pipedrive.UpdateProductRequestBody](docs/UpdateProductRequestBody.md)
1153
1164
  - [Pipedrive.UpdateProductResponse](docs/UpdateProductResponse.md)
1154
1165
  - [Pipedrive.UpdateStageRequest](docs/UpdateStageRequest.md)
1155
1166
  - [Pipedrive.UpdateStageRequestAllOf](docs/UpdateStageRequestAllOf.md)
@@ -1838,6 +1838,14 @@ var DealsApi = /*#__PURE__*/function () {
1838
1838
  throw new Error("Missing the required parameter 'productAttachmentId' when calling updateDealProduct");
1839
1839
  }
1840
1840
 
1841
+ if (opts['item_price'] === undefined || opts['item_price'] === null) {
1842
+ throw new Error("Missing the required parameter 'item_price' when calling updateDealProduct");
1843
+ }
1844
+
1845
+ if (opts['quantity'] === undefined || opts['quantity'] === null) {
1846
+ throw new Error("Missing the required parameter 'quantity' when calling updateDealProduct");
1847
+ }
1848
+
1841
1849
  var pathParams = {
1842
1850
  'id': id,
1843
1851
  'product_attachment_id': productAttachmentId
@@ -23,6 +23,8 @@ var _LeadIdResponse = _interopRequireDefault(require("../model/LeadIdResponse200
23
23
 
24
24
  var _LeadResponse = _interopRequireDefault(require("../model/LeadResponse404"));
25
25
 
26
+ var _LeadSearchResponse = _interopRequireDefault(require("../model/LeadSearchResponse"));
27
+
26
28
  var _OneLeadResponse = _interopRequireDefault(require("../model/OneLeadResponse200"));
27
29
 
28
30
  var _UpdateLeadRequest = _interopRequireDefault(require("../model/UpdateLeadRequest"));
@@ -227,6 +229,9 @@ var LeadsApi = /*#__PURE__*/function () {
227
229
  * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
228
230
  * @param {Number} opts.start For pagination, the position that represents the first result for the page
229
231
  * @param {module:model/String} opts.archivedStatus Filtering based on the archived status of a lead. If not provided, `All` is used.
232
+ * @param {Number} opts.ownerId If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
233
+ * @param {Number} opts.filterId The ID of the filter to use
234
+ * @param {module:model/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).
230
235
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetLeadsResponse200} and HTTP response
231
236
  */
232
237
 
@@ -239,7 +244,10 @@ var LeadsApi = /*#__PURE__*/function () {
239
244
  var queryParams = {
240
245
  'limit': opts['limit'],
241
246
  'start': opts['start'],
242
- 'archived_status': opts['archivedStatus']
247
+ 'archived_status': opts['archivedStatus'],
248
+ 'owner_id': opts['ownerId'],
249
+ 'filter_id': opts['filterId'],
250
+ 'sort': opts['sort']
243
251
  };
244
252
  var headerParams = {};
245
253
  var formParams = {};
@@ -270,6 +278,9 @@ var LeadsApi = /*#__PURE__*/function () {
270
278
  * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
271
279
  * @param {Number} opts.start For pagination, the position that represents the first result for the page
272
280
  * @param {module:model/String} opts.archivedStatus Filtering based on the archived status of a lead. If not provided, `All` is used.
281
+ * @param {Number} opts.ownerId If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
282
+ * @param {Number} opts.filterId The ID of the filter to use
283
+ * @param {module:model/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).
273
284
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetLeadsResponse200}
274
285
  */
275
286
 
@@ -280,6 +291,86 @@ var LeadsApi = /*#__PURE__*/function () {
280
291
  return response_and_data;
281
292
  });
282
293
  }
294
+ /**
295
+ * Search leads
296
+ * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
297
+ * @param {String} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`).
298
+ * @param {Object} opts Optional parameters
299
+ * @param {module:model/String} opts.fields A comma-separated string array. The fields to perform the search from. Defaults to all of them.
300
+ * @param {module:model/Boolean} opts.exactMatch When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
301
+ * @param {Number} opts.personId Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
302
+ * @param {Number} opts.organizationId Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
303
+ * @param {module:model/String} opts.includeFields Supports including optional fields in the results which are not provided by default
304
+ * @param {Number} opts.start Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. (default to 0)
305
+ * @param {Number} opts.limit Items shown per page
306
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LeadSearchResponse} and HTTP response
307
+ */
308
+
309
+ }, {
310
+ key: "searchLeadsWithHttpInfo",
311
+ value: function searchLeadsWithHttpInfo(term, opts) {
312
+ opts = opts || {};
313
+ var postBody = null; // verify the required parameter 'term' is set
314
+
315
+ if (term === undefined || term === null) {
316
+ throw new Error("Missing the required parameter 'term' when calling searchLeads");
317
+ }
318
+
319
+ var pathParams = {};
320
+ var queryParams = {
321
+ 'term': term,
322
+ 'fields': opts['fields'],
323
+ 'exact_match': opts['exactMatch'],
324
+ 'person_id': opts['personId'],
325
+ 'organization_id': opts['organizationId'],
326
+ 'include_fields': opts['includeFields'],
327
+ 'start': opts['start'],
328
+ 'limit': opts['limit']
329
+ };
330
+ var headerParams = {};
331
+ var formParams = {};
332
+ var formParamArray = [];
333
+ var contentTypes = [];
334
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
335
+ var isJSON = contentTypes.includes('application/json');
336
+
337
+ if (isJSON) {
338
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
339
+ } else if (isURLEncoded) {
340
+ for (var key in opts) {
341
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
342
+ formParams[key] = opts[key];
343
+ }
344
+ }
345
+ }
346
+
347
+ var authNames = ['api_key', 'oauth2'];
348
+ var accepts = ['application/json'];
349
+ var returnType = _LeadSearchResponse["default"];
350
+ return this.apiClient.callApi('/leads/search', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
351
+ }
352
+ /**
353
+ * Search leads
354
+ * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
355
+ * @param {String} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`).
356
+ * @param {Object} opts Optional parameters
357
+ * @param {module:model/String} opts.fields A comma-separated string array. The fields to perform the search from. Defaults to all of them.
358
+ * @param {module:model/Boolean} opts.exactMatch When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
359
+ * @param {Number} opts.personId Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
360
+ * @param {Number} opts.organizationId Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
361
+ * @param {module:model/String} opts.includeFields Supports including optional fields in the results which are not provided by default
362
+ * @param {Number} opts.start Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. (default to 0)
363
+ * @param {Number} opts.limit Items shown per page
364
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LeadSearchResponse}
365
+ */
366
+
367
+ }, {
368
+ key: "searchLeads",
369
+ value: function searchLeads(term, opts) {
370
+ return this.searchLeadsWithHttpInfo(term, opts).then(function (response_and_data) {
371
+ return response_and_data;
372
+ });
373
+ }
283
374
  /**
284
375
  * Update a lead
285
376
  * Updates one or more properties of a lead. Only properties included in the request will be updated. Send `null` to unset a property (applicable for example for `value`, `person_id` or `organization_id`). 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. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields’ values tutorial</a>.
@@ -1197,6 +1197,10 @@ var OrganizationsApi = /*#__PURE__*/function () {
1197
1197
  throw new Error("Missing the required parameter 'id' when calling updateOrganization");
1198
1198
  }
1199
1199
 
1200
+ if (opts['name'] === undefined || opts['name'] === null) {
1201
+ throw new Error("Missing the required parameter 'name' when calling updateOrganization");
1202
+ }
1203
+
1200
1204
  var pathParams = {
1201
1205
  'id': id
1202
1206
  };
@@ -462,19 +462,23 @@ var PersonsApi = /*#__PURE__*/function () {
462
462
  /**
463
463
  * Delete multiple persons in bulk
464
464
  * Marks multiple persons as deleted.
465
- * @param {Object} opts Optional parameters
466
- * @param {String} opts.ids The comma-separated IDs that will be deleted
465
+ * @param {String} ids The comma-separated IDs that will be deleted
467
466
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeletePersonsInBulkResponse} and HTTP response
468
467
  */
469
468
 
470
469
  }, {
471
470
  key: "deletePersonsWithHttpInfo",
472
- value: function deletePersonsWithHttpInfo(opts) {
473
- opts = opts || {};
474
- var postBody = null;
471
+ value: function deletePersonsWithHttpInfo(ids) {
472
+ var opts = {};
473
+ var postBody = null; // verify the required parameter 'ids' is set
474
+
475
+ if (ids === undefined || ids === null) {
476
+ throw new Error("Missing the required parameter 'ids' when calling deletePersons");
477
+ }
478
+
475
479
  var pathParams = {};
476
480
  var queryParams = {
477
- 'ids': opts['ids']
481
+ 'ids': ids
478
482
  };
479
483
  var headerParams = {};
480
484
  var formParams = {};
@@ -501,15 +505,14 @@ var PersonsApi = /*#__PURE__*/function () {
501
505
  /**
502
506
  * Delete multiple persons in bulk
503
507
  * Marks multiple persons as deleted.
504
- * @param {Object} opts Optional parameters
505
- * @param {String} opts.ids The comma-separated IDs that will be deleted
508
+ * @param {String} ids The comma-separated IDs that will be deleted
506
509
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeletePersonsInBulkResponse}
507
510
  */
508
511
 
509
512
  }, {
510
513
  key: "deletePersons",
511
- value: function deletePersons(opts) {
512
- return this.deletePersonsWithHttpInfo(opts).then(function (response_and_data) {
514
+ value: function deletePersons(ids) {
515
+ return this.deletePersonsWithHttpInfo(ids).then(function (response_and_data) {
513
516
  return response_and_data;
514
517
  });
515
518
  }
@@ -1334,6 +1337,10 @@ var PersonsApi = /*#__PURE__*/function () {
1334
1337
  throw new Error("Missing the required parameter 'id' when calling updatePerson");
1335
1338
  }
1336
1339
 
1340
+ if (opts['name'] === undefined || opts['name'] === null) {
1341
+ throw new Error("Missing the required parameter 'name' when calling updatePerson");
1342
+ }
1343
+
1337
1344
  var pathParams = {
1338
1345
  'id': id
1339
1346
  };
@@ -31,8 +31,6 @@ var _NewFollowerResponse = _interopRequireDefault(require("../model/NewFollowerR
31
31
 
32
32
  var _NumberBoolean = _interopRequireDefault(require("../model/NumberBoolean"));
33
33
 
34
- var _ProductRequest = _interopRequireDefault(require("../model/ProductRequest"));
35
-
36
34
  var _ProductResponse = _interopRequireDefault(require("../model/ProductResponse"));
37
35
 
38
36
  var _ProductSearchResponse = _interopRequireDefault(require("../model/ProductSearchResponse"));
@@ -41,6 +39,8 @@ var _ProductsResponse = _interopRequireDefault(require("../model/ProductsRespons
41
39
 
42
40
  var _UpdateDealRequest = _interopRequireDefault(require("../model/UpdateDealRequest"));
43
41
 
42
+ var _UpdateProductRequestBody = _interopRequireDefault(require("../model/UpdateProductRequestBody"));
43
+
44
44
  var _UpdateProductResponse = _interopRequireDefault(require("../model/UpdateProductResponse"));
45
45
 
46
46
  var _UserIDs = _interopRequireDefault(require("../model/UserIDs"));
@@ -778,7 +778,7 @@ var ProductsApi = /*#__PURE__*/function () {
778
778
  * Updates product data.
779
779
  * @param {Number} id The ID of the product
780
780
  * @param {Object} opts Optional parameters
781
- * @param {module:model/ProductRequest} opts.productRequest
781
+ * @param {module:model/UpdateProductRequestBody} opts.updateProductRequestBody
782
782
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateProductResponse} and HTTP response
783
783
  */
784
784
 
@@ -786,7 +786,7 @@ var ProductsApi = /*#__PURE__*/function () {
786
786
  key: "updateProductWithHttpInfo",
787
787
  value: function updateProductWithHttpInfo(id, opts) {
788
788
  opts = opts || {};
789
- var postBody = opts['productRequest']; // verify the required parameter 'id' is set
789
+ var postBody = opts['updateProductRequestBody']; // verify the required parameter 'id' is set
790
790
 
791
791
  if (id === undefined || id === null) {
792
792
  throw new Error("Missing the required parameter 'id' when calling updateProduct");
@@ -823,7 +823,7 @@ var ProductsApi = /*#__PURE__*/function () {
823
823
  * Updates product data.
824
824
  * @param {Number} id The ID of the product
825
825
  * @param {Object} opts Optional parameters
826
- * @param {module:model/ProductRequest} opts.productRequest
826
+ * @param {module:model/UpdateProductRequestBody} opts.updateProductRequestBody
827
827
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateProductResponse}
828
828
  */
829
829
 
@@ -225,13 +225,15 @@ var StagesApi = /*#__PURE__*/function () {
225
225
  * Get one stage
226
226
  * Returns data about a specific stage.
227
227
  * @param {Number} id The ID of the stage
228
+ * @param {Object} opts Optional parameters
229
+ * @param {module:model/NumberBoolean} opts.everyone If `everyone=1` is provided, deals summary will return deals owned by every user
228
230
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetOneStage} and HTTP response
229
231
  */
230
232
 
231
233
  }, {
232
234
  key: "getStageWithHttpInfo",
233
- value: function getStageWithHttpInfo(id) {
234
- var opts = {};
235
+ value: function getStageWithHttpInfo(id, opts) {
236
+ opts = opts || {};
235
237
  var postBody = null; // verify the required parameter 'id' is set
236
238
 
237
239
  if (id === undefined || id === null) {
@@ -241,7 +243,9 @@ var StagesApi = /*#__PURE__*/function () {
241
243
  var pathParams = {
242
244
  'id': id
243
245
  };
244
- var queryParams = {};
246
+ var queryParams = {
247
+ 'everyone': opts['everyone']
248
+ };
245
249
  var headerParams = {};
246
250
  var formParams = {};
247
251
  var formParamArray = [];
@@ -268,13 +272,15 @@ var StagesApi = /*#__PURE__*/function () {
268
272
  * Get one stage
269
273
  * Returns data about a specific stage.
270
274
  * @param {Number} id The ID of the stage
275
+ * @param {Object} opts Optional parameters
276
+ * @param {module:model/NumberBoolean} opts.everyone If `everyone=1` is provided, deals summary will return deals owned by every user
271
277
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetOneStage}
272
278
  */
273
279
 
274
280
  }, {
275
281
  key: "getStage",
276
- value: function getStage(id) {
277
- return this.getStageWithHttpInfo(id).then(function (response_and_data) {
282
+ value: function getStage(id, opts) {
283
+ return this.getStageWithHttpInfo(id, opts).then(function (response_and_data) {
278
284
  return response_and_data;
279
285
  });
280
286
  }
package/dist/index.js CHANGED
@@ -2273,6 +2273,54 @@ Object.defineProperty(exports, "LeadResponse404", {
2273
2273
  return _LeadResponse2["default"];
2274
2274
  }
2275
2275
  });
2276
+ Object.defineProperty(exports, "LeadSearchItem", {
2277
+ enumerable: true,
2278
+ get: function get() {
2279
+ return _LeadSearchItem["default"];
2280
+ }
2281
+ });
2282
+ Object.defineProperty(exports, "LeadSearchItemItem", {
2283
+ enumerable: true,
2284
+ get: function get() {
2285
+ return _LeadSearchItemItem["default"];
2286
+ }
2287
+ });
2288
+ Object.defineProperty(exports, "LeadSearchItemItemOrganization", {
2289
+ enumerable: true,
2290
+ get: function get() {
2291
+ return _LeadSearchItemItemOrganization["default"];
2292
+ }
2293
+ });
2294
+ Object.defineProperty(exports, "LeadSearchItemItemOwner", {
2295
+ enumerable: true,
2296
+ get: function get() {
2297
+ return _LeadSearchItemItemOwner["default"];
2298
+ }
2299
+ });
2300
+ Object.defineProperty(exports, "LeadSearchItemItemPerson", {
2301
+ enumerable: true,
2302
+ get: function get() {
2303
+ return _LeadSearchItemItemPerson["default"];
2304
+ }
2305
+ });
2306
+ Object.defineProperty(exports, "LeadSearchResponse", {
2307
+ enumerable: true,
2308
+ get: function get() {
2309
+ return _LeadSearchResponse["default"];
2310
+ }
2311
+ });
2312
+ Object.defineProperty(exports, "LeadSearchResponseAllOf", {
2313
+ enumerable: true,
2314
+ get: function get() {
2315
+ return _LeadSearchResponseAllOf["default"];
2316
+ }
2317
+ });
2318
+ Object.defineProperty(exports, "LeadSearchResponseAllOfData", {
2319
+ enumerable: true,
2320
+ get: function get() {
2321
+ return _LeadSearchResponseAllOfData["default"];
2322
+ }
2323
+ });
2276
2324
  Object.defineProperty(exports, "LeadSourcesApi", {
2277
2325
  enumerable: true,
2278
2326
  get: function get() {
@@ -2681,12 +2729,6 @@ Object.defineProperty(exports, "NewDealProduct", {
2681
2729
  return _NewDealProduct["default"];
2682
2730
  }
2683
2731
  });
2684
- Object.defineProperty(exports, "NewDealProductAllOf", {
2685
- enumerable: true,
2686
- get: function get() {
2687
- return _NewDealProductAllOf["default"];
2688
- }
2689
- });
2690
2732
  Object.defineProperty(exports, "NewFollowerResponse", {
2691
2733
  enumerable: true,
2692
2734
  get: function get() {
@@ -2819,6 +2861,12 @@ Object.defineProperty(exports, "OneLeadResponse200", {
2819
2861
  return _OneLeadResponse["default"];
2820
2862
  }
2821
2863
  });
2864
+ Object.defineProperty(exports, "OptionalNameObject", {
2865
+ enumerable: true,
2866
+ get: function get() {
2867
+ return _OptionalNameObject["default"];
2868
+ }
2869
+ });
2822
2870
  Object.defineProperty(exports, "OrgAndOwnerId", {
2823
2871
  enumerable: true,
2824
2872
  get: function get() {
@@ -3809,6 +3857,12 @@ Object.defineProperty(exports, "RelationshipOrganizationInfoItemWithActiveFlag",
3809
3857
  return _RelationshipOrganizationInfoItemWithActiveFlag["default"];
3810
3858
  }
3811
3859
  });
3860
+ Object.defineProperty(exports, "RequiredNameObject", {
3861
+ enumerable: true,
3862
+ get: function get() {
3863
+ return _RequiredNameObject["default"];
3864
+ }
3865
+ });
3812
3866
  Object.defineProperty(exports, "RequredTitleParameter", {
3813
3867
  enumerable: true,
3814
3868
  get: function get() {
@@ -4061,6 +4115,12 @@ Object.defineProperty(exports, "UpdatePersonResponse", {
4061
4115
  return _UpdatePersonResponse["default"];
4062
4116
  }
4063
4117
  });
4118
+ Object.defineProperty(exports, "UpdateProductRequestBody", {
4119
+ enumerable: true,
4120
+ get: function get() {
4121
+ return _UpdateProductRequestBody["default"];
4122
+ }
4123
+ });
4064
4124
  Object.defineProperty(exports, "UpdateProductResponse", {
4065
4125
  enumerable: true,
4066
4126
  get: function get() {
@@ -5038,6 +5098,22 @@ var _LeadResponse = _interopRequireDefault(require("./model/LeadResponse"));
5038
5098
 
5039
5099
  var _LeadResponse2 = _interopRequireDefault(require("./model/LeadResponse404"));
5040
5100
 
5101
+ var _LeadSearchItem = _interopRequireDefault(require("./model/LeadSearchItem"));
5102
+
5103
+ var _LeadSearchItemItem = _interopRequireDefault(require("./model/LeadSearchItemItem"));
5104
+
5105
+ var _LeadSearchItemItemOrganization = _interopRequireDefault(require("./model/LeadSearchItemItemOrganization"));
5106
+
5107
+ var _LeadSearchItemItemOwner = _interopRequireDefault(require("./model/LeadSearchItemItemOwner"));
5108
+
5109
+ var _LeadSearchItemItemPerson = _interopRequireDefault(require("./model/LeadSearchItemItemPerson"));
5110
+
5111
+ var _LeadSearchResponse = _interopRequireDefault(require("./model/LeadSearchResponse"));
5112
+
5113
+ var _LeadSearchResponseAllOf = _interopRequireDefault(require("./model/LeadSearchResponseAllOf"));
5114
+
5115
+ var _LeadSearchResponseAllOfData = _interopRequireDefault(require("./model/LeadSearchResponseAllOfData"));
5116
+
5041
5117
  var _LeadValue = _interopRequireDefault(require("./model/LeadValue"));
5042
5118
 
5043
5119
  var _LinkRemoteFileToItem = _interopRequireDefault(require("./model/LinkRemoteFileToItem"));
@@ -5168,8 +5244,6 @@ var _NewDealAllOf = _interopRequireDefault(require("./model/NewDealAllOf"));
5168
5244
 
5169
5245
  var _NewDealProduct = _interopRequireDefault(require("./model/NewDealProduct"));
5170
5246
 
5171
- var _NewDealProductAllOf = _interopRequireDefault(require("./model/NewDealProductAllOf"));
5172
-
5173
5247
  var _NewFollowerResponse = _interopRequireDefault(require("./model/NewFollowerResponse"));
5174
5248
 
5175
5249
  var _NewFollowerResponseData = _interopRequireDefault(require("./model/NewFollowerResponseData"));
@@ -5210,6 +5284,8 @@ var _ObjectPrices = _interopRequireDefault(require("./model/ObjectPrices"));
5210
5284
 
5211
5285
  var _OneLeadResponse = _interopRequireDefault(require("./model/OneLeadResponse200"));
5212
5286
 
5287
+ var _OptionalNameObject = _interopRequireDefault(require("./model/OptionalNameObject"));
5288
+
5213
5289
  var _OrgAndOwnerId = _interopRequireDefault(require("./model/OrgAndOwnerId"));
5214
5290
 
5215
5291
  var _OrganizationAddressInfo = _interopRequireDefault(require("./model/OrganizationAddressInfo"));
@@ -5520,6 +5596,8 @@ var _RelationshipOrganizationInfoItemAllOf = _interopRequireDefault(require("./m
5520
5596
 
5521
5597
  var _RelationshipOrganizationInfoItemWithActiveFlag = _interopRequireDefault(require("./model/RelationshipOrganizationInfoItemWithActiveFlag"));
5522
5598
 
5599
+ var _RequiredNameObject = _interopRequireDefault(require("./model/RequiredNameObject"));
5600
+
5523
5601
  var _RequredTitleParameter = _interopRequireDefault(require("./model/RequredTitleParameter"));
5524
5602
 
5525
5603
  var _ResponseCallLogObject = _interopRequireDefault(require("./model/ResponseCallLogObject"));
@@ -5596,6 +5674,8 @@ var _UpdateLeadRequest = _interopRequireDefault(require("./model/UpdateLeadReque
5596
5674
 
5597
5675
  var _UpdatePersonResponse = _interopRequireDefault(require("./model/UpdatePersonResponse"));
5598
5676
 
5677
+ var _UpdateProductRequestBody = _interopRequireDefault(require("./model/UpdateProductRequestBody"));
5678
+
5599
5679
  var _UpdateProductResponse = _interopRequireDefault(require("./model/UpdateProductResponse"));
5600
5680
 
5601
5681
  var _UpdateStageRequest = _interopRequireDefault(require("./model/UpdateStageRequest"));
@@ -84,6 +84,11 @@ var ActivityObjectFragment = /*#__PURE__*/function () {
84
84
  delete data['deal_id'];
85
85
  }
86
86
 
87
+ if (data.hasOwnProperty('lead_id')) {
88
+ obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
89
+ delete data['lead_id'];
90
+ }
91
+
87
92
  if (data.hasOwnProperty('person_id')) {
88
93
  obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
89
94
  delete data['person_id'];
@@ -144,6 +149,12 @@ ActivityObjectFragment.prototype['duration'] = undefined;
144
149
  */
145
150
 
146
151
  ActivityObjectFragment.prototype['deal_id'] = undefined;
152
+ /**
153
+ * The ID of the lead this activity is associated with
154
+ * @member {String} lead_id
155
+ */
156
+
157
+ ActivityObjectFragment.prototype['lead_id'] = undefined;
147
158
  /**
148
159
  * The ID of the person this activity is associated with
149
160
  * @member {Number} person_id
@@ -101,6 +101,11 @@ var ActivityPostObject = /*#__PURE__*/function () {
101
101
  delete data['deal_id'];
102
102
  }
103
103
 
104
+ if (data.hasOwnProperty('lead_id')) {
105
+ obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
106
+ delete data['lead_id'];
107
+ }
108
+
104
109
  if (data.hasOwnProperty('person_id')) {
105
110
  obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
106
111
  delete data['person_id'];
@@ -196,6 +201,12 @@ ActivityPostObject.prototype['duration'] = undefined;
196
201
  */
197
202
 
198
203
  ActivityPostObject.prototype['deal_id'] = undefined;
204
+ /**
205
+ * The ID of the lead this activity is associated with
206
+ * @member {String} lead_id
207
+ */
208
+
209
+ ActivityPostObject.prototype['lead_id'] = undefined;
199
210
  /**
200
211
  * The ID of the person this activity is associated with
201
212
  * @member {Number} person_id
@@ -293,6 +304,12 @@ _ActivityObjectFragment["default"].prototype['duration'] = undefined;
293
304
  */
294
305
 
295
306
  _ActivityObjectFragment["default"].prototype['deal_id'] = undefined;
307
+ /**
308
+ * The ID of the lead this activity is associated with
309
+ * @member {String} lead_id
310
+ */
311
+
312
+ _ActivityObjectFragment["default"].prototype['lead_id'] = undefined;
296
313
  /**
297
314
  * The ID of the person this activity is associated with
298
315
  * @member {Number} person_id
@@ -101,6 +101,11 @@ var ActivityPutObject = /*#__PURE__*/function () {
101
101
  delete data['deal_id'];
102
102
  }
103
103
 
104
+ if (data.hasOwnProperty('lead_id')) {
105
+ obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
106
+ delete data['lead_id'];
107
+ }
108
+
104
109
  if (data.hasOwnProperty('person_id')) {
105
110
  obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
106
111
  delete data['person_id'];
@@ -196,6 +201,12 @@ ActivityPutObject.prototype['duration'] = undefined;
196
201
  */
197
202
 
198
203
  ActivityPutObject.prototype['deal_id'] = undefined;
204
+ /**
205
+ * The ID of the lead this activity is associated with
206
+ * @member {String} lead_id
207
+ */
208
+
209
+ ActivityPutObject.prototype['lead_id'] = undefined;
199
210
  /**
200
211
  * The ID of the person this activity is associated with
201
212
  * @member {Number} person_id
@@ -293,6 +304,12 @@ _ActivityObjectFragment["default"].prototype['duration'] = undefined;
293
304
  */
294
305
 
295
306
  _ActivityObjectFragment["default"].prototype['deal_id'] = undefined;
307
+ /**
308
+ * The ID of the lead this activity is associated with
309
+ * @member {String} lead_id
310
+ */
311
+
312
+ _ActivityObjectFragment["default"].prototype['lead_id'] = undefined;
296
313
  /**
297
314
  * The ID of the person this activity is associated with
298
315
  * @member {Number} person_id