pipedrive 12.0.1 → 12.2.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.
@@ -0,0 +1,318 @@
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
17
+
18
+ var _BasicDeal = _interopRequireDefault(require("./BasicDeal"));
19
+
20
+ var _DealTitleParameter = _interopRequireDefault(require("./DealTitleParameter"));
21
+
22
+ var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
23
+
24
+ var _UpdateDealRequest$St;
25
+
26
+ /**
27
+ * The UpdateDealRequest model module.
28
+ * @module model/UpdateDealRequest
29
+ * @version 1.0.0
30
+ */
31
+ var UpdateDealRequest = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>UpdateDealRequest</code>.
34
+ * @alias module:model/UpdateDealRequest
35
+ * @implements module:model/DealTitleParameter
36
+ * @implements module:model/BasicDeal
37
+ */
38
+ function UpdateDealRequest() {
39
+ (0, _classCallCheck2["default"])(this, UpdateDealRequest);
40
+
41
+ _DealTitleParameter["default"].initialize(this);
42
+
43
+ _BasicDeal["default"].initialize(this);
44
+
45
+ UpdateDealRequest.initialize(this);
46
+ }
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+
53
+
54
+ (0, _createClass2["default"])(UpdateDealRequest, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj) {}
57
+ /**
58
+ * Constructs a <code>UpdateDealRequest</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/UpdateDealRequest} obj Optional instance to populate.
62
+ * @return {module:model/UpdateDealRequest} The populated <code>UpdateDealRequest</code> instance.
63
+ */
64
+
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new UpdateDealRequest();
70
+
71
+ _DealTitleParameter["default"].constructFromObject(data, obj);
72
+
73
+ _BasicDeal["default"].constructFromObject(data, obj);
74
+
75
+ if (data.hasOwnProperty('title')) {
76
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
77
+ delete data['title'];
78
+ }
79
+
80
+ if (data.hasOwnProperty('value')) {
81
+ obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
82
+ delete data['value'];
83
+ }
84
+
85
+ if (data.hasOwnProperty('currency')) {
86
+ obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
87
+ delete data['currency'];
88
+ }
89
+
90
+ if (data.hasOwnProperty('user_id')) {
91
+ obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'Number');
92
+ delete data['user_id'];
93
+ }
94
+
95
+ if (data.hasOwnProperty('person_id')) {
96
+ obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
97
+ delete data['person_id'];
98
+ }
99
+
100
+ if (data.hasOwnProperty('org_id')) {
101
+ obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'Number');
102
+ delete data['org_id'];
103
+ }
104
+
105
+ if (data.hasOwnProperty('stage_id')) {
106
+ obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
107
+ delete data['stage_id'];
108
+ }
109
+
110
+ if (data.hasOwnProperty('status')) {
111
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
112
+ delete data['status'];
113
+ }
114
+
115
+ if (data.hasOwnProperty('expected_close_date')) {
116
+ obj['expected_close_date'] = _ApiClient["default"].convertToType(data['expected_close_date'], 'Date');
117
+ delete data['expected_close_date'];
118
+ }
119
+
120
+ if (data.hasOwnProperty('probability')) {
121
+ obj['probability'] = _ApiClient["default"].convertToType(data['probability'], 'Number');
122
+ delete data['probability'];
123
+ }
124
+
125
+ if (data.hasOwnProperty('lost_reason')) {
126
+ obj['lost_reason'] = _ApiClient["default"].convertToType(data['lost_reason'], 'String');
127
+ delete data['lost_reason'];
128
+ }
129
+
130
+ if (data.hasOwnProperty('visible_to')) {
131
+ obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], _VisibleTo["default"]);
132
+ delete data['visible_to'];
133
+ }
134
+
135
+ if (Object.keys(data).length > 0) {
136
+ Object.assign(obj, data);
137
+ }
138
+ }
139
+
140
+ return obj;
141
+ }
142
+ }]);
143
+ return UpdateDealRequest;
144
+ }();
145
+ /**
146
+ * Deal title
147
+ * @member {String} title
148
+ */
149
+
150
+
151
+ UpdateDealRequest.prototype['title'] = undefined;
152
+ /**
153
+ * Value of the deal. If omitted, value will be set to 0.
154
+ * @member {String} value
155
+ */
156
+
157
+ UpdateDealRequest.prototype['value'] = undefined;
158
+ /**
159
+ * Currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.
160
+ * @member {String} currency
161
+ */
162
+
163
+ UpdateDealRequest.prototype['currency'] = undefined;
164
+ /**
165
+ * The ID of the User which will be the owner of the created Deal. If not provided, the user making the request will be used.
166
+ * @member {Number} user_id
167
+ */
168
+
169
+ UpdateDealRequest.prototype['user_id'] = undefined;
170
+ /**
171
+ * The ID of a Person which this Deal will be linked to. If the Person does not exist yet, it needs to be created first. This property is required unless `org_id` is specified.
172
+ * @member {Number} person_id
173
+ */
174
+
175
+ UpdateDealRequest.prototype['person_id'] = undefined;
176
+ /**
177
+ * The ID of an Organization which this Deal will be linked to. If the Organization does not exist yet, it needs to be created first. This property is required unless `person_id` is specified.
178
+ * @member {Number} org_id
179
+ */
180
+
181
+ UpdateDealRequest.prototype['org_id'] = undefined;
182
+ /**
183
+ * 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.
184
+ * @member {Number} stage_id
185
+ */
186
+
187
+ UpdateDealRequest.prototype['stage_id'] = undefined;
188
+ /**
189
+ * open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open.
190
+ * @member {module:model/UpdateDealRequest.StatusEnum} status
191
+ */
192
+
193
+ UpdateDealRequest.prototype['status'] = undefined;
194
+ /**
195
+ * The expected close date of the Deal. In ISO 8601 format: YYYY-MM-DD.
196
+ * @member {Date} expected_close_date
197
+ */
198
+
199
+ UpdateDealRequest.prototype['expected_close_date'] = undefined;
200
+ /**
201
+ * Deal success probability percentage. Used/shown only when `deal_probability` for the pipeline of the deal is enabled.
202
+ * @member {Number} probability
203
+ */
204
+
205
+ UpdateDealRequest.prototype['probability'] = undefined;
206
+ /**
207
+ * Optional message about why the deal was lost (to be used when status=lost)
208
+ * @member {String} lost_reason
209
+ */
210
+
211
+ UpdateDealRequest.prototype['lost_reason'] = undefined;
212
+ /**
213
+ * Visibility of the deal. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>
214
+ * @member {module:model/VisibleTo} visible_to
215
+ */
216
+
217
+ UpdateDealRequest.prototype['visible_to'] = undefined; // Implement DealTitleParameter interface:
218
+
219
+ /**
220
+ * Deal title
221
+ * @member {String} title
222
+ */
223
+
224
+ _DealTitleParameter["default"].prototype['title'] = undefined; // Implement BasicDeal interface:
225
+
226
+ /**
227
+ * Value of the deal. If omitted, value will be set to 0.
228
+ * @member {String} value
229
+ */
230
+
231
+ _BasicDeal["default"].prototype['value'] = undefined;
232
+ /**
233
+ * Currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.
234
+ * @member {String} currency
235
+ */
236
+
237
+ _BasicDeal["default"].prototype['currency'] = undefined;
238
+ /**
239
+ * The ID of the User which will be the owner of the created Deal. If not provided, the user making the request will be used.
240
+ * @member {Number} user_id
241
+ */
242
+
243
+ _BasicDeal["default"].prototype['user_id'] = undefined;
244
+ /**
245
+ * The ID of a Person which this Deal will be linked to. If the Person does not exist yet, it needs to be created first. This property is required unless `org_id` is specified.
246
+ * @member {Number} person_id
247
+ */
248
+
249
+ _BasicDeal["default"].prototype['person_id'] = undefined;
250
+ /**
251
+ * The ID of an Organization which this Deal will be linked to. If the Organization does not exist yet, it needs to be created first. This property is required unless `person_id` is specified.
252
+ * @member {Number} org_id
253
+ */
254
+
255
+ _BasicDeal["default"].prototype['org_id'] = undefined;
256
+ /**
257
+ * 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.
258
+ * @member {Number} stage_id
259
+ */
260
+
261
+ _BasicDeal["default"].prototype['stage_id'] = undefined;
262
+ /**
263
+ * open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open.
264
+ * @member {module:model/BasicDeal.StatusEnum} status
265
+ */
266
+
267
+ _BasicDeal["default"].prototype['status'] = undefined;
268
+ /**
269
+ * The expected close date of the Deal. In ISO 8601 format: YYYY-MM-DD.
270
+ * @member {Date} expected_close_date
271
+ */
272
+
273
+ _BasicDeal["default"].prototype['expected_close_date'] = undefined;
274
+ /**
275
+ * Deal success probability percentage. Used/shown only when `deal_probability` for the pipeline of the deal is enabled.
276
+ * @member {Number} probability
277
+ */
278
+
279
+ _BasicDeal["default"].prototype['probability'] = undefined;
280
+ /**
281
+ * Optional message about why the deal was lost (to be used when status=lost)
282
+ * @member {String} lost_reason
283
+ */
284
+
285
+ _BasicDeal["default"].prototype['lost_reason'] = undefined;
286
+ /**
287
+ * Visibility of the deal. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>
288
+ * @member {module:model/VisibleTo} visible_to
289
+ */
290
+
291
+ _BasicDeal["default"].prototype['visible_to'] = undefined;
292
+ /**
293
+ * Allowed values for the <code>status</code> property.
294
+ * @enum {String}
295
+ * @readonly
296
+ */
297
+
298
+ UpdateDealRequest['StatusEnum'] = (_UpdateDealRequest$St = {
299
+ /**
300
+ * value: "open"
301
+ * @const
302
+ */
303
+ "open": "open",
304
+
305
+ /**
306
+ * value: "won"
307
+ * @const
308
+ */
309
+ "won": "won",
310
+
311
+ /**
312
+ * value: "lost"
313
+ * @const
314
+ */
315
+ "lost": "lost"
316
+ }, (0, _defineProperty2["default"])(_UpdateDealRequest$St, "lost", "lost"), (0, _defineProperty2["default"])(_UpdateDealRequest$St, "deleted", "deleted"), _UpdateDealRequest$St);
317
+ var _default = UpdateDealRequest;
318
+ exports["default"] = _default;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "12.0.1",
3
+ "version": "12.2.0",
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"