files.com 1.0.104 → 1.0.109
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/api_key.md +18 -2
- data/docs/app.md +2 -0
- data/docs/as2_key.md +1 -0
- data/docs/bundle_download.md +1 -0
- data/docs/bundle_recipient.md +1 -0
- data/docs/clickwrap.md +1 -0
- data/docs/dns_record.md +1 -0
- data/docs/external_event.md +43 -0
- data/docs/file.md +2 -4
- data/docs/file_comment.md +1 -0
- data/docs/file_part_upload.md +10 -10
- data/docs/folder.md +2 -4
- data/docs/group_user.md +1 -0
- data/docs/history_export.md +20 -20
- data/docs/history_export_result.md +0 -1
- data/docs/invoice.md +1 -0
- data/docs/ip_address.md +2 -0
- data/docs/lock.md +1 -0
- data/docs/message.md +1 -0
- data/docs/message_comment.md +1 -0
- data/docs/message_comment_reaction.md +1 -0
- data/docs/message_reaction.md +1 -0
- data/docs/payment.md +1 -0
- data/docs/project.md +1 -0
- data/docs/public_key.md +1 -0
- data/docs/remote_server.md +1 -0
- data/docs/session.md +10 -2
- data/docs/site.md +18 -2
- data/docs/sso_strategy.md +5 -0
- data/docs/usage_snapshot.md +1 -0
- data/docs/user_cipher_use.md +1 -0
- data/docs/user_request.md +1 -0
- data/lib/files.com.rb +1 -0
- data/lib/files.com/api_client.rb +5 -1
- data/lib/files.com/models/api_key.rb +12 -0
- data/lib/files.com/models/app.rb +5 -0
- data/lib/files.com/models/as2_key.rb +4 -3
- data/lib/files.com/models/bundle_download.rb +4 -3
- data/lib/files.com/models/bundle_recipient.rb +4 -3
- data/lib/files.com/models/clickwrap.rb +4 -3
- data/lib/files.com/models/dns_record.rb +4 -3
- data/lib/files.com/models/external_event.rb +66 -0
- data/lib/files.com/models/file.rb +2 -11
- data/lib/files.com/models/file_comment.rb +4 -3
- data/lib/files.com/models/file_part_upload.rb +5 -5
- data/lib/files.com/models/folder.rb +3 -12
- data/lib/files.com/models/group_user.rb +4 -3
- data/lib/files.com/models/history_export.rb +15 -15
- data/lib/files.com/models/history_export_result.rb +0 -2
- data/lib/files.com/models/invoice.rb +4 -3
- data/lib/files.com/models/ip_address.rb +8 -6
- data/lib/files.com/models/lock.rb +4 -3
- data/lib/files.com/models/message.rb +4 -3
- data/lib/files.com/models/message_comment.rb +4 -3
- data/lib/files.com/models/message_comment_reaction.rb +4 -3
- data/lib/files.com/models/message_reaction.rb +4 -3
- data/lib/files.com/models/payment.rb +4 -3
- data/lib/files.com/models/project.rb +4 -3
- data/lib/files.com/models/public_key.rb +4 -3
- data/lib/files.com/models/remote_server.rb +4 -3
- data/lib/files.com/models/session.rb +6 -0
- data/lib/files.com/models/site.rb +12 -0
- data/lib/files.com/models/sso_strategy.rb +14 -3
- data/lib/files.com/models/usage_snapshot.rb +4 -3
- data/lib/files.com/models/user_cipher_use.rb +4 -3
- data/lib/files.com/models/user_request.rb +4 -3
- metadata +4 -2
data/docs/project.md
CHANGED
@@ -29,6 +29,7 @@ Files::Project.list(
|
|
29
29
|
* `page` (int64): Current page number.
|
30
30
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
31
31
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
32
|
+
* `cursor` (string): Send cursor 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.
|
32
33
|
|
33
34
|
|
34
35
|
---
|
data/docs/public_key.md
CHANGED
@@ -37,6 +37,7 @@ Files::PublicKey.list(
|
|
37
37
|
* `page` (int64): Current page number.
|
38
38
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
39
39
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
40
|
+
* `cursor` (string): Send cursor 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.
|
40
41
|
|
41
42
|
|
42
43
|
---
|
data/docs/remote_server.md
CHANGED
@@ -93,6 +93,7 @@ Files::RemoteServer.list(
|
|
93
93
|
* `page` (int64): Current page number.
|
94
94
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
95
95
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
96
|
+
* `cursor` (string): Send cursor 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.
|
96
97
|
|
97
98
|
|
98
99
|
---
|
data/docs/session.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"login_token_domain": "https://mysite.files.com",
|
11
11
|
"max_dir_listing_size": 1,
|
12
12
|
"multiple_regions": true,
|
13
|
-
"read_only":
|
13
|
+
"read_only": true,
|
14
14
|
"root_path": "",
|
15
15
|
"site_id": 1,
|
16
16
|
"ssl_required": true,
|
@@ -74,5 +74,13 @@ Files::Session.create(
|
|
74
74
|
## Delete user session (log out)
|
75
75
|
|
76
76
|
```
|
77
|
-
Files::Session.delete
|
77
|
+
Files::Session.delete(
|
78
|
+
format: "",
|
79
|
+
session: ""
|
80
|
+
)
|
78
81
|
```
|
82
|
+
|
83
|
+
### Parameters
|
84
|
+
|
85
|
+
* `format` (string):
|
86
|
+
* `session` (object):
|
data/docs/site.md
CHANGED
@@ -234,18 +234,34 @@
|
|
234
234
|
## Show site settings
|
235
235
|
|
236
236
|
```
|
237
|
-
Files::Site.get
|
237
|
+
Files::Site.get(
|
238
|
+
format: "",
|
239
|
+
site: ""
|
240
|
+
)
|
238
241
|
```
|
239
242
|
|
243
|
+
### Parameters
|
244
|
+
|
245
|
+
* `format` (string):
|
246
|
+
* `site` (object):
|
247
|
+
|
240
248
|
|
241
249
|
---
|
242
250
|
|
243
251
|
## Get the most recent usage snapshot (usage data for billing purposes) for a Site
|
244
252
|
|
245
253
|
```
|
246
|
-
Files::Site.get_usage
|
254
|
+
Files::Site.get_usage(
|
255
|
+
format: "",
|
256
|
+
site: ""
|
257
|
+
)
|
247
258
|
```
|
248
259
|
|
260
|
+
### Parameters
|
261
|
+
|
262
|
+
* `format` (string):
|
263
|
+
* `site` (object):
|
264
|
+
|
249
265
|
|
250
266
|
---
|
251
267
|
|
data/docs/sso_strategy.md
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
"id": 1,
|
14
14
|
"saml_provider_cert_fingerprint": "",
|
15
15
|
"saml_provider_issuer_url": "",
|
16
|
+
"saml_provider_metadata_content": "",
|
16
17
|
"saml_provider_metadata_url": "",
|
17
18
|
"saml_provider_slo_target_url": "",
|
18
19
|
"saml_provider_sso_target_url": "",
|
@@ -23,6 +24,7 @@
|
|
23
24
|
"provision_groups": true,
|
24
25
|
"deprovision_users": true,
|
25
26
|
"deprovision_groups": true,
|
27
|
+
"deprovision_behavior": "disable",
|
26
28
|
"provision_group_default": "Employees",
|
27
29
|
"provision_group_exclusion": "Employees",
|
28
30
|
"provision_group_inclusion": "Employees",
|
@@ -52,6 +54,7 @@
|
|
52
54
|
* `id` (int64): ID
|
53
55
|
* `saml_provider_cert_fingerprint` (string): Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
|
54
56
|
* `saml_provider_issuer_url` (string): Identity provider issuer url
|
57
|
+
* `saml_provider_metadata_content` (string): Custom identity provider metadata
|
55
58
|
* `saml_provider_metadata_url` (string): Metadata URL for the SAML identity provider
|
56
59
|
* `saml_provider_slo_target_url` (string): Identity provider SLO endpoint
|
57
60
|
* `saml_provider_sso_target_url` (string): Identity provider SSO endpoint if saml_provider_metadata_url is not available.
|
@@ -62,6 +65,7 @@
|
|
62
65
|
* `provision_groups` (boolean): Auto-provision group membership based on group memberships on the SSO side?
|
63
66
|
* `deprovision_users` (boolean): Auto-deprovision users?
|
64
67
|
* `deprovision_groups` (boolean): Auto-deprovision group membership based on group memberships on the SSO side?
|
68
|
+
* `deprovision_behavior` (string): Method used for deprovisioning users.
|
65
69
|
* `provision_group_default` (string): Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
|
66
70
|
* `provision_group_exclusion` (string): Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
|
67
71
|
* `provision_group_inclusion` (string): Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
|
@@ -99,6 +103,7 @@ Files::SsoStrategy.list(
|
|
99
103
|
* `page` (int64): Current page number.
|
100
104
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
101
105
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
106
|
+
* `cursor` (string): Send cursor 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.
|
102
107
|
|
103
108
|
|
104
109
|
---
|
data/docs/usage_snapshot.md
CHANGED
@@ -51,3 +51,4 @@ Files::UsageSnapshot.list(
|
|
51
51
|
* `page` (int64): Current page number.
|
52
52
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
53
53
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
54
|
+
* `cursor` (string): Send cursor 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.
|
data/docs/user_cipher_use.md
CHANGED
@@ -39,3 +39,4 @@ Files::UserCipherUse.list(
|
|
39
39
|
* `page` (int64): Current page number.
|
40
40
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
41
41
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
42
|
+
* `cursor` (string): Send cursor 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.
|
data/docs/user_request.md
CHANGED
@@ -33,6 +33,7 @@ Files::UserRequest.list(
|
|
33
33
|
* `page` (int64): Current page number.
|
34
34
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
35
35
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
36
|
+
* `cursor` (string): Send cursor 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.
|
36
37
|
|
37
38
|
|
38
39
|
---
|
data/lib/files.com.rb
CHANGED
@@ -41,6 +41,7 @@ require "files.com/models/bundle_recipient"
|
|
41
41
|
require "files.com/models/clickwrap"
|
42
42
|
require "files.com/models/dns_record"
|
43
43
|
require "files.com/models/errors"
|
44
|
+
require "files.com/models/external_event"
|
44
45
|
require "files.com/models/file"
|
45
46
|
require "files.com/models/file_action"
|
46
47
|
require "files.com/models/file_comment"
|
data/lib/files.com/api_client.rb
CHANGED
@@ -170,7 +170,11 @@ module Files
|
|
170
170
|
end
|
171
171
|
|
172
172
|
private def api_url(url = "", base_url = nil)
|
173
|
-
Addressable::URI.
|
173
|
+
uri = Addressable::URI.new
|
174
|
+
uri.host = Addressable::URI.parse(base_url).host
|
175
|
+
uri.path = "/api/rest/v1" + url
|
176
|
+
uri.scheme = Addressable::URI.parse(base_url).scheme
|
177
|
+
uri.normalize!.to_s
|
174
178
|
end
|
175
179
|
|
176
180
|
private def check_api_key!(api_key)
|
@@ -180,7 +180,13 @@ module Files
|
|
180
180
|
list(params, options)
|
181
181
|
end
|
182
182
|
|
183
|
+
# Parameters:
|
184
|
+
# format - string
|
185
|
+
# api_key - object
|
183
186
|
def self.find_current(params = {}, options = {})
|
187
|
+
raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
|
188
|
+
raise InvalidParameterError.new("Bad parameter: api_key must be an Hash") if params.dig(:api_key) and !params.dig(:api_key).is_a?(Hash)
|
189
|
+
|
184
190
|
response, options = Api.send_request("/api_key", :get, params, options)
|
185
191
|
ApiKey.new(response.data, options)
|
186
192
|
end
|
@@ -248,7 +254,13 @@ module Files
|
|
248
254
|
ApiKey.new(response.data, options)
|
249
255
|
end
|
250
256
|
|
257
|
+
# Parameters:
|
258
|
+
# format - string
|
259
|
+
# api_key - object
|
251
260
|
def self.delete_current(params = {}, options = {})
|
261
|
+
raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
|
262
|
+
raise InvalidParameterError.new("Bad parameter: api_key must be an Hash") if params.dig(:api_key) and !params.dig(:api_key).is_a?(Hash)
|
263
|
+
|
252
264
|
response, _options = Api.send_request("/api_key", :delete, params, options)
|
253
265
|
response.data
|
254
266
|
end
|
data/lib/files.com/models/app.rb
CHANGED
@@ -34,6 +34,11 @@ module Files
|
|
34
34
|
@attributes[:logo_url]
|
35
35
|
end
|
36
36
|
|
37
|
+
# string - Screenshots of the App
|
38
|
+
def screenshot_list_urls
|
39
|
+
@attributes[:screenshot_list_urls]
|
40
|
+
end
|
41
|
+
|
37
42
|
# string - Logo thumbnail for the App
|
38
43
|
def logo_thumbnail_url
|
39
44
|
@attributes[:logo_thumbnail_url]
|
@@ -101,15 +101,16 @@ module Files
|
|
101
101
|
# page - int64 - Current page number.
|
102
102
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
103
103
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
104
|
+
# cursor - string - Send cursor 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.
|
104
105
|
def self.list(params = {}, options = {})
|
105
106
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
106
107
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
107
108
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
108
109
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
110
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
109
111
|
|
110
|
-
|
111
|
-
|
112
|
-
As2Key.new(entity_data, options)
|
112
|
+
List.new(As2Key, params) do
|
113
|
+
Api.send_request("/as2_keys", :get, params, options)
|
113
114
|
end
|
114
115
|
end
|
115
116
|
|
@@ -28,17 +28,18 @@ module Files
|
|
28
28
|
# page - int64 - Current page number.
|
29
29
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
30
30
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
31
|
+
# cursor - string - Send cursor 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.
|
31
32
|
# bundle_registration_id (required) - int64 - BundleRegistration ID
|
32
33
|
def self.list(params = {}, options = {})
|
33
34
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
34
35
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
35
36
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
37
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
36
38
|
raise InvalidParameterError.new("Bad parameter: bundle_registration_id must be an Integer") if params.dig(:bundle_registration_id) and !params.dig(:bundle_registration_id).is_a?(Integer)
|
37
39
|
raise MissingParameterError.new("Parameter missing: bundle_registration_id") unless params.dig(:bundle_registration_id)
|
38
40
|
|
39
|
-
|
40
|
-
|
41
|
-
BundleDownload.new(entity_data, options)
|
41
|
+
List.new(BundleDownload, params) do
|
42
|
+
Api.send_request("/bundle_downloads", :get, params, options)
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
@@ -39,18 +39,19 @@ module Files
|
|
39
39
|
# page - int64 - Current page number.
|
40
40
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
41
41
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
42
|
+
# cursor - string - Send cursor 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.
|
42
43
|
# bundle_id (required) - int64 - List recipients for the bundle with this ID.
|
43
44
|
def self.list(params = {}, options = {})
|
44
45
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
45
46
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
46
47
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
47
48
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
49
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
48
50
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params.dig(:bundle_id) and !params.dig(:bundle_id).is_a?(Integer)
|
49
51
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params.dig(:bundle_id)
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
-
BundleRecipient.new(entity_data, options)
|
53
|
+
List.new(BundleRecipient, params) do
|
54
|
+
Api.send_request("/bundle_recipients", :get, params, options)
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
@@ -111,14 +111,15 @@ module Files
|
|
111
111
|
# page - int64 - Current page number.
|
112
112
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
113
113
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
114
|
+
# cursor - string - Send cursor 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.
|
114
115
|
def self.list(params = {}, options = {})
|
115
116
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
116
117
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
117
118
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
119
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
118
120
|
|
119
|
-
|
120
|
-
|
121
|
-
Clickwrap.new(entity_data, options)
|
121
|
+
List.new(Clickwrap, params) do
|
122
|
+
Api.send_request("/clickwraps", :get, params, options)
|
122
123
|
end
|
123
124
|
end
|
124
125
|
|
@@ -33,14 +33,15 @@ module Files
|
|
33
33
|
# page - int64 - Current page number.
|
34
34
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
35
35
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
36
|
+
# cursor - string - Send cursor 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.
|
36
37
|
def self.list(params = {}, options = {})
|
37
38
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
38
39
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
39
40
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
41
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
40
42
|
|
41
|
-
|
42
|
-
|
43
|
-
DnsRecord.new(entity_data, options)
|
43
|
+
List.new(DnsRecord, params) do
|
44
|
+
Api.send_request("/dns_records", :get, params, options)
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class ExternalEvent
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# string - Type of event being recorded. Valid values: `remote_server_sync`, `lockout`, `ldap_login`, `saml_login`
|
13
|
+
def event_type
|
14
|
+
@attributes[:event_type]
|
15
|
+
end
|
16
|
+
|
17
|
+
# string - Status of event. Valid values: `error`
|
18
|
+
def status
|
19
|
+
@attributes[:status]
|
20
|
+
end
|
21
|
+
|
22
|
+
# string - Event body
|
23
|
+
def body
|
24
|
+
@attributes[:body]
|
25
|
+
end
|
26
|
+
|
27
|
+
# date-time - External event create date/time
|
28
|
+
def created_at
|
29
|
+
@attributes[:created_at]
|
30
|
+
end
|
31
|
+
|
32
|
+
# Parameters:
|
33
|
+
# page - int64 - Current page number.
|
34
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
35
|
+
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
36
|
+
# cursor - string - Send cursor 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
|
+
# 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`, `site_id`, `event_type`, `created_at` or `status`.
|
38
|
+
# 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`.
|
39
|
+
# 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`.
|
40
|
+
# 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`.
|
41
|
+
# 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`.
|
42
|
+
# 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`.
|
43
|
+
# 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`.
|
44
|
+
def self.list(params = {}, options = {})
|
45
|
+
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
46
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
47
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
48
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
49
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
50
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
51
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
52
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
53
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
54
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
55
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
56
|
+
|
57
|
+
List.new(ExternalEvent, params) do
|
58
|
+
Api.send_request("/external_events", :get, params, options)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.all(params = {}, options = {})
|
63
|
+
list(params, options)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -588,15 +588,6 @@ module Files
|
|
588
588
|
@write_io.write_nonblock *args
|
589
589
|
end
|
590
590
|
|
591
|
-
# int64 - File/Folder ID
|
592
|
-
def id
|
593
|
-
@attributes[:id]
|
594
|
-
end
|
595
|
-
|
596
|
-
def id=(value)
|
597
|
-
@attributes[:id] = value
|
598
|
-
end
|
599
|
-
|
600
591
|
# string - File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
601
592
|
def path
|
602
593
|
@attributes[:path]
|
@@ -857,7 +848,7 @@ module Files
|
|
857
848
|
end
|
858
849
|
|
859
850
|
# Parameters:
|
860
|
-
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
851
|
+
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
861
852
|
def delete(params = {})
|
862
853
|
params ||= {}
|
863
854
|
params[:path] = @attributes[:path]
|
@@ -946,7 +937,7 @@ module Files
|
|
946
937
|
end
|
947
938
|
|
948
939
|
# Parameters:
|
949
|
-
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
940
|
+
# recursive - boolean - If true, will recursively delete folers. Otherwise, will error on non-empty folders.
|
950
941
|
def self.delete(path, params = {}, options = {})
|
951
942
|
params ||= {}
|
952
943
|
params[:path] = path
|
@@ -86,6 +86,7 @@ module Files
|
|
86
86
|
# page - int64 - Current page number.
|
87
87
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
88
88
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
89
|
+
# cursor - string - Send cursor 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.
|
89
90
|
# path (required) - string - Path to operate on.
|
90
91
|
def self.list_for(path, params = {}, options = {})
|
91
92
|
params ||= {}
|
@@ -93,12 +94,12 @@ module Files
|
|
93
94
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
94
95
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
95
96
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
97
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
96
98
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
97
99
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
98
100
|
|
99
|
-
|
100
|
-
|
101
|
-
FileComment.new(entity_data, options)
|
101
|
+
List.new(FileComment, params) do
|
102
|
+
Api.send_request("/file_comments/files/#{params[:path]}", :get, params, options)
|
102
103
|
end
|
103
104
|
end
|
104
105
|
|
@@ -24,7 +24,7 @@ module Files
|
|
24
24
|
@attributes[:ask_about_overwrites]
|
25
25
|
end
|
26
26
|
|
27
|
-
#
|
27
|
+
# int64 - Currently unused
|
28
28
|
def available_parts
|
29
29
|
@attributes[:available_parts]
|
30
30
|
end
|
@@ -44,7 +44,7 @@ module Files
|
|
44
44
|
@attributes[:http_method]
|
45
45
|
end
|
46
46
|
|
47
|
-
#
|
47
|
+
# int64 - Currently unused
|
48
48
|
def next_partsize
|
49
49
|
@attributes[:next_partsize]
|
50
50
|
end
|
@@ -54,17 +54,17 @@ module Files
|
|
54
54
|
@attributes[:parallel_parts]
|
55
55
|
end
|
56
56
|
|
57
|
-
#
|
57
|
+
# object - Additional upload parameters
|
58
58
|
def parameters
|
59
59
|
@attributes[:parameters]
|
60
60
|
end
|
61
61
|
|
62
|
-
#
|
62
|
+
# int64 - Currently unused
|
63
63
|
def part_number
|
64
64
|
@attributes[:part_number]
|
65
65
|
end
|
66
66
|
|
67
|
-
#
|
67
|
+
# int64 - Currently unused
|
68
68
|
def partsize
|
69
69
|
@attributes[:partsize]
|
70
70
|
end
|