files.com 1.2.249 → 1.2.251

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 (90) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/User.md +4 -1
  3. package/lib/Api.js +72 -71
  4. package/lib/Files.js +1 -1
  5. package/lib/isomorphic/File.node.js +5 -5
  6. package/lib/models/ActionNotificationExport.js +38 -38
  7. package/lib/models/ActionNotificationExportResult.js +14 -14
  8. package/lib/models/ApiKey.js +100 -100
  9. package/lib/models/ApiRequestLog.js +8 -8
  10. package/lib/models/App.js +8 -8
  11. package/lib/models/As2IncomingMessage.js +10 -10
  12. package/lib/models/As2OutgoingMessage.js +10 -10
  13. package/lib/models/As2Partner.js +101 -101
  14. package/lib/models/As2Station.js +81 -81
  15. package/lib/models/Automation.js +167 -167
  16. package/lib/models/AutomationLog.js +8 -8
  17. package/lib/models/AutomationRun.js +24 -24
  18. package/lib/models/BandwidthSnapshot.js +8 -8
  19. package/lib/models/Behavior.js +106 -106
  20. package/lib/models/Bundle.js +143 -143
  21. package/lib/models/BundleAction.js +10 -10
  22. package/lib/models/BundleDownload.js +12 -12
  23. package/lib/models/BundleNotification.js +69 -69
  24. package/lib/models/BundleRecipient.js +40 -40
  25. package/lib/models/BundleRegistration.js +12 -12
  26. package/lib/models/Clickwrap.js +79 -79
  27. package/lib/models/DnsRecord.js +8 -8
  28. package/lib/models/EmailIncomingMessage.js +8 -8
  29. package/lib/models/EmailLog.js +8 -8
  30. package/lib/models/ExavaultApiRequestLog.js +8 -8
  31. package/lib/models/ExternalEvent.js +36 -36
  32. package/lib/models/File.js +269 -269
  33. package/lib/models/FileComment.js +70 -70
  34. package/lib/models/FileCommentReaction.js +34 -34
  35. package/lib/models/FileMigration.js +10 -10
  36. package/lib/models/FileMigrationLog.js +8 -8
  37. package/lib/models/Folder.js +36 -36
  38. package/lib/models/FormFieldSet.js +71 -71
  39. package/lib/models/FtpActionLog.js +8 -8
  40. package/lib/models/GpgKey.js +81 -81
  41. package/lib/models/Group.js +83 -83
  42. package/lib/models/GroupUser.js +89 -89
  43. package/lib/models/History.js +88 -88
  44. package/lib/models/HistoryExport.js +64 -64
  45. package/lib/models/HistoryExportResult.js +14 -14
  46. package/lib/models/InboxRecipient.js +36 -36
  47. package/lib/models/InboxRegistration.js +10 -10
  48. package/lib/models/InboxUpload.js +8 -8
  49. package/lib/models/Invoice.js +18 -18
  50. package/lib/models/IpAddress.js +32 -32
  51. package/lib/models/Lock.js +51 -51
  52. package/lib/models/Message.js +100 -100
  53. package/lib/models/MessageComment.js +78 -78
  54. package/lib/models/MessageCommentReaction.js +54 -54
  55. package/lib/models/MessageReaction.js +54 -54
  56. package/lib/models/Notification.js +91 -91
  57. package/lib/models/OutboundConnectionLog.js +8 -8
  58. package/lib/models/Payment.js +18 -18
  59. package/lib/models/Permission.js +54 -54
  60. package/lib/models/Priority.js +14 -14
  61. package/lib/models/Project.js +70 -70
  62. package/lib/models/PublicHostingRequestLog.js +8 -8
  63. package/lib/models/PublicKey.js +78 -78
  64. package/lib/models/RemoteBandwidthSnapshot.js +8 -8
  65. package/lib/models/RemoteServer.js +362 -362
  66. package/lib/models/Request.js +60 -60
  67. package/lib/models/Restore.js +24 -24
  68. package/lib/models/Session.js +21 -21
  69. package/lib/models/SettingsChange.js +8 -8
  70. package/lib/models/SftpActionLog.js +8 -8
  71. package/lib/models/SftpHostKey.js +67 -67
  72. package/lib/models/ShareGroup.js +79 -79
  73. package/lib/models/SiemHttpDestination.js +158 -158
  74. package/lib/models/Site.js +150 -150
  75. package/lib/models/Snapshot.js +85 -85
  76. package/lib/models/SsoStrategy.js +32 -32
  77. package/lib/models/Style.js +48 -48
  78. package/lib/models/SyncLog.js +8 -8
  79. package/lib/models/UsageDailySnapshot.js +8 -8
  80. package/lib/models/UsageSnapshot.js +8 -8
  81. package/lib/models/User.js +223 -215
  82. package/lib/models/UserCipherUse.js +10 -10
  83. package/lib/models/UserLifecycleRule.js +92 -92
  84. package/lib/models/UserRequest.js +56 -56
  85. package/lib/models/UserSftpClientUse.js +10 -10
  86. package/lib/models/WebDavActionLog.js +8 -8
  87. package/lib/models/WebhookTest.js +24 -24
  88. package/package.json +1 -1
  89. package/src/Files.js +1 -1
  90. package/src/models/User.js +6 -0
@@ -56,46 +56,46 @@ var MessageReaction = /*#__PURE__*/(0, _createClass2.default)(function MessageRe
56
56
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
57
57
  var params,
58
58
  _args = arguments;
59
- return _regenerator.default.wrap(function _callee$(_context) {
59
+ return _regenerator.default.wrap(function (_context) {
60
60
  while (1) switch (_context.prev = _context.next) {
61
61
  case 0:
62
62
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
63
63
  if (_this.attributes.id) {
64
- _context.next = 3;
64
+ _context.next = 1;
65
65
  break;
66
66
  }
67
67
  throw new errors.EmptyPropertyError('Current object has no id');
68
- case 3:
68
+ case 1:
69
69
  if ((0, _utils.isObject)(params)) {
70
- _context.next = 5;
70
+ _context.next = 2;
71
71
  break;
72
72
  }
73
73
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
74
- case 5:
74
+ case 2:
75
75
  params.id = _this.attributes.id;
76
76
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
77
- _context.next = 8;
77
+ _context.next = 3;
78
78
  break;
79
79
  }
80
80
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
81
- case 8:
81
+ case 3:
82
82
  if (params.id) {
83
- _context.next = 14;
83
+ _context.next = 5;
84
84
  break;
85
85
  }
86
86
  if (!_this.attributes.id) {
87
- _context.next = 13;
87
+ _context.next = 4;
88
88
  break;
89
89
  }
90
90
  params.id = _this.id;
91
- _context.next = 14;
91
+ _context.next = 5;
92
92
  break;
93
- case 13:
93
+ case 4:
94
94
  throw new errors.MissingParameterError('Parameter missing: id');
95
- case 14:
96
- _context.next = 16;
95
+ case 5:
96
+ _context.next = 6;
97
97
  return _Api.default.sendRequest("/message_reactions/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
98
- case 16:
98
+ case 6:
99
99
  case "end":
100
100
  return _context.stop();
101
101
  }
@@ -107,22 +107,22 @@ var MessageReaction = /*#__PURE__*/(0, _createClass2.default)(function MessageRe
107
107
  });
108
108
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
109
109
  var newObject;
110
- return _regenerator.default.wrap(function _callee2$(_context2) {
110
+ return _regenerator.default.wrap(function (_context2) {
111
111
  while (1) switch (_context2.prev = _context2.next) {
112
112
  case 0:
113
113
  if (!_this.attributes.id) {
114
- _context2.next = 4;
114
+ _context2.next = 1;
115
115
  break;
116
116
  }
117
117
  throw new errors.NotImplementedError('The MessageReaction object doesn\'t support updates.');
118
- case 4:
119
- _context2.next = 6;
118
+ case 1:
119
+ _context2.next = 2;
120
120
  return MessageReaction.create(_this.attributes, _this.options);
121
- case 6:
121
+ case 2:
122
122
  newObject = _context2.sent;
123
123
  _this.attributes = _objectSpread({}, newObject.attributes);
124
124
  return _context2.abrupt("return", true);
125
- case 9:
125
+ case 3:
126
126
  case "end":
127
127
  return _context2.stop();
128
128
  }
@@ -153,49 +153,49 @@ _MessageReaction = MessageReaction;
153
153
  options,
154
154
  response,
155
155
  _args3 = arguments;
156
- return _regenerator.default.wrap(function _callee3$(_context3) {
156
+ return _regenerator.default.wrap(function (_context3) {
157
157
  while (1) switch (_context3.prev = _context3.next) {
158
158
  case 0:
159
159
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
160
160
  options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
161
161
  if (params.message_id) {
162
- _context3.next = 4;
162
+ _context3.next = 1;
163
163
  break;
164
164
  }
165
165
  throw new errors.MissingParameterError('Parameter missing: message_id');
166
- case 4:
166
+ case 1:
167
167
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
168
- _context3.next = 6;
168
+ _context3.next = 2;
169
169
  break;
170
170
  }
171
171
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
172
- case 6:
172
+ case 2:
173
173
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
174
- _context3.next = 8;
174
+ _context3.next = 3;
175
175
  break;
176
176
  }
177
177
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
178
- case 8:
178
+ case 3:
179
179
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
180
- _context3.next = 10;
180
+ _context3.next = 4;
181
181
  break;
182
182
  }
183
183
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
184
- case 10:
184
+ case 4:
185
185
  if (!(params.message_id && !(0, _utils.isInt)(params.message_id))) {
186
- _context3.next = 12;
186
+ _context3.next = 5;
187
187
  break;
188
188
  }
189
189
  throw new errors.InvalidParameterError("Bad parameter: message_id must be of type Int, received ".concat((0, _utils.getType)(params.message_id)));
190
- case 12:
191
- _context3.next = 14;
190
+ case 5:
191
+ _context3.next = 6;
192
192
  return _Api.default.sendRequest('/message_reactions', 'GET', params, options);
193
- case 14:
193
+ case 6:
194
194
  response = _context3.sent;
195
195
  return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
196
196
  return new _MessageReaction(obj, options);
197
197
  })) || []);
198
- case 16:
198
+ case 7:
199
199
  case "end":
200
200
  return _context3.stop();
201
201
  }
@@ -214,36 +214,36 @@ _MessageReaction = MessageReaction;
214
214
  options,
215
215
  response,
216
216
  _args4 = arguments;
217
- return _regenerator.default.wrap(function _callee4$(_context4) {
217
+ return _regenerator.default.wrap(function (_context4) {
218
218
  while (1) switch (_context4.prev = _context4.next) {
219
219
  case 0:
220
220
  params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
221
221
  options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
222
222
  if ((0, _utils.isObject)(params)) {
223
- _context4.next = 4;
223
+ _context4.next = 1;
224
224
  break;
225
225
  }
226
226
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
227
- case 4:
227
+ case 1:
228
228
  params.id = id;
229
229
  if (params.id) {
230
- _context4.next = 7;
230
+ _context4.next = 2;
231
231
  break;
232
232
  }
233
233
  throw new errors.MissingParameterError('Parameter missing: id');
234
- case 7:
234
+ case 2:
235
235
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
236
- _context4.next = 9;
236
+ _context4.next = 3;
237
237
  break;
238
238
  }
239
239
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
240
- case 9:
241
- _context4.next = 11;
240
+ case 3:
241
+ _context4.next = 4;
242
242
  return _Api.default.sendRequest("/message_reactions/".concat(encodeURIComponent(params.id)), 'GET', params, options);
243
- case 11:
243
+ case 4:
244
244
  response = _context4.sent;
245
245
  return _context4.abrupt("return", new _MessageReaction(response === null || response === void 0 ? void 0 : response.data, options));
246
- case 13:
246
+ case 5:
247
247
  case "end":
248
248
  return _context4.stop();
249
249
  }
@@ -266,35 +266,35 @@ _MessageReaction = MessageReaction;
266
266
  options,
267
267
  response,
268
268
  _args5 = arguments;
269
- return _regenerator.default.wrap(function _callee5$(_context5) {
269
+ return _regenerator.default.wrap(function (_context5) {
270
270
  while (1) switch (_context5.prev = _context5.next) {
271
271
  case 0:
272
272
  params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
273
273
  options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
274
274
  if (params.emoji) {
275
- _context5.next = 4;
275
+ _context5.next = 1;
276
276
  break;
277
277
  }
278
278
  throw new errors.MissingParameterError('Parameter missing: emoji');
279
- case 4:
279
+ case 1:
280
280
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
281
- _context5.next = 6;
281
+ _context5.next = 2;
282
282
  break;
283
283
  }
284
284
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
285
- case 6:
285
+ case 2:
286
286
  if (!(params.emoji && !(0, _utils.isString)(params.emoji))) {
287
- _context5.next = 8;
287
+ _context5.next = 3;
288
288
  break;
289
289
  }
290
290
  throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params.emoji)));
291
- case 8:
292
- _context5.next = 10;
291
+ case 3:
292
+ _context5.next = 4;
293
293
  return _Api.default.sendRequest('/message_reactions', 'POST', params, options);
294
- case 10:
294
+ case 4:
295
295
  response = _context5.sent;
296
296
  return _context5.abrupt("return", new _MessageReaction(response === null || response === void 0 ? void 0 : response.data, options));
297
- case 12:
297
+ case 5:
298
298
  case "end":
299
299
  return _context5.stop();
300
300
  }
@@ -204,79 +204,79 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
204
204
  var params,
205
205
  response,
206
206
  _args = arguments;
207
- return _regenerator.default.wrap(function _callee$(_context) {
207
+ return _regenerator.default.wrap(function (_context) {
208
208
  while (1) switch (_context.prev = _context.next) {
209
209
  case 0:
210
210
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
211
211
  if (_this.attributes.id) {
212
- _context.next = 3;
212
+ _context.next = 1;
213
213
  break;
214
214
  }
215
215
  throw new errors.EmptyPropertyError('Current object has no id');
216
- case 3:
216
+ case 1:
217
217
  if ((0, _utils.isObject)(params)) {
218
- _context.next = 5;
218
+ _context.next = 2;
219
219
  break;
220
220
  }
221
221
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
222
- case 5:
222
+ case 2:
223
223
  params.id = _this.attributes.id;
224
224
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
225
- _context.next = 8;
225
+ _context.next = 3;
226
226
  break;
227
227
  }
228
228
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
229
- case 8:
229
+ case 3:
230
230
  if (!(params.send_interval && !(0, _utils.isString)(params.send_interval))) {
231
- _context.next = 10;
231
+ _context.next = 4;
232
232
  break;
233
233
  }
234
234
  throw new errors.InvalidParameterError("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(params.send_interval)));
235
- case 10:
235
+ case 4:
236
236
  if (!(params.message && !(0, _utils.isString)(params.message))) {
237
- _context.next = 12;
237
+ _context.next = 5;
238
238
  break;
239
239
  }
240
240
  throw new errors.InvalidParameterError("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(params.message)));
241
- case 12:
241
+ case 5:
242
242
  if (!(params.triggering_filenames && !(0, _utils.isArray)(params.triggering_filenames))) {
243
- _context.next = 14;
243
+ _context.next = 6;
244
244
  break;
245
245
  }
246
246
  throw new errors.InvalidParameterError("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(params.triggering_filenames)));
247
- case 14:
247
+ case 6:
248
248
  if (!(params.triggering_group_ids && !(0, _utils.isArray)(params.triggering_group_ids))) {
249
- _context.next = 16;
249
+ _context.next = 7;
250
250
  break;
251
251
  }
252
252
  throw new errors.InvalidParameterError("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(params.triggering_group_ids)));
253
- case 16:
253
+ case 7:
254
254
  if (!(params.triggering_user_ids && !(0, _utils.isArray)(params.triggering_user_ids))) {
255
- _context.next = 18;
255
+ _context.next = 8;
256
256
  break;
257
257
  }
258
258
  throw new errors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(params.triggering_user_ids)));
259
- case 18:
259
+ case 8:
260
260
  if (params.id) {
261
- _context.next = 24;
261
+ _context.next = 10;
262
262
  break;
263
263
  }
264
264
  if (!_this.attributes.id) {
265
- _context.next = 23;
265
+ _context.next = 9;
266
266
  break;
267
267
  }
268
268
  params.id = _this.id;
269
- _context.next = 24;
269
+ _context.next = 10;
270
270
  break;
271
- case 23:
271
+ case 9:
272
272
  throw new errors.MissingParameterError('Parameter missing: id');
273
- case 24:
274
- _context.next = 26;
273
+ case 10:
274
+ _context.next = 11;
275
275
  return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
276
- case 26:
276
+ case 11:
277
277
  response = _context.sent;
278
278
  return _context.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, _this.options));
279
- case 28:
279
+ case 12:
280
280
  case "end":
281
281
  return _context.stop();
282
282
  }
@@ -285,46 +285,46 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
285
285
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
286
286
  var params,
287
287
  _args2 = arguments;
288
- return _regenerator.default.wrap(function _callee2$(_context2) {
288
+ return _regenerator.default.wrap(function (_context2) {
289
289
  while (1) switch (_context2.prev = _context2.next) {
290
290
  case 0:
291
291
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
292
292
  if (_this.attributes.id) {
293
- _context2.next = 3;
293
+ _context2.next = 1;
294
294
  break;
295
295
  }
296
296
  throw new errors.EmptyPropertyError('Current object has no id');
297
- case 3:
297
+ case 1:
298
298
  if ((0, _utils.isObject)(params)) {
299
- _context2.next = 5;
299
+ _context2.next = 2;
300
300
  break;
301
301
  }
302
302
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
303
- case 5:
303
+ case 2:
304
304
  params.id = _this.attributes.id;
305
305
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
306
- _context2.next = 8;
306
+ _context2.next = 3;
307
307
  break;
308
308
  }
309
309
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
310
- case 8:
310
+ case 3:
311
311
  if (params.id) {
312
- _context2.next = 14;
312
+ _context2.next = 5;
313
313
  break;
314
314
  }
315
315
  if (!_this.attributes.id) {
316
- _context2.next = 13;
316
+ _context2.next = 4;
317
317
  break;
318
318
  }
319
319
  params.id = _this.id;
320
- _context2.next = 14;
320
+ _context2.next = 5;
321
321
  break;
322
- case 13:
322
+ case 4:
323
323
  throw new errors.MissingParameterError('Parameter missing: id');
324
- case 14:
325
- _context2.next = 16;
324
+ case 5:
325
+ _context2.next = 6;
326
326
  return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
327
- case 16:
327
+ case 6:
328
328
  case "end":
329
329
  return _context2.stop();
330
330
  }
@@ -336,27 +336,27 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
336
336
  });
337
337
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
338
338
  var _newObject, newObject;
339
- return _regenerator.default.wrap(function _callee3$(_context3) {
339
+ return _regenerator.default.wrap(function (_context3) {
340
340
  while (1) switch (_context3.prev = _context3.next) {
341
341
  case 0:
342
342
  if (!_this.attributes.id) {
343
- _context3.next = 6;
343
+ _context3.next = 2;
344
344
  break;
345
345
  }
346
- _context3.next = 3;
346
+ _context3.next = 1;
347
347
  return _this.update(_this.attributes);
348
- case 3:
348
+ case 1:
349
349
  _newObject = _context3.sent;
350
350
  _this.attributes = _objectSpread({}, _newObject.attributes);
351
351
  return _context3.abrupt("return", true);
352
- case 6:
353
- _context3.next = 8;
352
+ case 2:
353
+ _context3.next = 3;
354
354
  return Notification.create(_this.attributes, _this.options);
355
- case 8:
355
+ case 3:
356
356
  newObject = _context3.sent;
357
357
  _this.attributes = _objectSpread({}, newObject.attributes);
358
358
  return _context3.abrupt("return", true);
359
- case 11:
359
+ case 4:
360
360
  case "end":
361
361
  return _context3.stop();
362
362
  }
@@ -391,43 +391,43 @@ _Notification = Notification;
391
391
  options,
392
392
  response,
393
393
  _args4 = arguments;
394
- return _regenerator.default.wrap(function _callee4$(_context4) {
394
+ return _regenerator.default.wrap(function (_context4) {
395
395
  while (1) switch (_context4.prev = _context4.next) {
396
396
  case 0:
397
397
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
398
398
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
399
399
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
400
- _context4.next = 4;
400
+ _context4.next = 1;
401
401
  break;
402
402
  }
403
403
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
404
- case 4:
404
+ case 1:
405
405
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
406
- _context4.next = 6;
406
+ _context4.next = 2;
407
407
  break;
408
408
  }
409
409
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
410
- case 6:
410
+ case 2:
411
411
  if (!(params.path && !(0, _utils.isString)(params.path))) {
412
- _context4.next = 8;
412
+ _context4.next = 3;
413
413
  break;
414
414
  }
415
415
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
416
- case 8:
416
+ case 3:
417
417
  if (!(params.group_id && !(0, _utils.isString)(params.group_id))) {
418
- _context4.next = 10;
418
+ _context4.next = 4;
419
419
  break;
420
420
  }
421
421
  throw new errors.InvalidParameterError("Bad parameter: group_id must be of type String, received ".concat((0, _utils.getType)(params.group_id)));
422
- case 10:
423
- _context4.next = 12;
422
+ case 4:
423
+ _context4.next = 5;
424
424
  return _Api.default.sendRequest('/notifications', 'GET', params, options);
425
- case 12:
425
+ case 5:
426
426
  response = _context4.sent;
427
427
  return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
428
428
  return new _Notification(obj, options);
429
429
  })) || []);
430
- case 14:
430
+ case 6:
431
431
  case "end":
432
432
  return _context4.stop();
433
433
  }
@@ -446,36 +446,36 @@ _Notification = Notification;
446
446
  options,
447
447
  response,
448
448
  _args5 = arguments;
449
- return _regenerator.default.wrap(function _callee5$(_context5) {
449
+ return _regenerator.default.wrap(function (_context5) {
450
450
  while (1) switch (_context5.prev = _context5.next) {
451
451
  case 0:
452
452
  params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
453
453
  options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
454
454
  if ((0, _utils.isObject)(params)) {
455
- _context5.next = 4;
455
+ _context5.next = 1;
456
456
  break;
457
457
  }
458
458
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
459
- case 4:
459
+ case 1:
460
460
  params.id = id;
461
461
  if (params.id) {
462
- _context5.next = 7;
462
+ _context5.next = 2;
463
463
  break;
464
464
  }
465
465
  throw new errors.MissingParameterError('Parameter missing: id');
466
- case 7:
466
+ case 2:
467
467
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
468
- _context5.next = 9;
468
+ _context5.next = 3;
469
469
  break;
470
470
  }
471
471
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
472
- case 9:
473
- _context5.next = 11;
472
+ case 3:
473
+ _context5.next = 4;
474
474
  return _Api.default.sendRequest("/notifications/".concat(encodeURIComponent(params.id)), 'GET', params, options);
475
- case 11:
475
+ case 4:
476
476
  response = _context5.sent;
477
477
  return _context5.abrupt("return", new _Notification(response === null || response === void 0 ? void 0 : response.data, options));
478
- case 13:
478
+ case 5:
479
479
  case "end":
480
480
  return _context5.stop();
481
481
  }
@@ -513,71 +513,71 @@ _Notification = Notification;
513
513
  options,
514
514
  response,
515
515
  _args6 = arguments;
516
- return _regenerator.default.wrap(function _callee6$(_context6) {
516
+ return _regenerator.default.wrap(function (_context6) {
517
517
  while (1) switch (_context6.prev = _context6.next) {
518
518
  case 0:
519
519
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
520
520
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
521
521
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
522
- _context6.next = 4;
522
+ _context6.next = 1;
523
523
  break;
524
524
  }
525
525
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
526
- case 4:
526
+ case 1:
527
527
  if (!(params.send_interval && !(0, _utils.isString)(params.send_interval))) {
528
- _context6.next = 6;
528
+ _context6.next = 2;
529
529
  break;
530
530
  }
531
531
  throw new errors.InvalidParameterError("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(params.send_interval)));
532
- case 6:
532
+ case 2:
533
533
  if (!(params.message && !(0, _utils.isString)(params.message))) {
534
- _context6.next = 8;
534
+ _context6.next = 3;
535
535
  break;
536
536
  }
537
537
  throw new errors.InvalidParameterError("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(params.message)));
538
- case 8:
538
+ case 3:
539
539
  if (!(params.triggering_filenames && !(0, _utils.isArray)(params.triggering_filenames))) {
540
- _context6.next = 10;
540
+ _context6.next = 4;
541
541
  break;
542
542
  }
543
543
  throw new errors.InvalidParameterError("Bad parameter: triggering_filenames must be of type Array, received ".concat((0, _utils.getType)(params.triggering_filenames)));
544
- case 10:
544
+ case 4:
545
545
  if (!(params.triggering_group_ids && !(0, _utils.isArray)(params.triggering_group_ids))) {
546
- _context6.next = 12;
546
+ _context6.next = 5;
547
547
  break;
548
548
  }
549
549
  throw new errors.InvalidParameterError("Bad parameter: triggering_group_ids must be of type Array, received ".concat((0, _utils.getType)(params.triggering_group_ids)));
550
- case 12:
550
+ case 5:
551
551
  if (!(params.triggering_user_ids && !(0, _utils.isArray)(params.triggering_user_ids))) {
552
- _context6.next = 14;
552
+ _context6.next = 6;
553
553
  break;
554
554
  }
555
555
  throw new errors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0, _utils.getType)(params.triggering_user_ids)));
556
- case 14:
556
+ case 6:
557
557
  if (!(params.group_id && !(0, _utils.isInt)(params.group_id))) {
558
- _context6.next = 16;
558
+ _context6.next = 7;
559
559
  break;
560
560
  }
561
561
  throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params.group_id)));
562
- case 16:
562
+ case 7:
563
563
  if (!(params.path && !(0, _utils.isString)(params.path))) {
564
- _context6.next = 18;
564
+ _context6.next = 8;
565
565
  break;
566
566
  }
567
567
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
568
- case 18:
568
+ case 8:
569
569
  if (!(params.username && !(0, _utils.isString)(params.username))) {
570
- _context6.next = 20;
570
+ _context6.next = 9;
571
571
  break;
572
572
  }
573
573
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
574
- case 20:
575
- _context6.next = 22;
574
+ case 9:
575
+ _context6.next = 10;
576
576
  return _Api.default.sendRequest('/notifications', 'POST', params, options);
577
- case 22:
577
+ case 10:
578
578
  response = _context6.sent;
579
579
  return _context6.abrupt("return", new _Notification(response === null || response === void 0 ? void 0 : response.data, options));
580
- case 24:
580
+ case 11:
581
581
  case "end":
582
582
  return _context6.stop();
583
583
  }