files.com 1.0.474 → 1.1.1

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 (88) hide show
  1. package/_VERSION +1 -1
  2. package/lib/Files.js +1 -1
  3. package/lib/models/ActionNotificationExport.js +63 -49
  4. package/lib/models/ActionWebhookFailure.js +1 -1
  5. package/lib/models/ApiKey.js +113 -94
  6. package/lib/models/As2Partner.js +81 -62
  7. package/lib/models/As2Station.js +79 -60
  8. package/lib/models/Automation.js +90 -71
  9. package/lib/models/Behavior.js +114 -95
  10. package/lib/models/Bundle.js +90 -71
  11. package/lib/models/BundleNotification.js +75 -56
  12. package/lib/models/BundleRecipient.js +61 -47
  13. package/lib/models/Clickwrap.js +77 -58
  14. package/lib/models/ExternalEvent.js +71 -57
  15. package/lib/models/File.js +166 -154
  16. package/lib/models/FileComment.js +65 -46
  17. package/lib/models/FileCommentReaction.js +44 -30
  18. package/lib/models/Folder.js +58 -46
  19. package/lib/models/FormFieldSet.js +76 -57
  20. package/lib/models/GpgKey.js +79 -60
  21. package/lib/models/Group.js +78 -59
  22. package/lib/models/GroupUser.js +63 -44
  23. package/lib/models/HistoryExport.js +76 -62
  24. package/lib/models/InboxRecipient.js +61 -47
  25. package/lib/models/Lock.js +56 -44
  26. package/lib/models/Message.js +82 -63
  27. package/lib/models/MessageComment.js +78 -59
  28. package/lib/models/MessageCommentReaction.js +73 -59
  29. package/lib/models/MessageReaction.js +73 -59
  30. package/lib/models/Notification.js +84 -65
  31. package/lib/models/Permission.js +60 -46
  32. package/lib/models/Project.js +74 -55
  33. package/lib/models/PublicKey.js +78 -59
  34. package/lib/models/RemoteServer.js +147 -128
  35. package/lib/models/Request.js +76 -62
  36. package/lib/models/Session.js +53 -39
  37. package/lib/models/SftpHostKey.js +74 -55
  38. package/lib/models/ShareGroup.js +79 -60
  39. package/lib/models/Snapshot.js +75 -56
  40. package/lib/models/SsoStrategy.js +1 -1
  41. package/lib/models/Style.js +37 -23
  42. package/lib/models/User.js +104 -85
  43. package/lib/models/UserRequest.js +73 -59
  44. package/lib/models/WebhookTest.js +46 -32
  45. package/package.json +1 -1
  46. package/src/Files.js +1 -1
  47. package/src/models/ActionNotificationExport.js +2 -2
  48. package/src/models/ActionWebhookFailure.js +1 -1
  49. package/src/models/ApiKey.js +7 -5
  50. package/src/models/As2Partner.js +6 -4
  51. package/src/models/As2Station.js +6 -4
  52. package/src/models/Automation.js +7 -5
  53. package/src/models/Behavior.js +7 -5
  54. package/src/models/Bundle.js +7 -5
  55. package/src/models/BundleNotification.js +6 -4
  56. package/src/models/BundleRecipient.js +2 -2
  57. package/src/models/Clickwrap.js +6 -4
  58. package/src/models/ExternalEvent.js +2 -2
  59. package/src/models/File.js +3 -3
  60. package/src/models/FileComment.js +6 -4
  61. package/src/models/FileCommentReaction.js +3 -3
  62. package/src/models/Folder.js +2 -2
  63. package/src/models/FormFieldSet.js +6 -4
  64. package/src/models/GpgKey.js +6 -4
  65. package/src/models/Group.js +6 -4
  66. package/src/models/GroupUser.js +6 -4
  67. package/src/models/HistoryExport.js +2 -2
  68. package/src/models/InboxRecipient.js +2 -2
  69. package/src/models/Lock.js +3 -3
  70. package/src/models/Message.js +6 -4
  71. package/src/models/MessageComment.js +6 -4
  72. package/src/models/MessageCommentReaction.js +3 -3
  73. package/src/models/MessageReaction.js +3 -3
  74. package/src/models/Notification.js +6 -4
  75. package/src/models/Permission.js +3 -3
  76. package/src/models/Project.js +6 -4
  77. package/src/models/PublicKey.js +6 -4
  78. package/src/models/RemoteServer.js +6 -4
  79. package/src/models/Request.js +3 -3
  80. package/src/models/Session.js +3 -3
  81. package/src/models/SftpHostKey.js +6 -4
  82. package/src/models/ShareGroup.js +6 -4
  83. package/src/models/Snapshot.js +6 -4
  84. package/src/models/SsoStrategy.js +1 -1
  85. package/src/models/Style.js +6 -3
  86. package/src/models/User.js +9 -7
  87. package/src/models/UserRequest.js +3 -3
  88. package/src/models/WebhookTest.js +2 -2
@@ -1208,7 +1208,7 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
1208
1208
  return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
1209
1209
  case 16:
1210
1210
  response = _context3.sent;
1211
- return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
1211
+ return _context3.abrupt("return");
1212
1212
  case 18:
1213
1213
  case "end":
1214
1214
  return _context3.stop();
@@ -1219,19 +1219,38 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
1219
1219
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1220
1220
  return _this.delete(params);
1221
1221
  });
1222
- (0, _defineProperty2.default)(this, "save", function () {
1223
- if (_this.attributes['id']) {
1224
- return _this.update(_this.attributes);
1225
- } else {
1226
- var newObject = RemoteServer.create(_this.attributes, _this.options);
1227
- _this.attributes = _objectSpread({}, newObject.attributes);
1228
- return true;
1229
- }
1230
- });
1231
- Object.entries(attributes).forEach(function (_ref4) {
1232
- var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
1233
- key = _ref5[0],
1234
- value = _ref5[1];
1222
+ (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
1223
+ var newObject, _newObject;
1224
+ return _regenerator.default.wrap(function _callee4$(_context4) {
1225
+ while (1) switch (_context4.prev = _context4.next) {
1226
+ case 0:
1227
+ if (!_this.attributes['id']) {
1228
+ _context4.next = 8;
1229
+ break;
1230
+ }
1231
+ _context4.next = 3;
1232
+ return _this.update(_this.attributes);
1233
+ case 3:
1234
+ newObject = _context4.sent;
1235
+ _this.attributes = _objectSpread({}, newObject.attributes);
1236
+ return _context4.abrupt("return", true);
1237
+ case 8:
1238
+ _context4.next = 10;
1239
+ return RemoteServer.create(_this.attributes, _this.options);
1240
+ case 10:
1241
+ _newObject = _context4.sent;
1242
+ _this.attributes = _objectSpread({}, _newObject.attributes);
1243
+ return _context4.abrupt("return", true);
1244
+ case 13:
1245
+ case "end":
1246
+ return _context4.stop();
1247
+ }
1248
+ }, _callee4);
1249
+ })));
1250
+ Object.entries(attributes).forEach(function (_ref5) {
1251
+ var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
1252
+ key = _ref6[0],
1253
+ value = _ref6[1];
1235
1254
  var normalizedKey = key.replace('?', '');
1236
1255
  _this.attributes[normalizedKey] = value;
1237
1256
  Object.defineProperty(_this, normalizedKey, {
@@ -1245,41 +1264,41 @@ _class = RemoteServer;
1245
1264
  // Parameters:
1246
1265
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
1247
1266
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
1248
- (0, _defineProperty2.default)(RemoteServer, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
1267
+ (0, _defineProperty2.default)(RemoteServer, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
1249
1268
  var _response$data;
1250
1269
  var params,
1251
1270
  options,
1252
1271
  response,
1253
- _args4 = arguments;
1254
- return _regenerator.default.wrap(function _callee4$(_context4) {
1255
- while (1) switch (_context4.prev = _context4.next) {
1272
+ _args5 = arguments;
1273
+ return _regenerator.default.wrap(function _callee5$(_context5) {
1274
+ while (1) switch (_context5.prev = _context5.next) {
1256
1275
  case 0:
1257
- params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
1258
- options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
1276
+ params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
1277
+ options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
1259
1278
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
1260
- _context4.next = 4;
1279
+ _context5.next = 4;
1261
1280
  break;
1262
1281
  }
1263
1282
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
1264
1283
  case 4:
1265
1284
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
1266
- _context4.next = 6;
1285
+ _context5.next = 6;
1267
1286
  break;
1268
1287
  }
1269
1288
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
1270
1289
  case 6:
1271
- _context4.next = 8;
1290
+ _context5.next = 8;
1272
1291
  return _Api.default.sendRequest("/remote_servers", 'GET', params, options);
1273
1292
  case 8:
1274
- response = _context4.sent;
1275
- 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) {
1293
+ response = _context5.sent;
1294
+ return _context5.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
1276
1295
  return new _class(obj, options);
1277
1296
  })) || []);
1278
1297
  case 10:
1279
1298
  case "end":
1280
- return _context4.stop();
1299
+ return _context5.stop();
1281
1300
  }
1282
- }, _callee4);
1301
+ }, _callee5);
1283
1302
  })));
1284
1303
  (0, _defineProperty2.default)(RemoteServer, "all", function () {
1285
1304
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -1289,48 +1308,48 @@ _class = RemoteServer;
1289
1308
  // Parameters:
1290
1309
  // id (required) - int64 - Remote Server ID.
1291
1310
  (0, _defineProperty2.default)(RemoteServer, "find", /*#__PURE__*/function () {
1292
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
1311
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(id) {
1293
1312
  var params,
1294
1313
  options,
1295
1314
  response,
1296
- _args5 = arguments;
1297
- return _regenerator.default.wrap(function _callee5$(_context5) {
1298
- while (1) switch (_context5.prev = _context5.next) {
1315
+ _args6 = arguments;
1316
+ return _regenerator.default.wrap(function _callee6$(_context6) {
1317
+ while (1) switch (_context6.prev = _context6.next) {
1299
1318
  case 0:
1300
- params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
1301
- options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
1319
+ params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
1320
+ options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
1302
1321
  if ((0, _utils.isObject)(params)) {
1303
- _context5.next = 4;
1322
+ _context6.next = 4;
1304
1323
  break;
1305
1324
  }
1306
1325
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
1307
1326
  case 4:
1308
1327
  params['id'] = id;
1309
1328
  if (params['id']) {
1310
- _context5.next = 7;
1329
+ _context6.next = 7;
1311
1330
  break;
1312
1331
  }
1313
1332
  throw new errors.MissingParameterError('Parameter missing: id');
1314
1333
  case 7:
1315
1334
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
1316
- _context5.next = 9;
1335
+ _context6.next = 9;
1317
1336
  break;
1318
1337
  }
1319
1338
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
1320
1339
  case 9:
1321
- _context5.next = 11;
1340
+ _context6.next = 11;
1322
1341
  return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
1323
1342
  case 11:
1324
- response = _context5.sent;
1325
- return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
1343
+ response = _context6.sent;
1344
+ return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
1326
1345
  case 13:
1327
1346
  case "end":
1328
- return _context5.stop();
1347
+ return _context6.stop();
1329
1348
  }
1330
- }, _callee5);
1349
+ }, _callee6);
1331
1350
  }));
1332
1351
  return function (_x) {
1333
- return _ref7.apply(this, arguments);
1352
+ return _ref8.apply(this, arguments);
1334
1353
  };
1335
1354
  }());
1336
1355
  (0, _defineProperty2.default)(RemoteServer, "get", function (id) {
@@ -1341,50 +1360,50 @@ _class = RemoteServer;
1341
1360
  // Parameters:
1342
1361
  // id (required) - int64 - Remote Server ID.
1343
1362
  (0, _defineProperty2.default)(RemoteServer, "findConfigurationFile", /*#__PURE__*/function () {
1344
- var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(id) {
1363
+ var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(id) {
1345
1364
  var params,
1346
1365
  options,
1347
1366
  response,
1348
1367
  RemoteServerConfigurationFile,
1349
- _args6 = arguments;
1350
- return _regenerator.default.wrap(function _callee6$(_context6) {
1351
- while (1) switch (_context6.prev = _context6.next) {
1368
+ _args7 = arguments;
1369
+ return _regenerator.default.wrap(function _callee7$(_context7) {
1370
+ while (1) switch (_context7.prev = _context7.next) {
1352
1371
  case 0:
1353
- params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
1354
- options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
1372
+ params = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
1373
+ options = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : {};
1355
1374
  if ((0, _utils.isObject)(params)) {
1356
- _context6.next = 4;
1375
+ _context7.next = 4;
1357
1376
  break;
1358
1377
  }
1359
1378
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
1360
1379
  case 4:
1361
1380
  params['id'] = id;
1362
1381
  if (params['id']) {
1363
- _context6.next = 7;
1382
+ _context7.next = 7;
1364
1383
  break;
1365
1384
  }
1366
1385
  throw new errors.MissingParameterError('Parameter missing: id');
1367
1386
  case 7:
1368
1387
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
1369
- _context6.next = 9;
1388
+ _context7.next = 9;
1370
1389
  break;
1371
1390
  }
1372
1391
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
1373
1392
  case 9:
1374
- _context6.next = 11;
1393
+ _context7.next = 11;
1375
1394
  return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'GET', params, options);
1376
1395
  case 11:
1377
- response = _context6.sent;
1396
+ response = _context7.sent;
1378
1397
  RemoteServerConfigurationFile = require("./RemoteServerConfigurationFile.js").default;
1379
- return _context6.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, options));
1398
+ return _context7.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, options));
1380
1399
  case 14:
1381
1400
  case "end":
1382
- return _context6.stop();
1401
+ return _context7.stop();
1383
1402
  }
1384
- }, _callee6);
1403
+ }, _callee7);
1385
1404
  }));
1386
1405
  return function (_x2) {
1387
- return _ref8.apply(this, arguments);
1406
+ return _ref9.apply(this, arguments);
1388
1407
  };
1389
1408
  }());
1390
1409
  // Parameters:
@@ -1453,386 +1472,386 @@ _class = RemoteServer;
1453
1472
  // linode_secret_key - string - Linode secret key
1454
1473
  // linode_bucket - string - Linode Bucket name
1455
1474
  // linode_region - string - Linode region
1456
- (0, _defineProperty2.default)(RemoteServer, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
1475
+ (0, _defineProperty2.default)(RemoteServer, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
1457
1476
  var params,
1458
1477
  options,
1459
1478
  response,
1460
- _args7 = arguments;
1461
- return _regenerator.default.wrap(function _callee7$(_context7) {
1462
- while (1) switch (_context7.prev = _context7.next) {
1479
+ _args8 = arguments;
1480
+ return _regenerator.default.wrap(function _callee8$(_context8) {
1481
+ while (1) switch (_context8.prev = _context8.next) {
1463
1482
  case 0:
1464
- params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
1465
- options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
1483
+ params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
1484
+ options = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
1466
1485
  if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
1467
- _context7.next = 4;
1486
+ _context8.next = 4;
1468
1487
  break;
1469
1488
  }
1470
1489
  throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(params['aws_access_key'])));
1471
1490
  case 4:
1472
1491
  if (!(params['aws_secret_key'] && !(0, _utils.isString)(params['aws_secret_key']))) {
1473
- _context7.next = 6;
1492
+ _context8.next = 6;
1474
1493
  break;
1475
1494
  }
1476
1495
  throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(params['aws_secret_key'])));
1477
1496
  case 6:
1478
1497
  if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
1479
- _context7.next = 8;
1498
+ _context8.next = 8;
1480
1499
  break;
1481
1500
  }
1482
1501
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
1483
1502
  case 8:
1484
1503
  if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
1485
- _context7.next = 10;
1504
+ _context8.next = 10;
1486
1505
  break;
1487
1506
  }
1488
1507
  throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
1489
1508
  case 10:
1490
1509
  if (!(params['private_key_passphrase'] && !(0, _utils.isString)(params['private_key_passphrase']))) {
1491
- _context7.next = 12;
1510
+ _context8.next = 12;
1492
1511
  break;
1493
1512
  }
1494
1513
  throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(params['private_key_passphrase'])));
1495
1514
  case 12:
1496
1515
  if (!(params['ssl_certificate'] && !(0, _utils.isString)(params['ssl_certificate']))) {
1497
- _context7.next = 14;
1516
+ _context8.next = 14;
1498
1517
  break;
1499
1518
  }
1500
1519
  throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(params['ssl_certificate'])));
1501
1520
  case 14:
1502
1521
  if (!(params['google_cloud_storage_credentials_json'] && !(0, _utils.isString)(params['google_cloud_storage_credentials_json']))) {
1503
- _context7.next = 16;
1522
+ _context8.next = 16;
1504
1523
  break;
1505
1524
  }
1506
1525
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_credentials_json'])));
1507
1526
  case 16:
1508
1527
  if (!(params['wasabi_access_key'] && !(0, _utils.isString)(params['wasabi_access_key']))) {
1509
- _context7.next = 18;
1528
+ _context8.next = 18;
1510
1529
  break;
1511
1530
  }
1512
1531
  throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params['wasabi_access_key'])));
1513
1532
  case 18:
1514
1533
  if (!(params['wasabi_secret_key'] && !(0, _utils.isString)(params['wasabi_secret_key']))) {
1515
- _context7.next = 20;
1534
+ _context8.next = 20;
1516
1535
  break;
1517
1536
  }
1518
1537
  throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(params['wasabi_secret_key'])));
1519
1538
  case 20:
1520
1539
  if (!(params['backblaze_b2_key_id'] && !(0, _utils.isString)(params['backblaze_b2_key_id']))) {
1521
- _context7.next = 22;
1540
+ _context8.next = 22;
1522
1541
  break;
1523
1542
  }
1524
1543
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_key_id'])));
1525
1544
  case 22:
1526
1545
  if (!(params['backblaze_b2_application_key'] && !(0, _utils.isString)(params['backblaze_b2_application_key']))) {
1527
- _context7.next = 24;
1546
+ _context8.next = 24;
1528
1547
  break;
1529
1548
  }
1530
1549
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_application_key'])));
1531
1550
  case 24:
1532
1551
  if (!(params['rackspace_api_key'] && !(0, _utils.isString)(params['rackspace_api_key']))) {
1533
- _context7.next = 26;
1552
+ _context8.next = 26;
1534
1553
  break;
1535
1554
  }
1536
1555
  throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(params['rackspace_api_key'])));
1537
1556
  case 26:
1538
1557
  if (!(params['azure_blob_storage_access_key'] && !(0, _utils.isString)(params['azure_blob_storage_access_key']))) {
1539
- _context7.next = 28;
1558
+ _context8.next = 28;
1540
1559
  break;
1541
1560
  }
1542
1561
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_access_key'])));
1543
1562
  case 28:
1544
1563
  if (!(params['azure_files_storage_access_key'] && !(0, _utils.isString)(params['azure_files_storage_access_key']))) {
1545
- _context7.next = 30;
1564
+ _context8.next = 30;
1546
1565
  break;
1547
1566
  }
1548
1567
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_access_key'])));
1549
1568
  case 30:
1550
1569
  if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
1551
- _context7.next = 32;
1570
+ _context8.next = 32;
1552
1571
  break;
1553
1572
  }
1554
1573
  throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(params['hostname'])));
1555
1574
  case 32:
1556
1575
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
1557
- _context7.next = 34;
1576
+ _context8.next = 34;
1558
1577
  break;
1559
1578
  }
1560
1579
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
1561
1580
  case 34:
1562
1581
  if (!(params['max_connections'] && !(0, _utils.isInt)(params['max_connections']))) {
1563
- _context7.next = 36;
1582
+ _context8.next = 36;
1564
1583
  break;
1565
1584
  }
1566
1585
  throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(params['max_connections'])));
1567
1586
  case 36:
1568
1587
  if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
1569
- _context7.next = 38;
1588
+ _context8.next = 38;
1570
1589
  break;
1571
1590
  }
1572
1591
  throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(params['port'])));
1573
1592
  case 38:
1574
1593
  if (!(params['s3_bucket'] && !(0, _utils.isString)(params['s3_bucket']))) {
1575
- _context7.next = 40;
1594
+ _context8.next = 40;
1576
1595
  break;
1577
1596
  }
1578
1597
  throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params['s3_bucket'])));
1579
1598
  case 40:
1580
1599
  if (!(params['s3_region'] && !(0, _utils.isString)(params['s3_region']))) {
1581
- _context7.next = 42;
1600
+ _context8.next = 42;
1582
1601
  break;
1583
1602
  }
1584
1603
  throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params['s3_region'])));
1585
1604
  case 42:
1586
1605
  if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
1587
- _context7.next = 44;
1606
+ _context8.next = 44;
1588
1607
  break;
1589
1608
  }
1590
1609
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params['server_certificate'])));
1591
1610
  case 44:
1592
1611
  if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
1593
- _context7.next = 46;
1612
+ _context8.next = 46;
1594
1613
  break;
1595
1614
  }
1596
1615
  throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params['server_host_key'])));
1597
1616
  case 46:
1598
1617
  if (!(params['server_type'] && !(0, _utils.isString)(params['server_type']))) {
1599
- _context7.next = 48;
1618
+ _context8.next = 48;
1600
1619
  break;
1601
1620
  }
1602
1621
  throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params['server_type'])));
1603
1622
  case 48:
1604
1623
  if (!(params['ssl'] && !(0, _utils.isString)(params['ssl']))) {
1605
- _context7.next = 50;
1624
+ _context8.next = 50;
1606
1625
  break;
1607
1626
  }
1608
1627
  throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params['ssl'])));
1609
1628
  case 50:
1610
1629
  if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
1611
- _context7.next = 52;
1630
+ _context8.next = 52;
1612
1631
  break;
1613
1632
  }
1614
1633
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
1615
1634
  case 52:
1616
1635
  if (!(params['google_cloud_storage_bucket'] && !(0, _utils.isString)(params['google_cloud_storage_bucket']))) {
1617
- _context7.next = 54;
1636
+ _context8.next = 54;
1618
1637
  break;
1619
1638
  }
1620
1639
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_bucket'])));
1621
1640
  case 54:
1622
1641
  if (!(params['google_cloud_storage_project_id'] && !(0, _utils.isString)(params['google_cloud_storage_project_id']))) {
1623
- _context7.next = 56;
1642
+ _context8.next = 56;
1624
1643
  break;
1625
1644
  }
1626
1645
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_project_id'])));
1627
1646
  case 56:
1628
1647
  if (!(params['backblaze_b2_bucket'] && !(0, _utils.isString)(params['backblaze_b2_bucket']))) {
1629
- _context7.next = 58;
1648
+ _context8.next = 58;
1630
1649
  break;
1631
1650
  }
1632
1651
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_bucket'])));
1633
1652
  case 58:
1634
1653
  if (!(params['backblaze_b2_s3_endpoint'] && !(0, _utils.isString)(params['backblaze_b2_s3_endpoint']))) {
1635
- _context7.next = 60;
1654
+ _context8.next = 60;
1636
1655
  break;
1637
1656
  }
1638
1657
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_s3_endpoint'])));
1639
1658
  case 60:
1640
1659
  if (!(params['wasabi_bucket'] && !(0, _utils.isString)(params['wasabi_bucket']))) {
1641
- _context7.next = 62;
1660
+ _context8.next = 62;
1642
1661
  break;
1643
1662
  }
1644
1663
  throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params['wasabi_bucket'])));
1645
1664
  case 62:
1646
1665
  if (!(params['wasabi_region'] && !(0, _utils.isString)(params['wasabi_region']))) {
1647
- _context7.next = 64;
1666
+ _context8.next = 64;
1648
1667
  break;
1649
1668
  }
1650
1669
  throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params['wasabi_region'])));
1651
1670
  case 64:
1652
1671
  if (!(params['rackspace_username'] && !(0, _utils.isString)(params['rackspace_username']))) {
1653
- _context7.next = 66;
1672
+ _context8.next = 66;
1654
1673
  break;
1655
1674
  }
1656
1675
  throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(params['rackspace_username'])));
1657
1676
  case 66:
1658
1677
  if (!(params['rackspace_region'] && !(0, _utils.isString)(params['rackspace_region']))) {
1659
- _context7.next = 68;
1678
+ _context8.next = 68;
1660
1679
  break;
1661
1680
  }
1662
1681
  throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(params['rackspace_region'])));
1663
1682
  case 68:
1664
1683
  if (!(params['rackspace_container'] && !(0, _utils.isString)(params['rackspace_container']))) {
1665
- _context7.next = 70;
1684
+ _context8.next = 70;
1666
1685
  break;
1667
1686
  }
1668
1687
  throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(params['rackspace_container'])));
1669
1688
  case 70:
1670
1689
  if (!(params['one_drive_account_type'] && !(0, _utils.isString)(params['one_drive_account_type']))) {
1671
- _context7.next = 72;
1690
+ _context8.next = 72;
1672
1691
  break;
1673
1692
  }
1674
1693
  throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(params['one_drive_account_type'])));
1675
1694
  case 72:
1676
1695
  if (!(params['azure_blob_storage_account'] && !(0, _utils.isString)(params['azure_blob_storage_account']))) {
1677
- _context7.next = 74;
1696
+ _context8.next = 74;
1678
1697
  break;
1679
1698
  }
1680
1699
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_account'])));
1681
1700
  case 74:
1682
1701
  if (!(params['azure_blob_storage_container'] && !(0, _utils.isString)(params['azure_blob_storage_container']))) {
1683
- _context7.next = 76;
1702
+ _context8.next = 76;
1684
1703
  break;
1685
1704
  }
1686
1705
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_container'])));
1687
1706
  case 76:
1688
1707
  if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
1689
- _context7.next = 78;
1708
+ _context8.next = 78;
1690
1709
  break;
1691
1710
  }
1692
1711
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_sas_token'])));
1693
1712
  case 78:
1694
1713
  if (!(params['azure_files_storage_account'] && !(0, _utils.isString)(params['azure_files_storage_account']))) {
1695
- _context7.next = 80;
1714
+ _context8.next = 80;
1696
1715
  break;
1697
1716
  }
1698
1717
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_account'])));
1699
1718
  case 80:
1700
1719
  if (!(params['azure_files_storage_share_name'] && !(0, _utils.isString)(params['azure_files_storage_share_name']))) {
1701
- _context7.next = 82;
1720
+ _context8.next = 82;
1702
1721
  break;
1703
1722
  }
1704
1723
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_share_name'])));
1705
1724
  case 82:
1706
1725
  if (!(params['azure_files_storage_sas_token'] && !(0, _utils.isString)(params['azure_files_storage_sas_token']))) {
1707
- _context7.next = 84;
1726
+ _context8.next = 84;
1708
1727
  break;
1709
1728
  }
1710
1729
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_sas_token'])));
1711
1730
  case 84:
1712
1731
  if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
1713
- _context7.next = 86;
1732
+ _context8.next = 86;
1714
1733
  break;
1715
1734
  }
1716
1735
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_bucket'])));
1717
1736
  case 86:
1718
1737
  if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
1719
- _context7.next = 88;
1738
+ _context8.next = 88;
1720
1739
  break;
1721
1740
  }
1722
1741
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_endpoint'])));
1723
1742
  case 88:
1724
1743
  if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
1725
- _context7.next = 90;
1744
+ _context8.next = 90;
1726
1745
  break;
1727
1746
  }
1728
1747
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_region'])));
1729
1748
  case 90:
1730
1749
  if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
1731
- _context7.next = 92;
1750
+ _context8.next = 92;
1732
1751
  break;
1733
1752
  }
1734
1753
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_access_key'])));
1735
1754
  case 92:
1736
1755
  if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
1737
- _context7.next = 94;
1756
+ _context8.next = 94;
1738
1757
  break;
1739
1758
  }
1740
1759
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_secret_key'])));
1741
1760
  case 94:
1742
1761
  if (!(params['files_agent_root'] && !(0, _utils.isString)(params['files_agent_root']))) {
1743
- _context7.next = 96;
1762
+ _context8.next = 96;
1744
1763
  break;
1745
1764
  }
1746
1765
  throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params['files_agent_root'])));
1747
1766
  case 96:
1748
1767
  if (!(params['files_agent_permission_set'] && !(0, _utils.isString)(params['files_agent_permission_set']))) {
1749
- _context7.next = 98;
1768
+ _context8.next = 98;
1750
1769
  break;
1751
1770
  }
1752
1771
  throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params['files_agent_permission_set'])));
1753
1772
  case 98:
1754
1773
  if (!(params['files_agent_version'] && !(0, _utils.isString)(params['files_agent_version']))) {
1755
- _context7.next = 100;
1774
+ _context8.next = 100;
1756
1775
  break;
1757
1776
  }
1758
1777
  throw new errors.InvalidParameterError("Bad parameter: files_agent_version must be of type String, received ".concat((0, _utils.getType)(params['files_agent_version'])));
1759
1778
  case 100:
1760
1779
  if (!(params['filebase_access_key'] && !(0, _utils.isString)(params['filebase_access_key']))) {
1761
- _context7.next = 102;
1780
+ _context8.next = 102;
1762
1781
  break;
1763
1782
  }
1764
1783
  throw new errors.InvalidParameterError("Bad parameter: filebase_access_key must be of type String, received ".concat((0, _utils.getType)(params['filebase_access_key'])));
1765
1784
  case 102:
1766
1785
  if (!(params['filebase_secret_key'] && !(0, _utils.isString)(params['filebase_secret_key']))) {
1767
- _context7.next = 104;
1786
+ _context8.next = 104;
1768
1787
  break;
1769
1788
  }
1770
1789
  throw new errors.InvalidParameterError("Bad parameter: filebase_secret_key must be of type String, received ".concat((0, _utils.getType)(params['filebase_secret_key'])));
1771
1790
  case 104:
1772
1791
  if (!(params['filebase_bucket'] && !(0, _utils.isString)(params['filebase_bucket']))) {
1773
- _context7.next = 106;
1792
+ _context8.next = 106;
1774
1793
  break;
1775
1794
  }
1776
1795
  throw new errors.InvalidParameterError("Bad parameter: filebase_bucket must be of type String, received ".concat((0, _utils.getType)(params['filebase_bucket'])));
1777
1796
  case 106:
1778
1797
  if (!(params['cloudflare_access_key'] && !(0, _utils.isString)(params['cloudflare_access_key']))) {
1779
- _context7.next = 108;
1798
+ _context8.next = 108;
1780
1799
  break;
1781
1800
  }
1782
1801
  throw new errors.InvalidParameterError("Bad parameter: cloudflare_access_key must be of type String, received ".concat((0, _utils.getType)(params['cloudflare_access_key'])));
1783
1802
  case 108:
1784
1803
  if (!(params['cloudflare_secret_key'] && !(0, _utils.isString)(params['cloudflare_secret_key']))) {
1785
- _context7.next = 110;
1804
+ _context8.next = 110;
1786
1805
  break;
1787
1806
  }
1788
1807
  throw new errors.InvalidParameterError("Bad parameter: cloudflare_secret_key must be of type String, received ".concat((0, _utils.getType)(params['cloudflare_secret_key'])));
1789
1808
  case 110:
1790
1809
  if (!(params['cloudflare_bucket'] && !(0, _utils.isString)(params['cloudflare_bucket']))) {
1791
- _context7.next = 112;
1810
+ _context8.next = 112;
1792
1811
  break;
1793
1812
  }
1794
1813
  throw new errors.InvalidParameterError("Bad parameter: cloudflare_bucket must be of type String, received ".concat((0, _utils.getType)(params['cloudflare_bucket'])));
1795
1814
  case 112:
1796
1815
  if (!(params['cloudflare_endpoint'] && !(0, _utils.isString)(params['cloudflare_endpoint']))) {
1797
- _context7.next = 114;
1816
+ _context8.next = 114;
1798
1817
  break;
1799
1818
  }
1800
1819
  throw new errors.InvalidParameterError("Bad parameter: cloudflare_endpoint must be of type String, received ".concat((0, _utils.getType)(params['cloudflare_endpoint'])));
1801
1820
  case 114:
1802
1821
  if (!(params['linode_access_key'] && !(0, _utils.isString)(params['linode_access_key']))) {
1803
- _context7.next = 116;
1822
+ _context8.next = 116;
1804
1823
  break;
1805
1824
  }
1806
1825
  throw new errors.InvalidParameterError("Bad parameter: linode_access_key must be of type String, received ".concat((0, _utils.getType)(params['linode_access_key'])));
1807
1826
  case 116:
1808
1827
  if (!(params['linode_secret_key'] && !(0, _utils.isString)(params['linode_secret_key']))) {
1809
- _context7.next = 118;
1828
+ _context8.next = 118;
1810
1829
  break;
1811
1830
  }
1812
1831
  throw new errors.InvalidParameterError("Bad parameter: linode_secret_key must be of type String, received ".concat((0, _utils.getType)(params['linode_secret_key'])));
1813
1832
  case 118:
1814
1833
  if (!(params['linode_bucket'] && !(0, _utils.isString)(params['linode_bucket']))) {
1815
- _context7.next = 120;
1834
+ _context8.next = 120;
1816
1835
  break;
1817
1836
  }
1818
1837
  throw new errors.InvalidParameterError("Bad parameter: linode_bucket must be of type String, received ".concat((0, _utils.getType)(params['linode_bucket'])));
1819
1838
  case 120:
1820
1839
  if (!(params['linode_region'] && !(0, _utils.isString)(params['linode_region']))) {
1821
- _context7.next = 122;
1840
+ _context8.next = 122;
1822
1841
  break;
1823
1842
  }
1824
1843
  throw new errors.InvalidParameterError("Bad parameter: linode_region must be of type String, received ".concat((0, _utils.getType)(params['linode_region'])));
1825
1844
  case 122:
1826
- _context7.next = 124;
1845
+ _context8.next = 124;
1827
1846
  return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
1828
1847
  case 124:
1829
- response = _context7.sent;
1830
- return _context7.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
1848
+ response = _context8.sent;
1849
+ return _context8.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
1831
1850
  case 126:
1832
1851
  case "end":
1833
- return _context7.stop();
1852
+ return _context8.stop();
1834
1853
  }
1835
- }, _callee7);
1854
+ }, _callee8);
1836
1855
  })));
1837
1856
  var _default = exports.default = RemoteServer;
1838
1857
  module.exports = RemoteServer;