files.com 1.0.179 → 1.0.183

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32935bb0ba8038b846516ad46c7bc54d1e60fe5d248270f27555fff90f865d96
4
- data.tar.gz: 9a1d911bf8e70e7d96ba4454784255d862f9a6236c5bfbea86d53b2d27abefac
3
+ metadata.gz: ff4d0d6063f70dcebe0716be9be58576674d1dd9557a6fa361d6b3f0379f102a
4
+ data.tar.gz: e7b4ab3e3c558ed2c39de94a3af1abcd13003c56dcd9bc8d7464a360a2e51a61
5
5
  SHA512:
6
- metadata.gz: 3178b99b24bf4271b9ae5d885b2bcaa9a0fcfeefc0c3b53b774656eb13f46d353356513ad64844dfa0661a2e3ef4b9ba42c6d014b3261162a06b048a57016aad
7
- data.tar.gz: 70795f3bbbe09817c4d70855bbaba3fd2c376831c05cea107f77e9dc981aca65bdbd95d102f27d61b564f992270176fdc034146b84115612052426fb09526a66
6
+ metadata.gz: 8769075d23e196ac9bf65bbf57a3a0254591c6ffebd3f05aaaeeafc1630762beebcfdb25858b82d8f765d0d2071c9d2e32410e545fd3decfc7fdae45dac472a3
7
+ data.tar.gz: 7fe7e57189cf669a367b1d4e63d8a2a3cabd56369afe601717cf454969947205417c94bb9ca3a13b6478d2357559d253f6e22a59d851fe7d4f52582bad238be1
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.179
1
+ 1.0.183
@@ -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
@@ -9,7 +9,12 @@
9
9
  "status": "",
10
10
  "body": "",
11
11
  "created_at": "2000-01-01T01:00:00Z",
12
- "body_url": ""
12
+ "body_url": "",
13
+ "folder_behavior_id": 1,
14
+ "successful_files": 1,
15
+ "errored_files": 1,
16
+ "bytes_synced": 1,
17
+ "remote_server_type": ""
13
18
  }
14
19
  ```
15
20
 
@@ -19,6 +24,11 @@
19
24
  * `body` (string): Event body
20
25
  * `created_at` (date-time): External event create date/time
21
26
  * `body_url` (string): Link to log file.
27
+ * `folder_behavior_id` (int64): Folder Behavior ID
28
+ * `successful_files` (int64): For sync events, the number of files handled successfully.
29
+ * `errored_files` (int64): For sync events, the number of files that encountered errors.
30
+ * `bytes_synced` (int64): For sync events, the total number of bytes synced.
31
+ * `remote_server_type` (string): Associated Remote Server type, if any
22
32
 
23
33
 
24
34
  ---
@@ -35,13 +45,13 @@ Files::ExternalEvent.list(
35
45
 
36
46
  * `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.
37
47
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
38
- * `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `remote_server_type`, `event_type`, `created_at` or `status`.
39
- * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
40
- * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
41
- * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
42
- * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
43
- * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
44
- * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
48
+ * `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `remote_server_type`, `event_type`, `created_at`, `status`, `site_id` or `folder_behavior_id`.
49
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
50
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
51
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
52
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
53
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
54
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
45
55
 
46
56
 
47
57
  ---
@@ -55,3 +65,20 @@ Files::ExternalEvent.find(id)
55
65
  ### Parameters
56
66
 
57
67
  * `id` (int64): Required - External Event ID.
68
+
69
+
70
+ ---
71
+
72
+ ## Create External Event
73
+
74
+ ```
75
+ Files::ExternalEvent.create(
76
+ status: "status",
77
+ body: "body"
78
+ )
79
+ ```
80
+
81
+ ### Parameters
82
+
83
+ * `status` (string): Required - Status of event.
84
+ * `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
@@ -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,16 +55,74 @@ 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
+ # int64 - Folder Behavior ID
63
+ def folder_behavior_id
64
+ @attributes[:folder_behavior_id]
65
+ end
66
+
67
+ def folder_behavior_id=(value)
68
+ @attributes[:folder_behavior_id] = value
69
+ end
70
+
71
+ # int64 - For sync events, the number of files handled successfully.
72
+ def successful_files
73
+ @attributes[:successful_files]
74
+ end
75
+
76
+ def successful_files=(value)
77
+ @attributes[:successful_files] = value
78
+ end
79
+
80
+ # int64 - For sync events, the number of files that encountered errors.
81
+ def errored_files
82
+ @attributes[:errored_files]
83
+ end
84
+
85
+ def errored_files=(value)
86
+ @attributes[:errored_files] = value
87
+ end
88
+
89
+ # int64 - For sync events, the total number of bytes synced.
90
+ def bytes_synced
91
+ @attributes[:bytes_synced]
92
+ end
93
+
94
+ def bytes_synced=(value)
95
+ @attributes[:bytes_synced] = value
96
+ end
97
+
98
+ # string - Associated Remote Server type, if any
99
+ def remote_server_type
100
+ @attributes[:remote_server_type]
101
+ end
102
+
103
+ def remote_server_type=(value)
104
+ @attributes[:remote_server_type] = value
105
+ end
106
+
107
+ def save
108
+ if @attributes[:id]
109
+ raise NotImplementedError.new("The ExternalEvent object doesn't support updates.")
110
+ else
111
+ new_obj = ExternalEvent.create(@attributes, @options)
112
+ @attributes = new_obj.attributes
113
+ end
114
+ end
115
+
42
116
  # Parameters:
43
117
  # 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
118
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
45
- # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `remote_server_type`, `event_type`, `created_at` or `status`.
46
- # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
47
- # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
48
- # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
49
- # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
50
- # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
51
- # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
119
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `remote_server_type`, `event_type`, `created_at`, `status`, `site_id` or `folder_behavior_id`.
120
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
121
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
122
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
123
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
124
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
125
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`.
52
126
  def self.list(params = {}, options = {})
53
127
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
54
128
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
@@ -84,5 +158,18 @@ module Files
84
158
  def self.get(id, params = {}, options = {})
85
159
  find(id, params, options)
86
160
  end
161
+
162
+ # Parameters:
163
+ # status (required) - string - Status of event.
164
+ # body (required) - string - Event body
165
+ def self.create(params = {}, options = {})
166
+ raise InvalidParameterError.new("Bad parameter: status must be an String") if params.dig(:status) and !params.dig(:status).is_a?(String)
167
+ raise InvalidParameterError.new("Bad parameter: body must be an String") if params.dig(:body) and !params.dig(:body).is_a?(String)
168
+ raise MissingParameterError.new("Parameter missing: status") unless params.dig(:status)
169
+ raise MissingParameterError.new("Parameter missing: body") unless params.dig(:body)
170
+
171
+ response, options = Api.send_request("/external_events", :post, params, options)
172
+ ExternalEvent.new(response.data, options)
173
+ end
87
174
  end
88
175
  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.179
4
+ version: 1.0.183
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-06-22 00:00:00.000000000 Z
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