files.com 1.0.218 → 1.0.222
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 +19 -0
- data/docs/bundle_registration.md +2 -0
- data/docs/file.md +6 -1
- data/docs/folder.md +2 -1
- data/docs/inbox_registration.md +3 -1
- data/docs/preview.md +3 -1
- data/lib/files.com/models/automation_run.rb +31 -0
- data/lib/files.com/models/bundle_registration.rb +5 -0
- data/lib/files.com/models/file.rb +5 -1
- data/lib/files.com/models/inbox_registration.rb +5 -0
- data/lib/files.com/models/preview.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4740d16a35756c850793e85565092bc484aa782b57f1327f2b49879bb9c51e9
|
|
4
|
+
data.tar.gz: 4356ee405876e0efe117bd4f51cf9929691f03a4124b5c710cd54e033e4980e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3148181f696f031dde933cc4ee7d485ada9859fb2e16e1c881ebfe1f5ff1facda6bb6f84dc6feee7924cbb3eee3ff6f2e6475efd6c8d43c1bcada374f299659
|
|
7
|
+
data.tar.gz: 4490d4d8fd11640db9836b23b06a68e7207868dc5ff4279dc67a78f7a035d1ca28369aa169679190a062b6690136268111c195d76446436c5c0daab85a666360
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.222
|
data/docs/automation_run.md
CHANGED
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
{
|
|
7
|
+
"id": 1,
|
|
7
8
|
"automation_id": 1,
|
|
9
|
+
"completed_at": "2000-01-01T01:00:00Z",
|
|
10
|
+
"created_at": "2000-01-01T01:00:00Z",
|
|
8
11
|
"status": "success",
|
|
9
12
|
"status_messages_url": "https://www.example.com/log_file.txt"
|
|
10
13
|
}
|
|
11
14
|
```
|
|
12
15
|
|
|
16
|
+
* `id` (int64): ID.
|
|
13
17
|
* `automation_id` (int64): ID of the associated Automation.
|
|
18
|
+
* `completed_at` (date-time): Automation run completion/failure date/time.
|
|
19
|
+
* `created_at` (date-time): Automation run start date/time.
|
|
14
20
|
* `status` (string): The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
|
|
15
21
|
* `status_messages_url` (string): Link to status messages log file.
|
|
16
22
|
|
|
@@ -40,3 +46,16 @@ Files::AutomationRun.list(
|
|
|
40
46
|
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `status`.
|
|
41
47
|
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `status`.
|
|
42
48
|
* `automation_id` (int64): Required - ID of the associated Automation.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Show Automation Run
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Files::AutomationRun.find(id)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Parameters
|
|
60
|
+
|
|
61
|
+
* `id` (int64): Required - Automation Run ID.
|
data/docs/bundle_registration.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"clickwrap_body": "",
|
|
14
14
|
"form_field_set_id": 1,
|
|
15
15
|
"form_field_data": "",
|
|
16
|
+
"bundle_code": "",
|
|
16
17
|
"bundle_id": 1,
|
|
17
18
|
"bundle_recipient_id": 1
|
|
18
19
|
}
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
* `clickwrap_body` (string): Clickwrap text that was shown to the registrant
|
|
28
29
|
* `form_field_set_id` (int64): Id of associated form field set
|
|
29
30
|
* `form_field_data` (string): Data for form field set with form field ids as keys and user data as values
|
|
31
|
+
* `bundle_code` (string): Bundle URL code
|
|
30
32
|
* `bundle_id` (int64): Id of associated bundle
|
|
31
33
|
* `bundle_recipient_id` (int64): Id of associated bundle recipient
|
|
32
34
|
|
data/docs/file.md
CHANGED
|
@@ -27,7 +27,8 @@ may places where a Ruby File object can be used.
|
|
|
27
27
|
"status": "complete",
|
|
28
28
|
"download_uri": "https://mysite.files.com/...",
|
|
29
29
|
"type": "complete",
|
|
30
|
-
"size": 1024
|
|
30
|
+
"size": 1024,
|
|
31
|
+
"status_message": ""
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
```
|
|
@@ -212,6 +213,7 @@ Files::File.begin_upload(path,
|
|
|
212
213
|
parts: 1,
|
|
213
214
|
ref: "upload-1",
|
|
214
215
|
restart: 1,
|
|
216
|
+
size: 1,
|
|
215
217
|
with_rename: true
|
|
216
218
|
)
|
|
217
219
|
```
|
|
@@ -224,6 +226,7 @@ Files::File.begin_upload(path,
|
|
|
224
226
|
* `parts` (int64): How many parts to fetch?
|
|
225
227
|
* `ref` (string):
|
|
226
228
|
* `restart` (int64): File byte offset to restart from.
|
|
229
|
+
* `size` (int64): Total bytes of file being uploaded (include bytes being retained if appending/restarting).
|
|
227
230
|
* `with_rename` (boolean): Allow file rename instead of overwrite?
|
|
228
231
|
|
|
229
232
|
|
|
@@ -338,6 +341,7 @@ file.begin_upload(
|
|
|
338
341
|
parts: 1,
|
|
339
342
|
ref: "upload-1",
|
|
340
343
|
restart: 1,
|
|
344
|
+
size: 1,
|
|
341
345
|
with_rename: true
|
|
342
346
|
)
|
|
343
347
|
```
|
|
@@ -350,4 +354,5 @@ file.begin_upload(
|
|
|
350
354
|
* `parts` (int64): How many parts to fetch?
|
|
351
355
|
* `ref` (string):
|
|
352
356
|
* `restart` (int64): File byte offset to restart from.
|
|
357
|
+
* `size` (int64): Total bytes of file being uploaded (include bytes being retained if appending/restarting).
|
|
353
358
|
* `with_rename` (boolean): Allow file rename instead of overwrite?
|
data/docs/folder.md
CHANGED
data/docs/inbox_registration.md
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"form_field_set_id": 1,
|
|
13
13
|
"form_field_data": "",
|
|
14
14
|
"inbox_id": 1,
|
|
15
|
-
"inbox_recipient_id": 1
|
|
15
|
+
"inbox_recipient_id": 1,
|
|
16
|
+
"inbox_title": ""
|
|
16
17
|
}
|
|
17
18
|
```
|
|
18
19
|
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
* `form_field_data` (string): Data for form field set with form field ids as keys and user data as values
|
|
26
27
|
* `inbox_id` (int64): Id of associated inbox
|
|
27
28
|
* `inbox_recipient_id` (int64): Id of associated inbox recipient
|
|
29
|
+
* `inbox_title` (string): Title of associated inbox
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
---
|
data/docs/preview.md
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"status": "complete",
|
|
9
9
|
"download_uri": "https://mysite.files.com/...",
|
|
10
10
|
"type": "complete",
|
|
11
|
-
"size": 1024
|
|
11
|
+
"size": 1024,
|
|
12
|
+
"status_message": ""
|
|
12
13
|
}
|
|
13
14
|
```
|
|
14
15
|
|
|
@@ -17,3 +18,4 @@
|
|
|
17
18
|
* `download_uri` (string): Link to download preview
|
|
18
19
|
* `type` (string): Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
|
|
19
20
|
* `size` (int64): Preview size
|
|
21
|
+
* `status_message` (string): Preview status message. Addtional context from the preview generation process about the status
|
|
@@ -9,11 +9,26 @@ module Files
|
|
|
9
9
|
@options = options || {}
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
# int64 - ID.
|
|
13
|
+
def id
|
|
14
|
+
@attributes[:id]
|
|
15
|
+
end
|
|
16
|
+
|
|
12
17
|
# int64 - ID of the associated Automation.
|
|
13
18
|
def automation_id
|
|
14
19
|
@attributes[:automation_id]
|
|
15
20
|
end
|
|
16
21
|
|
|
22
|
+
# date-time - Automation run completion/failure date/time.
|
|
23
|
+
def completed_at
|
|
24
|
+
@attributes[:completed_at]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# date-time - Automation run start date/time.
|
|
28
|
+
def created_at
|
|
29
|
+
@attributes[:created_at]
|
|
30
|
+
end
|
|
31
|
+
|
|
17
32
|
# string - The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
|
|
18
33
|
def status
|
|
19
34
|
@attributes[:status]
|
|
@@ -58,5 +73,21 @@ module Files
|
|
|
58
73
|
def self.all(params = {}, options = {})
|
|
59
74
|
list(params, options)
|
|
60
75
|
end
|
|
76
|
+
|
|
77
|
+
# Parameters:
|
|
78
|
+
# id (required) - int64 - Automation Run ID.
|
|
79
|
+
def self.find(id, params = {}, options = {})
|
|
80
|
+
params ||= {}
|
|
81
|
+
params[:id] = id
|
|
82
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
|
83
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
|
84
|
+
|
|
85
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}", :get, params, options)
|
|
86
|
+
AutomationRun.new(response.data, options)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def self.get(id, params = {}, options = {})
|
|
90
|
+
find(id, params, options)
|
|
91
|
+
end
|
|
61
92
|
end
|
|
62
93
|
end
|
|
@@ -155,7 +155,7 @@ module Files
|
|
|
155
155
|
etags ||= []
|
|
156
156
|
bytes_written = 0
|
|
157
157
|
loop do
|
|
158
|
-
begin_upload =
|
|
158
|
+
begin_upload = File.begin_upload(path, { ref: upload&.ref, part: (upload&.part_number || 0) + 1 }, options)
|
|
159
159
|
upload = begin_upload.is_a?(Enumerable) ? begin_upload.first : begin_upload
|
|
160
160
|
buf = io.read(upload.partsize) || ""
|
|
161
161
|
bytes_written += buf.length
|
|
@@ -908,6 +908,7 @@ module Files
|
|
|
908
908
|
# parts - int64 - How many parts to fetch?
|
|
909
909
|
# ref - string -
|
|
910
910
|
# restart - int64 - File byte offset to restart from.
|
|
911
|
+
# size - int64 - Total bytes of file being uploaded (include bytes being retained if appending/restarting).
|
|
911
912
|
# with_rename - boolean - Allow file rename instead of overwrite?
|
|
912
913
|
def begin_upload(params = {})
|
|
913
914
|
params ||= {}
|
|
@@ -918,6 +919,7 @@ module Files
|
|
|
918
919
|
raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
|
|
919
920
|
raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
|
|
920
921
|
raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
|
|
922
|
+
raise InvalidParameterError.new("Bad parameter: size must be an Integer") if params.dig(:size) and !params.dig(:size).is_a?(Integer)
|
|
921
923
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
|
922
924
|
|
|
923
925
|
Api.send_request("/file_actions/begin_upload/#{@attributes[:path]}", :post, params, @options)
|
|
@@ -1073,6 +1075,7 @@ module Files
|
|
|
1073
1075
|
# parts - int64 - How many parts to fetch?
|
|
1074
1076
|
# ref - string -
|
|
1075
1077
|
# restart - int64 - File byte offset to restart from.
|
|
1078
|
+
# size - int64 - Total bytes of file being uploaded (include bytes being retained if appending/restarting).
|
|
1076
1079
|
# with_rename - boolean - Allow file rename instead of overwrite?
|
|
1077
1080
|
def self.begin_upload(path, params = {}, options = {})
|
|
1078
1081
|
params ||= {}
|
|
@@ -1082,6 +1085,7 @@ module Files
|
|
|
1082
1085
|
raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
|
|
1083
1086
|
raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
|
|
1084
1087
|
raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
|
|
1088
|
+
raise InvalidParameterError.new("Bad parameter: size must be an Integer") if params.dig(:size) and !params.dig(:size).is_a?(Integer)
|
|
1085
1089
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
|
1086
1090
|
|
|
1087
1091
|
response, options = Api.send_request("/file_actions/begin_upload/#{params[:path]}", :post, params, options)
|
|
@@ -54,6 +54,11 @@ module Files
|
|
|
54
54
|
@attributes[:inbox_recipient_id]
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
# string - Title of associated inbox
|
|
58
|
+
def inbox_title
|
|
59
|
+
@attributes[:inbox_title]
|
|
60
|
+
end
|
|
61
|
+
|
|
57
62
|
# Parameters:
|
|
58
63
|
# cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
|
59
64
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
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.0.
|
|
4
|
+
version: 1.0.222
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-10-
|
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|