files.com 1.2.221 → 1.2.223
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.
- package/_VERSION +1 -1
- package/docs/models/ActionNotificationExport.md +1 -1
- package/docs/models/Automation.md +30 -8
- package/docs/models/AutomationRun.md +2 -2
- package/docs/models/Behavior.md +2 -2
- package/docs/models/DnsRecord.md +1 -1
- package/docs/models/Group.md +2 -2
- package/docs/models/GroupUser.md +2 -2
- package/docs/models/HistoryExport.md +1 -1
- package/docs/models/InboxUpload.md +16 -1
- package/docs/models/Request.md +2 -2
- package/docs/models/SftpHostKey.md +8 -8
- package/docs/models/Site.md +5 -5
- package/docs/models/Style.md +8 -2
- package/docs/models/UsageByTopLevelDir.md +15 -0
- package/docs/models/UsageDailySnapshot.md +16 -12
- package/docs/models/UsageSnapshot.md +11 -7
- package/docs/models/User.md +4 -4
- package/docs/models/UserRequest.md +1 -1
- package/lib/Files.js +1 -1
- package/lib/models/Automation.js +6 -6
- package/lib/models/AutomationRun.js +1 -1
- package/lib/models/Request.js +1 -1
- package/lib/models/UsageByTopLevelDir.js +59 -0
- package/lib/models/UsageDailySnapshot.js +5 -5
- package/lib/models/UsageSnapshot.js +5 -5
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Automation.js +6 -6
- package/src/models/AutomationRun.js +1 -1
- package/src/models/Request.js +1 -1
- package/src/models/UsageByTopLevelDir.js +44 -0
- package/src/models/UsageDailySnapshot.js +5 -5
- package/src/models/UsageSnapshot.js +4 -4
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.223
|
|
@@ -45,7 +45,18 @@
|
|
|
45
45
|
"recurring_day": 25,
|
|
46
46
|
"retry_on_failure_interval_in_minutes": 60,
|
|
47
47
|
"retry_on_failure_number_of_attempts": 10,
|
|
48
|
-
"schedule":
|
|
48
|
+
"schedule": {
|
|
49
|
+
"days_of_week": [
|
|
50
|
+
0,
|
|
51
|
+
2,
|
|
52
|
+
4
|
|
53
|
+
],
|
|
54
|
+
"times_of_day": [
|
|
55
|
+
"06:30",
|
|
56
|
+
"14:30"
|
|
57
|
+
],
|
|
58
|
+
"time_zone": "Eastern Time (US & Canada)"
|
|
59
|
+
},
|
|
49
60
|
"human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n 2:30 PM Eastern Time (US & Canada) TZ",
|
|
50
61
|
"schedule_days_of_week": [
|
|
51
62
|
0,
|
|
@@ -79,7 +90,7 @@
|
|
|
79
90
|
```
|
|
80
91
|
|
|
81
92
|
* `id` (int64): Automation ID
|
|
82
|
-
* `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
93
|
+
* `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
83
94
|
* `automation` (string): Automation type
|
|
84
95
|
* `deleted` (boolean): Indicates if the automation has been deleted.
|
|
85
96
|
* `description` (string): Description for the this Automation.
|
|
@@ -96,7 +107,7 @@
|
|
|
96
107
|
* `last_modified_at` (date-time): Time when automation was last modified. Does not change for name or description updates.
|
|
97
108
|
* `legacy_folder_matching` (boolean): If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
98
109
|
* `name` (string): Name for this automation.
|
|
99
|
-
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
110
|
+
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
100
111
|
* `path` (string): Path on which this Automation runs. Supports globs, except on remote mounts. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
101
112
|
* `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
|
|
102
113
|
* `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
|
|
@@ -203,7 +214,7 @@ await Automation.create({
|
|
|
203
214
|
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
|
|
204
215
|
* `schedule_times_of_day` (array(string)): If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
|
|
205
216
|
* `schedule_time_zone` (string): If trigger is `custom_schedule`. Time zone for the schedule.
|
|
206
|
-
* `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
217
|
+
* `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
207
218
|
* `description` (string): Description for the this Automation.
|
|
208
219
|
* `disabled` (boolean): If true, this automation will not run.
|
|
209
220
|
* `exclude_pattern` (string): If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
|
|
@@ -212,7 +223,7 @@ await Automation.create({
|
|
|
212
223
|
* `ignore_locked_folders` (boolean): If true, the Lock Folders behavior will be disregarded for automated actions.
|
|
213
224
|
* `legacy_folder_matching` (boolean): DEPRECATED: If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
214
225
|
* `name` (string): Name for this automation.
|
|
215
|
-
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
226
|
+
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
216
227
|
* `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
|
|
217
228
|
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
218
229
|
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
@@ -293,7 +304,7 @@ await automation.update({
|
|
|
293
304
|
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
|
|
294
305
|
* `schedule_times_of_day` (array(string)): If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
|
|
295
306
|
* `schedule_time_zone` (string): If trigger is `custom_schedule`. Time zone for the schedule.
|
|
296
|
-
* `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
307
|
+
* `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
297
308
|
* `description` (string): Description for the this Automation.
|
|
298
309
|
* `disabled` (boolean): If true, this automation will not run.
|
|
299
310
|
* `exclude_pattern` (string): If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
|
|
@@ -302,7 +313,7 @@ await automation.update({
|
|
|
302
313
|
* `ignore_locked_folders` (boolean): If true, the Lock Folders behavior will be disregarded for automated actions.
|
|
303
314
|
* `legacy_folder_matching` (boolean): DEPRECATED: If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
304
315
|
* `name` (string): Name for this automation.
|
|
305
|
-
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
316
|
+
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
306
317
|
* `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
|
|
307
318
|
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
308
319
|
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
@@ -357,7 +368,18 @@ await automation.update({
|
|
|
357
368
|
"recurring_day": 25,
|
|
358
369
|
"retry_on_failure_interval_in_minutes": 60,
|
|
359
370
|
"retry_on_failure_number_of_attempts": 10,
|
|
360
|
-
"schedule":
|
|
371
|
+
"schedule": {
|
|
372
|
+
"days_of_week": [
|
|
373
|
+
0,
|
|
374
|
+
2,
|
|
375
|
+
4
|
|
376
|
+
],
|
|
377
|
+
"times_of_day": [
|
|
378
|
+
"06:30",
|
|
379
|
+
"14:30"
|
|
380
|
+
],
|
|
381
|
+
"time_zone": "Eastern Time (US & Canada)"
|
|
382
|
+
},
|
|
361
383
|
"human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n 2:30 PM Eastern Time (US & Canada) TZ",
|
|
362
384
|
"schedule_days_of_week": [
|
|
363
385
|
0,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"automation_id": 1,
|
|
9
9
|
"completed_at": "2000-01-01T01:00:00Z",
|
|
10
10
|
"created_at": "2000-01-01T01:00:00Z",
|
|
11
|
-
"retry_at": "
|
|
11
|
+
"retry_at": "2000-01-01T01:00:00Z",
|
|
12
12
|
"retried_at": "2000-01-01T01:00:00Z",
|
|
13
13
|
"retried_in_run_id": 1,
|
|
14
14
|
"retry_of_run_id": 1,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* `automation_id` (int64): ID of the associated Automation.
|
|
25
25
|
* `completed_at` (date-time): Automation run completion/failure date/time.
|
|
26
26
|
* `created_at` (date-time): Automation run start date/time.
|
|
27
|
-
* `retry_at` (
|
|
27
|
+
* `retry_at` (date-time): If set, this automation will be retried at this date/time due to `failure` or `partial_failure`.
|
|
28
28
|
* `retried_at` (date-time): If set, this Automation run was retried due to `failure` or `partial_failure`.
|
|
29
29
|
* `retried_in_run_id` (int64): ID of the run that is or will be retrying this run.
|
|
30
30
|
* `retry_of_run_id` (int64): ID of the original run that this run is retrying.
|
package/docs/models/Behavior.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"name": "example",
|
|
12
12
|
"description": "example",
|
|
13
13
|
"value": {
|
|
14
|
-
"
|
|
14
|
+
"method": "GET"
|
|
15
15
|
},
|
|
16
16
|
"disable_parent_folder_behavior": true,
|
|
17
17
|
"recursive": true
|
|
@@ -172,7 +172,7 @@ await behavior.update({
|
|
|
172
172
|
"name": "example",
|
|
173
173
|
"description": "example",
|
|
174
174
|
"value": {
|
|
175
|
-
"
|
|
175
|
+
"method": "GET"
|
|
176
176
|
},
|
|
177
177
|
"disable_parent_folder_behavior": true,
|
|
178
178
|
"recursive": true
|
package/docs/models/DnsRecord.md
CHANGED
package/docs/models/Group.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"admin_ids": "1",
|
|
11
11
|
"notes": "example",
|
|
12
12
|
"user_ids": "1",
|
|
13
|
-
"usernames": "
|
|
13
|
+
"usernames": "user",
|
|
14
14
|
"ftp_permission": true,
|
|
15
15
|
"sftp_permission": true,
|
|
16
16
|
"dav_permission": true,
|
|
@@ -140,7 +140,7 @@ await group.update({
|
|
|
140
140
|
"admin_ids": "1",
|
|
141
141
|
"notes": "example",
|
|
142
142
|
"user_ids": "1",
|
|
143
|
-
"usernames": "
|
|
143
|
+
"usernames": "user",
|
|
144
144
|
"ftp_permission": true,
|
|
145
145
|
"sftp_permission": true,
|
|
146
146
|
"dav_permission": true,
|
package/docs/models/GroupUser.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
{
|
|
7
|
-
"group_name": "
|
|
7
|
+
"group_name": "My Group",
|
|
8
8
|
"group_id": 1,
|
|
9
9
|
"user_id": 1,
|
|
10
10
|
"admin": true,
|
|
@@ -82,7 +82,7 @@ await group_user.update({
|
|
|
82
82
|
|
|
83
83
|
```json
|
|
84
84
|
{
|
|
85
|
-
"group_name": "
|
|
85
|
+
"group_name": "My Group",
|
|
86
86
|
"group_id": 1,
|
|
87
87
|
"user_id": 1,
|
|
88
88
|
"admin": true,
|
|
@@ -4,7 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
{
|
|
7
|
-
"inbox_registration":
|
|
7
|
+
"inbox_registration": {
|
|
8
|
+
"code": "abc123",
|
|
9
|
+
"name": "account",
|
|
10
|
+
"company": "Action Verb",
|
|
11
|
+
"email": "john.doe@files.com",
|
|
12
|
+
"ip": "10.1.1.1",
|
|
13
|
+
"clickwrap_body": "example",
|
|
14
|
+
"form_field_set_id": 1,
|
|
15
|
+
"form_field_data": {
|
|
16
|
+
"key": "example value"
|
|
17
|
+
},
|
|
18
|
+
"inbox_id": 1,
|
|
19
|
+
"inbox_recipient_id": 1,
|
|
20
|
+
"inbox_title": "example",
|
|
21
|
+
"created_at": "2000-01-01T01:00:00Z"
|
|
22
|
+
},
|
|
8
23
|
"path": "a/b/test.txt",
|
|
9
24
|
"created_at": "2000-01-01T01:00:00Z"
|
|
10
25
|
}
|
package/docs/models/Request.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"path": "example",
|
|
9
9
|
"source": "example",
|
|
10
10
|
"destination": "example",
|
|
11
|
-
"automation_id":
|
|
11
|
+
"automation_id": 1,
|
|
12
12
|
"user_display_name": "example"
|
|
13
13
|
}
|
|
14
14
|
```
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* `path` (string): Folder path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
18
18
|
* `source` (string): Source filename, if applicable
|
|
19
19
|
* `destination` (string): Destination filename
|
|
20
|
-
* `automation_id` (
|
|
20
|
+
* `automation_id` (int64): ID of automation that created request
|
|
21
21
|
* `user_display_name` (string): User making the request (if applicable)
|
|
22
22
|
* `user_ids` (string): A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
|
|
23
23
|
* `group_ids` (string): A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
```
|
|
6
6
|
{
|
|
7
7
|
"id": 1,
|
|
8
|
-
"name": "
|
|
9
|
-
"fingerprint_md5": "
|
|
10
|
-
"fingerprint_sha256": "
|
|
8
|
+
"name": "My Key",
|
|
9
|
+
"fingerprint_md5": "12:7e:f8:61:78:a4:b2:c2:ee:12:51:92:25:a7:42:cc",
|
|
10
|
+
"fingerprint_sha256": "SHA256:5ANRkDpXWA+PgOquzZAG9RtQ1Bt8KXYAH2hecr7LQk8"
|
|
11
11
|
}
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -50,7 +50,7 @@ await SftpHostKey.find(id)
|
|
|
50
50
|
|
|
51
51
|
```
|
|
52
52
|
await SftpHostKey.create({
|
|
53
|
-
'name': "
|
|
53
|
+
'name': "My Key",
|
|
54
54
|
})
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -68,7 +68,7 @@ await SftpHostKey.create({
|
|
|
68
68
|
const sftp_host_key = await SftpHostKey.find(id)
|
|
69
69
|
|
|
70
70
|
await sftp_host_key.update({
|
|
71
|
-
'name': "
|
|
71
|
+
'name': "My Key",
|
|
72
72
|
})
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -83,9 +83,9 @@ await sftp_host_key.update({
|
|
|
83
83
|
```json
|
|
84
84
|
{
|
|
85
85
|
"id": 1,
|
|
86
|
-
"name": "
|
|
87
|
-
"fingerprint_md5": "
|
|
88
|
-
"fingerprint_sha256": "
|
|
86
|
+
"name": "My Key",
|
|
87
|
+
"fingerprint_md5": "12:7e:f8:61:78:a4:b2:c2:ee:12:51:92:25:a7:42:cc",
|
|
88
|
+
"fingerprint_sha256": "SHA256:5ANRkDpXWA+PgOquzZAG9RtQ1Bt8KXYAH2hecr7LQk8"
|
|
89
89
|
}
|
|
90
90
|
```
|
|
91
91
|
|
package/docs/models/Site.md
CHANGED
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"domain": "my-custom-domain.com",
|
|
79
79
|
"domain_hsts_header": true,
|
|
80
80
|
"domain_letsencrypt_chain": "example",
|
|
81
|
-
"email": "
|
|
81
|
+
"email": "john.doe@files.com",
|
|
82
82
|
"ftp_enabled": true,
|
|
83
|
-
"reply_to_email": "
|
|
83
|
+
"reply_to_email": "jane.doe@files.com",
|
|
84
84
|
"non_sso_groups_allowed": true,
|
|
85
85
|
"non_sso_users_allowed": true,
|
|
86
86
|
"folder_permissions_groups_only": true,
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
"dav_permission": true,
|
|
232
232
|
"disabled": true,
|
|
233
233
|
"disabled_expired_or_inactive": true,
|
|
234
|
-
"email": "
|
|
234
|
+
"email": "john.doe@files.com",
|
|
235
235
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
236
236
|
"ftp_permission": true,
|
|
237
237
|
"group_ids": "example",
|
|
@@ -500,8 +500,8 @@ await Site.update({
|
|
|
500
500
|
'domain': "my-custom-domain.com",
|
|
501
501
|
'domain_hsts_header': false,
|
|
502
502
|
'domain_letsencrypt_chain': "example",
|
|
503
|
-
'email': "
|
|
504
|
-
'reply_to_email': "
|
|
503
|
+
'email': "john.doe@files.com",
|
|
504
|
+
'reply_to_email': "jane.doe@files.com",
|
|
505
505
|
'allow_bundle_names': false,
|
|
506
506
|
'bundle_expiration': 1,
|
|
507
507
|
'welcome_email_enabled': false,
|
package/docs/models/Style.md
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
"id": 1,
|
|
8
8
|
"path": "example",
|
|
9
9
|
"logo": "https://mysite.files.com/...",
|
|
10
|
-
"thumbnail":
|
|
10
|
+
"thumbnail": {
|
|
11
|
+
"name": "My logo",
|
|
12
|
+
"uri": "https://mysite.files.com/.../my_image.png"
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
```
|
|
13
16
|
|
|
@@ -54,7 +57,10 @@ await style.update({
|
|
|
54
57
|
"id": 1,
|
|
55
58
|
"path": "example",
|
|
56
59
|
"logo": "https://mysite.files.com/...",
|
|
57
|
-
"thumbnail":
|
|
60
|
+
"thumbnail": {
|
|
61
|
+
"name": "My logo",
|
|
62
|
+
"uri": "https://mysite.files.com/.../my_image.png"
|
|
63
|
+
}
|
|
58
64
|
}
|
|
59
65
|
```
|
|
60
66
|
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
"read_api_usage": 1,
|
|
11
11
|
"write_api_usage": 1,
|
|
12
12
|
"user_count": 1,
|
|
13
|
-
"current_storage": 1,
|
|
14
|
-
"deleted_files_storage": 1,
|
|
15
|
-
"deleted_files_counted_in_minimum": 1,
|
|
16
|
-
"root_storage": 1,
|
|
17
|
-
"usage_by_top_level_dir":
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
"current_storage": 1.0,
|
|
14
|
+
"deleted_files_storage": 1.0,
|
|
15
|
+
"deleted_files_counted_in_minimum": 1.0,
|
|
16
|
+
"root_storage": 1.0,
|
|
17
|
+
"usage_by_top_level_dir": [
|
|
18
|
+
{
|
|
19
|
+
"dir": "dir",
|
|
20
|
+
"size": 100,
|
|
21
|
+
"count": 10
|
|
22
|
+
}
|
|
23
|
+
]
|
|
20
24
|
}
|
|
21
25
|
```
|
|
22
26
|
|
|
@@ -26,11 +30,11 @@
|
|
|
26
30
|
* `read_api_usage` (int64): Read API Calls used on this day. Note: only updated for days before the current day.
|
|
27
31
|
* `write_api_usage` (int64): Write API Calls used on this day. Note: only updated for days before the current day.
|
|
28
32
|
* `user_count` (int64): Number of billable users as of this day.
|
|
29
|
-
* `current_storage` (
|
|
30
|
-
* `deleted_files_storage` (
|
|
31
|
-
* `deleted_files_counted_in_minimum` (
|
|
32
|
-
* `root_storage` (
|
|
33
|
-
* `usage_by_top_level_dir` (object): Usage broken down by each top-level folder
|
|
33
|
+
* `current_storage` (double): GB of Files Native Storage used on this day.
|
|
34
|
+
* `deleted_files_storage` (double): GB of Files Native Storage used on this day for files that have been deleted and are stored as backups.
|
|
35
|
+
* `deleted_files_counted_in_minimum` (double): GB of Files Native Storage used on this day for files that have been permanently deleted but were uploaded less than 30 days ago, and are still billable.
|
|
36
|
+
* `root_storage` (double): GB of Files Native Storage used for the root folder. Included here because this value will not be part of `usage_by_top_level_dir`
|
|
37
|
+
* `usage_by_top_level_dir` (array(object)): Usage broken down by each top-level folder
|
|
34
38
|
|
|
35
39
|
---
|
|
36
40
|
|
|
@@ -7,12 +7,9 @@
|
|
|
7
7
|
"id": 1,
|
|
8
8
|
"start_at": "2000-01-01T01:00:00Z",
|
|
9
9
|
"end_at": "2000-01-01T01:00:00Z",
|
|
10
|
-
"high_water_user_count": 1
|
|
10
|
+
"high_water_user_count": 1,
|
|
11
11
|
"current_storage": 1.0,
|
|
12
12
|
"high_water_storage": 1.0,
|
|
13
|
-
"usage_by_top_level_dir": {
|
|
14
|
-
"key": "example value"
|
|
15
|
-
},
|
|
16
13
|
"root_storage": 1.0,
|
|
17
14
|
"deleted_files_counted_in_minimum": 1.0,
|
|
18
15
|
"deleted_files_storage": 1.0,
|
|
@@ -20,17 +17,23 @@
|
|
|
20
17
|
"total_billable_transfer_usage": 1.0,
|
|
21
18
|
"bytes_sent": 1.0,
|
|
22
19
|
"sync_bytes_received": 1.0,
|
|
23
|
-
"sync_bytes_sent": 1.0
|
|
20
|
+
"sync_bytes_sent": 1.0,
|
|
21
|
+
"usage_by_top_level_dir": [
|
|
22
|
+
{
|
|
23
|
+
"dir": "dir",
|
|
24
|
+
"size": 100,
|
|
25
|
+
"count": 10
|
|
26
|
+
}
|
|
27
|
+
]
|
|
24
28
|
}
|
|
25
29
|
```
|
|
26
30
|
|
|
27
31
|
* `id` (int64): Usage snapshot ID
|
|
28
32
|
* `start_at` (date-time): Usage snapshot start date/time
|
|
29
33
|
* `end_at` (date-time): Usage snapshot end date/time
|
|
30
|
-
* `high_water_user_count` (
|
|
34
|
+
* `high_water_user_count` (int64): Highest user count number in time period
|
|
31
35
|
* `current_storage` (double): Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing)
|
|
32
36
|
* `high_water_storage` (double): Highest Storage Usage GB recorded in time period (used for billing)
|
|
33
|
-
* `usage_by_top_level_dir` (object): Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
|
|
34
37
|
* `root_storage` (double): Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
|
|
35
38
|
* `deleted_files_counted_in_minimum` (double): Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing)
|
|
36
39
|
* `deleted_files_storage` (double): Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing)
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
* `bytes_sent` (double): Transfer Usage for period - Outbound GB from Files Native Storage
|
|
40
43
|
* `sync_bytes_received` (double): Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount)
|
|
41
44
|
* `sync_bytes_sent` (double): Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount)
|
|
45
|
+
* `usage_by_top_level_dir` (array(object)): Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
|
|
42
46
|
|
|
43
47
|
---
|
|
44
48
|
|
package/docs/models/User.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dav_permission": true,
|
|
24
24
|
"disabled": true,
|
|
25
25
|
"disabled_expired_or_inactive": true,
|
|
26
|
-
"email": "
|
|
26
|
+
"email": "john.doe@files.com",
|
|
27
27
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
28
28
|
"ftp_permission": true,
|
|
29
29
|
"group_ids": "example",
|
|
@@ -198,7 +198,7 @@ await User.find(id)
|
|
|
198
198
|
```
|
|
199
199
|
await User.create({
|
|
200
200
|
'avatar_delete': false,
|
|
201
|
-
'email': "
|
|
201
|
+
'email': "john.doe@files.com",
|
|
202
202
|
'group_id': 1,
|
|
203
203
|
'group_ids': "example",
|
|
204
204
|
'announcements_read': false,
|
|
@@ -345,7 +345,7 @@ const user = await User.find(id)
|
|
|
345
345
|
|
|
346
346
|
await user.update({
|
|
347
347
|
'avatar_delete': false,
|
|
348
|
-
'email': "
|
|
348
|
+
'email': "john.doe@files.com",
|
|
349
349
|
'group_id': 1,
|
|
350
350
|
'group_ids': "example",
|
|
351
351
|
'announcements_read': false,
|
|
@@ -461,7 +461,7 @@ await user.update({
|
|
|
461
461
|
"dav_permission": true,
|
|
462
462
|
"disabled": true,
|
|
463
463
|
"disabled_expired_or_inactive": true,
|
|
464
|
-
"email": "
|
|
464
|
+
"email": "john.doe@files.com",
|
|
465
465
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
466
466
|
"ftp_permission": true,
|
|
467
467
|
"group_ids": "example",
|
package/lib/Files.js
CHANGED
|
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
|
|
|
11
11
|
var apiKey;
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
|
-
var version = '1.2.
|
|
14
|
+
var version = '1.2.223';
|
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
|
17
17
|
var debugRequest = false;
|
package/lib/models/Automation.js
CHANGED
|
@@ -40,7 +40,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
40
40
|
(0, _defineProperty2.default)(this, "setId", function (value) {
|
|
41
41
|
_this.attributes.id = value;
|
|
42
42
|
});
|
|
43
|
-
// boolean # Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
43
|
+
// boolean # Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
44
44
|
(0, _defineProperty2.default)(this, "getAlwaysOverwriteSizeMatchingFiles", function () {
|
|
45
45
|
return _this.attributes.always_overwrite_size_matching_files;
|
|
46
46
|
});
|
|
@@ -159,7 +159,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
159
159
|
(0, _defineProperty2.default)(this, "setName", function (value) {
|
|
160
160
|
_this.attributes.name = value;
|
|
161
161
|
});
|
|
162
|
-
// boolean # If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
162
|
+
// boolean # If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
163
163
|
(0, _defineProperty2.default)(this, "getOverwriteFiles", function () {
|
|
164
164
|
return _this.attributes.overwrite_files;
|
|
165
165
|
});
|
|
@@ -354,7 +354,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
354
354
|
// schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
|
|
355
355
|
// schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
|
|
356
356
|
// schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
|
|
357
|
-
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
357
|
+
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
358
358
|
// description - string - Description for the this Automation.
|
|
359
359
|
// disabled - boolean - If true, this automation will not run.
|
|
360
360
|
// exclude_pattern - string - If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
|
|
@@ -363,7 +363,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
363
363
|
// ignore_locked_folders - boolean - If true, the Lock Folders behavior will be disregarded for automated actions.
|
|
364
364
|
// legacy_folder_matching - boolean - DEPRECATED: If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
365
365
|
// name - string - Name for this automation.
|
|
366
|
-
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
366
|
+
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
367
367
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
368
368
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
369
369
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
@@ -771,7 +771,7 @@ _Automation = Automation;
|
|
|
771
771
|
// schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
|
|
772
772
|
// schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
|
|
773
773
|
// schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
|
|
774
|
-
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
774
|
+
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
775
775
|
// description - string - Description for the this Automation.
|
|
776
776
|
// disabled - boolean - If true, this automation will not run.
|
|
777
777
|
// exclude_pattern - string - If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
|
|
@@ -780,7 +780,7 @@ _Automation = Automation;
|
|
|
780
780
|
// ignore_locked_folders - boolean - If true, the Lock Folders behavior will be disregarded for automated actions.
|
|
781
781
|
// legacy_folder_matching - boolean - DEPRECATED: If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
782
782
|
// name - string - Name for this automation.
|
|
783
|
-
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
783
|
+
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
784
784
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
785
785
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
786
786
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
@@ -49,7 +49,7 @@ var AutomationRun = /*#__PURE__*/(0, _createClass2.default)(function AutomationR
|
|
|
49
49
|
(0, _defineProperty2.default)(this, "getCreatedAt", function () {
|
|
50
50
|
return _this.attributes.created_at;
|
|
51
51
|
});
|
|
52
|
-
//
|
|
52
|
+
// date-time # If set, this automation will be retried at this date/time due to `failure` or `partial_failure`.
|
|
53
53
|
(0, _defineProperty2.default)(this, "getRetryAt", function () {
|
|
54
54
|
return _this.attributes.retry_at;
|
|
55
55
|
});
|
package/lib/models/Request.js
CHANGED
|
@@ -61,7 +61,7 @@ var Request = /*#__PURE__*/(0, _createClass2.default)(function Request() {
|
|
|
61
61
|
(0, _defineProperty2.default)(this, "setDestination", function (value) {
|
|
62
62
|
_this.attributes.destination = value;
|
|
63
63
|
});
|
|
64
|
-
//
|
|
64
|
+
// int64 # ID of automation that created request
|
|
65
65
|
(0, _defineProperty2.default)(this, "getAutomationId", function () {
|
|
66
66
|
return _this.attributes.automation_id;
|
|
67
67
|
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _Api = _interopRequireDefault(require("../Api"));
|
|
12
|
+
var errors = _interopRequireWildcard(require("../Errors"));
|
|
13
|
+
var _utils = require("../utils");
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable no-unused-vars */
|
|
18
|
+
/* eslint-enable no-unused-vars */
|
|
19
|
+
/**
|
|
20
|
+
* Class UsageByTopLevelDir
|
|
21
|
+
*/
|
|
22
|
+
var UsageByTopLevelDir = /*#__PURE__*/(0, _createClass2.default)(function UsageByTopLevelDir() {
|
|
23
|
+
var _this = this;
|
|
24
|
+
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
25
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
26
|
+
(0, _classCallCheck2.default)(this, UsageByTopLevelDir);
|
|
27
|
+
(0, _defineProperty2.default)(this, "attributes", {});
|
|
28
|
+
(0, _defineProperty2.default)(this, "options", {});
|
|
29
|
+
(0, _defineProperty2.default)(this, "isLoaded", function () {
|
|
30
|
+
return !!_this.attributes.id;
|
|
31
|
+
});
|
|
32
|
+
// string # Directory name
|
|
33
|
+
(0, _defineProperty2.default)(this, "getDir", function () {
|
|
34
|
+
return _this.attributes.dir;
|
|
35
|
+
});
|
|
36
|
+
// int64 # Usage
|
|
37
|
+
(0, _defineProperty2.default)(this, "getSize", function () {
|
|
38
|
+
return _this.attributes.size;
|
|
39
|
+
});
|
|
40
|
+
// int64 # File count
|
|
41
|
+
(0, _defineProperty2.default)(this, "getCount", function () {
|
|
42
|
+
return _this.attributes.count;
|
|
43
|
+
});
|
|
44
|
+
Object.entries(attributes).forEach(function (_ref) {
|
|
45
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
46
|
+
key = _ref2[0],
|
|
47
|
+
value = _ref2[1];
|
|
48
|
+
var normalizedKey = key.replace('?', '');
|
|
49
|
+
_this.attributes[normalizedKey] = value;
|
|
50
|
+
Object.defineProperty(_this, normalizedKey, {
|
|
51
|
+
value: value,
|
|
52
|
+
writable: false
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
this.options = _objectSpread({}, options);
|
|
56
|
+
});
|
|
57
|
+
var _default = exports.default = UsageByTopLevelDir;
|
|
58
|
+
module.exports = UsageByTopLevelDir;
|
|
59
|
+
module.exports.default = UsageByTopLevelDir;
|
|
@@ -57,23 +57,23 @@ var UsageDailySnapshot = /*#__PURE__*/(0, _createClass2.default)(function UsageD
|
|
|
57
57
|
(0, _defineProperty2.default)(this, "getUserCount", function () {
|
|
58
58
|
return _this.attributes.user_count;
|
|
59
59
|
});
|
|
60
|
-
//
|
|
60
|
+
// double # GB of Files Native Storage used on this day.
|
|
61
61
|
(0, _defineProperty2.default)(this, "getCurrentStorage", function () {
|
|
62
62
|
return _this.attributes.current_storage;
|
|
63
63
|
});
|
|
64
|
-
//
|
|
64
|
+
// double # GB of Files Native Storage used on this day for files that have been deleted and are stored as backups.
|
|
65
65
|
(0, _defineProperty2.default)(this, "getDeletedFilesStorage", function () {
|
|
66
66
|
return _this.attributes.deleted_files_storage;
|
|
67
67
|
});
|
|
68
|
-
//
|
|
68
|
+
// double # GB of Files Native Storage used on this day for files that have been permanently deleted but were uploaded less than 30 days ago, and are still billable.
|
|
69
69
|
(0, _defineProperty2.default)(this, "getDeletedFilesCountedInMinimum", function () {
|
|
70
70
|
return _this.attributes.deleted_files_counted_in_minimum;
|
|
71
71
|
});
|
|
72
|
-
//
|
|
72
|
+
// double # GB of Files Native Storage used for the root folder. Included here because this value will not be part of `usage_by_top_level_dir`
|
|
73
73
|
(0, _defineProperty2.default)(this, "getRootStorage", function () {
|
|
74
74
|
return _this.attributes.root_storage;
|
|
75
75
|
});
|
|
76
|
-
// object # Usage broken down by each top-level folder
|
|
76
|
+
// array(object) # Usage broken down by each top-level folder
|
|
77
77
|
(0, _defineProperty2.default)(this, "getUsageByTopLevelDir", function () {
|
|
78
78
|
return _this.attributes.usage_by_top_level_dir;
|
|
79
79
|
});
|
|
@@ -45,7 +45,7 @@ var UsageSnapshot = /*#__PURE__*/(0, _createClass2.default)(function UsageSnapsh
|
|
|
45
45
|
(0, _defineProperty2.default)(this, "getEndAt", function () {
|
|
46
46
|
return _this.attributes.end_at;
|
|
47
47
|
});
|
|
48
|
-
//
|
|
48
|
+
// int64 # Highest user count number in time period
|
|
49
49
|
(0, _defineProperty2.default)(this, "getHighWaterUserCount", function () {
|
|
50
50
|
return _this.attributes.high_water_user_count;
|
|
51
51
|
});
|
|
@@ -57,10 +57,6 @@ var UsageSnapshot = /*#__PURE__*/(0, _createClass2.default)(function UsageSnapsh
|
|
|
57
57
|
(0, _defineProperty2.default)(this, "getHighWaterStorage", function () {
|
|
58
58
|
return _this.attributes.high_water_storage;
|
|
59
59
|
});
|
|
60
|
-
// object # Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
|
|
61
|
-
(0, _defineProperty2.default)(this, "getUsageByTopLevelDir", function () {
|
|
62
|
-
return _this.attributes.usage_by_top_level_dir;
|
|
63
|
-
});
|
|
64
60
|
// double # Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
|
|
65
61
|
(0, _defineProperty2.default)(this, "getRootStorage", function () {
|
|
66
62
|
return _this.attributes.root_storage;
|
|
@@ -93,6 +89,10 @@ var UsageSnapshot = /*#__PURE__*/(0, _createClass2.default)(function UsageSnapsh
|
|
|
93
89
|
(0, _defineProperty2.default)(this, "getSyncBytesSent", function () {
|
|
94
90
|
return _this.attributes.sync_bytes_sent;
|
|
95
91
|
});
|
|
92
|
+
// array(object) # Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
|
|
93
|
+
(0, _defineProperty2.default)(this, "getUsageByTopLevelDir", function () {
|
|
94
|
+
return _this.attributes.usage_by_top_level_dir;
|
|
95
|
+
});
|
|
96
96
|
Object.entries(attributes).forEach(function (_ref) {
|
|
97
97
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
98
98
|
key = _ref2[0],
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Automation.js
CHANGED
|
@@ -35,7 +35,7 @@ class Automation {
|
|
|
35
35
|
this.attributes.id = value
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// boolean # Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
38
|
+
// boolean # Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
39
39
|
getAlwaysOverwriteSizeMatchingFiles = () => this.attributes.always_overwrite_size_matching_files
|
|
40
40
|
|
|
41
41
|
setAlwaysOverwriteSizeMatchingFiles = value => {
|
|
@@ -154,7 +154,7 @@ class Automation {
|
|
|
154
154
|
this.attributes.name = value
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
// boolean # If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
157
|
+
// boolean # If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
158
158
|
getOverwriteFiles = () => this.attributes.overwrite_files
|
|
159
159
|
|
|
160
160
|
setOverwriteFiles = value => {
|
|
@@ -326,7 +326,7 @@ class Automation {
|
|
|
326
326
|
// schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
|
|
327
327
|
// schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
|
|
328
328
|
// schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
|
|
329
|
-
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
329
|
+
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
330
330
|
// description - string - Description for the this Automation.
|
|
331
331
|
// disabled - boolean - If true, this automation will not run.
|
|
332
332
|
// exclude_pattern - string - If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
|
|
@@ -335,7 +335,7 @@ class Automation {
|
|
|
335
335
|
// ignore_locked_folders - boolean - If true, the Lock Folders behavior will be disregarded for automated actions.
|
|
336
336
|
// legacy_folder_matching - boolean - DEPRECATED: If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
337
337
|
// name - string - Name for this automation.
|
|
338
|
-
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
338
|
+
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
339
339
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
340
340
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
341
341
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
@@ -567,7 +567,7 @@ class Automation {
|
|
|
567
567
|
// schedule_days_of_week - array(int64) - If trigger is `custom_schedule`. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
|
|
568
568
|
// schedule_times_of_day - array(string) - If trigger is `custom_schedule`. A list of times of day to run this automation. 24-hour time format.
|
|
569
569
|
// schedule_time_zone - string - If trigger is `custom_schedule`. Time zone for the schedule.
|
|
570
|
-
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
|
|
570
|
+
// always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
571
571
|
// description - string - Description for the this Automation.
|
|
572
572
|
// disabled - boolean - If true, this automation will not run.
|
|
573
573
|
// exclude_pattern - string - If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
|
|
@@ -576,7 +576,7 @@ class Automation {
|
|
|
576
576
|
// ignore_locked_folders - boolean - If true, the Lock Folders behavior will be disregarded for automated actions.
|
|
577
577
|
// legacy_folder_matching - boolean - DEPRECATED: If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
|
|
578
578
|
// name - string - Name for this automation.
|
|
579
|
-
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the
|
|
579
|
+
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
|
|
580
580
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
581
581
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
582
582
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
@@ -40,7 +40,7 @@ class AutomationRun {
|
|
|
40
40
|
// date-time # Automation run start date/time.
|
|
41
41
|
getCreatedAt = () => this.attributes.created_at
|
|
42
42
|
|
|
43
|
-
//
|
|
43
|
+
// date-time # If set, this automation will be retried at this date/time due to `failure` or `partial_failure`.
|
|
44
44
|
getRetryAt = () => this.attributes.retry_at
|
|
45
45
|
|
|
46
46
|
// date-time # If set, this Automation run was retried due to `failure` or `partial_failure`.
|
package/src/models/Request.js
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
import Api from '../Api'
|
|
3
|
+
import * as errors from '../Errors'
|
|
4
|
+
import {
|
|
5
|
+
getType, isArray, isInt, isObject, isString,
|
|
6
|
+
} from '../utils'
|
|
7
|
+
/* eslint-enable no-unused-vars */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Class UsageByTopLevelDir
|
|
11
|
+
*/
|
|
12
|
+
class UsageByTopLevelDir {
|
|
13
|
+
attributes = {}
|
|
14
|
+
|
|
15
|
+
options = {}
|
|
16
|
+
|
|
17
|
+
constructor(attributes = {}, options = {}) {
|
|
18
|
+
Object.entries(attributes).forEach(([key, value]) => {
|
|
19
|
+
const normalizedKey = key.replace('?', '')
|
|
20
|
+
|
|
21
|
+
this.attributes[normalizedKey] = value
|
|
22
|
+
|
|
23
|
+
Object.defineProperty(this, normalizedKey, { value, writable: false })
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
this.options = { ...options }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
isLoaded = () => !!this.attributes.id
|
|
30
|
+
|
|
31
|
+
// string # Directory name
|
|
32
|
+
getDir = () => this.attributes.dir
|
|
33
|
+
|
|
34
|
+
// int64 # Usage
|
|
35
|
+
getSize = () => this.attributes.size
|
|
36
|
+
|
|
37
|
+
// int64 # File count
|
|
38
|
+
getCount = () => this.attributes.count
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default UsageByTopLevelDir
|
|
42
|
+
|
|
43
|
+
module.exports = UsageByTopLevelDir
|
|
44
|
+
module.exports.default = UsageByTopLevelDir
|
|
@@ -46,19 +46,19 @@ class UsageDailySnapshot {
|
|
|
46
46
|
// int64 # Number of billable users as of this day.
|
|
47
47
|
getUserCount = () => this.attributes.user_count
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// double # GB of Files Native Storage used on this day.
|
|
50
50
|
getCurrentStorage = () => this.attributes.current_storage
|
|
51
51
|
|
|
52
|
-
//
|
|
52
|
+
// double # GB of Files Native Storage used on this day for files that have been deleted and are stored as backups.
|
|
53
53
|
getDeletedFilesStorage = () => this.attributes.deleted_files_storage
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// double # GB of Files Native Storage used on this day for files that have been permanently deleted but were uploaded less than 30 days ago, and are still billable.
|
|
56
56
|
getDeletedFilesCountedInMinimum = () => this.attributes.deleted_files_counted_in_minimum
|
|
57
57
|
|
|
58
|
-
//
|
|
58
|
+
// double # GB of Files Native Storage used for the root folder. Included here because this value will not be part of `usage_by_top_level_dir`
|
|
59
59
|
getRootStorage = () => this.attributes.root_storage
|
|
60
60
|
|
|
61
|
-
// object # Usage broken down by each top-level folder
|
|
61
|
+
// array(object) # Usage broken down by each top-level folder
|
|
62
62
|
getUsageByTopLevelDir = () => this.attributes.usage_by_top_level_dir
|
|
63
63
|
|
|
64
64
|
// Parameters:
|
|
@@ -37,7 +37,7 @@ class UsageSnapshot {
|
|
|
37
37
|
// date-time # Usage snapshot end date/time
|
|
38
38
|
getEndAt = () => this.attributes.end_at
|
|
39
39
|
|
|
40
|
-
//
|
|
40
|
+
// int64 # Highest user count number in time period
|
|
41
41
|
getHighWaterUserCount = () => this.attributes.high_water_user_count
|
|
42
42
|
|
|
43
43
|
// double # Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing)
|
|
@@ -46,9 +46,6 @@ class UsageSnapshot {
|
|
|
46
46
|
// double # Highest Storage Usage GB recorded in time period (used for billing)
|
|
47
47
|
getHighWaterStorage = () => this.attributes.high_water_storage
|
|
48
48
|
|
|
49
|
-
// object # Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
|
|
50
|
-
getUsageByTopLevelDir = () => this.attributes.usage_by_top_level_dir
|
|
51
|
-
|
|
52
49
|
// double # Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
|
|
53
50
|
getRootStorage = () => this.attributes.root_storage
|
|
54
51
|
|
|
@@ -73,6 +70,9 @@ class UsageSnapshot {
|
|
|
73
70
|
// double # Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount)
|
|
74
71
|
getSyncBytesSent = () => this.attributes.sync_bytes_sent
|
|
75
72
|
|
|
73
|
+
// array(object) # Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
|
|
74
|
+
getUsageByTopLevelDir = () => this.attributes.usage_by_top_level_dir
|
|
75
|
+
|
|
76
76
|
// Parameters:
|
|
77
77
|
// cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
78
78
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|