files-com 1.6.73__py3-none-any.whl → 1.6.75__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.

_VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.73
1
+ 1.6.75
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: files_com
3
- Version: 1.6.73
3
+ Version: 1.6.75
4
4
  Summary: Python bindings for the Files.com API
5
5
  License: MIT
6
6
  Requires-Python: >=3.5
@@ -1,14 +1,14 @@
1
1
  README.md,sha256=1Rj6T45hiVlUVx3J-b3E4n3JnWQSEEkuNibBeYzwgWQ,31440
2
- _VERSION,sha256=L2mLWe0gdKWjF5MoBCncxyXs_63rsRlpdk8uPq4dBgo,7
3
- files_com-1.6.73.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
- files_sdk/__init__.py,sha256=3F82V2Mlav27Jt0mqIy08xSWpAjaYruGVIoAOa760ZU,13153
2
+ _VERSION,sha256=D39EsN3sHk5DCutOvySmeqVRsIBEijLCzudWCqdf6Ns,7
3
+ files_com-1.6.75.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
+ files_sdk/__init__.py,sha256=ZIBrAUBn-7iKVb1EGB7Z2vz83tspAz5J6xC0GznJVhs,13241
5
5
  files_sdk/api.py,sha256=HOLk50HLQCbnHwnAr9OElQEWvdA_BABBSEvvFSt1S4A,1846
6
6
  files_sdk/api_client.py,sha256=cfFvm-o4Ao8SWADiJv7t7qnJfG_LJmWV3l6ALTC-Opo,11264
7
7
  files_sdk/error.py,sha256=1Nrfq2AuyTf86XH1Pwx-ykzIKpPGSUibCGs-QF6_9LI,66643
8
8
  files_sdk/list_obj.py,sha256=MWgmESLAmfh1uaSw76PWxmnf9f6_08TLUHe8_mCYKL4,1157
9
9
  files_sdk/path_util.py,sha256=7x8X3JLoMkcqNefCaBeHYXD8MGvPby4AOy-xnBX_LNk,1694
10
10
  files_sdk/util.py,sha256=6aA4N0Wq_ykINW7eMrs2ntFAL2hRLM6IvJf6n_yP34c,962
11
- files_sdk/models/__init__.py,sha256=s4qoM4-DoXUH3CNCzZo3bOm4qu6JKgRlVgK_0oM7USs,5960
11
+ files_sdk/models/__init__.py,sha256=GDW9PgdDCyUUy3uUgE9gdJD2-qk4wFvbfUGHlBQ0odw,6005
12
12
  files_sdk/models/account_line_item.py,sha256=8FLg83Aqpz4y_QYy3fZ_KZsZFWv1f1KGD9T5CH1WSGs,1929
13
13
  files_sdk/models/action.py,sha256=M1lyMybE7SKht2nGXtYWp2l8b4oVkeImo6KF8DLiCos,2034
14
14
  files_sdk/models/action_notification_export.py,sha256=4cdEo2ZCDV3RH3GLSqHV7RWyJ2ONRSUq0glCEi94zd0,6636
@@ -73,9 +73,10 @@ files_sdk/models/message_comment_reaction.py,sha256=h9Kuk1Y2ztqMG7XkyP-ufGQyS7Od
73
73
  files_sdk/models/message_reaction.py,sha256=ZGir-4Qj9k_FRC_X3Av7Yek-SZzFBK-IbvPn5HmaG5g,6288
74
74
  files_sdk/models/notification.py,sha256=HEPLDynR4lCF_vZ7-RJD8hoxaWMl3BrrkGEIbQk6-yg,21993
75
75
  files_sdk/models/outbound_connection_log.py,sha256=tt56csYZrPr3o1hJhbuQ3Rv6j5hsl8TSGF41l086D6A,45948
76
+ files_sdk/models/partner.py,sha256=p28XY4rsiepL50QfyM79pP_fzGseDY0tjs_I2Rlup0E,11354
76
77
  files_sdk/models/payment.py,sha256=UUWxK3x2RVYQdRAWeA-WA_Oegh5TDXYPQA_m3BYd0bQ,3753
77
78
  files_sdk/models/payment_line_item.py,sha256=x97h4kBtul5S1EqI_jskhbebnucwA-EOnQn1oV8Hid0,1284
78
- files_sdk/models/permission.py,sha256=lZbugp_MHyA8_mKj7vvXtrbx1FHLqCDINeNsm5DZfbk,8726
79
+ files_sdk/models/permission.py,sha256=ck4mVLYsX6trNyURAKsm8NDt2S8tCdT0ogL3TKZeaNY,9339
79
80
  files_sdk/models/preview.py,sha256=XaKqSEC0RPBW87Kt6qlvRLeui5YeA6JUumUoZKMvARU,1347
80
81
  files_sdk/models/priority.py,sha256=kByzhOOVwKVSxrMI5xJb1RwUtQdSuFFBLBNEHYzWSm0,2680
81
82
  files_sdk/models/project.py,sha256=nDpX0qc7jY6evRprjQ7l4YgjM9WNH0aXaRbE2mpo6zk,7510
@@ -98,7 +99,7 @@ files_sdk/models/share_group_member.py,sha256=m0BUE4AhClJIoaV-_kU0yryCOwQ5EloZly
98
99
  files_sdk/models/siem_http_destination.py,sha256=mWgfHro5CObkwTYgiWnrREQX2X6zJR389Zw7DJgMFac,50185
99
100
  files_sdk/models/site.py,sha256=cxXogtBHPPk1ZruEPP-IBcyKP9QKHFzgBGlmH1gwunc,70076
100
101
  files_sdk/models/snapshot.py,sha256=zmdQWKR8EhUkF1mFQHFzWfreaEVXG1p_jEtmY4j3cKA,9840
101
- files_sdk/models/sso_strategy.py,sha256=vWNCPfot8z15xUhAoFsS52W-1vg8IpKIqAALZ6pBwd0,9112
102
+ files_sdk/models/sso_strategy.py,sha256=PA_B4cF4XUnzaTjH0Ld0yUNwWCy8Wpea46YuJrrXtXM,9305
102
103
  files_sdk/models/status.py,sha256=IIY3RiJ2RZ2yPByAAh8eIq_cgZFTj13eR4UpqHTANQI,1363
103
104
  files_sdk/models/style.py,sha256=KZY0fZ4kP4AtwZpCi24EtNXL8WFLhE9a1Jme1gA6Kkw,5201
104
105
  files_sdk/models/sync.py,sha256=dIlmpq4LNwYRMeD5-cQpx6r3XCpF5r8uvzYFGFT17fA,28291
@@ -107,14 +108,14 @@ files_sdk/models/sync_run.py,sha256=aQX8hT1NmZ2i5J2C1vJLAE1HK5gn-TMFukfTsKydF2Y,
107
108
  files_sdk/models/usage_by_top_level_dir.py,sha256=o_dETvzcgEA9lsdES_yzwPVAZVFk4ZcnsCTugR8O8eY,1185
108
109
  files_sdk/models/usage_daily_snapshot.py,sha256=rWf6GaTlN9spkUPwfF4IJ0Y6z-JTV9TAWjsFrxI-UFg,5477
109
110
  files_sdk/models/usage_snapshot.py,sha256=3GzMIxBjKelgNP7ksWq4XlrRlAFcYxzd_J6vAgb52qc,4005
110
- files_sdk/models/user.py,sha256=8kiX67_9jUJrBOUdjnLBsh3SoS-_KTCafurL727dDc0,60377
111
+ files_sdk/models/user.py,sha256=u6Ircl64twjan6JCft7qwGSvryMzzeaamoBCbvH3vA4,62098
111
112
  files_sdk/models/user_cipher_use.py,sha256=5Mto-oU87rG2jGIq8TQoOdNZgJA4_ViikvOdM9_jdt0,4994
112
113
  files_sdk/models/user_lifecycle_rule.py,sha256=ZEG3pHxc-lbtofwu9DOCZQgiAbqxAJbDOdiG8JnB6Qo,13421
113
114
  files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6qxgU,6187
114
115
  files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
115
116
  files_sdk/models/web_dav_action_log.py,sha256=uMTIkTgSpW5mgKAEWnCmI4U5eqcAL2g8OHqB-lBir3A,76424
116
117
  files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
117
- files_com-1.6.73.dist-info/METADATA,sha256=3sCTV37H4UQp5M0F9-rjtwl0m3336e6QL-Xpiy7uZbQ,31732
118
- files_com-1.6.73.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
119
- files_com-1.6.73.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
120
- files_com-1.6.73.dist-info/RECORD,,
118
+ files_com-1.6.75.dist-info/METADATA,sha256=8iJyb2oNCeFRvlD_wfkHAo92nroemu9XKjBDaWawSro,31732
119
+ files_com-1.6.75.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
120
+ files_com-1.6.75.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
121
+ files_com-1.6.75.dist-info/RECORD,,
files_sdk/__init__.py CHANGED
@@ -63,6 +63,7 @@ import files_sdk.models.message_comment_reaction as message_comment_reaction
63
63
  import files_sdk.models.message_reaction as message_reaction
64
64
  import files_sdk.models.notification as notification
65
65
  import files_sdk.models.outbound_connection_log as outbound_connection_log
66
+ import files_sdk.models.partner as partner
66
67
  import files_sdk.models.payment as payment
67
68
  import files_sdk.models.payment_line_item as payment_line_item
68
69
  import files_sdk.models.permission as permission
@@ -175,6 +176,7 @@ from files_sdk.models.message_comment_reaction import MessageCommentReaction
175
176
  from files_sdk.models.message_reaction import MessageReaction
176
177
  from files_sdk.models.notification import Notification
177
178
  from files_sdk.models.outbound_connection_log import OutboundConnectionLog
179
+ from files_sdk.models.partner import Partner
178
180
  from files_sdk.models.payment import Payment
179
181
  from files_sdk.models.payment_line_item import PaymentLineItem
180
182
  from files_sdk.models.permission import Permission
@@ -229,7 +231,7 @@ session_id = None
229
231
  source_ip = None
230
232
  base_url = "https://app.files.com"
231
233
  base_path = "api/rest/v1"
232
- version = "1.6.73"
234
+ version = "1.6.75"
233
235
 
234
236
  __version__ = version
235
237
 
@@ -68,6 +68,7 @@ from files_sdk.models.message_comment_reaction import MessageCommentReaction
68
68
  from files_sdk.models.message_reaction import MessageReaction
69
69
  from files_sdk.models.notification import Notification
70
70
  from files_sdk.models.outbound_connection_log import OutboundConnectionLog
71
+ from files_sdk.models.partner import Partner
71
72
  from files_sdk.models.payment import Payment
72
73
  from files_sdk.models.payment_line_item import PaymentLineItem
73
74
  from files_sdk.models.permission import Permission
@@ -0,0 +1,266 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.api import Api # noqa: F401
3
+ from files_sdk.list_obj import ListObj
4
+ from files_sdk.error import ( # noqa: F401
5
+ InvalidParameterError,
6
+ MissingParameterError,
7
+ NotImplementedError,
8
+ )
9
+
10
+
11
+ class Partner:
12
+ default_attributes = {
13
+ "allow_bypassing_2fa_policies": None, # boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
14
+ "allow_credential_changes": None, # boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
15
+ "allow_user_creation": None, # boolean - Allow Partner Admins to create users.
16
+ "id": None, # int64 - The unique ID of the Partner.
17
+ "name": None, # string - The name of the Partner.
18
+ "notes": None, # string - Notes about this Partner.
19
+ "root_folder": None, # string - The root folder path for this Partner.
20
+ }
21
+
22
+ def __init__(self, attributes=None, options=None):
23
+ if not isinstance(attributes, dict):
24
+ attributes = {}
25
+ if not isinstance(options, dict):
26
+ options = {}
27
+ self.set_attributes(attributes)
28
+ self.options = options
29
+
30
+ def set_attributes(self, attributes):
31
+ for attribute, default_value in Partner.default_attributes.items():
32
+ setattr(self, attribute, attributes.get(attribute, default_value))
33
+
34
+ def get_attributes(self):
35
+ return {
36
+ k: getattr(self, k, None)
37
+ for k in Partner.default_attributes
38
+ if getattr(self, k, None) is not None
39
+ }
40
+
41
+ # Parameters:
42
+ # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
43
+ # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
44
+ # allow_user_creation - boolean - Allow Partner Admins to create users.
45
+ # name - string - The name of the Partner.
46
+ # notes - string - Notes about this Partner.
47
+ # root_folder - string - The root folder path for this Partner.
48
+ def update(self, params=None):
49
+ if not isinstance(params, dict):
50
+ params = {}
51
+
52
+ if hasattr(self, "id") and self.id:
53
+ params["id"] = self.id
54
+ else:
55
+ raise MissingParameterError("Current object doesn't have a id")
56
+ if "id" not in params:
57
+ raise MissingParameterError("Parameter missing: id")
58
+ if "id" in params and not isinstance(params["id"], int):
59
+ raise InvalidParameterError("Bad parameter: id must be an int")
60
+ if "name" in params and not isinstance(params["name"], str):
61
+ raise InvalidParameterError("Bad parameter: name must be an str")
62
+ if "notes" in params and not isinstance(params["notes"], str):
63
+ raise InvalidParameterError("Bad parameter: notes must be an str")
64
+ if "root_folder" in params and not isinstance(
65
+ params["root_folder"], str
66
+ ):
67
+ raise InvalidParameterError(
68
+ "Bad parameter: root_folder must be an str"
69
+ )
70
+ response, _options = Api.send_request(
71
+ "PATCH",
72
+ "/partners/{id}".format(id=params["id"]),
73
+ params,
74
+ self.options,
75
+ )
76
+ return response.data
77
+
78
+ def delete(self, params=None):
79
+ if not isinstance(params, dict):
80
+ params = {}
81
+
82
+ if hasattr(self, "id") and self.id:
83
+ params["id"] = self.id
84
+ else:
85
+ raise MissingParameterError("Current object doesn't have a id")
86
+ if "id" not in params:
87
+ raise MissingParameterError("Parameter missing: id")
88
+ if "id" in params and not isinstance(params["id"], int):
89
+ raise InvalidParameterError("Bad parameter: id must be an int")
90
+ Api.send_request(
91
+ "DELETE",
92
+ "/partners/{id}".format(id=params["id"]),
93
+ params,
94
+ self.options,
95
+ )
96
+
97
+ def destroy(self, params=None):
98
+ self.delete(params)
99
+
100
+ def save(self):
101
+ if hasattr(self, "id") and self.id:
102
+ new_obj = self.update(self.get_attributes())
103
+ self.set_attributes(new_obj.get_attributes())
104
+ return True
105
+ else:
106
+ new_obj = create(self.get_attributes(), self.options)
107
+ self.set_attributes(new_obj.get_attributes())
108
+ return True
109
+
110
+
111
+ # Parameters:
112
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
113
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
114
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
115
+ def list(params=None, options=None):
116
+ if not isinstance(params, dict):
117
+ params = {}
118
+ if not isinstance(options, dict):
119
+ options = {}
120
+ if "cursor" in params and not isinstance(params["cursor"], str):
121
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
122
+ if "per_page" in params and not isinstance(params["per_page"], int):
123
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
124
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
125
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
126
+ return ListObj(Partner, "GET", "/partners", params, options)
127
+
128
+
129
+ def all(params=None, options=None):
130
+ list(params, options)
131
+
132
+
133
+ # Parameters:
134
+ # id (required) - int64 - Partner ID.
135
+ def find(id, params=None, options=None):
136
+ if not isinstance(params, dict):
137
+ params = {}
138
+ if not isinstance(options, dict):
139
+ options = {}
140
+ params["id"] = id
141
+ if "id" in params and not isinstance(params["id"], int):
142
+ raise InvalidParameterError("Bad parameter: id must be an int")
143
+ if "id" not in params:
144
+ raise MissingParameterError("Parameter missing: id")
145
+ response, options = Api.send_request(
146
+ "GET", "/partners/{id}".format(id=params["id"]), params, options
147
+ )
148
+ return Partner(response.data, options)
149
+
150
+
151
+ def get(id, params=None, options=None):
152
+ find(id, params, options)
153
+
154
+
155
+ # Parameters:
156
+ # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
157
+ # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
158
+ # allow_user_creation - boolean - Allow Partner Admins to create users.
159
+ # name - string - The name of the Partner.
160
+ # notes - string - Notes about this Partner.
161
+ # root_folder - string - The root folder path for this Partner.
162
+ def create(params=None, options=None):
163
+ if not isinstance(params, dict):
164
+ params = {}
165
+ if not isinstance(options, dict):
166
+ options = {}
167
+ if "allow_bypassing_2fa_policies" in params and not isinstance(
168
+ params["allow_bypassing_2fa_policies"], bool
169
+ ):
170
+ raise InvalidParameterError(
171
+ "Bad parameter: allow_bypassing_2fa_policies must be an bool"
172
+ )
173
+ if "allow_credential_changes" in params and not isinstance(
174
+ params["allow_credential_changes"], bool
175
+ ):
176
+ raise InvalidParameterError(
177
+ "Bad parameter: allow_credential_changes must be an bool"
178
+ )
179
+ if "allow_user_creation" in params and not isinstance(
180
+ params["allow_user_creation"], bool
181
+ ):
182
+ raise InvalidParameterError(
183
+ "Bad parameter: allow_user_creation must be an bool"
184
+ )
185
+ if "name" in params and not isinstance(params["name"], str):
186
+ raise InvalidParameterError("Bad parameter: name must be an str")
187
+ if "notes" in params and not isinstance(params["notes"], str):
188
+ raise InvalidParameterError("Bad parameter: notes must be an str")
189
+ if "root_folder" in params and not isinstance(params["root_folder"], str):
190
+ raise InvalidParameterError(
191
+ "Bad parameter: root_folder must be an str"
192
+ )
193
+ response, options = Api.send_request("POST", "/partners", params, options)
194
+ return Partner(response.data, options)
195
+
196
+
197
+ # Parameters:
198
+ # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
199
+ # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
200
+ # allow_user_creation - boolean - Allow Partner Admins to create users.
201
+ # name - string - The name of the Partner.
202
+ # notes - string - Notes about this Partner.
203
+ # root_folder - string - The root folder path for this Partner.
204
+ def update(id, params=None, options=None):
205
+ if not isinstance(params, dict):
206
+ params = {}
207
+ if not isinstance(options, dict):
208
+ options = {}
209
+ params["id"] = id
210
+ if "id" in params and not isinstance(params["id"], int):
211
+ raise InvalidParameterError("Bad parameter: id must be an int")
212
+ if "allow_bypassing_2fa_policies" in params and not isinstance(
213
+ params["allow_bypassing_2fa_policies"], bool
214
+ ):
215
+ raise InvalidParameterError(
216
+ "Bad parameter: allow_bypassing_2fa_policies must be an bool"
217
+ )
218
+ if "allow_credential_changes" in params and not isinstance(
219
+ params["allow_credential_changes"], bool
220
+ ):
221
+ raise InvalidParameterError(
222
+ "Bad parameter: allow_credential_changes must be an bool"
223
+ )
224
+ if "allow_user_creation" in params and not isinstance(
225
+ params["allow_user_creation"], bool
226
+ ):
227
+ raise InvalidParameterError(
228
+ "Bad parameter: allow_user_creation must be an bool"
229
+ )
230
+ if "name" in params and not isinstance(params["name"], str):
231
+ raise InvalidParameterError("Bad parameter: name must be an str")
232
+ if "notes" in params and not isinstance(params["notes"], str):
233
+ raise InvalidParameterError("Bad parameter: notes must be an str")
234
+ if "root_folder" in params and not isinstance(params["root_folder"], str):
235
+ raise InvalidParameterError(
236
+ "Bad parameter: root_folder must be an str"
237
+ )
238
+ if "id" not in params:
239
+ raise MissingParameterError("Parameter missing: id")
240
+ response, options = Api.send_request(
241
+ "PATCH", "/partners/{id}".format(id=params["id"]), params, options
242
+ )
243
+ return Partner(response.data, options)
244
+
245
+
246
+ def delete(id, params=None, options=None):
247
+ if not isinstance(params, dict):
248
+ params = {}
249
+ if not isinstance(options, dict):
250
+ options = {}
251
+ params["id"] = id
252
+ if "id" in params and not isinstance(params["id"], int):
253
+ raise InvalidParameterError("Bad parameter: id must be an int")
254
+ if "id" not in params:
255
+ raise MissingParameterError("Parameter missing: id")
256
+ Api.send_request(
257
+ "DELETE", "/partners/{id}".format(id=params["id"]), params, options
258
+ )
259
+
260
+
261
+ def destroy(id, params=None, options=None):
262
+ delete(id, params, options)
263
+
264
+
265
+ def new(*args, **kwargs):
266
+ return Partner(*args, **kwargs)
@@ -16,6 +16,7 @@ class Permission:
16
16
  "username": None, # string - Username (if applicable)
17
17
  "group_id": None, # int64 - Group ID
18
18
  "group_name": None, # string - Group name (if applicable)
19
+ "partner_id": None, # int64 - Partner ID (if applicable)
19
20
  "permission": None, # string - Permission type. See the table referenced in the documentation for an explanation of each permission.
20
21
  "recursive": None, # boolean - Recursive: does this permission apply to subfolders?
21
22
  "site_id": None, # int64 - Site ID
@@ -76,12 +77,13 @@ class Permission:
76
77
  # Parameters:
77
78
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
78
79
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
79
- # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id` or `id`.
80
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]` or `[ user_id, group_id, path ]`.
80
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path`, `user_id`, `partner_id` or `id`.
81
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id`, `partner_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ partner_id, path ]`, `[ user_id, path ]`, `[ user_id, group_id ]`, `[ user_id, group_id, path ]`, `[ user_id, group_id, partner_id ]` or `[ user_id, group_id, partner_id, path ]`.
81
82
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
82
83
  # path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
83
84
  # include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
84
85
  # group_id - string
86
+ # partner_id - string
85
87
  # user_id - string
86
88
  def list(params=None, options=None):
87
89
  if not isinstance(params, dict):
@@ -112,6 +114,8 @@ def list(params=None, options=None):
112
114
  )
113
115
  if "group_id" in params and not isinstance(params["group_id"], str):
114
116
  raise InvalidParameterError("Bad parameter: group_id must be an str")
117
+ if "partner_id" in params and not isinstance(params["partner_id"], str):
118
+ raise InvalidParameterError("Bad parameter: partner_id must be an str")
115
119
  if "user_id" in params and not isinstance(params["user_id"], str):
116
120
  raise InvalidParameterError("Bad parameter: user_id must be an str")
117
121
  return ListObj(Permission, "GET", "/permissions", params, options)
@@ -126,6 +130,7 @@ def all(params=None, options=None):
126
130
  # group_id - int64 - Group ID. Provide `group_name` or `group_id`
127
131
  # permission - string - Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
128
132
  # recursive - boolean - Apply to subfolders recursively?
133
+ # partner_id - int64 - Partner ID if this Permission belongs to a partner.
129
134
  # user_id - int64 - User ID. Provide `username` or `user_id`
130
135
  # username - string - User username. Provide `username` or `user_id`
131
136
  # group_name - string - Group name. Provide `group_name` or `group_id`
@@ -143,6 +148,8 @@ def create(params=None, options=None):
143
148
  raise InvalidParameterError("Bad parameter: permission must be an str")
144
149
  if "recursive" in params and not isinstance(params["recursive"], bool):
145
150
  raise InvalidParameterError("Bad parameter: recursive must be an bool")
151
+ if "partner_id" in params and not isinstance(params["partner_id"], int):
152
+ raise InvalidParameterError("Bad parameter: partner_id must be an int")
146
153
  if "user_id" in params and not isinstance(params["user_id"], int):
147
154
  raise InvalidParameterError("Bad parameter: user_id must be an int")
148
155
  if "username" in params and not isinstance(params["username"], str):
@@ -26,7 +26,7 @@ class SsoStrategy:
26
26
  "scim_username": None, # string - SCIM username.
27
27
  "scim_oauth_access_token": None, # string - SCIM OAuth Access Token.
28
28
  "scim_oauth_access_token_expires_at": None, # string - SCIM OAuth Access Token Expiration Time.
29
- "subdomain": None, # string - Subdomain
29
+ "subdomain": None, # string - Subdomain or domain name for your auth provider. Example: `https://[subdomain].okta.com/`
30
30
  "provision_users": None, # boolean - Auto-provision users?
31
31
  "provision_groups": None, # boolean - Auto-provision group membership based on group memberships on the SSO side?
32
32
  "deprovision_users": None, # boolean - Auto-deprovision users?
@@ -47,6 +47,7 @@ class SsoStrategy:
47
47
  "provision_time_zone": None, # string - Default time zone for auto provisioned users.
48
48
  "provision_company": None, # string - Default company for auto provisioned users.
49
49
  "provision_require_2fa": None, # string - 2FA required setting for auto provisioned users.
50
+ "provision_filesystem_layout": None, # string - File System layout to use for auto provisioned users.
50
51
  "provider_identifier": None, # string - URL-friendly, unique identifier for Azure SAML configuration
51
52
  "ldap_base_dn": None, # string - Base DN for looking up users in LDAP server
52
53
  "ldap_domain": None, # string - Domain name that will be appended to LDAP usernames
files_sdk/models/user.py CHANGED
@@ -28,6 +28,7 @@ class User:
28
28
  "disabled": None, # boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
29
29
  "disabled_expired_or_inactive": None, # boolean - Computed property that returns true if user disabled or expired or inactive.
30
30
  "email": None, # email - User email address
31
+ "filesystem_layout": None, # string - File system layout
31
32
  "first_login_at": None, # date-time - User's first login time
32
33
  "ftp_permission": None, # boolean - Can the user access with FTP/FTPS?
33
34
  "group_ids": None, # string - Comma-separated list of group IDs of which this user is a member
@@ -49,6 +50,7 @@ class User:
49
50
  "notes": None, # string - Any internal notes on the user
50
51
  "notification_daily_send_time": None, # int64 - Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
51
52
  "office_integration_enabled": None, # boolean - Enable integration with Office for the web?
53
+ "partner_id": None, # int64 - Partner ID if this user belongs to a Partner
52
54
  "password_set_at": None, # date-time - Last time the user's password was set
53
55
  "password_validity_days": None, # int64 - Number of days to allow user to use the same password
54
56
  "public_keys_count": None, # int64 - Number of public keys associated with this user
@@ -190,6 +192,7 @@ class User:
190
192
  # bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
191
193
  # dav_permission - boolean - Can the user connect with WebDAV?
192
194
  # disabled - boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
195
+ # filesystem_layout - string - File system layout
193
196
  # ftp_permission - boolean - Can the user access with FTP/FTPS?
194
197
  # header_text - string - Text to display to the user in the header of the UI
195
198
  # language - string - Preferred language
@@ -198,6 +201,7 @@ class User:
198
201
  # company - string - User's company
199
202
  # notes - string - Any internal notes on the user
200
203
  # office_integration_enabled - boolean - Enable integration with Office for the web?
204
+ # partner_id - int64 - Partner ID if this user belongs to a Partner
201
205
  # password_validity_days - int64 - Number of days to allow user to use the same password
202
206
  # readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
203
207
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -291,6 +295,12 @@ class User:
291
295
  raise InvalidParameterError(
292
296
  "Bad parameter: authentication_method must be an str"
293
297
  )
298
+ if "filesystem_layout" in params and not isinstance(
299
+ params["filesystem_layout"], str
300
+ ):
301
+ raise InvalidParameterError(
302
+ "Bad parameter: filesystem_layout must be an str"
303
+ )
294
304
  if "header_text" in params and not isinstance(
295
305
  params["header_text"], str
296
306
  ):
@@ -315,6 +325,12 @@ class User:
315
325
  )
316
326
  if "notes" in params and not isinstance(params["notes"], str):
317
327
  raise InvalidParameterError("Bad parameter: notes must be an str")
328
+ if "partner_id" in params and not isinstance(
329
+ params["partner_id"], int
330
+ ):
331
+ raise InvalidParameterError(
332
+ "Bad parameter: partner_id must be an int"
333
+ )
318
334
  if "password_validity_days" in params and not isinstance(
319
335
  params["password_validity_days"], int
320
336
  ):
@@ -515,6 +531,7 @@ def get(id, params=None, options=None):
515
531
  # bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
516
532
  # dav_permission - boolean - Can the user connect with WebDAV?
517
533
  # disabled - boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
534
+ # filesystem_layout - string - File system layout
518
535
  # ftp_permission - boolean - Can the user access with FTP/FTPS?
519
536
  # header_text - string - Text to display to the user in the header of the UI
520
537
  # language - string - Preferred language
@@ -523,6 +540,7 @@ def get(id, params=None, options=None):
523
540
  # company - string - User's company
524
541
  # notes - string - Any internal notes on the user
525
542
  # office_integration_enabled - boolean - Enable integration with Office for the web?
543
+ # partner_id - int64 - Partner ID if this user belongs to a Partner
526
544
  # password_validity_days - int64 - Number of days to allow user to use the same password
527
545
  # readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
528
546
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -644,6 +662,12 @@ def create(params=None, options=None):
644
662
  )
645
663
  if "disabled" in params and not isinstance(params["disabled"], bool):
646
664
  raise InvalidParameterError("Bad parameter: disabled must be an bool")
665
+ if "filesystem_layout" in params and not isinstance(
666
+ params["filesystem_layout"], str
667
+ ):
668
+ raise InvalidParameterError(
669
+ "Bad parameter: filesystem_layout must be an str"
670
+ )
647
671
  if "ftp_permission" in params and not isinstance(
648
672
  params["ftp_permission"], bool
649
673
  ):
@@ -674,6 +698,8 @@ def create(params=None, options=None):
674
698
  raise InvalidParameterError(
675
699
  "Bad parameter: office_integration_enabled must be an bool"
676
700
  )
701
+ if "partner_id" in params and not isinstance(params["partner_id"], int):
702
+ raise InvalidParameterError("Bad parameter: partner_id must be an int")
677
703
  if "password_validity_days" in params and not isinstance(
678
704
  params["password_validity_days"], int
679
705
  ):
@@ -844,6 +870,7 @@ def user_2fa_reset(id, params=None, options=None):
844
870
  # bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
845
871
  # dav_permission - boolean - Can the user connect with WebDAV?
846
872
  # disabled - boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
873
+ # filesystem_layout - string - File system layout
847
874
  # ftp_permission - boolean - Can the user access with FTP/FTPS?
848
875
  # header_text - string - Text to display to the user in the header of the UI
849
876
  # language - string - Preferred language
@@ -852,6 +879,7 @@ def user_2fa_reset(id, params=None, options=None):
852
879
  # company - string - User's company
853
880
  # notes - string - Any internal notes on the user
854
881
  # office_integration_enabled - boolean - Enable integration with Office for the web?
882
+ # partner_id - int64 - Partner ID if this user belongs to a Partner
855
883
  # password_validity_days - int64 - Number of days to allow user to use the same password
856
884
  # readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
857
885
  # receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
@@ -977,6 +1005,12 @@ def update(id, params=None, options=None):
977
1005
  )
978
1006
  if "disabled" in params and not isinstance(params["disabled"], bool):
979
1007
  raise InvalidParameterError("Bad parameter: disabled must be an bool")
1008
+ if "filesystem_layout" in params and not isinstance(
1009
+ params["filesystem_layout"], str
1010
+ ):
1011
+ raise InvalidParameterError(
1012
+ "Bad parameter: filesystem_layout must be an str"
1013
+ )
980
1014
  if "ftp_permission" in params and not isinstance(
981
1015
  params["ftp_permission"], bool
982
1016
  ):
@@ -1007,6 +1041,8 @@ def update(id, params=None, options=None):
1007
1041
  raise InvalidParameterError(
1008
1042
  "Bad parameter: office_integration_enabled must be an bool"
1009
1043
  )
1044
+ if "partner_id" in params and not isinstance(params["partner_id"], int):
1045
+ raise InvalidParameterError("Bad parameter: partner_id must be an int")
1010
1046
  if "password_validity_days" in params and not isinstance(
1011
1047
  params["password_validity_days"], int
1012
1048
  ):