files.com 1.1.520 → 1.1.522
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.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/automation_run.md +1 -1
- data/docs/bundle.md +1 -1
- data/docs/file.md +87 -0
- data/docs/zip_list_entry.md +13 -0
- data/lib/files.com/models/automation_run.rb +1 -1
- data/lib/files.com/models/bundle.rb +1 -1
- data/lib/files.com/models/file.rb +76 -0
- data/lib/files.com/models/zip_list_entry.rb +22 -0
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3412afc11b0b4f1c4810dc170840b823f56acfd14c7a4685642e59bcdf9c969e
|
|
4
|
+
data.tar.gz: 0b51a50195bac08ee53a6e093231a53f6aa0c7bea64ba62f2220f28d525dfaca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce9b52ac781f15c3fa05e31620bd3440e3f9b5e1f14a754788b1eb4703c1f7cd6579cf6f197f26bedb78cb9cb06de07013aa4a33adc851d9630505b13a015825
|
|
7
|
+
data.tar.gz: 587d0d5729e45eab227f9ac3af77b7854c17635a4ad1941544bee363b394a41f932b5fd5aae0815c63daddb05fd8334c5bda00e83998347750e75d499abfb1b5
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.522
|
data/docs/automation_run.md
CHANGED
|
@@ -54,7 +54,7 @@ Files::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
|
|
data/docs/bundle.md
CHANGED
|
@@ -154,7 +154,7 @@ Files::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`.
|
data/docs/file.md
CHANGED
|
@@ -212,6 +212,19 @@ Files::File.find(path,
|
|
|
212
212
|
* `with_priority_color` (boolean): Include file priority color information?
|
|
213
213
|
|
|
214
214
|
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## List the contents of a ZIP file
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
Files::File.zip_list_contents(path)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Parameters
|
|
224
|
+
|
|
225
|
+
* `path` (string): Required - Path to operate on.
|
|
226
|
+
|
|
227
|
+
|
|
215
228
|
---
|
|
216
229
|
|
|
217
230
|
## Copy File/Folder
|
|
@@ -250,6 +263,44 @@ Files::File.move(path,
|
|
|
250
263
|
* `overwrite` (boolean): Overwrite existing file(s) in the destination?
|
|
251
264
|
|
|
252
265
|
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Extract a ZIP file to a destination folder
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
Files::File.unzip(path,
|
|
272
|
+
destination: "destination",
|
|
273
|
+
overwrite: false
|
|
274
|
+
)
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Parameters
|
|
278
|
+
|
|
279
|
+
* `path` (string): Required - ZIP file path to extract.
|
|
280
|
+
* `destination` (string): Required - Destination folder path for extracted files.
|
|
281
|
+
* `filename` (string): Optional single entry filename to extract.
|
|
282
|
+
* `overwrite` (boolean): Overwrite existing files in the destination?
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Create a ZIP from one or more paths and save it to a destination path
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
Files::File.zip(
|
|
291
|
+
paths: "paths",
|
|
292
|
+
destination: "destination",
|
|
293
|
+
overwrite: false
|
|
294
|
+
)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Parameters
|
|
298
|
+
|
|
299
|
+
* `paths` (array(string)): Required - Paths to include in the ZIP.
|
|
300
|
+
* `destination` (string): Required - Destination file path for the ZIP.
|
|
301
|
+
* `overwrite` (boolean): Overwrite existing file in the destination?
|
|
302
|
+
|
|
303
|
+
|
|
253
304
|
---
|
|
254
305
|
|
|
255
306
|
## Begin File Upload
|
|
@@ -340,6 +391,21 @@ file.delete(
|
|
|
340
391
|
* `recursive` (boolean): If true, will recursively delete folders. Otherwise, will error on non-empty folders.
|
|
341
392
|
|
|
342
393
|
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## List the contents of a ZIP file
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
file = Files::File.find(path)
|
|
400
|
+
|
|
401
|
+
file.zip_list_contents
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Parameters
|
|
405
|
+
|
|
406
|
+
* `path` (string): Required - Path to operate on.
|
|
407
|
+
|
|
408
|
+
|
|
343
409
|
---
|
|
344
410
|
|
|
345
411
|
## Copy File/Folder
|
|
@@ -382,6 +448,27 @@ file.move(
|
|
|
382
448
|
* `overwrite` (boolean): Overwrite existing file(s) in the destination?
|
|
383
449
|
|
|
384
450
|
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
## Extract a ZIP file to a destination folder
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
file = Files::File.find(path)
|
|
457
|
+
|
|
458
|
+
file.unzip(
|
|
459
|
+
destination: "destination",
|
|
460
|
+
overwrite: false
|
|
461
|
+
)
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Parameters
|
|
465
|
+
|
|
466
|
+
* `path` (string): Required - ZIP file path to extract.
|
|
467
|
+
* `destination` (string): Required - Destination folder path for extracted files.
|
|
468
|
+
* `filename` (string): Optional single entry filename to extract.
|
|
469
|
+
* `overwrite` (boolean): Overwrite existing files in the destination?
|
|
470
|
+
|
|
471
|
+
|
|
385
472
|
---
|
|
386
473
|
|
|
387
474
|
## Begin File Upload
|
|
@@ -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.
|
|
@@ -84,7 +84,7 @@ module Files
|
|
|
84
84
|
# 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.
|
|
85
85
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
86
86
|
# 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`.
|
|
87
|
-
# 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 ]`.
|
|
87
|
+
# 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 ]`.
|
|
88
88
|
# automation_id (required) - int64 - ID of the associated Automation.
|
|
89
89
|
def self.list(params = {}, options = {})
|
|
90
90
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
@@ -531,7 +531,7 @@ module Files
|
|
|
531
531
|
# 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.
|
|
532
532
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
533
533
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
534
|
-
# 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,
|
|
534
|
+
# 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 ]`.
|
|
535
535
|
# 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`.
|
|
536
536
|
# 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`.
|
|
537
537
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
|
|
@@ -1019,6 +1019,17 @@ module Files
|
|
|
1019
1019
|
nil
|
|
1020
1020
|
end
|
|
1021
1021
|
|
|
1022
|
+
# List the contents of a ZIP file
|
|
1023
|
+
def zip_list_contents(params = {})
|
|
1024
|
+
params ||= {}
|
|
1025
|
+
params[:path] = @attributes[:path]
|
|
1026
|
+
raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
|
|
1027
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
1028
|
+
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
1029
|
+
|
|
1030
|
+
Api.send_request("/file_actions/zip_list/#{@attributes[:path]}", :get, params, @options)
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1022
1033
|
# Copy File/Folder
|
|
1023
1034
|
#
|
|
1024
1035
|
# Parameters:
|
|
@@ -1054,6 +1065,25 @@ module Files
|
|
|
1054
1065
|
Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
|
|
1055
1066
|
end
|
|
1056
1067
|
|
|
1068
|
+
# Extract a ZIP file to a destination folder
|
|
1069
|
+
#
|
|
1070
|
+
# Parameters:
|
|
1071
|
+
# destination (required) - string - Destination folder path for extracted files.
|
|
1072
|
+
# filename - string - Optional single entry filename to extract.
|
|
1073
|
+
# overwrite - boolean - Overwrite existing files in the destination?
|
|
1074
|
+
def unzip(params = {})
|
|
1075
|
+
params ||= {}
|
|
1076
|
+
params[:path] = @attributes[:path]
|
|
1077
|
+
raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
|
|
1078
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
1079
|
+
raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
|
|
1080
|
+
raise InvalidParameterError.new("Bad parameter: filename must be an String") if params[:filename] and !params[:filename].is_a?(String)
|
|
1081
|
+
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
1082
|
+
raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
|
|
1083
|
+
|
|
1084
|
+
Api.send_request("/file_actions/unzip", :post, params, @options)
|
|
1085
|
+
end
|
|
1086
|
+
|
|
1057
1087
|
# Begin File Upload
|
|
1058
1088
|
#
|
|
1059
1089
|
# Parameters:
|
|
@@ -1193,6 +1223,19 @@ module Files
|
|
|
1193
1223
|
find(path, params, options)
|
|
1194
1224
|
end
|
|
1195
1225
|
|
|
1226
|
+
# List the contents of a ZIP file
|
|
1227
|
+
def self.zip_list_contents(path, params = {}, options = {})
|
|
1228
|
+
params ||= {}
|
|
1229
|
+
params[:path] = path
|
|
1230
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
1231
|
+
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
1232
|
+
|
|
1233
|
+
response, options = Api.send_request("/file_actions/zip_list/#{params[:path]}", :get, params, options)
|
|
1234
|
+
response.data.map do |entity_data|
|
|
1235
|
+
ZipListEntry.new(entity_data, options)
|
|
1236
|
+
end
|
|
1237
|
+
end
|
|
1238
|
+
|
|
1196
1239
|
# Copy File/Folder
|
|
1197
1240
|
#
|
|
1198
1241
|
# Parameters:
|
|
@@ -1228,6 +1271,39 @@ module Files
|
|
|
1228
1271
|
FileAction.new(response.data, options)
|
|
1229
1272
|
end
|
|
1230
1273
|
|
|
1274
|
+
# Extract a ZIP file to a destination folder
|
|
1275
|
+
#
|
|
1276
|
+
# Parameters:
|
|
1277
|
+
# destination (required) - string - Destination folder path for extracted files.
|
|
1278
|
+
# filename - string - Optional single entry filename to extract.
|
|
1279
|
+
# overwrite - boolean - Overwrite existing files in the destination?
|
|
1280
|
+
def self.unzip(path, params = {}, options = {})
|
|
1281
|
+
params ||= {}
|
|
1282
|
+
params[:path] = path
|
|
1283
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
1284
|
+
raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
|
|
1285
|
+
raise InvalidParameterError.new("Bad parameter: filename must be an String") if params[:filename] and !params[:filename].is_a?(String)
|
|
1286
|
+
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
1287
|
+
raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
|
|
1288
|
+
|
|
1289
|
+
response, options = Api.send_request("/file_actions/unzip", :post, params, options)
|
|
1290
|
+
FileAction.new(response.data, options)
|
|
1291
|
+
end
|
|
1292
|
+
|
|
1293
|
+
# Parameters:
|
|
1294
|
+
# paths (required) - array(string) - Paths to include in the ZIP.
|
|
1295
|
+
# destination (required) - string - Destination file path for the ZIP.
|
|
1296
|
+
# overwrite - boolean - Overwrite existing file in the destination?
|
|
1297
|
+
def self.zip(params = {}, options = {})
|
|
1298
|
+
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
|
|
1299
|
+
raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
|
|
1300
|
+
raise MissingParameterError.new("Parameter missing: paths") unless params[:paths]
|
|
1301
|
+
raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
|
|
1302
|
+
|
|
1303
|
+
response, options = Api.send_request("/file_actions/zip", :post, params, options)
|
|
1304
|
+
FileAction.new(response.data, options)
|
|
1305
|
+
end
|
|
1306
|
+
|
|
1231
1307
|
# Begin File Upload
|
|
1232
1308
|
#
|
|
1233
1309
|
# Parameters:
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class ZipListEntry
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# 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
|
+
def path
|
|
14
|
+
@attributes[:path]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# int64 - Uncompressed size in bytes.
|
|
18
|
+
def size
|
|
19
|
+
@attributes[:size]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
data/lib/files.com/version.rb
CHANGED
data/lib/files.com.rb
CHANGED
|
@@ -145,6 +145,7 @@ require "files.com/models/user_sftp_client_use"
|
|
|
145
145
|
require "files.com/models/web_dav_action_log"
|
|
146
146
|
require "files.com/models/webhook_test"
|
|
147
147
|
require "files.com/models/workspace"
|
|
148
|
+
require "files.com/models/zip_list_entry"
|
|
148
149
|
|
|
149
150
|
require "files.com/models/dir"
|
|
150
151
|
require "files.com/models/file_utils"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.522
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -270,6 +270,7 @@ files:
|
|
|
270
270
|
- docs/web_dav_action_log.md
|
|
271
271
|
- docs/webhook_test.md
|
|
272
272
|
- docs/workspace.md
|
|
273
|
+
- docs/zip_list_entry.md
|
|
273
274
|
- files.com.gemspec
|
|
274
275
|
- lib/files.com.rb
|
|
275
276
|
- lib/files.com/api.rb
|
|
@@ -391,6 +392,7 @@ files:
|
|
|
391
392
|
- lib/files.com/models/web_dav_action_log.rb
|
|
392
393
|
- lib/files.com/models/webhook_test.rb
|
|
393
394
|
- lib/files.com/models/workspace.rb
|
|
395
|
+
- lib/files.com/models/zip_list_entry.rb
|
|
394
396
|
- lib/files.com/path_util.rb
|
|
395
397
|
- lib/files.com/response.rb
|
|
396
398
|
- lib/files.com/sizable_io.rb
|