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
@@ -91,71 +91,69 @@ var History = /*#__PURE__*/(0, _createClass2.default)(function History() {
91
91
  response,
92
92
  _args = arguments;
93
93
  return _regenerator.default.wrap(function _callee$(_context) {
94
- while (1) {
95
- switch (_context.prev = _context.next) {
96
- case 0:
97
- params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
98
- options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
99
- if ((0, _utils.isObject)(params)) {
100
- _context.next = 4;
101
- break;
102
- }
103
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
104
- case 4:
105
- params['path'] = path;
106
- if (params['path']) {
107
- _context.next = 7;
108
- break;
109
- }
110
- throw new errors.MissingParameterError('Parameter missing: path');
111
- case 7:
112
- if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
113
- _context.next = 9;
114
- break;
115
- }
116
- throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
117
- case 9:
118
- if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
119
- _context.next = 11;
120
- break;
121
- }
122
- throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
123
- case 11:
124
- if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
125
- _context.next = 13;
126
- break;
127
- }
128
- throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
129
- case 13:
130
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
131
- _context.next = 15;
132
- break;
133
- }
134
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
135
- case 15:
136
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
137
- _context.next = 17;
138
- break;
139
- }
140
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
141
- case 17:
142
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
143
- _context.next = 19;
144
- break;
145
- }
146
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
147
- case 19:
148
- _context.next = 21;
149
- return _Api.default.sendRequest("/history/files/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
150
- case 21:
151
- response = _context.sent;
152
- 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) {
153
- return new Action(obj, options);
154
- })) || []);
155
- case 23:
156
- case "end":
157
- return _context.stop();
158
- }
94
+ while (1) switch (_context.prev = _context.next) {
95
+ case 0:
96
+ params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
97
+ options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
98
+ if ((0, _utils.isObject)(params)) {
99
+ _context.next = 4;
100
+ break;
101
+ }
102
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
103
+ case 4:
104
+ params['path'] = path;
105
+ if (params['path']) {
106
+ _context.next = 7;
107
+ break;
108
+ }
109
+ throw new errors.MissingParameterError('Parameter missing: path');
110
+ case 7:
111
+ if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
112
+ _context.next = 9;
113
+ break;
114
+ }
115
+ throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
116
+ case 9:
117
+ if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
118
+ _context.next = 11;
119
+ break;
120
+ }
121
+ throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
122
+ case 11:
123
+ if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
124
+ _context.next = 13;
125
+ break;
126
+ }
127
+ throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
128
+ case 13:
129
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
130
+ _context.next = 15;
131
+ break;
132
+ }
133
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
134
+ case 15:
135
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
136
+ _context.next = 17;
137
+ break;
138
+ }
139
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
140
+ case 17:
141
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
142
+ _context.next = 19;
143
+ break;
144
+ }
145
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
146
+ case 19:
147
+ _context.next = 21;
148
+ return _Api.default.sendRequest("/history/files/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
149
+ case 21:
150
+ response = _context.sent;
151
+ 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) {
152
+ return new Action(obj, options);
153
+ })) || []);
154
+ case 23:
155
+ case "end":
156
+ return _context.stop();
159
157
  }
160
158
  }, _callee);
161
159
  }));
@@ -171,267 +169,259 @@ var History = /*#__PURE__*/(0, _createClass2.default)(function History() {
171
169
  response,
172
170
  _args2 = arguments;
173
171
  return _regenerator.default.wrap(function _callee2$(_context2) {
174
- while (1) {
175
- switch (_context2.prev = _context2.next) {
176
- case 0:
177
- params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
178
- options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
179
- if ((0, _utils.isObject)(params)) {
180
- _context2.next = 4;
181
- break;
182
- }
183
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
184
- case 4:
185
- params['path'] = path;
186
- if (params['path']) {
187
- _context2.next = 7;
188
- break;
189
- }
190
- throw new errors.MissingParameterError('Parameter missing: path');
191
- case 7:
192
- if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
193
- _context2.next = 9;
194
- break;
195
- }
196
- throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
197
- case 9:
198
- if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
199
- _context2.next = 11;
200
- break;
201
- }
202
- throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
203
- case 11:
204
- if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
205
- _context2.next = 13;
206
- break;
207
- }
208
- throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
209
- case 13:
210
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
211
- _context2.next = 15;
212
- break;
213
- }
214
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
215
- case 15:
216
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
217
- _context2.next = 17;
218
- break;
219
- }
220
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
221
- case 17:
222
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
223
- _context2.next = 19;
224
- break;
225
- }
226
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
227
- case 19:
228
- _context2.next = 21;
229
- return _Api.default.sendRequest("/history/folders/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
230
- case 21:
231
- response = _context2.sent;
232
- return _context2.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) {
233
- return new Action(obj, options);
234
- })) || []);
235
- case 23:
236
- case "end":
237
- return _context2.stop();
238
- }
239
- }
240
- }, _callee2);
241
- }));
242
- return function (_x2) {
243
- return _ref4.apply(this, arguments);
244
- };
245
- }());
246
- (0, _defineProperty2.default)(History, "listForUser", /*#__PURE__*/function () {
247
- var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(user_id) {
248
- var _response$data3;
249
- var params,
250
- options,
251
- response,
252
- _args3 = arguments;
253
- return _regenerator.default.wrap(function _callee3$(_context3) {
254
- while (1) {
255
- switch (_context3.prev = _context3.next) {
256
- case 0:
257
- params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
258
- options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
259
- if ((0, _utils.isObject)(params)) {
260
- _context3.next = 4;
261
- break;
262
- }
263
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
264
- case 4:
265
- params['user_id'] = user_id;
266
- if (params['user_id']) {
267
- _context3.next = 7;
268
- break;
269
- }
270
- throw new errors.MissingParameterError('Parameter missing: user_id');
271
- case 7:
272
- if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
273
- _context3.next = 9;
274
- break;
275
- }
276
- throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
277
- case 9:
278
- if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
279
- _context3.next = 11;
280
- break;
281
- }
282
- throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
283
- case 11:
284
- if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
285
- _context3.next = 13;
286
- break;
287
- }
288
- throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
289
- case 13:
290
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
291
- _context3.next = 15;
292
- break;
293
- }
294
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
295
- case 15:
296
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
297
- _context3.next = 17;
298
- break;
299
- }
300
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
301
- case 17:
302
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
303
- _context3.next = 19;
304
- break;
305
- }
306
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
307
- case 19:
308
- _context3.next = 21;
309
- return _Api.default.sendRequest("/history/users/".concat(encodeURIComponent(params['user_id'])), 'GET', params, options);
310
- case 21:
311
- response = _context3.sent;
312
- return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
313
- return new Action(obj, options);
314
- })) || []);
315
- case 23:
316
- case "end":
317
- return _context3.stop();
318
- }
319
- }
320
- }, _callee3);
321
- }));
322
- return function (_x3) {
323
- return _ref5.apply(this, arguments);
324
- };
325
- }());
326
- (0, _defineProperty2.default)(History, "listLogins", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
327
- var _response$data4;
328
- var params,
329
- options,
330
- response,
331
- _args4 = arguments;
332
- return _regenerator.default.wrap(function _callee4$(_context4) {
333
- while (1) {
334
- switch (_context4.prev = _context4.next) {
172
+ while (1) switch (_context2.prev = _context2.next) {
335
173
  case 0:
336
- params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
337
- options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
174
+ params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
175
+ options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
176
+ if ((0, _utils.isObject)(params)) {
177
+ _context2.next = 4;
178
+ break;
179
+ }
180
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
181
+ case 4:
182
+ params['path'] = path;
183
+ if (params['path']) {
184
+ _context2.next = 7;
185
+ break;
186
+ }
187
+ throw new errors.MissingParameterError('Parameter missing: path');
188
+ case 7:
338
189
  if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
339
- _context4.next = 4;
190
+ _context2.next = 9;
340
191
  break;
341
192
  }
342
193
  throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
343
- case 4:
194
+ case 9:
344
195
  if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
345
- _context4.next = 6;
196
+ _context2.next = 11;
346
197
  break;
347
198
  }
348
199
  throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
349
- case 6:
200
+ case 11:
350
201
  if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
351
- _context4.next = 8;
202
+ _context2.next = 13;
352
203
  break;
353
204
  }
354
205
  throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
355
- case 8:
206
+ case 13:
356
207
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
357
- _context4.next = 10;
208
+ _context2.next = 15;
358
209
  break;
359
210
  }
360
211
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
361
- case 10:
212
+ case 15:
362
213
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
363
- _context4.next = 12;
214
+ _context2.next = 17;
364
215
  break;
365
216
  }
366
217
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
367
- case 12:
368
- _context4.next = 14;
369
- return _Api.default.sendRequest("/history/login", 'GET', params, options);
370
- case 14:
371
- response = _context4.sent;
372
- return _context4.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : _response$data4.map(function (obj) {
218
+ case 17:
219
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
220
+ _context2.next = 19;
221
+ break;
222
+ }
223
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
224
+ case 19:
225
+ _context2.next = 21;
226
+ return _Api.default.sendRequest("/history/folders/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
227
+ case 21:
228
+ response = _context2.sent;
229
+ return _context2.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) {
373
230
  return new Action(obj, options);
374
231
  })) || []);
375
- case 16:
232
+ case 23:
376
233
  case "end":
377
- return _context4.stop();
234
+ return _context2.stop();
378
235
  }
379
- }
380
- }, _callee4);
381
- })));
382
- (0, _defineProperty2.default)(History, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
383
- var _response$data5;
384
- var params,
385
- options,
386
- response,
387
- _args5 = arguments;
388
- return _regenerator.default.wrap(function _callee5$(_context5) {
389
- while (1) {
390
- switch (_context5.prev = _context5.next) {
236
+ }, _callee2);
237
+ }));
238
+ return function (_x2) {
239
+ return _ref4.apply(this, arguments);
240
+ };
241
+ }());
242
+ (0, _defineProperty2.default)(History, "listForUser", /*#__PURE__*/function () {
243
+ var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(user_id) {
244
+ var _response$data3;
245
+ var params,
246
+ options,
247
+ response,
248
+ _args3 = arguments;
249
+ return _regenerator.default.wrap(function _callee3$(_context3) {
250
+ while (1) switch (_context3.prev = _context3.next) {
391
251
  case 0:
392
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
393
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
252
+ params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
253
+ options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
254
+ if ((0, _utils.isObject)(params)) {
255
+ _context3.next = 4;
256
+ break;
257
+ }
258
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
259
+ case 4:
260
+ params['user_id'] = user_id;
261
+ if (params['user_id']) {
262
+ _context3.next = 7;
263
+ break;
264
+ }
265
+ throw new errors.MissingParameterError('Parameter missing: user_id');
266
+ case 7:
394
267
  if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
395
- _context5.next = 4;
268
+ _context3.next = 9;
396
269
  break;
397
270
  }
398
271
  throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
399
- case 4:
272
+ case 9:
400
273
  if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
401
- _context5.next = 6;
274
+ _context3.next = 11;
402
275
  break;
403
276
  }
404
277
  throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
405
- case 6:
278
+ case 11:
406
279
  if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
407
- _context5.next = 8;
280
+ _context3.next = 13;
408
281
  break;
409
282
  }
410
283
  throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
411
- case 8:
284
+ case 13:
412
285
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
413
- _context5.next = 10;
286
+ _context3.next = 15;
414
287
  break;
415
288
  }
416
289
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
417
- case 10:
290
+ case 15:
418
291
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
419
- _context5.next = 12;
292
+ _context3.next = 17;
420
293
  break;
421
294
  }
422
295
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
423
- case 12:
424
- _context5.next = 14;
425
- return _Api.default.sendRequest("/history", 'GET', params, options);
426
- case 14:
427
- response = _context5.sent;
428
- return _context5.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data5 = response.data) === null || _response$data5 === void 0 ? void 0 : _response$data5.map(function (obj) {
296
+ case 17:
297
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
298
+ _context3.next = 19;
299
+ break;
300
+ }
301
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
302
+ case 19:
303
+ _context3.next = 21;
304
+ return _Api.default.sendRequest("/history/users/".concat(encodeURIComponent(params['user_id'])), 'GET', params, options);
305
+ case 21:
306
+ response = _context3.sent;
307
+ return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
429
308
  return new Action(obj, options);
430
309
  })) || []);
431
- case 16:
310
+ case 23:
432
311
  case "end":
433
- return _context5.stop();
312
+ return _context3.stop();
434
313
  }
314
+ }, _callee3);
315
+ }));
316
+ return function (_x3) {
317
+ return _ref5.apply(this, arguments);
318
+ };
319
+ }());
320
+ (0, _defineProperty2.default)(History, "listLogins", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
321
+ var _response$data4;
322
+ var params,
323
+ options,
324
+ response,
325
+ _args4 = arguments;
326
+ return _regenerator.default.wrap(function _callee4$(_context4) {
327
+ while (1) switch (_context4.prev = _context4.next) {
328
+ case 0:
329
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
330
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
331
+ if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
332
+ _context4.next = 4;
333
+ break;
334
+ }
335
+ throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
336
+ case 4:
337
+ if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
338
+ _context4.next = 6;
339
+ break;
340
+ }
341
+ throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
342
+ case 6:
343
+ if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
344
+ _context4.next = 8;
345
+ break;
346
+ }
347
+ throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
348
+ case 8:
349
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
350
+ _context4.next = 10;
351
+ break;
352
+ }
353
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
354
+ case 10:
355
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
356
+ _context4.next = 12;
357
+ break;
358
+ }
359
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
360
+ case 12:
361
+ _context4.next = 14;
362
+ return _Api.default.sendRequest("/history/login", 'GET', params, options);
363
+ case 14:
364
+ response = _context4.sent;
365
+ return _context4.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : _response$data4.map(function (obj) {
366
+ return new Action(obj, options);
367
+ })) || []);
368
+ case 16:
369
+ case "end":
370
+ return _context4.stop();
371
+ }
372
+ }, _callee4);
373
+ })));
374
+ (0, _defineProperty2.default)(History, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
375
+ var _response$data5;
376
+ var params,
377
+ options,
378
+ response,
379
+ _args5 = arguments;
380
+ return _regenerator.default.wrap(function _callee5$(_context5) {
381
+ while (1) switch (_context5.prev = _context5.next) {
382
+ case 0:
383
+ params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
384
+ options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
385
+ if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
386
+ _context5.next = 4;
387
+ break;
388
+ }
389
+ throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
390
+ case 4:
391
+ if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
392
+ _context5.next = 6;
393
+ break;
394
+ }
395
+ throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
396
+ case 6:
397
+ if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
398
+ _context5.next = 8;
399
+ break;
400
+ }
401
+ throw new errors.InvalidParameterError("Bad parameter: display must be of type String, received ".concat((0, _utils.getType)(params['display'])));
402
+ case 8:
403
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
404
+ _context5.next = 10;
405
+ break;
406
+ }
407
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
408
+ case 10:
409
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
410
+ _context5.next = 12;
411
+ break;
412
+ }
413
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
414
+ case 12:
415
+ _context5.next = 14;
416
+ return _Api.default.sendRequest("/history", 'GET', params, options);
417
+ case 14:
418
+ response = _context5.sent;
419
+ return _context5.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data5 = response.data) === null || _response$data5 === void 0 ? void 0 : _response$data5.map(function (obj) {
420
+ return new Action(obj, options);
421
+ })) || []);
422
+ case 16:
423
+ case "end":
424
+ return _context5.stop();
435
425
  }
436
426
  }, _callee5);
437
427
  })));