files.com 1.0.178 → 1.0.182
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/action_webhook_failure.md +28 -0
- data/docs/app.md +2 -0
- data/docs/external_event.md +17 -0
- data/lib/files.com.rb +1 -0
- data/lib/files.com/models/action_webhook_failure.rb +34 -0
- data/lib/files.com/models/app.rb +5 -0
- data/lib/files.com/models/external_event.rb +42 -0
- data/lib/files.com/sizable_io.rb +23 -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: e075ac53f4e6168ab7f7344bc46638ca88fbf5cc175b599832fc721511d9a441
|
4
|
+
data.tar.gz: c5a4ef80a09077c19ce44f371a8562576b1cd2a6204acaccd1076c6f54c3620a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da69ba3af21444e628a5daaaa89ceb05628f3f245cf4f07474629c9451e077128705857e4c8aff3a7aeaf2deb9d3549086ea472dac2bd92367466036e7d2d1f0
|
7
|
+
data.tar.gz: a94b7ad26a242d308818e494aa02fb9356347311254618a2fa5889f4d83fc4f5072d6569fc76a7a83024d999cd051df0b53dacfc53a2765ab4b9b0701bfec57d
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.182
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
---
|
4
|
+
|
5
|
+
## retry Action Webhook Failure
|
6
|
+
|
7
|
+
```
|
8
|
+
Files::ActionWebhookFailure.retry(id)
|
9
|
+
```
|
10
|
+
|
11
|
+
### Parameters
|
12
|
+
|
13
|
+
* `id` (int64): Required - Action Webhook Failure ID.
|
14
|
+
|
15
|
+
|
16
|
+
---
|
17
|
+
|
18
|
+
## retry Action Webhook Failure
|
19
|
+
|
20
|
+
```
|
21
|
+
action_webhook_failure = Files::ActionWebhookFailure.list_for(path).first
|
22
|
+
|
23
|
+
action_webhook_failure.retry
|
24
|
+
```
|
25
|
+
|
26
|
+
### Parameters
|
27
|
+
|
28
|
+
* `id` (int64): Required - Action Webhook Failure ID.
|
data/docs/app.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
{
|
7
7
|
"name": "",
|
8
8
|
"extended_description": "",
|
9
|
+
"short_description": "",
|
9
10
|
"documentation_links": "Important Info => http://files.test/learn-more",
|
10
11
|
"icon_url": "",
|
11
12
|
"logo_url": "",
|
@@ -26,6 +27,7 @@
|
|
26
27
|
|
27
28
|
* `name` (string): Name of the App
|
28
29
|
* `extended_description` (string): Long form description of the App
|
30
|
+
* `short_description` (string): Short description of the App
|
29
31
|
* `documentation_links` (string): Collection of named links to documentation
|
30
32
|
* `icon_url` (string): App icon
|
31
33
|
* `logo_url` (string): Full size logo for the App
|
data/docs/external_event.md
CHANGED
@@ -55,3 +55,20 @@ Files::ExternalEvent.find(id)
|
|
55
55
|
### Parameters
|
56
56
|
|
57
57
|
* `id` (int64): Required - External Event ID.
|
58
|
+
|
59
|
+
|
60
|
+
---
|
61
|
+
|
62
|
+
## Create External Event
|
63
|
+
|
64
|
+
```
|
65
|
+
Files::ExternalEvent.create(
|
66
|
+
status: "status",
|
67
|
+
body: "body"
|
68
|
+
)
|
69
|
+
```
|
70
|
+
|
71
|
+
### Parameters
|
72
|
+
|
73
|
+
* `status` (string): Required - Status of event.
|
74
|
+
* `body` (string): Required - Event body
|
data/lib/files.com.rb
CHANGED
@@ -31,6 +31,7 @@ require "files.com/models/account_line_item"
|
|
31
31
|
require "files.com/models/action"
|
32
32
|
require "files.com/models/action_notification_export"
|
33
33
|
require "files.com/models/action_notification_export_result"
|
34
|
+
require "files.com/models/action_webhook_failure"
|
34
35
|
require "files.com/models/api_key"
|
35
36
|
require "files.com/models/app"
|
36
37
|
require "files.com/models/as2_key"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class ActionWebhookFailure
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# retry Action Webhook Failure
|
13
|
+
def retry(params = {})
|
14
|
+
params ||= {}
|
15
|
+
params[:id] = @attributes[:id]
|
16
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
17
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
18
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
19
|
+
|
20
|
+
Api.send_request("/action_webhook_failures/#{@attributes[:id]}/retry", :post, params, @options)
|
21
|
+
end
|
22
|
+
|
23
|
+
# retry Action Webhook Failure
|
24
|
+
def self.retry(id, params = {}, options = {})
|
25
|
+
params ||= {}
|
26
|
+
params[:id] = id
|
27
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
28
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
29
|
+
|
30
|
+
response, _options = Api.send_request("/action_webhook_failures/#{params[:id]}/retry", :post, params, options)
|
31
|
+
response.data
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/files.com/models/app.rb
CHANGED
@@ -19,6 +19,11 @@ module Files
|
|
19
19
|
@attributes[:extended_description]
|
20
20
|
end
|
21
21
|
|
22
|
+
# string - Short description of the App
|
23
|
+
def short_description
|
24
|
+
@attributes[:short_description]
|
25
|
+
end
|
26
|
+
|
22
27
|
# string - Collection of named links to documentation
|
23
28
|
def documentation_links
|
24
29
|
@attributes[:documentation_links]
|
@@ -14,21 +14,37 @@ module Files
|
|
14
14
|
@attributes[:id]
|
15
15
|
end
|
16
16
|
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
17
21
|
# string - Type of event being recorded.
|
18
22
|
def event_type
|
19
23
|
@attributes[:event_type]
|
20
24
|
end
|
21
25
|
|
26
|
+
def event_type=(value)
|
27
|
+
@attributes[:event_type] = value
|
28
|
+
end
|
29
|
+
|
22
30
|
# string - Status of event.
|
23
31
|
def status
|
24
32
|
@attributes[:status]
|
25
33
|
end
|
26
34
|
|
35
|
+
def status=(value)
|
36
|
+
@attributes[:status] = value
|
37
|
+
end
|
38
|
+
|
27
39
|
# string - Event body
|
28
40
|
def body
|
29
41
|
@attributes[:body]
|
30
42
|
end
|
31
43
|
|
44
|
+
def body=(value)
|
45
|
+
@attributes[:body] = value
|
46
|
+
end
|
47
|
+
|
32
48
|
# date-time - External event create date/time
|
33
49
|
def created_at
|
34
50
|
@attributes[:created_at]
|
@@ -39,6 +55,19 @@ module Files
|
|
39
55
|
@attributes[:body_url]
|
40
56
|
end
|
41
57
|
|
58
|
+
def body_url=(value)
|
59
|
+
@attributes[:body_url] = value
|
60
|
+
end
|
61
|
+
|
62
|
+
def save
|
63
|
+
if @attributes[:id]
|
64
|
+
raise NotImplementedError.new("The ExternalEvent object doesn't support updates.")
|
65
|
+
else
|
66
|
+
new_obj = ExternalEvent.create(@attributes, @options)
|
67
|
+
@attributes = new_obj.attributes
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
42
71
|
# Parameters:
|
43
72
|
# 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.
|
44
73
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
@@ -84,5 +113,18 @@ module Files
|
|
84
113
|
def self.get(id, params = {}, options = {})
|
85
114
|
find(id, params, options)
|
86
115
|
end
|
116
|
+
|
117
|
+
# Parameters:
|
118
|
+
# status (required) - string - Status of event.
|
119
|
+
# body (required) - string - Event body
|
120
|
+
def self.create(params = {}, options = {})
|
121
|
+
raise InvalidParameterError.new("Bad parameter: status must be an String") if params.dig(:status) and !params.dig(:status).is_a?(String)
|
122
|
+
raise InvalidParameterError.new("Bad parameter: body must be an String") if params.dig(:body) and !params.dig(:body).is_a?(String)
|
123
|
+
raise MissingParameterError.new("Parameter missing: status") unless params.dig(:status)
|
124
|
+
raise MissingParameterError.new("Parameter missing: body") unless params.dig(:body)
|
125
|
+
|
126
|
+
response, options = Api.send_request("/external_events", :post, params, options)
|
127
|
+
ExternalEvent.new(response.data, options)
|
128
|
+
end
|
87
129
|
end
|
88
130
|
end
|
data/lib/files.com/sizable_io.rb
CHANGED
@@ -12,15 +12,30 @@ module Files
|
|
12
12
|
read_io.content_length_promise.wait.value
|
13
13
|
end
|
14
14
|
|
15
|
+
def wait!(timeout=nil)
|
16
|
+
read_io.ready_promise.wait(timeout)
|
17
|
+
error!
|
18
|
+
self
|
19
|
+
end
|
20
|
+
|
15
21
|
def fulfill_content_length(length)
|
16
22
|
read_io.content_length = length
|
17
23
|
read_io.content_length_promise.execute
|
18
24
|
end
|
19
25
|
|
26
|
+
def ready!
|
27
|
+
read_io.ready_promise.execute
|
28
|
+
end
|
29
|
+
|
20
30
|
def close
|
21
31
|
raise @with_error if @with_error
|
22
32
|
super
|
23
33
|
read_io.content_length_promise.try_set(nil)
|
34
|
+
read_io.ready_promise.try_set(true)
|
35
|
+
end
|
36
|
+
|
37
|
+
def error!
|
38
|
+
raise read_io.with_error if read_io.with_error
|
24
39
|
end
|
25
40
|
|
26
41
|
def set_error(e)
|
@@ -35,8 +50,16 @@ module Files
|
|
35
50
|
@content_length_promise ||= Concurrent::Promise.new { content_length }
|
36
51
|
end
|
37
52
|
|
53
|
+
def ready_promise
|
54
|
+
@ready_promise ||= Concurrent::Promise.new { true }
|
55
|
+
end
|
56
|
+
|
38
57
|
def read_io
|
39
58
|
@read_io || self
|
40
59
|
end
|
60
|
+
|
61
|
+
def read_io?
|
62
|
+
read_io == self
|
63
|
+
end
|
41
64
|
end
|
42
65
|
end
|
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.182
|
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-
|
11
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- docs/action.md
|
91
91
|
- docs/action_notification_export.md
|
92
92
|
- docs/action_notification_export_result.md
|
93
|
+
- docs/action_webhook_failure.md
|
93
94
|
- docs/api_key.md
|
94
95
|
- docs/app.md
|
95
96
|
- docs/as2_key.md
|
@@ -164,6 +165,7 @@ files:
|
|
164
165
|
- lib/files.com/models/action.rb
|
165
166
|
- lib/files.com/models/action_notification_export.rb
|
166
167
|
- lib/files.com/models/action_notification_export_result.rb
|
168
|
+
- lib/files.com/models/action_webhook_failure.rb
|
167
169
|
- lib/files.com/models/api_key.rb
|
168
170
|
- lib/files.com/models/app.rb
|
169
171
|
- lib/files.com/models/as2_key.rb
|