files.com 1.0.235 → 1.0.237

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -168,82 +168,80 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
168
168
  response,
169
169
  _args = arguments;
170
170
  return _regenerator.default.wrap(function _callee$(_context) {
171
- while (1) {
172
- switch (_context.prev = _context.next) {
173
- case 0:
174
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
175
- if (_this.attributes.id) {
176
- _context.next = 3;
177
- break;
178
- }
179
- throw new errors.EmptyPropertyError('Current object has no id');
180
- case 3:
181
- if ((0, _utils.isObject)(params)) {
182
- _context.next = 5;
183
- break;
184
- }
185
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
186
- case 5:
187
- params.id = _this.attributes.id;
188
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
189
- _context.next = 8;
190
- break;
191
- }
192
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
193
- case 8:
194
- if (!(params['send_interval'] && !(0, _utils.isString)(params['send_interval']))) {
195
- _context.next = 10;
196
- break;
197
- }
198
- throw new errors.InvalidParameterError("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(send_interval)));
199
- case 10:
200
- if (!(params['message'] && !(0, _utils.isString)(params['message']))) {
201
- _context.next = 12;
202
- break;
203
- }
204
- throw new errors.InvalidParameterError("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(message)));
205
- case 12:
206
- if (!(params['triggering_filenames'] && !(0, _utils.isArray)(params['triggering_filenames']))) {
207
- _context.next = 14;
208
- break;
209
- }
210
- throw new errors.InvalidParameterError("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(triggering_filenames)));
211
- case 14:
212
- if (!(params['triggering_group_ids'] && !(0, _utils.isArray)(params['triggering_group_ids']))) {
213
- _context.next = 16;
214
- break;
215
- }
216
- throw new errors.InvalidParameterError("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_group_ids)));
217
- case 16:
218
- if (!(params['triggering_user_ids'] && !(0, _utils.isArray)(params['triggering_user_ids']))) {
219
- _context.next = 18;
220
- break;
221
- }
222
- throw new errors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_user_ids)));
223
- case 18:
224
- if (params['id']) {
225
- _context.next = 24;
226
- break;
227
- }
228
- if (!_this.attributes.id) {
229
- _context.next = 23;
230
- break;
231
- }
232
- params['id'] = _this.id;
171
+ while (1) switch (_context.prev = _context.next) {
172
+ case 0:
173
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
174
+ if (_this.attributes.id) {
175
+ _context.next = 3;
176
+ break;
177
+ }
178
+ throw new errors.EmptyPropertyError('Current object has no id');
179
+ case 3:
180
+ if ((0, _utils.isObject)(params)) {
181
+ _context.next = 5;
182
+ break;
183
+ }
184
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
185
+ case 5:
186
+ params.id = _this.attributes.id;
187
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
188
+ _context.next = 8;
189
+ break;
190
+ }
191
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
192
+ case 8:
193
+ if (!(params['send_interval'] && !(0, _utils.isString)(params['send_interval']))) {
194
+ _context.next = 10;
195
+ break;
196
+ }
197
+ throw new errors.InvalidParameterError("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(send_interval)));
198
+ case 10:
199
+ if (!(params['message'] && !(0, _utils.isString)(params['message']))) {
200
+ _context.next = 12;
201
+ break;
202
+ }
203
+ throw new errors.InvalidParameterError("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(message)));
204
+ case 12:
205
+ if (!(params['triggering_filenames'] && !(0, _utils.isArray)(params['triggering_filenames']))) {
206
+ _context.next = 14;
207
+ break;
208
+ }
209
+ throw new errors.InvalidParameterError("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(triggering_filenames)));
210
+ case 14:
211
+ if (!(params['triggering_group_ids'] && !(0, _utils.isArray)(params['triggering_group_ids']))) {
212
+ _context.next = 16;
213
+ break;
214
+ }
215
+ throw new errors.InvalidParameterError("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_group_ids)));
216
+ case 16:
217
+ if (!(params['triggering_user_ids'] && !(0, _utils.isArray)(params['triggering_user_ids']))) {
218
+ _context.next = 18;
219
+ break;
220
+ }
221
+ throw new errors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(triggering_user_ids)));
222
+ case 18:
223
+ if (params['id']) {
233
224
  _context.next = 24;
234
225
  break;
235
- case 23:
236
- throw new errors.MissingParameterError('Parameter missing: id');
237
- case 24:
238
- _context.next = 26;
239
- return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
240
- case 26:
241
- response = _context.sent;
242
- return _context.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, _this.options));
243
- case 28:
244
- case "end":
245
- return _context.stop();
246
- }
226
+ }
227
+ if (!_this.attributes.id) {
228
+ _context.next = 23;
229
+ break;
230
+ }
231
+ params['id'] = _this.id;
232
+ _context.next = 24;
233
+ break;
234
+ case 23:
235
+ throw new errors.MissingParameterError('Parameter missing: id');
236
+ case 24:
237
+ _context.next = 26;
238
+ return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
239
+ case 26:
240
+ response = _context.sent;
241
+ return _context.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, _this.options));
242
+ case 28:
243
+ case "end":
244
+ return _context.stop();
247
245
  }
248
246
  }, _callee);
249
247
  })));
@@ -252,52 +250,50 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
252
250
  response,
253
251
  _args2 = arguments;
254
252
  return _regenerator.default.wrap(function _callee2$(_context2) {
255
- while (1) {
256
- switch (_context2.prev = _context2.next) {
257
- case 0:
258
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
259
- if (_this.attributes.id) {
260
- _context2.next = 3;
261
- break;
262
- }
263
- throw new errors.EmptyPropertyError('Current object has no id');
264
- case 3:
265
- if ((0, _utils.isObject)(params)) {
266
- _context2.next = 5;
267
- break;
268
- }
269
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
270
- case 5:
271
- params.id = _this.attributes.id;
272
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
273
- _context2.next = 8;
274
- break;
275
- }
276
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
277
- case 8:
278
- if (params['id']) {
279
- _context2.next = 14;
280
- break;
281
- }
282
- if (!_this.attributes.id) {
283
- _context2.next = 13;
284
- break;
285
- }
286
- params['id'] = _this.id;
253
+ while (1) switch (_context2.prev = _context2.next) {
254
+ case 0:
255
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
256
+ if (_this.attributes.id) {
257
+ _context2.next = 3;
258
+ break;
259
+ }
260
+ throw new errors.EmptyPropertyError('Current object has no id');
261
+ case 3:
262
+ if ((0, _utils.isObject)(params)) {
263
+ _context2.next = 5;
264
+ break;
265
+ }
266
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
267
+ case 5:
268
+ params.id = _this.attributes.id;
269
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
270
+ _context2.next = 8;
271
+ break;
272
+ }
273
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
274
+ case 8:
275
+ if (params['id']) {
287
276
  _context2.next = 14;
288
277
  break;
289
- case 13:
290
- throw new errors.MissingParameterError('Parameter missing: id');
291
- case 14:
292
- _context2.next = 16;
293
- return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
294
- case 16:
295
- response = _context2.sent;
296
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
297
- case 18:
298
- case "end":
299
- return _context2.stop();
300
- }
278
+ }
279
+ if (!_this.attributes.id) {
280
+ _context2.next = 13;
281
+ break;
282
+ }
283
+ params['id'] = _this.id;
284
+ _context2.next = 14;
285
+ break;
286
+ case 13:
287
+ throw new errors.MissingParameterError('Parameter missing: id');
288
+ case 14:
289
+ _context2.next = 16;
290
+ return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
291
+ case 16:
292
+ response = _context2.sent;
293
+ return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
294
+ case 18:
295
+ case "end":
296
+ return _context2.stop();
301
297
  }
302
298
  }, _callee2);
303
299
  })));
@@ -334,52 +330,50 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
334
330
  response,
335
331
  _args3 = arguments;
336
332
  return _regenerator.default.wrap(function _callee3$(_context3) {
337
- while (1) {
338
- switch (_context3.prev = _context3.next) {
339
- case 0:
340
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
341
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
342
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
343
- _context3.next = 4;
344
- break;
345
- }
346
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
347
- case 4:
348
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
349
- _context3.next = 6;
350
- break;
351
- }
352
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
353
- case 6:
354
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
355
- _context3.next = 8;
356
- break;
357
- }
358
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
359
- case 8:
360
- if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
361
- _context3.next = 10;
362
- break;
363
- }
364
- throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params['group_id'])));
365
- case 10:
366
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
367
- _context3.next = 12;
368
- break;
369
- }
370
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
371
- case 12:
372
- _context3.next = 14;
373
- return _Api.default.sendRequest("/notifications", 'GET', params, options);
374
- case 14:
375
- response = _context3.sent;
376
- return _context3.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) {
377
- return new Notification(obj, options);
378
- })) || []);
379
- case 16:
380
- case "end":
381
- return _context3.stop();
382
- }
333
+ while (1) switch (_context3.prev = _context3.next) {
334
+ case 0:
335
+ params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
336
+ options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
337
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
338
+ _context3.next = 4;
339
+ break;
340
+ }
341
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
342
+ case 4:
343
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
344
+ _context3.next = 6;
345
+ break;
346
+ }
347
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
348
+ case 6:
349
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
350
+ _context3.next = 8;
351
+ break;
352
+ }
353
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
354
+ case 8:
355
+ if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
356
+ _context3.next = 10;
357
+ break;
358
+ }
359
+ throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params['group_id'])));
360
+ case 10:
361
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
362
+ _context3.next = 12;
363
+ break;
364
+ }
365
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
366
+ case 12:
367
+ _context3.next = 14;
368
+ return _Api.default.sendRequest("/notifications", 'GET', params, options);
369
+ case 14:
370
+ response = _context3.sent;
371
+ return _context3.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) {
372
+ return new Notification(obj, options);
373
+ })) || []);
374
+ case 16:
375
+ case "end":
376
+ return _context3.stop();
383
377
  }
384
378
  }, _callee3);
385
379
  })));
@@ -395,39 +389,37 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
395
389
  response,
396
390
  _args4 = arguments;
397
391
  return _regenerator.default.wrap(function _callee4$(_context4) {
398
- while (1) {
399
- switch (_context4.prev = _context4.next) {
400
- case 0:
401
- params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
402
- options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
403
- if ((0, _utils.isObject)(params)) {
404
- _context4.next = 4;
405
- break;
406
- }
407
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
408
- case 4:
409
- params['id'] = id;
410
- if (params['id']) {
411
- _context4.next = 7;
412
- break;
413
- }
414
- throw new errors.MissingParameterError('Parameter missing: id');
415
- case 7:
416
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
417
- _context4.next = 9;
418
- break;
419
- }
420
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
421
- case 9:
422
- _context4.next = 11;
423
- return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
424
- case 11:
425
- response = _context4.sent;
426
- return _context4.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, options));
427
- case 13:
428
- case "end":
429
- return _context4.stop();
430
- }
392
+ while (1) switch (_context4.prev = _context4.next) {
393
+ case 0:
394
+ params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
395
+ options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
396
+ if ((0, _utils.isObject)(params)) {
397
+ _context4.next = 4;
398
+ break;
399
+ }
400
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
401
+ case 4:
402
+ params['id'] = id;
403
+ if (params['id']) {
404
+ _context4.next = 7;
405
+ break;
406
+ }
407
+ throw new errors.MissingParameterError('Parameter missing: id');
408
+ case 7:
409
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
410
+ _context4.next = 9;
411
+ break;
412
+ }
413
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
414
+ case 9:
415
+ _context4.next = 11;
416
+ return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
417
+ case 11:
418
+ response = _context4.sent;
419
+ return _context4.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, options));
420
+ case 13:
421
+ case "end":
422
+ return _context4.stop();
431
423
  }
432
424
  }, _callee4);
433
425
  }));
@@ -446,74 +438,72 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
446
438
  response,
447
439
  _args5 = arguments;
448
440
  return _regenerator.default.wrap(function _callee5$(_context5) {
449
- while (1) {
450
- switch (_context5.prev = _context5.next) {
451
- case 0:
452
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
453
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
454
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
455
- _context5.next = 4;
456
- break;
457
- }
458
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
459
- case 4:
460
- if (!(params['send_interval'] && !(0, _utils.isString)(params['send_interval']))) {
461
- _context5.next = 6;
462
- break;
463
- }
464
- throw new errors.InvalidParameterError("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(params['send_interval'])));
465
- case 6:
466
- if (!(params['message'] && !(0, _utils.isString)(params['message']))) {
467
- _context5.next = 8;
468
- break;
469
- }
470
- throw new errors.InvalidParameterError("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(params['message'])));
471
- case 8:
472
- if (!(params['triggering_filenames'] && !(0, _utils.isArray)(params['triggering_filenames']))) {
473
- _context5.next = 10;
474
- break;
475
- }
476
- throw new errors.InvalidParameterError("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(params['triggering_filenames'])));
477
- case 10:
478
- if (!(params['triggering_group_ids'] && !(0, _utils.isArray)(params['triggering_group_ids']))) {
479
- _context5.next = 12;
480
- break;
481
- }
482
- throw new errors.InvalidParameterError("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(params['triggering_group_ids'])));
483
- case 12:
484
- if (!(params['triggering_user_ids'] && !(0, _utils.isArray)(params['triggering_user_ids']))) {
485
- _context5.next = 14;
486
- break;
487
- }
488
- throw new errors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(params['triggering_user_ids'])));
489
- case 14:
490
- if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
491
- _context5.next = 16;
492
- break;
493
- }
494
- throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params['group_id'])));
495
- case 16:
496
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
497
- _context5.next = 18;
498
- break;
499
- }
500
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
501
- case 18:
502
- if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
503
- _context5.next = 20;
504
- break;
505
- }
506
- throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
507
- case 20:
508
- _context5.next = 22;
509
- return _Api.default.sendRequest("/notifications", 'POST', params, options);
510
- case 22:
511
- response = _context5.sent;
512
- return _context5.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, options));
513
- case 24:
514
- case "end":
515
- return _context5.stop();
516
- }
441
+ while (1) switch (_context5.prev = _context5.next) {
442
+ case 0:
443
+ params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
444
+ options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
445
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
446
+ _context5.next = 4;
447
+ break;
448
+ }
449
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
450
+ case 4:
451
+ if (!(params['send_interval'] && !(0, _utils.isString)(params['send_interval']))) {
452
+ _context5.next = 6;
453
+ break;
454
+ }
455
+ throw new errors.InvalidParameterError("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(params['send_interval'])));
456
+ case 6:
457
+ if (!(params['message'] && !(0, _utils.isString)(params['message']))) {
458
+ _context5.next = 8;
459
+ break;
460
+ }
461
+ throw new errors.InvalidParameterError("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(params['message'])));
462
+ case 8:
463
+ if (!(params['triggering_filenames'] && !(0, _utils.isArray)(params['triggering_filenames']))) {
464
+ _context5.next = 10;
465
+ break;
466
+ }
467
+ throw new errors.InvalidParameterError("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(params['triggering_filenames'])));
468
+ case 10:
469
+ if (!(params['triggering_group_ids'] && !(0, _utils.isArray)(params['triggering_group_ids']))) {
470
+ _context5.next = 12;
471
+ break;
472
+ }
473
+ throw new errors.InvalidParameterError("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(params['triggering_group_ids'])));
474
+ case 12:
475
+ if (!(params['triggering_user_ids'] && !(0, _utils.isArray)(params['triggering_user_ids']))) {
476
+ _context5.next = 14;
477
+ break;
478
+ }
479
+ throw new errors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(params['triggering_user_ids'])));
480
+ case 14:
481
+ if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
482
+ _context5.next = 16;
483
+ break;
484
+ }
485
+ throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params['group_id'])));
486
+ case 16:
487
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
488
+ _context5.next = 18;
489
+ break;
490
+ }
491
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
492
+ case 18:
493
+ if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
494
+ _context5.next = 20;
495
+ break;
496
+ }
497
+ throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
498
+ case 20:
499
+ _context5.next = 22;
500
+ return _Api.default.sendRequest("/notifications", 'POST', params, options);
501
+ case 22:
502
+ response = _context5.sent;
503
+ return _context5.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, options));
504
+ case 24:
505
+ case "end":
506
+ return _context5.stop();
517
507
  }
518
508
  }, _callee5);
519
509
  })));