files.com 1.0.188 → 1.0.191
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/Errors.md +186 -0
- package/docs/models/AccountLineItem.md +53 -0
- package/docs/models/Action.md +37 -0
- package/docs/models/ActionNotificationExport.md +82 -0
- package/docs/models/ActionNotificationExportResult.md +49 -0
- package/docs/models/ActionWebhookFailure.md +16 -0
- package/docs/models/ApiKey.md +183 -0
- package/docs/models/App.md +66 -0
- package/docs/models/As2IncomingMessage.md +104 -0
- package/docs/models/As2OutgoingMessage.md +96 -0
- package/docs/models/As2Partner.md +141 -0
- package/docs/models/As2Station.md +142 -0
- package/docs/models/Auto.md +11 -0
- package/docs/models/Automation.md +257 -0
- package/docs/models/AutomationRun.md +61 -0
- package/docs/models/BandwidthSnapshot.md +50 -0
- package/docs/models/Behavior.md +195 -0
- package/docs/models/Bundle.md +330 -0
- package/docs/models/BundleDownload.md +44 -0
- package/docs/models/BundleRecipient.md +76 -0
- package/docs/models/BundleRegistration.md +53 -0
- package/docs/models/Clickwrap.md +120 -0
- package/docs/models/DnsRecord.md +33 -0
- package/docs/models/Errors.md +17 -0
- package/docs/models/ExternalEvent.md +84 -0
- package/docs/models/File.md +339 -0
- package/docs/models/FileAction.md +13 -0
- package/docs/models/FileComment.md +98 -0
- package/docs/models/FileCommentReaction.md +50 -0
- package/docs/models/FileMigration.md +40 -0
- package/docs/models/FileUploadPart.md +39 -0
- package/docs/models/Folder.md +90 -0
- package/docs/models/FormField.md +29 -0
- package/docs/models/FormFieldSet.md +170 -0
- package/docs/models/Group.md +140 -0
- package/docs/models/GroupUser.md +116 -0
- package/docs/models/History.md +151 -0
- package/docs/models/HistoryExport.md +130 -0
- package/docs/models/HistoryExportResult.md +75 -0
- package/docs/models/Image.md +13 -0
- package/docs/models/InboxRecipient.md +76 -0
- package/docs/models/InboxRegistration.md +47 -0
- package/docs/models/InboxUpload.md +42 -0
- package/docs/models/Invoice.md +82 -0
- package/docs/models/InvoiceLineItem.md +27 -0
- package/docs/models/IpAddress.md +51 -0
- package/docs/models/Lock.md +92 -0
- package/docs/models/Message.md +134 -0
- package/docs/models/MessageComment.md +114 -0
- package/docs/models/MessageCommentReaction.md +79 -0
- package/docs/models/MessageReaction.md +79 -0
- package/docs/models/Notification.md +241 -0
- package/docs/models/Payment.md +82 -0
- package/docs/models/PaymentLineItem.md +19 -0
- package/docs/models/Permission.md +94 -0
- package/docs/models/Preview.md +19 -0
- package/docs/models/Priority.md +30 -0
- package/docs/models/Project.md +98 -0
- package/docs/models/PublicIpAddress.md +17 -0
- package/docs/models/PublicKey.md +112 -0
- package/docs/models/RemoteBandwidthSnapshot.md +42 -0
- package/docs/models/RemoteServer.md +385 -0
- package/docs/models/Request.md +97 -0
- package/docs/models/Session.md +50 -0
- package/docs/models/SettingsChange.md +44 -0
- package/docs/models/Site.md +607 -0
- package/docs/models/SsoStrategy.md +139 -0
- package/docs/models/Status.md +30 -0
- package/docs/models/Style.md +76 -0
- package/docs/models/UsageDailySnapshot.md +56 -0
- package/docs/models/UsageSnapshot.md +63 -0
- package/docs/models/User.md +465 -0
- package/docs/models/UserCipherUse.md +39 -0
- package/docs/models/UserRequest.md +80 -0
- package/docs/models/WebhookTest.md +59 -0
- package/lib/Api.js +12 -11
- package/lib/Errors.js +3126 -0
- package/lib/models/AccountLineItem.js +8 -0
- package/lib/models/Action.js +8 -0
- package/lib/models/ActionNotificationExport.js +21 -13
- package/lib/models/ActionNotificationExportResult.js +13 -5
- package/lib/models/ActionWebhookFailure.js +12 -4
- package/lib/models/ApiKey.js +33 -25
- package/lib/models/App.js +10 -2
- package/lib/models/As2IncomingMessage.js +11 -3
- package/lib/models/As2OutgoingMessage.js +11 -3
- package/lib/models/As2Partner.js +34 -26
- package/lib/models/As2Station.js +32 -24
- package/lib/models/Auto.js +8 -0
- package/lib/models/Automation.js +54 -60
- package/lib/models/AutomationRun.js +16 -8
- package/lib/models/BandwidthSnapshot.js +10 -2
- package/lib/models/Behavior.js +46 -38
- package/lib/models/Bundle.js +51 -43
- package/lib/models/BundleDownload.js +12 -4
- package/lib/models/BundleRecipient.js +22 -14
- package/lib/models/BundleRegistration.js +12 -4
- package/lib/models/Clickwrap.js +31 -23
- package/lib/models/DnsRecord.js +10 -2
- package/lib/models/Errors.js +8 -0
- package/lib/models/ExternalEvent.js +18 -10
- package/lib/models/File.js +68 -60
- package/lib/models/FileAction.js +8 -0
- package/lib/models/FileComment.js +27 -19
- package/lib/models/FileCommentReaction.js +18 -10
- package/lib/models/FileMigration.js +11 -3
- package/lib/models/FileUploadPart.js +8 -0
- package/lib/models/Folder.js +19 -11
- package/lib/models/FormField.js +8 -0
- package/lib/models/FormFieldSet.js +27 -19
- package/lib/models/Group.js +30 -22
- package/lib/models/GroupUser.js +32 -24
- package/lib/models/History.js +42 -34
- package/lib/models/HistoryExport.js +34 -26
- package/lib/models/HistoryExportResult.js +13 -5
- package/lib/models/Image.js +8 -0
- package/lib/models/InboxRecipient.js +22 -14
- package/lib/models/InboxRegistration.js +11 -3
- package/lib/models/InboxUpload.js +12 -4
- package/lib/models/Invoice.js +13 -5
- package/lib/models/InvoiceLineItem.js +8 -0
- package/lib/models/IpAddress.js +12 -4
- package/lib/models/Lock.js +24 -16
- package/lib/models/Message.js +37 -29
- package/lib/models/MessageComment.js +29 -21
- package/lib/models/MessageCommentReaction.js +24 -16
- package/lib/models/MessageReaction.js +24 -16
- package/lib/models/Notification.js +38 -30
- package/lib/models/Payment.js +13 -5
- package/lib/models/PaymentLineItem.js +8 -0
- package/lib/models/Permission.js +23 -15
- package/lib/models/Preview.js +8 -0
- package/lib/models/Priority.js +13 -5
- package/lib/models/Project.js +25 -17
- package/lib/models/PublicIpAddress.js +8 -0
- package/lib/models/PublicKey.js +29 -21
- package/lib/models/RemoteBandwidthSnapshot.js +10 -2
- package/lib/models/RemoteServer.js +226 -196
- package/lib/models/Request.js +27 -19
- package/lib/models/Session.js +13 -5
- package/lib/models/SettingsChange.js +10 -2
- package/lib/models/Site.js +65 -57
- package/lib/models/SsoStrategy.js +17 -9
- package/lib/models/Status.js +8 -0
- package/lib/models/Style.js +20 -12
- package/lib/models/UsageDailySnapshot.js +10 -2
- package/lib/models/UsageSnapshot.js +10 -2
- package/lib/models/User.js +85 -77
- package/lib/models/UserCipherUse.js +11 -3
- package/lib/models/UserRequest.js +24 -16
- package/lib/models/WebhookTest.js +16 -8
- package/package.json +1 -1
- package/src/Api.js +4 -8
- package/src/Errors.js +222 -0
- package/src/models/AccountLineItem.js +1 -0
- package/src/models/Action.js +1 -0
- package/src/models/ActionNotificationExport.js +14 -13
- package/src/models/ActionNotificationExportResult.js +6 -5
- package/src/models/ActionWebhookFailure.js +5 -4
- package/src/models/ApiKey.js +26 -25
- package/src/models/App.js +3 -2
- package/src/models/As2IncomingMessage.js +4 -3
- package/src/models/As2OutgoingMessage.js +4 -3
- package/src/models/As2Partner.js +27 -26
- package/src/models/As2Station.js +25 -24
- package/src/models/Auto.js +1 -0
- package/src/models/Automation.js +51 -62
- package/src/models/AutomationRun.js +9 -8
- package/src/models/BandwidthSnapshot.js +3 -2
- package/src/models/Behavior.js +39 -38
- package/src/models/Bundle.js +44 -43
- package/src/models/BundleDownload.js +5 -4
- package/src/models/BundleRecipient.js +15 -14
- package/src/models/BundleRegistration.js +5 -4
- package/src/models/Clickwrap.js +24 -23
- package/src/models/DnsRecord.js +3 -2
- package/src/models/Errors.js +1 -0
- package/src/models/ExternalEvent.js +11 -10
- package/src/models/File.js +61 -60
- package/src/models/FileAction.js +1 -0
- package/src/models/FileComment.js +20 -19
- package/src/models/FileCommentReaction.js +11 -10
- package/src/models/FileMigration.js +4 -3
- package/src/models/FileUploadPart.js +1 -0
- package/src/models/Folder.js +12 -11
- package/src/models/FormField.js +1 -0
- package/src/models/FormFieldSet.js +20 -19
- package/src/models/Group.js +23 -22
- package/src/models/GroupUser.js +25 -24
- package/src/models/History.js +35 -34
- package/src/models/HistoryExport.js +27 -26
- package/src/models/HistoryExportResult.js +6 -5
- package/src/models/Image.js +1 -0
- package/src/models/InboxRecipient.js +15 -14
- package/src/models/InboxRegistration.js +4 -3
- package/src/models/InboxUpload.js +5 -4
- package/src/models/Invoice.js +6 -5
- package/src/models/InvoiceLineItem.js +1 -0
- package/src/models/IpAddress.js +5 -4
- package/src/models/Lock.js +17 -16
- package/src/models/Message.js +30 -29
- package/src/models/MessageComment.js +22 -21
- package/src/models/MessageCommentReaction.js +17 -16
- package/src/models/MessageReaction.js +17 -16
- package/src/models/Notification.js +31 -30
- package/src/models/Payment.js +6 -5
- package/src/models/PaymentLineItem.js +1 -0
- package/src/models/Permission.js +16 -15
- package/src/models/Preview.js +3 -2
- package/src/models/Priority.js +6 -5
- package/src/models/Project.js +18 -17
- package/src/models/PublicIpAddress.js +1 -0
- package/src/models/PublicKey.js +22 -21
- package/src/models/RemoteBandwidthSnapshot.js +3 -2
- package/src/models/RemoteServer.js +120 -103
- package/src/models/Request.js +20 -19
- package/src/models/Session.js +6 -5
- package/src/models/SettingsChange.js +3 -2
- package/src/models/Site.js +58 -57
- package/src/models/SsoStrategy.js +10 -9
- package/src/models/Status.js +1 -0
- package/src/models/Style.js +13 -12
- package/src/models/UsageDailySnapshot.js +3 -2
- package/src/models/UsageSnapshot.js +3 -2
- package/src/models/User.js +78 -77
- package/src/models/UserCipherUse.js +4 -3
- package/src/models/UserRequest.js +17 -16
- package/src/models/WebhookTest.js +9 -8
- package/test/src/index.js +46 -0
@@ -0,0 +1,465 @@
|
|
1
|
+
# User
|
2
|
+
|
3
|
+
## Example User Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"username": "user",
|
9
|
+
"admin_group_ids": [
|
10
|
+
1
|
11
|
+
],
|
12
|
+
"allowed_ips": "127.0.0.1",
|
13
|
+
"attachments_permission": true,
|
14
|
+
"api_keys_count": 1,
|
15
|
+
"authenticate_until": "2000-01-01T01:00:00Z",
|
16
|
+
"authentication_method": "password",
|
17
|
+
"avatar_url": "",
|
18
|
+
"billing_permission": true,
|
19
|
+
"bypass_site_allowed_ips": true,
|
20
|
+
"bypass_inactive_disable": true,
|
21
|
+
"created_at": "2000-01-01T01:00:00Z",
|
22
|
+
"dav_permission": true,
|
23
|
+
"disabled": true,
|
24
|
+
"email": "john.doe@files.com",
|
25
|
+
"ftp_permission": true,
|
26
|
+
"group_ids": "",
|
27
|
+
"header_text": "User-specific message.",
|
28
|
+
"language": "en",
|
29
|
+
"last_login_at": "2000-01-01T01:00:00Z",
|
30
|
+
"last_protocol_cipher": "",
|
31
|
+
"lockout_expires": "2000-01-01T01:00:00Z",
|
32
|
+
"name": "John Doe",
|
33
|
+
"company": "ACME Corp.",
|
34
|
+
"notes": "Internal notes on this user.",
|
35
|
+
"notification_daily_send_time": 18,
|
36
|
+
"office_integration_enabled": true,
|
37
|
+
"password_set_at": "2000-01-01T01:00:00Z",
|
38
|
+
"password_validity_days": 1,
|
39
|
+
"public_keys_count": 1,
|
40
|
+
"receive_admin_alerts": true,
|
41
|
+
"require_2fa": "always_require",
|
42
|
+
"active_2fa": true,
|
43
|
+
"require_password_change": true,
|
44
|
+
"password_expired": true,
|
45
|
+
"restapi_permission": true,
|
46
|
+
"self_managed": true,
|
47
|
+
"sftp_permission": true,
|
48
|
+
"site_admin": true,
|
49
|
+
"skip_welcome_screen": true,
|
50
|
+
"ssl_required": "always_require",
|
51
|
+
"sso_strategy_id": 1,
|
52
|
+
"subscribe_to_newsletter": true,
|
53
|
+
"externally_managed": true,
|
54
|
+
"time_zone": "Pacific Time (US & Canada)",
|
55
|
+
"type_of_2fa": "yubi",
|
56
|
+
"user_root": ""
|
57
|
+
}
|
58
|
+
```
|
59
|
+
|
60
|
+
* `id` (int64): User ID
|
61
|
+
* `username` (string): User's username
|
62
|
+
* `admin_group_ids` (array): List of group IDs of which this user is an administrator
|
63
|
+
* `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
|
64
|
+
* `attachments_permission` (boolean): DEPRECATED: Can the user create Bundles (aka Share Links)? Use the bundle permission instead.
|
65
|
+
* `api_keys_count` (int64): Number of api keys associated with this user
|
66
|
+
* `authenticate_until` (date-time): Scheduled Date/Time at which user will be deactivated
|
67
|
+
* `authentication_method` (string): How is this user authenticated?
|
68
|
+
* `avatar_url` (string): URL holding the user's avatar
|
69
|
+
* `billing_permission` (boolean): Allow this user to perform operations on the account, payments, and invoices?
|
70
|
+
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
71
|
+
* `bypass_inactive_disable` (boolean): Exempt this user from being disabled based on inactivity?
|
72
|
+
* `created_at` (date-time): When this user was created
|
73
|
+
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
74
|
+
* `disabled` (boolean): Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
|
75
|
+
* `email` (email): User email address
|
76
|
+
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
77
|
+
* `group_ids` (string): Comma-separated list of group IDs of which this user is a member
|
78
|
+
* `header_text` (string): Text to display to the user in the header of the UI
|
79
|
+
* `language` (string): Preferred language
|
80
|
+
* `last_login_at` (date-time): User's last login time
|
81
|
+
* `last_protocol_cipher` (string): The last protocol and cipher used
|
82
|
+
* `lockout_expires` (date-time): Time in the future that the user will no longer be locked out if applicable
|
83
|
+
* `name` (string): User's full name
|
84
|
+
* `company` (string): User's company
|
85
|
+
* `notes` (string): Any internal notes on the user
|
86
|
+
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
87
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
88
|
+
* `password_set_at` (date-time): Last time the user's password was set
|
89
|
+
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
90
|
+
* `public_keys_count` (int64): Number of public keys associated with this user
|
91
|
+
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
92
|
+
* `require_2fa` (string): 2FA required setting
|
93
|
+
* `active_2fa` (boolean): Is 2fa active for the user?
|
94
|
+
* `require_password_change` (boolean): Is a password change required upon next user login?
|
95
|
+
* `password_expired` (boolean): Is user's password expired?
|
96
|
+
* `restapi_permission` (boolean): Can this user access the REST API?
|
97
|
+
* `self_managed` (boolean): Does this user manage it's own credentials or is it a shared/bot user?
|
98
|
+
* `sftp_permission` (boolean): Can the user access with SFTP?
|
99
|
+
* `site_admin` (boolean): Is the user an administrator for this site?
|
100
|
+
* `skip_welcome_screen` (boolean): Skip Welcome page in the UI?
|
101
|
+
* `ssl_required` (string): SSL required setting
|
102
|
+
* `sso_strategy_id` (int64): SSO (Single Sign On) strategy ID for the user, if applicable.
|
103
|
+
* `subscribe_to_newsletter` (boolean): Is the user subscribed to the newsletter?
|
104
|
+
* `externally_managed` (boolean): Is this user managed by a SsoStrategy?
|
105
|
+
* `time_zone` (string): User time zone
|
106
|
+
* `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.
|
107
|
+
* `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.
|
108
|
+
* `avatar_file` (file): An image file for your user avatar.
|
109
|
+
* `avatar_delete` (boolean): If true, the avatar will be deleted.
|
110
|
+
* `change_password` (string): Used for changing a password on an existing user.
|
111
|
+
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
112
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
113
|
+
* `group_id` (int64): Group ID to associate this user with.
|
114
|
+
* `imported_password_hash` (string): Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash menthods are MD5, SHA1, and SHA256.
|
115
|
+
* `password` (string): User password.
|
116
|
+
* `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
|
117
|
+
* `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
|
118
|
+
|
119
|
+
---
|
120
|
+
|
121
|
+
## List Users
|
122
|
+
|
123
|
+
```
|
124
|
+
await User.list({
|
125
|
+
'per_page': 1,
|
126
|
+
})
|
127
|
+
```
|
128
|
+
|
129
|
+
|
130
|
+
### Parameters
|
131
|
+
|
132
|
+
* `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
133
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
134
|
+
* `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `authenticate_until`, `active`, `email`, `last_desktop_login_at`, `last_login_at`, `username`, `company`, `name`, `site_admin`, `receive_admin_alerts`, `password_validity_days`, `ssl_required` or `not_site_admin`.
|
135
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
136
|
+
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
137
|
+
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
138
|
+
* `filter_like` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
139
|
+
* `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
140
|
+
* `filter_lteq` (object): If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
141
|
+
* `ids` (string): comma-separated list of User IDs
|
142
|
+
* `q[username]` (string): List users matching username.
|
143
|
+
* `q[email]` (string): List users matching email.
|
144
|
+
* `q[notes]` (string): List users matching notes field.
|
145
|
+
* `q[admin]` (string): If `true`, list only admin users.
|
146
|
+
* `q[allowed_ips]` (string): If set, list only users with overridden allowed IP setting.
|
147
|
+
* `q[password_validity_days]` (string): If set, list only users with overridden password validity days setting.
|
148
|
+
* `q[ssl_required]` (string): If set, list only users with overridden SSL required setting.
|
149
|
+
* `search` (string): Searches for partial matches of name, username, or email.
|
150
|
+
|
151
|
+
---
|
152
|
+
|
153
|
+
## Show User
|
154
|
+
|
155
|
+
```
|
156
|
+
await User.find(id)
|
157
|
+
```
|
158
|
+
|
159
|
+
|
160
|
+
### Parameters
|
161
|
+
|
162
|
+
* `id` (int64): Required - User ID.
|
163
|
+
|
164
|
+
---
|
165
|
+
|
166
|
+
## Create User
|
167
|
+
|
168
|
+
```
|
169
|
+
await User.create({
|
170
|
+
'avatar_delete': true,
|
171
|
+
'email': "john.doe@files.com",
|
172
|
+
'group_id': 1,
|
173
|
+
'announcements_read': true,
|
174
|
+
'allowed_ips': "127.0.0.1",
|
175
|
+
'attachments_permission': true,
|
176
|
+
'authenticate_until': "2000-01-01T01:00:00Z",
|
177
|
+
'authentication_method': "password",
|
178
|
+
'billing_permission': true,
|
179
|
+
'bypass_inactive_disable': true,
|
180
|
+
'bypass_site_allowed_ips': true,
|
181
|
+
'dav_permission': true,
|
182
|
+
'disabled': true,
|
183
|
+
'ftp_permission': true,
|
184
|
+
'header_text': "User-specific message.",
|
185
|
+
'language': "en",
|
186
|
+
'notification_daily_send_time': 18,
|
187
|
+
'name': "John Doe",
|
188
|
+
'company': "ACME Corp.",
|
189
|
+
'notes': "Internal notes on this user.",
|
190
|
+
'office_integration_enabled': true,
|
191
|
+
'password_validity_days': 1,
|
192
|
+
'receive_admin_alerts': true,
|
193
|
+
'require_password_change': true,
|
194
|
+
'restapi_permission': true,
|
195
|
+
'self_managed': true,
|
196
|
+
'sftp_permission': true,
|
197
|
+
'site_admin': true,
|
198
|
+
'skip_welcome_screen': true,
|
199
|
+
'ssl_required': "always_require",
|
200
|
+
'sso_strategy_id': 1,
|
201
|
+
'subscribe_to_newsletter': true,
|
202
|
+
'require_2fa': "always_require",
|
203
|
+
'time_zone': "Pacific Time (US & Canada)",
|
204
|
+
'username': "user",
|
205
|
+
})
|
206
|
+
```
|
207
|
+
|
208
|
+
|
209
|
+
### Parameters
|
210
|
+
|
211
|
+
* `avatar_file` (file): An image file for your user avatar.
|
212
|
+
* `avatar_delete` (boolean): If true, the avatar will be deleted.
|
213
|
+
* `change_password` (string): Used for changing a password on an existing user.
|
214
|
+
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
215
|
+
* `email` (string): User's email.
|
216
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
217
|
+
* `group_id` (int64): Group ID to associate this user with.
|
218
|
+
* `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
|
219
|
+
* `imported_password_hash` (string): Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash menthods are MD5, SHA1, and SHA256.
|
220
|
+
* `password` (string): User password.
|
221
|
+
* `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
|
222
|
+
* `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
|
223
|
+
* `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
|
224
|
+
* `attachments_permission` (boolean): DEPRECATED: Can the user create Bundles (aka Share Links)? Use the bundle permission instead.
|
225
|
+
* `authenticate_until` (string): Scheduled Date/Time at which user will be deactivated
|
226
|
+
* `authentication_method` (string): How is this user authenticated?
|
227
|
+
* `billing_permission` (boolean): Allow this user to perform operations on the account, payments, and invoices?
|
228
|
+
* `bypass_inactive_disable` (boolean): Exempt this user from being disabled based on inactivity?
|
229
|
+
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
230
|
+
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
231
|
+
* `disabled` (boolean): Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
|
232
|
+
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
233
|
+
* `header_text` (string): Text to display to the user in the header of the UI
|
234
|
+
* `language` (string): Preferred language
|
235
|
+
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
236
|
+
* `name` (string): User's full name
|
237
|
+
* `company` (string): User's company
|
238
|
+
* `notes` (string): Any internal notes on the user
|
239
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
240
|
+
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
241
|
+
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
242
|
+
* `require_password_change` (boolean): Is a password change required upon next user login?
|
243
|
+
* `restapi_permission` (boolean): Can this user access the REST API?
|
244
|
+
* `self_managed` (boolean): Does this user manage it's own credentials or is it a shared/bot user?
|
245
|
+
* `sftp_permission` (boolean): Can the user access with SFTP?
|
246
|
+
* `site_admin` (boolean): Is the user an administrator for this site?
|
247
|
+
* `skip_welcome_screen` (boolean): Skip Welcome page in the UI?
|
248
|
+
* `ssl_required` (string): SSL required setting
|
249
|
+
* `sso_strategy_id` (int64): SSO (Single Sign On) strategy ID for the user, if applicable.
|
250
|
+
* `subscribe_to_newsletter` (boolean): Is the user subscribed to the newsletter?
|
251
|
+
* `require_2fa` (string): 2FA required setting
|
252
|
+
* `time_zone` (string): User time zone
|
253
|
+
* `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.
|
254
|
+
* `username` (string): User's username
|
255
|
+
|
256
|
+
---
|
257
|
+
|
258
|
+
## Unlock user who has been locked out due to failed logins
|
259
|
+
|
260
|
+
```
|
261
|
+
const [user] = await User.list()
|
262
|
+
|
263
|
+
await user.unlock()
|
264
|
+
```
|
265
|
+
|
266
|
+
### Parameters
|
267
|
+
|
268
|
+
* `id` (int64): Required - User ID.
|
269
|
+
|
270
|
+
|
271
|
+
---
|
272
|
+
|
273
|
+
## Resend user welcome email
|
274
|
+
|
275
|
+
```
|
276
|
+
const [user] = await User.list()
|
277
|
+
|
278
|
+
await user.resend_welcome_email()
|
279
|
+
```
|
280
|
+
|
281
|
+
### Parameters
|
282
|
+
|
283
|
+
* `id` (int64): Required - User ID.
|
284
|
+
|
285
|
+
|
286
|
+
---
|
287
|
+
|
288
|
+
## Trigger 2FA Reset process for user who has lost access to their existing 2FA methods
|
289
|
+
|
290
|
+
```
|
291
|
+
const [user] = await User.list()
|
292
|
+
|
293
|
+
await user.user_2fa_reset()
|
294
|
+
```
|
295
|
+
|
296
|
+
### Parameters
|
297
|
+
|
298
|
+
* `id` (int64): Required - User ID.
|
299
|
+
|
300
|
+
|
301
|
+
---
|
302
|
+
|
303
|
+
## Update User
|
304
|
+
|
305
|
+
```
|
306
|
+
const [user] = await User.list()
|
307
|
+
|
308
|
+
await user.update({
|
309
|
+
'avatar_delete': true,
|
310
|
+
'email': "john.doe@files.com",
|
311
|
+
'group_id': 1,
|
312
|
+
'announcements_read': true,
|
313
|
+
'allowed_ips': "127.0.0.1",
|
314
|
+
'attachments_permission': true,
|
315
|
+
'authenticate_until': "2000-01-01T01:00:00Z",
|
316
|
+
'authentication_method': "password",
|
317
|
+
'billing_permission': true,
|
318
|
+
'bypass_inactive_disable': true,
|
319
|
+
'bypass_site_allowed_ips': true,
|
320
|
+
'dav_permission': true,
|
321
|
+
'disabled': true,
|
322
|
+
'ftp_permission': true,
|
323
|
+
'header_text': "User-specific message.",
|
324
|
+
'language': "en",
|
325
|
+
'notification_daily_send_time': 18,
|
326
|
+
'name': "John Doe",
|
327
|
+
'company': "ACME Corp.",
|
328
|
+
'notes': "Internal notes on this user.",
|
329
|
+
'office_integration_enabled': true,
|
330
|
+
'password_validity_days': 1,
|
331
|
+
'receive_admin_alerts': true,
|
332
|
+
'require_password_change': true,
|
333
|
+
'restapi_permission': true,
|
334
|
+
'self_managed': true,
|
335
|
+
'sftp_permission': true,
|
336
|
+
'site_admin': true,
|
337
|
+
'skip_welcome_screen': true,
|
338
|
+
'ssl_required': "always_require",
|
339
|
+
'sso_strategy_id': 1,
|
340
|
+
'subscribe_to_newsletter': true,
|
341
|
+
'require_2fa': "always_require",
|
342
|
+
'time_zone': "Pacific Time (US & Canada)",
|
343
|
+
'username': "user",
|
344
|
+
})
|
345
|
+
```
|
346
|
+
|
347
|
+
### Parameters
|
348
|
+
|
349
|
+
* `id` (int64): Required - User ID.
|
350
|
+
* `avatar_file` (file): An image file for your user avatar.
|
351
|
+
* `avatar_delete` (boolean): If true, the avatar will be deleted.
|
352
|
+
* `change_password` (string): Used for changing a password on an existing user.
|
353
|
+
* `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
|
354
|
+
* `email` (string): User's email.
|
355
|
+
* `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
|
356
|
+
* `group_id` (int64): Group ID to associate this user with.
|
357
|
+
* `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
|
358
|
+
* `imported_password_hash` (string): Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash menthods are MD5, SHA1, and SHA256.
|
359
|
+
* `password` (string): User password.
|
360
|
+
* `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
|
361
|
+
* `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
|
362
|
+
* `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
|
363
|
+
* `attachments_permission` (boolean): DEPRECATED: Can the user create Bundles (aka Share Links)? Use the bundle permission instead.
|
364
|
+
* `authenticate_until` (string): Scheduled Date/Time at which user will be deactivated
|
365
|
+
* `authentication_method` (string): How is this user authenticated?
|
366
|
+
* `billing_permission` (boolean): Allow this user to perform operations on the account, payments, and invoices?
|
367
|
+
* `bypass_inactive_disable` (boolean): Exempt this user from being disabled based on inactivity?
|
368
|
+
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
369
|
+
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
370
|
+
* `disabled` (boolean): Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
|
371
|
+
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
372
|
+
* `header_text` (string): Text to display to the user in the header of the UI
|
373
|
+
* `language` (string): Preferred language
|
374
|
+
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
375
|
+
* `name` (string): User's full name
|
376
|
+
* `company` (string): User's company
|
377
|
+
* `notes` (string): Any internal notes on the user
|
378
|
+
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
379
|
+
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
380
|
+
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
381
|
+
* `require_password_change` (boolean): Is a password change required upon next user login?
|
382
|
+
* `restapi_permission` (boolean): Can this user access the REST API?
|
383
|
+
* `self_managed` (boolean): Does this user manage it's own credentials or is it a shared/bot user?
|
384
|
+
* `sftp_permission` (boolean): Can the user access with SFTP?
|
385
|
+
* `site_admin` (boolean): Is the user an administrator for this site?
|
386
|
+
* `skip_welcome_screen` (boolean): Skip Welcome page in the UI?
|
387
|
+
* `ssl_required` (string): SSL required setting
|
388
|
+
* `sso_strategy_id` (int64): SSO (Single Sign On) strategy ID for the user, if applicable.
|
389
|
+
* `subscribe_to_newsletter` (boolean): Is the user subscribed to the newsletter?
|
390
|
+
* `require_2fa` (string): 2FA required setting
|
391
|
+
* `time_zone` (string): User time zone
|
392
|
+
* `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.
|
393
|
+
* `username` (string): User's username
|
394
|
+
|
395
|
+
### Example Response
|
396
|
+
|
397
|
+
```json
|
398
|
+
{
|
399
|
+
"id": 1,
|
400
|
+
"username": "user",
|
401
|
+
"admin_group_ids": [
|
402
|
+
1
|
403
|
+
],
|
404
|
+
"allowed_ips": "127.0.0.1",
|
405
|
+
"attachments_permission": true,
|
406
|
+
"api_keys_count": 1,
|
407
|
+
"authenticate_until": "2000-01-01T01:00:00Z",
|
408
|
+
"authentication_method": "password",
|
409
|
+
"avatar_url": "",
|
410
|
+
"billing_permission": true,
|
411
|
+
"bypass_site_allowed_ips": true,
|
412
|
+
"bypass_inactive_disable": true,
|
413
|
+
"created_at": "2000-01-01T01:00:00Z",
|
414
|
+
"dav_permission": true,
|
415
|
+
"disabled": true,
|
416
|
+
"email": "john.doe@files.com",
|
417
|
+
"ftp_permission": true,
|
418
|
+
"group_ids": "",
|
419
|
+
"header_text": "User-specific message.",
|
420
|
+
"language": "en",
|
421
|
+
"last_login_at": "2000-01-01T01:00:00Z",
|
422
|
+
"last_protocol_cipher": "",
|
423
|
+
"lockout_expires": "2000-01-01T01:00:00Z",
|
424
|
+
"name": "John Doe",
|
425
|
+
"company": "ACME Corp.",
|
426
|
+
"notes": "Internal notes on this user.",
|
427
|
+
"notification_daily_send_time": 18,
|
428
|
+
"office_integration_enabled": true,
|
429
|
+
"password_set_at": "2000-01-01T01:00:00Z",
|
430
|
+
"password_validity_days": 1,
|
431
|
+
"public_keys_count": 1,
|
432
|
+
"receive_admin_alerts": true,
|
433
|
+
"require_2fa": "always_require",
|
434
|
+
"active_2fa": true,
|
435
|
+
"require_password_change": true,
|
436
|
+
"password_expired": true,
|
437
|
+
"restapi_permission": true,
|
438
|
+
"self_managed": true,
|
439
|
+
"sftp_permission": true,
|
440
|
+
"site_admin": true,
|
441
|
+
"skip_welcome_screen": true,
|
442
|
+
"ssl_required": "always_require",
|
443
|
+
"sso_strategy_id": 1,
|
444
|
+
"subscribe_to_newsletter": true,
|
445
|
+
"externally_managed": true,
|
446
|
+
"time_zone": "Pacific Time (US & Canada)",
|
447
|
+
"type_of_2fa": "yubi",
|
448
|
+
"user_root": ""
|
449
|
+
}
|
450
|
+
```
|
451
|
+
|
452
|
+
---
|
453
|
+
|
454
|
+
## Delete User
|
455
|
+
|
456
|
+
```
|
457
|
+
const [user] = await User.list()
|
458
|
+
|
459
|
+
await user.delete()
|
460
|
+
```
|
461
|
+
|
462
|
+
### Parameters
|
463
|
+
|
464
|
+
* `id` (int64): Required - User ID.
|
465
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# UserCipherUse
|
2
|
+
|
3
|
+
## Example UserCipherUse Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"protocol_cipher": "TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384",
|
9
|
+
"created_at": "2000-01-01T01:00:00Z",
|
10
|
+
"interface": "restapi",
|
11
|
+
"updated_at": "2000-01-01T01:00:00Z",
|
12
|
+
"user_id": 1
|
13
|
+
}
|
14
|
+
```
|
15
|
+
|
16
|
+
* `id` (int64): UserCipherUse ID
|
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
|
+
* `updated_at` (date-time): The most recent use of this combination of interface and protocol and cipher (for this user)
|
21
|
+
* `user_id` (int64): ID of the user who performed this access
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
## List User Cipher Uses
|
26
|
+
|
27
|
+
```
|
28
|
+
await UserCipherUse.list({
|
29
|
+
'user_id': 1,
|
30
|
+
'per_page': 1,
|
31
|
+
})
|
32
|
+
```
|
33
|
+
|
34
|
+
|
35
|
+
### Parameters
|
36
|
+
|
37
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
38
|
+
* `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
39
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# UserRequest
|
2
|
+
|
3
|
+
## Example UserRequest Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"name": "John Doe",
|
9
|
+
"email": "john.doe@files.com",
|
10
|
+
"details": "Changed Departments"
|
11
|
+
}
|
12
|
+
```
|
13
|
+
|
14
|
+
* `id` (int64): ID
|
15
|
+
* `name` (string): User's full name
|
16
|
+
* `email` (email): User email address
|
17
|
+
* `details` (string): Details of the user's request
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
## List User Requests
|
22
|
+
|
23
|
+
```
|
24
|
+
await UserRequest.list({
|
25
|
+
'per_page': 1,
|
26
|
+
})
|
27
|
+
```
|
28
|
+
|
29
|
+
|
30
|
+
### Parameters
|
31
|
+
|
32
|
+
* `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
33
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
34
|
+
|
35
|
+
---
|
36
|
+
|
37
|
+
## Show User Request
|
38
|
+
|
39
|
+
```
|
40
|
+
await UserRequest.find(id)
|
41
|
+
```
|
42
|
+
|
43
|
+
|
44
|
+
### Parameters
|
45
|
+
|
46
|
+
* `id` (int64): Required - User Request ID.
|
47
|
+
|
48
|
+
---
|
49
|
+
|
50
|
+
## Create User Request
|
51
|
+
|
52
|
+
```
|
53
|
+
await UserRequest.create({
|
54
|
+
'name': "name",
|
55
|
+
'email': "email",
|
56
|
+
'details': "details",
|
57
|
+
})
|
58
|
+
```
|
59
|
+
|
60
|
+
|
61
|
+
### Parameters
|
62
|
+
|
63
|
+
* `name` (string): Required - Name of user requested
|
64
|
+
* `email` (string): Required - Email of user requested
|
65
|
+
* `details` (string): Required - Details of the user request
|
66
|
+
|
67
|
+
---
|
68
|
+
|
69
|
+
## Delete User Request
|
70
|
+
|
71
|
+
```
|
72
|
+
const [user_request] = await UserRequest.list()
|
73
|
+
|
74
|
+
await user_request.delete()
|
75
|
+
```
|
76
|
+
|
77
|
+
### Parameters
|
78
|
+
|
79
|
+
* `id` (int64): Required - User Request ID.
|
80
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# WebhookTest
|
2
|
+
|
3
|
+
## Example WebhookTest Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"code": 200,
|
8
|
+
"message": "",
|
9
|
+
"status": "",
|
10
|
+
"data": "",
|
11
|
+
"success": true
|
12
|
+
}
|
13
|
+
```
|
14
|
+
|
15
|
+
* `code` (int64): Status HTTP code
|
16
|
+
* `message` (string): Error message
|
17
|
+
* `status` (string): Status message
|
18
|
+
* `data` (Auto): Additional data
|
19
|
+
* `success` (boolean): The success status of the webhook test
|
20
|
+
* `url` (string): URL for testing the webhook.
|
21
|
+
* `method` (string): HTTP method(GET or POST).
|
22
|
+
* `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
23
|
+
* `headers` (object): Additional request headers.
|
24
|
+
* `body` (object): Additional body parameters.
|
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
|
28
|
+
* `action` (string): action for test body
|
29
|
+
|
30
|
+
---
|
31
|
+
|
32
|
+
## Create Webhook Test
|
33
|
+
|
34
|
+
```
|
35
|
+
await WebhookTest.create({
|
36
|
+
'url': "https://www.site.com/...",
|
37
|
+
'method': "GET",
|
38
|
+
'encoding': "RAW",
|
39
|
+
'headers': "x-test-header => testvalue",
|
40
|
+
'body': "test-param => testvalue",
|
41
|
+
'raw_body': "test body",
|
42
|
+
'file_as_body': "false",
|
43
|
+
'file_form_field': "upload_file_data",
|
44
|
+
'action': "test",
|
45
|
+
})
|
46
|
+
```
|
47
|
+
|
48
|
+
|
49
|
+
### Parameters
|
50
|
+
|
51
|
+
* `url` (string): Required - URL for testing the webhook.
|
52
|
+
* `method` (string): HTTP method(GET or POST).
|
53
|
+
* `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
54
|
+
* `headers` (object): Additional request headers.
|
55
|
+
* `body` (object): Additional body parameters.
|
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
|
59
|
+
* `action` (string): action for test body
|