files.com 1.0.236 → 1.0.238
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/Errors.md +1 -0
- package/docs/models/BundleNotification.md +35 -0
- package/lib/Api.js +153 -159
- package/lib/Errors.js +680 -666
- package/lib/isomorphic/File.node.js +24 -28
- package/lib/models/ActionNotificationExport.js +97 -101
- package/lib/models/ActionNotificationExportResult.js +44 -46
- package/lib/models/ActionWebhookFailure.js +42 -44
- package/lib/models/ApiKey.js +271 -287
- package/lib/models/App.js +26 -28
- package/lib/models/As2IncomingMessage.js +32 -34
- package/lib/models/As2OutgoingMessage.js +32 -34
- package/lib/models/As2Partner.js +231 -241
- package/lib/models/As2Station.js +219 -229
- package/lib/models/Automation.js +333 -343
- package/lib/models/AutomationRun.js +75 -79
- package/lib/models/BandwidthSnapshot.js +26 -28
- package/lib/models/Behavior.js +323 -337
- package/lib/models/Bundle.js +375 -387
- package/lib/models/BundleDownload.js +38 -40
- package/lib/models/BundleNotification.js +223 -173
- package/lib/models/BundleRecipient.js +104 -108
- package/lib/models/BundleRegistration.js +38 -40
- package/lib/models/Clickwrap.js +213 -223
- package/lib/models/DnsRecord.js +26 -28
- package/lib/models/ExternalEvent.js +93 -99
- package/lib/models/File.js +726 -766
- package/lib/models/FileComment.js +180 -188
- package/lib/models/FileCommentReaction.js +84 -88
- package/lib/models/FileMigration.js +31 -33
- package/lib/models/Folder.js +94 -98
- package/lib/models/FormFieldSet.js +189 -199
- package/lib/models/Group.js +207 -217
- package/lib/models/GroupUser.js +230 -238
- package/lib/models/History.js +266 -276
- package/lib/models/HistoryExport.js +175 -179
- package/lib/models/HistoryExportResult.js +44 -46
- package/lib/models/InboxRecipient.js +104 -108
- package/lib/models/InboxRegistration.js +32 -34
- package/lib/models/InboxUpload.js +38 -40
- package/lib/models/Invoice.js +57 -61
- package/lib/models/IpAddress.js +78 -84
- package/lib/models/Lock.js +148 -154
- package/lib/models/Message.js +267 -277
- package/lib/models/MessageComment.js +207 -217
- package/lib/models/MessageCommentReaction.js +147 -155
- package/lib/models/MessageReaction.js +147 -155
- package/lib/models/Notification.js +255 -265
- package/lib/models/Payment.js +57 -61
- package/lib/models/Permission.js +128 -134
- package/lib/models/Priority.js +45 -47
- package/lib/models/Project.js +183 -193
- package/lib/models/PublicKey.js +207 -217
- package/lib/models/RemoteBandwidthSnapshot.js +26 -28
- package/lib/models/RemoteServer.js +805 -819
- package/lib/models/Request.js +166 -174
- package/lib/models/Session.js +47 -51
- package/lib/models/SettingsChange.js +26 -28
- package/lib/models/SftpHostKey.js +177 -187
- package/lib/models/Site.js +412 -418
- package/lib/models/SsoStrategy.js +99 -105
- package/lib/models/Style.js +127 -133
- package/lib/models/UsageDailySnapshot.js +26 -28
- package/lib/models/UsageSnapshot.js +26 -28
- package/lib/models/User.js +587 -603
- package/lib/models/UserCipherUse.js +32 -34
- package/lib/models/UserRequest.js +147 -155
- package/lib/models/WebhookTest.js +54 -56
- package/package.json +1 -1
- package/src/Errors.js +1 -0
- package/src/models/BundleNotification.js +39 -1
package/lib/models/History.js
CHANGED
@@ -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
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
return
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
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 =
|
337
|
-
options =
|
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
|
-
|
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
|
194
|
+
case 9:
|
344
195
|
if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
|
345
|
-
|
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
|
200
|
+
case 11:
|
350
201
|
if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
|
351
|
-
|
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
|
206
|
+
case 13:
|
356
207
|
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
357
|
-
|
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
|
212
|
+
case 15:
|
362
213
|
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
363
|
-
|
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
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
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
|
232
|
+
case 23:
|
376
233
|
case "end":
|
377
|
-
return
|
234
|
+
return _context2.stop();
|
378
235
|
}
|
379
|
-
}
|
380
|
-
}
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
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 =
|
393
|
-
options =
|
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
|
-
|
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
|
272
|
+
case 9:
|
400
273
|
if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
|
401
|
-
|
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
|
278
|
+
case 11:
|
406
279
|
if (!(params['display'] && !(0, _utils.isString)(params['display']))) {
|
407
|
-
|
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
|
284
|
+
case 13:
|
412
285
|
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
413
|
-
|
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
|
290
|
+
case 15:
|
418
291
|
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
419
|
-
|
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
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
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
|
310
|
+
case 23:
|
432
311
|
case "end":
|
433
|
-
return
|
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
|
})));
|