files-com 1.5.5__py3-none-any.whl → 1.6.0__py3-none-any.whl

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.

Potentially problematic release.


This version of files-com might be problematic. Click here for more details.

files_sdk/models/user.py CHANGED
@@ -446,6 +446,12 @@ def list(params=None, options=None):
446
446
  )
447
447
  if "ids" in params and not isinstance(params["ids"], str):
448
448
  raise InvalidParameterError("Bad parameter: ids must be an str")
449
+ if "include_parent_site_users" in params and not isinstance(
450
+ params["include_parent_site_users"], bool
451
+ ):
452
+ raise InvalidParameterError(
453
+ "Bad parameter: include_parent_site_users must be an bool"
454
+ )
449
455
  if "search" in params and not isinstance(params["search"], str):
450
456
  raise InvalidParameterError("Bad parameter: search must be an str")
451
457
  return ListObj(User, "GET", "/users", params, options)
@@ -530,6 +536,12 @@ def create(params=None, options=None):
530
536
  params = {}
531
537
  if not isinstance(options, dict):
532
538
  options = {}
539
+ if "avatar_delete" in params and not isinstance(
540
+ params["avatar_delete"], bool
541
+ ):
542
+ raise InvalidParameterError(
543
+ "Bad parameter: avatar_delete must be an bool"
544
+ )
533
545
  if "change_password" in params and not isinstance(
534
546
  params["change_password"], str
535
547
  ):
@@ -568,10 +580,22 @@ def create(params=None, options=None):
568
580
  raise InvalidParameterError(
569
581
  "Bad parameter: password_confirmation must be an str"
570
582
  )
583
+ if "announcements_read" in params and not isinstance(
584
+ params["announcements_read"], bool
585
+ ):
586
+ raise InvalidParameterError(
587
+ "Bad parameter: announcements_read must be an bool"
588
+ )
571
589
  if "allowed_ips" in params and not isinstance(params["allowed_ips"], str):
572
590
  raise InvalidParameterError(
573
591
  "Bad parameter: allowed_ips must be an str"
574
592
  )
593
+ if "attachments_permission" in params and not isinstance(
594
+ params["attachments_permission"], bool
595
+ ):
596
+ raise InvalidParameterError(
597
+ "Bad parameter: attachments_permission must be an bool"
598
+ )
575
599
  if "authenticate_until" in params and not isinstance(
576
600
  params["authenticate_until"], str
577
601
  ):
@@ -584,6 +608,38 @@ def create(params=None, options=None):
584
608
  raise InvalidParameterError(
585
609
  "Bad parameter: authentication_method must be an str"
586
610
  )
611
+ if "billing_permission" in params and not isinstance(
612
+ params["billing_permission"], bool
613
+ ):
614
+ raise InvalidParameterError(
615
+ "Bad parameter: billing_permission must be an bool"
616
+ )
617
+ if "bypass_inactive_disable" in params and not isinstance(
618
+ params["bypass_inactive_disable"], bool
619
+ ):
620
+ raise InvalidParameterError(
621
+ "Bad parameter: bypass_inactive_disable must be an bool"
622
+ )
623
+ if "bypass_site_allowed_ips" in params and not isinstance(
624
+ params["bypass_site_allowed_ips"], bool
625
+ ):
626
+ raise InvalidParameterError(
627
+ "Bad parameter: bypass_site_allowed_ips must be an bool"
628
+ )
629
+ if "dav_permission" in params and not isinstance(
630
+ params["dav_permission"], bool
631
+ ):
632
+ raise InvalidParameterError(
633
+ "Bad parameter: dav_permission must be an bool"
634
+ )
635
+ if "disabled" in params and not isinstance(params["disabled"], bool):
636
+ raise InvalidParameterError("Bad parameter: disabled must be an bool")
637
+ if "ftp_permission" in params and not isinstance(
638
+ params["ftp_permission"], bool
639
+ ):
640
+ raise InvalidParameterError(
641
+ "Bad parameter: ftp_permission must be an bool"
642
+ )
587
643
  if "header_text" in params and not isinstance(params["header_text"], str):
588
644
  raise InvalidParameterError(
589
645
  "Bad parameter: header_text must be an str"
@@ -602,18 +658,70 @@ def create(params=None, options=None):
602
658
  raise InvalidParameterError("Bad parameter: company must be an str")
603
659
  if "notes" in params and not isinstance(params["notes"], str):
604
660
  raise InvalidParameterError("Bad parameter: notes must be an str")
661
+ if "office_integration_enabled" in params and not isinstance(
662
+ params["office_integration_enabled"], bool
663
+ ):
664
+ raise InvalidParameterError(
665
+ "Bad parameter: office_integration_enabled must be an bool"
666
+ )
605
667
  if "password_validity_days" in params and not isinstance(
606
668
  params["password_validity_days"], int
607
669
  ):
608
670
  raise InvalidParameterError(
609
671
  "Bad parameter: password_validity_days must be an int"
610
672
  )
673
+ if "readonly_site_admin" in params and not isinstance(
674
+ params["readonly_site_admin"], bool
675
+ ):
676
+ raise InvalidParameterError(
677
+ "Bad parameter: readonly_site_admin must be an bool"
678
+ )
679
+ if "receive_admin_alerts" in params and not isinstance(
680
+ params["receive_admin_alerts"], bool
681
+ ):
682
+ raise InvalidParameterError(
683
+ "Bad parameter: receive_admin_alerts must be an bool"
684
+ )
611
685
  if "require_login_by" in params and not isinstance(
612
686
  params["require_login_by"], str
613
687
  ):
614
688
  raise InvalidParameterError(
615
689
  "Bad parameter: require_login_by must be an str"
616
690
  )
691
+ if "require_password_change" in params and not isinstance(
692
+ params["require_password_change"], bool
693
+ ):
694
+ raise InvalidParameterError(
695
+ "Bad parameter: require_password_change must be an bool"
696
+ )
697
+ if "restapi_permission" in params and not isinstance(
698
+ params["restapi_permission"], bool
699
+ ):
700
+ raise InvalidParameterError(
701
+ "Bad parameter: restapi_permission must be an bool"
702
+ )
703
+ if "self_managed" in params and not isinstance(
704
+ params["self_managed"], bool
705
+ ):
706
+ raise InvalidParameterError(
707
+ "Bad parameter: self_managed must be an bool"
708
+ )
709
+ if "sftp_permission" in params and not isinstance(
710
+ params["sftp_permission"], bool
711
+ ):
712
+ raise InvalidParameterError(
713
+ "Bad parameter: sftp_permission must be an bool"
714
+ )
715
+ if "site_admin" in params and not isinstance(params["site_admin"], bool):
716
+ raise InvalidParameterError(
717
+ "Bad parameter: site_admin must be an bool"
718
+ )
719
+ if "skip_welcome_screen" in params and not isinstance(
720
+ params["skip_welcome_screen"], bool
721
+ ):
722
+ raise InvalidParameterError(
723
+ "Bad parameter: skip_welcome_screen must be an bool"
724
+ )
617
725
  if "ssl_required" in params and not isinstance(
618
726
  params["ssl_required"], str
619
727
  ):
@@ -626,6 +734,12 @@ def create(params=None, options=None):
626
734
  raise InvalidParameterError(
627
735
  "Bad parameter: sso_strategy_id must be an int"
628
736
  )
737
+ if "subscribe_to_newsletter" in params and not isinstance(
738
+ params["subscribe_to_newsletter"], bool
739
+ ):
740
+ raise InvalidParameterError(
741
+ "Bad parameter: subscribe_to_newsletter must be an bool"
742
+ )
629
743
  if "require_2fa" in params and not isinstance(params["require_2fa"], str):
630
744
  raise InvalidParameterError(
631
745
  "Bad parameter: require_2fa must be an str"
@@ -754,6 +868,12 @@ def update(id, params=None, options=None):
754
868
  params["id"] = id
755
869
  if "id" in params and not isinstance(params["id"], int):
756
870
  raise InvalidParameterError("Bad parameter: id must be an int")
871
+ if "avatar_delete" in params and not isinstance(
872
+ params["avatar_delete"], bool
873
+ ):
874
+ raise InvalidParameterError(
875
+ "Bad parameter: avatar_delete must be an bool"
876
+ )
757
877
  if "change_password" in params and not isinstance(
758
878
  params["change_password"], str
759
879
  ):
@@ -792,10 +912,22 @@ def update(id, params=None, options=None):
792
912
  raise InvalidParameterError(
793
913
  "Bad parameter: password_confirmation must be an str"
794
914
  )
915
+ if "announcements_read" in params and not isinstance(
916
+ params["announcements_read"], bool
917
+ ):
918
+ raise InvalidParameterError(
919
+ "Bad parameter: announcements_read must be an bool"
920
+ )
795
921
  if "allowed_ips" in params and not isinstance(params["allowed_ips"], str):
796
922
  raise InvalidParameterError(
797
923
  "Bad parameter: allowed_ips must be an str"
798
924
  )
925
+ if "attachments_permission" in params and not isinstance(
926
+ params["attachments_permission"], bool
927
+ ):
928
+ raise InvalidParameterError(
929
+ "Bad parameter: attachments_permission must be an bool"
930
+ )
799
931
  if "authenticate_until" in params and not isinstance(
800
932
  params["authenticate_until"], str
801
933
  ):
@@ -808,6 +940,38 @@ def update(id, params=None, options=None):
808
940
  raise InvalidParameterError(
809
941
  "Bad parameter: authentication_method must be an str"
810
942
  )
943
+ if "billing_permission" in params and not isinstance(
944
+ params["billing_permission"], bool
945
+ ):
946
+ raise InvalidParameterError(
947
+ "Bad parameter: billing_permission must be an bool"
948
+ )
949
+ if "bypass_inactive_disable" in params and not isinstance(
950
+ params["bypass_inactive_disable"], bool
951
+ ):
952
+ raise InvalidParameterError(
953
+ "Bad parameter: bypass_inactive_disable must be an bool"
954
+ )
955
+ if "bypass_site_allowed_ips" in params and not isinstance(
956
+ params["bypass_site_allowed_ips"], bool
957
+ ):
958
+ raise InvalidParameterError(
959
+ "Bad parameter: bypass_site_allowed_ips must be an bool"
960
+ )
961
+ if "dav_permission" in params and not isinstance(
962
+ params["dav_permission"], bool
963
+ ):
964
+ raise InvalidParameterError(
965
+ "Bad parameter: dav_permission must be an bool"
966
+ )
967
+ if "disabled" in params and not isinstance(params["disabled"], bool):
968
+ raise InvalidParameterError("Bad parameter: disabled must be an bool")
969
+ if "ftp_permission" in params and not isinstance(
970
+ params["ftp_permission"], bool
971
+ ):
972
+ raise InvalidParameterError(
973
+ "Bad parameter: ftp_permission must be an bool"
974
+ )
811
975
  if "header_text" in params and not isinstance(params["header_text"], str):
812
976
  raise InvalidParameterError(
813
977
  "Bad parameter: header_text must be an str"
@@ -826,18 +990,70 @@ def update(id, params=None, options=None):
826
990
  raise InvalidParameterError("Bad parameter: company must be an str")
827
991
  if "notes" in params and not isinstance(params["notes"], str):
828
992
  raise InvalidParameterError("Bad parameter: notes must be an str")
993
+ if "office_integration_enabled" in params and not isinstance(
994
+ params["office_integration_enabled"], bool
995
+ ):
996
+ raise InvalidParameterError(
997
+ "Bad parameter: office_integration_enabled must be an bool"
998
+ )
829
999
  if "password_validity_days" in params and not isinstance(
830
1000
  params["password_validity_days"], int
831
1001
  ):
832
1002
  raise InvalidParameterError(
833
1003
  "Bad parameter: password_validity_days must be an int"
834
1004
  )
1005
+ if "readonly_site_admin" in params and not isinstance(
1006
+ params["readonly_site_admin"], bool
1007
+ ):
1008
+ raise InvalidParameterError(
1009
+ "Bad parameter: readonly_site_admin must be an bool"
1010
+ )
1011
+ if "receive_admin_alerts" in params and not isinstance(
1012
+ params["receive_admin_alerts"], bool
1013
+ ):
1014
+ raise InvalidParameterError(
1015
+ "Bad parameter: receive_admin_alerts must be an bool"
1016
+ )
835
1017
  if "require_login_by" in params and not isinstance(
836
1018
  params["require_login_by"], str
837
1019
  ):
838
1020
  raise InvalidParameterError(
839
1021
  "Bad parameter: require_login_by must be an str"
840
1022
  )
1023
+ if "require_password_change" in params and not isinstance(
1024
+ params["require_password_change"], bool
1025
+ ):
1026
+ raise InvalidParameterError(
1027
+ "Bad parameter: require_password_change must be an bool"
1028
+ )
1029
+ if "restapi_permission" in params and not isinstance(
1030
+ params["restapi_permission"], bool
1031
+ ):
1032
+ raise InvalidParameterError(
1033
+ "Bad parameter: restapi_permission must be an bool"
1034
+ )
1035
+ if "self_managed" in params and not isinstance(
1036
+ params["self_managed"], bool
1037
+ ):
1038
+ raise InvalidParameterError(
1039
+ "Bad parameter: self_managed must be an bool"
1040
+ )
1041
+ if "sftp_permission" in params and not isinstance(
1042
+ params["sftp_permission"], bool
1043
+ ):
1044
+ raise InvalidParameterError(
1045
+ "Bad parameter: sftp_permission must be an bool"
1046
+ )
1047
+ if "site_admin" in params and not isinstance(params["site_admin"], bool):
1048
+ raise InvalidParameterError(
1049
+ "Bad parameter: site_admin must be an bool"
1050
+ )
1051
+ if "skip_welcome_screen" in params and not isinstance(
1052
+ params["skip_welcome_screen"], bool
1053
+ ):
1054
+ raise InvalidParameterError(
1055
+ "Bad parameter: skip_welcome_screen must be an bool"
1056
+ )
841
1057
  if "ssl_required" in params and not isinstance(
842
1058
  params["ssl_required"], str
843
1059
  ):
@@ -850,6 +1066,12 @@ def update(id, params=None, options=None):
850
1066
  raise InvalidParameterError(
851
1067
  "Bad parameter: sso_strategy_id must be an int"
852
1068
  )
1069
+ if "subscribe_to_newsletter" in params and not isinstance(
1070
+ params["subscribe_to_newsletter"], bool
1071
+ ):
1072
+ raise InvalidParameterError(
1073
+ "Bad parameter: subscribe_to_newsletter must be an bool"
1074
+ )
853
1075
  if "require_2fa" in params and not isinstance(params["require_2fa"], str):
854
1076
  raise InvalidParameterError(
855
1077
  "Bad parameter: require_2fa must be an str"
@@ -84,6 +84,12 @@ def create(params=None, options=None):
84
84
  raise InvalidParameterError("Bad parameter: body must be an dict")
85
85
  if "raw_body" in params and not isinstance(params["raw_body"], str):
86
86
  raise InvalidParameterError("Bad parameter: raw_body must be an str")
87
+ if "file_as_body" in params and not isinstance(
88
+ params["file_as_body"], bool
89
+ ):
90
+ raise InvalidParameterError(
91
+ "Bad parameter: file_as_body must be an bool"
92
+ )
87
93
  if "file_form_field" in params and not isinstance(
88
94
  params["file_form_field"], str
89
95
  ):
@@ -92,6 +98,12 @@ def create(params=None, options=None):
92
98
  )
93
99
  if "action" in params and not isinstance(params["action"], str):
94
100
  raise InvalidParameterError("Bad parameter: action must be an str")
101
+ if "use_dedicated_ips" in params and not isinstance(
102
+ params["use_dedicated_ips"], bool
103
+ ):
104
+ raise InvalidParameterError(
105
+ "Bad parameter: use_dedicated_ips must be an bool"
106
+ )
95
107
  if "url" not in params:
96
108
  raise MissingParameterError("Parameter missing: url")
97
109
  response, options = Api.send_request(