pipedrive 18.0.0 → 18.0.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -7,9 +7,20 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
7
7
  For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
8
8
 
9
9
  ## [Unreleased]
10
+
11
+ ## [18.0.2] - 2022-12-22
12
+ ### Fixed
13
+ - Fixed a typo in `GET /itemSearch/field`
14
+
15
+ ## [18.0.1] - 2022-12-15
16
+ ### Fixed
17
+ - Move @babel/runtime from devDependencies to dependencies to fix a runtime error
18
+
19
+ ## 18.0.0
10
20
  ### Security
11
21
  - Removed `.instance` static property from sdk client to prevent race conditions when using it as a singleton
12
22
  See the updated examples in the readme to get an overview of the necessary code changes.
23
+
13
24
  ## 17.5.2
14
25
  ### Changed
15
26
  - Updated endpoint descriptions to warn about permanently removing deleted entities:
@@ -404,4 +415,6 @@ structure
404
415
  * Fixed `GET /goal/:id/results` error handling in case when there are no existing stages connected to specified goal
405
416
  * Fixed typo in lead example response (`crrency` to `currency`)
406
417
 
407
- [Unreleased]: https://github.com/pipedrive/api-docs/compare/v1.0.0...HEAD
418
+ [Unreleased]: https://github.com/pipedrive/api-docs/compare/v18.0.2...HEAD
419
+ [18.0.2]: https://github.com/pipedrive/api-docs/compare/v18.0.1...v18.0.2
420
+ [18.0.1]: https://github.com/pipedrive/api-docs/compare/v1.0.0...v18.0.1
package/README.md CHANGED
@@ -477,7 +477,6 @@ Class | Method | HTTP request | Description
477
477
  *Pipedrive.RolesApi* | [**getRole**](docs/RolesApi.md#getRole) | **GET** /roles/{id} | Get one role
478
478
  *Pipedrive.RolesApi* | [**getRoleAssignments**](docs/RolesApi.md#getRoleAssignments) | **GET** /roles/{id}/assignments | List role assignments
479
479
  *Pipedrive.RolesApi* | [**getRoleSettings**](docs/RolesApi.md#getRoleSettings) | **GET** /roles/{id}/settings | List role settings
480
- *Pipedrive.RolesApi* | [**getRoleSubRoles**](docs/RolesApi.md#getRoleSubRoles) | **GET** /roles/{id}/roles | List role sub-roles
481
480
  *Pipedrive.RolesApi* | [**getRoles**](docs/RolesApi.md#getRoles) | **GET** /roles | Get all roles
482
481
  *Pipedrive.RolesApi* | [**updateRole**](docs/RolesApi.md#updateRole) | **PUT** /roles/{id} | Update role details
483
482
  *Pipedrive.StagesApi* | [**addStage**](docs/StagesApi.md#addStage) | **POST** /stages | Add a new stage
@@ -857,8 +856,6 @@ Class | Method | HTTP request | Description
857
856
  - [Pipedrive.GetRoleAssignmentsAllOf](docs/GetRoleAssignmentsAllOf.md)
858
857
  - [Pipedrive.GetRoleSettings](docs/GetRoleSettings.md)
859
858
  - [Pipedrive.GetRoleSettingsAllOf](docs/GetRoleSettingsAllOf.md)
860
- - [Pipedrive.GetRoleSubroles](docs/GetRoleSubroles.md)
861
- - [Pipedrive.GetRoleSubrolesAllOf](docs/GetRoleSubrolesAllOf.md)
862
859
  - [Pipedrive.GetRoles](docs/GetRoles.md)
863
860
  - [Pipedrive.GetRolesAllOf](docs/GetRolesAllOf.md)
864
861
  - [Pipedrive.GetStageDeals](docs/GetStageDeals.md)
@@ -38,7 +38,7 @@ var FilesApi = /*#__PURE__*/function () {
38
38
 
39
39
  /**
40
40
  * Add file
41
- * Lets you upload a file and associate it with a deal, person, organization, activity or product. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a file</a>.
41
+ * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a file</a>.
42
42
  * @param {File} file A single file, supplied in the multipart/form-data encoding and contained within the given boundaries
43
43
  * @param {Object} opts Optional parameters
44
44
  * @param {Number} opts.dealId The ID of the deal to associate file(s) with
@@ -46,6 +46,7 @@ var FilesApi = /*#__PURE__*/function () {
46
46
  * @param {Number} opts.orgId The ID of the organization to associate file(s) with
47
47
  * @param {Number} opts.productId The ID of the product to associate file(s) with
48
48
  * @param {Number} opts.activityId The ID of the activity to associate file(s) with
49
+ * @param {String} opts.leadId The ID of the lead to associate file(s) with
49
50
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddFile} and HTTP response
50
51
  */
51
52
  (0, _createClass2["default"])(FilesApi, [{
@@ -67,9 +68,10 @@ var FilesApi = /*#__PURE__*/function () {
67
68
  'person_id': opts['personId'],
68
69
  'org_id': opts['orgId'],
69
70
  'product_id': opts['productId'],
70
- 'activity_id': opts['activityId']
71
+ 'activity_id': opts['activityId'],
72
+ 'lead_id': opts['leadId']
71
73
  };
72
- var formParamArray = ['file', 'dealId', 'personId', 'orgId', 'productId', 'activityId'];
74
+ var formParamArray = ['file', 'dealId', 'personId', 'orgId', 'productId', 'activityId', 'leadId'];
73
75
  var contentTypes = ['multipart/form-data'];
74
76
  var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
75
77
  var isJSON = contentTypes.includes('application/json');
@@ -90,7 +92,7 @@ var FilesApi = /*#__PURE__*/function () {
90
92
 
91
93
  /**
92
94
  * Add file
93
- * Lets you upload a file and associate it with a deal, person, organization, activity or product. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a file</a>.
95
+ * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a file</a>.
94
96
  * @param {File} file A single file, supplied in the multipart/form-data encoding and contained within the given boundaries
95
97
  * @param {Object} opts Optional parameters
96
98
  * @param {Number} opts.dealId The ID of the deal to associate file(s) with
@@ -98,6 +100,7 @@ var FilesApi = /*#__PURE__*/function () {
98
100
  * @param {Number} opts.orgId The ID of the organization to associate file(s) with
99
101
  * @param {Number} opts.productId The ID of the product to associate file(s) with
100
102
  * @param {Number} opts.activityId The ID of the activity to associate file(s) with
103
+ * @param {String} opts.leadId The ID of the lead to associate file(s) with
101
104
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddFile}
102
105
  */
103
106
  }, {
@@ -168,7 +168,7 @@ var ItemSearchApi = /*#__PURE__*/function () {
168
168
  }
169
169
  }
170
170
  var authNames = ['api_key', 'oauth2'];
171
- var accepts = ['applicatoin/json'];
171
+ var accepts = ['application/json'];
172
172
  var returnType = _ItemSearchFieldResponse["default"];
173
173
  return this.apiClient.callApi('/itemSearch/field', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
174
174
  }
@@ -19,7 +19,6 @@ var _DeleteRoleAssignmentRequest = _interopRequireDefault(require("../model/Dele
19
19
  var _GetRole = _interopRequireDefault(require("../model/GetRole"));
20
20
  var _GetRoleAssignments = _interopRequireDefault(require("../model/GetRoleAssignments"));
21
21
  var _GetRoleSettings = _interopRequireDefault(require("../model/GetRoleSettings"));
22
- var _GetRoleSubroles = _interopRequireDefault(require("../model/GetRoleSubroles"));
23
22
  var _GetRoles = _interopRequireDefault(require("../model/GetRoles"));
24
23
  var _PostRoleAssignment = _interopRequireDefault(require("../model/PostRoleAssignment"));
25
24
  var _PostRoleSettings = _interopRequireDefault(require("../model/PostRoleSettings"));
@@ -516,70 +515,6 @@ var RolesApi = /*#__PURE__*/function () {
516
515
  });
517
516
  }
518
517
 
519
- /**
520
- * List role sub-roles
521
- * Returns the direct children of a specific role.
522
- * @param {Number} id The ID of the role
523
- * @param {Object} opts Optional parameters
524
- * @param {Number} opts.start Pagination start (default to 0)
525
- * @param {Number} opts.limit Items shown per page
526
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRoleSubroles} and HTTP response
527
- */
528
- }, {
529
- key: "getRoleSubRolesWithHttpInfo",
530
- value: function getRoleSubRolesWithHttpInfo(id, opts) {
531
- opts = opts || {};
532
- var postBody = null;
533
-
534
- // verify the required parameter 'id' is set
535
- if (id === undefined || id === null) {
536
- throw new Error("Missing the required parameter 'id' when calling getRoleSubRoles");
537
- }
538
- var pathParams = {
539
- 'id': id
540
- };
541
- var queryParams = {
542
- 'start': opts['start'],
543
- 'limit': opts['limit']
544
- };
545
- var headerParams = {};
546
- var formParams = {};
547
- var formParamArray = [];
548
- var contentTypes = [];
549
- var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
550
- var isJSON = contentTypes.includes('application/json');
551
- if (isJSON) {
552
- postBody = _objectSpread(_objectSpread({}, postBody), opts);
553
- } else if (isURLEncoded) {
554
- for (var key in opts) {
555
- if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
556
- formParams[key] = opts[key];
557
- }
558
- }
559
- }
560
- var authNames = ['api_key'];
561
- var accepts = ['application/json'];
562
- var returnType = _GetRoleSubroles["default"];
563
- return this.apiClient.callApi('/roles/{id}/roles', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
564
- }
565
-
566
- /**
567
- * List role sub-roles
568
- * Returns the direct children of a specific role.
569
- * @param {Number} id The ID of the role
570
- * @param {Object} opts Optional parameters
571
- * @param {Number} opts.start Pagination start (default to 0)
572
- * @param {Number} opts.limit Items shown per page
573
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRoleSubroles}
574
- */
575
- }, {
576
- key: "getRoleSubRoles",
577
- value: function getRoleSubRoles(id, opts) {
578
- return this.getRoleSubRolesWithHttpInfo(id, opts).then(function (response_and_data) {
579
- return response_and_data;
580
- });
581
- }
582
-
583
518
  /**
584
519
  * Get all roles
585
520
  * Returns all the roles within the company.
package/dist/index.js CHANGED
@@ -2128,18 +2128,6 @@ Object.defineProperty(exports, "GetRoleSettingsAllOf", {
2128
2128
  return _GetRoleSettingsAllOf["default"];
2129
2129
  }
2130
2130
  });
2131
- Object.defineProperty(exports, "GetRoleSubroles", {
2132
- enumerable: true,
2133
- get: function get() {
2134
- return _GetRoleSubroles["default"];
2135
- }
2136
- });
2137
- Object.defineProperty(exports, "GetRoleSubrolesAllOf", {
2138
- enumerable: true,
2139
- get: function get() {
2140
- return _GetRoleSubrolesAllOf["default"];
2141
- }
2142
- });
2143
2131
  Object.defineProperty(exports, "GetRoles", {
2144
2132
  enumerable: true,
2145
2133
  get: function get() {
@@ -4877,8 +4865,6 @@ var _GetRoleAssignments = _interopRequireDefault(require("./model/GetRoleAssignm
4877
4865
  var _GetRoleAssignmentsAllOf = _interopRequireDefault(require("./model/GetRoleAssignmentsAllOf"));
4878
4866
  var _GetRoleSettings = _interopRequireDefault(require("./model/GetRoleSettings"));
4879
4867
  var _GetRoleSettingsAllOf = _interopRequireDefault(require("./model/GetRoleSettingsAllOf"));
4880
- var _GetRoleSubroles = _interopRequireDefault(require("./model/GetRoleSubroles"));
4881
- var _GetRoleSubrolesAllOf = _interopRequireDefault(require("./model/GetRoleSubrolesAllOf"));
4882
4868
  var _GetRoles = _interopRequireDefault(require("./model/GetRoles"));
4883
4869
  var _GetRolesAllOf = _interopRequireDefault(require("./model/GetRolesAllOf"));
4884
4870
  var _GetStageDeals = _interopRequireDefault(require("./model/GetStageDeals"));
@@ -85,6 +85,10 @@ var FileData = /*#__PURE__*/function () {
85
85
  obj['activity_id'] = _ApiClient["default"].convertToType(data['activity_id'], 'Number');
86
86
  delete data['activity_id'];
87
87
  }
88
+ if (data.hasOwnProperty('lead_id')) {
89
+ obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
90
+ delete data['lead_id'];
91
+ }
88
92
  if (data.hasOwnProperty('add_time')) {
89
93
  obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
90
94
  delete data['add_time'];
@@ -149,6 +153,10 @@ var FileData = /*#__PURE__*/function () {
149
153
  obj['product_name'] = _ApiClient["default"].convertToType(data['product_name'], 'String');
150
154
  delete data['product_name'];
151
155
  }
156
+ if (data.hasOwnProperty('lead_name')) {
157
+ obj['lead_name'] = _ApiClient["default"].convertToType(data['lead_name'], 'String');
158
+ delete data['lead_name'];
159
+ }
152
160
  if (data.hasOwnProperty('url')) {
153
161
  obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
154
162
  delete data['url'];
@@ -212,6 +220,12 @@ FileData.prototype['product_id'] = undefined;
212
220
  */
213
221
  FileData.prototype['activity_id'] = undefined;
214
222
 
223
+ /**
224
+ * The ID of the lead to associate the file with
225
+ * @member {String} lead_id
226
+ */
227
+ FileData.prototype['lead_id'] = undefined;
228
+
215
229
  /**
216
230
  * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS
217
231
  * @member {String} add_time
@@ -308,6 +322,12 @@ FileData.prototype['org_name'] = undefined;
308
322
  */
309
323
  FileData.prototype['product_name'] = undefined;
310
324
 
325
+ /**
326
+ * The name of the lead associated with the file
327
+ * @member {String} lead_name
328
+ */
329
+ FileData.prototype['lead_name'] = undefined;
330
+
311
331
  /**
312
332
  * The URL of the download file
313
333
  * @member {String} url
@@ -85,6 +85,10 @@ var FileItem = /*#__PURE__*/function () {
85
85
  obj['activity_id'] = _ApiClient["default"].convertToType(data['activity_id'], 'Number');
86
86
  delete data['activity_id'];
87
87
  }
88
+ if (data.hasOwnProperty('lead_id')) {
89
+ obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
90
+ delete data['lead_id'];
91
+ }
88
92
  if (data.hasOwnProperty('add_time')) {
89
93
  obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
90
94
  delete data['add_time'];
@@ -149,6 +153,10 @@ var FileItem = /*#__PURE__*/function () {
149
153
  obj['product_name'] = _ApiClient["default"].convertToType(data['product_name'], 'String');
150
154
  delete data['product_name'];
151
155
  }
156
+ if (data.hasOwnProperty('lead_name')) {
157
+ obj['lead_name'] = _ApiClient["default"].convertToType(data['lead_name'], 'String');
158
+ delete data['lead_name'];
159
+ }
152
160
  if (data.hasOwnProperty('url')) {
153
161
  obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
154
162
  delete data['url'];
@@ -212,6 +220,12 @@ FileItem.prototype['product_id'] = undefined;
212
220
  */
213
221
  FileItem.prototype['activity_id'] = undefined;
214
222
 
223
+ /**
224
+ * The ID of the lead to associate the file with
225
+ * @member {String} lead_id
226
+ */
227
+ FileItem.prototype['lead_id'] = undefined;
228
+
215
229
  /**
216
230
  * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS
217
231
  * @member {String} add_time
@@ -308,6 +322,12 @@ FileItem.prototype['org_name'] = undefined;
308
322
  */
309
323
  FileItem.prototype['product_name'] = undefined;
310
324
 
325
+ /**
326
+ * The name of the lead associated with the file
327
+ * @member {String} lead_name
328
+ */
329
+ FileItem.prototype['lead_name'] = undefined;
330
+
311
331
  /**
312
332
  * The URL of the download file
313
333
  * @member {String} url
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "18.0.0",
3
+ "version": "18.0.2",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -13,14 +13,16 @@
13
13
  "test:functional": "node ./test/functional/environment.js",
14
14
  "test:coverage": "npm run test:functional -- --collectCoverage",
15
15
  "sonar": "pipedrive-sonar-scanner",
16
- "lint-staged": "lint-staged"
16
+ "lint-staged": "lint-staged",
17
+ "version": "changelog-updater && git add CHANGELOG.md"
17
18
  },
18
19
  "browser": {
19
20
  "fs": false
20
21
  },
21
22
  "dependencies": {
22
23
  "lodash": "^4.17.21",
23
- "superagent": "^7.1.3"
24
+ "superagent": "^7.1.3",
25
+ "@babel/runtime": "^7.20.1"
24
26
  },
25
27
  "devDependencies": {
26
28
  "@babel/cli": "^7.0.0",
@@ -45,8 +47,8 @@
45
47
  "@babel/plugin-transform-runtime": "^7.12.1",
46
48
  "@babel/preset-env": "^7.0.0",
47
49
  "@babel/register": "^7.0.0",
48
- "@babel/runtime": "^7.20.1",
49
50
  "babel-eslint": "^10.1.0",
51
+ "changelog-updater": "^2.0.3",
50
52
  "eslint": "^8.27.0",
51
53
  "eslint-config-pipedrive": "^13.0.0",
52
54
  "eslint-plugin-jest": "^27.1.5",