files.com 1.2.249 → 1.2.251

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.
Files changed (90) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/User.md +4 -1
  3. package/lib/Api.js +72 -71
  4. package/lib/Files.js +1 -1
  5. package/lib/isomorphic/File.node.js +5 -5
  6. package/lib/models/ActionNotificationExport.js +38 -38
  7. package/lib/models/ActionNotificationExportResult.js +14 -14
  8. package/lib/models/ApiKey.js +100 -100
  9. package/lib/models/ApiRequestLog.js +8 -8
  10. package/lib/models/App.js +8 -8
  11. package/lib/models/As2IncomingMessage.js +10 -10
  12. package/lib/models/As2OutgoingMessage.js +10 -10
  13. package/lib/models/As2Partner.js +101 -101
  14. package/lib/models/As2Station.js +81 -81
  15. package/lib/models/Automation.js +167 -167
  16. package/lib/models/AutomationLog.js +8 -8
  17. package/lib/models/AutomationRun.js +24 -24
  18. package/lib/models/BandwidthSnapshot.js +8 -8
  19. package/lib/models/Behavior.js +106 -106
  20. package/lib/models/Bundle.js +143 -143
  21. package/lib/models/BundleAction.js +10 -10
  22. package/lib/models/BundleDownload.js +12 -12
  23. package/lib/models/BundleNotification.js +69 -69
  24. package/lib/models/BundleRecipient.js +40 -40
  25. package/lib/models/BundleRegistration.js +12 -12
  26. package/lib/models/Clickwrap.js +79 -79
  27. package/lib/models/DnsRecord.js +8 -8
  28. package/lib/models/EmailIncomingMessage.js +8 -8
  29. package/lib/models/EmailLog.js +8 -8
  30. package/lib/models/ExavaultApiRequestLog.js +8 -8
  31. package/lib/models/ExternalEvent.js +36 -36
  32. package/lib/models/File.js +269 -269
  33. package/lib/models/FileComment.js +70 -70
  34. package/lib/models/FileCommentReaction.js +34 -34
  35. package/lib/models/FileMigration.js +10 -10
  36. package/lib/models/FileMigrationLog.js +8 -8
  37. package/lib/models/Folder.js +36 -36
  38. package/lib/models/FormFieldSet.js +71 -71
  39. package/lib/models/FtpActionLog.js +8 -8
  40. package/lib/models/GpgKey.js +81 -81
  41. package/lib/models/Group.js +83 -83
  42. package/lib/models/GroupUser.js +89 -89
  43. package/lib/models/History.js +88 -88
  44. package/lib/models/HistoryExport.js +64 -64
  45. package/lib/models/HistoryExportResult.js +14 -14
  46. package/lib/models/InboxRecipient.js +36 -36
  47. package/lib/models/InboxRegistration.js +10 -10
  48. package/lib/models/InboxUpload.js +8 -8
  49. package/lib/models/Invoice.js +18 -18
  50. package/lib/models/IpAddress.js +32 -32
  51. package/lib/models/Lock.js +51 -51
  52. package/lib/models/Message.js +100 -100
  53. package/lib/models/MessageComment.js +78 -78
  54. package/lib/models/MessageCommentReaction.js +54 -54
  55. package/lib/models/MessageReaction.js +54 -54
  56. package/lib/models/Notification.js +91 -91
  57. package/lib/models/OutboundConnectionLog.js +8 -8
  58. package/lib/models/Payment.js +18 -18
  59. package/lib/models/Permission.js +54 -54
  60. package/lib/models/Priority.js +14 -14
  61. package/lib/models/Project.js +70 -70
  62. package/lib/models/PublicHostingRequestLog.js +8 -8
  63. package/lib/models/PublicKey.js +78 -78
  64. package/lib/models/RemoteBandwidthSnapshot.js +8 -8
  65. package/lib/models/RemoteServer.js +362 -362
  66. package/lib/models/Request.js +60 -60
  67. package/lib/models/Restore.js +24 -24
  68. package/lib/models/Session.js +21 -21
  69. package/lib/models/SettingsChange.js +8 -8
  70. package/lib/models/SftpActionLog.js +8 -8
  71. package/lib/models/SftpHostKey.js +67 -67
  72. package/lib/models/ShareGroup.js +79 -79
  73. package/lib/models/SiemHttpDestination.js +158 -158
  74. package/lib/models/Site.js +150 -150
  75. package/lib/models/Snapshot.js +85 -85
  76. package/lib/models/SsoStrategy.js +32 -32
  77. package/lib/models/Style.js +48 -48
  78. package/lib/models/SyncLog.js +8 -8
  79. package/lib/models/UsageDailySnapshot.js +8 -8
  80. package/lib/models/UsageSnapshot.js +8 -8
  81. package/lib/models/User.js +223 -215
  82. package/lib/models/UserCipherUse.js +10 -10
  83. package/lib/models/UserLifecycleRule.js +92 -92
  84. package/lib/models/UserRequest.js +56 -56
  85. package/lib/models/UserSftpClientUse.js +10 -10
  86. package/lib/models/WebDavActionLog.js +8 -8
  87. package/lib/models/WebhookTest.js +24 -24
  88. package/package.json +1 -1
  89. package/src/Files.js +1 -1
  90. package/src/models/User.js +6 -0
@@ -565,46 +565,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
565
565
  (0, _defineProperty2.default)(this, "unlock", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
566
566
  var params,
567
567
  _args = arguments;
568
- return _regenerator.default.wrap(function _callee$(_context) {
568
+ return _regenerator.default.wrap(function (_context) {
569
569
  while (1) switch (_context.prev = _context.next) {
570
570
  case 0:
571
571
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
572
572
  if (_this.attributes.id) {
573
- _context.next = 3;
573
+ _context.next = 1;
574
574
  break;
575
575
  }
576
576
  throw new errors.EmptyPropertyError('Current object has no id');
577
- case 3:
577
+ case 1:
578
578
  if ((0, _utils.isObject)(params)) {
579
- _context.next = 5;
579
+ _context.next = 2;
580
580
  break;
581
581
  }
582
582
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
583
- case 5:
583
+ case 2:
584
584
  params.id = _this.attributes.id;
585
585
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
586
- _context.next = 8;
586
+ _context.next = 3;
587
587
  break;
588
588
  }
589
589
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
590
- case 8:
590
+ case 3:
591
591
  if (params.id) {
592
- _context.next = 14;
592
+ _context.next = 5;
593
593
  break;
594
594
  }
595
595
  if (!_this.attributes.id) {
596
- _context.next = 13;
596
+ _context.next = 4;
597
597
  break;
598
598
  }
599
599
  params.id = _this.id;
600
- _context.next = 14;
600
+ _context.next = 5;
601
601
  break;
602
- case 13:
602
+ case 4:
603
603
  throw new errors.MissingParameterError('Parameter missing: id');
604
- case 14:
605
- _context.next = 16;
604
+ case 5:
605
+ _context.next = 6;
606
606
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id), "/unlock"), 'POST', params, _this.options);
607
- case 16:
607
+ case 6:
608
608
  case "end":
609
609
  return _context.stop();
610
610
  }
@@ -614,46 +614,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
614
614
  (0, _defineProperty2.default)(this, "resendWelcomeEmail", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
615
615
  var params,
616
616
  _args2 = arguments;
617
- return _regenerator.default.wrap(function _callee2$(_context2) {
617
+ return _regenerator.default.wrap(function (_context2) {
618
618
  while (1) switch (_context2.prev = _context2.next) {
619
619
  case 0:
620
620
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
621
621
  if (_this.attributes.id) {
622
- _context2.next = 3;
622
+ _context2.next = 1;
623
623
  break;
624
624
  }
625
625
  throw new errors.EmptyPropertyError('Current object has no id');
626
- case 3:
626
+ case 1:
627
627
  if ((0, _utils.isObject)(params)) {
628
- _context2.next = 5;
628
+ _context2.next = 2;
629
629
  break;
630
630
  }
631
631
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
632
- case 5:
632
+ case 2:
633
633
  params.id = _this.attributes.id;
634
634
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
635
- _context2.next = 8;
635
+ _context2.next = 3;
636
636
  break;
637
637
  }
638
638
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
639
- case 8:
639
+ case 3:
640
640
  if (params.id) {
641
- _context2.next = 14;
641
+ _context2.next = 5;
642
642
  break;
643
643
  }
644
644
  if (!_this.attributes.id) {
645
- _context2.next = 13;
645
+ _context2.next = 4;
646
646
  break;
647
647
  }
648
648
  params.id = _this.id;
649
- _context2.next = 14;
649
+ _context2.next = 5;
650
650
  break;
651
- case 13:
651
+ case 4:
652
652
  throw new errors.MissingParameterError('Parameter missing: id');
653
- case 14:
654
- _context2.next = 16;
653
+ case 5:
654
+ _context2.next = 6;
655
655
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id), "/resend_welcome_email"), 'POST', params, _this.options);
656
- case 16:
656
+ case 6:
657
657
  case "end":
658
658
  return _context2.stop();
659
659
  }
@@ -663,46 +663,46 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
663
663
  (0, _defineProperty2.default)(this, "user2faReset", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
664
664
  var params,
665
665
  _args3 = arguments;
666
- return _regenerator.default.wrap(function _callee3$(_context3) {
666
+ return _regenerator.default.wrap(function (_context3) {
667
667
  while (1) switch (_context3.prev = _context3.next) {
668
668
  case 0:
669
669
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
670
670
  if (_this.attributes.id) {
671
- _context3.next = 3;
671
+ _context3.next = 1;
672
672
  break;
673
673
  }
674
674
  throw new errors.EmptyPropertyError('Current object has no id');
675
- case 3:
675
+ case 1:
676
676
  if ((0, _utils.isObject)(params)) {
677
- _context3.next = 5;
677
+ _context3.next = 2;
678
678
  break;
679
679
  }
680
680
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
681
- case 5:
681
+ case 2:
682
682
  params.id = _this.attributes.id;
683
683
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
684
- _context3.next = 8;
684
+ _context3.next = 3;
685
685
  break;
686
686
  }
687
687
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
688
- case 8:
688
+ case 3:
689
689
  if (params.id) {
690
- _context3.next = 14;
690
+ _context3.next = 5;
691
691
  break;
692
692
  }
693
693
  if (!_this.attributes.id) {
694
- _context3.next = 13;
694
+ _context3.next = 4;
695
695
  break;
696
696
  }
697
697
  params.id = _this.id;
698
- _context3.next = 14;
698
+ _context3.next = 5;
699
699
  break;
700
- case 13:
700
+ case 4:
701
701
  throw new errors.MissingParameterError('Parameter missing: id');
702
- case 14:
703
- _context3.next = 16;
702
+ case 5:
703
+ _context3.next = 6;
704
704
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id), "/2fa/reset"), 'POST', params, _this.options);
705
- case 16:
705
+ case 6:
706
706
  case "end":
707
707
  return _context3.stop();
708
708
  }
@@ -760,259 +760,267 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
760
760
  var params,
761
761
  response,
762
762
  _args4 = arguments;
763
- return _regenerator.default.wrap(function _callee4$(_context4) {
763
+ return _regenerator.default.wrap(function (_context4) {
764
764
  while (1) switch (_context4.prev = _context4.next) {
765
765
  case 0:
766
766
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
767
767
  if (_this.attributes.id) {
768
- _context4.next = 3;
768
+ _context4.next = 1;
769
769
  break;
770
770
  }
771
771
  throw new errors.EmptyPropertyError('Current object has no id');
772
- case 3:
772
+ case 1:
773
773
  if ((0, _utils.isObject)(params)) {
774
- _context4.next = 5;
774
+ _context4.next = 2;
775
775
  break;
776
776
  }
777
777
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
778
- case 5:
778
+ case 2:
779
779
  params.id = _this.attributes.id;
780
780
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
781
- _context4.next = 8;
781
+ _context4.next = 3;
782
782
  break;
783
783
  }
784
784
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
785
- case 8:
785
+ case 3:
786
786
  if (!(params.change_password && !(0, _utils.isString)(params.change_password))) {
787
- _context4.next = 10;
787
+ _context4.next = 4;
788
788
  break;
789
789
  }
790
790
  throw new errors.InvalidParameterError("Bad parameter: change_password must be of type String, received ".concat((0, _utils.getType)(params.change_password)));
791
- case 10:
791
+ case 4:
792
792
  if (!(params.change_password_confirmation && !(0, _utils.isString)(params.change_password_confirmation))) {
793
- _context4.next = 12;
793
+ _context4.next = 5;
794
794
  break;
795
795
  }
796
796
  throw new errors.InvalidParameterError("Bad parameter: change_password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.change_password_confirmation)));
797
- case 12:
797
+ case 5:
798
798
  if (!(params.email && !(0, _utils.isString)(params.email))) {
799
- _context4.next = 14;
799
+ _context4.next = 6;
800
800
  break;
801
801
  }
802
802
  throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params.email)));
803
- case 14:
803
+ case 6:
804
804
  if (!(params.grant_permission && !(0, _utils.isString)(params.grant_permission))) {
805
- _context4.next = 16;
805
+ _context4.next = 7;
806
806
  break;
807
807
  }
808
808
  throw new errors.InvalidParameterError("Bad parameter: grant_permission must be of type String, received ".concat((0, _utils.getType)(params.grant_permission)));
809
- case 16:
809
+ case 7:
810
810
  if (!(params.group_id && !(0, _utils.isInt)(params.group_id))) {
811
- _context4.next = 18;
811
+ _context4.next = 8;
812
812
  break;
813
813
  }
814
814
  throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params.group_id)));
815
- case 18:
815
+ case 8:
816
816
  if (!(params.group_ids && !(0, _utils.isString)(params.group_ids))) {
817
- _context4.next = 20;
817
+ _context4.next = 9;
818
818
  break;
819
819
  }
820
820
  throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params.group_ids)));
821
- case 20:
821
+ case 9:
822
822
  if (!(params.imported_password_hash && !(0, _utils.isString)(params.imported_password_hash))) {
823
- _context4.next = 22;
823
+ _context4.next = 10;
824
824
  break;
825
825
  }
826
826
  throw new errors.InvalidParameterError("Bad parameter: imported_password_hash must be of type String, received ".concat((0, _utils.getType)(params.imported_password_hash)));
827
- case 22:
827
+ case 10:
828
828
  if (!(params.password && !(0, _utils.isString)(params.password))) {
829
- _context4.next = 24;
829
+ _context4.next = 11;
830
830
  break;
831
831
  }
832
832
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params.password)));
833
- case 24:
833
+ case 11:
834
834
  if (!(params.password_confirmation && !(0, _utils.isString)(params.password_confirmation))) {
835
- _context4.next = 26;
835
+ _context4.next = 12;
836
836
  break;
837
837
  }
838
838
  throw new errors.InvalidParameterError("Bad parameter: password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.password_confirmation)));
839
- case 26:
839
+ case 12:
840
840
  if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
841
- _context4.next = 28;
841
+ _context4.next = 13;
842
842
  break;
843
843
  }
844
844
  throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
845
- case 28:
845
+ case 13:
846
846
  if (!(params.authenticate_until && !(0, _utils.isString)(params.authenticate_until))) {
847
- _context4.next = 30;
847
+ _context4.next = 14;
848
848
  break;
849
849
  }
850
850
  throw new errors.InvalidParameterError("Bad parameter: authenticate_until must be of type String, received ".concat((0, _utils.getType)(params.authenticate_until)));
851
- case 30:
851
+ case 14:
852
852
  if (!(params.authentication_method && !(0, _utils.isString)(params.authentication_method))) {
853
- _context4.next = 32;
853
+ _context4.next = 15;
854
854
  break;
855
855
  }
856
856
  throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
857
- case 32:
857
+ case 15:
858
858
  if (!(params.header_text && !(0, _utils.isString)(params.header_text))) {
859
- _context4.next = 34;
859
+ _context4.next = 16;
860
860
  break;
861
861
  }
862
862
  throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params.header_text)));
863
- case 34:
863
+ case 16:
864
864
  if (!(params.language && !(0, _utils.isString)(params.language))) {
865
- _context4.next = 36;
865
+ _context4.next = 17;
866
866
  break;
867
867
  }
868
868
  throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params.language)));
869
- case 36:
869
+ case 17:
870
870
  if (!(params.notification_daily_send_time && !(0, _utils.isInt)(params.notification_daily_send_time))) {
871
- _context4.next = 38;
871
+ _context4.next = 18;
872
872
  break;
873
873
  }
874
874
  throw new errors.InvalidParameterError("Bad parameter: notification_daily_send_time must be of type Int, received ".concat((0, _utils.getType)(params.notification_daily_send_time)));
875
- case 38:
875
+ case 18:
876
876
  if (!(params.name && !(0, _utils.isString)(params.name))) {
877
- _context4.next = 40;
877
+ _context4.next = 19;
878
878
  break;
879
879
  }
880
880
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
881
- case 40:
881
+ case 19:
882
882
  if (!(params.company && !(0, _utils.isString)(params.company))) {
883
- _context4.next = 42;
883
+ _context4.next = 20;
884
884
  break;
885
885
  }
886
886
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
887
- case 42:
887
+ case 20:
888
888
  if (!(params.notes && !(0, _utils.isString)(params.notes))) {
889
- _context4.next = 44;
889
+ _context4.next = 21;
890
890
  break;
891
891
  }
892
892
  throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
893
- case 44:
893
+ case 21:
894
894
  if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
895
- _context4.next = 46;
895
+ _context4.next = 22;
896
896
  break;
897
897
  }
898
898
  throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
899
- case 46:
899
+ case 22:
900
900
  if (!(params.require_login_by && !(0, _utils.isString)(params.require_login_by))) {
901
- _context4.next = 48;
901
+ _context4.next = 23;
902
902
  break;
903
903
  }
904
904
  throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params.require_login_by)));
905
- case 48:
905
+ case 23:
906
906
  if (!(params.ssl_required && !(0, _utils.isString)(params.ssl_required))) {
907
- _context4.next = 50;
907
+ _context4.next = 24;
908
908
  break;
909
909
  }
910
910
  throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params.ssl_required)));
911
- case 50:
911
+ case 24:
912
912
  if (!(params.sso_strategy_id && !(0, _utils.isInt)(params.sso_strategy_id))) {
913
- _context4.next = 52;
913
+ _context4.next = 25;
914
914
  break;
915
915
  }
916
916
  throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params.sso_strategy_id)));
917
- case 52:
917
+ case 25:
918
918
  if (!(params.require_2fa && !(0, _utils.isString)(params.require_2fa))) {
919
- _context4.next = 54;
919
+ _context4.next = 26;
920
920
  break;
921
921
  }
922
922
  throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
923
- case 54:
923
+ case 26:
924
924
  if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
925
- _context4.next = 56;
925
+ _context4.next = 27;
926
926
  break;
927
927
  }
928
928
  throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
929
- case 56:
929
+ case 27:
930
930
  if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
931
- _context4.next = 58;
931
+ _context4.next = 28;
932
932
  break;
933
933
  }
934
934
  throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
935
- case 58:
935
+ case 28:
936
936
  if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
937
- _context4.next = 60;
937
+ _context4.next = 29;
938
938
  break;
939
939
  }
940
940
  throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
941
- case 60:
941
+ case 29:
942
942
  if (!(params.username && !(0, _utils.isString)(params.username))) {
943
- _context4.next = 62;
943
+ _context4.next = 30;
944
944
  break;
945
945
  }
946
946
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
947
- case 62:
947
+ case 30:
948
948
  if (params.id) {
949
- _context4.next = 68;
949
+ _context4.next = 32;
950
950
  break;
951
951
  }
952
952
  if (!_this.attributes.id) {
953
- _context4.next = 67;
953
+ _context4.next = 31;
954
954
  break;
955
955
  }
956
956
  params.id = _this.id;
957
- _context4.next = 68;
957
+ _context4.next = 32;
958
958
  break;
959
- case 67:
959
+ case 31:
960
960
  throw new errors.MissingParameterError('Parameter missing: id');
961
- case 68:
962
- _context4.next = 70;
961
+ case 32:
962
+ _context4.next = 33;
963
963
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
964
- case 70:
964
+ case 33:
965
965
  response = _context4.sent;
966
966
  return _context4.abrupt("return", new User(response === null || response === void 0 ? void 0 : response.data, _this.options));
967
- case 72:
967
+ case 34:
968
968
  case "end":
969
969
  return _context4.stop();
970
970
  }
971
971
  }, _callee4);
972
972
  })));
973
+ // Parameters:
974
+ // new_owner_id - int64 - Provide a User ID here to transfer ownership of certain resources such as Automations and Share Links (Bundles) to that new user.
973
975
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
974
976
  var params,
975
977
  _args5 = arguments;
976
- return _regenerator.default.wrap(function _callee5$(_context5) {
978
+ return _regenerator.default.wrap(function (_context5) {
977
979
  while (1) switch (_context5.prev = _context5.next) {
978
980
  case 0:
979
981
  params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
980
982
  if (_this.attributes.id) {
981
- _context5.next = 3;
983
+ _context5.next = 1;
982
984
  break;
983
985
  }
984
986
  throw new errors.EmptyPropertyError('Current object has no id');
985
- case 3:
987
+ case 1:
986
988
  if ((0, _utils.isObject)(params)) {
987
- _context5.next = 5;
989
+ _context5.next = 2;
988
990
  break;
989
991
  }
990
992
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
991
- case 5:
993
+ case 2:
992
994
  params.id = _this.attributes.id;
993
995
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
994
- _context5.next = 8;
996
+ _context5.next = 3;
995
997
  break;
996
998
  }
997
999
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
998
- case 8:
1000
+ case 3:
1001
+ if (!(params.new_owner_id && !(0, _utils.isInt)(params.new_owner_id))) {
1002
+ _context5.next = 4;
1003
+ break;
1004
+ }
1005
+ throw new errors.InvalidParameterError("Bad parameter: new_owner_id must be of type Int, received ".concat((0, _utils.getType)(params.new_owner_id)));
1006
+ case 4:
999
1007
  if (params.id) {
1000
- _context5.next = 14;
1008
+ _context5.next = 6;
1001
1009
  break;
1002
1010
  }
1003
1011
  if (!_this.attributes.id) {
1004
- _context5.next = 13;
1012
+ _context5.next = 5;
1005
1013
  break;
1006
1014
  }
1007
1015
  params.id = _this.id;
1008
- _context5.next = 14;
1016
+ _context5.next = 6;
1009
1017
  break;
1010
- case 13:
1018
+ case 5:
1011
1019
  throw new errors.MissingParameterError('Parameter missing: id');
1012
- case 14:
1013
- _context5.next = 16;
1020
+ case 6:
1021
+ _context5.next = 7;
1014
1022
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
1015
- case 16:
1023
+ case 7:
1016
1024
  case "end":
1017
1025
  return _context5.stop();
1018
1026
  }
@@ -1024,27 +1032,27 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
1024
1032
  });
1025
1033
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
1026
1034
  var _newObject, newObject;
1027
- return _regenerator.default.wrap(function _callee6$(_context6) {
1035
+ return _regenerator.default.wrap(function (_context6) {
1028
1036
  while (1) switch (_context6.prev = _context6.next) {
1029
1037
  case 0:
1030
1038
  if (!_this.attributes.id) {
1031
- _context6.next = 6;
1039
+ _context6.next = 2;
1032
1040
  break;
1033
1041
  }
1034
- _context6.next = 3;
1042
+ _context6.next = 1;
1035
1043
  return _this.update(_this.attributes);
1036
- case 3:
1044
+ case 1:
1037
1045
  _newObject = _context6.sent;
1038
1046
  _this.attributes = _objectSpread({}, _newObject.attributes);
1039
1047
  return _context6.abrupt("return", true);
1040
- case 6:
1041
- _context6.next = 8;
1048
+ case 2:
1049
+ _context6.next = 3;
1042
1050
  return User.create(_this.attributes, _this.options);
1043
- case 8:
1051
+ case 3:
1044
1052
  newObject = _context6.sent;
1045
1053
  _this.attributes = _objectSpread({}, newObject.attributes);
1046
1054
  return _context6.abrupt("return", true);
1047
- case 11:
1055
+ case 4:
1048
1056
  case "end":
1049
1057
  return _context6.stop();
1050
1058
  }
@@ -1083,43 +1091,43 @@ _User = User;
1083
1091
  options,
1084
1092
  response,
1085
1093
  _args7 = arguments;
1086
- return _regenerator.default.wrap(function _callee7$(_context7) {
1094
+ return _regenerator.default.wrap(function (_context7) {
1087
1095
  while (1) switch (_context7.prev = _context7.next) {
1088
1096
  case 0:
1089
1097
  params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
1090
1098
  options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
1091
1099
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
1092
- _context7.next = 4;
1100
+ _context7.next = 1;
1093
1101
  break;
1094
1102
  }
1095
1103
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
1096
- case 4:
1104
+ case 1:
1097
1105
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
1098
- _context7.next = 6;
1106
+ _context7.next = 2;
1099
1107
  break;
1100
1108
  }
1101
1109
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
1102
- case 6:
1110
+ case 2:
1103
1111
  if (!(params.ids && !(0, _utils.isString)(params.ids))) {
1104
- _context7.next = 8;
1112
+ _context7.next = 3;
1105
1113
  break;
1106
1114
  }
1107
1115
  throw new errors.InvalidParameterError("Bad parameter: ids must be of type String, received ".concat((0, _utils.getType)(params.ids)));
1108
- case 8:
1116
+ case 3:
1109
1117
  if (!(params.search && !(0, _utils.isString)(params.search))) {
1110
- _context7.next = 10;
1118
+ _context7.next = 4;
1111
1119
  break;
1112
1120
  }
1113
1121
  throw new errors.InvalidParameterError("Bad parameter: search must be of type String, received ".concat((0, _utils.getType)(params.search)));
1114
- case 10:
1115
- _context7.next = 12;
1122
+ case 4:
1123
+ _context7.next = 5;
1116
1124
  return _Api.default.sendRequest('/users', 'GET', params, options);
1117
- case 12:
1125
+ case 5:
1118
1126
  response = _context7.sent;
1119
1127
  return _context7.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
1120
1128
  return new _User(obj, options);
1121
1129
  })) || []);
1122
- case 14:
1130
+ case 6:
1123
1131
  case "end":
1124
1132
  return _context7.stop();
1125
1133
  }
@@ -1138,36 +1146,36 @@ _User = User;
1138
1146
  options,
1139
1147
  response,
1140
1148
  _args8 = arguments;
1141
- return _regenerator.default.wrap(function _callee8$(_context8) {
1149
+ return _regenerator.default.wrap(function (_context8) {
1142
1150
  while (1) switch (_context8.prev = _context8.next) {
1143
1151
  case 0:
1144
1152
  params = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
1145
1153
  options = _args8.length > 2 && _args8[2] !== undefined ? _args8[2] : {};
1146
1154
  if ((0, _utils.isObject)(params)) {
1147
- _context8.next = 4;
1155
+ _context8.next = 1;
1148
1156
  break;
1149
1157
  }
1150
1158
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
1151
- case 4:
1159
+ case 1:
1152
1160
  params.id = id;
1153
1161
  if (params.id) {
1154
- _context8.next = 7;
1162
+ _context8.next = 2;
1155
1163
  break;
1156
1164
  }
1157
1165
  throw new errors.MissingParameterError('Parameter missing: id');
1158
- case 7:
1166
+ case 2:
1159
1167
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
1160
- _context8.next = 9;
1168
+ _context8.next = 3;
1161
1169
  break;
1162
1170
  }
1163
1171
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
1164
- case 9:
1165
- _context8.next = 11;
1172
+ case 3:
1173
+ _context8.next = 4;
1166
1174
  return _Api.default.sendRequest("/users/".concat(encodeURIComponent(params.id)), 'GET', params, options);
1167
- case 11:
1175
+ case 4:
1168
1176
  response = _context8.sent;
1169
1177
  return _context8.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
1170
- case 13:
1178
+ case 5:
1171
1179
  case "end":
1172
1180
  return _context8.stop();
1173
1181
  }
@@ -1235,185 +1243,185 @@ _User = User;
1235
1243
  options,
1236
1244
  response,
1237
1245
  _args9 = arguments;
1238
- return _regenerator.default.wrap(function _callee9$(_context9) {
1246
+ return _regenerator.default.wrap(function (_context9) {
1239
1247
  while (1) switch (_context9.prev = _context9.next) {
1240
1248
  case 0:
1241
1249
  params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
1242
1250
  options = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {};
1243
1251
  if (params.username) {
1244
- _context9.next = 4;
1252
+ _context9.next = 1;
1245
1253
  break;
1246
1254
  }
1247
1255
  throw new errors.MissingParameterError('Parameter missing: username');
1248
- case 4:
1256
+ case 1:
1249
1257
  if (!(params.change_password && !(0, _utils.isString)(params.change_password))) {
1250
- _context9.next = 6;
1258
+ _context9.next = 2;
1251
1259
  break;
1252
1260
  }
1253
1261
  throw new errors.InvalidParameterError("Bad parameter: change_password must be of type String, received ".concat((0, _utils.getType)(params.change_password)));
1254
- case 6:
1262
+ case 2:
1255
1263
  if (!(params.change_password_confirmation && !(0, _utils.isString)(params.change_password_confirmation))) {
1256
- _context9.next = 8;
1264
+ _context9.next = 3;
1257
1265
  break;
1258
1266
  }
1259
1267
  throw new errors.InvalidParameterError("Bad parameter: change_password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.change_password_confirmation)));
1260
- case 8:
1268
+ case 3:
1261
1269
  if (!(params.email && !(0, _utils.isString)(params.email))) {
1262
- _context9.next = 10;
1270
+ _context9.next = 4;
1263
1271
  break;
1264
1272
  }
1265
1273
  throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params.email)));
1266
- case 10:
1274
+ case 4:
1267
1275
  if (!(params.grant_permission && !(0, _utils.isString)(params.grant_permission))) {
1268
- _context9.next = 12;
1276
+ _context9.next = 5;
1269
1277
  break;
1270
1278
  }
1271
1279
  throw new errors.InvalidParameterError("Bad parameter: grant_permission must be of type String, received ".concat((0, _utils.getType)(params.grant_permission)));
1272
- case 12:
1280
+ case 5:
1273
1281
  if (!(params.group_id && !(0, _utils.isInt)(params.group_id))) {
1274
- _context9.next = 14;
1282
+ _context9.next = 6;
1275
1283
  break;
1276
1284
  }
1277
1285
  throw new errors.InvalidParameterError("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(params.group_id)));
1278
- case 14:
1286
+ case 6:
1279
1287
  if (!(params.group_ids && !(0, _utils.isString)(params.group_ids))) {
1280
- _context9.next = 16;
1288
+ _context9.next = 7;
1281
1289
  break;
1282
1290
  }
1283
1291
  throw new errors.InvalidParameterError("Bad parameter: group_ids must be of type String, received ".concat((0, _utils.getType)(params.group_ids)));
1284
- case 16:
1292
+ case 7:
1285
1293
  if (!(params.imported_password_hash && !(0, _utils.isString)(params.imported_password_hash))) {
1286
- _context9.next = 18;
1294
+ _context9.next = 8;
1287
1295
  break;
1288
1296
  }
1289
1297
  throw new errors.InvalidParameterError("Bad parameter: imported_password_hash must be of type String, received ".concat((0, _utils.getType)(params.imported_password_hash)));
1290
- case 18:
1298
+ case 8:
1291
1299
  if (!(params.password && !(0, _utils.isString)(params.password))) {
1292
- _context9.next = 20;
1300
+ _context9.next = 9;
1293
1301
  break;
1294
1302
  }
1295
1303
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params.password)));
1296
- case 20:
1304
+ case 9:
1297
1305
  if (!(params.password_confirmation && !(0, _utils.isString)(params.password_confirmation))) {
1298
- _context9.next = 22;
1306
+ _context9.next = 10;
1299
1307
  break;
1300
1308
  }
1301
1309
  throw new errors.InvalidParameterError("Bad parameter: password_confirmation must be of type String, received ".concat((0, _utils.getType)(params.password_confirmation)));
1302
- case 22:
1310
+ case 10:
1303
1311
  if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
1304
- _context9.next = 24;
1312
+ _context9.next = 11;
1305
1313
  break;
1306
1314
  }
1307
1315
  throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
1308
- case 24:
1316
+ case 11:
1309
1317
  if (!(params.authenticate_until && !(0, _utils.isString)(params.authenticate_until))) {
1310
- _context9.next = 26;
1318
+ _context9.next = 12;
1311
1319
  break;
1312
1320
  }
1313
1321
  throw new errors.InvalidParameterError("Bad parameter: authenticate_until must be of type String, received ".concat((0, _utils.getType)(params.authenticate_until)));
1314
- case 26:
1322
+ case 12:
1315
1323
  if (!(params.authentication_method && !(0, _utils.isString)(params.authentication_method))) {
1316
- _context9.next = 28;
1324
+ _context9.next = 13;
1317
1325
  break;
1318
1326
  }
1319
1327
  throw new errors.InvalidParameterError("Bad parameter: authentication_method must be of type String, received ".concat((0, _utils.getType)(params.authentication_method)));
1320
- case 28:
1328
+ case 13:
1321
1329
  if (!(params.header_text && !(0, _utils.isString)(params.header_text))) {
1322
- _context9.next = 30;
1330
+ _context9.next = 14;
1323
1331
  break;
1324
1332
  }
1325
1333
  throw new errors.InvalidParameterError("Bad parameter: header_text must be of type String, received ".concat((0, _utils.getType)(params.header_text)));
1326
- case 30:
1334
+ case 14:
1327
1335
  if (!(params.language && !(0, _utils.isString)(params.language))) {
1328
- _context9.next = 32;
1336
+ _context9.next = 15;
1329
1337
  break;
1330
1338
  }
1331
1339
  throw new errors.InvalidParameterError("Bad parameter: language must be of type String, received ".concat((0, _utils.getType)(params.language)));
1332
- case 32:
1340
+ case 15:
1333
1341
  if (!(params.notification_daily_send_time && !(0, _utils.isInt)(params.notification_daily_send_time))) {
1334
- _context9.next = 34;
1342
+ _context9.next = 16;
1335
1343
  break;
1336
1344
  }
1337
1345
  throw new errors.InvalidParameterError("Bad parameter: notification_daily_send_time must be of type Int, received ".concat((0, _utils.getType)(params.notification_daily_send_time)));
1338
- case 34:
1346
+ case 16:
1339
1347
  if (!(params.name && !(0, _utils.isString)(params.name))) {
1340
- _context9.next = 36;
1348
+ _context9.next = 17;
1341
1349
  break;
1342
1350
  }
1343
1351
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
1344
- case 36:
1352
+ case 17:
1345
1353
  if (!(params.company && !(0, _utils.isString)(params.company))) {
1346
- _context9.next = 38;
1354
+ _context9.next = 18;
1347
1355
  break;
1348
1356
  }
1349
1357
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
1350
- case 38:
1358
+ case 18:
1351
1359
  if (!(params.notes && !(0, _utils.isString)(params.notes))) {
1352
- _context9.next = 40;
1360
+ _context9.next = 19;
1353
1361
  break;
1354
1362
  }
1355
1363
  throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
1356
- case 40:
1364
+ case 19:
1357
1365
  if (!(params.password_validity_days && !(0, _utils.isInt)(params.password_validity_days))) {
1358
- _context9.next = 42;
1366
+ _context9.next = 20;
1359
1367
  break;
1360
1368
  }
1361
1369
  throw new errors.InvalidParameterError("Bad parameter: password_validity_days must be of type Int, received ".concat((0, _utils.getType)(params.password_validity_days)));
1362
- case 42:
1370
+ case 20:
1363
1371
  if (!(params.require_login_by && !(0, _utils.isString)(params.require_login_by))) {
1364
- _context9.next = 44;
1372
+ _context9.next = 21;
1365
1373
  break;
1366
1374
  }
1367
1375
  throw new errors.InvalidParameterError("Bad parameter: require_login_by must be of type String, received ".concat((0, _utils.getType)(params.require_login_by)));
1368
- case 44:
1376
+ case 21:
1369
1377
  if (!(params.ssl_required && !(0, _utils.isString)(params.ssl_required))) {
1370
- _context9.next = 46;
1378
+ _context9.next = 22;
1371
1379
  break;
1372
1380
  }
1373
1381
  throw new errors.InvalidParameterError("Bad parameter: ssl_required must be of type String, received ".concat((0, _utils.getType)(params.ssl_required)));
1374
- case 46:
1382
+ case 22:
1375
1383
  if (!(params.sso_strategy_id && !(0, _utils.isInt)(params.sso_strategy_id))) {
1376
- _context9.next = 48;
1384
+ _context9.next = 23;
1377
1385
  break;
1378
1386
  }
1379
1387
  throw new errors.InvalidParameterError("Bad parameter: sso_strategy_id must be of type Int, received ".concat((0, _utils.getType)(params.sso_strategy_id)));
1380
- case 48:
1388
+ case 23:
1381
1389
  if (!(params.require_2fa && !(0, _utils.isString)(params.require_2fa))) {
1382
- _context9.next = 50;
1390
+ _context9.next = 24;
1383
1391
  break;
1384
1392
  }
1385
1393
  throw new errors.InvalidParameterError("Bad parameter: require_2fa must be of type String, received ".concat((0, _utils.getType)(params.require_2fa)));
1386
- case 50:
1394
+ case 24:
1387
1395
  if (!(params.time_zone && !(0, _utils.isString)(params.time_zone))) {
1388
- _context9.next = 52;
1396
+ _context9.next = 25;
1389
1397
  break;
1390
1398
  }
1391
1399
  throw new errors.InvalidParameterError("Bad parameter: time_zone must be of type String, received ".concat((0, _utils.getType)(params.time_zone)));
1392
- case 52:
1400
+ case 25:
1393
1401
  if (!(params.user_root && !(0, _utils.isString)(params.user_root))) {
1394
- _context9.next = 54;
1402
+ _context9.next = 26;
1395
1403
  break;
1396
1404
  }
1397
1405
  throw new errors.InvalidParameterError("Bad parameter: user_root must be of type String, received ".concat((0, _utils.getType)(params.user_root)));
1398
- case 54:
1406
+ case 26:
1399
1407
  if (!(params.user_home && !(0, _utils.isString)(params.user_home))) {
1400
- _context9.next = 56;
1408
+ _context9.next = 27;
1401
1409
  break;
1402
1410
  }
1403
1411
  throw new errors.InvalidParameterError("Bad parameter: user_home must be of type String, received ".concat((0, _utils.getType)(params.user_home)));
1404
- case 56:
1412
+ case 27:
1405
1413
  if (!(params.username && !(0, _utils.isString)(params.username))) {
1406
- _context9.next = 58;
1414
+ _context9.next = 28;
1407
1415
  break;
1408
1416
  }
1409
1417
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1410
- case 58:
1411
- _context9.next = 60;
1418
+ case 28:
1419
+ _context9.next = 29;
1412
1420
  return _Api.default.sendRequest('/users', 'POST', params, options);
1413
- case 60:
1421
+ case 29:
1414
1422
  response = _context9.sent;
1415
1423
  return _context9.abrupt("return", new _User(response === null || response === void 0 ? void 0 : response.data, options));
1416
- case 62:
1424
+ case 30:
1417
1425
  case "end":
1418
1426
  return _context9.stop();
1419
1427
  }