files.com 1.0.84 → 1.0.89
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 +13 -1
- data/docs/app.md +57 -0
- data/docs/automation.md +9 -1
- data/docs/behavior.md +30 -14
- data/docs/bundle.md +8 -0
- data/docs/file.md +0 -4
- data/docs/group.md +8 -0
- data/docs/history.md +16 -0
- data/docs/ip_address.md +18 -0
- data/docs/message.md +11 -11
- data/docs/notification.md +10 -2
- data/docs/permission.md +11 -3
- data/docs/public_ip_address.md +13 -0
- data/docs/request.md +6 -25
- data/docs/session.md +2 -2
- data/docs/site.md +4 -0
- data/docs/style.md +1 -1
- data/docs/usage_daily_snapshot.md +8 -0
- data/docs/user.md +16 -2
- data/lib/files.com.rb +2 -0
- data/lib/files.com/models/api_key.rb +30 -4
- data/lib/files.com/models/app.rb +101 -0
- data/lib/files.com/models/automation.rb +19 -4
- data/lib/files.com/models/behavior.rb +53 -23
- data/lib/files.com/models/bundle.rb +19 -4
- data/lib/files.com/models/file.rb +7 -11
- data/lib/files.com/models/file_action.rb +6 -6
- data/lib/files.com/models/file_comment.rb +1 -1
- data/lib/files.com/models/folder.rb +2 -2
- data/lib/files.com/models/group.rb +18 -3
- data/lib/files.com/models/history.rb +43 -16
- data/lib/files.com/models/ip_address.rb +15 -0
- data/lib/files.com/models/lock.rb +4 -4
- data/lib/files.com/models/message.rb +5 -5
- data/lib/files.com/models/notification.rb +20 -5
- data/lib/files.com/models/permission.rb +21 -6
- data/lib/files.com/models/public_ip_address.rb +22 -0
- data/lib/files.com/models/request.rb +15 -28
- data/lib/files.com/models/session.rb +1 -1
- data/lib/files.com/models/site.rb +6 -0
- data/lib/files.com/models/style.rb +8 -8
- data/lib/files.com/models/usage_daily_snapshot.rb +18 -3
- data/lib/files.com/models/user.rb +30 -5
- metadata +6 -2
data/docs/request.md
CHANGED
@@ -40,6 +40,8 @@ Files::Request.list(path,
|
|
40
40
|
* `page` (int64): Current page number.
|
41
41
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
42
42
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
43
|
+
* `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.
|
44
|
+
* `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 `site_id`, `folder_id` or `destination`.
|
43
45
|
* `mine` (boolean): Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
44
46
|
* `path` (string): Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
45
47
|
|
@@ -49,7 +51,7 @@ Files::Request.list(path,
|
|
49
51
|
## List Requests
|
50
52
|
|
51
53
|
```
|
52
|
-
Files::Request.
|
54
|
+
Files::Request.find_folder(path,
|
53
55
|
page: 1,
|
54
56
|
per_page: 1,
|
55
57
|
mine: true
|
@@ -61,8 +63,10 @@ Files::Request.folders(path,
|
|
61
63
|
* `page` (int64): Current page number.
|
62
64
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
63
65
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
66
|
+
* `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.
|
67
|
+
* `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 `site_id`, `folder_id` or `destination`.
|
64
68
|
* `mine` (boolean): Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
65
|
-
* `path` (string): Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
69
|
+
* `path` (string): Required - Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
66
70
|
|
67
71
|
|
68
72
|
---
|
@@ -94,26 +98,3 @@ Files::Request.delete(id)
|
|
94
98
|
### Parameters
|
95
99
|
|
96
100
|
* `id` (int64): Required - Request ID.
|
97
|
-
|
98
|
-
|
99
|
-
---
|
100
|
-
|
101
|
-
## List Requests
|
102
|
-
|
103
|
-
```
|
104
|
-
request = Files::Request.list_for(path).first
|
105
|
-
|
106
|
-
request.folders(
|
107
|
-
page: 1,
|
108
|
-
per_page: 1,
|
109
|
-
mine: true
|
110
|
-
)
|
111
|
-
```
|
112
|
-
|
113
|
-
### Parameters
|
114
|
-
|
115
|
-
* `page` (int64): Current page number.
|
116
|
-
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
117
|
-
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
118
|
-
* `mine` (boolean): Only show requests of the current user? (Defaults to true if current user is not a site admin.)
|
119
|
-
* `path` (string): Path to show requests for. If omitted, shows all paths. Send `/` to represent the root directory.
|
data/docs/session.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
```
|
6
6
|
{
|
7
|
-
"id":
|
7
|
+
"id": "60525f92e859c4c3d74cb02fd176b1525901b525",
|
8
8
|
"language": "en",
|
9
9
|
"login_token": "@tok-randomcode",
|
10
10
|
"login_token_domain": "https://mysite.files.com",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
}
|
26
26
|
```
|
27
27
|
|
28
|
-
* `id` (
|
28
|
+
* `id` (string): Session ID
|
29
29
|
* `language` (string): Session language
|
30
30
|
* `login_token` (string): Login token. If set, this token will allow your user to log in via browser at the domain in `login_token_domain`.
|
31
31
|
* `login_token_domain` (string): Domain to use with `login_token`.
|
data/docs/site.md
CHANGED
@@ -64,6 +64,7 @@
|
|
64
64
|
"max_prior_passwords": 1,
|
65
65
|
"next_billing_amount": "",
|
66
66
|
"next_billing_date": "Apr 20",
|
67
|
+
"office_integration_available": true,
|
67
68
|
"opt_out_global": true,
|
68
69
|
"overage_notified_at": "2000-01-01T01:00:00Z",
|
69
70
|
"overage_notify": true,
|
@@ -176,6 +177,7 @@
|
|
176
177
|
* `max_prior_passwords` (int64): Number of prior passwords to disallow
|
177
178
|
* `next_billing_amount` (double): Next billing amount
|
178
179
|
* `next_billing_date` (string): Next billing date
|
180
|
+
* `office_integration_available` (boolean): Allow users to use Office for the web?
|
179
181
|
* `opt_out_global` (boolean): Use servers in the USA only?
|
180
182
|
* `overage_notified_at` (date-time): Last time the site was notified about an overage
|
181
183
|
* `overage_notify` (boolean): Notify site email of overages?
|
@@ -270,6 +272,7 @@ Files::Site.update(
|
|
270
272
|
desktop_app_session_lifetime: 1,
|
271
273
|
folder_permissions_groups_only: true,
|
272
274
|
welcome_screen: "user_controlled",
|
275
|
+
office_integration_available: true,
|
273
276
|
session_expiry: 1.0,
|
274
277
|
ssl_required: true,
|
275
278
|
tls_disabled: true,
|
@@ -361,6 +364,7 @@ Files::Site.update(
|
|
361
364
|
* `desktop_app_session_lifetime` (int64): Desktop app session lifetime (in hours)
|
362
365
|
* `folder_permissions_groups_only` (boolean): If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
|
363
366
|
* `welcome_screen` (string): Does the welcome screen appear?
|
367
|
+
* `office_integration_available` (boolean): Allow users to use Office for the web?
|
364
368
|
* `session_expiry` (double): Session expiry in hours
|
365
369
|
* `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
|
366
370
|
* `tls_disabled` (boolean): Is TLS disabled(site setting)?
|
data/docs/style.md
CHANGED
@@ -35,3 +35,11 @@ Files::UsageDailySnapshot.list(
|
|
35
35
|
* `page` (int64): Current page number.
|
36
36
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
37
37
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
38
|
+
* `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.
|
39
|
+
* `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 `site_id`, `date` or `usage_snapshot_id`.
|
40
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
41
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
42
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
43
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
44
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
45
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
data/docs/user.md
CHANGED
@@ -32,6 +32,7 @@
|
|
32
32
|
"name": "John Doe",
|
33
33
|
"notes": "Internal notes on this user.",
|
34
34
|
"notification_daily_send_time": 18,
|
35
|
+
"office_integration_enabled": true,
|
35
36
|
"password_set_at": "2000-01-01T01:00:00Z",
|
36
37
|
"password_validity_days": 1,
|
37
38
|
"public_keys_count": 1,
|
@@ -79,6 +80,7 @@
|
|
79
80
|
* `name` (string): User's full name
|
80
81
|
* `notes` (string): Any internal notes on the user
|
81
82
|
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
83
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
82
84
|
* `password_set_at` (date-time): Last time the user's password was set
|
83
85
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
84
86
|
* `public_keys_count` (int64): Number of public keys associated with this user
|
@@ -124,6 +126,14 @@ Files::User.list(
|
|
124
126
|
* `page` (int64): Current page number.
|
125
127
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
126
128
|
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
129
|
+
* `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.
|
130
|
+
* `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 `active`, `master_admin`, `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `username`, `notes`, `site_admin`, `receive_admin_alerts`, `allowed_ips`, `password_validity_days`, `ssl_required` or `not_site_admin`.
|
131
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
132
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
133
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
134
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
135
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
136
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `username`, `email`, `notes`, `site_admin`, `allowed_ips`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
127
137
|
* `ids` (string): comma-separated list of User IDs
|
128
138
|
* `q[username]` (string): List users matching username.
|
129
139
|
* `q[email]` (string): List users matching email.
|
@@ -133,8 +143,6 @@ Files::User.list(
|
|
133
143
|
* `q[password_validity_days]` (string): If set, list only users with overridden password validity days setting.
|
134
144
|
* `q[ssl_required]` (string): If set, list only users with overridden SSL required setting.
|
135
145
|
* `search` (string): Searches for partial matches of name, username, or email.
|
136
|
-
* `sort_by[last_login_at]` (string): If set, sort users by 'last_login_at' in either 'asc' or 'desc' direction
|
137
|
-
* `sort_by[authenticate_until]` (string): If set, sort users by 'authenticate_until' in either 'asc' or 'desc' direction
|
138
146
|
|
139
147
|
|
140
148
|
---
|
@@ -175,6 +183,7 @@ Files::User.create(
|
|
175
183
|
notification_daily_send_time: 18,
|
176
184
|
name: "John Doe",
|
177
185
|
notes: "Internal notes on this user.",
|
186
|
+
office_integration_enabled: true,
|
178
187
|
password_validity_days: 1,
|
179
188
|
receive_admin_alerts: true,
|
180
189
|
require_password_change: true,
|
@@ -219,6 +228,7 @@ Files::User.create(
|
|
219
228
|
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
220
229
|
* `name` (string): User's full name
|
221
230
|
* `notes` (string): Any internal notes on the user
|
231
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
222
232
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
223
233
|
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
224
234
|
* `require_password_change` (boolean): Is a password change required upon next user login?
|
@@ -299,6 +309,7 @@ Files::User.update(id,
|
|
299
309
|
notification_daily_send_time: 18,
|
300
310
|
name: "John Doe",
|
301
311
|
notes: "Internal notes on this user.",
|
312
|
+
office_integration_enabled: true,
|
302
313
|
password_validity_days: 1,
|
303
314
|
receive_admin_alerts: true,
|
304
315
|
require_password_change: true,
|
@@ -344,6 +355,7 @@ Files::User.update(id,
|
|
344
355
|
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
345
356
|
* `name` (string): User's full name
|
346
357
|
* `notes` (string): Any internal notes on the user
|
358
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
347
359
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
348
360
|
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
349
361
|
* `require_password_change` (boolean): Is a password change required upon next user login?
|
@@ -445,6 +457,7 @@ user.update(
|
|
445
457
|
notification_daily_send_time: 18,
|
446
458
|
name: "John Doe",
|
447
459
|
notes: "Internal notes on this user.",
|
460
|
+
office_integration_enabled: true,
|
448
461
|
password_validity_days: 1,
|
449
462
|
receive_admin_alerts: true,
|
450
463
|
require_password_change: true,
|
@@ -490,6 +503,7 @@ user.update(
|
|
490
503
|
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
491
504
|
* `name` (string): User's full name
|
492
505
|
* `notes` (string): Any internal notes on the user
|
506
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
493
507
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
494
508
|
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
495
509
|
* `require_password_change` (boolean): Is a password change required upon next user login?
|
data/lib/files.com.rb
CHANGED
@@ -29,6 +29,7 @@ require "files.com/list"
|
|
29
29
|
require "files.com/models/account_line_item"
|
30
30
|
require "files.com/models/action"
|
31
31
|
require "files.com/models/api_key"
|
32
|
+
require "files.com/models/app"
|
32
33
|
require "files.com/models/as2_key"
|
33
34
|
require "files.com/models/auto"
|
34
35
|
require "files.com/models/automation"
|
@@ -63,6 +64,7 @@ require "files.com/models/payment_line_item"
|
|
63
64
|
require "files.com/models/permission"
|
64
65
|
require "files.com/models/preview"
|
65
66
|
require "files.com/models/project"
|
67
|
+
require "files.com/models/public_ip_address"
|
66
68
|
require "files.com/models/public_key"
|
67
69
|
require "files.com/models/remote_server"
|
68
70
|
require "files.com/models/request"
|
@@ -68,6 +68,15 @@ module Files
|
|
68
68
|
@attributes[:name] = value
|
69
69
|
end
|
70
70
|
|
71
|
+
# string - Folder path restriction for this api key. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
72
|
+
def path
|
73
|
+
@attributes[:path]
|
74
|
+
end
|
75
|
+
|
76
|
+
def path=(value)
|
77
|
+
@attributes[:path] = value
|
78
|
+
end
|
79
|
+
|
71
80
|
# string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
72
81
|
def permission_set
|
73
82
|
@attributes[:permission_set]
|
@@ -140,15 +149,30 @@ module Files
|
|
140
149
|
# page - int64 - Current page number.
|
141
150
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
142
151
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
152
|
+
# 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.
|
153
|
+
# 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 `deleted_at` and `expires_at`.
|
154
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `expires_at`.
|
155
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `expires_at`.
|
156
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `expires_at`.
|
157
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `expires_at`.
|
158
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `expires_at`.
|
159
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `expires_at`.
|
143
160
|
def self.list(params = {}, options = {})
|
144
161
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
145
162
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
146
163
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
147
164
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
165
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
166
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
167
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
168
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
169
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
170
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
171
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
172
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
173
|
+
|
174
|
+
List.new(ApiKey, params) do
|
175
|
+
Api.send_request("/api_keys", :get, params, options)
|
152
176
|
end
|
153
177
|
end
|
154
178
|
|
@@ -182,11 +206,13 @@ module Files
|
|
182
206
|
# name - string - Internal name for the API Key. For your use.
|
183
207
|
# expires_at - string - API Key expiration date
|
184
208
|
# permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
209
|
+
# path - string - Folder path restriction for this api key.
|
185
210
|
def self.create(params = {}, options = {})
|
186
211
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
187
212
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
188
213
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
189
214
|
raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params.dig(:permission_set) and !params.dig(:permission_set).is_a?(String)
|
215
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
190
216
|
|
191
217
|
response, options = Api.send_request("/api_keys", :post, params, options)
|
192
218
|
ApiKey.new(response.data, options)
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class App
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# string - Name of the App
|
13
|
+
def name
|
14
|
+
@attributes[:name]
|
15
|
+
end
|
16
|
+
|
17
|
+
# string - Long form description of the App
|
18
|
+
def extended_description
|
19
|
+
@attributes[:extended_description]
|
20
|
+
end
|
21
|
+
|
22
|
+
# string - Collection of named links to documentation
|
23
|
+
def documentation_links
|
24
|
+
@attributes[:documentation_links]
|
25
|
+
end
|
26
|
+
|
27
|
+
# string - Full size logo for the App
|
28
|
+
def logo_url
|
29
|
+
@attributes[:logo_url]
|
30
|
+
end
|
31
|
+
|
32
|
+
# string - Logo thumbnail for the App
|
33
|
+
def logo_thumbnail_url
|
34
|
+
@attributes[:logo_thumbnail_url]
|
35
|
+
end
|
36
|
+
|
37
|
+
# string - Associated SSO Strategy type, if any
|
38
|
+
def sso_strategy_type
|
39
|
+
@attributes[:sso_strategy_type]
|
40
|
+
end
|
41
|
+
|
42
|
+
# string - Associated Remote Server type, if any
|
43
|
+
def remote_server_type
|
44
|
+
@attributes[:remote_server_type]
|
45
|
+
end
|
46
|
+
|
47
|
+
# string - Associated Folder Behavior type, if any
|
48
|
+
def folder_behavior_type
|
49
|
+
@attributes[:folder_behavior_type]
|
50
|
+
end
|
51
|
+
|
52
|
+
# string - Link to external homepage
|
53
|
+
def external_homepage_url
|
54
|
+
@attributes[:external_homepage_url]
|
55
|
+
end
|
56
|
+
|
57
|
+
# string - The type of the App
|
58
|
+
def app_type
|
59
|
+
@attributes[:app_type]
|
60
|
+
end
|
61
|
+
|
62
|
+
# boolean - Is featured on the App listing?
|
63
|
+
def featured
|
64
|
+
@attributes[:featured]
|
65
|
+
end
|
66
|
+
|
67
|
+
# Parameters:
|
68
|
+
# page - int64 - Current page number.
|
69
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
70
|
+
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
71
|
+
# 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.
|
72
|
+
# 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 `name` and `app_type`.
|
73
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `name` and `app_type`.
|
74
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `name` and `app_type`.
|
75
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `name` and `app_type`.
|
76
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `name` and `app_type`.
|
77
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `name` and `app_type`.
|
78
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `name` and `app_type`.
|
79
|
+
def self.list(params = {}, options = {})
|
80
|
+
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
81
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
82
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
83
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
84
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
85
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
86
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
87
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
88
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
89
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
90
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
91
|
+
|
92
|
+
List.new(App, params) do
|
93
|
+
Api.send_request("/apps", :get, params, options)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def self.all(params = {}, options = {})
|
98
|
+
list(params, options)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -183,16 +183,31 @@ module Files
|
|
183
183
|
# page - int64 - Current page number.
|
184
184
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
185
185
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
186
|
-
#
|
186
|
+
# 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.
|
187
|
+
# 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 `site_id` and `automation`.
|
188
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `automation`.
|
189
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `automation`.
|
190
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `automation`.
|
191
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `automation`.
|
192
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `automation`.
|
193
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `automation`.
|
194
|
+
# automation - string - DEPRECATED: Type of automation to filter by. Use `filter[automation]` instead.
|
187
195
|
def self.list(params = {}, options = {})
|
188
196
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
189
197
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
190
198
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
199
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
200
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
201
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
202
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
203
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
204
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
205
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
206
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
191
207
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if params.dig(:automation) and !params.dig(:automation).is_a?(String)
|
192
208
|
|
193
|
-
|
194
|
-
|
195
|
-
Automation.new(entity_data, options)
|
209
|
+
List.new(Automation, params) do
|
210
|
+
Api.send_request("/automations", :get, params, options)
|
196
211
|
end
|
197
212
|
end
|
198
213
|
|
@@ -108,16 +108,31 @@ module Files
|
|
108
108
|
# page - int64 - Current page number.
|
109
109
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
110
110
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
111
|
+
# 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.
|
112
|
+
# 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 `site_id` and `behavior`.
|
113
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
114
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `behavior`.
|
115
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `behavior`.
|
116
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
117
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `behavior`.
|
118
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `behavior`.
|
111
119
|
# behavior - string - If set, only shows folder behaviors matching this behavior type.
|
112
120
|
def self.list(params = {}, options = {})
|
113
121
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
114
122
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
115
123
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
124
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
125
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
126
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
127
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
128
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
129
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
130
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
131
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
116
132
|
raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
|
117
133
|
|
118
|
-
|
119
|
-
|
120
|
-
Behavior.new(entity_data, options)
|
134
|
+
List.new(Behavior, params) do
|
135
|
+
Api.send_request("/behaviors", :get, params, options)
|
121
136
|
end
|
122
137
|
end
|
123
138
|
|
@@ -125,46 +140,61 @@ module Files
|
|
125
140
|
list(params, options)
|
126
141
|
end
|
127
142
|
|
143
|
+
# Parameters:
|
144
|
+
# id (required) - int64 - Behavior ID.
|
145
|
+
def self.find(id, params = {}, options = {})
|
146
|
+
params ||= {}
|
147
|
+
params[:id] = id
|
148
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
149
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
150
|
+
|
151
|
+
response, options = Api.send_request("/behaviors/#{params[:id]}", :get, params, options)
|
152
|
+
Behavior.new(response.data, options)
|
153
|
+
end
|
154
|
+
|
155
|
+
def self.get(id, params = {}, options = {})
|
156
|
+
find(id, params, options)
|
157
|
+
end
|
158
|
+
|
128
159
|
# Parameters:
|
129
160
|
# page - int64 - Current page number.
|
130
161
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
131
162
|
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
163
|
+
# 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.
|
164
|
+
# 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 `site_id` and `behavior`.
|
165
|
+
# filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
166
|
+
# filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `behavior`.
|
167
|
+
# filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `behavior`.
|
168
|
+
# filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
169
|
+
# filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `behavior`.
|
170
|
+
# filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `behavior`.
|
132
171
|
# path (required) - string - Path to operate on.
|
133
172
|
# recursive - string - Show behaviors above this path?
|
134
|
-
# behavior - string - If set only shows folder behaviors matching this behavior type.
|
173
|
+
# behavior - string - DEPRECATED: If set only shows folder behaviors matching this behavior type. Use `filter[behavior]` instead.
|
135
174
|
def self.list_for(path, params = {}, options = {})
|
136
175
|
params ||= {}
|
137
176
|
params[:path] = path
|
138
177
|
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
139
178
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
140
179
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
180
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
181
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
|
182
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
|
183
|
+
raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
|
184
|
+
raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
|
185
|
+
raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
|
186
|
+
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
|
187
|
+
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
|
141
188
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
142
189
|
raise InvalidParameterError.new("Bad parameter: recursive must be an String") if params.dig(:recursive) and !params.dig(:recursive).is_a?(String)
|
143
190
|
raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
|
144
191
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
145
192
|
|
146
|
-
|
147
|
-
|
148
|
-
Behavior.new(entity_data, options)
|
193
|
+
List.new(Behavior, params) do
|
194
|
+
Api.send_request("/behaviors/folders/#{params[:path]}", :get, params, options)
|
149
195
|
end
|
150
196
|
end
|
151
197
|
|
152
|
-
# Parameters:
|
153
|
-
# id (required) - int64 - Behavior ID.
|
154
|
-
def self.find(id, params = {}, options = {})
|
155
|
-
params ||= {}
|
156
|
-
params[:id] = id
|
157
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
158
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
159
|
-
|
160
|
-
response, options = Api.send_request("/behaviors/#{params[:id]}", :get, params, options)
|
161
|
-
Behavior.new(response.data, options)
|
162
|
-
end
|
163
|
-
|
164
|
-
def self.get(id, params = {}, options = {})
|
165
|
-
find(id, params, options)
|
166
|
-
end
|
167
|
-
|
168
198
|
# Parameters:
|
169
199
|
# value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
170
200
|
# attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|