pipedrive 12.1.0 → 13.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,30 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
6
6
 
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
+ ## [Unreleased]
10
+
11
+ ## 13.0.2
12
+ ### Fixed
13
+ - Fixed items type for `email` and `phone` body parameters
14
+ * POST /persons
15
+
16
+ ## 13.0.1
17
+ ### Added
18
+ - Added `filter_id` to `GET /products` query parameters that was wrongfully removed in 0.1.18
19
+
20
+ ## 13.0.0
21
+ ### Removed
22
+ - Removed `int` type from `POST /v1/organizationFields` field_type values
23
+ - Removed `int` type from `POST /v1/personFields` field_type values
24
+ - Removed `int` type from `POST /v1/dealFields` field_type values
25
+
26
+ ## 12.2.0
27
+ ### Changed
28
+ - Changed notes and comments endpoints additional_data to match the correct pagination response
29
+ structure
30
+ * GET /notes
31
+ * GET /notes/:id/comments
32
+
9
33
  ## 12.1.0
10
34
  ### Removed
11
35
  * Removed deprecated endpoints that were deleted:
package/README.md CHANGED
@@ -563,6 +563,7 @@ Class | Method | HTTP request | Description
563
563
  - [Pipedrive.AddedDealFollowerData](docs/AddedDealFollowerData.md)
564
564
  - [Pipedrive.AdditionalBaseOrganizationItemInfo](docs/AdditionalBaseOrganizationItemInfo.md)
565
565
  - [Pipedrive.AdditionalData](docs/AdditionalData.md)
566
+ - [Pipedrive.AdditionalDataWithPagination](docs/AdditionalDataWithPagination.md)
566
567
  - [Pipedrive.AdditionalDataWithPaginationDetails](docs/AdditionalDataWithPaginationDetails.md)
567
568
  - [Pipedrive.AdditionalMergePersonInfo](docs/AdditionalMergePersonInfo.md)
568
569
  - [Pipedrive.AdditionalPersonInfo](docs/AdditionalPersonInfo.md)
@@ -628,6 +628,7 @@ var ProductsApi = /*#__PURE__*/function () {
628
628
  * Returns data about all Products
629
629
  * @param {Object} opts Optional parameters
630
630
  * @param {Number} opts.userId If supplied, only Products owned by the given user will be returned
631
+ * @param {Number} opts.filterId ID of the filter to use
631
632
  * @param {Array.<Number>} opts.ids An array of integers with the IDs of the Products that sould be returned in the response
632
633
  * @param {String} opts.firstChar If supplied, only Products whose name starts with the specified letter will be returned (case insensitive)
633
634
  * @param {Boolean} opts.getSummary If supplied, response will return the total numbers of Products in the `additional_data.summary.total_count` property
@@ -644,6 +645,7 @@ var ProductsApi = /*#__PURE__*/function () {
644
645
  var pathParams = {};
645
646
  var queryParams = {
646
647
  'user_id': opts['userId'],
648
+ 'filter_id': opts['filterId'],
647
649
  'ids': this.apiClient.buildCollectionParam(opts['ids'], 'csv'),
648
650
  'first_char': opts['firstChar'],
649
651
  'get_summary': opts['getSummary'],
@@ -677,6 +679,7 @@ var ProductsApi = /*#__PURE__*/function () {
677
679
  * Returns data about all Products
678
680
  * @param {Object} opts Optional parameters
679
681
  * @param {Number} opts.userId If supplied, only Products owned by the given user will be returned
682
+ * @param {Number} opts.filterId ID of the filter to use
680
683
  * @param {Array.<Number>} opts.ids An array of integers with the IDs of the Products that sould be returned in the response
681
684
  * @param {String} opts.firstChar If supplied, only Products whose name starts with the specified letter will be returned (case insensitive)
682
685
  * @param {Boolean} opts.getSummary If supplied, response will return the total numbers of Products in the `additional_data.summary.total_count` property
package/dist/index.js CHANGED
@@ -359,6 +359,12 @@ Object.defineProperty(exports, "AdditionalData", {
359
359
  return _AdditionalData["default"];
360
360
  }
361
361
  });
362
+ Object.defineProperty(exports, "AdditionalDataWithPagination", {
363
+ enumerable: true,
364
+ get: function get() {
365
+ return _AdditionalDataWithPagination["default"];
366
+ }
367
+ });
362
368
  Object.defineProperty(exports, "AdditionalDataWithPaginationDetails", {
363
369
  enumerable: true,
364
370
  get: function get() {
@@ -4398,6 +4404,8 @@ var _AdditionalBaseOrganizationItemInfo = _interopRequireDefault(require("./mode
4398
4404
 
4399
4405
  var _AdditionalData = _interopRequireDefault(require("./model/AdditionalData"));
4400
4406
 
4407
+ var _AdditionalDataWithPagination = _interopRequireDefault(require("./model/AdditionalDataWithPagination"));
4408
+
4401
4409
  var _AdditionalDataWithPaginationDetails = _interopRequireDefault(require("./model/AdditionalDataWithPaginationDetails"));
4402
4410
 
4403
4411
  var _AdditionalMergePersonInfo = _interopRequireDefault(require("./model/AdditionalMergePersonInfo"));
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
+
16
+ var _AdditionalData = _interopRequireDefault(require("./AdditionalData"));
17
+
18
+ /**
19
+ * Pipedrive API v1
20
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21
+ *
22
+ * The version of the OpenAPI document: 1.0.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+
31
+ /**
32
+ * The AdditionalDataWithPagination model module.
33
+ * @module model/AdditionalDataWithPagination
34
+ * @version 1.0.0
35
+ */
36
+ var AdditionalDataWithPagination = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>AdditionalDataWithPagination</code>.
39
+ * @alias module:model/AdditionalDataWithPagination
40
+ */
41
+ function AdditionalDataWithPagination() {
42
+ (0, _classCallCheck2["default"])(this, AdditionalDataWithPagination);
43
+ AdditionalDataWithPagination.initialize(this);
44
+ }
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+
51
+
52
+ (0, _createClass2["default"])(AdditionalDataWithPagination, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj) {}
55
+ /**
56
+ * Constructs a <code>AdditionalDataWithPagination</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/AdditionalDataWithPagination} obj Optional instance to populate.
60
+ * @return {module:model/AdditionalDataWithPagination} The populated <code>AdditionalDataWithPagination</code> instance.
61
+ */
62
+
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new AdditionalDataWithPagination();
68
+
69
+ if (data.hasOwnProperty('pagination')) {
70
+ obj['pagination'] = _ApiClient["default"].convertToType(data['pagination'], _AdditionalData["default"]);
71
+ delete data['pagination'];
72
+ }
73
+
74
+ if (Object.keys(data).length > 0) {
75
+ Object.assign(obj, data);
76
+ }
77
+ }
78
+
79
+ return obj;
80
+ }
81
+ }]);
82
+ return AdditionalDataWithPagination;
83
+ }();
84
+ /**
85
+ * Pagination details of the list
86
+ * @member {module:model/AdditionalData} pagination
87
+ */
88
+
89
+
90
+ AdditionalDataWithPagination.prototype['pagination'] = undefined;
91
+ var _default = AdditionalDataWithPagination;
92
+ exports["default"] = _default;
@@ -13,6 +13,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
13
13
 
14
14
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
15
 
16
+ var _BasePersonItemEmail = _interopRequireDefault(require("./BasePersonItemEmail"));
17
+
18
+ var _BasePersonItemPhone = _interopRequireDefault(require("./BasePersonItemPhone"));
19
+
16
20
  var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
17
21
 
18
22
  /**
@@ -82,12 +86,12 @@ var BasicPerson = /*#__PURE__*/function () {
82
86
  }
83
87
 
84
88
  if (data.hasOwnProperty('email')) {
85
- obj['email'] = _ApiClient["default"].convertToType(data['email'], ['String']);
89
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], [_BasePersonItemEmail["default"]]);
86
90
  delete data['email'];
87
91
  }
88
92
 
89
93
  if (data.hasOwnProperty('phone')) {
90
- obj['phone'] = _ApiClient["default"].convertToType(data['phone'], ['String']);
94
+ obj['phone'] = _ApiClient["default"].convertToType(data['phone'], [_BasePersonItemPhone["default"]]);
91
95
  delete data['phone'];
92
96
  }
93
97
 
@@ -126,14 +130,14 @@ BasicPerson.prototype['owner_id'] = undefined;
126
130
 
127
131
  BasicPerson.prototype['org_id'] = undefined;
128
132
  /**
129
- * Email addresses (one or more) associated with the person, presented in the same manner as received by GET request of a person.
130
- * @member {Array.<String>} email
133
+ * List of email data related to the Person
134
+ * @member {Array.<module:model/BasePersonItemEmail>} email
131
135
  */
132
136
 
133
137
  BasicPerson.prototype['email'] = undefined;
134
138
  /**
135
- * Phone numbers (one or more) associated with the person, presented in the same manner as received by GET request of a person.
136
- * @member {Array.<String>} phone
139
+ * List of phone data related to the Person
140
+ * @member {Array.<module:model/BasePersonItemPhone>} phone
137
141
  */
138
142
 
139
143
  BasicPerson.prototype['phone'] = undefined;
@@ -41,7 +41,6 @@ var FieldTypeAsString = /*#__PURE__*/function () {
41
41
  (0, _defineProperty2["default"])(this, "daterange", "daterange");
42
42
  (0, _defineProperty2["default"])(this, "double", "double");
43
43
  (0, _defineProperty2["default"])(this, "enum", "enum");
44
- (0, _defineProperty2["default"])(this, "int", "int");
45
44
  (0, _defineProperty2["default"])(this, "monetary", "monetary");
46
45
  (0, _defineProperty2["default"])(this, "org", "org");
47
46
  (0, _defineProperty2["default"])(this, "people", "people");
@@ -13,7 +13,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
13
13
 
14
14
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
15
 
16
- var _AdditionalData = _interopRequireDefault(require("./AdditionalData"));
16
+ var _AdditionalDataWithPagination = _interopRequireDefault(require("./AdditionalDataWithPagination"));
17
17
 
18
18
  var _BaseComment = _interopRequireDefault(require("./BaseComment"));
19
19
 
@@ -79,7 +79,7 @@ var GetComments = /*#__PURE__*/function () {
79
79
  }
80
80
 
81
81
  if (data.hasOwnProperty('additional_data')) {
82
- obj['additional_data'] = _AdditionalData["default"].constructFromObject(data['additional_data']);
82
+ obj['additional_data'] = _AdditionalDataWithPagination["default"].constructFromObject(data['additional_data']);
83
83
  delete data['additional_data'];
84
84
  }
85
85
 
@@ -107,7 +107,7 @@ GetComments.prototype['success'] = undefined;
107
107
 
108
108
  GetComments.prototype['data'] = undefined;
109
109
  /**
110
- * @member {module:model/AdditionalData} additional_data
110
+ * @member {module:model/AdditionalDataWithPagination} additional_data
111
111
  */
112
112
 
113
113
  GetComments.prototype['additional_data'] = undefined;
@@ -13,7 +13,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
13
13
 
14
14
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
15
 
16
- var _AdditionalData = _interopRequireDefault(require("./AdditionalData"));
16
+ var _AdditionalDataWithPagination = _interopRequireDefault(require("./AdditionalDataWithPagination"));
17
17
 
18
18
  var _BaseNote = _interopRequireDefault(require("./BaseNote"));
19
19
 
@@ -79,7 +79,7 @@ var GetNotes = /*#__PURE__*/function () {
79
79
  }
80
80
 
81
81
  if (data.hasOwnProperty('additional_data')) {
82
- obj['additional_data'] = _AdditionalData["default"].constructFromObject(data['additional_data']);
82
+ obj['additional_data'] = _AdditionalDataWithPagination["default"].constructFromObject(data['additional_data']);
83
83
  delete data['additional_data'];
84
84
  }
85
85
 
@@ -107,7 +107,7 @@ GetNotes.prototype['success'] = undefined;
107
107
 
108
108
  GetNotes.prototype['data'] = undefined;
109
109
  /**
110
- * @member {module:model/AdditionalData} additional_data
110
+ * @member {module:model/AdditionalDataWithPagination} additional_data
111
111
  */
112
112
 
113
113
  GetNotes.prototype['additional_data'] = undefined;
@@ -13,6 +13,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
13
13
 
14
14
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
15
 
16
+ var _BasePersonItemEmail = _interopRequireDefault(require("./BasePersonItemEmail"));
17
+
18
+ var _BasePersonItemPhone = _interopRequireDefault(require("./BasePersonItemPhone"));
19
+
16
20
  var _BasicPerson = _interopRequireDefault(require("./BasicPerson"));
17
21
 
18
22
  var _NewPersonAllOf = _interopRequireDefault(require("./NewPersonAllOf"));
@@ -100,12 +104,12 @@ var NewPerson = /*#__PURE__*/function () {
100
104
  }
101
105
 
102
106
  if (data.hasOwnProperty('email')) {
103
- obj['email'] = _ApiClient["default"].convertToType(data['email'], ['String']);
107
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], [_BasePersonItemEmail["default"]]);
104
108
  delete data['email'];
105
109
  }
106
110
 
107
111
  if (data.hasOwnProperty('phone')) {
108
- obj['phone'] = _ApiClient["default"].convertToType(data['phone'], ['String']);
112
+ obj['phone'] = _ApiClient["default"].convertToType(data['phone'], [_BasePersonItemPhone["default"]]);
109
113
  delete data['phone'];
110
114
  }
111
115
 
@@ -149,14 +153,14 @@ NewPerson.prototype['owner_id'] = undefined;
149
153
 
150
154
  NewPerson.prototype['org_id'] = undefined;
151
155
  /**
152
- * Email addresses (one or more) associated with the person, presented in the same manner as received by GET request of a person.
153
- * @member {Array.<String>} email
156
+ * List of email data related to the Person
157
+ * @member {Array.<module:model/BasePersonItemEmail>} email
154
158
  */
155
159
 
156
160
  NewPerson.prototype['email'] = undefined;
157
161
  /**
158
- * Phone numbers (one or more) associated with the person, presented in the same manner as received by GET request of a person.
159
- * @member {Array.<String>} phone
162
+ * List of phone data related to the Person
163
+ * @member {Array.<module:model/BasePersonItemPhone>} phone
160
164
  */
161
165
 
162
166
  NewPerson.prototype['phone'] = undefined;
@@ -192,14 +196,14 @@ _BasicPerson["default"].prototype['owner_id'] = undefined;
192
196
 
193
197
  _BasicPerson["default"].prototype['org_id'] = undefined;
194
198
  /**
195
- * Email addresses (one or more) associated with the person, presented in the same manner as received by GET request of a person.
196
- * @member {Array.<String>} email
199
+ * List of email data related to the Person
200
+ * @member {Array.<module:model/BasePersonItemEmail>} email
197
201
  */
198
202
 
199
203
  _BasicPerson["default"].prototype['email'] = undefined;
200
204
  /**
201
- * Phone numbers (one or more) associated with the person, presented in the same manner as received by GET request of a person.
202
- * @member {Array.<String>} phone
205
+ * List of phone data related to the Person
206
+ * @member {Array.<module:model/BasePersonItemPhone>} phone
203
207
  */
204
208
 
205
209
  _BasicPerson["default"].prototype['phone'] = undefined;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "12.1.0",
3
+ "version": "13.0.2",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
8
8
  "build": "babel src -d dist",
9
9
  "prepack": "npm run build",
10
- "test": "echo \"Temporarily skipping unit tests\" && exit 0",
10
+ "test": "npm run test:functional:start && npm run test:functional && npm run test:functional:stop",
11
11
  "test:functional": "node ./test/functional/environment.js",
12
12
  "test:functional:start": "node ./test/functional/environment.js --start-environment",
13
13
  "test:functional:stop": "node ./test/functional/environment.js --stop-environment"