files.com 1.2.316 → 1.2.317
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/Site.md +1 -0
- package/docs/models/SsoStrategy.md +4 -2
- package/docs/models/User.md +7 -0
- package/lib/Files.js +1 -1
- package/lib/models/SsoStrategy.js +5 -1
- package/lib/models/User.js +92 -71
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/SsoStrategy.js +4 -1
- package/src/models/User.js +17 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.317
|
package/docs/models/Site.md
CHANGED
|
@@ -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",
|
|
@@ -93,6 +94,7 @@
|
|
|
93
94
|
* `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
95
|
* `disabled_expired_or_inactive` (boolean): Computed property that returns true if user disabled or expired or inactive.
|
|
95
96
|
* `email` (email): User email address
|
|
97
|
+
* `filesystem_layout` (string): File system layout
|
|
96
98
|
* `first_login_at` (date-time): User's first login time
|
|
97
99
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
98
100
|
* `group_ids` (string): Comma-separated list of group IDs of which this user is a member
|
|
@@ -212,6 +214,7 @@ await User.create({
|
|
|
212
214
|
'bypass_site_allowed_ips': false,
|
|
213
215
|
'dav_permission': true,
|
|
214
216
|
'disabled': true,
|
|
217
|
+
'filesystem_layout': "site_root",
|
|
215
218
|
'ftp_permission': true,
|
|
216
219
|
'header_text': "User-specific message.",
|
|
217
220
|
'language': "en",
|
|
@@ -265,6 +268,7 @@ await User.create({
|
|
|
265
268
|
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
|
266
269
|
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
|
267
270
|
* `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.
|
|
271
|
+
* `filesystem_layout` (string): File system layout
|
|
268
272
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
269
273
|
* `header_text` (string): Text to display to the user in the header of the UI
|
|
270
274
|
* `language` (string): Preferred language
|
|
@@ -359,6 +363,7 @@ await user.update({
|
|
|
359
363
|
'bypass_site_allowed_ips': false,
|
|
360
364
|
'dav_permission': true,
|
|
361
365
|
'disabled': true,
|
|
366
|
+
'filesystem_layout': "site_root",
|
|
362
367
|
'ftp_permission': true,
|
|
363
368
|
'header_text': "User-specific message.",
|
|
364
369
|
'language': "en",
|
|
@@ -413,6 +418,7 @@ await user.update({
|
|
|
413
418
|
* `bypass_site_allowed_ips` (boolean): Allow this user to skip site-wide IP blacklists?
|
|
414
419
|
* `dav_permission` (boolean): Can the user connect with WebDAV?
|
|
415
420
|
* `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.
|
|
421
|
+
* `filesystem_layout` (string): File system layout
|
|
416
422
|
* `ftp_permission` (boolean): Can the user access with FTP/FTPS?
|
|
417
423
|
* `header_text` (string): Text to display to the user in the header of the UI
|
|
418
424
|
* `language` (string): Preferred language
|
|
@@ -465,6 +471,7 @@ await user.update({
|
|
|
465
471
|
"disabled": true,
|
|
466
472
|
"disabled_expired_or_inactive": true,
|
|
467
473
|
"email": "john.doe@files.com",
|
|
474
|
+
"filesystem_layout": "site_root",
|
|
468
475
|
"first_login_at": "2000-01-01T01:00:00Z",
|
|
469
476
|
"ftp_permission": true,
|
|
470
477
|
"group_ids": "example",
|
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.317';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
|
@@ -96,7 +96,7 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
|
96
96
|
(0, _defineProperty2.default)(this, "getScimOauthAccessTokenExpiresAt", function () {
|
|
97
97
|
return _this.attributes.scim_oauth_access_token_expires_at;
|
|
98
98
|
});
|
|
99
|
-
// string # Subdomain
|
|
99
|
+
// string # Subdomain or domain name for your auth provider. Example: `https://[subdomain].okta.com/`
|
|
100
100
|
(0, _defineProperty2.default)(this, "getSubdomain", function () {
|
|
101
101
|
return _this.attributes.subdomain;
|
|
102
102
|
});
|
|
@@ -180,6 +180,10 @@ var SsoStrategy = /*#__PURE__*/(0, _createClass2.default)(function SsoStrategy()
|
|
|
180
180
|
(0, _defineProperty2.default)(this, "getProvisionRequire2fa", function () {
|
|
181
181
|
return _this.attributes.provision_require_2fa;
|
|
182
182
|
});
|
|
183
|
+
// string # File System layout to use for auto provisioned users.
|
|
184
|
+
(0, _defineProperty2.default)(this, "getProvisionFilesystemLayout", function () {
|
|
185
|
+
return _this.attributes.provision_filesystem_layout;
|
|
186
|
+
});
|
|
183
187
|
// string # URL-friendly, unique identifier for Azure SAML configuration
|
|
184
188
|
(0, _defineProperty2.default)(this, "getProviderIdentifier", function () {
|
|
185
189
|
return _this.attributes.provider_identifier;
|
package/lib/models/User.js
CHANGED
|
@@ -155,6 +155,13 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
155
155
|
(0, _defineProperty2.default)(this, "setEmail", function (value) {
|
|
156
156
|
_this.attributes.email = value;
|
|
157
157
|
});
|
|
158
|
+
// string # File system layout
|
|
159
|
+
(0, _defineProperty2.default)(this, "getFilesystemLayout", function () {
|
|
160
|
+
return _this.attributes.filesystem_layout;
|
|
161
|
+
});
|
|
162
|
+
(0, _defineProperty2.default)(this, "setFilesystemLayout", function (value) {
|
|
163
|
+
_this.attributes.filesystem_layout = value;
|
|
164
|
+
});
|
|
158
165
|
// date-time # User's first login time
|
|
159
166
|
(0, _defineProperty2.default)(this, "getFirstLoginAt", function () {
|
|
160
167
|
return _this.attributes.first_login_at;
|
|
@@ -737,6 +744,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
737
744
|
// bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
738
745
|
// dav_permission - boolean - Can the user connect with WebDAV?
|
|
739
746
|
// 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.
|
|
747
|
+
// filesystem_layout - string - File system layout
|
|
740
748
|
// ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
741
749
|
// header_text - string - Text to display to the user in the header of the UI
|
|
742
750
|
// language - string - Preferred language
|
|
@@ -863,116 +871,122 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
|
863
871
|
}
|
|
864
872
|
throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
|
|
865
873
|
case 15:
|
|
866
|
-
if (!(params.
|
|
874
|
+
if (!(params.filesystem_layout && !(0, _utils.isString)(params.filesystem_layout))) {
|
|
867
875
|
_context4.next = 16;
|
|
868
876
|
break;
|
|
869
877
|
}
|
|
870
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
878
|
+
throw new errors.InvalidParameterError("Bad parameter: filesystem_layout must be of type String, received ".concat((0, _utils.getType)(params.filesystem_layout)));
|
|
871
879
|
case 16:
|
|
872
|
-
if (!(params.
|
|
880
|
+
if (!(params.header_text && !(0, _utils.isString)(params.header_text))) {
|
|
873
881
|
_context4.next = 17;
|
|
874
882
|
break;
|
|
875
883
|
}
|
|
876
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
884
|
+
throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params.header_text)));
|
|
877
885
|
case 17:
|
|
878
|
-
if (!(params.
|
|
886
|
+
if (!(params.language && !(0, _utils.isString)(params.language))) {
|
|
879
887
|
_context4.next = 18;
|
|
880
888
|
break;
|
|
881
889
|
}
|
|
882
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
890
|
+
throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params.language)));
|
|
883
891
|
case 18:
|
|
884
|
-
if (!(params.
|
|
892
|
+
if (!(params.notification_daily_send_time && !(0, _utils.isInt)(params.notification_daily_send_time))) {
|
|
885
893
|
_context4.next = 19;
|
|
886
894
|
break;
|
|
887
895
|
}
|
|
888
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
896
|
+
throw new errors.InvalidParameterError("Bad parameter: notification_daily_send_time must be of type Int, received ".concat((0, _utils.getType)(params.notification_daily_send_time)));
|
|
889
897
|
case 19:
|
|
890
|
-
if (!(params.
|
|
898
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
891
899
|
_context4.next = 20;
|
|
892
900
|
break;
|
|
893
901
|
}
|
|
894
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
902
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
895
903
|
case 20:
|
|
896
|
-
if (!(params.
|
|
904
|
+
if (!(params.company && !(0, _utils.isString)(params.company))) {
|
|
897
905
|
_context4.next = 21;
|
|
898
906
|
break;
|
|
899
907
|
}
|
|
900
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
908
|
+
throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
|
|
901
909
|
case 21:
|
|
902
|
-
if (!(params.
|
|
910
|
+
if (!(params.notes && !(0, _utils.isString)(params.notes))) {
|
|
903
911
|
_context4.next = 22;
|
|
904
912
|
break;
|
|
905
913
|
}
|
|
906
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
914
|
+
throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
|
|
907
915
|
case 22:
|
|
908
|
-
if (!(params.
|
|
916
|
+
if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
|
|
909
917
|
_context4.next = 23;
|
|
910
918
|
break;
|
|
911
919
|
}
|
|
912
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
920
|
+
throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
|
|
913
921
|
case 23:
|
|
914
|
-
if (!(params.
|
|
922
|
+
if (!(params.require_login_by && !(0, _utils.isString)(params.require_login_by))) {
|
|
915
923
|
_context4.next = 24;
|
|
916
924
|
break;
|
|
917
925
|
}
|
|
918
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
926
|
+
throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params.require_login_by)));
|
|
919
927
|
case 24:
|
|
920
|
-
if (!(params.
|
|
928
|
+
if (!(params.ssl_required && !(0, _utils.isString)(params.ssl_required))) {
|
|
921
929
|
_context4.next = 25;
|
|
922
930
|
break;
|
|
923
931
|
}
|
|
924
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
932
|
+
throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params.ssl_required)));
|
|
925
933
|
case 25:
|
|
926
|
-
if (!(params.
|
|
934
|
+
if (!(params.sso_strategy_id && !(0, _utils.isInt)(params.sso_strategy_id))) {
|
|
927
935
|
_context4.next = 26;
|
|
928
936
|
break;
|
|
929
937
|
}
|
|
930
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
938
|
+
throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params.sso_strategy_id)));
|
|
931
939
|
case 26:
|
|
932
|
-
if (!(params.
|
|
940
|
+
if (!(params.require_2fa && !(0, _utils.isString)(params.require_2fa))) {
|
|
933
941
|
_context4.next = 27;
|
|
934
942
|
break;
|
|
935
943
|
}
|
|
936
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
944
|
+
throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
|
|
937
945
|
case 27:
|
|
938
|
-
if (!(params.
|
|
946
|
+
if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
|
|
939
947
|
_context4.next = 28;
|
|
940
948
|
break;
|
|
941
949
|
}
|
|
942
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
950
|
+
throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
|
|
943
951
|
case 28:
|
|
944
|
-
if (!(params.
|
|
952
|
+
if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
|
|
945
953
|
_context4.next = 29;
|
|
946
954
|
break;
|
|
947
955
|
}
|
|
948
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
956
|
+
throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
|
|
949
957
|
case 29:
|
|
950
|
-
if (!(params.
|
|
958
|
+
if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
|
|
951
959
|
_context4.next = 30;
|
|
952
960
|
break;
|
|
953
961
|
}
|
|
954
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
962
|
+
throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
|
|
955
963
|
case 30:
|
|
964
|
+
if (!(params.username && !(0, _utils.isString)(params.username))) {
|
|
965
|
+
_context4.next = 31;
|
|
966
|
+
break;
|
|
967
|
+
}
|
|
968
|
+
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
|
|
969
|
+
case 31:
|
|
956
970
|
if (params.id) {
|
|
957
|
-
_context4.next =
|
|
971
|
+
_context4.next = 33;
|
|
958
972
|
break;
|
|
959
973
|
}
|
|
960
974
|
if (!_this.attributes.id) {
|
|
961
|
-
_context4.next =
|
|
975
|
+
_context4.next = 32;
|
|
962
976
|
break;
|
|
963
977
|
}
|
|
964
978
|
params.id = _this.id;
|
|
965
|
-
_context4.next =
|
|
979
|
+
_context4.next = 33;
|
|
966
980
|
break;
|
|
967
|
-
case 31:
|
|
968
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
|
969
981
|
case 32:
|
|
970
|
-
|
|
971
|
-
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
982
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
972
983
|
case 33:
|
|
984
|
+
_context4.next = 34;
|
|
985
|
+
return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
986
|
+
case 34:
|
|
973
987
|
response = _context4.sent;
|
|
974
988
|
return _context4.abrupt("return", new User(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
975
|
-
case
|
|
989
|
+
case 35:
|
|
976
990
|
case "end":
|
|
977
991
|
return _context4.stop();
|
|
978
992
|
}
|
|
@@ -1220,6 +1234,7 @@ _User = User;
|
|
|
1220
1234
|
// bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
1221
1235
|
// dav_permission - boolean - Can the user connect with WebDAV?
|
|
1222
1236
|
// 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.
|
|
1237
|
+
// filesystem_layout - string - File system layout
|
|
1223
1238
|
// ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
1224
1239
|
// header_text - string - Text to display to the user in the header of the UI
|
|
1225
1240
|
// language - string - Preferred language
|
|
@@ -1334,102 +1349,108 @@ _User = User;
|
|
|
1334
1349
|
}
|
|
1335
1350
|
throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
|
|
1336
1351
|
case 13:
|
|
1337
|
-
if (!(params.
|
|
1352
|
+
if (!(params.filesystem_layout && !(0, _utils.isString)(params.filesystem_layout))) {
|
|
1338
1353
|
_context9.next = 14;
|
|
1339
1354
|
break;
|
|
1340
1355
|
}
|
|
1341
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1356
|
+
throw new errors.InvalidParameterError("Bad parameter: filesystem_layout must be of type String, received ".concat((0, _utils.getType)(params.filesystem_layout)));
|
|
1342
1357
|
case 14:
|
|
1343
|
-
if (!(params.
|
|
1358
|
+
if (!(params.header_text && !(0, _utils.isString)(params.header_text))) {
|
|
1344
1359
|
_context9.next = 15;
|
|
1345
1360
|
break;
|
|
1346
1361
|
}
|
|
1347
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1362
|
+
throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params.header_text)));
|
|
1348
1363
|
case 15:
|
|
1349
|
-
if (!(params.
|
|
1364
|
+
if (!(params.language && !(0, _utils.isString)(params.language))) {
|
|
1350
1365
|
_context9.next = 16;
|
|
1351
1366
|
break;
|
|
1352
1367
|
}
|
|
1353
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1368
|
+
throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params.language)));
|
|
1354
1369
|
case 16:
|
|
1355
|
-
if (!(params.
|
|
1370
|
+
if (!(params.notification_daily_send_time && !(0, _utils.isInt)(params.notification_daily_send_time))) {
|
|
1356
1371
|
_context9.next = 17;
|
|
1357
1372
|
break;
|
|
1358
1373
|
}
|
|
1359
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1374
|
+
throw new errors.InvalidParameterError("Bad parameter: notification_daily_send_time must be of type Int, received ".concat((0, _utils.getType)(params.notification_daily_send_time)));
|
|
1360
1375
|
case 17:
|
|
1361
|
-
if (!(params.
|
|
1376
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
1362
1377
|
_context9.next = 18;
|
|
1363
1378
|
break;
|
|
1364
1379
|
}
|
|
1365
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1380
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
1366
1381
|
case 18:
|
|
1367
|
-
if (!(params.
|
|
1382
|
+
if (!(params.company && !(0, _utils.isString)(params.company))) {
|
|
1368
1383
|
_context9.next = 19;
|
|
1369
1384
|
break;
|
|
1370
1385
|
}
|
|
1371
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1386
|
+
throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
|
|
1372
1387
|
case 19:
|
|
1373
|
-
if (!(params.
|
|
1388
|
+
if (!(params.notes && !(0, _utils.isString)(params.notes))) {
|
|
1374
1389
|
_context9.next = 20;
|
|
1375
1390
|
break;
|
|
1376
1391
|
}
|
|
1377
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1392
|
+
throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
|
|
1378
1393
|
case 20:
|
|
1379
|
-
if (!(params.
|
|
1394
|
+
if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
|
|
1380
1395
|
_context9.next = 21;
|
|
1381
1396
|
break;
|
|
1382
1397
|
}
|
|
1383
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1398
|
+
throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
|
|
1384
1399
|
case 21:
|
|
1385
|
-
if (!(params.
|
|
1400
|
+
if (!(params.require_login_by && !(0, _utils.isString)(params.require_login_by))) {
|
|
1386
1401
|
_context9.next = 22;
|
|
1387
1402
|
break;
|
|
1388
1403
|
}
|
|
1389
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1404
|
+
throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params.require_login_by)));
|
|
1390
1405
|
case 22:
|
|
1391
|
-
if (!(params.
|
|
1406
|
+
if (!(params.ssl_required && !(0, _utils.isString)(params.ssl_required))) {
|
|
1392
1407
|
_context9.next = 23;
|
|
1393
1408
|
break;
|
|
1394
1409
|
}
|
|
1395
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1410
|
+
throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params.ssl_required)));
|
|
1396
1411
|
case 23:
|
|
1397
|
-
if (!(params.
|
|
1412
|
+
if (!(params.sso_strategy_id && !(0, _utils.isInt)(params.sso_strategy_id))) {
|
|
1398
1413
|
_context9.next = 24;
|
|
1399
1414
|
break;
|
|
1400
1415
|
}
|
|
1401
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1416
|
+
throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params.sso_strategy_id)));
|
|
1402
1417
|
case 24:
|
|
1403
|
-
if (!(params.
|
|
1418
|
+
if (!(params.require_2fa && !(0, _utils.isString)(params.require_2fa))) {
|
|
1404
1419
|
_context9.next = 25;
|
|
1405
1420
|
break;
|
|
1406
1421
|
}
|
|
1407
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1422
|
+
throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
|
|
1408
1423
|
case 25:
|
|
1409
|
-
if (!(params.
|
|
1424
|
+
if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
|
|
1410
1425
|
_context9.next = 26;
|
|
1411
1426
|
break;
|
|
1412
1427
|
}
|
|
1413
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1428
|
+
throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
|
|
1414
1429
|
case 26:
|
|
1415
|
-
if (!(params.
|
|
1430
|
+
if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
|
|
1416
1431
|
_context9.next = 27;
|
|
1417
1432
|
break;
|
|
1418
1433
|
}
|
|
1419
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1434
|
+
throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
|
|
1420
1435
|
case 27:
|
|
1421
|
-
if (!(params.
|
|
1436
|
+
if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
|
|
1422
1437
|
_context9.next = 28;
|
|
1423
1438
|
break;
|
|
1424
1439
|
}
|
|
1425
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1440
|
+
throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
|
|
1426
1441
|
case 28:
|
|
1427
|
-
|
|
1428
|
-
|
|
1442
|
+
if (!(params.username && !(0, _utils.isString)(params.username))) {
|
|
1443
|
+
_context9.next = 29;
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
|
|
1429
1447
|
case 29:
|
|
1448
|
+
_context9.next = 30;
|
|
1449
|
+
return _Api.default.sendRequest('/users', 'POST', params, options);
|
|
1450
|
+
case 30:
|
|
1430
1451
|
response = _context9.sent;
|
|
1431
1452
|
return _context9.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
|
|
1432
|
-
case
|
|
1453
|
+
case 31:
|
|
1433
1454
|
case "end":
|
|
1434
1455
|
return _context9.stop();
|
|
1435
1456
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
|
@@ -76,7 +76,7 @@ class SsoStrategy {
|
|
|
76
76
|
// string # SCIM OAuth Access Token Expiration Time.
|
|
77
77
|
getScimOauthAccessTokenExpiresAt = () => this.attributes.scim_oauth_access_token_expires_at
|
|
78
78
|
|
|
79
|
-
// string # Subdomain
|
|
79
|
+
// string # Subdomain or domain name for your auth provider. Example: `https://[subdomain].okta.com/`
|
|
80
80
|
getSubdomain = () => this.attributes.subdomain
|
|
81
81
|
|
|
82
82
|
// boolean # Auto-provision users?
|
|
@@ -139,6 +139,9 @@ class SsoStrategy {
|
|
|
139
139
|
// string # 2FA required setting for auto provisioned users.
|
|
140
140
|
getProvisionRequire2fa = () => this.attributes.provision_require_2fa
|
|
141
141
|
|
|
142
|
+
// string # File System layout to use for auto provisioned users.
|
|
143
|
+
getProvisionFilesystemLayout = () => this.attributes.provision_filesystem_layout
|
|
144
|
+
|
|
142
145
|
// string # URL-friendly, unique identifier for Azure SAML configuration
|
|
143
146
|
getProviderIdentifier = () => this.attributes.provider_identifier
|
|
144
147
|
|
package/src/models/User.js
CHANGED
|
@@ -150,6 +150,13 @@ class User {
|
|
|
150
150
|
this.attributes.email = value
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
// string # File system layout
|
|
154
|
+
getFilesystemLayout = () => this.attributes.filesystem_layout
|
|
155
|
+
|
|
156
|
+
setFilesystemLayout = value => {
|
|
157
|
+
this.attributes.filesystem_layout = value
|
|
158
|
+
}
|
|
159
|
+
|
|
153
160
|
// date-time # User's first login time
|
|
154
161
|
getFirstLoginAt = () => this.attributes.first_login_at
|
|
155
162
|
|
|
@@ -663,6 +670,7 @@ class User {
|
|
|
663
670
|
// bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
664
671
|
// dav_permission - boolean - Can the user connect with WebDAV?
|
|
665
672
|
// 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.
|
|
673
|
+
// filesystem_layout - string - File system layout
|
|
666
674
|
// ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
667
675
|
// header_text - string - Text to display to the user in the header of the UI
|
|
668
676
|
// language - string - Preferred language
|
|
@@ -752,6 +760,10 @@ class User {
|
|
|
752
760
|
throw new errors.InvalidParameterError(`Bad parameter: authentication_method must be of type String, received ${getType(params.authentication_method)}`)
|
|
753
761
|
}
|
|
754
762
|
|
|
763
|
+
if (params.filesystem_layout && !isString(params.filesystem_layout)) {
|
|
764
|
+
throw new errors.InvalidParameterError(`Bad parameter: filesystem_layout must be of type String, received ${getType(params.filesystem_layout)}`)
|
|
765
|
+
}
|
|
766
|
+
|
|
755
767
|
if (params.header_text && !isString(params.header_text)) {
|
|
756
768
|
throw new errors.InvalidParameterError(`Bad parameter: header_text must be of type String, received ${getType(params.header_text)}`)
|
|
757
769
|
}
|
|
@@ -956,6 +968,7 @@ class User {
|
|
|
956
968
|
// bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
957
969
|
// dav_permission - boolean - Can the user connect with WebDAV?
|
|
958
970
|
// 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.
|
|
971
|
+
// filesystem_layout - string - File system layout
|
|
959
972
|
// ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
960
973
|
// header_text - string - Text to display to the user in the header of the UI
|
|
961
974
|
// language - string - Preferred language
|
|
@@ -1035,6 +1048,10 @@ class User {
|
|
|
1035
1048
|
throw new errors.InvalidParameterError(`Bad parameter: authentication_method must be of type String, received ${getType(params.authentication_method)}`)
|
|
1036
1049
|
}
|
|
1037
1050
|
|
|
1051
|
+
if (params.filesystem_layout && !isString(params.filesystem_layout)) {
|
|
1052
|
+
throw new errors.InvalidParameterError(`Bad parameter: filesystem_layout must be of type String, received ${getType(params.filesystem_layout)}`)
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1038
1055
|
if (params.header_text && !isString(params.header_text)) {
|
|
1039
1056
|
throw new errors.InvalidParameterError(`Bad parameter: header_text must be of type String, received ${getType(params.header_text)}`)
|
|
1040
1057
|
}
|