pipedrive 17.1.1 → 17.1.3

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,14 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## 17.1.3
12
+ ### Changed
13
+ - Updated `PUT /users/{:id}`: required parameter `active_flag` has no default value
14
+
15
+ ## 17.1.2
16
+ ### Changed
17
+ - Changed `PUT /goals/{id}` content type to `application/json`
18
+
11
19
  ## 17.1.1
12
20
  ### Changed
13
21
  - Description for product requests
@@ -17,6 +17,8 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
17
17
 
18
18
  var _AddOrUpdateGoalResponse = _interopRequireDefault(require("../model/AddOrUpdateGoalResponse200"));
19
19
 
20
+ var _BasicGoal = _interopRequireDefault(require("../model/BasicGoal"));
21
+
20
22
  var _DeleteGoalResponse = _interopRequireDefault(require("../model/DeleteGoalResponse200"));
21
23
 
22
24
  var _GetGoalResultResponse = _interopRequireDefault(require("../model/GetGoalResultResponse200"));
@@ -325,12 +327,7 @@ var GoalsApi = /*#__PURE__*/function () {
325
327
  * Updates an existing goal.
326
328
  * @param {String} id The ID of the goal to be updated
327
329
  * @param {Object} opts Optional parameters
328
- * @param {String} opts.title The title of the goal
329
- * @param {Object.<String, Object>} opts.assignee Who this goal is assigned to. It requires the following JSON structure: { \\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"person\\\" }. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team.
330
- * @param {Object.<String, Object>} opts.type The type of the goal. It requires the following JSON structure: { \\\"name\\\": \\\"deals_started\\\", \\\"params\\\": { \\\"pipeline_id\\\": 1 } }. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. To track goal in all pipelines set `pipeline_id` as `null`.
331
- * @param {Object.<String, Object>} opts.expectedOutcome The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: { \\\"target\\\": \\\"50\\\", \\\"tracking_metric\\\": \\\"quantity\\\" } or { \\\"target\\\": \\\"50\\\", \\\"tracking_metric\\\": \\\"sum\\\", \\\"currency_id\\\": 1 }. `currency_id` should only be added to `sum` type of goals.
332
- * @param {Object.<String, Object>} opts.duration The date when the goal starts and ends. It requires the following JSON structure: { \\\"start\\\": \\\"2019-01-01\\\", \\\"end\\\": \\\"2022-12-31\\\" }. Date in format of YYYY-MM-DD. \\\"end\\\" can be set to `null` for an infinite, open-ended goal.
333
- * @param {module:model/String} opts.interval The interval of the goal
330
+ * @param {module:model/BasicGoal} opts.basicGoal
334
331
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddOrUpdateGoalResponse200} and HTTP response
335
332
  */
336
333
 
@@ -338,7 +335,7 @@ var GoalsApi = /*#__PURE__*/function () {
338
335
  key: "updateGoalWithHttpInfo",
339
336
  value: function updateGoalWithHttpInfo(id, opts) {
340
337
  opts = opts || {};
341
- var postBody = null; // verify the required parameter 'id' is set
338
+ var postBody = opts['basicGoal']; // verify the required parameter 'id' is set
342
339
 
343
340
  if (id === undefined || id === null) {
344
341
  throw new Error("Missing the required parameter 'id' when calling updateGoal");
@@ -349,16 +346,9 @@ var GoalsApi = /*#__PURE__*/function () {
349
346
  };
350
347
  var queryParams = {};
351
348
  var headerParams = {};
352
- var formParams = {
353
- 'title': opts['title'],
354
- 'assignee': opts['assignee'],
355
- 'type': opts['type'],
356
- 'expected_outcome': opts['expectedOutcome'],
357
- 'duration': opts['duration'],
358
- 'interval': opts['interval']
359
- };
360
- var formParamArray = ['title', 'assignee', 'type', 'expectedOutcome', 'duration', 'interval'];
361
- var contentTypes = ['application/x-www-form-urlencoded'];
349
+ var formParams = {};
350
+ var formParamArray = [];
351
+ var contentTypes = ['application/json'];
362
352
  var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
363
353
  var isJSON = contentTypes.includes('application/json');
364
354
 
@@ -382,12 +372,7 @@ var GoalsApi = /*#__PURE__*/function () {
382
372
  * Updates an existing goal.
383
373
  * @param {String} id The ID of the goal to be updated
384
374
  * @param {Object} opts Optional parameters
385
- * @param {String} opts.title The title of the goal
386
- * @param {Object.<String, Object>} opts.assignee Who this goal is assigned to. It requires the following JSON structure: { \\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"person\\\" }. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team.
387
- * @param {Object.<String, Object>} opts.type The type of the goal. It requires the following JSON structure: { \\\"name\\\": \\\"deals_started\\\", \\\"params\\\": { \\\"pipeline_id\\\": 1 } }. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. To track goal in all pipelines set `pipeline_id` as `null`.
388
- * @param {Object.<String, Object>} opts.expectedOutcome The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: { \\\"target\\\": \\\"50\\\", \\\"tracking_metric\\\": \\\"quantity\\\" } or { \\\"target\\\": \\\"50\\\", \\\"tracking_metric\\\": \\\"sum\\\", \\\"currency_id\\\": 1 }. `currency_id` should only be added to `sum` type of goals.
389
- * @param {Object.<String, Object>} opts.duration The date when the goal starts and ends. It requires the following JSON structure: { \\\"start\\\": \\\"2019-01-01\\\", \\\"end\\\": \\\"2022-12-31\\\" }. Date in format of YYYY-MM-DD. \\\"end\\\" can be set to `null` for an infinite, open-ended goal.
390
- * @param {module:model/String} opts.interval The interval of the goal
375
+ * @param {module:model/BasicGoal} opts.basicGoal
391
376
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddOrUpdateGoalResponse200}
392
377
  */
393
378
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "17.1.1",
3
+ "version": "17.1.3",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",