files.com 1.0.191 → 1.0.195

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: '09700d9455caaa943050ad7f915b1d8e6628815a3289db0a52da00e200998f14'
4
- data.tar.gz: 18bb834b8e6f163b00570813def6dcb6e67f115c669be621da7ce66e41e3f669
3
+ metadata.gz: dfd2b87e6b2899068127a47e5fc6ddbd87588145008666cbb590b2fb76fd58ab
4
+ data.tar.gz: dd2e605258357b602b9c61e2800b0558d24a2e11908be6c2093f502b5703fb43
5
5
  SHA512:
6
- metadata.gz: a561f6535df53e9def152cd3ab94753ca32dc0a16ccff4217024eab98da26bc5464e5a08ec1086ad14e837e160cf68f43686b5a40a02dc2b5349e293c3d298e9
7
- data.tar.gz: b0b366a3beb759767fb1af3a698e79d995215c6499b600e9b50ac62108b6eb03b10972f5795fab341cda55f19d25157ac6ee410628270e81439e7914e7510b60
6
+ metadata.gz: acc6265109d04edf138edc5f9437ec5694fa12b3d4c87eae42ed9275c134bb773d9a404cc6b50090173aeaa0f77de5818950d3a1f4a1504aed351cf83941a653
7
+ data.tar.gz: 9692d7bec084adddb8ab1c151141698447c7327b15ffd6a27f06824c81a911076931b415cd378281852d89ed5ee7e30726339ccb833dc1a799d0eabdbbd985b4
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.191
1
+ 1.0.195
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/docs/webhook_test.md CHANGED
@@ -23,6 +23,8 @@
23
23
  * `headers` (object): Additional request headers.
24
24
  * `body` (object): Additional body parameters.
25
25
  * `raw_body` (string): raw body text
26
+ * `file_as_body` (boolean): Send the file data as the request body?
27
+ * `file_form_field` (string): Send the file data as a named parameter in the request POST body
26
28
  * `action` (string): action for test body
27
29
 
28
30
 
@@ -38,6 +40,8 @@ Files::WebhookTest.create(
38
40
  headers: "x-test-header => testvalue",
39
41
  body: "test-param => testvalue",
40
42
  raw_body: "test body",
43
+ file_as_body: "false",
44
+ file_form_field: "upload_file_data",
41
45
  action: "test"
42
46
  )
43
47
  ```
@@ -50,4 +54,6 @@ Files::WebhookTest.create(
50
54
  * `headers` (object): Additional request headers.
51
55
  * `body` (object): Additional body parameters.
52
56
  * `raw_body` (string): raw body text
57
+ * `file_as_body` (boolean): Send the file data as the request body?
58
+ * `file_form_field` (string): Send the file data as a named parameter in the request POST body
53
59
  * `action` (string): action for test body
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.
@@ -863,6 +863,79 @@ module Files
863
863
  delete(params)
864
864
  end
865
865
 
866
+ # Return metadata for file/folder
867
+ #
868
+ # Parameters:
869
+ # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
870
+ # with_previews - boolean - Include file preview information?
871
+ # with_priority_color - boolean - Include file priority color information?
872
+ def metadata(params = {})
873
+ params ||= {}
874
+ params[:path] = @attributes[:path]
875
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
876
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
877
+ raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
878
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
879
+
880
+ Api.send_request("/file_actions/metadata/#{@attributes[:path]}", :get, params, @options)
881
+ end
882
+
883
+ # Copy file/folder
884
+ #
885
+ # Parameters:
886
+ # destination (required) - string - Copy destination path.
887
+ # structure - boolean - Copy structure only?
888
+ def copy(params = {})
889
+ params ||= {}
890
+ params[:path] = @attributes[:path]
891
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
892
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
893
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
894
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
895
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
896
+
897
+ Api.send_request("/file_actions/copy/#{@attributes[:path]}", :post, params, @options)
898
+ end
899
+
900
+ # Move file/folder
901
+ #
902
+ # Parameters:
903
+ # destination (required) - string - Move destination path.
904
+ def move(params = {})
905
+ params ||= {}
906
+ params[:path] = @attributes[:path]
907
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
908
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
909
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
910
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
911
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
912
+
913
+ Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
914
+ end
915
+
916
+ # Begin file upload
917
+ #
918
+ # Parameters:
919
+ # mkdir_parents - boolean - Create parent directories if they do not exist?
920
+ # part - int64 - Part if uploading a part.
921
+ # parts - int64 - How many parts to fetch?
922
+ # ref - string -
923
+ # restart - int64 - File byte offset to restart from.
924
+ # with_rename - boolean - Allow file rename instead of overwrite?
925
+ def begin_upload(params = {})
926
+ params ||= {}
927
+ params[:path] = @attributes[:path]
928
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
929
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
930
+ raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
931
+ raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
932
+ raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
933
+ raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
934
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
935
+
936
+ Api.send_request("/file_actions/begin_upload/#{@attributes[:path]}", :post, params, @options)
937
+ end
938
+
866
939
  def save
867
940
  new_obj = File.create(path, @attributes, @options)
868
941
  @attributes = new_obj.attributes
@@ -951,5 +1024,80 @@ module Files
951
1024
  def self.destroy(path, params = {}, options = {})
952
1025
  delete(path, params, options)
953
1026
  end
1027
+
1028
+ # Return metadata for file/folder
1029
+ #
1030
+ # Parameters:
1031
+ # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
1032
+ # with_previews - boolean - Include file preview information?
1033
+ # with_priority_color - boolean - Include file priority color information?
1034
+ def self.metadata(path, params = {}, options = {})
1035
+ params ||= {}
1036
+ params[:path] = path
1037
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1038
+ raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
1039
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1040
+
1041
+ response, options = Api.send_request("/file_actions/metadata/#{params[:path]}", :get, params, options)
1042
+ File.new(response.data, options)
1043
+ end
1044
+
1045
+ # Copy file/folder
1046
+ #
1047
+ # Parameters:
1048
+ # destination (required) - string - Copy destination path.
1049
+ # structure - boolean - Copy structure only?
1050
+ def self.copy(path, params = {}, options = {})
1051
+ params ||= {}
1052
+ params[:path] = path
1053
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1054
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
1055
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1056
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
1057
+
1058
+ response, options = Api.send_request("/file_actions/copy/#{params[:path]}", :post, params, options)
1059
+ FileAction.new(response.data, options)
1060
+ end
1061
+
1062
+ # Move file/folder
1063
+ #
1064
+ # Parameters:
1065
+ # destination (required) - string - Move destination path.
1066
+ def self.move(path, params = {}, options = {})
1067
+ params ||= {}
1068
+ params[:path] = path
1069
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1070
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params.dig(:destination) and !params.dig(:destination).is_a?(String)
1071
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1072
+ raise MissingParameterError.new("Parameter missing: destination") unless params.dig(:destination)
1073
+
1074
+ response, options = Api.send_request("/file_actions/move/#{params[:path]}", :post, params, options)
1075
+ FileAction.new(response.data, options)
1076
+ end
1077
+
1078
+ # Begin file upload
1079
+ #
1080
+ # Parameters:
1081
+ # mkdir_parents - boolean - Create parent directories if they do not exist?
1082
+ # part - int64 - Part if uploading a part.
1083
+ # parts - int64 - How many parts to fetch?
1084
+ # ref - string -
1085
+ # restart - int64 - File byte offset to restart from.
1086
+ # with_rename - boolean - Allow file rename instead of overwrite?
1087
+ def self.begin_upload(path, params = {}, options = {})
1088
+ params ||= {}
1089
+ params[:path] = path
1090
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
1091
+ raise InvalidParameterError.new("Bad parameter: part must be an Integer") if params.dig(:part) and !params.dig(:part).is_a?(Integer)
1092
+ raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
1093
+ raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
1094
+ raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
1095
+ raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1096
+
1097
+ response, options = Api.send_request("/file_actions/begin_upload/#{params[:path]}", :post, params, options)
1098
+ response.data.map do |entity_data|
1099
+ FileUploadPart.new(entity_data, options)
1100
+ end
1101
+ end
954
1102
  end
955
1103
  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)
@@ -108,6 +108,24 @@ module Files
108
108
  @attributes[:raw_body] = value
109
109
  end
110
110
 
111
+ # boolean - Send the file data as the request body?
112
+ def file_as_body
113
+ @attributes[:file_as_body]
114
+ end
115
+
116
+ def file_as_body=(value)
117
+ @attributes[:file_as_body] = value
118
+ end
119
+
120
+ # string - Send the file data as a named parameter in the request POST body
121
+ def file_form_field
122
+ @attributes[:file_form_field]
123
+ end
124
+
125
+ def file_form_field=(value)
126
+ @attributes[:file_form_field] = value
127
+ end
128
+
111
129
  # string - action for test body
112
130
  def action
113
131
  @attributes[:action]
@@ -133,6 +151,8 @@ module Files
133
151
  # headers - object - Additional request headers.
134
152
  # body - object - Additional body parameters.
135
153
  # raw_body - string - raw body text
154
+ # file_as_body - boolean - Send the file data as the request body?
155
+ # file_form_field - string - Send the file data as a named parameter in the request POST body
136
156
  # action - string - action for test body
137
157
  def self.create(params = {}, options = {})
138
158
  raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
@@ -141,6 +161,7 @@ module Files
141
161
  raise InvalidParameterError.new("Bad parameter: headers must be an Hash") if params.dig(:headers) and !params.dig(:headers).is_a?(Hash)
142
162
  raise InvalidParameterError.new("Bad parameter: body must be an Hash") if params.dig(:body) and !params.dig(:body).is_a?(Hash)
143
163
  raise InvalidParameterError.new("Bad parameter: raw_body must be an String") if params.dig(:raw_body) and !params.dig(:raw_body).is_a?(String)
164
+ raise InvalidParameterError.new("Bad parameter: file_form_field must be an String") if params.dig(:file_form_field) and !params.dig(:file_form_field).is_a?(String)
144
165
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
145
166
  raise MissingParameterError.new("Parameter missing: url") unless params.dig(:url)
146
167
 
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.191
4
+ version: 1.0.195
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-03 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