files.com 1.0.192 → 1.0.196

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: c33dcbebf1ea039dd95eea3a3c0d5f48e3083e10c94d6fe3badb6894a1305bc5
4
- data.tar.gz: '089a9cb429011b238d26837f457cf5355440b93d8787b89e6e1ec0698c7e6b8b'
3
+ metadata.gz: 3fd4c70c3f7f2ca49bf0ba856ad98ee8b4a0ffa08489910fc0fa7adaa6349190
4
+ data.tar.gz: 7211c6794a639b23d9b618c3253363a86e2297100c27a574da3c4662207c6b59
5
5
  SHA512:
6
- metadata.gz: e9b6205bed60ce3e8cc2601a419d77d89046fd03c8ca5c3b7dffdef3292f312d6d729e29f14437b6c02649fa5c144c9df61d01c8315f4ef6a73a755cf68a2e2d
7
- data.tar.gz: 9c77314bb77b717342f89f40098afec1ed2a9286ee63835d0fab8c1f8daf93ea54bdd95f8845586c5f5908077183734f4bd16eea7f7acee9383005cfa6c06ffd
6
+ metadata.gz: e9392936c572b0962e78901ca428ae8d24b1ab70988c124b047960bf154bbd07ffd62b0a37855e7508b09d004f8084f005f51e06a59cf2ebe096bd5821296c34
7
+ data.tar.gz: 6c7e8fcb64a7c3b3abd5940f4b5ba7d83714c91a07916561a4f2d9f287f77af62ec40e1a7713d4621cb3e1a21dccb0ba88c01321c2bd6fa3bd5411b9d39c9a89
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.192
1
+ 1.0.196
data/docs/behavior.md CHANGED
@@ -101,7 +101,7 @@ Files::Behavior.create(
101
101
 
102
102
  ### Parameters
103
103
 
104
- * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
104
+ * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
105
105
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
106
106
  * `path` (string): Required - Folder behaviors path.
107
107
  * `behavior` (string): Required - Behavior type.
@@ -146,7 +146,7 @@ Files::Behavior.update(id,
146
146
  ### Parameters
147
147
 
148
148
  * `id` (int64): Required - Behavior ID.
149
- * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
149
+ * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
150
150
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
151
151
  * `behavior` (string): Behavior type.
152
152
  * `path` (string): Folder behaviors path.
@@ -181,7 +181,7 @@ behavior.update(
181
181
  ### Parameters
182
182
 
183
183
  * `id` (int64): Required - Behavior ID.
184
- * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
184
+ * `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
185
185
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
186
186
  * `behavior` (string): Behavior type.
187
187
  * `path` (string): Folder behaviors path.
data/docs/file.md CHANGED
@@ -148,6 +148,85 @@ Files::File.delete(path,
148
148
  * `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
149
149
 
150
150
 
151
+ ---
152
+
153
+ ## Return metadata for file/folder
154
+
155
+ ```
156
+ Files::File.metadata(path,
157
+ with_previews: true,
158
+ with_priority_color: true
159
+ )
160
+ ```
161
+
162
+ ### Parameters
163
+
164
+ * `path` (string): Required - Path to operate on.
165
+ * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
166
+ * `with_previews` (boolean): Include file preview information?
167
+ * `with_priority_color` (boolean): Include file priority color information?
168
+
169
+
170
+ ---
171
+
172
+ ## Copy file/folder
173
+
174
+ ```
175
+ Files::File.copy(path,
176
+ destination: "destination",
177
+ structure: true
178
+ )
179
+ ```
180
+
181
+ ### Parameters
182
+
183
+ * `path` (string): Required - Path to operate on.
184
+ * `destination` (string): Required - Copy destination path.
185
+ * `structure` (boolean): Copy structure only?
186
+
187
+
188
+ ---
189
+
190
+ ## Move file/folder
191
+
192
+ ```
193
+ Files::File.move(path,
194
+ destination: "destination"
195
+ )
196
+ ```
197
+
198
+ ### Parameters
199
+
200
+ * `path` (string): Required - Path to operate on.
201
+ * `destination` (string): Required - Move destination path.
202
+
203
+
204
+ ---
205
+
206
+ ## Begin file upload
207
+
208
+ ```
209
+ Files::File.begin_upload(path,
210
+ mkdir_parents: true,
211
+ part: 1,
212
+ parts: 1,
213
+ ref: "upload-1",
214
+ restart: 1,
215
+ with_rename: true
216
+ )
217
+ ```
218
+
219
+ ### Parameters
220
+
221
+ * `path` (string): Required - Path to operate on.
222
+ * `mkdir_parents` (boolean): Create parent directories if they do not exist?
223
+ * `part` (int64): Part if uploading a part.
224
+ * `parts` (int64): How many parts to fetch?
225
+ * `ref` (string):
226
+ * `restart` (int64): File byte offset to restart from.
227
+ * `with_rename` (boolean): Allow file rename instead of overwrite?
228
+
229
+
151
230
  ---
152
231
 
153
232
  ## Download file
@@ -206,3 +285,90 @@ file.delete(
206
285
 
207
286
  * `path` (string): Required - Path to operate on.
208
287
  * `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
288
+
289
+
290
+ ---
291
+
292
+ ## Return metadata for file/folder
293
+
294
+ ```
295
+ file = Files::File.list_for(path).first
296
+
297
+ file.metadata(
298
+ with_previews: true,
299
+ with_priority_color: true
300
+ )
301
+ ```
302
+
303
+ ### Parameters
304
+
305
+ * `path` (string): Required - Path to operate on.
306
+ * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
307
+ * `with_previews` (boolean): Include file preview information?
308
+ * `with_priority_color` (boolean): Include file priority color information?
309
+
310
+
311
+ ---
312
+
313
+ ## Copy file/folder
314
+
315
+ ```
316
+ file = Files::File.list_for(path).first
317
+
318
+ file.copy(
319
+ destination: "destination",
320
+ structure: true
321
+ )
322
+ ```
323
+
324
+ ### Parameters
325
+
326
+ * `path` (string): Required - Path to operate on.
327
+ * `destination` (string): Required - Copy destination path.
328
+ * `structure` (boolean): Copy structure only?
329
+
330
+
331
+ ---
332
+
333
+ ## Move file/folder
334
+
335
+ ```
336
+ file = Files::File.list_for(path).first
337
+
338
+ file.move(
339
+ destination: "destination"
340
+ )
341
+ ```
342
+
343
+ ### Parameters
344
+
345
+ * `path` (string): Required - Path to operate on.
346
+ * `destination` (string): Required - Move destination path.
347
+
348
+
349
+ ---
350
+
351
+ ## Begin file upload
352
+
353
+ ```
354
+ file = Files::File.list_for(path).first
355
+
356
+ file.begin_upload(
357
+ mkdir_parents: true,
358
+ part: 1,
359
+ parts: 1,
360
+ ref: "upload-1",
361
+ restart: 1,
362
+ with_rename: true
363
+ )
364
+ ```
365
+
366
+ ### Parameters
367
+
368
+ * `path` (string): Required - Path to operate on.
369
+ * `mkdir_parents` (boolean): Create parent directories if they do not exist?
370
+ * `part` (int64): Part if uploading a part.
371
+ * `parts` (int64): How many parts to fetch?
372
+ * `ref` (string):
373
+ * `restart` (int64): File byte offset to restart from.
374
+ * `with_rename` (boolean): Allow file rename instead of overwrite?
data/docs/file_action.md CHANGED
@@ -11,129 +11,3 @@
11
11
 
12
12
  * `status` (string): Status of file operation. Possible values: completed, enqueued.
13
13
  * `file_migration_id` (int64): If status is enqueued, this is the id of the FileMigration to check for status updates.
14
-
15
-
16
- ---
17
-
18
- ## Copy file/folder
19
-
20
- ```
21
- Files::FileAction.copy(path,
22
- destination: "destination",
23
- structure: true
24
- )
25
- ```
26
-
27
- ### Parameters
28
-
29
- * `path` (string): Required - Path to operate on.
30
- * `destination` (string): Required - Copy destination path.
31
- * `structure` (boolean): Copy structure only?
32
-
33
-
34
- ---
35
-
36
- ## Move file/folder
37
-
38
- ```
39
- Files::FileAction.move(path,
40
- destination: "destination"
41
- )
42
- ```
43
-
44
- ### Parameters
45
-
46
- * `path` (string): Required - Path to operate on.
47
- * `destination` (string): Required - Move destination path.
48
-
49
-
50
- ---
51
-
52
- ## Begin file upload
53
-
54
- ```
55
- Files::FileAction.begin_upload(path,
56
- mkdir_parents: true,
57
- part: 1,
58
- parts: 1,
59
- ref: "upload-1",
60
- restart: 1,
61
- with_rename: true
62
- )
63
- ```
64
-
65
- ### Parameters
66
-
67
- * `path` (string): Required - Path to operate on.
68
- * `mkdir_parents` (boolean): Create parent directories if they do not exist?
69
- * `part` (int64): Part if uploading a part.
70
- * `parts` (int64): How many parts to fetch?
71
- * `ref` (string):
72
- * `restart` (int64): File byte offset to restart from.
73
- * `with_rename` (boolean): Allow file rename instead of overwrite?
74
-
75
-
76
- ---
77
-
78
- ## Copy file/folder
79
-
80
- ```
81
- file_action = Files::FileAction.list_for(path).first
82
-
83
- file_action.copy(
84
- destination: "destination",
85
- structure: true
86
- )
87
- ```
88
-
89
- ### Parameters
90
-
91
- * `path` (string): Required - Path to operate on.
92
- * `destination` (string): Required - Copy destination path.
93
- * `structure` (boolean): Copy structure only?
94
-
95
-
96
- ---
97
-
98
- ## Move file/folder
99
-
100
- ```
101
- file_action = Files::FileAction.list_for(path).first
102
-
103
- file_action.move(
104
- destination: "destination"
105
- )
106
- ```
107
-
108
- ### Parameters
109
-
110
- * `path` (string): Required - Path to operate on.
111
- * `destination` (string): Required - Move destination path.
112
-
113
-
114
- ---
115
-
116
- ## Begin file upload
117
-
118
- ```
119
- file_action = Files::FileAction.list_for(path).first
120
-
121
- file_action.begin_upload(
122
- mkdir_parents: true,
123
- part: 1,
124
- parts: 1,
125
- ref: "upload-1",
126
- restart: 1,
127
- with_rename: true
128
- )
129
- ```
130
-
131
- ### Parameters
132
-
133
- * `path` (string): Required - Path to operate on.
134
- * `mkdir_parents` (boolean): Create parent directories if they do not exist?
135
- * `part` (int64): Part if uploading a part.
136
- * `parts` (int64): How many parts to fetch?
137
- * `ref` (string):
138
- * `restart` (int64): File byte offset to restart from.
139
- * `with_rename` (boolean): Allow file rename instead of overwrite?
@@ -11,7 +11,8 @@
11
11
  "files_total": 1,
12
12
  "operation": "move",
13
13
  "region": "USA",
14
- "status": "complete"
14
+ "status": "complete",
15
+ "log_url": "https://www.example.com/log_file"
15
16
  }
16
17
  ```
17
18
 
@@ -23,6 +24,7 @@
23
24
  * `operation` (string): The type of operation
24
25
  * `region` (string): Region
25
26
  * `status` (string): Status
27
+ * `log_url` (string): Link to download the log file for this migration.
26
28
 
27
29
 
28
30
  ---
@@ -38,7 +38,7 @@
38
38
  * `end_at` (date-time): End date/time of export range.
39
39
  * `status` (string): Status of export. Will be: `building`, `ready`, or `failed`
40
40
  * `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
41
- * `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`
41
+ * `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
42
42
  * `query_user_id` (string): Return results that are actions performed by the user indiciated by this User ID
43
43
  * `query_file_id` (string): Return results that are file actions related to the file indicated by this File ID
44
44
  * `query_parent_id` (string): Return results that are file actions inside the parent folder specified by this folder ID
@@ -110,7 +110,7 @@ Files::HistoryExport.create(
110
110
  * `start_at` (string): Start date/time of export range.
111
111
  * `end_at` (string): End date/time of export range.
112
112
  * `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
113
- * `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`
113
+ * `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
114
114
  * `query_user_id` (string): Return results that are actions performed by the user indiciated by this User ID
115
115
  * `query_file_id` (string): Return results that are file actions related to the file indicated by this File ID
116
116
  * `query_parent_id` (string): Return results that are file actions inside the parent folder specified by this folder ID
@@ -43,7 +43,7 @@
43
43
  * `username` (string): Username of the user that performed the action
44
44
  * `action` (string): What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
45
45
  * `failure_type` (string): The type of login failure, if applicable. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`, `country_mismatch`
46
- * `interface` (string): Inteface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`
46
+ * `interface` (string): Inteface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
47
47
  * `target_id` (int64): ID of the object (such as Users, or API Keys) on which the action was taken
48
48
  * `target_name` (string): Name of the User, Group or other object with a name related to this action
49
49
  * `target_permission` (string): Permission level of the action
data/docs/site.md CHANGED
@@ -31,6 +31,9 @@
31
31
  "desktop_app": true,
32
32
  "desktop_app_session_ip_pinning": true,
33
33
  "desktop_app_session_lifetime": 1,
34
+ "mobile_app": true,
35
+ "mobile_app_session_ip_pinning": true,
36
+ "mobile_app_session_lifetime": 1,
34
37
  "disallowed_countries": "US,DE",
35
38
  "disable_notifications": true,
36
39
  "disable_password_reset": true,
@@ -234,6 +237,9 @@
234
237
  * `desktop_app` (boolean): Is the desktop app enabled?
235
238
  * `desktop_app_session_ip_pinning` (boolean): Is desktop app session IP pinning enabled?
236
239
  * `desktop_app_session_lifetime` (int64): Desktop app session lifetime (in hours)
240
+ * `mobile_app` (boolean): Is the mobile app enabled?
241
+ * `mobile_app_session_ip_pinning` (boolean): Is mobile app session IP pinning enabled?
242
+ * `mobile_app_session_lifetime` (int64): Mobile app session lifetime (in hours)
237
243
  * `disallowed_countries` (string): Comma seperated list of disallowed Country codes
238
244
  * `disable_notifications` (boolean): Are notifications disabled?
239
245
  * `disable_password_reset` (boolean): Is password reset disabled?
@@ -367,6 +373,9 @@ Files::Site.update(
367
373
  desktop_app: true,
368
374
  desktop_app_session_ip_pinning: true,
369
375
  desktop_app_session_lifetime: 1,
376
+ mobile_app: true,
377
+ mobile_app_session_ip_pinning: true,
378
+ mobile_app_session_lifetime: 1,
370
379
  folder_permissions_groups_only: true,
371
380
  welcome_screen: "user_controlled",
372
381
  office_integration_available: true,
@@ -463,6 +472,9 @@ Files::Site.update(
463
472
  * `desktop_app` (boolean): Is the desktop app enabled?
464
473
  * `desktop_app_session_ip_pinning` (boolean): Is desktop app session IP pinning enabled?
465
474
  * `desktop_app_session_lifetime` (int64): Desktop app session lifetime (in hours)
475
+ * `mobile_app` (boolean): Is the mobile app enabled?
476
+ * `mobile_app_session_ip_pinning` (boolean): Is mobile app session IP pinning enabled?
477
+ * `mobile_app_session_lifetime` (int64): Mobile app session lifetime (in hours)
466
478
  * `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.
467
479
  * `welcome_screen` (string): Does the welcome screen appear?
468
480
  * `office_integration_available` (boolean): Allow users to use Office for the web?
data/lib/files.com.rb CHANGED
@@ -27,75 +27,75 @@ require "files.com/util"
27
27
  require "files.com/list"
28
28
  require "files.com/uri"
29
29
 
30
- require "files.com/clients/account_line_item"
31
- require "files.com/clients/action"
32
- require "files.com/clients/action_notification_export"
33
- require "files.com/clients/action_notification_export_result"
34
- require "files.com/clients/action_webhook_failure"
35
- require "files.com/clients/api_key"
36
- require "files.com/clients/app"
37
- require "files.com/clients/as2_key"
38
- require "files.com/clients/auto"
39
- require "files.com/clients/automation"
40
- require "files.com/clients/bandwidth_snapshot"
41
- require "files.com/clients/behavior"
42
- require "files.com/clients/bundle"
43
- require "files.com/clients/bundle_download"
44
- require "files.com/clients/bundle_recipient"
45
- require "files.com/clients/bundle_registration"
46
- require "files.com/clients/clickwrap"
47
- require "files.com/clients/dns_record"
48
- require "files.com/clients/errors"
49
- require "files.com/clients/external_event"
50
- require "files.com/clients/file"
51
- require "files.com/clients/file_action"
52
- require "files.com/clients/file_comment"
53
- require "files.com/clients/file_comment_reaction"
54
- require "files.com/clients/file_migration"
55
- require "files.com/clients/file_upload_part"
56
- require "files.com/clients/folder"
57
- require "files.com/clients/form_field"
58
- require "files.com/clients/form_field_set"
59
- require "files.com/clients/group"
60
- require "files.com/clients/group_user"
61
- require "files.com/clients/history"
62
- require "files.com/clients/history_export"
63
- require "files.com/clients/history_export_result"
64
- require "files.com/clients/image"
65
- require "files.com/clients/inbox_recipient"
66
- require "files.com/clients/inbox_registration"
67
- require "files.com/clients/inbox_upload"
68
- require "files.com/clients/invoice"
69
- require "files.com/clients/invoice_line_item"
70
- require "files.com/clients/ip_address"
71
- require "files.com/clients/lock"
72
- require "files.com/clients/message"
73
- require "files.com/clients/message_comment"
74
- require "files.com/clients/message_comment_reaction"
75
- require "files.com/clients/message_reaction"
76
- require "files.com/clients/notification"
77
- require "files.com/clients/payment"
78
- require "files.com/clients/payment_line_item"
79
- require "files.com/clients/permission"
80
- require "files.com/clients/preview"
81
- require "files.com/clients/project"
82
- require "files.com/clients/public_ip_address"
83
- require "files.com/clients/public_key"
84
- require "files.com/clients/remote_server"
85
- require "files.com/clients/request"
86
- require "files.com/clients/session"
87
- require "files.com/clients/settings_change"
88
- require "files.com/clients/site"
89
- require "files.com/clients/sso_strategy"
90
- require "files.com/clients/status"
91
- require "files.com/clients/style"
92
- require "files.com/clients/sync_job"
93
- require "files.com/clients/usage_daily_snapshot"
94
- require "files.com/clients/usage_snapshot"
95
- require "files.com/clients/user"
96
- require "files.com/clients/user_cipher_use"
97
- require "files.com/clients/user_request"
98
- require "files.com/clients/webhook_test"
30
+ require "files.com/models/account_line_item"
31
+ require "files.com/models/action"
32
+ require "files.com/models/action_notification_export"
33
+ require "files.com/models/action_notification_export_result"
34
+ require "files.com/models/action_webhook_failure"
35
+ require "files.com/models/api_key"
36
+ require "files.com/models/app"
37
+ require "files.com/models/as2_key"
38
+ require "files.com/models/auto"
39
+ require "files.com/models/automation"
40
+ require "files.com/models/bandwidth_snapshot"
41
+ require "files.com/models/behavior"
42
+ require "files.com/models/bundle"
43
+ require "files.com/models/bundle_download"
44
+ require "files.com/models/bundle_recipient"
45
+ require "files.com/models/bundle_registration"
46
+ require "files.com/models/clickwrap"
47
+ require "files.com/models/dns_record"
48
+ require "files.com/models/errors"
49
+ require "files.com/models/external_event"
50
+ require "files.com/models/file"
51
+ require "files.com/models/file_action"
52
+ require "files.com/models/file_comment"
53
+ require "files.com/models/file_comment_reaction"
54
+ require "files.com/models/file_migration"
55
+ require "files.com/models/file_upload_part"
56
+ require "files.com/models/folder"
57
+ require "files.com/models/form_field"
58
+ require "files.com/models/form_field_set"
59
+ require "files.com/models/group"
60
+ require "files.com/models/group_user"
61
+ require "files.com/models/history"
62
+ require "files.com/models/history_export"
63
+ require "files.com/models/history_export_result"
64
+ require "files.com/models/image"
65
+ require "files.com/models/inbox_recipient"
66
+ require "files.com/models/inbox_registration"
67
+ require "files.com/models/inbox_upload"
68
+ require "files.com/models/invoice"
69
+ require "files.com/models/invoice_line_item"
70
+ require "files.com/models/ip_address"
71
+ require "files.com/models/lock"
72
+ require "files.com/models/message"
73
+ require "files.com/models/message_comment"
74
+ require "files.com/models/message_comment_reaction"
75
+ require "files.com/models/message_reaction"
76
+ require "files.com/models/notification"
77
+ require "files.com/models/payment"
78
+ require "files.com/models/payment_line_item"
79
+ require "files.com/models/permission"
80
+ require "files.com/models/preview"
81
+ require "files.com/models/project"
82
+ require "files.com/models/public_ip_address"
83
+ require "files.com/models/public_key"
84
+ require "files.com/models/remote_server"
85
+ require "files.com/models/request"
86
+ require "files.com/models/session"
87
+ require "files.com/models/settings_change"
88
+ require "files.com/models/site"
89
+ require "files.com/models/sso_strategy"
90
+ require "files.com/models/status"
91
+ require "files.com/models/style"
92
+ require "files.com/models/sync_job"
93
+ require "files.com/models/usage_daily_snapshot"
94
+ require "files.com/models/usage_snapshot"
95
+ require "files.com/models/user"
96
+ require "files.com/models/user_cipher_use"
97
+ require "files.com/models/user_request"
98
+ require "files.com/models/webhook_test"
99
99
 
100
100
  require "files.com/models/dir"
101
101
  require "files.com/models/file_utils"
@@ -110,6 +110,7 @@ module Files
110
110
  class ApiKeyIsDisabledError < NotAuthorizedError; end
111
111
  class ApiKeyIsPathRestrictedError < NotAuthorizedError; end
112
112
  class ApiKeyOnlyForDesktopAppError < NotAuthorizedError; end
113
+ class ApiKeyOnlyForMobileAppError < NotAuthorizedError; end
113
114
  class ApiKeyOnlyForOfficeIntegrationError < NotAuthorizedError; end
114
115
  class BillingPermissionRequiredError < NotAuthorizedError; end
115
116
  class BundleMaximumUsesReachedError < NotAuthorizedError; end
@@ -64,7 +64,7 @@ module Files
64
64
  end
65
65
 
66
66
  # Parameters:
67
- # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
67
+ # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
68
68
  # attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
69
69
  # behavior - string - Behavior type.
70
70
  # path - string - Folder behaviors path.
@@ -188,7 +188,7 @@ module Files
188
188
  end
189
189
 
190
190
  # Parameters:
191
- # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
191
+ # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
192
192
  # attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
193
193
  # path (required) - string - Folder behaviors path.
194
194
  # behavior (required) - string - Behavior type.
@@ -224,7 +224,7 @@ module Files
224
224
  end
225
225
 
226
226
  # Parameters:
227
- # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
227
+ # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
228
228
  # attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
229
229
  # behavior - string - Behavior type.
230
230
  # path - string - Folder behaviors path.
@@ -70,6 +70,10 @@ module Files
70
70
  new(name).each(*args, &block)
71
71
  end
72
72
 
73
+ def self.from_path(path)
74
+ File.metadata(path)
75
+ end
76
+
73
77
  def self.get(path, params = {}, options = {})
74
78
  find(path, params, options)
75
79
  end
@@ -863,6 +867,79 @@ module Files
863
867
  delete(params)
864
868
  end
865
869
 
870
+ # Return metadata for file/folder
871
+ #
872
+ # Parameters:
873
+ # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
874
+ # with_previews - boolean - Include file preview information?
875
+ # with_priority_color - boolean - Include file priority color information?
876
+ def metadata(params = {})
877
+ params ||= {}
878
+ params[:path] = @attributes[:path]
879
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
880
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
881
+ raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
882
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
883
+
884
+ Api.send_request("/file_actions/metadata/#{@attributes[:path]}", :get, params, @options)
885
+ end
886
+
887
+ # Copy file/folder
888
+ #
889
+ # Parameters:
890
+ # destination (required) - string - Copy destination path.
891
+ # structure - boolean - Copy structure only?
892
+ def copy(params = {})
893
+ params ||= {}
894
+ params[:path] = @attributes[:path]
895
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
896
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
897
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
898
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
899
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
900
+
901
+ Api.send_request("/file_actions/copy/#{@attributes[:path]}", :post, params, @options)
902
+ end
903
+
904
+ # Move file/folder
905
+ #
906
+ # Parameters:
907
+ # destination (required) - string - Move destination path.
908
+ def move(params = {})
909
+ params ||= {}
910
+ params[:path] = @attributes[:path]
911
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
912
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
913
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
914
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
915
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
916
+
917
+ Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
918
+ end
919
+
920
+ # Begin file upload
921
+ #
922
+ # Parameters:
923
+ # mkdir_parents - boolean - Create parent directories if they do not exist?
924
+ # part - int64 - Part if uploading a part.
925
+ # parts - int64 - How many parts to fetch?
926
+ # ref - string -
927
+ # restart - int64 - File byte offset to restart from.
928
+ # with_rename - boolean - Allow file rename instead of overwrite?
929
+ def begin_upload(params = {})
930
+ params ||= {}
931
+ params[:path] = @attributes[:path]
932
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
933
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
934
+ raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
935
+ raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
936
+ raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
937
+ raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
938
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
939
+
940
+ Api.send_request("/file_actions/begin_upload/#{@attributes[:path]}", :post, params, @options)
941
+ end
942
+
866
943
  def save
867
944
  new_obj = File.create(path, @attributes, @options)
868
945
  @attributes = new_obj.attributes
@@ -951,5 +1028,80 @@ module Files
951
1028
  def self.destroy(path, params = {}, options = {})
952
1029
  delete(path, params, options)
953
1030
  end
1031
+
1032
+ # Return metadata for file/folder
1033
+ #
1034
+ # Parameters:
1035
+ # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
1036
+ # with_previews - boolean - Include file preview information?
1037
+ # with_priority_color - boolean - Include file priority color information?
1038
+ def self.metadata(path, params = {}, options = {})
1039
+ params ||= {}
1040
+ params[:path] = path
1041
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1042
+ raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
1043
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1044
+
1045
+ response, options = Api.send_request("/file_actions/metadata/#{params[:path]}", :get, params, options)
1046
+ File.new(response.data, options)
1047
+ end
1048
+
1049
+ # Copy file/folder
1050
+ #
1051
+ # Parameters:
1052
+ # destination (required) - string - Copy destination path.
1053
+ # structure - boolean - Copy structure only?
1054
+ def self.copy(path, params = {}, options = {})
1055
+ params ||= {}
1056
+ params[:path] = path
1057
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1058
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
1059
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1060
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
1061
+
1062
+ response, options = Api.send_request("/file_actions/copy/#{params[:path]}", :post, params, options)
1063
+ FileAction.new(response.data, options)
1064
+ end
1065
+
1066
+ # Move file/folder
1067
+ #
1068
+ # Parameters:
1069
+ # destination (required) - string - Move destination path.
1070
+ def self.move(path, params = {}, options = {})
1071
+ params ||= {}
1072
+ params[:path] = path
1073
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1074
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
1075
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1076
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
1077
+
1078
+ response, options = Api.send_request("/file_actions/move/#{params[:path]}", :post, params, options)
1079
+ FileAction.new(response.data, options)
1080
+ end
1081
+
1082
+ # Begin file upload
1083
+ #
1084
+ # Parameters:
1085
+ # mkdir_parents - boolean - Create parent directories if they do not exist?
1086
+ # part - int64 - Part if uploading a part.
1087
+ # parts - int64 - How many parts to fetch?
1088
+ # ref - string -
1089
+ # restart - int64 - File byte offset to restart from.
1090
+ # with_rename - boolean - Allow file rename instead of overwrite?
1091
+ def self.begin_upload(path, params = {}, options = {})
1092
+ params ||= {}
1093
+ params[:path] = path
1094
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1095
+ raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
1096
+ raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
1097
+ raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
1098
+ raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
1099
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1100
+
1101
+ response, options = Api.send_request("/file_actions/begin_upload/#{params[:path]}", :post, params, options)
1102
+ response.data.map do |entity_data|
1103
+ FileUploadPart.new(entity_data, options)
1104
+ end
1105
+ end
954
1106
  end
955
1107
  end
@@ -18,119 +18,5 @@ module Files
18
18
  def file_migration_id
19
19
  @attributes[:file_migration_id]
20
20
  end
21
-
22
- # Copy file/folder
23
- #
24
- # Parameters:
25
- # destination (required) - string - Copy destination path.
26
- # structure - boolean - Copy structure only?
27
- def copy(params = {})
28
- params ||= {}
29
- params[:path] = @attributes[:path]
30
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
31
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
32
- raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
33
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
34
- raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
35
-
36
- Api.send_request("/file_actions/copy/#{@attributes[:path]}", :post, params, @options)
37
- end
38
-
39
- # Move file/folder
40
- #
41
- # Parameters:
42
- # destination (required) - string - Move destination path.
43
- def move(params = {})
44
- params ||= {}
45
- params[:path] = @attributes[:path]
46
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
47
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
48
- raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
49
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
50
- raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
51
-
52
- Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
53
- end
54
-
55
- # Begin file upload
56
- #
57
- # Parameters:
58
- # mkdir_parents - boolean - Create parent directories if they do not exist?
59
- # part - int64 - Part if uploading a part.
60
- # parts - int64 - How many parts to fetch?
61
- # ref - string -
62
- # restart - int64 - File byte offset to restart from.
63
- # with_rename - boolean - Allow file rename instead of overwrite?
64
- def begin_upload(params = {})
65
- params ||= {}
66
- params[:path] = @attributes[:path]
67
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
68
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
69
- raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
70
- raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
71
- raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
72
- raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
73
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
74
-
75
- Api.send_request("/file_actions/begin_upload/#{@attributes[:path]}", :post, params, @options)
76
- end
77
-
78
- # Copy file/folder
79
- #
80
- # Parameters:
81
- # destination (required) - string - Copy destination path.
82
- # structure - boolean - Copy structure only?
83
- def self.copy(path, params = {}, options = {})
84
- params ||= {}
85
- params[:path] = path
86
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
87
- raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
88
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
89
- raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
90
-
91
- response, options = Api.send_request("/file_actions/copy/#{params[:path]}", :post, params, options)
92
- FileAction.new(response.data, options)
93
- end
94
-
95
- # Move file/folder
96
- #
97
- # Parameters:
98
- # destination (required) - string - Move destination path.
99
- def self.move(path, params = {}, options = {})
100
- params ||= {}
101
- params[:path] = path
102
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
103
- raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
104
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
105
- raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
106
-
107
- response, options = Api.send_request("/file_actions/move/#{params[:path]}", :post, params, options)
108
- FileAction.new(response.data, options)
109
- end
110
-
111
- # Begin file upload
112
- #
113
- # Parameters:
114
- # mkdir_parents - boolean - Create parent directories if they do not exist?
115
- # part - int64 - Part if uploading a part.
116
- # parts - int64 - How many parts to fetch?
117
- # ref - string -
118
- # restart - int64 - File byte offset to restart from.
119
- # with_rename - boolean - Allow file rename instead of overwrite?
120
- def self.begin_upload(path, params = {}, options = {})
121
- params ||= {}
122
- params[:path] = path
123
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
124
- raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
125
- raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
126
- raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
127
- raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
128
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
129
-
130
- response, options = Api.send_request("/file_actions/begin_upload/#{params[:path]}", :post, params, options)
131
- response.data.map do |entity_data|
132
- FileUploadPart.new(entity_data, options)
133
- end
134
- end
135
21
  end
136
22
  end
@@ -49,6 +49,11 @@ module Files
49
49
  @attributes[:status]
50
50
  end
51
51
 
52
+ # string - Link to download the log file for this migration.
53
+ def log_url
54
+ @attributes[:log_url]
55
+ end
56
+
52
57
  # Parameters:
53
58
  # id (required) - int64 - File Migration ID.
54
59
  def self.find(id, params = {}, options = {})
@@ -63,7 +63,7 @@ module Files
63
63
  @attributes[:query_action] = value
64
64
  end
65
65
 
66
- # string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`
66
+ # string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
67
67
  def query_interface
68
68
  @attributes[:query_interface]
69
69
  end
@@ -273,7 +273,7 @@ module Files
273
273
  # start_at - string - Start date/time of export range.
274
274
  # end_at - string - End date/time of export range.
275
275
  # query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
276
- # query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`
276
+ # query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
277
277
  # query_user_id - string - Return results that are actions performed by the user indiciated by this User ID
278
278
  # query_file_id - string - Return results that are file actions related to the file indicated by this File ID
279
279
  # query_parent_id - string - Return results that are file actions inside the parent folder specified by this folder ID
@@ -74,7 +74,7 @@ module Files
74
74
  @attributes[:failure_type]
75
75
  end
76
76
 
77
- # string - Inteface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`
77
+ # string - Inteface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`
78
78
  def interface
79
79
  @attributes[:interface]
80
80
  end
@@ -144,6 +144,21 @@ module Files
144
144
  @attributes[:desktop_app_session_lifetime]
145
145
  end
146
146
 
147
+ # boolean - Is the mobile app enabled?
148
+ def mobile_app
149
+ @attributes[:mobile_app]
150
+ end
151
+
152
+ # boolean - Is mobile app session IP pinning enabled?
153
+ def mobile_app_session_ip_pinning
154
+ @attributes[:mobile_app_session_ip_pinning]
155
+ end
156
+
157
+ # int64 - Mobile app session lifetime (in hours)
158
+ def mobile_app_session_lifetime
159
+ @attributes[:mobile_app_session_lifetime]
160
+ end
161
+
147
162
  # string - Comma seperated list of disallowed Country codes
148
163
  def disallowed_countries
149
164
  @attributes[:disallowed_countries]
@@ -619,6 +634,9 @@ module Files
619
634
  # desktop_app - boolean - Is the desktop app enabled?
620
635
  # desktop_app_session_ip_pinning - boolean - Is desktop app session IP pinning enabled?
621
636
  # desktop_app_session_lifetime - int64 - Desktop app session lifetime (in hours)
637
+ # mobile_app - boolean - Is the mobile app enabled?
638
+ # mobile_app_session_ip_pinning - boolean - Is mobile app session IP pinning enabled?
639
+ # mobile_app_session_lifetime - int64 - Mobile app session lifetime (in hours)
622
640
  # 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.
623
641
  # welcome_screen - string - Does the welcome screen appear?
624
642
  # office_integration_available - boolean - Allow users to use Office for the web?
@@ -718,6 +736,7 @@ module Files
718
736
  raise InvalidParameterError.new("Bad parameter: language must be an String") if params.dig(:language) and !params.dig(:language).is_a?(String)
719
737
  raise InvalidParameterError.new("Bad parameter: default_time_zone must be an String") if params.dig(:default_time_zone) and !params.dig(:default_time_zone).is_a?(String)
720
738
  raise InvalidParameterError.new("Bad parameter: desktop_app_session_lifetime must be an Integer") if params.dig(:desktop_app_session_lifetime) and !params.dig(:desktop_app_session_lifetime).is_a?(Integer)
739
+ raise InvalidParameterError.new("Bad parameter: mobile_app_session_lifetime must be an Integer") if params.dig(:mobile_app_session_lifetime) and !params.dig(:mobile_app_session_lifetime).is_a?(Integer)
721
740
  raise InvalidParameterError.new("Bad parameter: welcome_screen must be an String") if params.dig(:welcome_screen) and !params.dig(:welcome_screen).is_a?(String)
722
741
  raise InvalidParameterError.new("Bad parameter: session_expiry must be an Float") if params.dig(:session_expiry) and !params.dig(:session_expiry).is_a?(Float)
723
742
  raise InvalidParameterError.new("Bad parameter: user_lockout_tries must be an Integer") if params.dig(:user_lockout_tries) and !params.dig(:user_lockout_tries).is_a?(Integer)
@@ -97,4 +97,18 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV["GITLAB"] do
97
97
  expect(io.tap(&:rewind).read).to eq("I am a string")
98
98
  end
99
99
  end
100
+
101
+ describe ".from_path" do
102
+ it "returns a File object for a file" do
103
+ Files::File.open(test_folder.join("read.txt").to_s, 'w', options) do |f|
104
+ f.write("contents")
105
+ end
106
+ expect(Files::File.from_path("read.txt")).to be_a_kind_of(Files::File)
107
+ end
108
+
109
+ it "returns a Folder object for a Folder" do
110
+ Files::Folder.mkdir("testdir")
111
+ expect(Files::File.from_path("testdir")).to be_a_kind_of(Files::Folder)
112
+ end
113
+ end
100
114
  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.192
4
+ version: 1.0.196
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-08-05 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable