pipedrive 13.2.6 → 13.2.9

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
@@ -8,15 +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.9
12
+ ### Changed
13
+ - Added missing oauth scopes to /products/{id}/permittedUsers endpoint
14
+
15
+ ## 13.2.8
16
+ ### Fixed
17
+ - Changed rotten_flag type to boolean in `StagesApi`
18
+
19
+ ## 13.2.7
20
+ ### Changed
21
+ - Added `everyone` parameter to `GET /v1/stages/{id}` endpoint
22
+ - Updated `/v1/deals` endpoint `stage_id` and added `pipeline_id` descriptions
23
+
11
24
  ## 13.2.6
12
- ## Changed
25
+ ### Changed
13
26
  - Updated `POST /products`: parameter `name` is required
14
27
  - Updated `PUT /deals/:dealId/products`: parameter `quantity` and `item_price` are required
15
28
  - Updated `POST /deals/:dealId/products`: parameter `quantity` and `item_price` are required
16
- -
29
+ -
17
30
 
18
31
  ## 13.2.5
19
- ## Changed
32
+ ### Changed
20
33
  - Updated `POST /notes`: parameter `content` is required
21
34
  - Updated `POST /organizations`: parameter `name` is required
22
35
  - Updated `POST /persons`: parameter `name` is required
@@ -30,7 +43,7 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an
30
43
  - Added quotation marks to fix formatting for Organizations endpoint `visible_to` parameter
31
44
  - Updated `prices` parameter description in Products endpoint
32
45
 
33
- ## 13.2.3
46
+ ## 13.2.3
34
47
  ### Changed
35
48
  - Update `visible_to` parameter for `POST /deals` and `PUT /deals/{id}`. Differentiate options by plans
36
49
  - Update `visible_to` parameter for `POST /persons` and `PUT /persons/{id}`. Differentiate options by plans
@@ -96,7 +109,7 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an
96
109
  ### Fixed
97
110
  - Fixed `POST /roles/{id}/settings` `value` parameter description
98
111
  ### Added
99
- - Added type to `POST /roles/{id}/settings` `value` parameter
112
+ - Added type to `POST /roles/{id}/settings` `value` parameter
100
113
  - Added description to `POST /roles/{id}/settings`
101
114
 
102
115
  ## 13.0.5
@@ -608,7 +608,7 @@ var ProductsApi = /*#__PURE__*/function () {
608
608
  }
609
609
  }
610
610
 
611
- var authNames = ['api_key'];
611
+ var authNames = ['api_key', 'oauth2'];
612
612
  var accepts = ['application/json'];
613
613
  var returnType = _UserIDs["default"];
614
614
  return this.apiClient.callApi('/products/{id}/permittedUsers', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
@@ -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
  }
@@ -95,7 +95,7 @@ var BaseStage = /*#__PURE__*/function () {
95
95
  }
96
96
 
97
97
  if (data.hasOwnProperty('rotten_flag')) {
98
- obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Number');
98
+ obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
99
99
  delete data['rotten_flag'];
100
100
  }
101
101
 
@@ -187,22 +187,22 @@ BaseStage.prototype['add_time'] = undefined;
187
187
  BaseStage.prototype['update_time'] = undefined;
188
188
  /**
189
189
  * Allowed values for the <code>rotten_flag</code> property.
190
- * @enum {Number}
190
+ * @enum {Boolean}
191
191
  * @readonly
192
192
  */
193
193
 
194
194
  BaseStage['RottenFlagEnum'] = {
195
195
  /**
196
- * value: 0
196
+ * value: "true"
197
197
  * @const
198
198
  */
199
- "0": 0,
199
+ "true": "true",
200
200
 
201
201
  /**
202
- * value: 1
202
+ * value: "false"
203
203
  * @const
204
204
  */
205
- "1": 1
205
+ "false": "false"
206
206
  };
207
207
  var _default = BaseStage;
208
208
  exports["default"] = _default;
@@ -91,6 +91,11 @@ var BasicDeal = /*#__PURE__*/function () {
91
91
  delete data['org_id'];
92
92
  }
93
93
 
94
+ if (data.hasOwnProperty('pipeline_id')) {
95
+ obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
96
+ delete data['pipeline_id'];
97
+ }
98
+
94
99
  if (data.hasOwnProperty('stage_id')) {
95
100
  obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
96
101
  delete data['stage_id'];
@@ -163,7 +168,13 @@ BasicDeal.prototype['person_id'] = undefined;
163
168
 
164
169
  BasicDeal.prototype['org_id'] = undefined;
165
170
  /**
166
- * The ID of a stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on `stage_id`). If omitted, the deal will be placed in the first stage of the default pipeline.
171
+ * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
172
+ * @member {Number} pipeline_id
173
+ */
174
+
175
+ BasicDeal.prototype['pipeline_id'] = undefined;
176
+ /**
177
+ * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
167
178
  * @member {Number} stage_id
168
179
  */
169
180
 
@@ -121,6 +121,11 @@ var NewDeal = /*#__PURE__*/function () {
121
121
  delete data['org_id'];
122
122
  }
123
123
 
124
+ if (data.hasOwnProperty('pipeline_id')) {
125
+ obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
126
+ delete data['pipeline_id'];
127
+ }
128
+
124
129
  if (data.hasOwnProperty('stage_id')) {
125
130
  obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
126
131
  delete data['stage_id'];
@@ -204,7 +209,13 @@ NewDeal.prototype['person_id'] = undefined;
204
209
 
205
210
  NewDeal.prototype['org_id'] = undefined;
206
211
  /**
207
- * The ID of a stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on `stage_id`). If omitted, the deal will be placed in the first stage of the default pipeline.
212
+ * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
213
+ * @member {Number} pipeline_id
214
+ */
215
+
216
+ NewDeal.prototype['pipeline_id'] = undefined;
217
+ /**
218
+ * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
208
219
  * @member {Number} stage_id
209
220
  */
210
221
 
@@ -284,7 +295,13 @@ _BasicDeal["default"].prototype['person_id'] = undefined;
284
295
 
285
296
  _BasicDeal["default"].prototype['org_id'] = undefined;
286
297
  /**
287
- * The ID of a stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on `stage_id`). If omitted, the deal will be placed in the first stage of the default pipeline.
298
+ * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
299
+ * @member {Number} pipeline_id
300
+ */
301
+
302
+ _BasicDeal["default"].prototype['pipeline_id'] = undefined;
303
+ /**
304
+ * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
288
305
  * @member {Number} stage_id
289
306
  */
290
307
 
@@ -80,7 +80,7 @@ var Stage = /*#__PURE__*/function () {
80
80
  }
81
81
 
82
82
  if (data.hasOwnProperty('rotten_flag')) {
83
- obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Number');
83
+ obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
84
84
  delete data['rotten_flag'];
85
85
  }
86
86
 
@@ -132,22 +132,22 @@ Stage.prototype['rotten_flag'] = undefined;
132
132
  Stage.prototype['rotten_days'] = undefined;
133
133
  /**
134
134
  * Allowed values for the <code>rotten_flag</code> property.
135
- * @enum {Number}
135
+ * @enum {Boolean}
136
136
  * @readonly
137
137
  */
138
138
 
139
139
  Stage['RottenFlagEnum'] = {
140
140
  /**
141
- * value: 0
141
+ * value: "true"
142
142
  * @const
143
143
  */
144
- "0": 0,
144
+ "true": "true",
145
145
 
146
146
  /**
147
- * value: 1
147
+ * value: "false"
148
148
  * @const
149
149
  */
150
- "1": 1
150
+ "false": "false"
151
151
  };
152
152
  var _default = Stage;
153
153
  exports["default"] = _default;
@@ -113,7 +113,7 @@ var StageDetails = /*#__PURE__*/function () {
113
113
  }
114
114
 
115
115
  if (data.hasOwnProperty('rotten_flag')) {
116
- obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Number');
116
+ obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
117
117
  delete data['rotten_flag'];
118
118
  }
119
119
 
@@ -282,22 +282,22 @@ _BaseStage["default"].prototype['update_time'] = undefined; // Implement Pipelin
282
282
  _PipelineDetailsAllOf["default"].prototype['deals_summary'] = undefined;
283
283
  /**
284
284
  * Allowed values for the <code>rotten_flag</code> property.
285
- * @enum {Number}
285
+ * @enum {Boolean}
286
286
  * @readonly
287
287
  */
288
288
 
289
289
  StageDetails['RottenFlagEnum'] = {
290
290
  /**
291
- * value: 0
291
+ * value: "true"
292
292
  * @const
293
293
  */
294
- "0": 0,
294
+ "true": "true",
295
295
 
296
296
  /**
297
- * value: 1
297
+ * value: "false"
298
298
  * @const
299
299
  */
300
- "1": 1
300
+ "false": "false"
301
301
  };
302
302
  var _default = StageDetails;
303
303
  exports["default"] = _default;
@@ -110,7 +110,7 @@ var StageWithPipelineInfo = /*#__PURE__*/function () {
110
110
  }
111
111
 
112
112
  if (data.hasOwnProperty('rotten_flag')) {
113
- obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Number');
113
+ obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
114
114
  delete data['rotten_flag'];
115
115
  }
116
116
 
@@ -298,22 +298,22 @@ _StageWithPipelineInfoAllOf["default"].prototype['pipeline_name'] = undefined;
298
298
  _StageWithPipelineInfoAllOf["default"].prototype['pipeline_deal_probability'] = undefined;
299
299
  /**
300
300
  * Allowed values for the <code>rotten_flag</code> property.
301
- * @enum {Number}
301
+ * @enum {Boolean}
302
302
  * @readonly
303
303
  */
304
304
 
305
305
  StageWithPipelineInfo['RottenFlagEnum'] = {
306
306
  /**
307
- * value: 0
307
+ * value: "true"
308
308
  * @const
309
309
  */
310
- "0": 0,
310
+ "true": "true",
311
311
 
312
312
  /**
313
- * value: 1
313
+ * value: "false"
314
314
  * @const
315
315
  */
316
- "1": 1
316
+ "false": "false"
317
317
  };
318
318
  var _default = StageWithPipelineInfo;
319
319
  exports["default"] = _default;
@@ -111,6 +111,11 @@ var UpdateDealRequest = /*#__PURE__*/function () {
111
111
  delete data['org_id'];
112
112
  }
113
113
 
114
+ if (data.hasOwnProperty('pipeline_id')) {
115
+ obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
116
+ delete data['pipeline_id'];
117
+ }
118
+
114
119
  if (data.hasOwnProperty('stage_id')) {
115
120
  obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
116
121
  delete data['stage_id'];
@@ -189,7 +194,13 @@ UpdateDealRequest.prototype['person_id'] = undefined;
189
194
 
190
195
  UpdateDealRequest.prototype['org_id'] = undefined;
191
196
  /**
192
- * The ID of a stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on `stage_id`). If omitted, the deal will be placed in the first stage of the default pipeline.
197
+ * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
198
+ * @member {Number} pipeline_id
199
+ */
200
+
201
+ UpdateDealRequest.prototype['pipeline_id'] = undefined;
202
+ /**
203
+ * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
193
204
  * @member {Number} stage_id
194
205
  */
195
206
 
@@ -263,7 +274,13 @@ _BasicDeal["default"].prototype['person_id'] = undefined;
263
274
 
264
275
  _BasicDeal["default"].prototype['org_id'] = undefined;
265
276
  /**
266
- * The ID of a stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on `stage_id`). If omitted, the deal will be placed in the first stage of the default pipeline.
277
+ * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
278
+ * @member {Number} pipeline_id
279
+ */
280
+
281
+ _BasicDeal["default"].prototype['pipeline_id'] = undefined;
282
+ /**
283
+ * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
267
284
  * @member {Number} stage_id
268
285
  */
269
286
 
@@ -95,7 +95,7 @@ var UpdateStageRequest = /*#__PURE__*/function () {
95
95
  }
96
96
 
97
97
  if (data.hasOwnProperty('rotten_flag')) {
98
- obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Number');
98
+ obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
99
99
  delete data['rotten_flag'];
100
100
  }
101
101
 
@@ -196,22 +196,22 @@ _Stage["default"].prototype['rotten_days'] = undefined; // Implement UpdateStage
196
196
  _UpdateStageRequestAllOf["default"].prototype['order_nr'] = undefined;
197
197
  /**
198
198
  * Allowed values for the <code>rotten_flag</code> property.
199
- * @enum {Number}
199
+ * @enum {Boolean}
200
200
  * @readonly
201
201
  */
202
202
 
203
203
  UpdateStageRequest['RottenFlagEnum'] = {
204
204
  /**
205
- * value: 0
205
+ * value: "true"
206
206
  * @const
207
207
  */
208
- "0": 0,
208
+ "true": "true",
209
209
 
210
210
  /**
211
- * value: 1
211
+ * value: "false"
212
212
  * @const
213
213
  */
214
- "1": 1
214
+ "false": "false"
215
215
  };
216
216
  var _default = UpdateStageRequest;
217
217
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "13.2.6",
3
+ "version": "13.2.9",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",