Skip to content

Commit 093f4b3

Browse files
[Bot] push changes from Files.com
1 parent 2314547 commit 093f4b3

File tree

10 files changed

+31
-45
lines changed

10 files changed

+31
-45
lines changed

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.443
1+
1.2.444

docs/models/ApiKey.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ await ApiKey.create({
9393
'user_id': 1,
9494
'description': "example",
9595
'expires_at': "2000-01-01T01:00:00Z",
96-
'permission_set': "full",
9796
'name': "My Main API Key",
9897
'aws_style_credentials': true,
9998
'path': "shared/docs",
99+
'permission_set': "full",
100100
})
101101
```
102102

@@ -106,10 +106,10 @@ await ApiKey.create({
106106
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
107107
* `description` (string): User-supplied description of API key.
108108
* `expires_at` (string): API Key expiration date
109-
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
110109
* `name` (string): Required - Internal name for the API Key. For your use.
111110
* `aws_style_credentials` (boolean): If `true`, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
112111
* `path` (string): Folder path restriction for `office_integration` permission set API keys.
112+
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
113113

114114
---
115115

@@ -149,7 +149,6 @@ const api_key = await ApiKey.find(id)
149149
await api_key.update({
150150
'description': "example",
151151
'expires_at': "2000-01-01T01:00:00Z",
152-
'permission_set': "full",
153152
'name': "My Main API Key",
154153
})
155154
```
@@ -159,7 +158,6 @@ await api_key.update({
159158
* `id` (int64): Required - Api Key ID.
160159
* `description` (string): User-supplied description of API key.
161160
* `expires_at` (string): API Key expiration date
162-
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
163161
* `name` (string): Internal name for the API Key. For your use.
164162

165163
### Example Response

docs/models/AutomationRun.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ await AutomationRun.list({
5454
* `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.
5555
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
5656
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
57-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
57+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
5858
* `automation_id` (int64): Required - ID of the associated Automation.
5959

6060
---

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.443';
15+
var version = '1.2.444';
1616
var userAgent = "Files.com JavaScript SDK v".concat(version);
1717
var logLevel = _Logger.LogLevel.INFO;
1818
var debugRequest = false;

lib/models/ApiKey.js

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
144144
// Parameters:
145145
// description - string - User-supplied description of API key.
146146
// expires_at - string - API Key expiration date
147-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
148147
// name - string - Internal name for the API Key. For your use.
149148
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
150149
var params,
@@ -185,38 +184,32 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
185184
}
186185
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
187186
case 5:
188-
if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
189-
_context.next = 6;
190-
break;
191-
}
192-
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
193-
case 6:
194187
if (!(params.name && !(0, _utils.isString)(params.name))) {
195-
_context.next = 7;
188+
_context.next = 6;
196189
break;
197190
}
198191
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
199-
case 7:
192+
case 6:
200193
if (params.id) {
201-
_context.next = 9;
194+
_context.next = 8;
202195
break;
203196
}
204197
if (!_this.attributes.id) {
205-
_context.next = 8;
198+
_context.next = 7;
206199
break;
207200
}
208201
params.id = _this.id;
209-
_context.next = 9;
202+
_context.next = 8;
210203
break;
211-
case 8:
204+
case 7:
212205
throw new errors.MissingParameterError('Parameter missing: id');
213-
case 9:
214-
_context.next = 10;
206+
case 8:
207+
_context.next = 9;
215208
return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
216-
case 10:
209+
case 9:
217210
response = _context.sent;
218211
return _context.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
219-
case 11:
212+
case 10:
220213
case "end":
221214
return _context.stop();
222215
}
@@ -448,10 +441,10 @@ _ApiKey = ApiKey;
448441
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
449442
// description - string - User-supplied description of API key.
450443
// expires_at - string - API Key expiration date
451-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
452444
// name (required) - string - Internal name for the API Key. For your use.
453445
// aws_style_credentials - boolean - If `true`, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
454446
// path - string - Folder path restriction for `office_integration` permission set API keys.
447+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
455448
(0, _defineProperty2.default)(ApiKey, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
456449
var params,
457450
options,
@@ -486,23 +479,23 @@ _ApiKey = ApiKey;
486479
}
487480
throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
488481
case 4:
489-
if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
482+
if (!(params.name && !(0, _utils.isString)(params.name))) {
490483
_context7.next = 5;
491484
break;
492485
}
493-
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
486+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
494487
case 5:
495-
if (!(params.name && !(0, _utils.isString)(params.name))) {
488+
if (!(params.path && !(0, _utils.isString)(params.path))) {
496489
_context7.next = 6;
497490
break;
498491
}
499-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
492+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
500493
case 6:
501-
if (!(params.path && !(0, _utils.isString)(params.path))) {
494+
if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
502495
_context7.next = 7;
503496
break;
504497
}
505-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
498+
throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
506499
case 7:
507500
_context7.next = 8;
508501
return _Api.default.sendRequest('/api_keys', 'POST', params, options);

lib/models/AutomationRun.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ _AutomationRun = AutomationRun;
107107
// 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.
108108
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
109109
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
110-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
110+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
111111
// automation_id (required) - int64 - ID of the associated Automation.
112112
(0, _defineProperty2.default)(AutomationRun, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
113113
var _response$data;

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.443",
3+
"version": "1.2.444",
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.443'
9+
const version = '1.2.444'
1010
let userAgent = `Files.com JavaScript SDK v${version}`
1111

1212
let logLevel = LogLevel.INFO

src/models/ApiKey.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ class ApiKey {
139139
// Parameters:
140140
// description - string - User-supplied description of API key.
141141
// expires_at - string - API Key expiration date
142-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
143142
// name - string - Internal name for the API Key. For your use.
144143
update = async (params = {}) => {
145144
if (!this.attributes.id) {
@@ -163,10 +162,6 @@ class ApiKey {
163162
throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params.expires_at)}`)
164163
}
165164

166-
if (params.permission_set && !isString(params.permission_set)) {
167-
throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(params.permission_set)}`)
168-
}
169-
170165
if (params.name && !isString(params.name)) {
171166
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
172167
}
@@ -290,10 +285,10 @@ class ApiKey {
290285
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
291286
// description - string - User-supplied description of API key.
292287
// expires_at - string - API Key expiration date
293-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
294288
// name (required) - string - Internal name for the API Key. For your use.
295289
// aws_style_credentials - boolean - If `true`, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
296290
// path - string - Folder path restriction for `office_integration` permission set API keys.
291+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
297292
static create = async (params = {}, options = {}) => {
298293
if (!params.name) {
299294
throw new errors.MissingParameterError('Parameter missing: name')
@@ -311,10 +306,6 @@ class ApiKey {
311306
throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params.expires_at)}`)
312307
}
313308

314-
if (params.permission_set && !isString(params.permission_set)) {
315-
throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(params.permission_set)}`)
316-
}
317-
318309
if (params.name && !isString(params.name)) {
319310
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
320311
}
@@ -323,6 +314,10 @@ class ApiKey {
323314
throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params.path)}`)
324315
}
325316

317+
if (params.permission_set && !isString(params.permission_set)) {
318+
throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(params.permission_set)}`)
319+
}
320+
326321
const response = await Api.sendRequest('/api_keys', 'POST', params, options)
327322

328323
return new ApiKey(response?.data, options)

src/models/AutomationRun.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AutomationRun {
7575
// 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.
7676
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
7777
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
78-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
78+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
7979
// automation_id (required) - int64 - ID of the associated Automation.
8080
static list = async (params = {}, options = {}) => {
8181
if (!params.automation_id) {

0 commit comments

Comments
 (0)