pipedrive 22.4.0 → 22.5.0

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/README.md CHANGED
@@ -300,6 +300,12 @@ app.get('/callback', (req, res) => {
300
300
 
301
301
 
302
302
 
303
+ ### basic_authentication
304
+
305
+ - **Type**: HTTP basic authentication
306
+
307
+
308
+
303
309
  ### oauth2
304
310
 
305
311
 
@@ -389,6 +395,7 @@ Class | Method | HTTP request | Description
389
395
  *Pipedrive.DealsApi* | [**getDealFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealFollowers) | **GET** /deals/{id}/followers | List followers of a deal
390
396
  *Pipedrive.DealsApi* | [**getDealMailMessages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealMailMessages) | **GET** /deals/{id}/mailMessages | List mail messages associated with a deal
391
397
  *Pipedrive.DealsApi* | [**getDealParticipants**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealParticipants) | **GET** /deals/{id}/participants | List participants of a deal
398
+ *Pipedrive.DealsApi* | [**getDealParticipantsChangelog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealParticipantsChangelog) | **GET** /deals/{id}/participantsChangelog | List updates about participants of a deal
392
399
  *Pipedrive.DealsApi* | [**getDealPersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealPersons) | **GET** /deals/{id}/persons | List all persons associated with a deal
393
400
  *Pipedrive.DealsApi* | [**getDealProducts**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealProducts) | **GET** /deals/{id}/products | List products attached to a deal
394
401
  *Pipedrive.DealsApi* | [**getDealUpdates**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealUpdates) | **GET** /deals/{id}/flow | List updates about a deal
@@ -785,6 +792,7 @@ Class | Method | HTTP request | Description
785
792
  - [Pipedrive.DealOrganizationDataWithIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealOrganizationDataWithIdAllOf.md)
786
793
  - [Pipedrive.DealParticipantCountInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipantCountInfo.md)
787
794
  - [Pipedrive.DealParticipants](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipants.md)
795
+ - [Pipedrive.DealParticipantsChangelog](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipantsChangelog.md)
788
796
  - [Pipedrive.DealPersonData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonData.md)
789
797
  - [Pipedrive.DealPersonDataEmail](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataEmail.md)
790
798
  - [Pipedrive.DealPersonDataPhone](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataPhone.md)
@@ -1190,6 +1198,8 @@ Class | Method | HTTP request | Description
1190
1198
  - [Pipedrive.PaginationDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaginationDetails.md)
1191
1199
  - [Pipedrive.PaginationDetailsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaginationDetailsAllOf.md)
1192
1200
  - [Pipedrive.Params](https://github.com/pipedrive/client-nodejs/blob/master/docs/Params.md)
1201
+ - [Pipedrive.ParticipantsChangelog](https://github.com/pipedrive/client-nodejs/blob/master/docs/ParticipantsChangelog.md)
1202
+ - [Pipedrive.ParticipantsChangelogItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ParticipantsChangelogItem.md)
1193
1203
  - [Pipedrive.PaymentItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentItem.md)
1194
1204
  - [Pipedrive.PaymentsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentsResponse.md)
1195
1205
  - [Pipedrive.PaymentsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentsResponseAllOf.md)
package/dist/ApiClient.js CHANGED
@@ -61,6 +61,9 @@ var ApiClient = /*#__PURE__*/function () {
61
61
  name: 'api_token',
62
62
  apiKey: ''
63
63
  },
64
+ 'basic_authentication': {
65
+ type: 'basic'
66
+ },
64
67
  'oauth2': {
65
68
  type: 'oauth2',
66
69
  host: 'https://oauth.pipedrive.com',
@@ -42,6 +42,7 @@ var _MergeDealsRequest = _interopRequireDefault(require("../model/MergeDealsRequ
42
42
  var _NewDeal = _interopRequireDefault(require("../model/NewDeal"));
43
43
  var _NewDealProduct = _interopRequireDefault(require("../model/NewDealProduct"));
44
44
  var _NumberBoolean = _interopRequireDefault(require("../model/NumberBoolean"));
45
+ var _ParticipantsChangelog = _interopRequireDefault(require("../model/ParticipantsChangelog"));
45
46
  var _PostDealParticipants = _interopRequireDefault(require("../model/PostDealParticipants"));
46
47
  var _UpdateDealProduct = _interopRequireDefault(require("../model/UpdateDealProduct"));
47
48
  var _UpdateDealRequest = _interopRequireDefault(require("../model/UpdateDealRequest"));
@@ -1027,6 +1028,70 @@ var DealsApi = /*#__PURE__*/function () {
1027
1028
  });
1028
1029
  }
1029
1030
 
1031
+ /**
1032
+ * List updates about participants of a deal
1033
+ * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
1034
+ * @param {Number} id The ID of the deal
1035
+ * @param {Object} opts Optional parameters
1036
+ * @param {Number} opts.limit Items shown per page
1037
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
1038
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ParticipantsChangelog} and HTTP response
1039
+ */
1040
+ }, {
1041
+ key: "getDealParticipantsChangelogWithHttpInfo",
1042
+ value: function getDealParticipantsChangelogWithHttpInfo(id, opts) {
1043
+ opts = opts || {};
1044
+ var postBody = null;
1045
+
1046
+ // verify the required parameter 'id' is set
1047
+ if (id === undefined || id === null) {
1048
+ throw new Error("Missing the required parameter 'id' when calling getDealParticipantsChangelog");
1049
+ }
1050
+ var pathParams = {
1051
+ 'id': id
1052
+ };
1053
+ var queryParams = {
1054
+ 'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit'],
1055
+ 'cursor': opts['cursor'] === undefined ? opts['cursor'] : opts['cursor']
1056
+ };
1057
+ var headerParams = {};
1058
+ var formParams = {};
1059
+ var formParamArray = [];
1060
+ var contentTypes = [];
1061
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
1062
+ var isJSON = contentTypes.includes('application/json');
1063
+ if (isJSON) {
1064
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
1065
+ } else if (isURLEncoded) {
1066
+ for (var key in opts) {
1067
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
1068
+ formParams[key] = opts[key];
1069
+ }
1070
+ }
1071
+ }
1072
+ var authNames = ['api_key', 'oauth2'];
1073
+ var accepts = ['application/json'];
1074
+ var returnType = _ParticipantsChangelog["default"];
1075
+ return this.apiClient.callApi('/deals/{id}/participantsChangelog', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1076
+ }
1077
+
1078
+ /**
1079
+ * List updates about participants of a deal
1080
+ * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
1081
+ * @param {Number} id The ID of the deal
1082
+ * @param {Object} opts Optional parameters
1083
+ * @param {Number} opts.limit Items shown per page
1084
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
1085
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ParticipantsChangelog}
1086
+ */
1087
+ }, {
1088
+ key: "getDealParticipantsChangelog",
1089
+ value: function getDealParticipantsChangelog(id, opts) {
1090
+ return this.getDealParticipantsChangelogWithHttpInfo(id, opts).then(function (response_and_data) {
1091
+ return response_and_data;
1092
+ });
1093
+ }
1094
+
1030
1095
  /**
1031
1096
  * List all persons associated with a deal
1032
1097
  * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
package/dist/index.js CHANGED
@@ -1054,6 +1054,12 @@ Object.defineProperty(exports, "DealParticipants", {
1054
1054
  return _DealParticipants["default"];
1055
1055
  }
1056
1056
  });
1057
+ Object.defineProperty(exports, "DealParticipantsChangelog", {
1058
+ enumerable: true,
1059
+ get: function get() {
1060
+ return _DealParticipantsChangelog["default"];
1061
+ }
1062
+ });
1057
1063
  Object.defineProperty(exports, "DealPersonData", {
1058
1064
  enumerable: true,
1059
1065
  get: function get() {
@@ -3580,6 +3586,18 @@ Object.defineProperty(exports, "Params", {
3580
3586
  return _Params["default"];
3581
3587
  }
3582
3588
  });
3589
+ Object.defineProperty(exports, "ParticipantsChangelog", {
3590
+ enumerable: true,
3591
+ get: function get() {
3592
+ return _ParticipantsChangelog["default"];
3593
+ }
3594
+ });
3595
+ Object.defineProperty(exports, "ParticipantsChangelogItem", {
3596
+ enumerable: true,
3597
+ get: function get() {
3598
+ return _ParticipantsChangelogItem["default"];
3599
+ }
3600
+ });
3583
3601
  Object.defineProperty(exports, "PaymentItem", {
3584
3602
  enumerable: true,
3585
3603
  get: function get() {
@@ -5187,6 +5205,7 @@ var _DealOrganizationDataWithId = _interopRequireDefault(require("./model/DealOr
5187
5205
  var _DealOrganizationDataWithIdAllOf = _interopRequireDefault(require("./model/DealOrganizationDataWithIdAllOf"));
5188
5206
  var _DealParticipantCountInfo = _interopRequireDefault(require("./model/DealParticipantCountInfo"));
5189
5207
  var _DealParticipants = _interopRequireDefault(require("./model/DealParticipants"));
5208
+ var _DealParticipantsChangelog = _interopRequireDefault(require("./model/DealParticipantsChangelog"));
5190
5209
  var _DealPersonData = _interopRequireDefault(require("./model/DealPersonData"));
5191
5210
  var _DealPersonDataEmail = _interopRequireDefault(require("./model/DealPersonDataEmail"));
5192
5211
  var _DealPersonDataPhone = _interopRequireDefault(require("./model/DealPersonDataPhone"));
@@ -5592,6 +5611,8 @@ var _OwnerAllOf = _interopRequireDefault(require("./model/OwnerAllOf"));
5592
5611
  var _PaginationDetails = _interopRequireDefault(require("./model/PaginationDetails"));
5593
5612
  var _PaginationDetailsAllOf = _interopRequireDefault(require("./model/PaginationDetailsAllOf"));
5594
5613
  var _Params = _interopRequireDefault(require("./model/Params"));
5614
+ var _ParticipantsChangelog = _interopRequireDefault(require("./model/ParticipantsChangelog"));
5615
+ var _ParticipantsChangelogItem = _interopRequireDefault(require("./model/ParticipantsChangelogItem"));
5595
5616
  var _PaymentItem = _interopRequireDefault(require("./model/PaymentItem"));
5596
5617
  var _PaymentsResponse = _interopRequireDefault(require("./model/PaymentsResponse"));
5597
5618
  var _PaymentsResponseAllOf = _interopRequireDefault(require("./model/PaymentsResponseAllOf"));
@@ -119,7 +119,7 @@ AddWebhookRequest.prototype['event_action'] = undefined;
119
119
  AddWebhookRequest.prototype['event_object'] = undefined;
120
120
 
121
121
  /**
122
- * The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a users permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`.
122
+ * The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a user's permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`.
123
123
  * @member {Number} user_id
124
124
  */
125
125
  AddWebhookRequest.prototype['user_id'] = undefined;
@@ -57,6 +57,18 @@ var BasicDeal = /*#__PURE__*/function () {
57
57
  value: function constructFromObject(data, obj) {
58
58
  if (data) {
59
59
  obj = obj || new BasicDeal();
60
+ if (data.hasOwnProperty('won_time')) {
61
+ obj['won_time'] = _ApiClient["default"].convertToType(data['won_time'], 'String');
62
+ delete data['won_time'];
63
+ }
64
+ if (data.hasOwnProperty('lost_time')) {
65
+ obj['lost_time'] = _ApiClient["default"].convertToType(data['lost_time'], 'String');
66
+ delete data['lost_time'];
67
+ }
68
+ if (data.hasOwnProperty('close_time')) {
69
+ obj['close_time'] = _ApiClient["default"].convertToType(data['close_time'], 'String');
70
+ delete data['close_time'];
71
+ }
60
72
  if (data.hasOwnProperty('expected_close_date')) {
61
73
  obj['expected_close_date'] = _ApiClient["default"].convertToType(data['expected_close_date'], 'Date');
62
74
  delete data['expected_close_date'];
@@ -82,6 +94,24 @@ var BasicDeal = /*#__PURE__*/function () {
82
94
  }]);
83
95
  return BasicDeal;
84
96
  }();
97
+ /**
98
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
99
+ * @member {String} won_time
100
+ */
101
+ BasicDeal.prototype['won_time'] = undefined;
102
+
103
+ /**
104
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
105
+ * @member {String} lost_time
106
+ */
107
+ BasicDeal.prototype['lost_time'] = undefined;
108
+
109
+ /**
110
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
111
+ * @member {String} close_time
112
+ */
113
+ BasicDeal.prototype['close_time'] = undefined;
114
+
85
115
  /**
86
116
  * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
87
117
  * @member {Date} expected_close_date
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
+ /**
12
+ * Pipedrive API v1
13
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
14
+ *
15
+ * The version of the OpenAPI document: 1.0.0
16
+ *
17
+ *
18
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19
+ * https://openapi-generator.tech
20
+ * Do not edit the class manually.
21
+ *
22
+ */
23
+ /**
24
+ * The DealParticipantsChangelog model module.
25
+ * @module model/DealParticipantsChangelog
26
+ * @version 1.0.0
27
+ */
28
+ var DealParticipantsChangelog = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>DealParticipantsChangelog</code>.
31
+ * @alias module:model/DealParticipantsChangelog
32
+ */
33
+ function DealParticipantsChangelog() {
34
+ (0, _classCallCheck2["default"])(this, DealParticipantsChangelog);
35
+ DealParticipantsChangelog.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ (0, _createClass2["default"])(DealParticipantsChangelog, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>DealParticipantsChangelog</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/DealParticipantsChangelog} obj Optional instance to populate.
52
+ * @return {module:model/DealParticipantsChangelog} The populated <code>DealParticipantsChangelog</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new DealParticipantsChangelog();
59
+ if (data.hasOwnProperty('actor_user_id')) {
60
+ obj['actor_user_id'] = _ApiClient["default"].convertToType(data['actor_user_id'], 'Number');
61
+ delete data['actor_user_id'];
62
+ }
63
+ if (data.hasOwnProperty('person_id')) {
64
+ obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
65
+ delete data['person_id'];
66
+ }
67
+ if (data.hasOwnProperty('action')) {
68
+ obj['action'] = _ApiClient["default"].convertToType(data['action'], 'String');
69
+ delete data['action'];
70
+ }
71
+ if (data.hasOwnProperty('time')) {
72
+ obj['time'] = _ApiClient["default"].convertToType(data['time'], 'String');
73
+ delete data['time'];
74
+ }
75
+ if (Object.keys(data).length > 0) {
76
+ Object.assign(obj, data);
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+ }]);
82
+ return DealParticipantsChangelog;
83
+ }();
84
+ /**
85
+ * The ID of the user
86
+ * @member {Number} actor_user_id
87
+ */
88
+ DealParticipantsChangelog.prototype['actor_user_id'] = undefined;
89
+
90
+ /**
91
+ * The ID of the person
92
+ * @member {Number} person_id
93
+ */
94
+ DealParticipantsChangelog.prototype['person_id'] = undefined;
95
+
96
+ /**
97
+ * Deal participant action type
98
+ * @member {String} action
99
+ */
100
+ DealParticipantsChangelog.prototype['action'] = undefined;
101
+
102
+ /**
103
+ * The deal participant action log time
104
+ * @member {String} time
105
+ */
106
+ DealParticipantsChangelog.prototype['time'] = undefined;
107
+ var _default = DealParticipantsChangelog;
108
+ exports["default"] = _default;
@@ -116,6 +116,18 @@ var NewDeal = /*#__PURE__*/function () {
116
116
  obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
117
117
  delete data['add_time'];
118
118
  }
119
+ if (data.hasOwnProperty('won_time')) {
120
+ obj['won_time'] = _ApiClient["default"].convertToType(data['won_time'], 'String');
121
+ delete data['won_time'];
122
+ }
123
+ if (data.hasOwnProperty('lost_time')) {
124
+ obj['lost_time'] = _ApiClient["default"].convertToType(data['lost_time'], 'String');
125
+ delete data['lost_time'];
126
+ }
127
+ if (data.hasOwnProperty('close_time')) {
128
+ obj['close_time'] = _ApiClient["default"].convertToType(data['close_time'], 'String');
129
+ delete data['close_time'];
130
+ }
119
131
  if (data.hasOwnProperty('expected_close_date')) {
120
132
  obj['expected_close_date'] = _ApiClient["default"].convertToType(data['expected_close_date'], 'Date');
121
133
  delete data['expected_close_date'];
@@ -207,6 +219,24 @@ NewDeal.prototype['status'] = undefined;
207
219
  */
208
220
  NewDeal.prototype['add_time'] = undefined;
209
221
 
222
+ /**
223
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
224
+ * @member {String} won_time
225
+ */
226
+ NewDeal.prototype['won_time'] = undefined;
227
+
228
+ /**
229
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
230
+ * @member {String} lost_time
231
+ */
232
+ NewDeal.prototype['lost_time'] = undefined;
233
+
234
+ /**
235
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
236
+ * @member {String} close_time
237
+ */
238
+ NewDeal.prototype['close_time'] = undefined;
239
+
210
240
  /**
211
241
  * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
212
242
  * @member {Date} expected_close_date
@@ -289,6 +319,21 @@ _NewDealParameters["default"].prototype['status'] = undefined;
289
319
  */
290
320
  _NewDealParameters["default"].prototype['add_time'] = undefined;
291
321
  // Implement BasicDeal interface:
322
+ /**
323
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
324
+ * @member {String} won_time
325
+ */
326
+ _BasicDeal["default"].prototype['won_time'] = undefined;
327
+ /**
328
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
329
+ * @member {String} lost_time
330
+ */
331
+ _BasicDeal["default"].prototype['lost_time'] = undefined;
332
+ /**
333
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
334
+ * @member {String} close_time
335
+ */
336
+ _BasicDeal["default"].prototype['close_time'] = undefined;
292
337
  /**
293
338
  * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
294
339
  * @member {Date} expected_close_date
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
+ var _AdditionalData = _interopRequireDefault(require("./AdditionalData"));
12
+ var _ParticipantsChangelogItem = _interopRequireDefault(require("./ParticipantsChangelogItem"));
13
+ /**
14
+ * Pipedrive API v1
15
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
16
+ *
17
+ * The version of the OpenAPI document: 1.0.0
18
+ *
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * The ParticipantsChangelog model module.
27
+ * @module model/ParticipantsChangelog
28
+ * @version 1.0.0
29
+ */
30
+ var ParticipantsChangelog = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>ParticipantsChangelog</code>.
33
+ * @alias module:model/ParticipantsChangelog
34
+ */
35
+ function ParticipantsChangelog() {
36
+ (0, _classCallCheck2["default"])(this, ParticipantsChangelog);
37
+ ParticipantsChangelog.initialize(this);
38
+ }
39
+
40
+ /**
41
+ * Initializes the fields of this object.
42
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
43
+ * Only for internal use.
44
+ */
45
+ (0, _createClass2["default"])(ParticipantsChangelog, null, [{
46
+ key: "initialize",
47
+ value: function initialize(obj) {}
48
+
49
+ /**
50
+ * Constructs a <code>ParticipantsChangelog</code> from a plain JavaScript object, optionally creating a new instance.
51
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
52
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
53
+ * @param {module:model/ParticipantsChangelog} obj Optional instance to populate.
54
+ * @return {module:model/ParticipantsChangelog} The populated <code>ParticipantsChangelog</code> instance.
55
+ */
56
+ }, {
57
+ key: "constructFromObject",
58
+ value: function constructFromObject(data, obj) {
59
+ if (data) {
60
+ obj = obj || new ParticipantsChangelog();
61
+ if (data.hasOwnProperty('success')) {
62
+ obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean');
63
+ delete data['success'];
64
+ }
65
+ if (data.hasOwnProperty('data')) {
66
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ParticipantsChangelogItem["default"]]);
67
+ delete data['data'];
68
+ }
69
+ if (data.hasOwnProperty('additional_data')) {
70
+ obj['additional_data'] = _AdditionalData["default"].constructFromObject(data['additional_data']);
71
+ delete data['additional_data'];
72
+ }
73
+ if (Object.keys(data).length > 0) {
74
+ Object.assign(obj, data);
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+ }]);
80
+ return ParticipantsChangelog;
81
+ }();
82
+ /**
83
+ * If the request was successful or not
84
+ * @member {Boolean} success
85
+ */
86
+ ParticipantsChangelog.prototype['success'] = undefined;
87
+
88
+ /**
89
+ * The array of participant changelog
90
+ * @member {Array.<module:model/ParticipantsChangelogItem>} data
91
+ */
92
+ ParticipantsChangelog.prototype['data'] = undefined;
93
+
94
+ /**
95
+ * @member {module:model/AdditionalData} additional_data
96
+ */
97
+ ParticipantsChangelog.prototype['additional_data'] = undefined;
98
+ var _default = ParticipantsChangelog;
99
+ exports["default"] = _default;
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
+ var _DealParticipantsChangelog = _interopRequireDefault(require("./DealParticipantsChangelog"));
12
+ /**
13
+ * Pipedrive API v1
14
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15
+ *
16
+ * The version of the OpenAPI document: 1.0.0
17
+ *
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The ParticipantsChangelogItem model module.
26
+ * @module model/ParticipantsChangelogItem
27
+ * @version 1.0.0
28
+ */
29
+ var ParticipantsChangelogItem = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>ParticipantsChangelogItem</code>.
32
+ * @alias module:model/ParticipantsChangelogItem
33
+ * @implements module:model/DealParticipantsChangelog
34
+ */
35
+ function ParticipantsChangelogItem() {
36
+ (0, _classCallCheck2["default"])(this, ParticipantsChangelogItem);
37
+ _DealParticipantsChangelog["default"].initialize(this);
38
+ ParticipantsChangelogItem.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ (0, _createClass2["default"])(ParticipantsChangelogItem, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>ParticipantsChangelogItem</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/ParticipantsChangelogItem} obj Optional instance to populate.
55
+ * @return {module:model/ParticipantsChangelogItem} The populated <code>ParticipantsChangelogItem</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new ParticipantsChangelogItem();
62
+ _DealParticipantsChangelog["default"].constructFromObject(data, obj);
63
+ if (data.hasOwnProperty('actor_user_id')) {
64
+ obj['actor_user_id'] = _ApiClient["default"].convertToType(data['actor_user_id'], 'Number');
65
+ delete data['actor_user_id'];
66
+ }
67
+ if (data.hasOwnProperty('person_id')) {
68
+ obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
69
+ delete data['person_id'];
70
+ }
71
+ if (data.hasOwnProperty('action')) {
72
+ obj['action'] = _ApiClient["default"].convertToType(data['action'], 'String');
73
+ delete data['action'];
74
+ }
75
+ if (data.hasOwnProperty('time')) {
76
+ obj['time'] = _ApiClient["default"].convertToType(data['time'], 'String');
77
+ delete data['time'];
78
+ }
79
+ if (Object.keys(data).length > 0) {
80
+ Object.assign(obj, data);
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+ }]);
86
+ return ParticipantsChangelogItem;
87
+ }();
88
+ /**
89
+ * The ID of the user
90
+ * @member {Number} actor_user_id
91
+ */
92
+ ParticipantsChangelogItem.prototype['actor_user_id'] = undefined;
93
+
94
+ /**
95
+ * The ID of the person
96
+ * @member {Number} person_id
97
+ */
98
+ ParticipantsChangelogItem.prototype['person_id'] = undefined;
99
+
100
+ /**
101
+ * Deal participant action type
102
+ * @member {String} action
103
+ */
104
+ ParticipantsChangelogItem.prototype['action'] = undefined;
105
+
106
+ /**
107
+ * The deal participant action log time
108
+ * @member {String} time
109
+ */
110
+ ParticipantsChangelogItem.prototype['time'] = undefined;
111
+
112
+ // Implement DealParticipantsChangelog interface:
113
+ /**
114
+ * The ID of the user
115
+ * @member {Number} actor_user_id
116
+ */
117
+ _DealParticipantsChangelog["default"].prototype['actor_user_id'] = undefined;
118
+ /**
119
+ * The ID of the person
120
+ * @member {Number} person_id
121
+ */
122
+ _DealParticipantsChangelog["default"].prototype['person_id'] = undefined;
123
+ /**
124
+ * Deal participant action type
125
+ * @member {String} action
126
+ */
127
+ _DealParticipantsChangelog["default"].prototype['action'] = undefined;
128
+ /**
129
+ * The deal participant action log time
130
+ * @member {String} time
131
+ */
132
+ _DealParticipantsChangelog["default"].prototype['time'] = undefined;
133
+ var _default = ParticipantsChangelogItem;
134
+ exports["default"] = _default;
@@ -109,6 +109,18 @@ var UpdateDealRequest = /*#__PURE__*/function () {
109
109
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
110
110
  delete data['status'];
111
111
  }
112
+ if (data.hasOwnProperty('won_time')) {
113
+ obj['won_time'] = _ApiClient["default"].convertToType(data['won_time'], 'String');
114
+ delete data['won_time'];
115
+ }
116
+ if (data.hasOwnProperty('lost_time')) {
117
+ obj['lost_time'] = _ApiClient["default"].convertToType(data['lost_time'], 'String');
118
+ delete data['lost_time'];
119
+ }
120
+ if (data.hasOwnProperty('close_time')) {
121
+ obj['close_time'] = _ApiClient["default"].convertToType(data['close_time'], 'String');
122
+ delete data['close_time'];
123
+ }
112
124
  if (data.hasOwnProperty('expected_close_date')) {
113
125
  obj['expected_close_date'] = _ApiClient["default"].convertToType(data['expected_close_date'], 'Date');
114
126
  delete data['expected_close_date'];
@@ -194,6 +206,24 @@ UpdateDealRequest.prototype['stage_id'] = undefined;
194
206
  */
195
207
  UpdateDealRequest.prototype['status'] = undefined;
196
208
 
209
+ /**
210
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
211
+ * @member {String} won_time
212
+ */
213
+ UpdateDealRequest.prototype['won_time'] = undefined;
214
+
215
+ /**
216
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
217
+ * @member {String} lost_time
218
+ */
219
+ UpdateDealRequest.prototype['lost_time'] = undefined;
220
+
221
+ /**
222
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
223
+ * @member {String} close_time
224
+ */
225
+ UpdateDealRequest.prototype['close_time'] = undefined;
226
+
197
227
  /**
198
228
  * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
199
229
  * @member {Date} expected_close_date
@@ -271,6 +301,21 @@ _UpdateDealParameters["default"].prototype['stage_id'] = undefined;
271
301
  */
272
302
  _UpdateDealParameters["default"].prototype['status'] = undefined;
273
303
  // Implement BasicDeal interface:
304
+ /**
305
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
306
+ * @member {String} won_time
307
+ */
308
+ _BasicDeal["default"].prototype['won_time'] = undefined;
309
+ /**
310
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
311
+ * @member {String} lost_time
312
+ */
313
+ _BasicDeal["default"].prototype['lost_time'] = undefined;
314
+ /**
315
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
316
+ * @member {String} close_time
317
+ */
318
+ _BasicDeal["default"].prototype['close_time'] = undefined;
274
319
  /**
275
320
  * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
276
321
  * @member {Date} expected_close_date
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "22.4.0",
3
+ "version": "22.5.0",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",