files.com 1.0.230 → 1.0.231

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.230
1
+ 1.0.231
@@ -275,6 +275,7 @@ await remote_server.configuration_file({
275
275
  'config_version': "example",
276
276
  'private_key': "example",
277
277
  'public_key': "example",
278
+ 'server_host_key': "example",
278
279
  })
279
280
  ```
280
281
 
@@ -290,6 +291,7 @@ await remote_server.configuration_file({
290
291
  * `config_version` (string): agent config version
291
292
  * `private_key` (string): private key
292
293
  * `public_key` (string): public key
294
+ * `server_host_key` (string):
293
295
 
294
296
  ### Example Response
295
297
 
@@ -304,7 +306,8 @@ await remote_server.configuration_file({
304
306
  "public_key": "example",
305
307
  "private_key": "example",
306
308
  "status": "example",
307
- "config_version": "example"
309
+ "config_version": "example",
310
+ "server_host_key": "example"
308
311
  }
309
312
  ```
310
313
 
@@ -13,7 +13,8 @@
13
13
  "public_key": "example",
14
14
  "private_key": "example",
15
15
  "status": "example",
16
- "config_version": "example"
16
+ "config_version": "example",
17
+ "server_host_key": "example"
17
18
  }
18
19
  ```
19
20
 
@@ -27,3 +28,4 @@
27
28
  * `private_key` (string): private key
28
29
  * `status` (string): either running or shutdown
29
30
  * `config_version` (string): agent config version
31
+ * `server_host_key` (string):
@@ -473,26 +473,32 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
473
473
  }
474
474
  throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(public_key)));
475
475
  case 26:
476
+ if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
477
+ _context.next = 28;
478
+ break;
479
+ }
480
+ throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(server_host_key)));
481
+ case 28:
476
482
  if (params['id']) {
477
- _context.next = 32;
483
+ _context.next = 34;
478
484
  break;
479
485
  }
480
486
  if (!_this.attributes.id) {
481
- _context.next = 31;
487
+ _context.next = 33;
482
488
  break;
483
489
  }
484
490
  params['id'] = _this.id;
485
- _context.next = 32;
491
+ _context.next = 34;
486
492
  break;
487
- case 31:
493
+ case 33:
488
494
  throw new errors.MissingParameterError('Parameter missing: id');
489
- case 32:
490
- _context.next = 34;
491
- return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'POST', params, _this.options);
492
495
  case 34:
496
+ _context.next = 36;
497
+ return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'POST', params, _this.options);
498
+ case 36:
493
499
  response = _context.sent;
494
500
  return _context.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, _this.options));
495
- case 36:
501
+ case 38:
496
502
  case "end":
497
503
  return _context.stop();
498
504
  }
@@ -59,6 +59,9 @@ var RemoteServerConfigurationFile = /*#__PURE__*/(0, _createClass2.default)(func
59
59
  (0, _defineProperty2.default)(this, "getConfigVersion", function () {
60
60
  return _this.attributes.config_version;
61
61
  });
62
+ (0, _defineProperty2.default)(this, "getServerHostKey", function () {
63
+ return _this.attributes.server_host_key;
64
+ });
62
65
  Object.entries(attributes).forEach(function (_ref) {
63
66
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
64
67
  key = _ref2[0],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.230",
3
+ "version": "1.0.231",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -456,6 +456,7 @@ class RemoteServer {
456
456
  // config_version - string - agent config version
457
457
  // private_key - string - private key
458
458
  // public_key - string - public key
459
+ // server_host_key - string
459
460
  configurationFile = async (params = {}) => {
460
461
  if (!this.attributes.id) {
461
462
  throw new errors.EmptyPropertyError('Current object has no id')
@@ -496,6 +497,9 @@ class RemoteServer {
496
497
  if (params['public_key'] && !isString(params['public_key'])) {
497
498
  throw new errors.InvalidParameterError(`Bad parameter: public_key must be of type String, received ${getType(public_key)}`)
498
499
  }
500
+ if (params['server_host_key'] && !isString(params['server_host_key'])) {
501
+ throw new errors.InvalidParameterError(`Bad parameter: server_host_key must be of type String, received ${getType(server_host_key)}`)
502
+ }
499
503
 
500
504
  if (!params['id']) {
501
505
  if (this.attributes.id) {
@@ -53,6 +53,9 @@ class RemoteServerConfigurationFile {
53
53
  // string # agent config version
54
54
  getConfigVersion = () => this.attributes.config_version
55
55
 
56
+ // string
57
+ getServerHostKey = () => this.attributes.server_host_key
58
+
56
59
  }
57
60
 
58
61
  export default RemoteServerConfigurationFile