files.com 1.0.15 → 1.0.16

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/docs/account_line_item.md +2 -2
  4. data/docs/action.md +4 -4
  5. data/docs/api_key.md +11 -0
  6. data/docs/behavior.md +2 -2
  7. data/docs/bundle.md +2 -2
  8. data/docs/dns_record.md +2 -0
  9. data/docs/group.md +2 -2
  10. data/docs/group_user.md +2 -2
  11. data/docs/history.md +9 -9
  12. data/docs/invoice.md +2 -2
  13. data/docs/ip_address.md +2 -0
  14. data/docs/lock.md +2 -2
  15. data/docs/notification.md +2 -2
  16. data/docs/payment.md +2 -2
  17. data/docs/permission.md +2 -2
  18. data/docs/preview.md +2 -40
  19. data/docs/public_key.md +3 -3
  20. data/docs/session.md +0 -85
  21. data/docs/site.md +3 -92
  22. data/docs/style.md +4 -2
  23. data/docs/usage_daily_snapshot.md +37 -0
  24. data/docs/usage_snapshot.md +22 -4
  25. data/docs/user.md +3 -3
  26. data/docs/user_cipher_use.md +4 -4
  27. data/lib/files.com.rb +1 -14
  28. data/lib/files.com/models/account_line_item.rb +5 -5
  29. data/lib/files.com/models/action.rb +6 -6
  30. data/lib/files.com/models/api_key.rb +14 -0
  31. data/lib/files.com/models/behavior.rb +9 -9
  32. data/lib/files.com/models/bundle.rb +9 -9
  33. data/lib/files.com/models/dns_record.rb +5 -0
  34. data/lib/files.com/models/group.rb +9 -9
  35. data/lib/files.com/models/group_user.rb +9 -9
  36. data/lib/files.com/models/history.rb +6 -6
  37. data/lib/files.com/models/invoice.rb +5 -5
  38. data/lib/files.com/models/ip_address.rb +5 -0
  39. data/lib/files.com/models/lock.rb +9 -9
  40. data/lib/files.com/models/notification.rb +9 -9
  41. data/lib/files.com/models/payment.rb +5 -5
  42. data/lib/files.com/models/permission.rb +9 -9
  43. data/lib/files.com/models/preview.rb +5 -45
  44. data/lib/files.com/models/public_key.rb +9 -9
  45. data/lib/files.com/models/session.rb +0 -66
  46. data/lib/files.com/models/site.rb +5 -72
  47. data/lib/files.com/models/style.rb +14 -5
  48. data/lib/files.com/models/usage_daily_snapshot.rb +49 -0
  49. data/lib/files.com/models/usage_snapshot.rb +27 -10
  50. data/lib/files.com/models/user.rb +9 -9
  51. data/lib/files.com/models/user_cipher_use.rb +10 -10
  52. metadata +4 -2
@@ -5,16 +5,16 @@
5
5
  ```
6
6
  {
7
7
  "id": 1,
8
+ "title": "My public key",
8
9
  "created_at": "2000-01-01 01:00:00 UTC",
9
- "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
10
- "title": "My public key"
10
+ "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8"
11
11
  }
12
12
  ```
13
13
 
14
14
  * `id` (int64): Public key ID
15
+ * `title` (string): Public key title
15
16
  * `created_at` (date-time): Public key created at date/time
16
17
  * `fingerprint` (string): Public key fingerprint
17
- * `title` (string): Public key title
18
18
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
19
19
  * `public_key` (string): Actual contents of SSH key.
20
20
 
@@ -67,91 +67,6 @@ Files::Session.create(
67
67
  * `otp` (string): If this user has a 2FA device, provide its OTP or code here.
68
68
 
69
69
 
70
- ---
71
-
72
- ## Reset password given a password reset code
73
-
74
- ```
75
- Files::Session.forgot_reset(
76
- code: "abc123",
77
- password: "password",
78
- confirm_password: "password",
79
- interface: "web",
80
- locale: "en",
81
- otp: "123456"
82
- )
83
- ```
84
-
85
- ### Parameters
86
-
87
- * `code` (string): Required -
88
- * `password` (string): Required -
89
- * `confirm_password` (string):
90
- * `interface` (string):
91
- * `locale` (string):
92
- * `otp` (string):
93
-
94
-
95
- ---
96
-
97
- ## Validate password reset code
98
-
99
- ```
100
- Files::Session.forgot_validate(
101
- code: "abc123"
102
- )
103
- ```
104
-
105
- ### Parameters
106
-
107
- * `code` (string): Required -
108
-
109
-
110
- ---
111
-
112
- ## Initiate a password reset process given an email address or username
113
-
114
- ```
115
- Files::Session.forgot(
116
- email: "johndoe@gmail.com"
117
- )
118
- ```
119
-
120
- ### Parameters
121
-
122
- * `email` (string):
123
- * `username` (string):
124
-
125
-
126
- ---
127
-
128
- ## Create long lived session (API Key) from Pairing Key
129
-
130
- ```
131
- Files::Session.pairing_key(key)
132
- ```
133
-
134
- ### Parameters
135
-
136
- * `key` (string): Required - The pairing key to reserve for login. Cannot be reused
137
-
138
-
139
- ---
140
-
141
- ## Begin new session via Oauth
142
-
143
- ```
144
- Files::Session.oauth(
145
- provider: "okta"
146
- )
147
- ```
148
-
149
- ### Parameters
150
-
151
- * `provider` (string): Required -
152
- * `state` (string):
153
-
154
-
155
70
  ---
156
71
 
157
72
  ## Delete user session (log out)
@@ -4,6 +4,7 @@
4
4
 
5
5
  ```
6
6
  {
7
+ "name": "My Site",
7
8
  "allowed_2fa_method_sms": true,
8
9
  "allowed_2fa_method_totp": true,
9
10
  "allowed_2fa_method_u2f": true,
@@ -59,7 +60,6 @@
59
60
  "login_help_text": "Login page help text.",
60
61
  "logo": "",
61
62
  "max_prior_passwords": 1,
62
- "name": "My Site",
63
63
  "next_billing_amount": "",
64
64
  "next_billing_date": "Apr 20",
65
65
  "opt_out_global": true,
@@ -111,6 +111,7 @@
111
111
  }
112
112
  ```
113
113
 
114
+ * `name` (string): Site name
114
115
  * `allowed_2fa_method_sms` (boolean): Is SMS two factor authentication allowed?
115
116
  * `allowed_2fa_method_totp` (boolean): Is TOTP two factor authentication allowed?
116
117
  * `allowed_2fa_method_u2f` (boolean): Is U2F two factor authentication allowed?
@@ -166,7 +167,6 @@
166
167
  * `login_help_text` (string): Login help text
167
168
  * `logo`: Branded logo
168
169
  * `max_prior_passwords` (int64): Number of prior passwords to disallow
169
- * `name` (string): Site name
170
170
  * `next_billing_amount` (float): Next billing amount
171
171
  * `next_billing_date` (string): Next billing date
172
172
  * `opt_out_global` (boolean): Use servers in the USA only?
@@ -228,69 +228,13 @@ Files::Site.get
228
228
 
229
229
  ---
230
230
 
231
- ## Get either the most recent usage snapshot (usage data for billing purposes) for a Site, or optionally get a specific usage snapshot
231
+ ## Get the most recent usage snapshot (usage data for billing purposes) for a Site
232
232
 
233
233
  ```
234
234
  Files::Site.get_usage
235
235
  ```
236
236
 
237
237
 
238
- ---
239
-
240
- ## Show plan that will be switched to in the future. (Populated if current plan is deprecated and no longer offered beyond the current billing period.)
241
-
242
- ```
243
- Files::Site.get_switch_to_plan
244
- ```
245
-
246
-
247
- ---
248
-
249
- ## Show the current billing plan of a site
250
-
251
- ```
252
- Files::Site.get_plan(
253
- currency: "USD"
254
- )
255
- ```
256
-
257
- ### Parameters
258
-
259
- * `currency` (string): Currency.
260
-
261
-
262
- ---
263
-
264
- ## Complete a PayPal subscription
265
-
266
- ```
267
- Files::Site.get_paypal_express_info(
268
- paypal_token: "[token]"
269
- )
270
- ```
271
-
272
- ### Parameters
273
-
274
- * `paypal_token` (string): Required - Billing token for use with paypal.
275
-
276
-
277
- ---
278
-
279
- ## Initiate a new PayPal subscription
280
-
281
- ```
282
- Files::Site.get_paypal_express(
283
- return_to_url: "https://app.files.com/...",
284
- plan_id: 1
285
- )
286
- ```
287
-
288
- ### Parameters
289
-
290
- * `return_to_url` (string): Required - URL that paypal express forwards the user to.
291
- * `plan_id` (int64): Required - Plan ID to switch to.
292
-
293
-
294
238
  ---
295
239
 
296
240
  ## Update site settings
@@ -479,36 +423,3 @@ Files::Site.update(
479
423
  * `ldap_password_change` (string): New LDAP password.
480
424
  * `ldap_password_change_confirmation` (string): Confirm new LDAP password.
481
425
  * `smtp_password` (string): Password for SMTP server.
482
-
483
-
484
- ---
485
-
486
- ## Change the current billing plan for the site
487
-
488
- ```
489
- Files::Site.update_plan(id,
490
- billing_frequency: 1
491
- )
492
- ```
493
-
494
- ### Parameters
495
-
496
- * `id` (int64): Required - Site ID.
497
- * `billing_frequency` (int64): The billing frequency for the site. Must be 1(monthly) or 12(annual).
498
-
499
-
500
- ---
501
-
502
- ## Change the current billing plan for the site
503
-
504
- ```
505
- site = Files::Site.find(1)
506
- site.update_plan(
507
- billing_frequency: 1
508
- )
509
- ```
510
-
511
- ### Parameters
512
-
513
- * `id` (int64): Required - Site ID.
514
- * `billing_frequency` (int64): The billing frequency for the site. Must be 1(monthly) or 12(annual).
@@ -4,14 +4,16 @@
4
4
 
5
5
  ```
6
6
  {
7
- "logo": "",
7
+ "id": 1,
8
8
  "path": "",
9
+ "logo": "",
9
10
  "thumbnail": ""
10
11
  }
11
12
  ```
12
13
 
13
- * `logo`: Logo
14
+ * `id` (int64): Style ID
14
15
  * `path` (string): Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
16
+ * `logo`: Logo
15
17
  * `thumbnail`: Logo thumbnail
16
18
  * `file` (file): Logo for custom branding.
17
19
 
@@ -0,0 +1,37 @@
1
+ # UsageDailySnapshot
2
+
3
+ ## Example UsageDailySnapshot Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "date": "2020-11-21",
9
+ "current_storage": "65536",
10
+ "usage_by_top_level_dir": [
11
+
12
+ ]
13
+ }
14
+ ```
15
+
16
+ * `id` (int64): ID of the usage record
17
+ * `date` (date): The date of this usage record
18
+ * `current_storage` (int64): The quantity of storage held for this site
19
+ * `usage_by_top_level_dir` (array): Usage broken down by each top-level folder
20
+
21
+
22
+ ---
23
+
24
+ ## List Usage Daily Snapshots
25
+
26
+ ```
27
+ Files::UsageDailySnapshot.list(
28
+ page: 1,
29
+ per_page: 1
30
+ )
31
+ ```
32
+
33
+ ### Parameters
34
+
35
+ * `page` (int64): Current page number.
36
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
37
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
@@ -5,11 +5,11 @@
5
5
  ```
6
6
  {
7
7
  "id": 1,
8
+ "start_at": "2000-01-01 01:00:00 UTC",
9
+ "end_at": "2000-01-01 01:00:00 UTC",
8
10
  "created_at": "2000-01-01 01:00:00 UTC",
9
11
  "current_storage": "",
10
- "end_at": "2000-01-01 01:00:00 UTC",
11
12
  "high_water_storage": "",
12
- "start_at": "2000-01-01 01:00:00 UTC",
13
13
  "total_downloads": 1,
14
14
  "total_uploads": 1,
15
15
  "updated_at": "2000-01-01 01:00:00 UTC",
@@ -21,11 +21,11 @@
21
21
  ```
22
22
 
23
23
  * `id` (int64): Site usage ID
24
+ * `start_at` (date-time): Site usage report start date/time
25
+ * `end_at` (date-time): Site usage report end date/time
24
26
  * `created_at` (date-time): Site usage report created at date/time
25
27
  * `current_storage` (float): Current site usage as of report
26
- * `end_at` (date-time): Site usage report end date/time
27
28
  * `high_water_storage` (float): Site usage report highest usage in time period
28
- * `start_at` (date-time): Site usage report start date/time
29
29
  * `total_downloads` (int64): Number of downloads in report time period
30
30
  * `total_uploads` (int64): Number of uploads in time period
31
31
  * `updated_at` (date-time): The last time this site usage report was updated
@@ -33,3 +33,21 @@
33
33
  * `root_storage` (float): Usage for root folder
34
34
  * `deleted_files_counted_in_minimum` (float): Usage for files that are deleted but uploaded within last 30 days
35
35
  * `deleted_files_storage` (float): Usage for files that are deleted but retained as backups
36
+
37
+
38
+ ---
39
+
40
+ ## List Usage Snapshots
41
+
42
+ ```
43
+ Files::UsageSnapshot.list(
44
+ page: 1,
45
+ per_page: 1
46
+ )
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+ * `page` (int64): Current page number.
52
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
53
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
@@ -5,6 +5,7 @@
5
5
  ```
6
6
  {
7
7
  "id": 1,
8
+ "username": "user",
8
9
  "admin_group_ids": [
9
10
 
10
11
  ],
@@ -47,12 +48,12 @@
47
48
  "externally_managed": true,
48
49
  "time_zone": "Pacific Time (US & Canada)",
49
50
  "type_of_2fa": "",
50
- "user_root": "",
51
- "username": "user"
51
+ "user_root": ""
52
52
  }
53
53
  ```
54
54
 
55
55
  * `id` (int64): User ID
56
+ * `username` (string): User's username
56
57
  * `admin_group_ids` (array): List of group IDs of which this user is an administrator
57
58
  * `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
58
59
  * `attachments_permission` (boolean): Can the user create Bundles (aka Share Links)? This field will be aliased or renamed in the future to `bundles_permission`.
@@ -92,7 +93,6 @@
92
93
  * `time_zone` (string): User time zone
93
94
  * `type_of_2fa` (string): Type(s) of 2FA methods in use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore.
94
95
  * `user_root` (string): Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
95
- * `username` (string): User's username
96
96
  * `avatar_file` (file): An image file for your user avatar.
97
97
  * `avatar_delete` (boolean): If true, the avatar will be deleted.
98
98
  * `change_password` (string): Used for changing a password on an existing user.
@@ -4,19 +4,19 @@
4
4
 
5
5
  ```
6
6
  {
7
- "created_at": "2000-01-01 01:00:00 UTC",
8
7
  "id": 1,
9
- "interface": "restapi",
10
8
  "protocol_cipher": "TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384",
9
+ "created_at": "2000-01-01 01:00:00 UTC",
10
+ "interface": "restapi",
11
11
  "updated_at": "2000-01-01 01:00:00 UTC",
12
12
  "user_id": 1
13
13
  }
14
14
  ```
15
15
 
16
- * `created_at` (date-time): The earliest recorded use of this combination of interface and protocol and cipher (for this user)
17
16
  * `id` (int64): UserCipherUse ID
18
- * `interface` (string): The interface accessed
19
17
  * `protocol_cipher` (string): The protocol and cipher employed
18
+ * `created_at` (date-time): The earliest recorded use of this combination of interface and protocol and cipher (for this user)
19
+ * `interface` (string): The interface accessed
20
20
  * `updated_at` (date-time): The most recent use of this combination of interface and protocol and cipher (for this user)
21
21
  * `user_id` (int64): ID of the user who performed this access
22
22
 
@@ -24,14 +24,11 @@ require "files.com/util"
24
24
 
25
25
  require "files.com/models/account_line_item"
26
26
  require "files.com/models/action"
27
- require "files.com/models/announcement"
28
27
  require "files.com/models/api_key"
29
28
  require "files.com/models/auto"
30
29
  require "files.com/models/automation"
31
30
  require "files.com/models/behavior"
32
- require "files.com/models/blog_post"
33
31
  require "files.com/models/bundle"
34
- require "files.com/models/certificate"
35
32
  require "files.com/models/dns_record"
36
33
  require "files.com/models/errors"
37
34
  require "files.com/models/file"
@@ -53,14 +50,9 @@ require "files.com/models/message_comment"
53
50
  require "files.com/models/message_comment_reaction"
54
51
  require "files.com/models/message_reaction"
55
52
  require "files.com/models/notification"
56
- require "files.com/models/oauth_redirect"
57
- require "files.com/models/paired_api_key"
58
53
  require "files.com/models/payment"
59
54
  require "files.com/models/payment_line_item"
60
- require "files.com/models/paypal_express_info"
61
- require "files.com/models/paypal_express_url"
62
55
  require "files.com/models/permission"
63
- require "files.com/models/plan"
64
56
  require "files.com/models/preview"
65
57
  require "files.com/models/project"
66
58
  require "files.com/models/public_key"
@@ -68,17 +60,12 @@ require "files.com/models/remote_server"
68
60
  require "files.com/models/request"
69
61
  require "files.com/models/session"
70
62
  require "files.com/models/site"
71
- require "files.com/models/sso_strategy"
72
63
  require "files.com/models/status"
73
64
  require "files.com/models/style"
74
- require "files.com/models/support_request"
75
- require "files.com/models/two_factor_authentication_method"
76
- require "files.com/models/two_factor_authentication_method"
77
- require "files.com/models/u2f_sign_request"
65
+ require "files.com/models/usage_daily_snapshot"
78
66
  require "files.com/models/usage_snapshot"
79
67
  require "files.com/models/user"
80
68
  require "files.com/models/user_cipher_use"
81
- require "files.com/models/zip_download"
82
69
 
83
70
  require "files.com/models/dir"
84
71
  require "files.com/models/file_utils"