files-com 1.6.35__py3-none-any.whl → 1.6.37__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.35
1
+ 1.6.37
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: files_com
3
- Version: 1.6.35
3
+ Version: 1.6.37
4
4
  Summary: Python bindings for the Files.com API
5
5
  License: MIT
6
6
  Requires-Python: >=3.5
@@ -1,7 +1,7 @@
1
1
  README.md,sha256=dJpTjuJA-JJIQ4CKgQhlbqyxanVatHk0RXgCD6KFl3A,28758
2
- _VERSION,sha256=Gr45rAYdu_yBMF7AVaNusW2byvi1dnBda2uQXGYRpg4,7
3
- files_com-1.6.35.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
- files_sdk/__init__.py,sha256=rLeHAMLQWYD4oVipgT0ziSIRlAgUysgACudNyJpNFto,12884
2
+ _VERSION,sha256=c_bwibd01s8WxbcIFYzS-b4j2PPFIu_K-BD9UQVUQTs,7
3
+ files_com-1.6.37.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
+ files_sdk/__init__.py,sha256=sDU0bQYKeO50fL7gYwqRMBdZ1h4IgECsq7PQMoxEJqU,12884
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=lZKht6lYj9i99CzRbHschmdSs6T2Y51-YrZX_5Y_o7A,64945
@@ -106,13 +106,13 @@ files_sdk/models/usage_by_top_level_dir.py,sha256=o_dETvzcgEA9lsdES_yzwPVAZVFk4Z
106
106
  files_sdk/models/usage_daily_snapshot.py,sha256=rWf6GaTlN9spkUPwfF4IJ0Y6z-JTV9TAWjsFrxI-UFg,5477
107
107
  files_sdk/models/usage_snapshot.py,sha256=3GzMIxBjKelgNP7ksWq4XlrRlAFcYxzd_J6vAgb52qc,4005
108
108
  files_sdk/models/user.py,sha256=VRpgFNf8rSddzSRb62hXLq7YeVHkVuTzPrQ6jTJkQX4,59714
109
- files_sdk/models/user_cipher_use.py,sha256=FugKNQhWaRuqxLiYabpXeskk9DcWVVCN2iL7A3xY-pM,3011
110
- files_sdk/models/user_lifecycle_rule.py,sha256=UfCRC2zPN-G-Z08_MJ7TrqEBS85L12xOGoMWeaPCjIM,12842
109
+ files_sdk/models/user_cipher_use.py,sha256=eacHlfveNCKnPyX1eh3e1FWYxsAWG6eWbFLGZFfMyFc,4909
110
+ files_sdk/models/user_lifecycle_rule.py,sha256=xtWi5uGVPo2xBlGDL2DULLa_ynnPG_jpKdze_rqobpU,12304
111
111
  files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6qxgU,6187
112
112
  files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
113
113
  files_sdk/models/web_dav_action_log.py,sha256=uMTIkTgSpW5mgKAEWnCmI4U5eqcAL2g8OHqB-lBir3A,76424
114
114
  files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
115
- files_com-1.6.35.dist-info/METADATA,sha256=YbgNN1UxNSlYF47qB8U5YyYAs9lPUyzQgwmTixcALsA,29050
116
- files_com-1.6.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
117
- files_com-1.6.35.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
118
- files_com-1.6.35.dist-info/RECORD,,
115
+ files_com-1.6.37.dist-info/METADATA,sha256=eEzdjxgQokbikuEp-qixBekBtKfX5XJnN5cMbDDaDA4,29050
116
+ files_com-1.6.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
117
+ files_com-1.6.37.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
118
+ files_com-1.6.37.dist-info/RECORD,,
files_sdk/__init__.py CHANGED
@@ -223,7 +223,7 @@ session_id = None
223
223
  source_ip = None
224
224
  base_url = "https://app.files.com"
225
225
  base_path = "api/rest/v1"
226
- version = "1.6.35"
226
+ version = "1.6.37"
227
227
 
228
228
  __version__ = version
229
229
 
@@ -46,6 +46,12 @@ class UserCipherUse:
46
46
  # user_id - int64 - User ID. If provided, will return uses for this user.
47
47
  # 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.
48
48
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
49
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `updated_at`.
50
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `insecure` and `updated_at`. Valid field combinations are `[ insecure, updated_at ]`.
51
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `updated_at`.
52
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
53
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
54
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
49
55
  def list(params=None, options=None):
50
56
  if not isinstance(params, dict):
51
57
  params = {}
@@ -57,6 +63,22 @@ def list(params=None, options=None):
57
63
  raise InvalidParameterError("Bad parameter: cursor must be an str")
58
64
  if "per_page" in params and not isinstance(params["per_page"], int):
59
65
  raise InvalidParameterError("Bad parameter: per_page must be an int")
66
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
67
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
68
+ if "filter" in params and not isinstance(params["filter"], dict):
69
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
70
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
71
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
72
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
73
+ raise InvalidParameterError(
74
+ "Bad parameter: filter_gteq must be an dict"
75
+ )
76
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
77
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
78
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
79
+ raise InvalidParameterError(
80
+ "Bad parameter: filter_lteq must be an dict"
81
+ )
60
82
  return ListObj(UserCipherUse, "GET", "/user_cipher_uses", params, options)
61
83
 
62
84
 
@@ -17,6 +17,7 @@ class UserLifecycleRule:
17
17
  "include_site_admins": None, # boolean - Include site admins in the rule
18
18
  "action": None, # string - Action to take on inactive users (disable or delete)
19
19
  "user_state": None, # string - State of the users to apply the rule to (inactive or disabled)
20
+ "name": None, # string - User Lifecycle Rule name
20
21
  "site_id": None, # int64 - Site ID
21
22
  }
22
23
 
@@ -43,12 +44,13 @@ class UserLifecycleRule:
43
44
  }
44
45
 
45
46
  # 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
47
+ # action - string - Action to take on inactive users (disable or delete)
48
+ # authentication_method - string - User authentication method for the rule
49
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies
49
50
  # include_site_admins - boolean - Include site admins in the rule
50
51
  # include_folder_admins - boolean - Include folder admins in the rule
51
52
  # user_state - string - State of the users to apply the rule to (inactive or disabled)
53
+ # name - string - User Lifecycle Rule name
52
54
  def update(self, params=None):
53
55
  if not isinstance(params, dict):
54
56
  params = {}
@@ -59,14 +61,6 @@ class UserLifecycleRule:
59
61
  raise MissingParameterError("Current object doesn't have a id")
60
62
  if "id" not in params:
61
63
  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
64
  if "id" in params and not isinstance(params["id"], int):
71
65
  raise InvalidParameterError("Bad parameter: id must be an int")
72
66
  if "action" in params and not isinstance(params["action"], str):
@@ -89,6 +83,8 @@ class UserLifecycleRule:
89
83
  raise InvalidParameterError(
90
84
  "Bad parameter: user_state must be an str"
91
85
  )
86
+ if "name" in params and not isinstance(params["name"], str):
87
+ raise InvalidParameterError("Bad parameter: name must be an str")
92
88
  response, _options = Api.send_request(
93
89
  "PATCH",
94
90
  "/user_lifecycle_rules/{id}".format(id=params["id"]),
@@ -177,12 +173,13 @@ def get(id, params=None, options=None):
177
173
 
178
174
 
179
175
  # 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
176
+ # action - string - Action to take on inactive users (disable or delete)
177
+ # authentication_method - string - User authentication method for the rule
178
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies
183
179
  # include_site_admins - boolean - Include site admins in the rule
184
180
  # include_folder_admins - boolean - Include folder admins in the rule
185
181
  # user_state - string - State of the users to apply the rule to (inactive or disabled)
182
+ # name - string - User Lifecycle Rule name
186
183
  def create(params=None, options=None):
187
184
  if not isinstance(params, dict):
188
185
  params = {}
@@ -216,12 +213,8 @@ def create(params=None, options=None):
216
213
  )
217
214
  if "user_state" in params and not isinstance(params["user_state"], str):
218
215
  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")
216
+ if "name" in params and not isinstance(params["name"], str):
217
+ raise InvalidParameterError("Bad parameter: name must be an str")
225
218
  response, options = Api.send_request(
226
219
  "POST", "/user_lifecycle_rules", params, options
227
220
  )
@@ -229,12 +222,13 @@ def create(params=None, options=None):
229
222
 
230
223
 
231
224
  # 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
225
+ # action - string - Action to take on inactive users (disable or delete)
226
+ # authentication_method - string - User authentication method for the rule
227
+ # inactivity_days - int64 - Number of days of inactivity before the rule applies
235
228
  # include_site_admins - boolean - Include site admins in the rule
236
229
  # include_folder_admins - boolean - Include folder admins in the rule
237
230
  # user_state - string - State of the users to apply the rule to (inactive or disabled)
231
+ # name - string - User Lifecycle Rule name
238
232
  def update(id, params=None, options=None):
239
233
  if not isinstance(params, dict):
240
234
  params = {}
@@ -271,14 +265,10 @@ def update(id, params=None, options=None):
271
265
  )
272
266
  if "user_state" in params and not isinstance(params["user_state"], str):
273
267
  raise InvalidParameterError("Bad parameter: user_state must be an str")
268
+ if "name" in params and not isinstance(params["name"], str):
269
+ raise InvalidParameterError("Bad parameter: name must be an str")
274
270
  if "id" not in params:
275
271
  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
272
  response, options = Api.send_request(
283
273
  "PATCH",
284
274
  "/user_lifecycle_rules/{id}".format(id=params["id"]),