Skip to content

Commit 74cb347

Browse files
[Bot] push changes from Files.com
1 parent 10f6dd1 commit 74cb347

7 files changed

Lines changed: 36 additions & 7 deletions

File tree

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.623
1+
1.2.624

docs/models/RemoteServerCredential.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
* `linode_secret_key` (string): Linode: Secret Key
5757
* `s3_compatible_secret_key` (string): S3-compatible: Secret Key
5858
* `wasabi_secret_key` (string): Wasabi: Secret Key
59+
* `copy_values_from_credential_id` (int64): ID of Remote Server Credential to copy omitted values from.
5960

6061
---
6162

@@ -107,6 +108,7 @@ await RemoteServerCredential.create({
107108
'username': "user",
108109
'wasabi_access_key': "example",
109110
'workspace_id': 0,
111+
'copy_values_from_credential_id': 1,
110112
})
111113
```
112114

@@ -144,6 +146,7 @@ await RemoteServerCredential.create({
144146
* `s3_compatible_secret_key` (string): S3-compatible: Secret Key
145147
* `wasabi_secret_key` (string): Wasabi: Secret Key
146148
* `workspace_id` (int64): Workspace ID (0 for default workspace)
149+
* `copy_values_from_credential_id` (int64): ID of Remote Server Credential to copy omitted values from.
147150

148151
---
149152

lib/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var apiKey;
1212
var baseUrl = 'https://app.files.com';
1313
var sessionId = null;
1414
var language = null;
15-
var version = '1.2.623';
15+
var version = '1.2.624';
1616
var userAgent = "Files.com JavaScript SDK v".concat(version);
1717
var logLevel = _Logger.LogLevel.INFO;
1818
var debugRequest = false;

lib/models/RemoteServerCredential.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ var RemoteServerCredential = /*#__PURE__*/(0, _createClass2.default)(function Re
263263
(0, _defineProperty2.default)(this, "setWasabiSecretKey", function (value) {
264264
_this.attributes.wasabi_secret_key = value;
265265
});
266+
// int64 # ID of Remote Server Credential to copy omitted values from.
267+
(0, _defineProperty2.default)(this, "getCopyValuesFromCredentialId", function () {
268+
return _this.attributes.copy_values_from_credential_id;
269+
});
270+
(0, _defineProperty2.default)(this, "setCopyValuesFromCredentialId", function (value) {
271+
_this.attributes.copy_values_from_credential_id = value;
272+
});
266273
// Parameters:
267274
// name - string - Internal name for your reference
268275
// description - string - Internal description for your reference
@@ -751,6 +758,7 @@ _RemoteServerCredential = RemoteServerCredential;
751758
// s3_compatible_secret_key - string - S3-compatible: Secret Key
752759
// wasabi_secret_key - string - Wasabi: Secret Key
753760
// workspace_id - int64 - Workspace ID (0 for default workspace)
761+
// copy_values_from_credential_id - int64 - ID of Remote Server Credential to copy omitted values from.
754762
(0, _defineProperty2.default)(RemoteServerCredential, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
755763
var params,
756764
options,
@@ -947,12 +955,18 @@ _RemoteServerCredential = RemoteServerCredential;
947955
}
948956
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
949957
case 31:
950-
_context6.next = 32;
951-
return _Api.default.sendRequest('/remote_server_credentials', 'POST', params, options);
958+
if (!(params.copy_values_from_credential_id && !(0, _utils.isInt)(params.copy_values_from_credential_id))) {
959+
_context6.next = 32;
960+
break;
961+
}
962+
throw new errors.InvalidParameterError("Bad parameter: copy_values_from_credential_id must be of type Int, received ".concat((0, _utils.getType)(params.copy_values_from_credential_id)));
952963
case 32:
964+
_context6.next = 33;
965+
return _Api.default.sendRequest('/remote_server_credentials', 'POST', params, options);
966+
case 33:
953967
response = _context6.sent;
954968
return _context6.abrupt("return", new _RemoteServerCredential(response === null || response === void 0 ? void 0 : response.data, options));
955-
case 33:
969+
case 34:
956970
case "end":
957971
return _context6.stop();
958972
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "files.com",
3-
"version": "1.2.623",
3+
"version": "1.2.624",
44
"description": "Files.com SDK for JavaScript",
55
"keywords": [
66
"files.com",

src/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let apiKey
66
let baseUrl = 'https://app.files.com'
77
let sessionId = null
88
let language = null
9-
const version = '1.2.623'
9+
const version = '1.2.624'
1010
let userAgent = `Files.com JavaScript SDK v${version}`
1111

1212
let logLevel = LogLevel.INFO

src/models/RemoteServerCredential.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,13 @@ class RemoteServerCredential {
259259
this.attributes.wasabi_secret_key = value
260260
}
261261

262+
// int64 # ID of Remote Server Credential to copy omitted values from.
263+
getCopyValuesFromCredentialId = () => this.attributes.copy_values_from_credential_id
264+
265+
setCopyValuesFromCredentialId = value => {
266+
this.attributes.copy_values_from_credential_id = value
267+
}
268+
262269
// Parameters:
263270
// name - string - Internal name for your reference
264271
// description - string - Internal description for your reference
@@ -557,6 +564,7 @@ class RemoteServerCredential {
557564
// s3_compatible_secret_key - string - S3-compatible: Secret Key
558565
// wasabi_secret_key - string - Wasabi: Secret Key
559566
// workspace_id - int64 - Workspace ID (0 for default workspace)
567+
// copy_values_from_credential_id - int64 - ID of Remote Server Credential to copy omitted values from.
560568
static create = async (params = {}, options = {}) => {
561569
if (params.name && !isString(params.name)) {
562570
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
@@ -682,6 +690,10 @@ class RemoteServerCredential {
682690
throw new errors.InvalidParameterError(`Bad parameter: workspace_id must be of type Int, received ${getType(params.workspace_id)}`)
683691
}
684692

693+
if (params.copy_values_from_credential_id && !isInt(params.copy_values_from_credential_id)) {
694+
throw new errors.InvalidParameterError(`Bad parameter: copy_values_from_credential_id must be of type Int, received ${getType(params.copy_values_from_credential_id)}`)
695+
}
696+
685697
const response = await Api.sendRequest('/remote_server_credentials', 'POST', params, options)
686698

687699
return new RemoteServerCredential(response?.data, options)

0 commit comments

Comments
 (0)