files.com 1.0.245 → 1.0.246
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/RemoteServer.md +4 -1
- package/docs/models/RemoteServerConfigurationFile.md +3 -1
- package/lib/models/RemoteServer.js +14 -8
- package/lib/models/RemoteServerConfigurationFile.js +3 -0
- package/package.json +1 -1
- package/src/models/RemoteServer.js +4 -0
- package/src/models/RemoteServerConfigurationFile.js +3 -0
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.246
|
@@ -276,6 +276,7 @@ await remote_server.configuration_file({
|
|
276
276
|
'private_key': "example",
|
277
277
|
'public_key': "example",
|
278
278
|
'server_host_key': "example",
|
279
|
+
'subdomain': "example",
|
279
280
|
})
|
280
281
|
```
|
281
282
|
|
@@ -292,6 +293,7 @@ await remote_server.configuration_file({
|
|
292
293
|
* `private_key` (string): private key
|
293
294
|
* `public_key` (string): public key
|
294
295
|
* `server_host_key` (string):
|
296
|
+
* `subdomain` (string):
|
295
297
|
|
296
298
|
### Example Response
|
297
299
|
|
@@ -307,7 +309,8 @@ await remote_server.configuration_file({
|
|
307
309
|
"private_key": "example",
|
308
310
|
"status": "example",
|
309
311
|
"config_version": "example",
|
310
|
-
"server_host_key": "example"
|
312
|
+
"server_host_key": "example",
|
313
|
+
"subdomain": "example"
|
311
314
|
}
|
312
315
|
```
|
313
316
|
|
@@ -14,7 +14,8 @@
|
|
14
14
|
"private_key": "example",
|
15
15
|
"status": "example",
|
16
16
|
"config_version": "example",
|
17
|
-
"server_host_key": "example"
|
17
|
+
"server_host_key": "example",
|
18
|
+
"subdomain": "example"
|
18
19
|
}
|
19
20
|
```
|
20
21
|
|
@@ -29,3 +30,4 @@
|
|
29
30
|
* `status` (string): either running or shutdown
|
30
31
|
* `config_version` (string): agent config version
|
31
32
|
* `server_host_key` (string):
|
33
|
+
* `subdomain` (string):
|
@@ -478,26 +478,32 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
|
|
478
478
|
}
|
479
479
|
throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(server_host_key)));
|
480
480
|
case 28:
|
481
|
+
if (!(params['subdomain'] && !(0, _utils.isString)(params['subdomain']))) {
|
482
|
+
_context.next = 30;
|
483
|
+
break;
|
484
|
+
}
|
485
|
+
throw new errors.InvalidParameterError("Bad parameter: subdomain must be of type String, received ".concat((0, _utils.getType)(subdomain)));
|
486
|
+
case 30:
|
481
487
|
if (params['id']) {
|
482
|
-
_context.next =
|
488
|
+
_context.next = 36;
|
483
489
|
break;
|
484
490
|
}
|
485
491
|
if (!_this.attributes.id) {
|
486
|
-
_context.next =
|
492
|
+
_context.next = 35;
|
487
493
|
break;
|
488
494
|
}
|
489
495
|
params['id'] = _this.id;
|
490
|
-
_context.next =
|
496
|
+
_context.next = 36;
|
491
497
|
break;
|
492
|
-
case
|
498
|
+
case 35:
|
493
499
|
throw new errors.MissingParameterError('Parameter missing: id');
|
494
|
-
case 34:
|
495
|
-
_context.next = 36;
|
496
|
-
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'POST', params, _this.options);
|
497
500
|
case 36:
|
501
|
+
_context.next = 38;
|
502
|
+
return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'POST', params, _this.options);
|
503
|
+
case 38:
|
498
504
|
response = _context.sent;
|
499
505
|
return _context.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
500
|
-
case
|
506
|
+
case 40:
|
501
507
|
case "end":
|
502
508
|
return _context.stop();
|
503
509
|
}
|
@@ -62,6 +62,9 @@ var RemoteServerConfigurationFile = /*#__PURE__*/(0, _createClass2.default)(func
|
|
62
62
|
(0, _defineProperty2.default)(this, "getServerHostKey", function () {
|
63
63
|
return _this.attributes.server_host_key;
|
64
64
|
});
|
65
|
+
(0, _defineProperty2.default)(this, "getSubdomain", function () {
|
66
|
+
return _this.attributes.subdomain;
|
67
|
+
});
|
65
68
|
Object.entries(attributes).forEach(function (_ref) {
|
66
69
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
67
70
|
key = _ref2[0],
|
package/package.json
CHANGED
@@ -457,6 +457,7 @@ class RemoteServer {
|
|
457
457
|
// private_key - string - private key
|
458
458
|
// public_key - string - public key
|
459
459
|
// server_host_key - string
|
460
|
+
// subdomain - string
|
460
461
|
configurationFile = async (params = {}) => {
|
461
462
|
if (!this.attributes.id) {
|
462
463
|
throw new errors.EmptyPropertyError('Current object has no id')
|
@@ -500,6 +501,9 @@ class RemoteServer {
|
|
500
501
|
if (params['server_host_key'] && !isString(params['server_host_key'])) {
|
501
502
|
throw new errors.InvalidParameterError(`Bad parameter: server_host_key must be of type String, received ${getType(server_host_key)}`)
|
502
503
|
}
|
504
|
+
if (params['subdomain'] && !isString(params['subdomain'])) {
|
505
|
+
throw new errors.InvalidParameterError(`Bad parameter: subdomain must be of type String, received ${getType(subdomain)}`)
|
506
|
+
}
|
503
507
|
|
504
508
|
if (!params['id']) {
|
505
509
|
if (this.attributes.id) {
|