files.com 1.2.526 → 1.2.528
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_VERSION +1 -1
- package/docs/models/AutomationRun.md +1 -1
- package/docs/models/Bundle.md +1 -1
- package/docs/models/File.md +73 -0
- package/docs/models/User.md +2 -2
- package/docs/models/ZipListEntry.md +13 -0
- package/lib/Files.js +1 -1
- package/lib/models/AutomationRun.js +1 -1
- package/lib/models/Bundle.js +1 -1
- package/lib/models/File.js +410 -215
- package/lib/models/User.js +2 -2
- package/lib/models/ZipListEntry.js +54 -0
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/AutomationRun.js +1 -1
- package/src/models/Bundle.js +1 -1
- package/src/models/File.js +106 -0
- package/src/models/User.js +2 -2
- package/src/models/ZipListEntry.js +41 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.528
|
|
@@ -54,7 +54,7 @@ await AutomationRun.list({
|
|
|
54
54
|
* `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.
|
|
55
55
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
56
56
|
* `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 ]`.
|
|
58
58
|
* `automation_id` (int64): Required - ID of the associated Automation.
|
|
59
59
|
|
|
60
60
|
---
|
package/docs/models/Bundle.md
CHANGED
|
@@ -154,7 +154,7 @@ await Bundle.list({
|
|
|
154
154
|
* `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.
|
|
155
155
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
156
156
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
157
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id,
|
|
157
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
|
|
158
158
|
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
159
159
|
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
160
160
|
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
|
package/docs/models/File.md
CHANGED
|
@@ -154,6 +154,25 @@ await File.find(path, {
|
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
+
## Create a ZIP from one or more paths and save it to a destination path
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
await File.zip({
|
|
161
|
+
'paths': "paths",
|
|
162
|
+
'destination': "destination",
|
|
163
|
+
'overwrite': false,
|
|
164
|
+
})
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Parameters
|
|
169
|
+
|
|
170
|
+
* `paths` (array(string)): Required - Paths to include in the ZIP.
|
|
171
|
+
* `destination` (string): Required - Destination file path for the ZIP.
|
|
172
|
+
* `overwrite` (boolean): Overwrite existing file in the destination?
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
157
176
|
## Download File
|
|
158
177
|
|
|
159
178
|
```
|
|
@@ -312,6 +331,31 @@ await file.delete({
|
|
|
312
331
|
* `recursive` (boolean): If true, will recursively delete folders. Otherwise, will error on non-empty folders.
|
|
313
332
|
|
|
314
333
|
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## List the contents of a ZIP file
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
const file = await File.find(path)
|
|
340
|
+
|
|
341
|
+
await file.zip_list_contents()
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Parameters
|
|
345
|
+
|
|
346
|
+
* `path` (string): Required - Path to operate on.
|
|
347
|
+
|
|
348
|
+
### Example Response
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
[
|
|
352
|
+
{
|
|
353
|
+
"path": "example",
|
|
354
|
+
"size": 1
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
```
|
|
358
|
+
|
|
315
359
|
---
|
|
316
360
|
|
|
317
361
|
## Copy File/Folder
|
|
@@ -372,6 +416,35 @@ await file.move({
|
|
|
372
416
|
|
|
373
417
|
---
|
|
374
418
|
|
|
419
|
+
## Extract a ZIP file to a destination folder
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
const file = await File.find(path)
|
|
423
|
+
|
|
424
|
+
await file.unzip({
|
|
425
|
+
'destination': "destination",
|
|
426
|
+
'overwrite': false,
|
|
427
|
+
})
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Parameters
|
|
431
|
+
|
|
432
|
+
* `path` (string): Required - ZIP file path to extract.
|
|
433
|
+
* `destination` (string): Required - Destination folder path for extracted files.
|
|
434
|
+
* `filename` (string): Optional single entry filename to extract.
|
|
435
|
+
* `overwrite` (boolean): Overwrite existing files in the destination?
|
|
436
|
+
|
|
437
|
+
### Example Response
|
|
438
|
+
|
|
439
|
+
```json
|
|
440
|
+
{
|
|
441
|
+
"status": "pending",
|
|
442
|
+
"file_migration_id": 1
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
375
448
|
## Begin File Upload
|
|
376
449
|
|
|
377
450
|
```
|
package/docs/models/User.md
CHANGED
|
@@ -184,10 +184,10 @@ await User.list({
|
|
|
184
184
|
* `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.
|
|
185
185
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
186
186
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id`, `company`, `name`, `disabled`, `authenticate_until`, `username`, `email`, `last_desktop_login_at`, `last_login_at`, `site_admin`, `password_validity_days` or `ssl_required`.
|
|
187
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled`, `partner_id` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[
|
|
187
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled`, `partner_id` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[ workspace_id, disabled ]` or `[ workspace_id, disabled, username ]`.
|
|
188
188
|
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
189
189
|
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
190
|
-
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`.
|
|
190
|
+
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`.
|
|
191
191
|
* `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
192
192
|
* `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
193
193
|
* `ids` (string): comma-separated list of User IDs
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# ZipListEntry
|
|
2
|
+
|
|
3
|
+
## Example ZipListEntry Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"path": "example",
|
|
8
|
+
"size": 1
|
|
9
|
+
}
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
* `path` (string): Entry path inside the ZIP. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
13
|
+
* `size` (int64): Uncompressed size in bytes.
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.528';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
|
@@ -107,7 +107,7 @@ _AutomationRun = AutomationRun;
|
|
|
107
107
|
// 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.
|
|
108
108
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
109
109
|
// 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 ]`.
|
|
111
111
|
// automation_id (required) - int64 - ID of the associated Automation.
|
|
112
112
|
(0, _defineProperty2.default)(AutomationRun, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
113
113
|
var _response$data;
|
package/lib/models/Bundle.js
CHANGED
|
@@ -699,7 +699,7 @@ _Bundle = Bundle;
|
|
|
699
699
|
// 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.
|
|
700
700
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
701
701
|
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
702
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id,
|
|
702
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
|
|
703
703
|
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
704
704
|
// filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
705
705
|
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
|