files.com 1.2.311 → 1.2.313
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 +4 -0
- package/docs/models/Sync.md +0 -2
- package/docs/models/SyncRun.md +0 -2
- package/lib/Files.js +1 -1
- package/lib/models/Site.js +116 -105
- package/lib/models/SyncRun.js +0 -4
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Site.js +8 -0
- package/src/models/SyncRun.js +0 -3
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.313
|
package/docs/models/Site.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"allowed_countries": "US,DE",
|
|
23
23
|
"allowed_ips": "example",
|
|
24
24
|
"always_mkdir_parents": true,
|
|
25
|
+
"as2_message_retention_days": 1,
|
|
25
26
|
"ask_about_overwrites": true,
|
|
26
27
|
"bundle_activity_notifications": "never",
|
|
27
28
|
"bundle_expiration": 1,
|
|
@@ -321,6 +322,7 @@
|
|
|
321
322
|
* `allowed_countries` (string): Comma separated list of allowed Country codes
|
|
322
323
|
* `allowed_ips` (string): List of allowed IP addresses
|
|
323
324
|
* `always_mkdir_parents` (boolean): Create parent directories if they do not exist during uploads? This is primarily used to work around broken upload clients that assume servers will perform this step.
|
|
325
|
+
* `as2_message_retention_days` (int64): Number of days to retain AS2 messages (incoming and outgoing).
|
|
324
326
|
* `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
|
|
325
327
|
* `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
|
|
326
328
|
* `bundle_expiration` (int64): Site-wide Bundle expiration in days
|
|
@@ -544,6 +546,7 @@ await Site.update({
|
|
|
544
546
|
'calculate_file_checksums_sha256': false,
|
|
545
547
|
'legacy_checksums_mode': false,
|
|
546
548
|
'migrate_remote_server_sync_to_sync': false,
|
|
549
|
+
'as2_message_retention_days': 1,
|
|
547
550
|
'session_expiry': 1.0,
|
|
548
551
|
'ssl_required': false,
|
|
549
552
|
'sftp_insecure_ciphers': false,
|
|
@@ -705,6 +708,7 @@ await Site.update({
|
|
|
705
708
|
* `calculate_file_checksums_sha256` (boolean): Calculate SHA256 checksums for files?
|
|
706
709
|
* `legacy_checksums_mode` (boolean): Use legacy checksums mode?
|
|
707
710
|
* `migrate_remote_server_sync_to_sync` (boolean): If true, we will migrate all remote server syncs to the new Sync model.
|
|
711
|
+
* `as2_message_retention_days` (int64): Number of days to retain AS2 messages (incoming and outgoing).
|
|
708
712
|
* `session_expiry` (double): Session expiry in hours
|
|
709
713
|
* `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
|
|
710
714
|
* `sftp_insecure_ciphers` (boolean): If true, we will allow weak and known insecure ciphers to be used for SFTP connections. Enabling this setting severely weakens the security of your site and it is not recommend, except as a last resort for compatibility.
|
package/docs/models/Sync.md
CHANGED
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"runtime": 1.0,
|
|
60
60
|
"log_url": "https://www.example.com/log_file.txt",
|
|
61
61
|
"completed_at": "2000-01-01T01:00:00Z",
|
|
62
|
-
"notified": true,
|
|
63
62
|
"dry_run": true,
|
|
64
63
|
"bytes_synced": 1,
|
|
65
64
|
"estimated_bytes_count": 1,
|
|
@@ -313,7 +312,6 @@ await sync.update({
|
|
|
313
312
|
"runtime": 1.0,
|
|
314
313
|
"log_url": "https://www.example.com/log_file.txt",
|
|
315
314
|
"completed_at": "2000-01-01T01:00:00Z",
|
|
316
|
-
"notified": true,
|
|
317
315
|
"dry_run": true,
|
|
318
316
|
"bytes_synced": 1,
|
|
319
317
|
"estimated_bytes_count": 1,
|
package/docs/models/SyncRun.md
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"runtime": 1.0,
|
|
22
22
|
"log_url": "https://www.example.com/log_file.txt",
|
|
23
23
|
"completed_at": "2000-01-01T01:00:00Z",
|
|
24
|
-
"notified": true,
|
|
25
24
|
"dry_run": true,
|
|
26
25
|
"bytes_synced": 1,
|
|
27
26
|
"estimated_bytes_count": 1,
|
|
@@ -45,7 +44,6 @@
|
|
|
45
44
|
* `runtime` (double): Total runtime in seconds
|
|
46
45
|
* `log_url` (string): Link to external log file.
|
|
47
46
|
* `completed_at` (date-time): When this run was completed
|
|
48
|
-
* `notified` (boolean): Whether notifications were sent for this run
|
|
49
47
|
* `dry_run` (boolean): Whether this run was a dry run (no actual changes made)
|
|
50
48
|
* `bytes_synced` (int64): Total bytes synced in this run
|
|
51
49
|
* `estimated_bytes_count` (int64): Estimated bytes count for this run
|
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.313';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
package/lib/models/Site.js
CHANGED
|
@@ -96,6 +96,10 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
|
96
96
|
(0, _defineProperty2.default)(this, "getAlwaysMkdirParents", function () {
|
|
97
97
|
return _this.attributes.always_mkdir_parents;
|
|
98
98
|
});
|
|
99
|
+
// int64 # Number of days to retain AS2 messages (incoming and outgoing).
|
|
100
|
+
(0, _defineProperty2.default)(this, "getAs2MessageRetentionDays", function () {
|
|
101
|
+
return _this.attributes.as2_message_retention_days;
|
|
102
|
+
});
|
|
99
103
|
// boolean # If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
|
|
100
104
|
(0, _defineProperty2.default)(this, "getAskAboutOverwrites", function () {
|
|
101
105
|
return _this.attributes.ask_about_overwrites;
|
|
@@ -818,6 +822,7 @@ _Site = Site;
|
|
|
818
822
|
// calculate_file_checksums_sha256 - boolean - Calculate SHA256 checksums for files?
|
|
819
823
|
// legacy_checksums_mode - boolean - Use legacy checksums mode?
|
|
820
824
|
// migrate_remote_server_sync_to_sync - boolean - If true, we will migrate all remote server syncs to the new Sync model.
|
|
825
|
+
// as2_message_retention_days - int64 - Number of days to retain AS2 messages (incoming and outgoing).
|
|
821
826
|
// session_expiry - double - Session expiry in hours
|
|
822
827
|
// ssl_required - boolean - Is SSL required? Disabling this is insecure.
|
|
823
828
|
// sftp_insecure_ciphers - boolean - If true, we will allow weak and known insecure ciphers to be used for SFTP connections. Enabling this setting severely weakens the security of your site and it is not recommend, except as a last resort for compatibility.
|
|
@@ -1058,318 +1063,324 @@ _Site = Site;
|
|
|
1058
1063
|
}
|
|
1059
1064
|
throw new errors.InvalidParameterError("Bad parameter: additional_text_file_types must be of type Array, received ".concat((0, _utils.getType)(params.additional_text_file_types)));
|
|
1060
1065
|
case 18:
|
|
1061
|
-
if (!(params.
|
|
1066
|
+
if (!(params.as2_message_retention_days && !(0, _utils.isInt)(params.as2_message_retention_days))) {
|
|
1062
1067
|
_context3.next = 19;
|
|
1063
1068
|
break;
|
|
1064
1069
|
}
|
|
1065
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1070
|
+
throw new errors.InvalidParameterError("Bad parameter: as2_message_retention_days must be of type Int, received ".concat((0, _utils.getType)(params.as2_message_retention_days)));
|
|
1066
1071
|
case 19:
|
|
1067
|
-
if (!(params.
|
|
1072
|
+
if (!(params.user_lockout_tries && !(0, _utils.isInt)(params.user_lockout_tries))) {
|
|
1068
1073
|
_context3.next = 20;
|
|
1069
1074
|
break;
|
|
1070
1075
|
}
|
|
1071
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1076
|
+
throw new errors.InvalidParameterError("Bad parameter: user_lockout_tries must be of type Int, received ".concat((0, _utils.getType)(params.user_lockout_tries)));
|
|
1072
1077
|
case 20:
|
|
1073
|
-
if (!(params.
|
|
1078
|
+
if (!(params.user_lockout_within && !(0, _utils.isInt)(params.user_lockout_within))) {
|
|
1074
1079
|
_context3.next = 21;
|
|
1075
1080
|
break;
|
|
1076
1081
|
}
|
|
1077
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1082
|
+
throw new errors.InvalidParameterError("Bad parameter: user_lockout_within must be of type Int, received ".concat((0, _utils.getType)(params.user_lockout_within)));
|
|
1078
1083
|
case 21:
|
|
1079
|
-
if (!(params.
|
|
1084
|
+
if (!(params.user_lockout_lock_period && !(0, _utils.isInt)(params.user_lockout_lock_period))) {
|
|
1080
1085
|
_context3.next = 22;
|
|
1081
1086
|
break;
|
|
1082
1087
|
}
|
|
1083
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1088
|
+
throw new errors.InvalidParameterError("Bad parameter: user_lockout_lock_period must be of type Int, received ".concat((0, _utils.getType)(params.user_lockout_lock_period)));
|
|
1084
1089
|
case 22:
|
|
1085
|
-
if (!(params.
|
|
1090
|
+
if (!(params.allowed_countries && !(0, _utils.isString)(params.allowed_countries))) {
|
|
1086
1091
|
_context3.next = 23;
|
|
1087
1092
|
break;
|
|
1088
1093
|
}
|
|
1089
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1094
|
+
throw new errors.InvalidParameterError("Bad parameter: allowed_countries must be of type String, received ".concat((0, _utils.getType)(params.allowed_countries)));
|
|
1090
1095
|
case 23:
|
|
1091
|
-
if (!(params.
|
|
1096
|
+
if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
|
|
1092
1097
|
_context3.next = 24;
|
|
1093
1098
|
break;
|
|
1094
1099
|
}
|
|
1095
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1100
|
+
throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
|
|
1096
1101
|
case 24:
|
|
1097
|
-
if (!(params.
|
|
1102
|
+
if (!(params.disallowed_countries && !(0, _utils.isString)(params.disallowed_countries))) {
|
|
1098
1103
|
_context3.next = 25;
|
|
1099
1104
|
break;
|
|
1100
1105
|
}
|
|
1101
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1106
|
+
throw new errors.InvalidParameterError("Bad parameter: disallowed_countries must be of type String, received ".concat((0, _utils.getType)(params.disallowed_countries)));
|
|
1102
1107
|
case 25:
|
|
1103
|
-
if (!(params.
|
|
1108
|
+
if (!(params.days_to_retain_backups && !(0, _utils.isInt)(params.days_to_retain_backups))) {
|
|
1104
1109
|
_context3.next = 26;
|
|
1105
1110
|
break;
|
|
1106
1111
|
}
|
|
1107
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1112
|
+
throw new errors.InvalidParameterError("Bad parameter: days_to_retain_backups must be of type Int, received ".concat((0, _utils.getType)(params.days_to_retain_backups)));
|
|
1108
1113
|
case 26:
|
|
1109
|
-
if (!(params.
|
|
1114
|
+
if (!(params.max_prior_passwords && !(0, _utils.isInt)(params.max_prior_passwords))) {
|
|
1110
1115
|
_context3.next = 27;
|
|
1111
1116
|
break;
|
|
1112
1117
|
}
|
|
1113
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1118
|
+
throw new errors.InvalidParameterError("Bad parameter: max_prior_passwords must be of type Int, received ".concat((0, _utils.getType)(params.max_prior_passwords)));
|
|
1114
1119
|
case 27:
|
|
1115
|
-
if (!(params.
|
|
1120
|
+
if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
|
|
1116
1121
|
_context3.next = 28;
|
|
1117
1122
|
break;
|
|
1118
1123
|
}
|
|
1119
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1124
|
+
throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
|
|
1120
1125
|
case 28:
|
|
1121
|
-
if (!(params.
|
|
1126
|
+
if (!(params.password_min_length && !(0, _utils.isInt)(params.password_min_length))) {
|
|
1122
1127
|
_context3.next = 29;
|
|
1123
1128
|
break;
|
|
1124
1129
|
}
|
|
1125
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1130
|
+
throw new errors.InvalidParameterError("Bad parameter: password_min_length must be of type Int, received ".concat((0, _utils.getType)(params.password_min_length)));
|
|
1126
1131
|
case 29:
|
|
1127
|
-
if (!(params.
|
|
1132
|
+
if (!(params.bundle_not_found_message && !(0, _utils.isString)(params.bundle_not_found_message))) {
|
|
1128
1133
|
_context3.next = 30;
|
|
1129
1134
|
break;
|
|
1130
1135
|
}
|
|
1131
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1136
|
+
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)));
|
|
1132
1137
|
case 30:
|
|
1133
|
-
if (!(params.
|
|
1138
|
+
if (!(params.bundle_registration_notifications && !(0, _utils.isString)(params.bundle_registration_notifications))) {
|
|
1134
1139
|
_context3.next = 31;
|
|
1135
1140
|
break;
|
|
1136
1141
|
}
|
|
1137
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1142
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_registration_notifications must be of type String, received ".concat((0, _utils.getType)(params.bundle_registration_notifications)));
|
|
1138
1143
|
case 31:
|
|
1139
|
-
if (!(params.
|
|
1144
|
+
if (!(params.bundle_activity_notifications && !(0, _utils.isString)(params.bundle_activity_notifications))) {
|
|
1140
1145
|
_context3.next = 32;
|
|
1141
1146
|
break;
|
|
1142
1147
|
}
|
|
1143
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1148
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_activity_notifications must be of type String, received ".concat((0, _utils.getType)(params.bundle_activity_notifications)));
|
|
1144
1149
|
case 32:
|
|
1145
|
-
if (!(params.
|
|
1150
|
+
if (!(params.bundle_upload_receipt_notifications && !(0, _utils.isString)(params.bundle_upload_receipt_notifications))) {
|
|
1146
1151
|
_context3.next = 33;
|
|
1147
1152
|
break;
|
|
1148
1153
|
}
|
|
1149
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1154
|
+
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)));
|
|
1150
1155
|
case 33:
|
|
1151
|
-
if (!(params.
|
|
1156
|
+
if (!(params.sftp_host_key_type && !(0, _utils.isString)(params.sftp_host_key_type))) {
|
|
1152
1157
|
_context3.next = 34;
|
|
1153
1158
|
break;
|
|
1154
1159
|
}
|
|
1155
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1160
|
+
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)));
|
|
1156
1161
|
case 34:
|
|
1157
|
-
if (!(params.
|
|
1162
|
+
if (!(params.active_sftp_host_key_id && !(0, _utils.isInt)(params.active_sftp_host_key_id))) {
|
|
1158
1163
|
_context3.next = 35;
|
|
1159
1164
|
break;
|
|
1160
1165
|
}
|
|
1161
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1166
|
+
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)));
|
|
1162
1167
|
case 35:
|
|
1163
|
-
if (!(params.
|
|
1168
|
+
if (!(params.bundle_recipient_blacklist_domains && !(0, _utils.isArray)(params.bundle_recipient_blacklist_domains))) {
|
|
1164
1169
|
_context3.next = 36;
|
|
1165
1170
|
break;
|
|
1166
1171
|
}
|
|
1167
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1172
|
+
throw new errors.InvalidParameterError("Bad parameter: bundle_recipient_blacklist_domains must be of type Array, received ".concat((0, _utils.getType)(params.bundle_recipient_blacklist_domains)));
|
|
1168
1173
|
case 36:
|
|
1169
|
-
if (!(params.
|
|
1174
|
+
if (!(params.require_2fa_user_type && !(0, _utils.isString)(params.require_2fa_user_type))) {
|
|
1170
1175
|
_context3.next = 37;
|
|
1171
1176
|
break;
|
|
1172
1177
|
}
|
|
1173
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1178
|
+
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)));
|
|
1174
1179
|
case 37:
|
|
1175
|
-
if (!(params.
|
|
1180
|
+
if (!(params.color2_top && !(0, _utils.isString)(params.color2_top))) {
|
|
1176
1181
|
_context3.next = 38;
|
|
1177
1182
|
break;
|
|
1178
1183
|
}
|
|
1179
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1184
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top must be of type String, received ".concat((0, _utils.getType)(params.color2_top)));
|
|
1180
1185
|
case 38:
|
|
1181
|
-
if (!(params.
|
|
1186
|
+
if (!(params.color2_left && !(0, _utils.isString)(params.color2_left))) {
|
|
1182
1187
|
_context3.next = 39;
|
|
1183
1188
|
break;
|
|
1184
1189
|
}
|
|
1185
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1190
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_left must be of type String, received ".concat((0, _utils.getType)(params.color2_left)));
|
|
1186
1191
|
case 39:
|
|
1187
|
-
if (!(params.
|
|
1192
|
+
if (!(params.color2_link && !(0, _utils.isString)(params.color2_link))) {
|
|
1188
1193
|
_context3.next = 40;
|
|
1189
1194
|
break;
|
|
1190
1195
|
}
|
|
1191
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1196
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_link must be of type String, received ".concat((0, _utils.getType)(params.color2_link)));
|
|
1192
1197
|
case 40:
|
|
1193
|
-
if (!(params.
|
|
1198
|
+
if (!(params.color2_text && !(0, _utils.isString)(params.color2_text))) {
|
|
1194
1199
|
_context3.next = 41;
|
|
1195
1200
|
break;
|
|
1196
1201
|
}
|
|
1197
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1202
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_text must be of type String, received ".concat((0, _utils.getType)(params.color2_text)));
|
|
1198
1203
|
case 41:
|
|
1199
|
-
if (!(params.
|
|
1204
|
+
if (!(params.color2_top_text && !(0, _utils.isString)(params.color2_top_text))) {
|
|
1200
1205
|
_context3.next = 42;
|
|
1201
1206
|
break;
|
|
1202
1207
|
}
|
|
1203
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1208
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top_text must be of type String, received ".concat((0, _utils.getType)(params.color2_top_text)));
|
|
1204
1209
|
case 42:
|
|
1205
|
-
if (!(params.
|
|
1210
|
+
if (!(params.site_header && !(0, _utils.isString)(params.site_header))) {
|
|
1206
1211
|
_context3.next = 43;
|
|
1207
1212
|
break;
|
|
1208
1213
|
}
|
|
1209
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1214
|
+
throw new errors.InvalidParameterError("Bad parameter: site_header must be of type String, received ".concat((0, _utils.getType)(params.site_header)));
|
|
1210
1215
|
case 43:
|
|
1211
|
-
if (!(params.
|
|
1216
|
+
if (!(params.site_footer && !(0, _utils.isString)(params.site_footer))) {
|
|
1212
1217
|
_context3.next = 44;
|
|
1213
1218
|
break;
|
|
1214
1219
|
}
|
|
1215
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1220
|
+
throw new errors.InvalidParameterError("Bad parameter: site_footer must be of type String, received ".concat((0, _utils.getType)(params.site_footer)));
|
|
1216
1221
|
case 44:
|
|
1217
|
-
if (!(params.
|
|
1222
|
+
if (!(params.site_public_header && !(0, _utils.isString)(params.site_public_header))) {
|
|
1218
1223
|
_context3.next = 45;
|
|
1219
1224
|
break;
|
|
1220
1225
|
}
|
|
1221
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1226
|
+
throw new errors.InvalidParameterError("Bad parameter: site_public_header must be of type String, received ".concat((0, _utils.getType)(params.site_public_header)));
|
|
1222
1227
|
case 45:
|
|
1223
|
-
if (!(params.
|
|
1228
|
+
if (!(params.site_public_footer && !(0, _utils.isString)(params.site_public_footer))) {
|
|
1224
1229
|
_context3.next = 46;
|
|
1225
1230
|
break;
|
|
1226
1231
|
}
|
|
1227
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1232
|
+
throw new errors.InvalidParameterError("Bad parameter: site_public_footer must be of type String, received ".concat((0, _utils.getType)(params.site_public_footer)));
|
|
1228
1233
|
case 46:
|
|
1229
|
-
if (!(params.
|
|
1234
|
+
if (!(params.login_help_text && !(0, _utils.isString)(params.login_help_text))) {
|
|
1230
1235
|
_context3.next = 47;
|
|
1231
1236
|
break;
|
|
1232
1237
|
}
|
|
1233
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1238
|
+
throw new errors.InvalidParameterError("Bad parameter: login_help_text must be of type String, received ".concat((0, _utils.getType)(params.login_help_text)));
|
|
1234
1239
|
case 47:
|
|
1235
|
-
if (!(params.
|
|
1240
|
+
if (!(params.smtp_address && !(0, _utils.isString)(params.smtp_address))) {
|
|
1236
1241
|
_context3.next = 48;
|
|
1237
1242
|
break;
|
|
1238
1243
|
}
|
|
1239
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1244
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_address must be of type String, received ".concat((0, _utils.getType)(params.smtp_address)));
|
|
1240
1245
|
case 48:
|
|
1241
|
-
if (!(params.
|
|
1246
|
+
if (!(params.smtp_authentication && !(0, _utils.isString)(params.smtp_authentication))) {
|
|
1242
1247
|
_context3.next = 49;
|
|
1243
1248
|
break;
|
|
1244
1249
|
}
|
|
1245
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1250
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_authentication must be of type String, received ".concat((0, _utils.getType)(params.smtp_authentication)));
|
|
1246
1251
|
case 49:
|
|
1247
|
-
if (!(params.
|
|
1252
|
+
if (!(params.smtp_from && !(0, _utils.isString)(params.smtp_from))) {
|
|
1248
1253
|
_context3.next = 50;
|
|
1249
1254
|
break;
|
|
1250
1255
|
}
|
|
1251
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1256
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_from must be of type String, received ".concat((0, _utils.getType)(params.smtp_from)));
|
|
1252
1257
|
case 50:
|
|
1253
|
-
if (!(params.
|
|
1258
|
+
if (!(params.smtp_username && !(0, _utils.isString)(params.smtp_username))) {
|
|
1254
1259
|
_context3.next = 51;
|
|
1255
1260
|
break;
|
|
1256
1261
|
}
|
|
1257
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1262
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_username must be of type String, received ".concat((0, _utils.getType)(params.smtp_username)));
|
|
1258
1263
|
case 51:
|
|
1259
|
-
if (!(params.
|
|
1264
|
+
if (!(params.smtp_port && !(0, _utils.isInt)(params.smtp_port))) {
|
|
1260
1265
|
_context3.next = 52;
|
|
1261
1266
|
break;
|
|
1262
1267
|
}
|
|
1263
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1268
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_port must be of type Int, received ".concat((0, _utils.getType)(params.smtp_port)));
|
|
1264
1269
|
case 52:
|
|
1265
|
-
if (!(params.
|
|
1270
|
+
if (!(params.ldap_type && !(0, _utils.isString)(params.ldap_type))) {
|
|
1266
1271
|
_context3.next = 53;
|
|
1267
1272
|
break;
|
|
1268
1273
|
}
|
|
1269
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1274
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_type must be of type String, received ".concat((0, _utils.getType)(params.ldap_type)));
|
|
1270
1275
|
case 53:
|
|
1271
|
-
if (!(params.
|
|
1276
|
+
if (!(params.ldap_host && !(0, _utils.isString)(params.ldap_host))) {
|
|
1272
1277
|
_context3.next = 54;
|
|
1273
1278
|
break;
|
|
1274
1279
|
}
|
|
1275
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1280
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host must be of type String, received ".concat((0, _utils.getType)(params.ldap_host)));
|
|
1276
1281
|
case 54:
|
|
1277
|
-
if (!(params.
|
|
1282
|
+
if (!(params.ldap_host_2 && !(0, _utils.isString)(params.ldap_host_2))) {
|
|
1278
1283
|
_context3.next = 55;
|
|
1279
1284
|
break;
|
|
1280
1285
|
}
|
|
1281
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1286
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_2 must be of type String, received ".concat((0, _utils.getType)(params.ldap_host_2)));
|
|
1282
1287
|
case 55:
|
|
1283
|
-
if (!(params.
|
|
1288
|
+
if (!(params.ldap_host_3 && !(0, _utils.isString)(params.ldap_host_3))) {
|
|
1284
1289
|
_context3.next = 56;
|
|
1285
1290
|
break;
|
|
1286
1291
|
}
|
|
1287
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1292
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_3 must be of type String, received ".concat((0, _utils.getType)(params.ldap_host_3)));
|
|
1288
1293
|
case 56:
|
|
1289
|
-
if (!(params.
|
|
1294
|
+
if (!(params.ldap_port && !(0, _utils.isInt)(params.ldap_port))) {
|
|
1290
1295
|
_context3.next = 57;
|
|
1291
1296
|
break;
|
|
1292
1297
|
}
|
|
1293
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1298
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_port must be of type Int, received ".concat((0, _utils.getType)(params.ldap_port)));
|
|
1294
1299
|
case 57:
|
|
1295
|
-
if (!(params.
|
|
1300
|
+
if (!(params.ldap_username && !(0, _utils.isString)(params.ldap_username))) {
|
|
1296
1301
|
_context3.next = 58;
|
|
1297
1302
|
break;
|
|
1298
1303
|
}
|
|
1299
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1304
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username must be of type String, received ".concat((0, _utils.getType)(params.ldap_username)));
|
|
1300
1305
|
case 58:
|
|
1301
|
-
if (!(params.
|
|
1306
|
+
if (!(params.ldap_username_field && !(0, _utils.isString)(params.ldap_username_field))) {
|
|
1302
1307
|
_context3.next = 59;
|
|
1303
1308
|
break;
|
|
1304
1309
|
}
|
|
1305
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1310
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username_field must be of type String, received ".concat((0, _utils.getType)(params.ldap_username_field)));
|
|
1306
1311
|
case 59:
|
|
1307
|
-
if (!(params.
|
|
1312
|
+
if (!(params.ldap_domain && !(0, _utils.isString)(params.ldap_domain))) {
|
|
1308
1313
|
_context3.next = 60;
|
|
1309
1314
|
break;
|
|
1310
1315
|
}
|
|
1311
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1316
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_domain must be of type String, received ".concat((0, _utils.getType)(params.ldap_domain)));
|
|
1312
1317
|
case 60:
|
|
1313
|
-
if (!(params.
|
|
1318
|
+
if (!(params.ldap_user_action && !(0, _utils.isString)(params.ldap_user_action))) {
|
|
1314
1319
|
_context3.next = 61;
|
|
1315
1320
|
break;
|
|
1316
1321
|
}
|
|
1317
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1322
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_user_action must be of type String, received ".concat((0, _utils.getType)(params.ldap_user_action)));
|
|
1318
1323
|
case 61:
|
|
1319
|
-
if (!(params.
|
|
1324
|
+
if (!(params.ldap_group_action && !(0, _utils.isString)(params.ldap_group_action))) {
|
|
1320
1325
|
_context3.next = 62;
|
|
1321
1326
|
break;
|
|
1322
1327
|
}
|
|
1323
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1328
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_action must be of type String, received ".concat((0, _utils.getType)(params.ldap_group_action)));
|
|
1324
1329
|
case 62:
|
|
1325
|
-
if (!(params.
|
|
1330
|
+
if (!(params.ldap_user_include_groups && !(0, _utils.isString)(params.ldap_user_include_groups))) {
|
|
1326
1331
|
_context3.next = 63;
|
|
1327
1332
|
break;
|
|
1328
1333
|
}
|
|
1329
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1334
|
+
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)));
|
|
1330
1335
|
case 63:
|
|
1331
|
-
if (!(params.
|
|
1336
|
+
if (!(params.ldap_group_exclusion && !(0, _utils.isString)(params.ldap_group_exclusion))) {
|
|
1332
1337
|
_context3.next = 64;
|
|
1333
1338
|
break;
|
|
1334
1339
|
}
|
|
1335
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1340
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_exclusion must be of type String, received ".concat((0, _utils.getType)(params.ldap_group_exclusion)));
|
|
1336
1341
|
case 64:
|
|
1337
|
-
if (!(params.
|
|
1342
|
+
if (!(params.ldap_group_inclusion && !(0, _utils.isString)(params.ldap_group_inclusion))) {
|
|
1338
1343
|
_context3.next = 65;
|
|
1339
1344
|
break;
|
|
1340
1345
|
}
|
|
1341
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1346
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_inclusion must be of type String, received ".concat((0, _utils.getType)(params.ldap_group_inclusion)));
|
|
1342
1347
|
case 65:
|
|
1343
|
-
if (!(params.
|
|
1348
|
+
if (!(params.ldap_base_dn && !(0, _utils.isString)(params.ldap_base_dn))) {
|
|
1344
1349
|
_context3.next = 66;
|
|
1345
1350
|
break;
|
|
1346
1351
|
}
|
|
1347
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1352
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_base_dn must be of type String, received ".concat((0, _utils.getType)(params.ldap_base_dn)));
|
|
1348
1353
|
case 66:
|
|
1349
|
-
if (!(params.
|
|
1354
|
+
if (!(params.ldap_password_change && !(0, _utils.isString)(params.ldap_password_change))) {
|
|
1350
1355
|
_context3.next = 67;
|
|
1351
1356
|
break;
|
|
1352
1357
|
}
|
|
1353
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1358
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_password_change must be of type String, received ".concat((0, _utils.getType)(params.ldap_password_change)));
|
|
1354
1359
|
case 67:
|
|
1355
|
-
if (!(params.
|
|
1360
|
+
if (!(params.ldap_password_change_confirmation && !(0, _utils.isString)(params.ldap_password_change_confirmation))) {
|
|
1356
1361
|
_context3.next = 68;
|
|
1357
1362
|
break;
|
|
1358
1363
|
}
|
|
1359
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1364
|
+
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)));
|
|
1360
1365
|
case 68:
|
|
1361
|
-
if (!(params.
|
|
1366
|
+
if (!(params.smtp_password && !(0, _utils.isString)(params.smtp_password))) {
|
|
1362
1367
|
_context3.next = 69;
|
|
1363
1368
|
break;
|
|
1364
1369
|
}
|
|
1365
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
1370
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_password must be of type String, received ".concat((0, _utils.getType)(params.smtp_password)));
|
|
1366
1371
|
case 69:
|
|
1367
|
-
|
|
1368
|
-
|
|
1372
|
+
if (!(params.session_expiry_minutes && !(0, _utils.isInt)(params.session_expiry_minutes))) {
|
|
1373
|
+
_context3.next = 70;
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
throw new errors.InvalidParameterError("Bad parameter: session_expiry_minutes must be of type Int, received ".concat((0, _utils.getType)(params.session_expiry_minutes)));
|
|
1369
1377
|
case 70:
|
|
1378
|
+
_context3.next = 71;
|
|
1379
|
+
return _Api.default.sendRequest('/site', 'PATCH', params, options);
|
|
1380
|
+
case 71:
|
|
1370
1381
|
response = _context3.sent;
|
|
1371
1382
|
return _context3.abrupt("return", new _Site(response === null || response === void 0 ? void 0 : response.data, options));
|
|
1372
|
-
case
|
|
1383
|
+
case 72:
|
|
1373
1384
|
case "end":
|
|
1374
1385
|
return _context3.stop();
|
|
1375
1386
|
}
|
package/lib/models/SyncRun.js
CHANGED
|
@@ -92,10 +92,6 @@ var SyncRun = /*#__PURE__*/(0, _createClass2.default)(function SyncRun() {
|
|
|
92
92
|
(0, _defineProperty2.default)(this, "getCompletedAt", function () {
|
|
93
93
|
return _this.attributes.completed_at;
|
|
94
94
|
});
|
|
95
|
-
// boolean # Whether notifications were sent for this run
|
|
96
|
-
(0, _defineProperty2.default)(this, "getNotified", function () {
|
|
97
|
-
return _this.attributes.notified;
|
|
98
|
-
});
|
|
99
95
|
// boolean # Whether this run was a dry run (no actual changes made)
|
|
100
96
|
(0, _defineProperty2.default)(this, "getDryRun", function () {
|
|
101
97
|
return _this.attributes.dry_run;
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Site.js
CHANGED
|
@@ -76,6 +76,9 @@ class Site {
|
|
|
76
76
|
// boolean # Create parent directories if they do not exist during uploads? This is primarily used to work around broken upload clients that assume servers will perform this step.
|
|
77
77
|
getAlwaysMkdirParents = () => this.attributes.always_mkdir_parents
|
|
78
78
|
|
|
79
|
+
// int64 # Number of days to retain AS2 messages (incoming and outgoing).
|
|
80
|
+
getAs2MessageRetentionDays = () => this.attributes.as2_message_retention_days
|
|
81
|
+
|
|
79
82
|
// boolean # If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
|
|
80
83
|
getAskAboutOverwrites = () => this.attributes.ask_about_overwrites
|
|
81
84
|
|
|
@@ -601,6 +604,7 @@ class Site {
|
|
|
601
604
|
// calculate_file_checksums_sha256 - boolean - Calculate SHA256 checksums for files?
|
|
602
605
|
// legacy_checksums_mode - boolean - Use legacy checksums mode?
|
|
603
606
|
// migrate_remote_server_sync_to_sync - boolean - If true, we will migrate all remote server syncs to the new Sync model.
|
|
607
|
+
// as2_message_retention_days - int64 - Number of days to retain AS2 messages (incoming and outgoing).
|
|
604
608
|
// session_expiry - double - Session expiry in hours
|
|
605
609
|
// ssl_required - boolean - Is SSL required? Disabling this is insecure.
|
|
606
610
|
// sftp_insecure_ciphers - boolean - If true, we will allow weak and known insecure ciphers to be used for SFTP connections. Enabling this setting severely weakens the security of your site and it is not recommend, except as a last resort for compatibility.
|
|
@@ -796,6 +800,10 @@ class Site {
|
|
|
796
800
|
throw new errors.InvalidParameterError(`Bad parameter: additional_text_file_types must be of type Array, received ${getType(params.additional_text_file_types)}`)
|
|
797
801
|
}
|
|
798
802
|
|
|
803
|
+
if (params.as2_message_retention_days && !isInt(params.as2_message_retention_days)) {
|
|
804
|
+
throw new errors.InvalidParameterError(`Bad parameter: as2_message_retention_days must be of type Int, received ${getType(params.as2_message_retention_days)}`)
|
|
805
|
+
}
|
|
806
|
+
|
|
799
807
|
if (params.user_lockout_tries && !isInt(params.user_lockout_tries)) {
|
|
800
808
|
throw new errors.InvalidParameterError(`Bad parameter: user_lockout_tries must be of type Int, received ${getType(params.user_lockout_tries)}`)
|
|
801
809
|
}
|
package/src/models/SyncRun.js
CHANGED
|
@@ -73,9 +73,6 @@ class SyncRun {
|
|
|
73
73
|
// date-time # When this run was completed
|
|
74
74
|
getCompletedAt = () => this.attributes.completed_at
|
|
75
75
|
|
|
76
|
-
// boolean # Whether notifications were sent for this run
|
|
77
|
-
getNotified = () => this.attributes.notified
|
|
78
|
-
|
|
79
76
|
// boolean # Whether this run was a dry run (no actual changes made)
|
|
80
77
|
getDryRun = () => this.attributes.dry_run
|
|
81
78
|
|