files-com 1.6.32__py3-none-any.whl → 1.6.137__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.
Files changed (49) hide show
  1. README.md +81 -18
  2. _VERSION +1 -1
  3. {files_com-1.6.32.dist-info → files_com-1.6.137.dist-info}/METADATA +82 -19
  4. {files_com-1.6.32.dist-info → files_com-1.6.137.dist-info}/RECORD +49 -46
  5. files_sdk/__init__.py +9 -1
  6. files_sdk/error.py +113 -23
  7. files_sdk/models/__init__.py +5 -0
  8. files_sdk/models/api_key.py +10 -0
  9. files_sdk/models/api_request_log.py +6 -6
  10. files_sdk/models/automation.py +48 -5
  11. files_sdk/models/automation_log.py +6 -6
  12. files_sdk/models/behavior.py +2 -2
  13. files_sdk/models/bundle_action.py +5 -1
  14. files_sdk/models/bundle_registration.py +1 -1
  15. files_sdk/models/child_site_management_policy.py +278 -0
  16. files_sdk/models/email_log.py +5 -12
  17. files_sdk/models/exavault_api_request_log.py +6 -6
  18. files_sdk/models/file.py +8 -0
  19. files_sdk/models/file_migration_log.py +5 -12
  20. files_sdk/models/folder.py +11 -1
  21. files_sdk/models/ftp_action_log.py +6 -6
  22. files_sdk/models/gpg_key.py +29 -9
  23. files_sdk/models/history_export.py +4 -4
  24. files_sdk/models/history_export_result.py +2 -2
  25. files_sdk/models/inbox_registration.py +1 -1
  26. files_sdk/models/invoice_line_item.py +5 -0
  27. files_sdk/models/outbound_connection_log.py +6 -6
  28. files_sdk/models/partner.py +296 -0
  29. files_sdk/models/permission.py +10 -2
  30. files_sdk/models/public_hosting_request_log.py +6 -6
  31. files_sdk/models/public_key.py +7 -3
  32. files_sdk/models/remote_mount_backend.py +1 -0
  33. files_sdk/models/remote_server.py +65 -91
  34. files_sdk/models/remote_server_configuration_file.py +1 -0
  35. files_sdk/models/scim_log.py +88 -0
  36. files_sdk/models/sftp_action_log.py +6 -6
  37. files_sdk/models/siem_http_destination.py +98 -19
  38. files_sdk/models/site.py +37 -12
  39. files_sdk/models/sso_strategy.py +2 -1
  40. files_sdk/models/sync.py +74 -10
  41. files_sdk/models/sync_log.py +7 -13
  42. files_sdk/models/sync_run.py +31 -17
  43. files_sdk/models/user.py +79 -2
  44. files_sdk/models/user_cipher_use.py +24 -1
  45. files_sdk/models/user_lifecycle_rule.py +81 -40
  46. files_sdk/models/web_dav_action_log.py +6 -6
  47. {files_com-1.6.32.dist-info → files_com-1.6.137.dist-info}/WHEEL +0 -0
  48. {files_com-1.6.32.dist-info → files_com-1.6.137.dist-info}/licenses/LICENSE +0 -0
  49. {files_com-1.6.32.dist-info → files_com-1.6.137.dist-info}/top_level.txt +0 -0
@@ -11,13 +11,17 @@ from files_sdk.error import ( # noqa: F401
11
11
  class UserLifecycleRule:
12
12
  default_attributes = {
13
13
  "id": None, # int64 - User Lifecycle Rule ID
14
- "authentication_method": None, # string - User authentication method for the rule
15
- "inactivity_days": None, # int64 - Number of days of inactivity before the rule applies
16
- "include_folder_admins": None, # boolean - Include folder admins in the rule
17
- "include_site_admins": None, # boolean - Include site admins in the rule
14
+ "authentication_method": None, # string - User authentication method for which the rule will apply.
15
+ "group_ids": None, # array(int64) - Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
18
16
  "action": None, # string - Action to take on inactive users (disable or delete)
19
- "user_state": None, # string - State of the users to apply the rule to (inactive or disabled)
17
+ "inactivity_days": None, # int64 - Number of days of inactivity before the rule applies
18
+ "include_folder_admins": None, # boolean - If true, the rule will apply to folder admins.
19
+ "include_site_admins": None, # boolean - If true, the rule will apply to site admins.
20
+ "name": None, # string - User Lifecycle Rule name
21
+ "partner_tag": None, # string - If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
20
22
  "site_id": None, # int64 - Site ID
23
+ "user_state": None, # string - State of the users to apply the rule to (inactive or disabled)
24
+ "user_tag": None, # string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
21
25
  }
22
26
 
23
27
  def __init__(self, attributes=None, options=None):
@@ -43,12 +47,16 @@ class UserLifecycleRule:
43
47
  }
44
48
 
45
49
  # Parameters:
46
- # action (required) - string - Action to take on inactive users (disable or delete)
47
- # authentication_method (required) - string - User authentication method for the rule
48
- # inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
49
- # include_site_admins - boolean - Include site admins in the rule
50
- # include_folder_admins - boolean - Include folder admins in the rule
50
+ # action - string - Action to take on inactive users (disable or delete)
51
+ # authentication_method - string - User authentication method for which the rule will apply.
52
+ # group_ids - array(int64) - Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
53
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies
54
+ # include_site_admins - boolean - If true, the rule will apply to site admins.
55
+ # include_folder_admins - boolean - If true, the rule will apply to folder admins.
56
+ # name - string - User Lifecycle Rule name
57
+ # partner_tag - string - If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
51
58
  # user_state - string - State of the users to apply the rule to (inactive or disabled)
59
+ # user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
52
60
  def update(self, params=None):
53
61
  if not isinstance(params, dict):
54
62
  params = {}
@@ -59,14 +67,6 @@ class UserLifecycleRule:
59
67
  raise MissingParameterError("Current object doesn't have a id")
60
68
  if "id" not in params:
61
69
  raise MissingParameterError("Parameter missing: id")
62
- if "action" not in params:
63
- raise MissingParameterError("Parameter missing: action")
64
- if "authentication_method" not in params:
65
- raise MissingParameterError(
66
- "Parameter missing: authentication_method"
67
- )
68
- if "inactivity_days" not in params:
69
- raise MissingParameterError("Parameter missing: inactivity_days")
70
70
  if "id" in params and not isinstance(params["id"], int):
71
71
  raise InvalidParameterError("Bad parameter: id must be an int")
72
72
  if "action" in params and not isinstance(params["action"], str):
@@ -77,18 +77,36 @@ class UserLifecycleRule:
77
77
  raise InvalidParameterError(
78
78
  "Bad parameter: authentication_method must be an str"
79
79
  )
80
+ if "group_ids" in params and not isinstance(
81
+ params["group_ids"], builtins.list
82
+ ):
83
+ raise InvalidParameterError(
84
+ "Bad parameter: group_ids must be an list"
85
+ )
80
86
  if "inactivity_days" in params and not isinstance(
81
87
  params["inactivity_days"], int
82
88
  ):
83
89
  raise InvalidParameterError(
84
90
  "Bad parameter: inactivity_days must be an int"
85
91
  )
92
+ if "name" in params and not isinstance(params["name"], str):
93
+ raise InvalidParameterError("Bad parameter: name must be an str")
94
+ if "partner_tag" in params and not isinstance(
95
+ params["partner_tag"], str
96
+ ):
97
+ raise InvalidParameterError(
98
+ "Bad parameter: partner_tag must be an str"
99
+ )
86
100
  if "user_state" in params and not isinstance(
87
101
  params["user_state"], str
88
102
  ):
89
103
  raise InvalidParameterError(
90
104
  "Bad parameter: user_state must be an str"
91
105
  )
106
+ if "user_tag" in params and not isinstance(params["user_tag"], str):
107
+ raise InvalidParameterError(
108
+ "Bad parameter: user_tag must be an str"
109
+ )
92
110
  response, _options = Api.send_request(
93
111
  "PATCH",
94
112
  "/user_lifecycle_rules/{id}".format(id=params["id"]),
@@ -133,6 +151,7 @@ class UserLifecycleRule:
133
151
  # Parameters:
134
152
  # 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.
135
153
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
154
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`.
136
155
  def list(params=None, options=None):
137
156
  if not isinstance(params, dict):
138
157
  params = {}
@@ -142,6 +161,8 @@ def list(params=None, options=None):
142
161
  raise InvalidParameterError("Bad parameter: cursor must be an str")
143
162
  if "per_page" in params and not isinstance(params["per_page"], int):
144
163
  raise InvalidParameterError("Bad parameter: per_page must be an int")
164
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
165
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
145
166
  return ListObj(
146
167
  UserLifecycleRule, "GET", "/user_lifecycle_rules", params, options
147
168
  )
@@ -177,12 +198,16 @@ def get(id, params=None, options=None):
177
198
 
178
199
 
179
200
  # Parameters:
180
- # action (required) - string - Action to take on inactive users (disable or delete)
181
- # authentication_method (required) - string - User authentication method for the rule
182
- # inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
183
- # include_site_admins - boolean - Include site admins in the rule
184
- # include_folder_admins - boolean - Include folder admins in the rule
201
+ # action - string - Action to take on inactive users (disable or delete)
202
+ # authentication_method - string - User authentication method for which the rule will apply.
203
+ # group_ids - array(int64) - Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
204
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies
205
+ # include_site_admins - boolean - If true, the rule will apply to site admins.
206
+ # include_folder_admins - boolean - If true, the rule will apply to folder admins.
207
+ # name - string - User Lifecycle Rule name
208
+ # partner_tag - string - If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
185
209
  # user_state - string - State of the users to apply the rule to (inactive or disabled)
210
+ # user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
186
211
  def create(params=None, options=None):
187
212
  if not isinstance(params, dict):
188
213
  params = {}
@@ -196,6 +221,10 @@ def create(params=None, options=None):
196
221
  raise InvalidParameterError(
197
222
  "Bad parameter: authentication_method must be an str"
198
223
  )
224
+ if "group_ids" in params and not isinstance(
225
+ params["group_ids"], builtins.list
226
+ ):
227
+ raise InvalidParameterError("Bad parameter: group_ids must be an list")
199
228
  if "inactivity_days" in params and not isinstance(
200
229
  params["inactivity_days"], int
201
230
  ):
@@ -214,14 +243,16 @@ def create(params=None, options=None):
214
243
  raise InvalidParameterError(
215
244
  "Bad parameter: include_folder_admins must be an bool"
216
245
  )
246
+ if "name" in params and not isinstance(params["name"], str):
247
+ raise InvalidParameterError("Bad parameter: name must be an str")
248
+ if "partner_tag" in params and not isinstance(params["partner_tag"], str):
249
+ raise InvalidParameterError(
250
+ "Bad parameter: partner_tag must be an str"
251
+ )
217
252
  if "user_state" in params and not isinstance(params["user_state"], str):
218
253
  raise InvalidParameterError("Bad parameter: user_state must be an str")
219
- if "action" not in params:
220
- raise MissingParameterError("Parameter missing: action")
221
- if "authentication_method" not in params:
222
- raise MissingParameterError("Parameter missing: authentication_method")
223
- if "inactivity_days" not in params:
224
- raise MissingParameterError("Parameter missing: inactivity_days")
254
+ if "user_tag" in params and not isinstance(params["user_tag"], str):
255
+ raise InvalidParameterError("Bad parameter: user_tag must be an str")
225
256
  response, options = Api.send_request(
226
257
  "POST", "/user_lifecycle_rules", params, options
227
258
  )
@@ -229,12 +260,16 @@ def create(params=None, options=None):
229
260
 
230
261
 
231
262
  # Parameters:
232
- # action (required) - string - Action to take on inactive users (disable or delete)
233
- # authentication_method (required) - string - User authentication method for the rule
234
- # inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
235
- # include_site_admins - boolean - Include site admins in the rule
236
- # include_folder_admins - boolean - Include folder admins in the rule
263
+ # action - string - Action to take on inactive users (disable or delete)
264
+ # authentication_method - string - User authentication method for which the rule will apply.
265
+ # group_ids - array(int64) - Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.
266
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies
267
+ # include_site_admins - boolean - If true, the rule will apply to site admins.
268
+ # include_folder_admins - boolean - If true, the rule will apply to folder admins.
269
+ # name - string - User Lifecycle Rule name
270
+ # partner_tag - string - If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
237
271
  # user_state - string - State of the users to apply the rule to (inactive or disabled)
272
+ # user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
238
273
  def update(id, params=None, options=None):
239
274
  if not isinstance(params, dict):
240
275
  params = {}
@@ -251,6 +286,10 @@ def update(id, params=None, options=None):
251
286
  raise InvalidParameterError(
252
287
  "Bad parameter: authentication_method must be an str"
253
288
  )
289
+ if "group_ids" in params and not isinstance(
290
+ params["group_ids"], builtins.list
291
+ ):
292
+ raise InvalidParameterError("Bad parameter: group_ids must be an list")
254
293
  if "inactivity_days" in params and not isinstance(
255
294
  params["inactivity_days"], int
256
295
  ):
@@ -269,16 +308,18 @@ def update(id, params=None, options=None):
269
308
  raise InvalidParameterError(
270
309
  "Bad parameter: include_folder_admins must be an bool"
271
310
  )
311
+ if "name" in params and not isinstance(params["name"], str):
312
+ raise InvalidParameterError("Bad parameter: name must be an str")
313
+ if "partner_tag" in params and not isinstance(params["partner_tag"], str):
314
+ raise InvalidParameterError(
315
+ "Bad parameter: partner_tag must be an str"
316
+ )
272
317
  if "user_state" in params and not isinstance(params["user_state"], str):
273
318
  raise InvalidParameterError("Bad parameter: user_state must be an str")
319
+ if "user_tag" in params and not isinstance(params["user_tag"], str):
320
+ raise InvalidParameterError("Bad parameter: user_tag must be an str")
274
321
  if "id" not in params:
275
322
  raise MissingParameterError("Parameter missing: id")
276
- if "action" not in params:
277
- raise MissingParameterError("Parameter missing: action")
278
- if "authentication_method" not in params:
279
- raise MissingParameterError("Parameter missing: authentication_method")
280
- if "inactivity_days" not in params:
281
- raise MissingParameterError("Parameter missing: inactivity_days")
282
323
  response, options = Api.send_request(
283
324
  "PATCH",
284
325
  "/user_lifecycle_rules/{id}".format(id=params["id"]),