files.com 1.0.162 → 1.0.163

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.162
1
+ 1.0.163
@@ -245,6 +245,12 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
245
245
  (0, _defineProperty2.default)(this, "setS3CompatibleEndpoint", function (value) {
246
246
  _this.attributes.s3_compatible_endpoint = value;
247
247
  });
248
+ (0, _defineProperty2.default)(this, "getS3CompatibleRegion", function () {
249
+ return _this.attributes.s3_compatible_region;
250
+ });
251
+ (0, _defineProperty2.default)(this, "setS3CompatibleRegion", function (value) {
252
+ _this.attributes.s3_compatible_region = value;
253
+ });
248
254
  (0, _defineProperty2.default)(this, "getS3CompatibleAccessKey", function () {
249
255
  return _this.attributes.s3_compatible_access_key;
250
256
  });
@@ -660,43 +666,51 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
660
666
  throw new Error("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
661
667
 
662
668
  case 82:
663
- if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
669
+ if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
664
670
  _context.next = 84;
665
671
  break;
666
672
  }
667
673
 
668
- throw new Error("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
674
+ throw new Error("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
669
675
 
670
676
  case 84:
671
- if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
677
+ if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
672
678
  _context.next = 86;
673
679
  break;
674
680
  }
675
681
 
676
- throw new Error("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
682
+ throw new Error("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
677
683
 
678
684
  case 86:
685
+ if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
686
+ _context.next = 88;
687
+ break;
688
+ }
689
+
690
+ throw new Error("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
691
+
692
+ case 88:
679
693
  if (params['id']) {
680
- _context.next = 92;
694
+ _context.next = 94;
681
695
  break;
682
696
  }
683
697
 
684
698
  if (!_this.attributes.id) {
685
- _context.next = 91;
699
+ _context.next = 93;
686
700
  break;
687
701
  }
688
702
 
689
703
  params['id'] = _this.id;
690
- _context.next = 92;
704
+ _context.next = 94;
691
705
  break;
692
706
 
693
- case 91:
707
+ case 93:
694
708
  throw new Error('Parameter missing: id');
695
709
 
696
- case 92:
710
+ case 94:
697
711
  return _context.abrupt("return", _Api.default.sendRequest("/remote_servers/".concat(params['id']), 'PATCH', params, _this.options));
698
712
 
699
- case 93:
713
+ case 95:
700
714
  case "end":
701
715
  return _context.stop();
702
716
  }
@@ -1214,30 +1228,38 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
1214
1228
  throw new Error("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
1215
1229
 
1216
1230
  case 76:
1217
- if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
1231
+ if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
1218
1232
  _context5.next = 78;
1219
1233
  break;
1220
1234
  }
1221
1235
 
1222
- throw new Error("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
1236
+ throw new Error("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
1223
1237
 
1224
1238
  case 78:
1225
- if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
1239
+ if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
1226
1240
  _context5.next = 80;
1227
1241
  break;
1228
1242
  }
1229
1243
 
1230
- throw new Error("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
1244
+ throw new Error("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
1231
1245
 
1232
1246
  case 80:
1233
- _context5.next = 82;
1234
- return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
1247
+ if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
1248
+ _context5.next = 82;
1249
+ break;
1250
+ }
1251
+
1252
+ throw new Error("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
1235
1253
 
1236
1254
  case 82:
1255
+ _context5.next = 84;
1256
+ return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
1257
+
1258
+ case 84:
1237
1259
  response = _context5.sent;
1238
1260
  return _context5.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
1239
1261
 
1240
- case 84:
1262
+ case 86:
1241
1263
  case "end":
1242
1264
  return _context5.stop();
1243
1265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.162",
3
+ "version": "1.0.163",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -260,6 +260,13 @@ class RemoteServer {
260
260
  this.attributes.s3_compatible_endpoint = value
261
261
  }
262
262
 
263
+ // string # S3-compatible endpoint
264
+ getS3CompatibleRegion = () => this.attributes.s3_compatible_region
265
+
266
+ setS3CompatibleRegion = value => {
267
+ this.attributes.s3_compatible_region = value
268
+ }
269
+
263
270
  // string # S3-compatible Access Key.
264
271
  getS3CompatibleAccessKey = () => this.attributes.s3_compatible_access_key
265
272
 
@@ -398,6 +405,7 @@ class RemoteServer {
398
405
  // azure_blob_storage_container - string - Azure Blob Storage Container name
399
406
  // s3_compatible_bucket - string - S3-compatible Bucket name
400
407
  // s3_compatible_endpoint - string - S3-compatible endpoint
408
+ // s3_compatible_region - string - S3-compatible endpoint
401
409
  // enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
402
410
  // s3_compatible_access_key - string - S3-compatible Access Key.
403
411
  // s3_compatible_secret_key - string - S3-compatible secret key
@@ -525,6 +533,9 @@ class RemoteServer {
525
533
  if (params['s3_compatible_endpoint'] && !isString(params['s3_compatible_endpoint'])) {
526
534
  throw new Error(`Bad parameter: s3_compatible_endpoint must be of type String, received ${getType(s3_compatible_endpoint)}`)
527
535
  }
536
+ if (params['s3_compatible_region'] && !isString(params['s3_compatible_region'])) {
537
+ throw new Error(`Bad parameter: s3_compatible_region must be of type String, received ${getType(s3_compatible_region)}`)
538
+ }
528
539
  if (params['s3_compatible_access_key'] && !isString(params['s3_compatible_access_key'])) {
529
540
  throw new Error(`Bad parameter: s3_compatible_access_key must be of type String, received ${getType(s3_compatible_access_key)}`)
530
541
  }
@@ -665,6 +676,7 @@ class RemoteServer {
665
676
  // azure_blob_storage_container - string - Azure Blob Storage Container name
666
677
  // s3_compatible_bucket - string - S3-compatible Bucket name
667
678
  // s3_compatible_endpoint - string - S3-compatible endpoint
679
+ // s3_compatible_region - string - S3-compatible endpoint
668
680
  // enable_dedicated_ips - boolean - `true` if remote server only accepts connections from dedicated IPs
669
681
  // s3_compatible_access_key - string - S3-compatible Access Key.
670
682
  // s3_compatible_secret_key - string - S3-compatible secret key
@@ -817,6 +829,10 @@ class RemoteServer {
817
829
  throw new Error(`Bad parameter: s3_compatible_endpoint must be of type String, received ${getType(s3_compatible_endpoint)}`)
818
830
  }
819
831
 
832
+ if (params['s3_compatible_region'] && !isString(params['s3_compatible_region'])) {
833
+ throw new Error(`Bad parameter: s3_compatible_region must be of type String, received ${getType(s3_compatible_region)}`)
834
+ }
835
+
820
836
  if (params['s3_compatible_access_key'] && !isString(params['s3_compatible_access_key'])) {
821
837
  throw new Error(`Bad parameter: s3_compatible_access_key must be of type String, received ${getType(s3_compatible_access_key)}`)
822
838
  }