files.com 1.0.235 → 1.0.237

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.
Files changed (77) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/Bundle.md +9 -2
  3. package/docs/models/BundleNotification.md +35 -0
  4. package/docs/models/BundleRegistration.md +3 -1
  5. package/docs/models/InboxRegistration.md +3 -1
  6. package/docs/models/Site.md +2 -0
  7. package/lib/Api.js +153 -159
  8. package/lib/isomorphic/File.node.js +24 -28
  9. package/lib/models/ActionNotificationExport.js +97 -101
  10. package/lib/models/ActionNotificationExportResult.js +44 -46
  11. package/lib/models/ActionWebhookFailure.js +42 -44
  12. package/lib/models/ApiKey.js +271 -287
  13. package/lib/models/App.js +26 -28
  14. package/lib/models/As2IncomingMessage.js +32 -34
  15. package/lib/models/As2OutgoingMessage.js +32 -34
  16. package/lib/models/As2Partner.js +231 -241
  17. package/lib/models/As2Station.js +219 -229
  18. package/lib/models/Automation.js +333 -343
  19. package/lib/models/AutomationRun.js +75 -79
  20. package/lib/models/BandwidthSnapshot.js +26 -28
  21. package/lib/models/Behavior.js +323 -337
  22. package/lib/models/Bundle.js +381 -387
  23. package/lib/models/BundleDownload.js +38 -40
  24. package/lib/models/BundleNotification.js +223 -173
  25. package/lib/models/BundleRecipient.js +104 -108
  26. package/lib/models/BundleRegistration.js +41 -40
  27. package/lib/models/Clickwrap.js +213 -223
  28. package/lib/models/DnsRecord.js +26 -28
  29. package/lib/models/ExternalEvent.js +93 -99
  30. package/lib/models/File.js +726 -766
  31. package/lib/models/FileComment.js +180 -188
  32. package/lib/models/FileCommentReaction.js +84 -88
  33. package/lib/models/FileMigration.js +31 -33
  34. package/lib/models/Folder.js +94 -98
  35. package/lib/models/FormFieldSet.js +189 -199
  36. package/lib/models/Group.js +207 -217
  37. package/lib/models/GroupUser.js +230 -238
  38. package/lib/models/History.js +266 -276
  39. package/lib/models/HistoryExport.js +175 -179
  40. package/lib/models/HistoryExportResult.js +44 -46
  41. package/lib/models/InboxRecipient.js +104 -108
  42. package/lib/models/InboxRegistration.js +35 -34
  43. package/lib/models/InboxUpload.js +38 -40
  44. package/lib/models/Invoice.js +57 -61
  45. package/lib/models/IpAddress.js +78 -84
  46. package/lib/models/Lock.js +148 -154
  47. package/lib/models/Message.js +267 -277
  48. package/lib/models/MessageComment.js +207 -217
  49. package/lib/models/MessageCommentReaction.js +147 -155
  50. package/lib/models/MessageReaction.js +147 -155
  51. package/lib/models/Notification.js +255 -265
  52. package/lib/models/Payment.js +57 -61
  53. package/lib/models/Permission.js +128 -134
  54. package/lib/models/Priority.js +45 -47
  55. package/lib/models/Project.js +183 -193
  56. package/lib/models/PublicKey.js +207 -217
  57. package/lib/models/RemoteBandwidthSnapshot.js +26 -28
  58. package/lib/models/RemoteServer.js +805 -819
  59. package/lib/models/Request.js +166 -174
  60. package/lib/models/Session.js +47 -51
  61. package/lib/models/SettingsChange.js +26 -28
  62. package/lib/models/SftpHostKey.js +177 -187
  63. package/lib/models/Site.js +415 -418
  64. package/lib/models/SsoStrategy.js +99 -105
  65. package/lib/models/Style.js +127 -133
  66. package/lib/models/UsageDailySnapshot.js +26 -28
  67. package/lib/models/UsageSnapshot.js +26 -28
  68. package/lib/models/User.js +587 -603
  69. package/lib/models/UserCipherUse.js +32 -34
  70. package/lib/models/UserRequest.js +147 -155
  71. package/lib/models/WebhookTest.js +54 -56
  72. package/package.json +1 -1
  73. package/src/models/Bundle.js +10 -1
  74. package/src/models/BundleNotification.js +39 -1
  75. package/src/models/BundleRegistration.js +3 -0
  76. package/src/models/InboxRegistration.js +3 -0
  77. package/src/models/Site.js +3 -0
@@ -84,52 +84,50 @@ var Request = /*#__PURE__*/(0, _createClass2.default)(function Request() {
84
84
  response,
85
85
  _args = arguments;
86
86
  return _regenerator.default.wrap(function _callee$(_context) {
87
- while (1) {
88
- switch (_context.prev = _context.next) {
89
- case 0:
90
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
91
- if (_this.attributes.id) {
92
- _context.next = 3;
93
- break;
94
- }
95
- throw new errors.EmptyPropertyError('Current object has no id');
96
- case 3:
97
- if ((0, _utils.isObject)(params)) {
98
- _context.next = 5;
99
- break;
100
- }
101
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
102
- case 5:
103
- params.id = _this.attributes.id;
104
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
105
- _context.next = 8;
106
- break;
107
- }
108
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
109
- case 8:
110
- if (params['id']) {
111
- _context.next = 14;
112
- break;
113
- }
114
- if (!_this.attributes.id) {
115
- _context.next = 13;
116
- break;
117
- }
118
- params['id'] = _this.id;
87
+ while (1) switch (_context.prev = _context.next) {
88
+ case 0:
89
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
90
+ if (_this.attributes.id) {
91
+ _context.next = 3;
92
+ break;
93
+ }
94
+ throw new errors.EmptyPropertyError('Current object has no id');
95
+ case 3:
96
+ if ((0, _utils.isObject)(params)) {
97
+ _context.next = 5;
98
+ break;
99
+ }
100
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
101
+ case 5:
102
+ params.id = _this.attributes.id;
103
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
104
+ _context.next = 8;
105
+ break;
106
+ }
107
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
108
+ case 8:
109
+ if (params['id']) {
119
110
  _context.next = 14;
120
111
  break;
121
- case 13:
122
- throw new errors.MissingParameterError('Parameter missing: id');
123
- case 14:
124
- _context.next = 16;
125
- return _Api.default.sendRequest("/requests/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
126
- case 16:
127
- response = _context.sent;
128
- return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
129
- case 18:
130
- case "end":
131
- return _context.stop();
132
- }
112
+ }
113
+ if (!_this.attributes.id) {
114
+ _context.next = 13;
115
+ break;
116
+ }
117
+ params['id'] = _this.id;
118
+ _context.next = 14;
119
+ break;
120
+ case 13:
121
+ throw new errors.MissingParameterError('Parameter missing: id');
122
+ case 14:
123
+ _context.next = 16;
124
+ return _Api.default.sendRequest("/requests/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
125
+ case 16:
126
+ response = _context.sent;
127
+ return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
128
+ case 18:
129
+ case "end":
130
+ return _context.stop();
133
131
  }
134
132
  }, _callee);
135
133
  })));
@@ -166,40 +164,38 @@ var Request = /*#__PURE__*/(0, _createClass2.default)(function Request() {
166
164
  response,
167
165
  _args2 = arguments;
168
166
  return _regenerator.default.wrap(function _callee2$(_context2) {
169
- while (1) {
170
- switch (_context2.prev = _context2.next) {
171
- case 0:
172
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
173
- options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
174
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
175
- _context2.next = 4;
176
- break;
177
- }
178
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
179
- case 4:
180
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
181
- _context2.next = 6;
182
- break;
183
- }
184
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
185
- case 6:
186
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
187
- _context2.next = 8;
188
- break;
189
- }
190
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
191
- case 8:
192
- _context2.next = 10;
193
- return _Api.default.sendRequest("/requests", 'GET', params, options);
194
- case 10:
195
- response = _context2.sent;
196
- return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
197
- return new Request(obj, options);
198
- })) || []);
199
- case 12:
200
- case "end":
201
- return _context2.stop();
202
- }
167
+ while (1) switch (_context2.prev = _context2.next) {
168
+ case 0:
169
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
170
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
171
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
172
+ _context2.next = 4;
173
+ break;
174
+ }
175
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
176
+ case 4:
177
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
178
+ _context2.next = 6;
179
+ break;
180
+ }
181
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
182
+ case 6:
183
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
184
+ _context2.next = 8;
185
+ break;
186
+ }
187
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
188
+ case 8:
189
+ _context2.next = 10;
190
+ return _Api.default.sendRequest("/requests", 'GET', params, options);
191
+ case 10:
192
+ response = _context2.sent;
193
+ return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
194
+ return new Request(obj, options);
195
+ })) || []);
196
+ case 12:
197
+ case "end":
198
+ return _context2.stop();
203
199
  }
204
200
  }, _callee2);
205
201
  })));
@@ -216,116 +212,112 @@ var Request = /*#__PURE__*/(0, _createClass2.default)(function Request() {
216
212
  response,
217
213
  _args3 = arguments;
218
214
  return _regenerator.default.wrap(function _callee3$(_context3) {
219
- while (1) {
220
- switch (_context3.prev = _context3.next) {
221
- case 0:
222
- params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
223
- options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
224
- if ((0, _utils.isObject)(params)) {
225
- _context3.next = 4;
226
- break;
227
- }
228
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
229
- case 4:
230
- params['path'] = path;
231
- if (params['path']) {
232
- _context3.next = 7;
233
- break;
234
- }
235
- throw new errors.MissingParameterError('Parameter missing: path');
236
- case 7:
237
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
238
- _context3.next = 9;
239
- break;
240
- }
241
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
242
- case 9:
243
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
244
- _context3.next = 11;
245
- break;
246
- }
247
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
248
- case 11:
249
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
250
- _context3.next = 13;
251
- break;
252
- }
253
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
254
- case 13:
255
- _context3.next = 15;
256
- return _Api.default.sendRequest("/requests/folders/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
257
- case 15:
258
- response = _context3.sent;
259
- return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
260
- return new Request(obj, options);
261
- })) || []);
262
- case 17:
263
- case "end":
264
- return _context3.stop();
265
- }
266
- }
267
- }, _callee3);
268
- }));
269
- return function (_x) {
270
- return _ref5.apply(this, arguments);
271
- };
272
- }());
273
- (0, _defineProperty2.default)(Request, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
274
- var params,
275
- options,
276
- response,
277
- _args4 = arguments;
278
- return _regenerator.default.wrap(function _callee4$(_context4) {
279
- while (1) {
280
- switch (_context4.prev = _context4.next) {
215
+ while (1) switch (_context3.prev = _context3.next) {
281
216
  case 0:
282
- params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
283
- options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
284
- if (params['path']) {
285
- _context4.next = 4;
217
+ params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
218
+ options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
219
+ if ((0, _utils.isObject)(params)) {
220
+ _context3.next = 4;
286
221
  break;
287
222
  }
288
- throw new errors.MissingParameterError('Parameter missing: path');
223
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
289
224
  case 4:
290
- if (params['destination']) {
291
- _context4.next = 6;
292
- break;
293
- }
294
- throw new errors.MissingParameterError('Parameter missing: destination');
295
- case 6:
296
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
297
- _context4.next = 8;
225
+ params['path'] = path;
226
+ if (params['path']) {
227
+ _context3.next = 7;
298
228
  break;
299
229
  }
300
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
301
- case 8:
302
- if (!(params['destination'] && !(0, _utils.isString)(params['destination']))) {
303
- _context4.next = 10;
230
+ throw new errors.MissingParameterError('Parameter missing: path');
231
+ case 7:
232
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
233
+ _context3.next = 9;
304
234
  break;
305
235
  }
306
- throw new errors.InvalidParameterError("Bad parameter: destination must be of type String, received ".concat((0, _utils.getType)(params['destination'])));
307
- case 10:
308
- if (!(params['user_ids'] && !(0, _utils.isString)(params['user_ids']))) {
309
- _context4.next = 12;
236
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
237
+ case 9:
238
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
239
+ _context3.next = 11;
310
240
  break;
311
241
  }
312
- throw new errors.InvalidParameterError("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(params['user_ids'])));
313
- case 12:
314
- if (!(params['group_ids'] && !(0, _utils.isString)(params['group_ids']))) {
315
- _context4.next = 14;
242
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
243
+ case 11:
244
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
245
+ _context3.next = 13;
316
246
  break;
317
247
  }
318
- throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params['group_ids'])));
319
- case 14:
320
- _context4.next = 16;
321
- return _Api.default.sendRequest("/requests", 'POST', params, options);
322
- case 16:
323
- response = _context4.sent;
324
- return _context4.abrupt("return", new Request(response === null || response === void 0 ? void 0 : response.data, options));
325
- case 18:
248
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
249
+ case 13:
250
+ _context3.next = 15;
251
+ return _Api.default.sendRequest("/requests/folders/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
252
+ case 15:
253
+ response = _context3.sent;
254
+ return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
255
+ return new Request(obj, options);
256
+ })) || []);
257
+ case 17:
326
258
  case "end":
327
- return _context4.stop();
259
+ return _context3.stop();
328
260
  }
261
+ }, _callee3);
262
+ }));
263
+ return function (_x) {
264
+ return _ref5.apply(this, arguments);
265
+ };
266
+ }());
267
+ (0, _defineProperty2.default)(Request, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
268
+ var params,
269
+ options,
270
+ response,
271
+ _args4 = arguments;
272
+ return _regenerator.default.wrap(function _callee4$(_context4) {
273
+ while (1) switch (_context4.prev = _context4.next) {
274
+ case 0:
275
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
276
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
277
+ if (params['path']) {
278
+ _context4.next = 4;
279
+ break;
280
+ }
281
+ throw new errors.MissingParameterError('Parameter missing: path');
282
+ case 4:
283
+ if (params['destination']) {
284
+ _context4.next = 6;
285
+ break;
286
+ }
287
+ throw new errors.MissingParameterError('Parameter missing: destination');
288
+ case 6:
289
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
290
+ _context4.next = 8;
291
+ break;
292
+ }
293
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
294
+ case 8:
295
+ if (!(params['destination'] && !(0, _utils.isString)(params['destination']))) {
296
+ _context4.next = 10;
297
+ break;
298
+ }
299
+ throw new errors.InvalidParameterError("Bad parameter: destination must be of type String, received ".concat((0, _utils.getType)(params['destination'])));
300
+ case 10:
301
+ if (!(params['user_ids'] && !(0, _utils.isString)(params['user_ids']))) {
302
+ _context4.next = 12;
303
+ break;
304
+ }
305
+ throw new errors.InvalidParameterError("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(params['user_ids'])));
306
+ case 12:
307
+ if (!(params['group_ids'] && !(0, _utils.isString)(params['group_ids']))) {
308
+ _context4.next = 14;
309
+ break;
310
+ }
311
+ throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params['group_ids'])));
312
+ case 14:
313
+ _context4.next = 16;
314
+ return _Api.default.sendRequest("/requests", 'POST', params, options);
315
+ case 16:
316
+ response = _context4.sent;
317
+ return _context4.abrupt("return", new Request(response === null || response === void 0 ? void 0 : response.data, options));
318
+ case 18:
319
+ case "end":
320
+ return _context4.stop();
329
321
  }
330
322
  }, _callee4);
331
323
  })));
@@ -107,44 +107,42 @@ var Session = /*#__PURE__*/(0, _createClass2.default)(function Session() {
107
107
  response,
108
108
  _args = arguments;
109
109
  return _regenerator.default.wrap(function _callee$(_context) {
110
- while (1) {
111
- switch (_context.prev = _context.next) {
112
- case 0:
113
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
114
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
115
- if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
116
- _context.next = 4;
117
- break;
118
- }
119
- throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
120
- case 4:
121
- if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
122
- _context.next = 6;
123
- break;
124
- }
125
- throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
126
- case 6:
127
- if (!(params['otp'] && !(0, _utils.isString)(params['otp']))) {
128
- _context.next = 8;
129
- break;
130
- }
131
- throw new errors.InvalidParameterError("Bad parameter: otp must be of type String, received ".concat((0, _utils.getType)(params['otp'])));
132
- case 8:
133
- if (!(params['partial_session_id'] && !(0, _utils.isString)(params['partial_session_id']))) {
134
- _context.next = 10;
135
- break;
136
- }
137
- throw new errors.InvalidParameterError("Bad parameter: partial_session_id must be of type String, received ".concat((0, _utils.getType)(params['partial_session_id'])));
138
- case 10:
139
- _context.next = 12;
140
- return _Api.default.sendRequest("/sessions", 'POST', params, options);
141
- case 12:
142
- response = _context.sent;
143
- return _context.abrupt("return", new Session(response === null || response === void 0 ? void 0 : response.data, options));
144
- case 14:
145
- case "end":
146
- return _context.stop();
147
- }
110
+ while (1) switch (_context.prev = _context.next) {
111
+ case 0:
112
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
113
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
114
+ if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
115
+ _context.next = 4;
116
+ break;
117
+ }
118
+ throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
119
+ case 4:
120
+ if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
121
+ _context.next = 6;
122
+ break;
123
+ }
124
+ throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
125
+ case 6:
126
+ if (!(params['otp'] && !(0, _utils.isString)(params['otp']))) {
127
+ _context.next = 8;
128
+ break;
129
+ }
130
+ throw new errors.InvalidParameterError("Bad parameter: otp must be of type String, received ".concat((0, _utils.getType)(params['otp'])));
131
+ case 8:
132
+ if (!(params['partial_session_id'] && !(0, _utils.isString)(params['partial_session_id']))) {
133
+ _context.next = 10;
134
+ break;
135
+ }
136
+ throw new errors.InvalidParameterError("Bad parameter: partial_session_id must be of type String, received ".concat((0, _utils.getType)(params['partial_session_id'])));
137
+ case 10:
138
+ _context.next = 12;
139
+ return _Api.default.sendRequest("/sessions", 'POST', params, options);
140
+ case 12:
141
+ response = _context.sent;
142
+ return _context.abrupt("return", new Session(response === null || response === void 0 ? void 0 : response.data, options));
143
+ case 14:
144
+ case "end":
145
+ return _context.stop();
148
146
  }
149
147
  }, _callee);
150
148
  })));
@@ -153,19 +151,17 @@ var Session = /*#__PURE__*/(0, _createClass2.default)(function Session() {
153
151
  response,
154
152
  _args2 = arguments;
155
153
  return _regenerator.default.wrap(function _callee2$(_context2) {
156
- while (1) {
157
- switch (_context2.prev = _context2.next) {
158
- case 0:
159
- options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
160
- _context2.next = 3;
161
- return _Api.default.sendRequest("/sessions", 'DELETE', {}, options);
162
- case 3:
163
- response = _context2.sent;
164
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
165
- case 5:
166
- case "end":
167
- return _context2.stop();
168
- }
154
+ while (1) switch (_context2.prev = _context2.next) {
155
+ case 0:
156
+ options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
157
+ _context2.next = 3;
158
+ return _Api.default.sendRequest("/sessions", 'DELETE', {}, options);
159
+ case 3:
160
+ response = _context2.sent;
161
+ return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
162
+ case 5:
163
+ case "end":
164
+ return _context2.stop();
169
165
  }
170
166
  }, _callee2);
171
167
  })));
@@ -66,34 +66,32 @@ var SettingsChange = /*#__PURE__*/(0, _createClass2.default)(function SettingsCh
66
66
  response,
67
67
  _args = arguments;
68
68
  return _regenerator.default.wrap(function _callee$(_context) {
69
- while (1) {
70
- switch (_context.prev = _context.next) {
71
- case 0:
72
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
73
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
74
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
75
- _context.next = 4;
76
- break;
77
- }
78
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
79
- case 4:
80
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
81
- _context.next = 6;
82
- break;
83
- }
84
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
85
- case 6:
86
- _context.next = 8;
87
- return _Api.default.sendRequest("/settings_changes", 'GET', params, options);
88
- case 8:
89
- response = _context.sent;
90
- return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
91
- return new SettingsChange(obj, options);
92
- })) || []);
93
- case 10:
94
- case "end":
95
- return _context.stop();
96
- }
69
+ while (1) switch (_context.prev = _context.next) {
70
+ case 0:
71
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
72
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
73
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
74
+ _context.next = 4;
75
+ break;
76
+ }
77
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
78
+ case 4:
79
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
80
+ _context.next = 6;
81
+ break;
82
+ }
83
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
84
+ case 6:
85
+ _context.next = 8;
86
+ return _Api.default.sendRequest("/settings_changes", 'GET', params, options);
87
+ case 8:
88
+ response = _context.sent;
89
+ return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
90
+ return new SettingsChange(obj, options);
91
+ })) || []);
92
+ case 10:
93
+ case "end":
94
+ return _context.stop();
97
95
  }
98
96
  }, _callee);
99
97
  })));