files.com 1.2.316 → 1.2.318
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/Partner.md +132 -0
- package/docs/models/Permission.md +8 -2
- package/docs/models/Site.md +2 -0
- package/docs/models/SsoStrategy.md +4 -2
- package/docs/models/User.md +14 -0
- package/lib/Files.js +1 -1
- package/lib/models/Partner.js +400 -0
- package/lib/models/Permission.js +39 -18
- package/lib/models/SsoStrategy.js +5 -1
- package/lib/models/User.js +113 -71
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Partner.js +241 -0
- package/src/models/Permission.js +19 -2
- package/src/models/SsoStrategy.js +4 -1
- package/src/models/User.js +34 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.318
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Partner
|
|
2
|
+
|
|
3
|
+
## Example Partner Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"allow_bypassing_2fa_policies": true,
|
|
8
|
+
"allow_credential_changes": true,
|
|
9
|
+
"allow_user_creation": true,
|
|
10
|
+
"id": 1,
|
|
11
|
+
"name": "Acme Corp",
|
|
12
|
+
"notes": "This is a note about the partner.",
|
|
13
|
+
"root_folder": "/AcmeCorp"
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
* `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
18
|
+
* `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
19
|
+
* `allow_user_creation` (boolean): Allow Partner Admins to create users.
|
|
20
|
+
* `id` (int64): The unique ID of the Partner.
|
|
21
|
+
* `name` (string): The name of the Partner.
|
|
22
|
+
* `notes` (string): Notes about this Partner.
|
|
23
|
+
* `root_folder` (string): The root folder path for this Partner.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## List Partners
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
await Partner.list
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Parameters
|
|
35
|
+
|
|
36
|
+
* `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.
|
|
37
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
38
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Show Partner
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
await Partner.find(id)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Parameters
|
|
50
|
+
|
|
51
|
+
* `id` (int64): Required - Partner ID.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Create Partner
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
await Partner.create({
|
|
59
|
+
'allow_bypassing_2fa_policies': false,
|
|
60
|
+
'allow_credential_changes': false,
|
|
61
|
+
'allow_user_creation': false,
|
|
62
|
+
'name': "Acme Corp",
|
|
63
|
+
'notes': "This is a note about the partner.",
|
|
64
|
+
'root_folder': "/AcmeCorp",
|
|
65
|
+
})
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
* `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
72
|
+
* `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
73
|
+
* `allow_user_creation` (boolean): Allow Partner Admins to create users.
|
|
74
|
+
* `name` (string): The name of the Partner.
|
|
75
|
+
* `notes` (string): Notes about this Partner.
|
|
76
|
+
* `root_folder` (string): The root folder path for this Partner.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Update Partner
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
const partner = await Partner.find(id)
|
|
84
|
+
|
|
85
|
+
await partner.update({
|
|
86
|
+
'allow_bypassing_2fa_policies': false,
|
|
87
|
+
'allow_credential_changes': false,
|
|
88
|
+
'allow_user_creation': false,
|
|
89
|
+
'name': "Acme Corp",
|
|
90
|
+
'notes': "This is a note about the partner.",
|
|
91
|
+
'root_folder': "/AcmeCorp",
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Parameters
|
|
96
|
+
|
|
97
|
+
* `id` (int64): Required - Partner ID.
|
|
98
|
+
* `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
99
|
+
* `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
100
|
+
* `allow_user_creation` (boolean): Allow Partner Admins to create users.
|
|
101
|
+
* `name` (string): The name of the Partner.
|
|
102
|
+
* `notes` (string): Notes about this Partner.
|
|
103
|
+
* `root_folder` (string): The root folder path for this Partner.
|
|
104
|
+
|
|
105
|
+
### Example Response
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"allow_bypassing_2fa_policies": true,
|
|
110
|
+
"allow_credential_changes": true,
|
|
111
|
+
"allow_user_creation": true,
|
|
112
|
+
"id": 1,
|
|
113
|
+
"name": "Acme Corp",
|
|
114
|
+
"notes": "This is a note about the partner.",
|
|
115
|
+
"root_folder": "/AcmeCorp"
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Delete Partner
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
const partner = await Partner.find(id)
|
|
125
|
+
|
|
126
|
+
await partner.delete()
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
|
|
131
|
+
* `id` (int64): Required - Partner ID.
|
|
132
|
+
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"username": "user",
|
|
11
11
|
"group_id": 1,
|
|
12
12
|
"group_name": "example",
|
|
13
|
+
"partner_id": 1,
|
|
13
14
|
"permission": "full",
|
|
14
15
|
"recursive": true,
|
|
15
16
|
"site_id": 1
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
* `username` (string): Username (if applicable)
|
|
23
24
|
* `group_id` (int64): Group ID
|
|
24
25
|
* `group_name` (string): Group name (if applicable)
|
|
26
|
+
* `partner_id` (int64): Partner ID (if applicable)
|
|
25
27
|
* `permission` (string): Permission type. See the table referenced in the documentation for an explanation of each permission.
|
|
26
28
|
* `recursive` (boolean): Recursive: does this permission apply to subfolders?
|
|
27
29
|
* `site_id` (int64): Site ID
|
|
@@ -35,6 +37,7 @@ await Permission.list({
|
|
|
35
37
|
'path': "example",
|
|
36
38
|
'include_groups': false,
|
|
37
39
|
'group_id': 1,
|
|
40
|
+
'partner_id': 1,
|
|
38
41
|
'user_id': 1,
|
|
39
42
|
})
|
|
40
43
|
```
|
|
@@ -44,12 +47,13 @@ await Permission.list({
|
|
|
44
47
|
|
|
45
48
|
* `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.
|
|
46
49
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
47
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id` or `id`.
|
|
48
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]` or `[ user_id, group_id, path ]`.
|
|
50
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id`, `partner_id` or `id`.
|
|
51
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id`, `partner_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ partner_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]`, `[ user_id, group_id, path ]`, `[ user_id, group_id, partner_id ]` or `[ user_id, group_id, partner_id, path ]`.
|
|
49
52
|
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
|
|
50
53
|
* `path` (string): Permission path. If provided, will scope all permissions(including upward) to this path.
|
|
51
54
|
* `include_groups` (boolean): If searching by user or group, also include user's permissions that are inherited from its groups?
|
|
52
55
|
* `group_id` (string):
|
|
56
|
+
* `partner_id` (string):
|
|
53
57
|
* `user_id` (string):
|
|
54
58
|
|
|
55
59
|
---
|
|
@@ -62,6 +66,7 @@ await Permission.create({
|
|
|
62
66
|
'group_id': 1,
|
|
63
67
|
'permission': "full",
|
|
64
68
|
'recursive': false,
|
|
69
|
+
'partner_id': 1,
|
|
65
70
|
'user_id': 1,
|
|
66
71
|
'username': "user",
|
|
67
72
|
'group_name': "example",
|
|
@@ -76,6 +81,7 @@ await Permission.create({
|
|
|
76
81
|
* `group_id` (int64): Group ID. Provide `group_name` or `group_id`
|
|
77
82
|
* `permission` (string): Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
|
|
78
83
|
* `recursive` (boolean): Apply to subfolders recursively?
|
|
84
|
+
* `partner_id` (int64): Partner ID if this Permission belongs to a partner.
|
|
79
85
|
* `user_id` (int64): User ID. Provide `username` or `user_id`
|
|
80
86
|
* `username` (string): User username. Provide `username` or `user_id`
|
|
81
87
|
* `group_name` (string): Group name. Provide `group_name` or `group_id`
|
package/docs/models/Site.md
CHANGED
|
@@ -237,6 +237,7 @@
|
|
|
237
237
|
"disabled": true,
|
|
238
238
|
"disabled_expired_or_inactive": true,
|
|
239
239
|
"email": "john.doe@files.com",
|
|
240
|
+
"filesystem_layout": "site_root",
|
|
240
241
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
241
242
|
"ftp_permission": true,
|
|
242
243
|
"group_ids": "example",
|
|
@@ -258,6 +259,7 @@
|
|
|
258
259
|
"notes": "Internal notes on this user.",
|
|
259
260
|
"notification_daily_send_time": 18,
|
|
260
261
|
"office_integration_enabled": true,
|
|
262
|
+
"partner_id": 1,
|
|
261
263
|
"password_set_at": "2000-01-01T01:00:00Z",
|
|
262
264
|
"password_validity_days": 1,
|
|
263
265
|
"public_keys_count": 1,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scim_username": "example",
|
|
21
21
|
"scim_oauth_access_token": "example",
|
|
22
22
|
"scim_oauth_access_token_expires_at": "example",
|
|
23
|
-
"subdomain": "
|
|
23
|
+
"subdomain": "",
|
|
24
24
|
"provision_users": true,
|
|
25
25
|
"provision_groups": true,
|
|
26
26
|
"deprovision_users": true,
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"provision_time_zone": "Eastern Time (US & Canada)",
|
|
42
42
|
"provision_company": "ACME Corp.",
|
|
43
43
|
"provision_require_2fa": "always_require",
|
|
44
|
+
"provision_filesystem_layout": "integration_centric",
|
|
44
45
|
"provider_identifier": "",
|
|
45
46
|
"ldap_base_dn": "example",
|
|
46
47
|
"ldap_domain": "mysite.com",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
* `scim_username` (string): SCIM username.
|
|
72
73
|
* `scim_oauth_access_token` (string): SCIM OAuth Access Token.
|
|
73
74
|
* `scim_oauth_access_token_expires_at` (string): SCIM OAuth Access Token Expiration Time.
|
|
74
|
-
* `subdomain` (string): Subdomain
|
|
75
|
+
* `subdomain` (string): Subdomain or domain name for your auth provider. Example: `https://[subdomain].okta.com/`
|
|
75
76
|
* `provision_users` (boolean): Auto-provision users?
|
|
76
77
|
* `provision_groups` (boolean): Auto-provision group membership based on group memberships on the SSO side?
|
|
77
78
|
* `deprovision_users` (boolean): Auto-deprovision users?
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
* `provision_time_zone` (string): Default time zone for auto provisioned users.
|
|
93
94
|
* `provision_company` (string): Default company for auto provisioned users.
|
|
94
95
|
* `provision_require_2fa` (string): 2FA required setting for auto provisioned users.
|
|
96
|
+
* `provision_filesystem_layout` (string): File System layout to use for auto provisioned users.
|
|
95
97
|
* `provider_identifier` (string): URL-friendly, unique identifier for Azure SAML configuration
|
|
96
98
|
* `ldap_base_dn` (string): Base DN for looking up users in LDAP server
|
|
97
99
|
* `ldap_domain` (string): Domain name that will be appended to LDAP usernames
|
package/docs/models/User.md
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"disabled": true,
|
|
25
25
|
"disabled_expired_or_inactive": true,
|
|
26
26
|
"email": "john.doe@files.com",
|
|
27
|
+
"filesystem_layout": "site_root",
|
|
27
28
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
28
29
|
"ftp_permission": true,
|
|
29
30
|
"group_ids": "example",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"notes": "Internal notes on this user.",
|
|
46
47
|
"notification_daily_send_time": 18,
|
|
47
48
|
"office_integration_enabled": true,
|
|
49
|
+
"partner_id": 1,
|
|
48
50
|
"password_set_at": "2000-01-01T01:00:00Z",
|
|
49
51
|
"password_validity_days": 1,
|
|
50
52
|
"public_keys_count": 1,
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
* `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 or schedule to be deactivated after specific date.
|
|
94
96
|
* `disabled_expired_or_inactive` (boolean): Computed property that returns true if user disabled or expired or inactive.
|
|
95
97
|
* `email` (email): User email address
|
|
98
|
+
* `filesystem_layout` (string): File system layout
|
|
96
99
|
* `first_login_at` (date-time): User's first login time
|
|
97
100
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
98
101
|
* `group_ids` (string): Comma-separated list of group IDs of which this user is a member
|
|
@@ -114,6 +117,7 @@
|
|
|
114
117
|
* `notes` (string): Any internal notes on the user
|
|
115
118
|
* `notification_daily_send_time` (int64): Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
|
116
119
|
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
|
120
|
+
* `partner_id` (int64): Partner ID if this user belongs to a Partner
|
|
117
121
|
* `password_set_at` (date-time): Last time the user's password was set
|
|
118
122
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
|
119
123
|
* `public_keys_count` (int64): Number of public keys associated with this user
|
|
@@ -212,6 +216,7 @@ await User.create({
|
|
|
212
216
|
'bypass_site_allowed_ips': false,
|
|
213
217
|
'dav_permission': true,
|
|
214
218
|
'disabled': true,
|
|
219
|
+
'filesystem_layout': "site_root",
|
|
215
220
|
'ftp_permission': true,
|
|
216
221
|
'header_text': "User-specific message.",
|
|
217
222
|
'language': "en",
|
|
@@ -220,6 +225,7 @@ await User.create({
|
|
|
220
225
|
'company': "ACME Corp.",
|
|
221
226
|
'notes': "Internal notes on this user.",
|
|
222
227
|
'office_integration_enabled': true,
|
|
228
|
+
'partner_id': 1,
|
|
223
229
|
'password_validity_days': 1,
|
|
224
230
|
'readonly_site_admin': true,
|
|
225
231
|
'receive_admin_alerts': true,
|
|
@@ -265,6 +271,7 @@ await User.create({
|
|
|
265
271
|
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
|
266
272
|
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
|
267
273
|
* `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 or schedule to be deactivated after specific date.
|
|
274
|
+
* `filesystem_layout` (string): File system layout
|
|
268
275
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
269
276
|
* `header_text` (string): Text to display to the user in the header of the UI
|
|
270
277
|
* `language` (string): Preferred language
|
|
@@ -273,6 +280,7 @@ await User.create({
|
|
|
273
280
|
* `company` (string): User's company
|
|
274
281
|
* `notes` (string): Any internal notes on the user
|
|
275
282
|
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
|
283
|
+
* `partner_id` (int64): Partner ID if this user belongs to a Partner
|
|
276
284
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
|
277
285
|
* `readonly_site_admin` (boolean): Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
278
286
|
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -359,6 +367,7 @@ await user.update({
|
|
|
359
367
|
'bypass_site_allowed_ips': false,
|
|
360
368
|
'dav_permission': true,
|
|
361
369
|
'disabled': true,
|
|
370
|
+
'filesystem_layout': "site_root",
|
|
362
371
|
'ftp_permission': true,
|
|
363
372
|
'header_text': "User-specific message.",
|
|
364
373
|
'language': "en",
|
|
@@ -367,6 +376,7 @@ await user.update({
|
|
|
367
376
|
'company': "ACME Corp.",
|
|
368
377
|
'notes': "Internal notes on this user.",
|
|
369
378
|
'office_integration_enabled': true,
|
|
379
|
+
'partner_id': 1,
|
|
370
380
|
'password_validity_days': 1,
|
|
371
381
|
'readonly_site_admin': true,
|
|
372
382
|
'receive_admin_alerts': true,
|
|
@@ -413,6 +423,7 @@ await user.update({
|
|
|
413
423
|
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
|
414
424
|
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
|
415
425
|
* `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 or schedule to be deactivated after specific date.
|
|
426
|
+
* `filesystem_layout` (string): File system layout
|
|
416
427
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
417
428
|
* `header_text` (string): Text to display to the user in the header of the UI
|
|
418
429
|
* `language` (string): Preferred language
|
|
@@ -421,6 +432,7 @@ await user.update({
|
|
|
421
432
|
* `company` (string): User's company
|
|
422
433
|
* `notes` (string): Any internal notes on the user
|
|
423
434
|
* `office_integration_enabled` (boolean): Enable integration with Office for the web?
|
|
435
|
+
* `partner_id` (int64): Partner ID if this user belongs to a Partner
|
|
424
436
|
* `password_validity_days` (int64): Number of days to allow user to use the same password
|
|
425
437
|
* `readonly_site_admin` (boolean): Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
426
438
|
* `receive_admin_alerts` (boolean): Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -465,6 +477,7 @@ await user.update({
|
|
|
465
477
|
"disabled": true,
|
|
466
478
|
"disabled_expired_or_inactive": true,
|
|
467
479
|
"email": "john.doe@files.com",
|
|
480
|
+
"filesystem_layout": "site_root",
|
|
468
481
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
469
482
|
"ftp_permission": true,
|
|
470
483
|
"group_ids": "example",
|
|
@@ -486,6 +499,7 @@ await user.update({
|
|
|
486
499
|
"notes": "Internal notes on this user.",
|
|
487
500
|
"notification_daily_send_time": 18,
|
|
488
501
|
"office_integration_enabled": true,
|
|
502
|
+
"partner_id": 1,
|
|
489
503
|
"password_set_at": "2000-01-01T01:00:00Z",
|
|
490
504
|
"password_validity_days": 1,
|
|
491
505
|
"public_keys_count": 1,
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.318';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|