files.com 1.0.217 → 1.0.218
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 +11 -0
- package/lib/models/Site.js +104 -87
- package/package.json +1 -1
- package/src/models/Site.js +16 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.218
|
package/docs/models/Site.md
CHANGED
|
@@ -96,6 +96,9 @@
|
|
|
96
96
|
"uri": "https://mysite.files.com/.../my_image.png"
|
|
97
97
|
},
|
|
98
98
|
"max_prior_passwords": 1,
|
|
99
|
+
"motd_text": "",
|
|
100
|
+
"motd_use_for_ftp": true,
|
|
101
|
+
"motd_use_for_sftp": true,
|
|
99
102
|
"next_billing_amount": 1.0,
|
|
100
103
|
"next_billing_date": "Apr 20",
|
|
101
104
|
"office_integration_available": true,
|
|
@@ -305,6 +308,9 @@
|
|
|
305
308
|
* `login_help_text` (string): Login help text
|
|
306
309
|
* `logo` (Image): Branded logo
|
|
307
310
|
* `max_prior_passwords` (int64): Number of prior passwords to disallow
|
|
311
|
+
* `motd_text` (string): A message to show users when they connect via FTP or SFTP.
|
|
312
|
+
* `motd_use_for_ftp` (boolean): Show message to users connecting via FTP
|
|
313
|
+
* `motd_use_for_sftp` (boolean): Show message to users connecting via SFTP
|
|
308
314
|
* `next_billing_amount` (double): Next billing amount
|
|
309
315
|
* `next_billing_date` (string): Next billing date
|
|
310
316
|
* `office_integration_available` (boolean): Allow users to use Office for the web?
|
|
@@ -414,6 +420,8 @@ await Site.update({
|
|
|
414
420
|
'welcome_screen': "user_controlled",
|
|
415
421
|
'office_integration_available': true,
|
|
416
422
|
'pin_all_remote_servers_to_site_region': true,
|
|
423
|
+
'motd_use_for_ftp': true,
|
|
424
|
+
'motd_use_for_sftp': true,
|
|
417
425
|
'session_expiry': 1.0,
|
|
418
426
|
'ssl_required': true,
|
|
419
427
|
'tls_disabled': true,
|
|
@@ -526,6 +534,9 @@ await Site.update({
|
|
|
526
534
|
* `welcome_screen` (string): Does the welcome screen appear?
|
|
527
535
|
* `office_integration_available` (boolean): Allow users to use Office for the web?
|
|
528
536
|
* `pin_all_remote_servers_to_site_region` (boolean): If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
|
|
537
|
+
* `motd_text` (string): A message to show users when they connect via FTP or SFTP.
|
|
538
|
+
* `motd_use_for_ftp` (boolean): Show message to users connecting via FTP
|
|
539
|
+
* `motd_use_for_sftp` (boolean): Show message to users connecting via SFTP
|
|
529
540
|
* `session_expiry` (double): Session expiry in hours
|
|
530
541
|
* `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
|
|
531
542
|
* `tls_disabled` (boolean): Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
|
package/lib/models/Site.js
CHANGED
|
@@ -271,6 +271,15 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
|
271
271
|
(0, _defineProperty2.default)(this, "getMaxPriorPasswords", function () {
|
|
272
272
|
return _this.attributes.max_prior_passwords;
|
|
273
273
|
});
|
|
274
|
+
(0, _defineProperty2.default)(this, "getMotdText", function () {
|
|
275
|
+
return _this.attributes.motd_text;
|
|
276
|
+
});
|
|
277
|
+
(0, _defineProperty2.default)(this, "getMotdUseForFtp", function () {
|
|
278
|
+
return _this.attributes.motd_use_for_ftp;
|
|
279
|
+
});
|
|
280
|
+
(0, _defineProperty2.default)(this, "getMotdUseForSftp", function () {
|
|
281
|
+
return _this.attributes.motd_use_for_sftp;
|
|
282
|
+
});
|
|
274
283
|
(0, _defineProperty2.default)(this, "getNextBillingAmount", function () {
|
|
275
284
|
return _this.attributes.next_billing_amount;
|
|
276
285
|
});
|
|
@@ -637,350 +646,358 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
|
637
646
|
throw new errors.InvalidParameterError("Bad parameter: welcome_screen must be of type String, received ".concat((0, _utils.getType)(params['welcome_screen'])));
|
|
638
647
|
|
|
639
648
|
case 32:
|
|
640
|
-
if (!(params['
|
|
649
|
+
if (!(params['motd_text'] && !(0, _utils.isString)(params['motd_text']))) {
|
|
641
650
|
_context3.next = 34;
|
|
642
651
|
break;
|
|
643
652
|
}
|
|
644
653
|
|
|
645
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
654
|
+
throw new errors.InvalidParameterError("Bad parameter: motd_text must be of type String, received ".concat((0, _utils.getType)(params['motd_text'])));
|
|
646
655
|
|
|
647
656
|
case 34:
|
|
648
|
-
if (!(params['
|
|
657
|
+
if (!(params['user_lockout_tries'] && !(0, _utils.isInt)(params['user_lockout_tries']))) {
|
|
649
658
|
_context3.next = 36;
|
|
650
659
|
break;
|
|
651
660
|
}
|
|
652
661
|
|
|
653
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
662
|
+
throw new errors.InvalidParameterError("Bad parameter: user_lockout_tries must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_tries'])));
|
|
654
663
|
|
|
655
664
|
case 36:
|
|
656
|
-
if (!(params['
|
|
665
|
+
if (!(params['user_lockout_within'] && !(0, _utils.isInt)(params['user_lockout_within']))) {
|
|
657
666
|
_context3.next = 38;
|
|
658
667
|
break;
|
|
659
668
|
}
|
|
660
669
|
|
|
661
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
670
|
+
throw new errors.InvalidParameterError("Bad parameter: user_lockout_within must be of type Int, received ".concat((0, _utils.getType)(params['user_lockout_within'])));
|
|
662
671
|
|
|
663
672
|
case 38:
|
|
664
|
-
if (!(params['
|
|
673
|
+
if (!(params['user_lockout_lock_period'] && !(0, _utils.isInt)(params['user_lockout_lock_period']))) {
|
|
665
674
|
_context3.next = 40;
|
|
666
675
|
break;
|
|
667
676
|
}
|
|
668
677
|
|
|
669
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
678
|
+
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'])));
|
|
670
679
|
|
|
671
680
|
case 40:
|
|
672
|
-
if (!(params['
|
|
681
|
+
if (!(params['allowed_countries'] && !(0, _utils.isString)(params['allowed_countries']))) {
|
|
673
682
|
_context3.next = 42;
|
|
674
683
|
break;
|
|
675
684
|
}
|
|
676
685
|
|
|
677
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
686
|
+
throw new errors.InvalidParameterError("Bad parameter: allowed_countries must be of type String, received ".concat((0, _utils.getType)(params['allowed_countries'])));
|
|
678
687
|
|
|
679
688
|
case 42:
|
|
680
|
-
if (!(params['
|
|
689
|
+
if (!(params['allowed_ips'] && !(0, _utils.isString)(params['allowed_ips']))) {
|
|
681
690
|
_context3.next = 44;
|
|
682
691
|
break;
|
|
683
692
|
}
|
|
684
693
|
|
|
685
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
694
|
+
throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params['allowed_ips'])));
|
|
686
695
|
|
|
687
696
|
case 44:
|
|
688
|
-
if (!(params['
|
|
697
|
+
if (!(params['disallowed_countries'] && !(0, _utils.isString)(params['disallowed_countries']))) {
|
|
689
698
|
_context3.next = 46;
|
|
690
699
|
break;
|
|
691
700
|
}
|
|
692
701
|
|
|
693
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
702
|
+
throw new errors.InvalidParameterError("Bad parameter: disallowed_countries must be of type String, received ".concat((0, _utils.getType)(params['disallowed_countries'])));
|
|
694
703
|
|
|
695
704
|
case 46:
|
|
696
|
-
if (!(params['
|
|
705
|
+
if (!(params['days_to_retain_backups'] && !(0, _utils.isInt)(params['days_to_retain_backups']))) {
|
|
697
706
|
_context3.next = 48;
|
|
698
707
|
break;
|
|
699
708
|
}
|
|
700
709
|
|
|
701
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
710
|
+
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'])));
|
|
702
711
|
|
|
703
712
|
case 48:
|
|
704
|
-
if (!(params['
|
|
713
|
+
if (!(params['max_prior_passwords'] && !(0, _utils.isInt)(params['max_prior_passwords']))) {
|
|
705
714
|
_context3.next = 50;
|
|
706
715
|
break;
|
|
707
716
|
}
|
|
708
717
|
|
|
709
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
718
|
+
throw new errors.InvalidParameterError("Bad parameter: max_prior_passwords must be of type Int, received ".concat((0, _utils.getType)(params['max_prior_passwords'])));
|
|
710
719
|
|
|
711
720
|
case 50:
|
|
712
|
-
if (!(params['
|
|
721
|
+
if (!(params['password_validity_days'] && !(0, _utils.isInt)(params['password_validity_days']))) {
|
|
713
722
|
_context3.next = 52;
|
|
714
723
|
break;
|
|
715
724
|
}
|
|
716
725
|
|
|
717
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
726
|
+
throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params['password_validity_days'])));
|
|
718
727
|
|
|
719
728
|
case 52:
|
|
720
|
-
if (!(params['
|
|
729
|
+
if (!(params['password_min_length'] && !(0, _utils.isInt)(params['password_min_length']))) {
|
|
721
730
|
_context3.next = 54;
|
|
722
731
|
break;
|
|
723
732
|
}
|
|
724
733
|
|
|
725
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
734
|
+
throw new errors.InvalidParameterError("Bad parameter: password_min_length must be of type Int, received ".concat((0, _utils.getType)(params['password_min_length'])));
|
|
726
735
|
|
|
727
736
|
case 54:
|
|
728
|
-
if (!(params['
|
|
737
|
+
if (!(params['disable_users_from_inactivity_period_days'] && !(0, _utils.isInt)(params['disable_users_from_inactivity_period_days']))) {
|
|
729
738
|
_context3.next = 56;
|
|
730
739
|
break;
|
|
731
740
|
}
|
|
732
741
|
|
|
733
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
742
|
+
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'])));
|
|
734
743
|
|
|
735
744
|
case 56:
|
|
736
|
-
if (!(params['
|
|
745
|
+
if (!(params['require_2fa_user_type'] && !(0, _utils.isString)(params['require_2fa_user_type']))) {
|
|
737
746
|
_context3.next = 58;
|
|
738
747
|
break;
|
|
739
748
|
}
|
|
740
749
|
|
|
741
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
750
|
+
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'])));
|
|
742
751
|
|
|
743
752
|
case 58:
|
|
744
|
-
if (!(params['
|
|
753
|
+
if (!(params['color2_top'] && !(0, _utils.isString)(params['color2_top']))) {
|
|
745
754
|
_context3.next = 60;
|
|
746
755
|
break;
|
|
747
756
|
}
|
|
748
757
|
|
|
749
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
758
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top must be of type String, received ".concat((0, _utils.getType)(params['color2_top'])));
|
|
750
759
|
|
|
751
760
|
case 60:
|
|
752
|
-
if (!(params['
|
|
761
|
+
if (!(params['color2_left'] && !(0, _utils.isString)(params['color2_left']))) {
|
|
753
762
|
_context3.next = 62;
|
|
754
763
|
break;
|
|
755
764
|
}
|
|
756
765
|
|
|
757
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
766
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_left must be of type String, received ".concat((0, _utils.getType)(params['color2_left'])));
|
|
758
767
|
|
|
759
768
|
case 62:
|
|
760
|
-
if (!(params['
|
|
769
|
+
if (!(params['color2_link'] && !(0, _utils.isString)(params['color2_link']))) {
|
|
761
770
|
_context3.next = 64;
|
|
762
771
|
break;
|
|
763
772
|
}
|
|
764
773
|
|
|
765
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
774
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_link must be of type String, received ".concat((0, _utils.getType)(params['color2_link'])));
|
|
766
775
|
|
|
767
776
|
case 64:
|
|
768
|
-
if (!(params['
|
|
777
|
+
if (!(params['color2_text'] && !(0, _utils.isString)(params['color2_text']))) {
|
|
769
778
|
_context3.next = 66;
|
|
770
779
|
break;
|
|
771
780
|
}
|
|
772
781
|
|
|
773
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
782
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_text must be of type String, received ".concat((0, _utils.getType)(params['color2_text'])));
|
|
774
783
|
|
|
775
784
|
case 66:
|
|
776
|
-
if (!(params['
|
|
785
|
+
if (!(params['color2_top_text'] && !(0, _utils.isString)(params['color2_top_text']))) {
|
|
777
786
|
_context3.next = 68;
|
|
778
787
|
break;
|
|
779
788
|
}
|
|
780
789
|
|
|
781
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
790
|
+
throw new errors.InvalidParameterError("Bad parameter: color2_top_text must be of type String, received ".concat((0, _utils.getType)(params['color2_top_text'])));
|
|
782
791
|
|
|
783
792
|
case 68:
|
|
784
|
-
if (!(params['
|
|
793
|
+
if (!(params['site_header'] && !(0, _utils.isString)(params['site_header']))) {
|
|
785
794
|
_context3.next = 70;
|
|
786
795
|
break;
|
|
787
796
|
}
|
|
788
797
|
|
|
789
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
798
|
+
throw new errors.InvalidParameterError("Bad parameter: site_header must be of type String, received ".concat((0, _utils.getType)(params['site_header'])));
|
|
790
799
|
|
|
791
800
|
case 70:
|
|
792
|
-
if (!(params['
|
|
801
|
+
if (!(params['site_footer'] && !(0, _utils.isString)(params['site_footer']))) {
|
|
793
802
|
_context3.next = 72;
|
|
794
803
|
break;
|
|
795
804
|
}
|
|
796
805
|
|
|
797
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
806
|
+
throw new errors.InvalidParameterError("Bad parameter: site_footer must be of type String, received ".concat((0, _utils.getType)(params['site_footer'])));
|
|
798
807
|
|
|
799
808
|
case 72:
|
|
800
|
-
if (!(params['
|
|
809
|
+
if (!(params['login_help_text'] && !(0, _utils.isString)(params['login_help_text']))) {
|
|
801
810
|
_context3.next = 74;
|
|
802
811
|
break;
|
|
803
812
|
}
|
|
804
813
|
|
|
805
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
814
|
+
throw new errors.InvalidParameterError("Bad parameter: login_help_text must be of type String, received ".concat((0, _utils.getType)(params['login_help_text'])));
|
|
806
815
|
|
|
807
816
|
case 74:
|
|
808
|
-
if (!(params['
|
|
817
|
+
if (!(params['smtp_address'] && !(0, _utils.isString)(params['smtp_address']))) {
|
|
809
818
|
_context3.next = 76;
|
|
810
819
|
break;
|
|
811
820
|
}
|
|
812
821
|
|
|
813
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
822
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_address must be of type String, received ".concat((0, _utils.getType)(params['smtp_address'])));
|
|
814
823
|
|
|
815
824
|
case 76:
|
|
816
|
-
if (!(params['
|
|
825
|
+
if (!(params['smtp_authentication'] && !(0, _utils.isString)(params['smtp_authentication']))) {
|
|
817
826
|
_context3.next = 78;
|
|
818
827
|
break;
|
|
819
828
|
}
|
|
820
829
|
|
|
821
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
830
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_authentication must be of type String, received ".concat((0, _utils.getType)(params['smtp_authentication'])));
|
|
822
831
|
|
|
823
832
|
case 78:
|
|
824
|
-
if (!(params['
|
|
833
|
+
if (!(params['smtp_from'] && !(0, _utils.isString)(params['smtp_from']))) {
|
|
825
834
|
_context3.next = 80;
|
|
826
835
|
break;
|
|
827
836
|
}
|
|
828
837
|
|
|
829
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
838
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_from must be of type String, received ".concat((0, _utils.getType)(params['smtp_from'])));
|
|
830
839
|
|
|
831
840
|
case 80:
|
|
832
|
-
if (!(params['
|
|
841
|
+
if (!(params['smtp_username'] && !(0, _utils.isString)(params['smtp_username']))) {
|
|
833
842
|
_context3.next = 82;
|
|
834
843
|
break;
|
|
835
844
|
}
|
|
836
845
|
|
|
837
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
846
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_username must be of type String, received ".concat((0, _utils.getType)(params['smtp_username'])));
|
|
838
847
|
|
|
839
848
|
case 82:
|
|
840
|
-
if (!(params['
|
|
849
|
+
if (!(params['smtp_port'] && !(0, _utils.isInt)(params['smtp_port']))) {
|
|
841
850
|
_context3.next = 84;
|
|
842
851
|
break;
|
|
843
852
|
}
|
|
844
853
|
|
|
845
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
854
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_port must be of type Int, received ".concat((0, _utils.getType)(params['smtp_port'])));
|
|
846
855
|
|
|
847
856
|
case 84:
|
|
848
|
-
if (!(params['
|
|
857
|
+
if (!(params['ldap_type'] && !(0, _utils.isString)(params['ldap_type']))) {
|
|
849
858
|
_context3.next = 86;
|
|
850
859
|
break;
|
|
851
860
|
}
|
|
852
861
|
|
|
853
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
862
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_type must be of type String, received ".concat((0, _utils.getType)(params['ldap_type'])));
|
|
854
863
|
|
|
855
864
|
case 86:
|
|
856
|
-
if (!(params['
|
|
865
|
+
if (!(params['ldap_host'] && !(0, _utils.isString)(params['ldap_host']))) {
|
|
857
866
|
_context3.next = 88;
|
|
858
867
|
break;
|
|
859
868
|
}
|
|
860
869
|
|
|
861
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
870
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host must be of type String, received ".concat((0, _utils.getType)(params['ldap_host'])));
|
|
862
871
|
|
|
863
872
|
case 88:
|
|
864
|
-
if (!(params['
|
|
873
|
+
if (!(params['ldap_host_2'] && !(0, _utils.isString)(params['ldap_host_2']))) {
|
|
865
874
|
_context3.next = 90;
|
|
866
875
|
break;
|
|
867
876
|
}
|
|
868
877
|
|
|
869
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
878
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_2 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_2'])));
|
|
870
879
|
|
|
871
880
|
case 90:
|
|
872
|
-
if (!(params['
|
|
881
|
+
if (!(params['ldap_host_3'] && !(0, _utils.isString)(params['ldap_host_3']))) {
|
|
873
882
|
_context3.next = 92;
|
|
874
883
|
break;
|
|
875
884
|
}
|
|
876
885
|
|
|
877
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
886
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_host_3 must be of type String, received ".concat((0, _utils.getType)(params['ldap_host_3'])));
|
|
878
887
|
|
|
879
888
|
case 92:
|
|
880
|
-
if (!(params['
|
|
889
|
+
if (!(params['ldap_port'] && !(0, _utils.isInt)(params['ldap_port']))) {
|
|
881
890
|
_context3.next = 94;
|
|
882
891
|
break;
|
|
883
892
|
}
|
|
884
893
|
|
|
885
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
894
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_port must be of type Int, received ".concat((0, _utils.getType)(params['ldap_port'])));
|
|
886
895
|
|
|
887
896
|
case 94:
|
|
888
|
-
if (!(params['
|
|
897
|
+
if (!(params['ldap_username'] && !(0, _utils.isString)(params['ldap_username']))) {
|
|
889
898
|
_context3.next = 96;
|
|
890
899
|
break;
|
|
891
900
|
}
|
|
892
901
|
|
|
893
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
902
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username must be of type String, received ".concat((0, _utils.getType)(params['ldap_username'])));
|
|
894
903
|
|
|
895
904
|
case 96:
|
|
896
|
-
if (!(params['
|
|
905
|
+
if (!(params['ldap_username_field'] && !(0, _utils.isString)(params['ldap_username_field']))) {
|
|
897
906
|
_context3.next = 98;
|
|
898
907
|
break;
|
|
899
908
|
}
|
|
900
909
|
|
|
901
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
910
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_username_field must be of type String, received ".concat((0, _utils.getType)(params['ldap_username_field'])));
|
|
902
911
|
|
|
903
912
|
case 98:
|
|
904
|
-
if (!(params['
|
|
913
|
+
if (!(params['ldap_domain'] && !(0, _utils.isString)(params['ldap_domain']))) {
|
|
905
914
|
_context3.next = 100;
|
|
906
915
|
break;
|
|
907
916
|
}
|
|
908
917
|
|
|
909
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
918
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_domain must be of type String, received ".concat((0, _utils.getType)(params['ldap_domain'])));
|
|
910
919
|
|
|
911
920
|
case 100:
|
|
912
|
-
if (!(params['
|
|
921
|
+
if (!(params['ldap_user_action'] && !(0, _utils.isString)(params['ldap_user_action']))) {
|
|
913
922
|
_context3.next = 102;
|
|
914
923
|
break;
|
|
915
924
|
}
|
|
916
925
|
|
|
917
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
926
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_user_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_user_action'])));
|
|
918
927
|
|
|
919
928
|
case 102:
|
|
920
|
-
if (!(params['
|
|
929
|
+
if (!(params['ldap_group_action'] && !(0, _utils.isString)(params['ldap_group_action']))) {
|
|
921
930
|
_context3.next = 104;
|
|
922
931
|
break;
|
|
923
932
|
}
|
|
924
933
|
|
|
925
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
934
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_action must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_action'])));
|
|
926
935
|
|
|
927
936
|
case 104:
|
|
928
|
-
if (!(params['
|
|
937
|
+
if (!(params['ldap_user_include_groups'] && !(0, _utils.isString)(params['ldap_user_include_groups']))) {
|
|
929
938
|
_context3.next = 106;
|
|
930
939
|
break;
|
|
931
940
|
}
|
|
932
941
|
|
|
933
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
942
|
+
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'])));
|
|
934
943
|
|
|
935
944
|
case 106:
|
|
936
|
-
if (!(params['
|
|
945
|
+
if (!(params['ldap_group_exclusion'] && !(0, _utils.isString)(params['ldap_group_exclusion']))) {
|
|
937
946
|
_context3.next = 108;
|
|
938
947
|
break;
|
|
939
948
|
}
|
|
940
949
|
|
|
941
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
950
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_exclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_exclusion'])));
|
|
942
951
|
|
|
943
952
|
case 108:
|
|
944
|
-
if (!(params['
|
|
953
|
+
if (!(params['ldap_group_inclusion'] && !(0, _utils.isString)(params['ldap_group_inclusion']))) {
|
|
945
954
|
_context3.next = 110;
|
|
946
955
|
break;
|
|
947
956
|
}
|
|
948
957
|
|
|
949
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
958
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_group_inclusion must be of type String, received ".concat((0, _utils.getType)(params['ldap_group_inclusion'])));
|
|
950
959
|
|
|
951
960
|
case 110:
|
|
952
|
-
if (!(params['
|
|
961
|
+
if (!(params['ldap_base_dn'] && !(0, _utils.isString)(params['ldap_base_dn']))) {
|
|
953
962
|
_context3.next = 112;
|
|
954
963
|
break;
|
|
955
964
|
}
|
|
956
965
|
|
|
957
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
966
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_base_dn must be of type String, received ".concat((0, _utils.getType)(params['ldap_base_dn'])));
|
|
958
967
|
|
|
959
968
|
case 112:
|
|
960
|
-
if (!(params['
|
|
969
|
+
if (!(params['ldap_password_change'] && !(0, _utils.isString)(params['ldap_password_change']))) {
|
|
961
970
|
_context3.next = 114;
|
|
962
971
|
break;
|
|
963
972
|
}
|
|
964
973
|
|
|
965
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
974
|
+
throw new errors.InvalidParameterError("Bad parameter: ldap_password_change must be of type String, received ".concat((0, _utils.getType)(params['ldap_password_change'])));
|
|
966
975
|
|
|
967
976
|
case 114:
|
|
968
|
-
if (!(params['
|
|
977
|
+
if (!(params['ldap_password_change_confirmation'] && !(0, _utils.isString)(params['ldap_password_change_confirmation']))) {
|
|
969
978
|
_context3.next = 116;
|
|
970
979
|
break;
|
|
971
980
|
}
|
|
972
981
|
|
|
973
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
982
|
+
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'])));
|
|
974
983
|
|
|
975
984
|
case 116:
|
|
976
|
-
|
|
977
|
-
|
|
985
|
+
if (!(params['smtp_password'] && !(0, _utils.isString)(params['smtp_password']))) {
|
|
986
|
+
_context3.next = 118;
|
|
987
|
+
break;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
throw new errors.InvalidParameterError("Bad parameter: smtp_password must be of type String, received ".concat((0, _utils.getType)(params['smtp_password'])));
|
|
978
991
|
|
|
979
992
|
case 118:
|
|
993
|
+
_context3.next = 120;
|
|
994
|
+
return _Api.default.sendRequest("/site", 'PATCH', params, options);
|
|
995
|
+
|
|
996
|
+
case 120:
|
|
980
997
|
response = _context3.sent;
|
|
981
998
|
return _context3.abrupt("return", new Site(response === null || response === void 0 ? void 0 : response.data, options));
|
|
982
999
|
|
|
983
|
-
case
|
|
1000
|
+
case 122:
|
|
984
1001
|
case "end":
|
|
985
1002
|
return _context3.stop();
|
|
986
1003
|
}
|
package/package.json
CHANGED
package/src/models/Site.js
CHANGED
|
@@ -245,6 +245,15 @@ class Site {
|
|
|
245
245
|
// int64 # Number of prior passwords to disallow
|
|
246
246
|
getMaxPriorPasswords = () => this.attributes.max_prior_passwords
|
|
247
247
|
|
|
248
|
+
// string # A message to show users when they connect via FTP or SFTP.
|
|
249
|
+
getMotdText = () => this.attributes.motd_text
|
|
250
|
+
|
|
251
|
+
// boolean # Show message to users connecting via FTP
|
|
252
|
+
getMotdUseForFtp = () => this.attributes.motd_use_for_ftp
|
|
253
|
+
|
|
254
|
+
// boolean # Show message to users connecting via SFTP
|
|
255
|
+
getMotdUseForSftp = () => this.attributes.motd_use_for_sftp
|
|
256
|
+
|
|
248
257
|
// double # Next billing amount
|
|
249
258
|
getNextBillingAmount = () => this.attributes.next_billing_amount
|
|
250
259
|
|
|
@@ -462,6 +471,9 @@ class Site {
|
|
|
462
471
|
// welcome_screen - string - Does the welcome screen appear?
|
|
463
472
|
// office_integration_available - boolean - Allow users to use Office for the web?
|
|
464
473
|
// pin_all_remote_servers_to_site_region - boolean - If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
|
|
474
|
+
// motd_text - string - A message to show users when they connect via FTP or SFTP.
|
|
475
|
+
// motd_use_for_ftp - boolean - Show message to users connecting via FTP
|
|
476
|
+
// motd_use_for_sftp - boolean - Show message to users connecting via SFTP
|
|
465
477
|
// session_expiry - double - Session expiry in hours
|
|
466
478
|
// ssl_required - boolean - Is SSL required? Disabling this is insecure.
|
|
467
479
|
// tls_disabled - boolean - Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
|
|
@@ -617,6 +629,10 @@ class Site {
|
|
|
617
629
|
throw new errors.InvalidParameterError(`Bad parameter: welcome_screen must be of type String, received ${getType(params['welcome_screen'])}`)
|
|
618
630
|
}
|
|
619
631
|
|
|
632
|
+
if (params['motd_text'] && !isString(params['motd_text'])) {
|
|
633
|
+
throw new errors.InvalidParameterError(`Bad parameter: motd_text must be of type String, received ${getType(params['motd_text'])}`)
|
|
634
|
+
}
|
|
635
|
+
|
|
620
636
|
if (params['user_lockout_tries'] && !isInt(params['user_lockout_tries'])) {
|
|
621
637
|
throw new errors.InvalidParameterError(`Bad parameter: user_lockout_tries must be of type Int, received ${getType(params['user_lockout_tries'])}`)
|
|
622
638
|
}
|