files.com 1.0.416 → 1.0.417
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/Site.md +4 -0
- package/lib/Files.js +1 -1
- package/lib/models/Site.js +90 -79
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Site.js +8 -0
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.417
|
package/docs/models/Site.md
CHANGED
@@ -18,6 +18,7 @@
|
|
18
18
|
"ask_about_overwrites": true,
|
19
19
|
"bundle_activity_notifications": "never",
|
20
20
|
"bundle_expiration": 1,
|
21
|
+
"bundle_not_found_message": "example",
|
21
22
|
"bundle_password_required": true,
|
22
23
|
"bundle_registration_notifications": "never",
|
23
24
|
"bundle_require_registration": true,
|
@@ -237,6 +238,7 @@
|
|
237
238
|
* `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
|
238
239
|
* `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
|
239
240
|
* `bundle_expiration` (int64): Site-wide Bundle expiration in days
|
241
|
+
* `bundle_not_found_message` (string): Custom error message to show when bundle is not found.
|
240
242
|
* `bundle_password_required` (boolean): Do Bundles require password protection?
|
241
243
|
* `bundle_registration_notifications` (string): Do Bundle owners receive registration notification?
|
242
244
|
* `bundle_require_registration` (boolean): Do Bundles require registration?
|
@@ -453,6 +455,7 @@ await Site.update({
|
|
453
455
|
'disable_password_reset': true,
|
454
456
|
'immutable_files': true,
|
455
457
|
'session_pinned_by_ip': true,
|
458
|
+
'bundle_not_found_message': "example",
|
456
459
|
'bundle_password_required': true,
|
457
460
|
'bundle_require_registration': true,
|
458
461
|
'bundle_require_share_recipient': true,
|
@@ -588,6 +591,7 @@ await Site.update({
|
|
588
591
|
* `disable_password_reset` (boolean): Is password reset disabled?
|
589
592
|
* `immutable_files` (boolean): Are files protected from modification?
|
590
593
|
* `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?)
|
594
|
+
* `bundle_not_found_message` (string): Custom error message to show when bundle is not found.
|
591
595
|
* `bundle_password_required` (boolean): Do Bundles require password protection?
|
592
596
|
* `bundle_require_registration` (boolean): Do Bundles require registration?
|
593
597
|
* `bundle_require_share_recipient` (boolean): Do Bundles require recipients for sharing?
|
package/lib/Files.js
CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
|
|
11
11
|
var apiKey;
|
12
12
|
var baseUrl = 'https://app.files.com';
|
13
13
|
var sessionId = null;
|
14
|
-
var version = "1.0.
|
14
|
+
var version = "1.0.417";
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
17
17
|
var debugRequest = false;
|
package/lib/models/Site.js
CHANGED
@@ -88,6 +88,10 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
88
88
|
(0, _defineProperty2.default)(this, "getBundleExpiration", function () {
|
89
89
|
return _this.attributes.bundle_expiration;
|
90
90
|
});
|
91
|
+
// string # Custom error message to show when bundle is not found.
|
92
|
+
(0, _defineProperty2.default)(this, "getBundleNotFoundMessage", function () {
|
93
|
+
return _this.attributes.bundle_not_found_message;
|
94
|
+
});
|
91
95
|
// boolean # Do Bundles require password protection?
|
92
96
|
(0, _defineProperty2.default)(this, "getBundlePasswordRequired", function () {
|
93
97
|
return _this.attributes.bundle_password_required;
|
@@ -728,6 +732,7 @@ _class = Site;
|
|
728
732
|
// disable_password_reset - boolean - Is password reset disabled?
|
729
733
|
// immutable_files - boolean - Are files protected from modification?
|
730
734
|
// 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?)
|
735
|
+
// bundle_not_found_message - string - Custom error message to show when bundle is not found.
|
731
736
|
// bundle_password_required - boolean - Do Bundles require password protection?
|
732
737
|
// bundle_require_registration - boolean - Do Bundles require registration?
|
733
738
|
// bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
|
@@ -980,240 +985,246 @@ _class = Site;
|
|
980
985
|
}
|
981
986
|
throw new errors.InvalidParameterError("Bad parameter: password_min_length must be of type Int, received ".concat((0, _utils.getType)(params['password_min_length'])));
|
982
987
|
case 56:
|
983
|
-
if (!(params['
|
988
|
+
if (!(params['bundle_not_found_message'] && !(0, _utils.isString)(params['bundle_not_found_message']))) {
|
984
989
|
_context3.next = 58;
|
985
990
|
break;
|
986
991
|
}
|
987
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
992
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_not_found_message must be of type String, received ".concat((0, _utils.getType)(params['bundle_not_found_message'])));
|
988
993
|
case 58:
|
989
|
-
if (!(params['
|
994
|
+
if (!(params['bundle_registration_notifications'] && !(0, _utils.isString)(params['bundle_registration_notifications']))) {
|
990
995
|
_context3.next = 60;
|
991
996
|
break;
|
992
997
|
}
|
993
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
998
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_registration_notifications must be of type String, received ".concat((0, _utils.getType)(params['bundle_registration_notifications'])));
|
994
999
|
case 60:
|
995
|
-
if (!(params['
|
1000
|
+
if (!(params['bundle_activity_notifications'] && !(0, _utils.isString)(params['bundle_activity_notifications']))) {
|
996
1001
|
_context3.next = 62;
|
997
1002
|
break;
|
998
1003
|
}
|
999
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1004
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_activity_notifications must be of type String, received ".concat((0, _utils.getType)(params['bundle_activity_notifications'])));
|
1000
1005
|
case 62:
|
1001
|
-
if (!(params['
|
1006
|
+
if (!(params['bundle_upload_receipt_notifications'] && !(0, _utils.isString)(params['bundle_upload_receipt_notifications']))) {
|
1002
1007
|
_context3.next = 64;
|
1003
1008
|
break;
|
1004
1009
|
}
|
1005
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1010
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_upload_receipt_notifications must be of type String, received ".concat((0, _utils.getType)(params['bundle_upload_receipt_notifications'])));
|
1006
1011
|
case 64:
|
1007
|
-
if (!(params['
|
1012
|
+
if (!(params['disable_users_from_inactivity_period_days'] && !(0, _utils.isInt)(params['disable_users_from_inactivity_period_days']))) {
|
1008
1013
|
_context3.next = 66;
|
1009
1014
|
break;
|
1010
1015
|
}
|
1011
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1016
|
+
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'])));
|
1012
1017
|
case 66:
|
1013
|
-
if (!(params['
|
1018
|
+
if (!(params['sftp_host_key_type'] && !(0, _utils.isString)(params['sftp_host_key_type']))) {
|
1014
1019
|
_context3.next = 68;
|
1015
1020
|
break;
|
1016
1021
|
}
|
1017
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1022
|
+
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'])));
|
1018
1023
|
case 68:
|
1019
|
-
if (!(params['
|
1024
|
+
if (!(params['active_sftp_host_key_id'] && !(0, _utils.isInt)(params['active_sftp_host_key_id']))) {
|
1020
1025
|
_context3.next = 70;
|
1021
1026
|
break;
|
1022
1027
|
}
|
1023
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1028
|
+
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'])));
|
1024
1029
|
case 70:
|
1025
|
-
if (!(params['
|
1030
|
+
if (!(params['require_2fa_user_type'] && !(0, _utils.isString)(params['require_2fa_user_type']))) {
|
1026
1031
|
_context3.next = 72;
|
1027
1032
|
break;
|
1028
1033
|
}
|
1029
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1034
|
+
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'])));
|
1030
1035
|
case 72:
|
1031
|
-
if (!(params['
|
1036
|
+
if (!(params['color2_top'] && !(0, _utils.isString)(params['color2_top']))) {
|
1032
1037
|
_context3.next = 74;
|
1033
1038
|
break;
|
1034
1039
|
}
|
1035
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1040
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top must be of type String, received ".concat((0, _utils.getType)(params['color2_top'])));
|
1036
1041
|
case 74:
|
1037
|
-
if (!(params['
|
1042
|
+
if (!(params['color2_left'] && !(0, _utils.isString)(params['color2_left']))) {
|
1038
1043
|
_context3.next = 76;
|
1039
1044
|
break;
|
1040
1045
|
}
|
1041
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1046
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_left must be of type String, received ".concat((0, _utils.getType)(params['color2_left'])));
|
1042
1047
|
case 76:
|
1043
|
-
if (!(params['
|
1048
|
+
if (!(params['color2_link'] && !(0, _utils.isString)(params['color2_link']))) {
|
1044
1049
|
_context3.next = 78;
|
1045
1050
|
break;
|
1046
1051
|
}
|
1047
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1052
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_link must be of type String, received ".concat((0, _utils.getType)(params['color2_link'])));
|
1048
1053
|
case 78:
|
1049
|
-
if (!(params['
|
1054
|
+
if (!(params['color2_text'] && !(0, _utils.isString)(params['color2_text']))) {
|
1050
1055
|
_context3.next = 80;
|
1051
1056
|
break;
|
1052
1057
|
}
|
1053
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1058
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_text must be of type String, received ".concat((0, _utils.getType)(params['color2_text'])));
|
1054
1059
|
case 80:
|
1055
|
-
if (!(params['
|
1060
|
+
if (!(params['color2_top_text'] && !(0, _utils.isString)(params['color2_top_text']))) {
|
1056
1061
|
_context3.next = 82;
|
1057
1062
|
break;
|
1058
1063
|
}
|
1059
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1064
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top_text must be of type String, received ".concat((0, _utils.getType)(params['color2_top_text'])));
|
1060
1065
|
case 82:
|
1061
|
-
if (!(params['
|
1066
|
+
if (!(params['site_header'] && !(0, _utils.isString)(params['site_header']))) {
|
1062
1067
|
_context3.next = 84;
|
1063
1068
|
break;
|
1064
1069
|
}
|
1065
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1070
|
+
throw new errors.InvalidParameterError("Bad parameter: site_header must be of type String, received ".concat((0, _utils.getType)(params['site_header'])));
|
1066
1071
|
case 84:
|
1067
|
-
if (!(params['
|
1072
|
+
if (!(params['site_footer'] && !(0, _utils.isString)(params['site_footer']))) {
|
1068
1073
|
_context3.next = 86;
|
1069
1074
|
break;
|
1070
1075
|
}
|
1071
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1076
|
+
throw new errors.InvalidParameterError("Bad parameter: site_footer must be of type String, received ".concat((0, _utils.getType)(params['site_footer'])));
|
1072
1077
|
case 86:
|
1073
|
-
if (!(params['
|
1078
|
+
if (!(params['login_help_text'] && !(0, _utils.isString)(params['login_help_text']))) {
|
1074
1079
|
_context3.next = 88;
|
1075
1080
|
break;
|
1076
1081
|
}
|
1077
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1082
|
+
throw new errors.InvalidParameterError("Bad parameter: login_help_text must be of type String, received ".concat((0, _utils.getType)(params['login_help_text'])));
|
1078
1083
|
case 88:
|
1079
|
-
if (!(params['
|
1084
|
+
if (!(params['smtp_address'] && !(0, _utils.isString)(params['smtp_address']))) {
|
1080
1085
|
_context3.next = 90;
|
1081
1086
|
break;
|
1082
1087
|
}
|
1083
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1088
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_address must be of type String, received ".concat((0, _utils.getType)(params['smtp_address'])));
|
1084
1089
|
case 90:
|
1085
|
-
if (!(params['
|
1090
|
+
if (!(params['smtp_authentication'] && !(0, _utils.isString)(params['smtp_authentication']))) {
|
1086
1091
|
_context3.next = 92;
|
1087
1092
|
break;
|
1088
1093
|
}
|
1089
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1094
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_authentication must be of type String, received ".concat((0, _utils.getType)(params['smtp_authentication'])));
|
1090
1095
|
case 92:
|
1091
|
-
if (!(params['
|
1096
|
+
if (!(params['smtp_from'] && !(0, _utils.isString)(params['smtp_from']))) {
|
1092
1097
|
_context3.next = 94;
|
1093
1098
|
break;
|
1094
1099
|
}
|
1095
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1100
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_from must be of type String, received ".concat((0, _utils.getType)(params['smtp_from'])));
|
1096
1101
|
case 94:
|
1097
|
-
if (!(params['
|
1102
|
+
if (!(params['smtp_username'] && !(0, _utils.isString)(params['smtp_username']))) {
|
1098
1103
|
_context3.next = 96;
|
1099
1104
|
break;
|
1100
1105
|
}
|
1101
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1106
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_username must be of type String, received ".concat((0, _utils.getType)(params['smtp_username'])));
|
1102
1107
|
case 96:
|
1103
|
-
if (!(params['
|
1108
|
+
if (!(params['smtp_port'] && !(0, _utils.isInt)(params['smtp_port']))) {
|
1104
1109
|
_context3.next = 98;
|
1105
1110
|
break;
|
1106
1111
|
}
|
1107
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1112
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_port must be of type Int, received ".concat((0, _utils.getType)(params['smtp_port'])));
|
1108
1113
|
case 98:
|
1109
|
-
if (!(params['
|
1114
|
+
if (!(params['ldap_type'] && !(0, _utils.isString)(params['ldap_type']))) {
|
1110
1115
|
_context3.next = 100;
|
1111
1116
|
break;
|
1112
1117
|
}
|
1113
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1118
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_type must be of type String, received ".concat((0, _utils.getType)(params['ldap_type'])));
|
1114
1119
|
case 100:
|
1115
|
-
if (!(params['
|
1120
|
+
if (!(params['ldap_host'] && !(0, _utils.isString)(params['ldap_host']))) {
|
1116
1121
|
_context3.next = 102;
|
1117
1122
|
break;
|
1118
1123
|
}
|
1119
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1124
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host must be of type String, received ".concat((0, _utils.getType)(params['ldap_host'])));
|
1120
1125
|
case 102:
|
1121
|
-
if (!(params['
|
1126
|
+
if (!(params['ldap_host_2'] && !(0, _utils.isString)(params['ldap_host_2']))) {
|
1122
1127
|
_context3.next = 104;
|
1123
1128
|
break;
|
1124
1129
|
}
|
1125
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1130
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_2 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_2'])));
|
1126
1131
|
case 104:
|
1127
|
-
if (!(params['
|
1132
|
+
if (!(params['ldap_host_3'] && !(0, _utils.isString)(params['ldap_host_3']))) {
|
1128
1133
|
_context3.next = 106;
|
1129
1134
|
break;
|
1130
1135
|
}
|
1131
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1136
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_3 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_3'])));
|
1132
1137
|
case 106:
|
1133
|
-
if (!(params['
|
1138
|
+
if (!(params['ldap_port'] && !(0, _utils.isInt)(params['ldap_port']))) {
|
1134
1139
|
_context3.next = 108;
|
1135
1140
|
break;
|
1136
1141
|
}
|
1137
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1142
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_port must be of type Int, received ".concat((0, _utils.getType)(params['ldap_port'])));
|
1138
1143
|
case 108:
|
1139
|
-
if (!(params['
|
1144
|
+
if (!(params['ldap_username'] && !(0, _utils.isString)(params['ldap_username']))) {
|
1140
1145
|
_context3.next = 110;
|
1141
1146
|
break;
|
1142
1147
|
}
|
1143
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1148
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username must be of type String, received ".concat((0, _utils.getType)(params['ldap_username'])));
|
1144
1149
|
case 110:
|
1145
|
-
if (!(params['
|
1150
|
+
if (!(params['ldap_username_field'] && !(0, _utils.isString)(params['ldap_username_field']))) {
|
1146
1151
|
_context3.next = 112;
|
1147
1152
|
break;
|
1148
1153
|
}
|
1149
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1154
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username_field must be of type String, received ".concat((0, _utils.getType)(params['ldap_username_field'])));
|
1150
1155
|
case 112:
|
1151
|
-
if (!(params['
|
1156
|
+
if (!(params['ldap_domain'] && !(0, _utils.isString)(params['ldap_domain']))) {
|
1152
1157
|
_context3.next = 114;
|
1153
1158
|
break;
|
1154
1159
|
}
|
1155
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1160
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_domain must be of type String, received ".concat((0, _utils.getType)(params['ldap_domain'])));
|
1156
1161
|
case 114:
|
1157
|
-
if (!(params['
|
1162
|
+
if (!(params['ldap_user_action'] && !(0, _utils.isString)(params['ldap_user_action']))) {
|
1158
1163
|
_context3.next = 116;
|
1159
1164
|
break;
|
1160
1165
|
}
|
1161
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1166
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_user_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_action'])));
|
1162
1167
|
case 116:
|
1163
|
-
if (!(params['
|
1168
|
+
if (!(params['ldap_group_action'] && !(0, _utils.isString)(params['ldap_group_action']))) {
|
1164
1169
|
_context3.next = 118;
|
1165
1170
|
break;
|
1166
1171
|
}
|
1167
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1172
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_action'])));
|
1168
1173
|
case 118:
|
1169
|
-
if (!(params['
|
1174
|
+
if (!(params['ldap_user_include_groups'] && !(0, _utils.isString)(params['ldap_user_include_groups']))) {
|
1170
1175
|
_context3.next = 120;
|
1171
1176
|
break;
|
1172
1177
|
}
|
1173
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1178
|
+
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'])));
|
1174
1179
|
case 120:
|
1175
|
-
if (!(params['
|
1180
|
+
if (!(params['ldap_group_exclusion'] && !(0, _utils.isString)(params['ldap_group_exclusion']))) {
|
1176
1181
|
_context3.next = 122;
|
1177
1182
|
break;
|
1178
1183
|
}
|
1179
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1184
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_exclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_exclusion'])));
|
1180
1185
|
case 122:
|
1181
|
-
if (!(params['
|
1186
|
+
if (!(params['ldap_group_inclusion'] && !(0, _utils.isString)(params['ldap_group_inclusion']))) {
|
1182
1187
|
_context3.next = 124;
|
1183
1188
|
break;
|
1184
1189
|
}
|
1185
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1190
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_inclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_inclusion'])));
|
1186
1191
|
case 124:
|
1187
|
-
if (!(params['
|
1192
|
+
if (!(params['ldap_base_dn'] && !(0, _utils.isString)(params['ldap_base_dn']))) {
|
1188
1193
|
_context3.next = 126;
|
1189
1194
|
break;
|
1190
1195
|
}
|
1191
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1196
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_base_dn must be of type String, received ".concat((0, _utils.getType)(params['ldap_base_dn'])));
|
1192
1197
|
case 126:
|
1193
|
-
if (!(params['
|
1198
|
+
if (!(params['ldap_password_change'] && !(0, _utils.isString)(params['ldap_password_change']))) {
|
1194
1199
|
_context3.next = 128;
|
1195
1200
|
break;
|
1196
1201
|
}
|
1197
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1202
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_password_change must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change'])));
|
1198
1203
|
case 128:
|
1199
|
-
if (!(params['
|
1204
|
+
if (!(params['ldap_password_change_confirmation'] && !(0, _utils.isString)(params['ldap_password_change_confirmation']))) {
|
1200
1205
|
_context3.next = 130;
|
1201
1206
|
break;
|
1202
1207
|
}
|
1203
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1208
|
+
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'])));
|
1204
1209
|
case 130:
|
1205
|
-
if (!(params['
|
1210
|
+
if (!(params['smtp_password'] && !(0, _utils.isString)(params['smtp_password']))) {
|
1206
1211
|
_context3.next = 132;
|
1207
1212
|
break;
|
1208
1213
|
}
|
1209
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
1214
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_password must be of type String, received ".concat((0, _utils.getType)(params['smtp_password'])));
|
1210
1215
|
case 132:
|
1211
|
-
|
1212
|
-
|
1216
|
+
if (!(params['session_expiry_minutes'] && !(0, _utils.isInt)(params['session_expiry_minutes']))) {
|
1217
|
+
_context3.next = 134;
|
1218
|
+
break;
|
1219
|
+
}
|
1220
|
+
throw new errors.InvalidParameterError("Bad parameter: session_expiry_minutes must be of type Int, received ".concat((0, _utils.getType)(params['session_expiry_minutes'])));
|
1213
1221
|
case 134:
|
1222
|
+
_context3.next = 136;
|
1223
|
+
return _Api.default.sendRequest("/site", 'PATCH', params, options);
|
1224
|
+
case 136:
|
1214
1225
|
response = _context3.sent;
|
1215
1226
|
return _context3.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
1216
|
-
case
|
1227
|
+
case 138:
|
1217
1228
|
case "end":
|
1218
1229
|
return _context3.stop();
|
1219
1230
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Site.js
CHANGED
@@ -65,6 +65,9 @@ class Site {
|
|
65
65
|
// int64 # Site-wide Bundle expiration in days
|
66
66
|
getBundleExpiration = () => this.attributes.bundle_expiration
|
67
67
|
|
68
|
+
// string # Custom error message to show when bundle is not found.
|
69
|
+
getBundleNotFoundMessage = () => this.attributes.bundle_not_found_message
|
70
|
+
|
68
71
|
// boolean # Do Bundles require password protection?
|
69
72
|
getBundlePasswordRequired = () => this.attributes.bundle_password_required
|
70
73
|
|
@@ -534,6 +537,7 @@ class Site {
|
|
534
537
|
// disable_password_reset - boolean - Is password reset disabled?
|
535
538
|
// immutable_files - boolean - Are files protected from modification?
|
536
539
|
// 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?)
|
540
|
+
// bundle_not_found_message - string - Custom error message to show when bundle is not found.
|
537
541
|
// bundle_password_required - boolean - Do Bundles require password protection?
|
538
542
|
// bundle_require_registration - boolean - Do Bundles require registration?
|
539
543
|
// bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
|
@@ -723,6 +727,10 @@ class Site {
|
|
723
727
|
throw new errors.InvalidParameterError(`Bad parameter: password_min_length must be of type Int, received ${getType(params['password_min_length'])}`)
|
724
728
|
}
|
725
729
|
|
730
|
+
if (params['bundle_not_found_message'] && !isString(params['bundle_not_found_message'])) {
|
731
|
+
throw new errors.InvalidParameterError(`Bad parameter: bundle_not_found_message must be of type String, received ${getType(params['bundle_not_found_message'])}`)
|
732
|
+
}
|
733
|
+
|
726
734
|
if (params['bundle_registration_notifications'] && !isString(params['bundle_registration_notifications'])) {
|
727
735
|
throw new errors.InvalidParameterError(`Bad parameter: bundle_registration_notifications must be of type String, received ${getType(params['bundle_registration_notifications'])}`)
|
728
736
|
}
|