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.
- package/_VERSION +1 -1
- package/docs/models/User.md +4 -1
- package/lib/Api.js +72 -71
- package/lib/Files.js +1 -1
- package/lib/isomorphic/File.node.js +5 -5
- package/lib/models/ActionNotificationExport.js +38 -38
- package/lib/models/ActionNotificationExportResult.js +14 -14
- package/lib/models/ApiKey.js +100 -100
- package/lib/models/ApiRequestLog.js +8 -8
- package/lib/models/App.js +8 -8
- package/lib/models/As2IncomingMessage.js +10 -10
- package/lib/models/As2OutgoingMessage.js +10 -10
- package/lib/models/As2Partner.js +101 -101
- package/lib/models/As2Station.js +81 -81
- package/lib/models/Automation.js +167 -167
- package/lib/models/AutomationLog.js +8 -8
- package/lib/models/AutomationRun.js +24 -24
- package/lib/models/BandwidthSnapshot.js +8 -8
- package/lib/models/Behavior.js +106 -106
- package/lib/models/Bundle.js +143 -143
- package/lib/models/BundleAction.js +10 -10
- package/lib/models/BundleDownload.js +12 -12
- package/lib/models/BundleNotification.js +69 -69
- package/lib/models/BundleRecipient.js +40 -40
- package/lib/models/BundleRegistration.js +12 -12
- package/lib/models/Clickwrap.js +79 -79
- package/lib/models/DnsRecord.js +8 -8
- package/lib/models/EmailIncomingMessage.js +8 -8
- package/lib/models/EmailLog.js +8 -8
- package/lib/models/ExavaultApiRequestLog.js +8 -8
- package/lib/models/ExternalEvent.js +36 -36
- package/lib/models/File.js +269 -269
- package/lib/models/FileComment.js +70 -70
- package/lib/models/FileCommentReaction.js +34 -34
- package/lib/models/FileMigration.js +10 -10
- package/lib/models/FileMigrationLog.js +8 -8
- package/lib/models/Folder.js +36 -36
- package/lib/models/FormFieldSet.js +71 -71
- package/lib/models/FtpActionLog.js +8 -8
- package/lib/models/GpgKey.js +81 -81
- package/lib/models/Group.js +83 -83
- package/lib/models/GroupUser.js +89 -89
- package/lib/models/History.js +88 -88
- package/lib/models/HistoryExport.js +64 -64
- package/lib/models/HistoryExportResult.js +14 -14
- package/lib/models/InboxRecipient.js +36 -36
- package/lib/models/InboxRegistration.js +10 -10
- package/lib/models/InboxUpload.js +8 -8
- package/lib/models/Invoice.js +18 -18
- package/lib/models/IpAddress.js +32 -32
- package/lib/models/Lock.js +51 -51
- package/lib/models/Message.js +100 -100
- package/lib/models/MessageComment.js +78 -78
- package/lib/models/MessageCommentReaction.js +54 -54
- package/lib/models/MessageReaction.js +54 -54
- package/lib/models/Notification.js +91 -91
- package/lib/models/OutboundConnectionLog.js +8 -8
- package/lib/models/Payment.js +18 -18
- package/lib/models/Permission.js +54 -54
- package/lib/models/Priority.js +14 -14
- package/lib/models/Project.js +70 -70
- package/lib/models/PublicHostingRequestLog.js +8 -8
- package/lib/models/PublicKey.js +78 -78
- package/lib/models/RemoteBandwidthSnapshot.js +8 -8
- package/lib/models/RemoteServer.js +362 -362
- package/lib/models/Request.js +60 -60
- package/lib/models/Restore.js +24 -24
- package/lib/models/Session.js +21 -21
- package/lib/models/SettingsChange.js +8 -8
- package/lib/models/SftpActionLog.js +8 -8
- package/lib/models/SftpHostKey.js +67 -67
- package/lib/models/ShareGroup.js +79 -79
- package/lib/models/SiemHttpDestination.js +158 -158
- package/lib/models/Site.js +150 -150
- package/lib/models/Snapshot.js +85 -85
- package/lib/models/SsoStrategy.js +32 -32
- package/lib/models/Style.js +48 -48
- package/lib/models/SyncLog.js +8 -8
- package/lib/models/UsageDailySnapshot.js +8 -8
- package/lib/models/UsageSnapshot.js +8 -8
- package/lib/models/User.js +223 -215
- package/lib/models/UserCipherUse.js +10 -10
- package/lib/models/UserLifecycleRule.js +92 -92
- package/lib/models/UserRequest.js +56 -56
- package/lib/models/UserSftpClientUse.js +10 -10
- package/lib/models/WebDavActionLog.js +8 -8
- package/lib/models/WebhookTest.js +24 -24
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/User.js +6 -0
package/lib/models/Request.js
CHANGED
|
@@ -91,46 +91,46 @@ var Request = /*#__PURE__*/(0, _createClass2.default)(function Request() {
|
|
|
91
91
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
92
92
|
var params,
|
|
93
93
|
_args = arguments;
|
|
94
|
-
return _regenerator.default.wrap(function
|
|
94
|
+
return _regenerator.default.wrap(function (_context) {
|
|
95
95
|
while (1) switch (_context.prev = _context.next) {
|
|
96
96
|
case 0:
|
|
97
97
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
98
98
|
if (_this.attributes.id) {
|
|
99
|
-
_context.next =
|
|
99
|
+
_context.next = 1;
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
103
|
-
case
|
|
103
|
+
case 1:
|
|
104
104
|
if ((0, _utils.isObject)(params)) {
|
|
105
|
-
_context.next =
|
|
105
|
+
_context.next = 2;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
109
|
-
case
|
|
109
|
+
case 2:
|
|
110
110
|
params.id = _this.attributes.id;
|
|
111
111
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
112
|
-
_context.next =
|
|
112
|
+
_context.next = 3;
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
116
|
-
case
|
|
116
|
+
case 3:
|
|
117
117
|
if (params.id) {
|
|
118
|
-
_context.next =
|
|
118
|
+
_context.next = 5;
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
121
|
if (!_this.attributes.id) {
|
|
122
|
-
_context.next =
|
|
122
|
+
_context.next = 4;
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
125
|
params.id = _this.id;
|
|
126
|
-
_context.next =
|
|
126
|
+
_context.next = 5;
|
|
127
127
|
break;
|
|
128
|
-
case
|
|
128
|
+
case 4:
|
|
129
129
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
130
|
-
case
|
|
131
|
-
_context.next =
|
|
130
|
+
case 5:
|
|
131
|
+
_context.next = 6;
|
|
132
132
|
return _Api.default.sendRequest("/requests/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
133
|
-
case
|
|
133
|
+
case 6:
|
|
134
134
|
case "end":
|
|
135
135
|
return _context.stop();
|
|
136
136
|
}
|
|
@@ -142,22 +142,22 @@ var Request = /*#__PURE__*/(0, _createClass2.default)(function Request() {
|
|
|
142
142
|
});
|
|
143
143
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
144
144
|
var newObject;
|
|
145
|
-
return _regenerator.default.wrap(function
|
|
145
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
146
146
|
while (1) switch (_context2.prev = _context2.next) {
|
|
147
147
|
case 0:
|
|
148
148
|
if (!_this.attributes.id) {
|
|
149
|
-
_context2.next =
|
|
149
|
+
_context2.next = 1;
|
|
150
150
|
break;
|
|
151
151
|
}
|
|
152
152
|
throw new errors.NotImplementedError('The Request object doesn\'t support updates.');
|
|
153
|
-
case
|
|
154
|
-
_context2.next =
|
|
153
|
+
case 1:
|
|
154
|
+
_context2.next = 2;
|
|
155
155
|
return Request.create(_this.attributes, _this.options);
|
|
156
|
-
case
|
|
156
|
+
case 2:
|
|
157
157
|
newObject = _context2.sent;
|
|
158
158
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
159
159
|
return _context2.abrupt("return", true);
|
|
160
|
-
case
|
|
160
|
+
case 3:
|
|
161
161
|
case "end":
|
|
162
162
|
return _context2.stop();
|
|
163
163
|
}
|
|
@@ -189,37 +189,37 @@ _Request = Request;
|
|
|
189
189
|
options,
|
|
190
190
|
response,
|
|
191
191
|
_args3 = arguments;
|
|
192
|
-
return _regenerator.default.wrap(function
|
|
192
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
193
193
|
while (1) switch (_context3.prev = _context3.next) {
|
|
194
194
|
case 0:
|
|
195
195
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
196
196
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
197
197
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
198
|
-
_context3.next =
|
|
198
|
+
_context3.next = 1;
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
201
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
202
|
-
case
|
|
202
|
+
case 1:
|
|
203
203
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
204
|
-
_context3.next =
|
|
204
|
+
_context3.next = 2;
|
|
205
205
|
break;
|
|
206
206
|
}
|
|
207
207
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
208
|
-
case
|
|
208
|
+
case 2:
|
|
209
209
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
210
|
-
_context3.next =
|
|
210
|
+
_context3.next = 3;
|
|
211
211
|
break;
|
|
212
212
|
}
|
|
213
213
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
214
|
-
case
|
|
215
|
-
_context3.next =
|
|
214
|
+
case 3:
|
|
215
|
+
_context3.next = 4;
|
|
216
216
|
return _Api.default.sendRequest('/requests', 'GET', params, options);
|
|
217
|
-
case
|
|
217
|
+
case 4:
|
|
218
218
|
response = _context3.sent;
|
|
219
219
|
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) {
|
|
220
220
|
return new _Request(obj, options);
|
|
221
221
|
})) || []);
|
|
222
|
-
case
|
|
222
|
+
case 5:
|
|
223
223
|
case "end":
|
|
224
224
|
return _context3.stop();
|
|
225
225
|
}
|
|
@@ -243,50 +243,50 @@ _Request = Request;
|
|
|
243
243
|
options,
|
|
244
244
|
response,
|
|
245
245
|
_args4 = arguments;
|
|
246
|
-
return _regenerator.default.wrap(function
|
|
246
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
247
247
|
while (1) switch (_context4.prev = _context4.next) {
|
|
248
248
|
case 0:
|
|
249
249
|
params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
250
250
|
options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
|
|
251
251
|
if ((0, _utils.isObject)(params)) {
|
|
252
|
-
_context4.next =
|
|
252
|
+
_context4.next = 1;
|
|
253
253
|
break;
|
|
254
254
|
}
|
|
255
255
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
256
|
-
case
|
|
256
|
+
case 1:
|
|
257
257
|
params.path = path;
|
|
258
258
|
if (params.path) {
|
|
259
|
-
_context4.next =
|
|
259
|
+
_context4.next = 2;
|
|
260
260
|
break;
|
|
261
261
|
}
|
|
262
262
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
263
|
-
case
|
|
263
|
+
case 2:
|
|
264
264
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
265
|
-
_context4.next =
|
|
265
|
+
_context4.next = 3;
|
|
266
266
|
break;
|
|
267
267
|
}
|
|
268
268
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
269
|
-
case
|
|
269
|
+
case 3:
|
|
270
270
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
271
|
-
_context4.next =
|
|
271
|
+
_context4.next = 4;
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
275
|
-
case
|
|
275
|
+
case 4:
|
|
276
276
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
277
|
-
_context4.next =
|
|
277
|
+
_context4.next = 5;
|
|
278
278
|
break;
|
|
279
279
|
}
|
|
280
280
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
281
|
-
case
|
|
282
|
-
_context4.next =
|
|
281
|
+
case 5:
|
|
282
|
+
_context4.next = 6;
|
|
283
283
|
return _Api.default.sendRequest("/requests/folders/".concat(encodeURIComponent(params.path)), 'GET', params, options);
|
|
284
|
-
case
|
|
284
|
+
case 6:
|
|
285
285
|
response = _context4.sent;
|
|
286
286
|
return _context4.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
|
|
287
287
|
return new _Request(obj, options);
|
|
288
288
|
})) || []);
|
|
289
|
-
case
|
|
289
|
+
case 7:
|
|
290
290
|
case "end":
|
|
291
291
|
return _context4.stop();
|
|
292
292
|
}
|
|
@@ -306,53 +306,53 @@ _Request = Request;
|
|
|
306
306
|
options,
|
|
307
307
|
response,
|
|
308
308
|
_args5 = arguments;
|
|
309
|
-
return _regenerator.default.wrap(function
|
|
309
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
310
310
|
while (1) switch (_context5.prev = _context5.next) {
|
|
311
311
|
case 0:
|
|
312
312
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
313
313
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
314
314
|
if (params.path) {
|
|
315
|
-
_context5.next =
|
|
315
|
+
_context5.next = 1;
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
319
|
-
case
|
|
319
|
+
case 1:
|
|
320
320
|
if (params.destination) {
|
|
321
|
-
_context5.next =
|
|
321
|
+
_context5.next = 2;
|
|
322
322
|
break;
|
|
323
323
|
}
|
|
324
324
|
throw new errors.MissingParameterError('Parameter missing: destination');
|
|
325
|
-
case
|
|
325
|
+
case 2:
|
|
326
326
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
327
|
-
_context5.next =
|
|
327
|
+
_context5.next = 3;
|
|
328
328
|
break;
|
|
329
329
|
}
|
|
330
330
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
331
|
-
case
|
|
331
|
+
case 3:
|
|
332
332
|
if (!(params.destination && !(0, _utils.isString)(params.destination))) {
|
|
333
|
-
_context5.next =
|
|
333
|
+
_context5.next = 4;
|
|
334
334
|
break;
|
|
335
335
|
}
|
|
336
336
|
throw new errors.InvalidParameterError("Bad parameter: destination must be of type String, received ".concat((0, _utils.getType)(params.destination)));
|
|
337
|
-
case
|
|
337
|
+
case 4:
|
|
338
338
|
if (!(params.user_ids && !(0, _utils.isString)(params.user_ids))) {
|
|
339
|
-
_context5.next =
|
|
339
|
+
_context5.next = 5;
|
|
340
340
|
break;
|
|
341
341
|
}
|
|
342
342
|
throw new errors.InvalidParameterError("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(params.user_ids)));
|
|
343
|
-
case
|
|
343
|
+
case 5:
|
|
344
344
|
if (!(params.group_ids && !(0, _utils.isString)(params.group_ids))) {
|
|
345
|
-
_context5.next =
|
|
345
|
+
_context5.next = 6;
|
|
346
346
|
break;
|
|
347
347
|
}
|
|
348
348
|
throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params.group_ids)));
|
|
349
|
-
case
|
|
350
|
-
_context5.next =
|
|
349
|
+
case 6:
|
|
350
|
+
_context5.next = 7;
|
|
351
351
|
return _Api.default.sendRequest('/requests', 'POST', params, options);
|
|
352
|
-
case
|
|
352
|
+
case 7:
|
|
353
353
|
response = _context5.sent;
|
|
354
354
|
return _context5.abrupt("return", new _Request(response === null || response === void 0 ? void 0 : response.data, options));
|
|
355
|
-
case
|
|
355
|
+
case 8:
|
|
356
356
|
case "end":
|
|
357
357
|
return _context5.stop();
|
|
358
358
|
}
|
package/lib/models/Restore.js
CHANGED
|
@@ -132,22 +132,22 @@ var Restore = /*#__PURE__*/(0, _createClass2.default)(function Restore() {
|
|
|
132
132
|
});
|
|
133
133
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
134
134
|
var newObject;
|
|
135
|
-
return _regenerator.default.wrap(function
|
|
135
|
+
return _regenerator.default.wrap(function (_context) {
|
|
136
136
|
while (1) switch (_context.prev = _context.next) {
|
|
137
137
|
case 0:
|
|
138
138
|
if (!_this.attributes.id) {
|
|
139
|
-
_context.next =
|
|
139
|
+
_context.next = 1;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
throw new errors.NotImplementedError('The Restore object doesn\'t support updates.');
|
|
143
|
-
case
|
|
144
|
-
_context.next =
|
|
143
|
+
case 1:
|
|
144
|
+
_context.next = 2;
|
|
145
145
|
return Restore.create(_this.attributes, _this.options);
|
|
146
|
-
case
|
|
146
|
+
case 2:
|
|
147
147
|
newObject = _context.sent;
|
|
148
148
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
149
149
|
return _context.abrupt("return", true);
|
|
150
|
-
case
|
|
150
|
+
case 3:
|
|
151
151
|
case "end":
|
|
152
152
|
return _context.stop();
|
|
153
153
|
}
|
|
@@ -176,31 +176,31 @@ _Restore = Restore;
|
|
|
176
176
|
options,
|
|
177
177
|
response,
|
|
178
178
|
_args2 = arguments;
|
|
179
|
-
return _regenerator.default.wrap(function
|
|
179
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
180
180
|
while (1) switch (_context2.prev = _context2.next) {
|
|
181
181
|
case 0:
|
|
182
182
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
183
183
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
184
184
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
185
|
-
_context2.next =
|
|
185
|
+
_context2.next = 1;
|
|
186
186
|
break;
|
|
187
187
|
}
|
|
188
188
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
189
|
-
case
|
|
189
|
+
case 1:
|
|
190
190
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
191
|
-
_context2.next =
|
|
191
|
+
_context2.next = 2;
|
|
192
192
|
break;
|
|
193
193
|
}
|
|
194
194
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
195
|
-
case
|
|
196
|
-
_context2.next =
|
|
195
|
+
case 2:
|
|
196
|
+
_context2.next = 3;
|
|
197
197
|
return _Api.default.sendRequest('/restores', 'GET', params, options);
|
|
198
|
-
case
|
|
198
|
+
case 3:
|
|
199
199
|
response = _context2.sent;
|
|
200
200
|
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
201
201
|
return new _Restore(obj, options);
|
|
202
202
|
})) || []);
|
|
203
|
-
case
|
|
203
|
+
case 4:
|
|
204
204
|
case "end":
|
|
205
205
|
return _context2.stop();
|
|
206
206
|
}
|
|
@@ -222,35 +222,35 @@ _Restore = Restore;
|
|
|
222
222
|
options,
|
|
223
223
|
response,
|
|
224
224
|
_args3 = arguments;
|
|
225
|
-
return _regenerator.default.wrap(function
|
|
225
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
226
226
|
while (1) switch (_context3.prev = _context3.next) {
|
|
227
227
|
case 0:
|
|
228
228
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
229
229
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
230
230
|
if (params.earliest_date) {
|
|
231
|
-
_context3.next =
|
|
231
|
+
_context3.next = 1;
|
|
232
232
|
break;
|
|
233
233
|
}
|
|
234
234
|
throw new errors.MissingParameterError('Parameter missing: earliest_date');
|
|
235
|
-
case
|
|
235
|
+
case 1:
|
|
236
236
|
if (!(params.earliest_date && !(0, _utils.isString)(params.earliest_date))) {
|
|
237
|
-
_context3.next =
|
|
237
|
+
_context3.next = 2;
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
240
240
|
throw new errors.InvalidParameterError("Bad parameter: earliest_date must be of type String, received ".concat((0, _utils.getType)(params.earliest_date)));
|
|
241
|
-
case
|
|
241
|
+
case 2:
|
|
242
242
|
if (!(params.prefix && !(0, _utils.isString)(params.prefix))) {
|
|
243
|
-
_context3.next =
|
|
243
|
+
_context3.next = 3;
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
throw new errors.InvalidParameterError("Bad parameter: prefix must be of type String, received ".concat((0, _utils.getType)(params.prefix)));
|
|
247
|
-
case
|
|
248
|
-
_context3.next =
|
|
247
|
+
case 3:
|
|
248
|
+
_context3.next = 4;
|
|
249
249
|
return _Api.default.sendRequest('/restores', 'POST', params, options);
|
|
250
|
-
case
|
|
250
|
+
case 4:
|
|
251
251
|
response = _context3.sent;
|
|
252
252
|
return _context3.abrupt("return", new _Restore(response === null || response === void 0 ? void 0 : response.data, options));
|
|
253
|
-
case
|
|
253
|
+
case 5:
|
|
254
254
|
case "end":
|
|
255
255
|
return _context3.stop();
|
|
256
256
|
}
|
package/lib/models/Session.js
CHANGED
|
@@ -90,22 +90,22 @@ var Session = /*#__PURE__*/(0, _createClass2.default)(function Session() {
|
|
|
90
90
|
});
|
|
91
91
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
92
92
|
var newObject;
|
|
93
|
-
return _regenerator.default.wrap(function
|
|
93
|
+
return _regenerator.default.wrap(function (_context) {
|
|
94
94
|
while (1) switch (_context.prev = _context.next) {
|
|
95
95
|
case 0:
|
|
96
96
|
if (!_this.attributes.id) {
|
|
97
|
-
_context.next =
|
|
97
|
+
_context.next = 1;
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
100
|
throw new errors.NotImplementedError('The Session object doesn\'t support updates.');
|
|
101
|
-
case
|
|
102
|
-
_context.next =
|
|
101
|
+
case 1:
|
|
102
|
+
_context.next = 2;
|
|
103
103
|
return Session.create(_this.attributes, _this.options);
|
|
104
|
-
case
|
|
104
|
+
case 2:
|
|
105
105
|
newObject = _context.sent;
|
|
106
106
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
107
107
|
return _context.abrupt("return", true);
|
|
108
|
-
case
|
|
108
|
+
case 3:
|
|
109
109
|
case "end":
|
|
110
110
|
return _context.stop();
|
|
111
111
|
}
|
|
@@ -135,41 +135,41 @@ _Session = Session;
|
|
|
135
135
|
options,
|
|
136
136
|
response,
|
|
137
137
|
_args2 = arguments;
|
|
138
|
-
return _regenerator.default.wrap(function
|
|
138
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
139
139
|
while (1) switch (_context2.prev = _context2.next) {
|
|
140
140
|
case 0:
|
|
141
141
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
142
142
|
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
143
143
|
if (!(params.username && !(0, _utils.isString)(params.username))) {
|
|
144
|
-
_context2.next =
|
|
144
|
+
_context2.next = 1;
|
|
145
145
|
break;
|
|
146
146
|
}
|
|
147
147
|
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
|
|
148
|
-
case
|
|
148
|
+
case 1:
|
|
149
149
|
if (!(params.password && !(0, _utils.isString)(params.password))) {
|
|
150
|
-
_context2.next =
|
|
150
|
+
_context2.next = 2;
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params.password)));
|
|
154
|
-
case
|
|
154
|
+
case 2:
|
|
155
155
|
if (!(params.otp && !(0, _utils.isString)(params.otp))) {
|
|
156
|
-
_context2.next =
|
|
156
|
+
_context2.next = 3;
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
159
|
throw new errors.InvalidParameterError("Bad parameter: otp must be of type String, received ".concat((0, _utils.getType)(params.otp)));
|
|
160
|
-
case
|
|
160
|
+
case 3:
|
|
161
161
|
if (!(params.partial_session_id && !(0, _utils.isString)(params.partial_session_id))) {
|
|
162
|
-
_context2.next =
|
|
162
|
+
_context2.next = 4;
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
165
|
throw new errors.InvalidParameterError("Bad parameter: partial_session_id must be of type String, received ".concat((0, _utils.getType)(params.partial_session_id)));
|
|
166
|
-
case
|
|
167
|
-
_context2.next =
|
|
166
|
+
case 4:
|
|
167
|
+
_context2.next = 5;
|
|
168
168
|
return _Api.default.sendRequest('/sessions', 'POST', params, options);
|
|
169
|
-
case
|
|
169
|
+
case 5:
|
|
170
170
|
response = _context2.sent;
|
|
171
171
|
return _context2.abrupt("return", new _Session(response === null || response === void 0 ? void 0 : response.data, options));
|
|
172
|
-
case
|
|
172
|
+
case 6:
|
|
173
173
|
case "end":
|
|
174
174
|
return _context2.stop();
|
|
175
175
|
}
|
|
@@ -178,13 +178,13 @@ _Session = Session;
|
|
|
178
178
|
(0, _defineProperty2.default)(Session, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
179
179
|
var options,
|
|
180
180
|
_args3 = arguments;
|
|
181
|
-
return _regenerator.default.wrap(function
|
|
181
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
182
182
|
while (1) switch (_context3.prev = _context3.next) {
|
|
183
183
|
case 0:
|
|
184
184
|
options = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
185
|
-
_context3.next =
|
|
185
|
+
_context3.next = 1;
|
|
186
186
|
return _Api.default.sendRequest('/sessions', 'DELETE', {}, options);
|
|
187
|
-
case
|
|
187
|
+
case 1:
|
|
188
188
|
case "end":
|
|
189
189
|
return _context3.stop();
|
|
190
190
|
}
|
|
@@ -85,31 +85,31 @@ _SettingsChange = SettingsChange;
|
|
|
85
85
|
options,
|
|
86
86
|
response,
|
|
87
87
|
_args = arguments;
|
|
88
|
-
return _regenerator.default.wrap(function
|
|
88
|
+
return _regenerator.default.wrap(function (_context) {
|
|
89
89
|
while (1) switch (_context.prev = _context.next) {
|
|
90
90
|
case 0:
|
|
91
91
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
92
92
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
93
93
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
94
|
-
_context.next =
|
|
94
|
+
_context.next = 1;
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
98
|
-
case
|
|
98
|
+
case 1:
|
|
99
99
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
100
|
-
_context.next =
|
|
100
|
+
_context.next = 2;
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
103
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
104
|
-
case
|
|
105
|
-
_context.next =
|
|
104
|
+
case 2:
|
|
105
|
+
_context.next = 3;
|
|
106
106
|
return _Api.default.sendRequest('/settings_changes', 'GET', params, options);
|
|
107
|
-
case
|
|
107
|
+
case 3:
|
|
108
108
|
response = _context.sent;
|
|
109
109
|
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
110
110
|
return new _SettingsChange(obj, options);
|
|
111
111
|
})) || []);
|
|
112
|
-
case
|
|
112
|
+
case 4:
|
|
113
113
|
case "end":
|
|
114
114
|
return _context.stop();
|
|
115
115
|
}
|
|
@@ -149,31 +149,31 @@ _SftpActionLog = SftpActionLog;
|
|
|
149
149
|
options,
|
|
150
150
|
response,
|
|
151
151
|
_args = arguments;
|
|
152
|
-
return _regenerator.default.wrap(function
|
|
152
|
+
return _regenerator.default.wrap(function (_context) {
|
|
153
153
|
while (1) switch (_context.prev = _context.next) {
|
|
154
154
|
case 0:
|
|
155
155
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
156
156
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
157
157
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
158
|
-
_context.next =
|
|
158
|
+
_context.next = 1;
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
161
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
162
|
-
case
|
|
162
|
+
case 1:
|
|
163
163
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
164
|
-
_context.next =
|
|
164
|
+
_context.next = 2;
|
|
165
165
|
break;
|
|
166
166
|
}
|
|
167
167
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
168
|
-
case
|
|
169
|
-
_context.next =
|
|
168
|
+
case 2:
|
|
169
|
+
_context.next = 3;
|
|
170
170
|
return _Api.default.sendRequest('/sftp_action_logs', 'GET', params, options);
|
|
171
|
-
case
|
|
171
|
+
case 3:
|
|
172
172
|
response = _context.sent;
|
|
173
173
|
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
174
174
|
return new _SftpActionLog(obj, options);
|
|
175
175
|
})) || []);
|
|
176
|
-
case
|
|
176
|
+
case 4:
|
|
177
177
|
case "end":
|
|
178
178
|
return _context.stop();
|
|
179
179
|
}
|