files.com 1.0.219 → 1.0.221
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/ApiKey.md +3 -0
- package/docs/models/Site.md +8 -0
- package/docs/models/User.md +27 -3
- package/lib/models/ApiKey.js +6 -0
- package/lib/models/Site.js +87 -65
- package/lib/models/User.js +48 -0
- package/package.json +1 -1
- package/src/models/ApiKey.js +7 -0
- package/src/models/Site.js +16 -0
- package/src/models/User.js +59 -3
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.221
|
package/docs/models/ApiKey.md
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
"path": "shared/docs",
|
16
16
|
"permission_set": "full",
|
17
17
|
"platform": "win32",
|
18
|
+
"url": "example",
|
18
19
|
"user_id": 1
|
19
20
|
}
|
20
21
|
```
|
@@ -30,6 +31,7 @@
|
|
30
31
|
* `path` (string): Folder path restriction for this api key. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
31
32
|
* `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
32
33
|
* `platform` (string): If this API key represents a Desktop app, what platform was it created on?
|
34
|
+
* `url` (string): URL for API host.
|
33
35
|
* `user_id` (int64): User ID for the owner of this API Key. May be blank for Site-wide API Keys.
|
34
36
|
|
35
37
|
---
|
@@ -170,6 +172,7 @@ await api_key.update({
|
|
170
172
|
"path": "shared/docs",
|
171
173
|
"permission_set": "full",
|
172
174
|
"platform": "win32",
|
175
|
+
"url": "example",
|
173
176
|
"user_id": 1
|
174
177
|
}
|
175
178
|
```
|
package/docs/models/Site.md
CHANGED
@@ -107,6 +107,8 @@
|
|
107
107
|
"session": "",
|
108
108
|
"session_pinned_by_ip": true,
|
109
109
|
"sftp_enabled": true,
|
110
|
+
"sftp_host_key_type": "default",
|
111
|
+
"active_sftp_host_key_id": 1,
|
110
112
|
"sftp_insecure_ciphers": true,
|
111
113
|
"sftp_user_root_enabled": true,
|
112
114
|
"sharing_enabled": true,
|
@@ -245,6 +247,8 @@
|
|
245
247
|
* `session` (Session): Current session
|
246
248
|
* `session_pinned_by_ip` (boolean): Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
|
247
249
|
* `sftp_enabled` (boolean): Is SFTP enabled?
|
250
|
+
* `sftp_host_key_type` (string): Sftp Host Key Type
|
251
|
+
* `active_sftp_host_key_id` (int64): Id of the currently selected custom SFTP Host Key
|
248
252
|
* `sftp_insecure_ciphers` (boolean): Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
|
249
253
|
* `sftp_user_root_enabled` (boolean): Use user FTP roots also for SFTP?
|
250
254
|
* `sharing_enabled` (boolean): Allow bundle creation
|
@@ -376,6 +380,8 @@ await Site.update({
|
|
376
380
|
'user_requests_notify_admins': true,
|
377
381
|
'ftp_enabled': true,
|
378
382
|
'sftp_enabled': true,
|
383
|
+
'sftp_host_key_type': "default",
|
384
|
+
'active_sftp_host_key_id': 1,
|
379
385
|
'bundle_watermark_value': {"key":"example value"},
|
380
386
|
'allowed_2fa_method_sms': true,
|
381
387
|
'allowed_2fa_method_u2f': true,
|
@@ -499,6 +505,8 @@ await Site.update({
|
|
499
505
|
* `user_requests_notify_admins` (boolean): Send email to site admins when a user request is received?
|
500
506
|
* `ftp_enabled` (boolean): Is FTP enabled?
|
501
507
|
* `sftp_enabled` (boolean): Is SFTP enabled?
|
508
|
+
* `sftp_host_key_type` (string): Sftp Host Key Type
|
509
|
+
* `active_sftp_host_key_id` (int64): Id of the currently selected custom SFTP Host Key
|
502
510
|
* `bundle_watermark_value` (object): Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
503
511
|
* `allowed_2fa_method_sms` (boolean): Is SMS two factor authentication allowed?
|
504
512
|
* `allowed_2fa_method_u2f` (boolean): Is U2F two factor authentication allowed?
|
package/docs/models/User.md
CHANGED
@@ -28,6 +28,14 @@
|
|
28
28
|
"header_text": "User-specific message.",
|
29
29
|
"language": "en",
|
30
30
|
"last_login_at": "2000-01-01T01:00:00Z",
|
31
|
+
"last_web_login_at": "2000-01-01T01:00:00Z",
|
32
|
+
"last_ftp_login_at": "2000-01-01T01:00:00Z",
|
33
|
+
"last_sftp_login_at": "2000-01-01T01:00:00Z",
|
34
|
+
"last_dav_login_at": "2000-01-01T01:00:00Z",
|
35
|
+
"last_desktop_login_at": "2000-01-01T01:00:00Z",
|
36
|
+
"last_restapi_login_at": "2000-01-01T01:00:00Z",
|
37
|
+
"last_api_use_at": "2000-01-01T01:00:00Z",
|
38
|
+
"last_active_at": "2000-01-01T01:00:00Z",
|
31
39
|
"last_protocol_cipher": "example",
|
32
40
|
"lockout_expires": "2000-01-01T01:00:00Z",
|
33
41
|
"name": "John Doe",
|
@@ -80,8 +88,16 @@
|
|
80
88
|
* `group_ids` (string): Comma-separated list of group IDs of which this user is a member
|
81
89
|
* `header_text` (string): Text to display to the user in the header of the UI
|
82
90
|
* `language` (string): Preferred language
|
83
|
-
* `last_login_at` (date-time): User's
|
84
|
-
* `
|
91
|
+
* `last_login_at` (date-time): User's most recent login time via any protocol
|
92
|
+
* `last_web_login_at` (date-time): User's most recent login time via web
|
93
|
+
* `last_ftp_login_at` (date-time): User's most recent login time via FTP
|
94
|
+
* `last_sftp_login_at` (date-time): User's most recent login time via SFTP
|
95
|
+
* `last_dav_login_at` (date-time): User's most recent login time via WebDAV
|
96
|
+
* `last_desktop_login_at` (date-time): User's most recent login time via Desktop app
|
97
|
+
* `last_restapi_login_at` (date-time): User's most recent login time via Rest API
|
98
|
+
* `last_api_use_at` (date-time): User's most recent API use time
|
99
|
+
* `last_active_at` (date-time): User's most recent activity time, which is the latest of most recent login, most recent API use, enablement, or creation
|
100
|
+
* `last_protocol_cipher` (string): The most recent protocol and cipher used
|
85
101
|
* `lockout_expires` (date-time): Time in the future that the user will no longer be locked out if applicable
|
86
102
|
* `name` (string): User's full name
|
87
103
|
* `company` (string): User's company
|
@@ -107,7 +123,7 @@
|
|
107
123
|
* `externally_managed` (boolean): Is this user managed by a SsoStrategy?
|
108
124
|
* `time_zone` (string): User time zone
|
109
125
|
* `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.
|
110
|
-
* `updated_at` (date-time): User record
|
126
|
+
* `updated_at` (date-time): User record most recently updated at. Note this may be incremented because of internal or external updates.
|
111
127
|
* `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.
|
112
128
|
* `avatar_file` (file): An image file for your user avatar.
|
113
129
|
* `avatar_delete` (boolean): If true, the avatar will be deleted.
|
@@ -428,6 +444,14 @@ await user.update({
|
|
428
444
|
"header_text": "User-specific message.",
|
429
445
|
"language": "en",
|
430
446
|
"last_login_at": "2000-01-01T01:00:00Z",
|
447
|
+
"last_web_login_at": "2000-01-01T01:00:00Z",
|
448
|
+
"last_ftp_login_at": "2000-01-01T01:00:00Z",
|
449
|
+
"last_sftp_login_at": "2000-01-01T01:00:00Z",
|
450
|
+
"last_dav_login_at": "2000-01-01T01:00:00Z",
|
451
|
+
"last_desktop_login_at": "2000-01-01T01:00:00Z",
|
452
|
+
"last_restapi_login_at": "2000-01-01T01:00:00Z",
|
453
|
+
"last_api_use_at": "2000-01-01T01:00:00Z",
|
454
|
+
"last_active_at": "2000-01-01T01:00:00Z",
|
431
455
|
"last_protocol_cipher": "example",
|
432
456
|
"lockout_expires": "2000-01-01T01:00:00Z",
|
433
457
|
"name": "John Doe",
|
package/lib/models/ApiKey.js
CHANGED
@@ -112,6 +112,12 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
112
112
|
(0, _defineProperty2.default)(this, "setPlatform", function (value) {
|
113
113
|
_this.attributes.platform = value;
|
114
114
|
});
|
115
|
+
(0, _defineProperty2.default)(this, "getUrl", function () {
|
116
|
+
return _this.attributes.url;
|
117
|
+
});
|
118
|
+
(0, _defineProperty2.default)(this, "setUrl", function (value) {
|
119
|
+
_this.attributes.url = value;
|
120
|
+
});
|
115
121
|
(0, _defineProperty2.default)(this, "getUserId", function () {
|
116
122
|
return _this.attributes.user_id;
|
117
123
|
});
|
package/lib/models/Site.js
CHANGED
@@ -352,6 +352,12 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
352
352
|
(0, _defineProperty2.default)(this, "getSftpEnabled", function () {
|
353
353
|
return _this.attributes.sftp_enabled;
|
354
354
|
});
|
355
|
+
(0, _defineProperty2.default)(this, "getSftpHostKeyType", function () {
|
356
|
+
return _this.attributes.sftp_host_key_type;
|
357
|
+
});
|
358
|
+
(0, _defineProperty2.default)(this, "getActiveSftpHostKeyId", function () {
|
359
|
+
return _this.attributes.active_sftp_host_key_id;
|
360
|
+
});
|
355
361
|
(0, _defineProperty2.default)(this, "getSftpInsecureCiphers", function () {
|
356
362
|
return _this.attributes.sftp_insecure_ciphers;
|
357
363
|
});
|
@@ -742,262 +748,278 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
742
748
|
throw new errors.InvalidParameterError("Bad parameter: disable_users_from_inactivity_period_days must be of type Int, received ".concat((0, _utils.getType)(params['disable_users_from_inactivity_period_days'])));
|
743
749
|
|
744
750
|
case 56:
|
745
|
-
if (!(params['
|
751
|
+
if (!(params['sftp_host_key_type'] && !(0, _utils.isString)(params['sftp_host_key_type']))) {
|
746
752
|
_context3.next = 58;
|
747
753
|
break;
|
748
754
|
}
|
749
755
|
|
750
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
756
|
+
throw new errors.InvalidParameterError("Bad parameter: sftp_host_key_type must be of type String, received ".concat((0, _utils.getType)(params['sftp_host_key_type'])));
|
751
757
|
|
752
758
|
case 58:
|
753
|
-
if (!(params['
|
759
|
+
if (!(params['active_sftp_host_key_id'] && !(0, _utils.isInt)(params['active_sftp_host_key_id']))) {
|
754
760
|
_context3.next = 60;
|
755
761
|
break;
|
756
762
|
}
|
757
763
|
|
758
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
764
|
+
throw new errors.InvalidParameterError("Bad parameter: active_sftp_host_key_id must be of type Int, received ".concat((0, _utils.getType)(params['active_sftp_host_key_id'])));
|
759
765
|
|
760
766
|
case 60:
|
761
|
-
if (!(params['
|
767
|
+
if (!(params['require_2fa_user_type'] && !(0, _utils.isString)(params['require_2fa_user_type']))) {
|
762
768
|
_context3.next = 62;
|
763
769
|
break;
|
764
770
|
}
|
765
771
|
|
766
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
772
|
+
throw new errors.InvalidParameterError("Bad parameter: require_2fa_user_type must be of type String, received ".concat((0, _utils.getType)(params['require_2fa_user_type'])));
|
767
773
|
|
768
774
|
case 62:
|
769
|
-
if (!(params['
|
775
|
+
if (!(params['color2_top'] && !(0, _utils.isString)(params['color2_top']))) {
|
770
776
|
_context3.next = 64;
|
771
777
|
break;
|
772
778
|
}
|
773
779
|
|
774
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
780
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top must be of type String, received ".concat((0, _utils.getType)(params['color2_top'])));
|
775
781
|
|
776
782
|
case 64:
|
777
|
-
if (!(params['
|
783
|
+
if (!(params['color2_left'] && !(0, _utils.isString)(params['color2_left']))) {
|
778
784
|
_context3.next = 66;
|
779
785
|
break;
|
780
786
|
}
|
781
787
|
|
782
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
788
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_left must be of type String, received ".concat((0, _utils.getType)(params['color2_left'])));
|
783
789
|
|
784
790
|
case 66:
|
785
|
-
if (!(params['
|
791
|
+
if (!(params['color2_link'] && !(0, _utils.isString)(params['color2_link']))) {
|
786
792
|
_context3.next = 68;
|
787
793
|
break;
|
788
794
|
}
|
789
795
|
|
790
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
796
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_link must be of type String, received ".concat((0, _utils.getType)(params['color2_link'])));
|
791
797
|
|
792
798
|
case 68:
|
793
|
-
if (!(params['
|
799
|
+
if (!(params['color2_text'] && !(0, _utils.isString)(params['color2_text']))) {
|
794
800
|
_context3.next = 70;
|
795
801
|
break;
|
796
802
|
}
|
797
803
|
|
798
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
804
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_text must be of type String, received ".concat((0, _utils.getType)(params['color2_text'])));
|
799
805
|
|
800
806
|
case 70:
|
801
|
-
if (!(params['
|
807
|
+
if (!(params['color2_top_text'] && !(0, _utils.isString)(params['color2_top_text']))) {
|
802
808
|
_context3.next = 72;
|
803
809
|
break;
|
804
810
|
}
|
805
811
|
|
806
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
812
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top_text must be of type String, received ".concat((0, _utils.getType)(params['color2_top_text'])));
|
807
813
|
|
808
814
|
case 72:
|
809
|
-
if (!(params['
|
815
|
+
if (!(params['site_header'] && !(0, _utils.isString)(params['site_header']))) {
|
810
816
|
_context3.next = 74;
|
811
817
|
break;
|
812
818
|
}
|
813
819
|
|
814
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
820
|
+
throw new errors.InvalidParameterError("Bad parameter: site_header must be of type String, received ".concat((0, _utils.getType)(params['site_header'])));
|
815
821
|
|
816
822
|
case 74:
|
817
|
-
if (!(params['
|
823
|
+
if (!(params['site_footer'] && !(0, _utils.isString)(params['site_footer']))) {
|
818
824
|
_context3.next = 76;
|
819
825
|
break;
|
820
826
|
}
|
821
827
|
|
822
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
828
|
+
throw new errors.InvalidParameterError("Bad parameter: site_footer must be of type String, received ".concat((0, _utils.getType)(params['site_footer'])));
|
823
829
|
|
824
830
|
case 76:
|
825
|
-
if (!(params['
|
831
|
+
if (!(params['login_help_text'] && !(0, _utils.isString)(params['login_help_text']))) {
|
826
832
|
_context3.next = 78;
|
827
833
|
break;
|
828
834
|
}
|
829
835
|
|
830
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
836
|
+
throw new errors.InvalidParameterError("Bad parameter: login_help_text must be of type String, received ".concat((0, _utils.getType)(params['login_help_text'])));
|
831
837
|
|
832
838
|
case 78:
|
833
|
-
if (!(params['
|
839
|
+
if (!(params['smtp_address'] && !(0, _utils.isString)(params['smtp_address']))) {
|
834
840
|
_context3.next = 80;
|
835
841
|
break;
|
836
842
|
}
|
837
843
|
|
838
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
844
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_address must be of type String, received ".concat((0, _utils.getType)(params['smtp_address'])));
|
839
845
|
|
840
846
|
case 80:
|
841
|
-
if (!(params['
|
847
|
+
if (!(params['smtp_authentication'] && !(0, _utils.isString)(params['smtp_authentication']))) {
|
842
848
|
_context3.next = 82;
|
843
849
|
break;
|
844
850
|
}
|
845
851
|
|
846
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
852
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_authentication must be of type String, received ".concat((0, _utils.getType)(params['smtp_authentication'])));
|
847
853
|
|
848
854
|
case 82:
|
849
|
-
if (!(params['
|
855
|
+
if (!(params['smtp_from'] && !(0, _utils.isString)(params['smtp_from']))) {
|
850
856
|
_context3.next = 84;
|
851
857
|
break;
|
852
858
|
}
|
853
859
|
|
854
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
860
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_from must be of type String, received ".concat((0, _utils.getType)(params['smtp_from'])));
|
855
861
|
|
856
862
|
case 84:
|
857
|
-
if (!(params['
|
863
|
+
if (!(params['smtp_username'] && !(0, _utils.isString)(params['smtp_username']))) {
|
858
864
|
_context3.next = 86;
|
859
865
|
break;
|
860
866
|
}
|
861
867
|
|
862
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
868
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_username must be of type String, received ".concat((0, _utils.getType)(params['smtp_username'])));
|
863
869
|
|
864
870
|
case 86:
|
865
|
-
if (!(params['
|
871
|
+
if (!(params['smtp_port'] && !(0, _utils.isInt)(params['smtp_port']))) {
|
866
872
|
_context3.next = 88;
|
867
873
|
break;
|
868
874
|
}
|
869
875
|
|
870
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
876
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_port must be of type Int, received ".concat((0, _utils.getType)(params['smtp_port'])));
|
871
877
|
|
872
878
|
case 88:
|
873
|
-
if (!(params['
|
879
|
+
if (!(params['ldap_type'] && !(0, _utils.isString)(params['ldap_type']))) {
|
874
880
|
_context3.next = 90;
|
875
881
|
break;
|
876
882
|
}
|
877
883
|
|
878
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
884
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_type must be of type String, received ".concat((0, _utils.getType)(params['ldap_type'])));
|
879
885
|
|
880
886
|
case 90:
|
881
|
-
if (!(params['
|
887
|
+
if (!(params['ldap_host'] && !(0, _utils.isString)(params['ldap_host']))) {
|
882
888
|
_context3.next = 92;
|
883
889
|
break;
|
884
890
|
}
|
885
891
|
|
886
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
892
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host must be of type String, received ".concat((0, _utils.getType)(params['ldap_host'])));
|
887
893
|
|
888
894
|
case 92:
|
889
|
-
if (!(params['
|
895
|
+
if (!(params['ldap_host_2'] && !(0, _utils.isString)(params['ldap_host_2']))) {
|
890
896
|
_context3.next = 94;
|
891
897
|
break;
|
892
898
|
}
|
893
899
|
|
894
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
900
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_2 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_2'])));
|
895
901
|
|
896
902
|
case 94:
|
897
|
-
if (!(params['
|
903
|
+
if (!(params['ldap_host_3'] && !(0, _utils.isString)(params['ldap_host_3']))) {
|
898
904
|
_context3.next = 96;
|
899
905
|
break;
|
900
906
|
}
|
901
907
|
|
902
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
908
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_3 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_3'])));
|
903
909
|
|
904
910
|
case 96:
|
905
|
-
if (!(params['
|
911
|
+
if (!(params['ldap_port'] && !(0, _utils.isInt)(params['ldap_port']))) {
|
906
912
|
_context3.next = 98;
|
907
913
|
break;
|
908
914
|
}
|
909
915
|
|
910
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
916
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_port must be of type Int, received ".concat((0, _utils.getType)(params['ldap_port'])));
|
911
917
|
|
912
918
|
case 98:
|
913
|
-
if (!(params['
|
919
|
+
if (!(params['ldap_username'] && !(0, _utils.isString)(params['ldap_username']))) {
|
914
920
|
_context3.next = 100;
|
915
921
|
break;
|
916
922
|
}
|
917
923
|
|
918
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
924
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username must be of type String, received ".concat((0, _utils.getType)(params['ldap_username'])));
|
919
925
|
|
920
926
|
case 100:
|
921
|
-
if (!(params['
|
927
|
+
if (!(params['ldap_username_field'] && !(0, _utils.isString)(params['ldap_username_field']))) {
|
922
928
|
_context3.next = 102;
|
923
929
|
break;
|
924
930
|
}
|
925
931
|
|
926
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
932
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username_field must be of type String, received ".concat((0, _utils.getType)(params['ldap_username_field'])));
|
927
933
|
|
928
934
|
case 102:
|
929
|
-
if (!(params['
|
935
|
+
if (!(params['ldap_domain'] && !(0, _utils.isString)(params['ldap_domain']))) {
|
930
936
|
_context3.next = 104;
|
931
937
|
break;
|
932
938
|
}
|
933
939
|
|
934
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
940
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_domain must be of type String, received ".concat((0, _utils.getType)(params['ldap_domain'])));
|
935
941
|
|
936
942
|
case 104:
|
937
|
-
if (!(params['
|
943
|
+
if (!(params['ldap_user_action'] && !(0, _utils.isString)(params['ldap_user_action']))) {
|
938
944
|
_context3.next = 106;
|
939
945
|
break;
|
940
946
|
}
|
941
947
|
|
942
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
948
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_user_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_action'])));
|
943
949
|
|
944
950
|
case 106:
|
945
|
-
if (!(params['
|
951
|
+
if (!(params['ldap_group_action'] && !(0, _utils.isString)(params['ldap_group_action']))) {
|
946
952
|
_context3.next = 108;
|
947
953
|
break;
|
948
954
|
}
|
949
955
|
|
950
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
956
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_action'])));
|
951
957
|
|
952
958
|
case 108:
|
953
|
-
if (!(params['
|
959
|
+
if (!(params['ldap_user_include_groups'] && !(0, _utils.isString)(params['ldap_user_include_groups']))) {
|
954
960
|
_context3.next = 110;
|
955
961
|
break;
|
956
962
|
}
|
957
963
|
|
958
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
964
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_user_include_groups must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_include_groups'])));
|
959
965
|
|
960
966
|
case 110:
|
961
|
-
if (!(params['
|
967
|
+
if (!(params['ldap_group_exclusion'] && !(0, _utils.isString)(params['ldap_group_exclusion']))) {
|
962
968
|
_context3.next = 112;
|
963
969
|
break;
|
964
970
|
}
|
965
971
|
|
966
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
972
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_exclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_exclusion'])));
|
967
973
|
|
968
974
|
case 112:
|
969
|
-
if (!(params['
|
975
|
+
if (!(params['ldap_group_inclusion'] && !(0, _utils.isString)(params['ldap_group_inclusion']))) {
|
970
976
|
_context3.next = 114;
|
971
977
|
break;
|
972
978
|
}
|
973
979
|
|
974
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
980
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_inclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_inclusion'])));
|
975
981
|
|
976
982
|
case 114:
|
977
|
-
if (!(params['
|
983
|
+
if (!(params['ldap_base_dn'] && !(0, _utils.isString)(params['ldap_base_dn']))) {
|
978
984
|
_context3.next = 116;
|
979
985
|
break;
|
980
986
|
}
|
981
987
|
|
982
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
988
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_base_dn must be of type String, received ".concat((0, _utils.getType)(params['ldap_base_dn'])));
|
983
989
|
|
984
990
|
case 116:
|
985
|
-
if (!(params['
|
991
|
+
if (!(params['ldap_password_change'] && !(0, _utils.isString)(params['ldap_password_change']))) {
|
986
992
|
_context3.next = 118;
|
987
993
|
break;
|
988
994
|
}
|
989
995
|
|
990
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
996
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_password_change must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change'])));
|
991
997
|
|
992
998
|
case 118:
|
993
|
-
|
994
|
-
|
999
|
+
if (!(params['ldap_password_change_confirmation'] && !(0, _utils.isString)(params['ldap_password_change_confirmation']))) {
|
1000
|
+
_context3.next = 120;
|
1001
|
+
break;
|
1002
|
+
}
|
1003
|
+
|
1004
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_password_change_confirmation must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change_confirmation'])));
|
995
1005
|
|
996
1006
|
case 120:
|
1007
|
+
if (!(params['smtp_password'] && !(0, _utils.isString)(params['smtp_password']))) {
|
1008
|
+
_context3.next = 122;
|
1009
|
+
break;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_password must be of type String, received ".concat((0, _utils.getType)(params['smtp_password'])));
|
1013
|
+
|
1014
|
+
case 122:
|
1015
|
+
_context3.next = 124;
|
1016
|
+
return _Api.default.sendRequest("/site", 'PATCH', params, options);
|
1017
|
+
|
1018
|
+
case 124:
|
997
1019
|
response = _context3.sent;
|
998
1020
|
return _context3.abrupt("return", new Site(response === null || response === void 0 ? void 0 : response.data, options));
|
999
1021
|
|
1000
|
-
case
|
1022
|
+
case 126:
|
1001
1023
|
case "end":
|
1002
1024
|
return _context3.stop();
|
1003
1025
|
}
|
package/lib/models/User.js
CHANGED
@@ -178,6 +178,54 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
|
|
178
178
|
(0, _defineProperty2.default)(this, "setLastLoginAt", function (value) {
|
179
179
|
_this.attributes.last_login_at = value;
|
180
180
|
});
|
181
|
+
(0, _defineProperty2.default)(this, "getLastWebLoginAt", function () {
|
182
|
+
return _this.attributes.last_web_login_at;
|
183
|
+
});
|
184
|
+
(0, _defineProperty2.default)(this, "setLastWebLoginAt", function (value) {
|
185
|
+
_this.attributes.last_web_login_at = value;
|
186
|
+
});
|
187
|
+
(0, _defineProperty2.default)(this, "getLastFtpLoginAt", function () {
|
188
|
+
return _this.attributes.last_ftp_login_at;
|
189
|
+
});
|
190
|
+
(0, _defineProperty2.default)(this, "setLastFtpLoginAt", function (value) {
|
191
|
+
_this.attributes.last_ftp_login_at = value;
|
192
|
+
});
|
193
|
+
(0, _defineProperty2.default)(this, "getLastSftpLoginAt", function () {
|
194
|
+
return _this.attributes.last_sftp_login_at;
|
195
|
+
});
|
196
|
+
(0, _defineProperty2.default)(this, "setLastSftpLoginAt", function (value) {
|
197
|
+
_this.attributes.last_sftp_login_at = value;
|
198
|
+
});
|
199
|
+
(0, _defineProperty2.default)(this, "getLastDavLoginAt", function () {
|
200
|
+
return _this.attributes.last_dav_login_at;
|
201
|
+
});
|
202
|
+
(0, _defineProperty2.default)(this, "setLastDavLoginAt", function (value) {
|
203
|
+
_this.attributes.last_dav_login_at = value;
|
204
|
+
});
|
205
|
+
(0, _defineProperty2.default)(this, "getLastDesktopLoginAt", function () {
|
206
|
+
return _this.attributes.last_desktop_login_at;
|
207
|
+
});
|
208
|
+
(0, _defineProperty2.default)(this, "setLastDesktopLoginAt", function (value) {
|
209
|
+
_this.attributes.last_desktop_login_at = value;
|
210
|
+
});
|
211
|
+
(0, _defineProperty2.default)(this, "getLastRestapiLoginAt", function () {
|
212
|
+
return _this.attributes.last_restapi_login_at;
|
213
|
+
});
|
214
|
+
(0, _defineProperty2.default)(this, "setLastRestapiLoginAt", function (value) {
|
215
|
+
_this.attributes.last_restapi_login_at = value;
|
216
|
+
});
|
217
|
+
(0, _defineProperty2.default)(this, "getLastApiUseAt", function () {
|
218
|
+
return _this.attributes.last_api_use_at;
|
219
|
+
});
|
220
|
+
(0, _defineProperty2.default)(this, "setLastApiUseAt", function (value) {
|
221
|
+
_this.attributes.last_api_use_at = value;
|
222
|
+
});
|
223
|
+
(0, _defineProperty2.default)(this, "getLastActiveAt", function () {
|
224
|
+
return _this.attributes.last_active_at;
|
225
|
+
});
|
226
|
+
(0, _defineProperty2.default)(this, "setLastActiveAt", function (value) {
|
227
|
+
_this.attributes.last_active_at = value;
|
228
|
+
});
|
181
229
|
(0, _defineProperty2.default)(this, "getLastProtocolCipher", function () {
|
182
230
|
return _this.attributes.last_protocol_cipher;
|
183
231
|
});
|
package/package.json
CHANGED
package/src/models/ApiKey.js
CHANGED
@@ -96,6 +96,13 @@ class ApiKey {
|
|
96
96
|
this.attributes.platform = value
|
97
97
|
}
|
98
98
|
|
99
|
+
// string # URL for API host.
|
100
|
+
getUrl = () => this.attributes.url
|
101
|
+
|
102
|
+
setUrl = value => {
|
103
|
+
this.attributes.url = value
|
104
|
+
}
|
105
|
+
|
99
106
|
// int64 # User ID for the owner of this API Key. May be blank for Site-wide API Keys.
|
100
107
|
getUserId = () => this.attributes.user_id
|
101
108
|
|
package/src/models/Site.js
CHANGED
@@ -326,6 +326,12 @@ class Site {
|
|
326
326
|
// boolean # Is SFTP enabled?
|
327
327
|
getSftpEnabled = () => this.attributes.sftp_enabled
|
328
328
|
|
329
|
+
// string # Sftp Host Key Type
|
330
|
+
getSftpHostKeyType = () => this.attributes.sftp_host_key_type
|
331
|
+
|
332
|
+
// int64 # Id of the currently selected custom SFTP Host Key
|
333
|
+
getActiveSftpHostKeyId = () => this.attributes.active_sftp_host_key_id
|
334
|
+
|
329
335
|
// boolean # Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
|
330
336
|
getSftpInsecureCiphers = () => this.attributes.sftp_insecure_ciphers
|
331
337
|
|
@@ -514,6 +520,8 @@ class Site {
|
|
514
520
|
// user_requests_notify_admins - boolean - Send email to site admins when a user request is received?
|
515
521
|
// ftp_enabled - boolean - Is FTP enabled?
|
516
522
|
// sftp_enabled - boolean - Is SFTP enabled?
|
523
|
+
// sftp_host_key_type - string - Sftp Host Key Type
|
524
|
+
// active_sftp_host_key_id - int64 - Id of the currently selected custom SFTP Host Key
|
517
525
|
// bundle_watermark_value - object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
518
526
|
// allowed_2fa_method_sms - boolean - Is SMS two factor authentication allowed?
|
519
527
|
// allowed_2fa_method_u2f - boolean - Is U2F two factor authentication allowed?
|
@@ -677,6 +685,14 @@ class Site {
|
|
677
685
|
throw new errors.InvalidParameterError(`Bad parameter: disable_users_from_inactivity_period_days must be of type Int, received ${getType(params['disable_users_from_inactivity_period_days'])}`)
|
678
686
|
}
|
679
687
|
|
688
|
+
if (params['sftp_host_key_type'] && !isString(params['sftp_host_key_type'])) {
|
689
|
+
throw new errors.InvalidParameterError(`Bad parameter: sftp_host_key_type must be of type String, received ${getType(params['sftp_host_key_type'])}`)
|
690
|
+
}
|
691
|
+
|
692
|
+
if (params['active_sftp_host_key_id'] && !isInt(params['active_sftp_host_key_id'])) {
|
693
|
+
throw new errors.InvalidParameterError(`Bad parameter: active_sftp_host_key_id must be of type Int, received ${getType(params['active_sftp_host_key_id'])}`)
|
694
|
+
}
|
695
|
+
|
680
696
|
if (params['require_2fa_user_type'] && !isString(params['require_2fa_user_type'])) {
|
681
697
|
throw new errors.InvalidParameterError(`Bad parameter: require_2fa_user_type must be of type String, received ${getType(params['require_2fa_user_type'])}`)
|
682
698
|
}
|
package/src/models/User.js
CHANGED
@@ -166,14 +166,70 @@ class User {
|
|
166
166
|
this.attributes.language = value
|
167
167
|
}
|
168
168
|
|
169
|
-
// date-time # User's
|
169
|
+
// date-time # User's most recent login time via any protocol
|
170
170
|
getLastLoginAt = () => this.attributes.last_login_at
|
171
171
|
|
172
172
|
setLastLoginAt = value => {
|
173
173
|
this.attributes.last_login_at = value
|
174
174
|
}
|
175
175
|
|
176
|
-
//
|
176
|
+
// date-time # User's most recent login time via web
|
177
|
+
getLastWebLoginAt = () => this.attributes.last_web_login_at
|
178
|
+
|
179
|
+
setLastWebLoginAt = value => {
|
180
|
+
this.attributes.last_web_login_at = value
|
181
|
+
}
|
182
|
+
|
183
|
+
// date-time # User's most recent login time via FTP
|
184
|
+
getLastFtpLoginAt = () => this.attributes.last_ftp_login_at
|
185
|
+
|
186
|
+
setLastFtpLoginAt = value => {
|
187
|
+
this.attributes.last_ftp_login_at = value
|
188
|
+
}
|
189
|
+
|
190
|
+
// date-time # User's most recent login time via SFTP
|
191
|
+
getLastSftpLoginAt = () => this.attributes.last_sftp_login_at
|
192
|
+
|
193
|
+
setLastSftpLoginAt = value => {
|
194
|
+
this.attributes.last_sftp_login_at = value
|
195
|
+
}
|
196
|
+
|
197
|
+
// date-time # User's most recent login time via WebDAV
|
198
|
+
getLastDavLoginAt = () => this.attributes.last_dav_login_at
|
199
|
+
|
200
|
+
setLastDavLoginAt = value => {
|
201
|
+
this.attributes.last_dav_login_at = value
|
202
|
+
}
|
203
|
+
|
204
|
+
// date-time # User's most recent login time via Desktop app
|
205
|
+
getLastDesktopLoginAt = () => this.attributes.last_desktop_login_at
|
206
|
+
|
207
|
+
setLastDesktopLoginAt = value => {
|
208
|
+
this.attributes.last_desktop_login_at = value
|
209
|
+
}
|
210
|
+
|
211
|
+
// date-time # User's most recent login time via Rest API
|
212
|
+
getLastRestapiLoginAt = () => this.attributes.last_restapi_login_at
|
213
|
+
|
214
|
+
setLastRestapiLoginAt = value => {
|
215
|
+
this.attributes.last_restapi_login_at = value
|
216
|
+
}
|
217
|
+
|
218
|
+
// date-time # User's most recent API use time
|
219
|
+
getLastApiUseAt = () => this.attributes.last_api_use_at
|
220
|
+
|
221
|
+
setLastApiUseAt = value => {
|
222
|
+
this.attributes.last_api_use_at = value
|
223
|
+
}
|
224
|
+
|
225
|
+
// date-time # User's most recent activity time, which is the latest of most recent login, most recent API use, enablement, or creation
|
226
|
+
getLastActiveAt = () => this.attributes.last_active_at
|
227
|
+
|
228
|
+
setLastActiveAt = value => {
|
229
|
+
this.attributes.last_active_at = value
|
230
|
+
}
|
231
|
+
|
232
|
+
// string # The most recent protocol and cipher used
|
177
233
|
getLastProtocolCipher = () => this.attributes.last_protocol_cipher
|
178
234
|
|
179
235
|
setLastProtocolCipher = value => {
|
@@ -355,7 +411,7 @@ class User {
|
|
355
411
|
this.attributes.type_of_2fa = value
|
356
412
|
}
|
357
413
|
|
358
|
-
// date-time # User record
|
414
|
+
// date-time # User record most recently updated at. Note this may be incremented because of internal or external updates.
|
359
415
|
getUpdatedAt = () => this.attributes.updated_at
|
360
416
|
|
361
417
|
// 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.
|