files-com 1.6.78__py3-none-any.whl → 1.6.80__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.78
1
+ 1.6.80
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: files_com
3
- Version: 1.6.78
3
+ Version: 1.6.80
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=1Rj6T45hiVlUVx3J-b3E4n3JnWQSEEkuNibBeYzwgWQ,31440
2
- _VERSION,sha256=jcTwNe2bmhfxwgVsK-lD8M8dsMNSmhyKofKujf4QyBw,7
3
- files_com-1.6.78.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
- files_sdk/__init__.py,sha256=EJV3CsJvaJEeaTb7OcfPTgzOae6wg8A-wLj-vDuE6rw,13241
2
+ _VERSION,sha256=O1CAsWcXvJ-I15fD6MFv1nNBfGHoXL5xGHYh6XbqOoA,7
3
+ files_com-1.6.80.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
+ files_sdk/__init__.py,sha256=hinmPAH82Oxp-Za7u19VeXvGbbM1Th_i1RuRAluYY94,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
@@ -52,7 +52,7 @@ files_sdk/models/folder.py,sha256=KCKbx5FlRSzxm5JJmDpdZbAev7PmrGmdUusPKWJi44A,11
52
52
  files_sdk/models/form_field.py,sha256=xaaLnvctZ3Do5lnppn-s6UQguzfsyVpfdmz-Ykij9Nw,1509
53
53
  files_sdk/models/form_field_set.py,sha256=7hms9QZNWmSoCdZZUsYoQvTaT5lmDwDGz5YdwBZxOq8,10528
54
54
  files_sdk/models/ftp_action_log.py,sha256=ozCEqTrOEfzBrvlIPuhsVLaVSRj8MhtThVHjsJUog54,168594
55
- files_sdk/models/gpg_key.py,sha256=6lwNuDCj3q5YlPOSlliE7TGpof25FB58Stu-07SHFxo,12961
55
+ files_sdk/models/gpg_key.py,sha256=A3v_treHG66rMef9ogJdP46CamxlfjFU84CmLpMVLHA,13832
56
56
  files_sdk/models/group.py,sha256=NCWhnhjBK8jAeCgLp2qYLV2lURxuSD1QO4EsmTF_tzw,16062
57
57
  files_sdk/models/group_user.py,sha256=ZVl2vQ2FuPFC9YW5Geo9iST438eLvs6Pc_BlQRGg9Sg,10087
58
58
  files_sdk/models/history.py,sha256=Elc04ji3rWWhEc68KzPzcEeCqfMSA4Jmjb9sAZ4LvKc,14138
@@ -73,23 +73,23 @@ 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
+ files_sdk/models/partner.py,sha256=hjEidtWBMny4vRP_42dlL_yKs2U1pOmpzCNVTGKH7u8,12701
77
77
  files_sdk/models/payment.py,sha256=UUWxK3x2RVYQdRAWeA-WA_Oegh5TDXYPQA_m3BYd0bQ,3753
78
78
  files_sdk/models/payment_line_item.py,sha256=x97h4kBtul5S1EqI_jskhbebnucwA-EOnQn1oV8Hid0,1284
79
- files_sdk/models/permission.py,sha256=ck4mVLYsX6trNyURAKsm8NDt2S8tCdT0ogL3TKZeaNY,9339
79
+ files_sdk/models/permission.py,sha256=llVIdqsQjP7xcTPN-GuaP17hQ0GvQhKHIQhcafyg9mk,9410
80
80
  files_sdk/models/preview.py,sha256=XaKqSEC0RPBW87Kt6qlvRLeui5YeA6JUumUoZKMvARU,1347
81
81
  files_sdk/models/priority.py,sha256=kByzhOOVwKVSxrMI5xJb1RwUtQdSuFFBLBNEHYzWSm0,2680
82
82
  files_sdk/models/project.py,sha256=nDpX0qc7jY6evRprjQ7l4YgjM9WNH0aXaRbE2mpo6zk,7510
83
83
  files_sdk/models/public_hosting_request_log.py,sha256=YOgcT8NX-x7Ag5ti2KU8npPRIjFItpbTHBo_ARhVtyc,7641
84
84
  files_sdk/models/public_ip_address.py,sha256=5VSlJ4PZQilV6tpGRCnyvGJzqRzdSRpwVDZxKwsplcU,1259
85
- files_sdk/models/public_key.py,sha256=kY00rMoKiYCNwQFNmv1s3M8MQOSR98lMTMBhjKMe_Es,12502
85
+ files_sdk/models/public_key.py,sha256=3cxoQAD3TdBGgSKHtDeYT1NIKytmPi80jHiNL62jUaY,12809
86
86
  files_sdk/models/remote_bandwidth_snapshot.py,sha256=kryNewGqe_ZN4D3JBL26DoVYKDowubUNLXn7NQtEJb8,4476
87
87
  files_sdk/models/remote_mount_backend.py,sha256=TZ6pLJPLy8se4poHMuREHYNavCOKiznBxPLti008CBY,19360
88
88
  files_sdk/models/remote_server.py,sha256=PIIHCW53MkSfFGnkkv2ArYWDkIcgvQ95B7EEBkgMukk,82993
89
89
  files_sdk/models/remote_server_configuration_file.py,sha256=So6cK83z_6xwLnHJYgEwzSb9eBkDK5XG2Q4k8kp9nno,3476
90
90
  files_sdk/models/request.py,sha256=mWOS36b5pRiAZqDuf1tGidw-FAikYPDqfv5LXdDJA9Q,8867
91
91
  files_sdk/models/restore.py,sha256=ukXp-fwsuGFhWl2ULAEWiKarIY3DjOIk3x3hHlshjqE,6685
92
- files_sdk/models/scim_log.py,sha256=9Od-mgove1I1yP48iA_a70p66tJGEzJ1-QplG1JeSwo,3053
92
+ files_sdk/models/scim_log.py,sha256=4j_IynVzpnSttAUAxTGhT2t56_Mx7KNvZdhVplxLmPM,3747
93
93
  files_sdk/models/session.py,sha256=kgRwlDHDtwyMA3U9rk2T37Wfoo8VVr76vwLcZyaJJxM,3790
94
94
  files_sdk/models/settings_change.py,sha256=KdcDdnJVPJGRLLx-W_7pTXSJ5TJnjNHADjU9MnSr2tc,3412
95
95
  files_sdk/models/sftp_action_log.py,sha256=aNEEgou4oAnNybSmscLHYDewqcumEI38OGgFYTgAXZo,169102
@@ -104,18 +104,18 @@ files_sdk/models/status.py,sha256=IIY3RiJ2RZ2yPByAAh8eIq_cgZFTj13eR4UpqHTANQI,13
104
104
  files_sdk/models/style.py,sha256=KZY0fZ4kP4AtwZpCi24EtNXL8WFLhE9a1Jme1gA6Kkw,5201
105
105
  files_sdk/models/sync.py,sha256=dIlmpq4LNwYRMeD5-cQpx6r3XCpF5r8uvzYFGFT17fA,28291
106
106
  files_sdk/models/sync_log.py,sha256=uWP2p4LiUmV5hqZvaZFIBJIyPmdZ21lP9O81LQuNKS4,21135
107
- files_sdk/models/sync_run.py,sha256=aQX8hT1NmZ2i5J2C1vJLAE1HK5gn-TMFukfTsKydF2Y,6879
107
+ files_sdk/models/sync_run.py,sha256=O-rpqkNWQ8qo8qsPiPcZUmtBiZUrOfRr3qqjbT--4pg,6955
108
108
  files_sdk/models/usage_by_top_level_dir.py,sha256=o_dETvzcgEA9lsdES_yzwPVAZVFk4ZcnsCTugR8O8eY,1185
109
109
  files_sdk/models/usage_daily_snapshot.py,sha256=rWf6GaTlN9spkUPwfF4IJ0Y6z-JTV9TAWjsFrxI-UFg,5477
110
110
  files_sdk/models/usage_snapshot.py,sha256=3GzMIxBjKelgNP7ksWq4XlrRlAFcYxzd_J6vAgb52qc,4005
111
- files_sdk/models/user.py,sha256=hkdffwMd8LX91ThzxBFo1afkY_QUVetr4w20zyySUgE,62796
111
+ files_sdk/models/user.py,sha256=m0qGrNo8RX4ZgHscxGyzcRltBXcVxkEIxo6YYYVvlKs,64145
112
112
  files_sdk/models/user_cipher_use.py,sha256=5Mto-oU87rG2jGIq8TQoOdNZgJA4_ViikvOdM9_jdt0,4994
113
- files_sdk/models/user_lifecycle_rule.py,sha256=ZEG3pHxc-lbtofwu9DOCZQgiAbqxAJbDOdiG8JnB6Qo,13421
113
+ files_sdk/models/user_lifecycle_rule.py,sha256=cphIpz9lbHh8g1kIeK91N46LVAQRk-1Wbrjs51byOOA,16422
114
114
  files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6qxgU,6187
115
115
  files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
116
116
  files_sdk/models/web_dav_action_log.py,sha256=uMTIkTgSpW5mgKAEWnCmI4U5eqcAL2g8OHqB-lBir3A,76424
117
117
  files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
118
- files_com-1.6.78.dist-info/METADATA,sha256=c7HpIyDcXzRnypga-ClWK2x-7ujXj9Mp2jUjR0wLEWI,31732
119
- files_com-1.6.78.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
120
- files_com-1.6.78.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
121
- files_com-1.6.78.dist-info/RECORD,,
118
+ files_com-1.6.80.dist-info/METADATA,sha256=Tlr-3I6kh0ERwAB1u8rdckf1F5jgnNVQlLNJZYWnWQI,31732
119
+ files_com-1.6.80.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
120
+ files_com-1.6.80.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
121
+ files_com-1.6.80.dist-info/RECORD,,
files_sdk/__init__.py CHANGED
@@ -231,7 +231,7 @@ session_id = None
231
231
  source_ip = None
232
232
  base_url = "https://app.files.com"
233
233
  base_path = "api/rest/v1"
234
- version = "1.6.78"
234
+ version = "1.6.80"
235
235
 
236
236
  __version__ = version
237
237
 
@@ -13,7 +13,8 @@ class GpgKey:
13
13
  "id": None, # int64 - Your GPG key ID.
14
14
  "expires_at": None, # date-time - Your GPG key expiration date.
15
15
  "name": None, # string - Your GPG key name.
16
- "user_id": None, # int64 - GPG owner's user id
16
+ "partner_id": None, # int64 - Partner ID who owns this GPG Key, if applicable.
17
+ "user_id": None, # int64 - User ID who owns this GPG Key, if applicable.
17
18
  "public_key_md5": None, # string - MD5 hash of your GPG public key
18
19
  "private_key_md5": None, # string - MD5 hash of your GPG private key.
19
20
  "generated_public_key": None, # string - Your GPG public key
@@ -48,6 +49,7 @@ class GpgKey:
48
49
  }
49
50
 
50
51
  # Parameters:
52
+ # partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
51
53
  # public_key - string - MD5 hash of your GPG public key
52
54
  # private_key - string - MD5 hash of your GPG private key.
53
55
  # private_key_password - string - Your GPG private key password. Only required for password protected keys.
@@ -64,6 +66,12 @@ class GpgKey:
64
66
  raise MissingParameterError("Parameter missing: id")
65
67
  if "id" in params and not isinstance(params["id"], int):
66
68
  raise InvalidParameterError("Bad parameter: id must be an int")
69
+ if "partner_id" in params and not isinstance(
70
+ params["partner_id"], int
71
+ ):
72
+ raise InvalidParameterError(
73
+ "Bad parameter: partner_id must be an int"
74
+ )
67
75
  if "public_key" in params and not isinstance(
68
76
  params["public_key"], str
69
77
  ):
@@ -174,6 +182,7 @@ def get(id, params=None, options=None):
174
182
 
175
183
  # Parameters:
176
184
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
185
+ # partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
177
186
  # public_key - string - MD5 hash of your GPG public key
178
187
  # private_key - string - MD5 hash of your GPG private key.
179
188
  # private_key_password - string - Your GPG private key password. Only required for password protected keys.
@@ -189,6 +198,8 @@ def create(params=None, options=None):
189
198
  options = {}
190
199
  if "user_id" in params and not isinstance(params["user_id"], int):
191
200
  raise InvalidParameterError("Bad parameter: user_id must be an int")
201
+ if "partner_id" in params and not isinstance(params["partner_id"], int):
202
+ raise InvalidParameterError("Bad parameter: partner_id must be an int")
192
203
  if "public_key" in params and not isinstance(params["public_key"], str):
193
204
  raise InvalidParameterError("Bad parameter: public_key must be an str")
194
205
  if "private_key" in params and not isinstance(params["private_key"], str):
@@ -234,6 +245,7 @@ def create(params=None, options=None):
234
245
 
235
246
 
236
247
  # Parameters:
248
+ # partner_id - int64 - Partner ID who owns this GPG Key, if applicable.
237
249
  # public_key - string - MD5 hash of your GPG public key
238
250
  # private_key - string - MD5 hash of your GPG private key.
239
251
  # private_key_password - string - Your GPG private key password. Only required for password protected keys.
@@ -246,6 +258,8 @@ def update(id, params=None, options=None):
246
258
  params["id"] = id
247
259
  if "id" in params and not isinstance(params["id"], int):
248
260
  raise InvalidParameterError("Bad parameter: id must be an int")
261
+ if "partner_id" in params and not isinstance(params["partner_id"], int):
262
+ raise InvalidParameterError("Bad parameter: partner_id must be an int")
249
263
  if "public_key" in params and not isinstance(params["public_key"], str):
250
264
  raise InvalidParameterError("Bad parameter: public_key must be an str")
251
265
  if "private_key" in params and not isinstance(params["private_key"], str):
@@ -17,6 +17,7 @@ class Partner:
17
17
  "name": None, # string - The name of the Partner.
18
18
  "notes": None, # string - Notes about this Partner.
19
19
  "root_folder": None, # string - The root folder path for this Partner.
20
+ "tags": None, # string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
20
21
  }
21
22
 
22
23
  def __init__(self, attributes=None, options=None):
@@ -39,12 +40,13 @@ class Partner:
39
40
  }
40
41
 
41
42
  # Parameters:
43
+ # name - string - The name of the Partner.
42
44
  # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
43
45
  # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
44
46
  # allow_user_creation - boolean - Allow Partner Admins to create users.
45
- # name - string - The name of the Partner.
46
47
  # notes - string - Notes about this Partner.
47
48
  # root_folder - string - The root folder path for this Partner.
49
+ # tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
48
50
  def update(self, params=None):
49
51
  if not isinstance(params, dict):
50
52
  params = {}
@@ -67,6 +69,8 @@ class Partner:
67
69
  raise InvalidParameterError(
68
70
  "Bad parameter: root_folder must be an str"
69
71
  )
72
+ if "tags" in params and not isinstance(params["tags"], str):
73
+ raise InvalidParameterError("Bad parameter: tags must be an str")
70
74
  response, _options = Api.send_request(
71
75
  "PATCH",
72
76
  "/partners/{id}".format(id=params["id"]),
@@ -153,17 +157,20 @@ def get(id, params=None, options=None):
153
157
 
154
158
 
155
159
  # Parameters:
160
+ # name - string - The name of the Partner.
156
161
  # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
157
162
  # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
158
163
  # allow_user_creation - boolean - Allow Partner Admins to create users.
159
- # name - string - The name of the Partner.
160
164
  # notes - string - Notes about this Partner.
161
165
  # root_folder - string - The root folder path for this Partner.
166
+ # tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
162
167
  def create(params=None, options=None):
163
168
  if not isinstance(params, dict):
164
169
  params = {}
165
170
  if not isinstance(options, dict):
166
171
  options = {}
172
+ if "name" in params and not isinstance(params["name"], str):
173
+ raise InvalidParameterError("Bad parameter: name must be an str")
167
174
  if "allow_bypassing_2fa_policies" in params and not isinstance(
168
175
  params["allow_bypassing_2fa_policies"], bool
169
176
  ):
@@ -182,25 +189,26 @@ def create(params=None, options=None):
182
189
  raise InvalidParameterError(
183
190
  "Bad parameter: allow_user_creation must be an bool"
184
191
  )
185
- if "name" in params and not isinstance(params["name"], str):
186
- raise InvalidParameterError("Bad parameter: name must be an str")
187
192
  if "notes" in params and not isinstance(params["notes"], str):
188
193
  raise InvalidParameterError("Bad parameter: notes must be an str")
189
194
  if "root_folder" in params and not isinstance(params["root_folder"], str):
190
195
  raise InvalidParameterError(
191
196
  "Bad parameter: root_folder must be an str"
192
197
  )
198
+ if "tags" in params and not isinstance(params["tags"], str):
199
+ raise InvalidParameterError("Bad parameter: tags must be an str")
193
200
  response, options = Api.send_request("POST", "/partners", params, options)
194
201
  return Partner(response.data, options)
195
202
 
196
203
 
197
204
  # Parameters:
205
+ # name - string - The name of the Partner.
198
206
  # allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
199
207
  # allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
200
208
  # allow_user_creation - boolean - Allow Partner Admins to create users.
201
- # name - string - The name of the Partner.
202
209
  # notes - string - Notes about this Partner.
203
210
  # root_folder - string - The root folder path for this Partner.
211
+ # tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
204
212
  def update(id, params=None, options=None):
205
213
  if not isinstance(params, dict):
206
214
  params = {}
@@ -209,6 +217,8 @@ def update(id, params=None, options=None):
209
217
  params["id"] = id
210
218
  if "id" in params and not isinstance(params["id"], int):
211
219
  raise InvalidParameterError("Bad parameter: id must be an int")
220
+ if "name" in params and not isinstance(params["name"], str):
221
+ raise InvalidParameterError("Bad parameter: name must be an str")
212
222
  if "allow_bypassing_2fa_policies" in params and not isinstance(
213
223
  params["allow_bypassing_2fa_policies"], bool
214
224
  ):
@@ -227,14 +237,14 @@ def update(id, params=None, options=None):
227
237
  raise InvalidParameterError(
228
238
  "Bad parameter: allow_user_creation must be an bool"
229
239
  )
230
- if "name" in params and not isinstance(params["name"], str):
231
- raise InvalidParameterError("Bad parameter: name must be an str")
232
240
  if "notes" in params and not isinstance(params["notes"], str):
233
241
  raise InvalidParameterError("Bad parameter: notes must be an str")
234
242
  if "root_folder" in params and not isinstance(params["root_folder"], str):
235
243
  raise InvalidParameterError(
236
244
  "Bad parameter: root_folder must be an str"
237
245
  )
246
+ if "tags" in params and not isinstance(params["tags"], str):
247
+ raise InvalidParameterError("Bad parameter: tags must be an str")
238
248
  if "id" not in params:
239
249
  raise MissingParameterError("Parameter missing: id")
240
250
  response, options = Api.send_request(
@@ -17,6 +17,7 @@ class Permission:
17
17
  "group_id": None, # int64 - Group ID
18
18
  "group_name": None, # string - Group name (if applicable)
19
19
  "partner_id": None, # int64 - Partner ID (if applicable)
20
+ "partner_name": None, # string - Partner name (if applicable)
20
21
  "permission": None, # string - Permission type. See the table referenced in the documentation for an explanation of each permission.
21
22
  "recursive": None, # boolean - Recursive: does this permission apply to subfolders?
22
23
  "site_id": None, # int64 - Site ID
@@ -110,6 +110,7 @@ class PublicKey:
110
110
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
111
111
  # 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.
112
112
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
113
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `title`, `created_at` or `user_id`.
113
114
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
114
115
  # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
115
116
  # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
@@ -126,6 +127,8 @@ def list(params=None, options=None):
126
127
  raise InvalidParameterError("Bad parameter: cursor must be an str")
127
128
  if "per_page" in params and not isinstance(params["per_page"], int):
128
129
  raise InvalidParameterError("Bad parameter: per_page must be an int")
130
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
131
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
129
132
  if "filter" in params and not isinstance(params["filter"], dict):
130
133
  raise InvalidParameterError("Bad parameter: filter must be an dict")
131
134
  if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
@@ -62,5 +62,27 @@ def all(params=None, options=None):
62
62
  list(params, options)
63
63
 
64
64
 
65
+ # Parameters:
66
+ # id (required) - int64 - Scim Log ID.
67
+ def find(id, params=None, options=None):
68
+ if not isinstance(params, dict):
69
+ params = {}
70
+ if not isinstance(options, dict):
71
+ options = {}
72
+ params["id"] = id
73
+ if "id" in params and not isinstance(params["id"], int):
74
+ raise InvalidParameterError("Bad parameter: id must be an int")
75
+ if "id" not in params:
76
+ raise MissingParameterError("Parameter missing: id")
77
+ response, options = Api.send_request(
78
+ "GET", "/scim_logs/{id}".format(id=params["id"]), params, options
79
+ )
80
+ return ScimLog(response.data, options)
81
+
82
+
83
+ def get(id, params=None, options=None):
84
+ find(id, params, options)
85
+
86
+
65
87
  def new(*args, **kwargs):
66
88
  return ScimLog(*args, **kwargs)
@@ -11,24 +11,25 @@ from files_sdk.error import ( # noqa: F401
11
11
  class SyncRun:
12
12
  default_attributes = {
13
13
  "id": None, # int64 - SyncRun ID
14
- "sync_id": None, # int64 - ID of the Sync this run belongs to
15
- "site_id": None, # int64 - Site ID
16
- "status": None, # string - Status of the sync run (success, failure, partial_failure, in_progress, skipped)
17
- "src_remote_server_type": None, # string - Source remote server type, if any
18
- "dest_remote_server_type": None, # string - Destination remote server type, if any
19
14
  "body": None, # string - Log or summary body for this run
20
- "event_errors": None, # array(string) - Array of errors encountered during the run
15
+ "bytes_synced": None, # int64 - Total bytes synced in this run
21
16
  "compared_files": None, # int64 - Number of files compared
22
17
  "compared_folders": None, # int64 - Number of folders compared
23
- "errored_files": None, # int64 - Number of files that errored
24
- "successful_files": None, # int64 - Number of files successfully synced
25
- "runtime": None, # double - Total runtime in seconds
26
- "log_url": None, # string - Link to external log file.
27
18
  "completed_at": None, # date-time - When this run was completed
19
+ "created_at": None, # date-time - When this run was created
20
+ "dest_remote_server_type": None, # string - Destination remote server type, if any
28
21
  "dry_run": None, # boolean - Whether this run was a dry run (no actual changes made)
29
- "bytes_synced": None, # int64 - Total bytes synced in this run
22
+ "errored_files": None, # int64 - Number of files that errored
30
23
  "estimated_bytes_count": None, # int64 - Estimated bytes count for this run
31
- "created_at": None, # date-time - When this run was created
24
+ "event_errors": None, # array(string) - Array of errors encountered during the run
25
+ "log_url": None, # string - Link to external log file.
26
+ "runtime": None, # double - Total runtime in seconds
27
+ "site_id": None, # int64 - Site ID
28
+ "src_remote_server_type": None, # string - Source remote server type, if any
29
+ "status": None, # string - Status of the sync run (success, failure, partial_failure, in_progress, skipped)
30
+ "successful_files": None, # int64 - Number of files successfully synced
31
+ "sync_id": None, # int64 - ID of the Sync this run belongs to
32
+ "sync_name": None, # string - Name of the Sync this run belongs to
32
33
  "updated_at": None, # date-time - When this run was last updated
33
34
  }
34
35
 
files_sdk/models/user.py CHANGED
@@ -72,6 +72,7 @@ class User:
72
72
  "sso_strategy_id": None, # int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
73
73
  "subscribe_to_newsletter": None, # boolean - Is the user subscribed to the newsletter?
74
74
  "externally_managed": None, # boolean - Is this user managed by a SsoStrategy?
75
+ "tags": None, # string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
75
76
  "time_zone": None, # string - User time zone
76
77
  "type_of_2fa": None, # string - Type(s) of 2FA methods in use, for programmatic use. Will be either `sms`, `totp`, `webauthn`, `yubi`, `email`, or multiple values sorted alphabetically and joined by an underscore. Does not specify whether user has more than one of a given method.
77
78
  "type_of_2fa_for_display": None, # string - Type(s) of 2FA methods in use, formatted for displaying in the UI. Unlike `type_of_2fa`, this value will make clear when a user has more than 1 of the same type of method.
@@ -218,6 +219,7 @@ class User:
218
219
  # sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
219
220
  # subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
220
221
  # require_2fa - string - 2FA required setting
222
+ # tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
221
223
  # time_zone - string - User time zone
222
224
  # user_root - string - Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set). Note that this is not used for API, Desktop, or Web interface.
223
225
  # user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
@@ -363,6 +365,8 @@ class User:
363
365
  raise InvalidParameterError(
364
366
  "Bad parameter: require_2fa must be an str"
365
367
  )
368
+ if "tags" in params and not isinstance(params["tags"], str):
369
+ raise InvalidParameterError("Bad parameter: tags must be an str")
366
370
  if "time_zone" in params and not isinstance(params["time_zone"], str):
367
371
  raise InvalidParameterError(
368
372
  "Bad parameter: time_zone must be an str"
@@ -432,7 +436,7 @@ class User:
432
436
  # 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.
433
437
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
434
438
  # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username`, `site_admin` or `disabled`.
435
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin` or `disabled`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
439
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
436
440
  # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
437
441
  # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
438
442
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
@@ -558,6 +562,7 @@ def get(id, params=None, options=None):
558
562
  # sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
559
563
  # subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
560
564
  # require_2fa - string - 2FA required setting
565
+ # tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
561
566
  # time_zone - string - User time zone
562
567
  # user_root - string - Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set). Note that this is not used for API, Desktop, or Web interface.
563
568
  # user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
@@ -789,6 +794,8 @@ def create(params=None, options=None):
789
794
  raise InvalidParameterError(
790
795
  "Bad parameter: require_2fa must be an str"
791
796
  )
797
+ if "tags" in params and not isinstance(params["tags"], str):
798
+ raise InvalidParameterError("Bad parameter: tags must be an str")
792
799
  if "time_zone" in params and not isinstance(params["time_zone"], str):
793
800
  raise InvalidParameterError("Bad parameter: time_zone must be an str")
794
801
  if "user_root" in params and not isinstance(params["user_root"], str):
@@ -904,6 +911,7 @@ def user_2fa_reset(id, params=None, options=None):
904
911
  # sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
905
912
  # subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
906
913
  # require_2fa - string - 2FA required setting
914
+ # tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
907
915
  # time_zone - string - User time zone
908
916
  # user_root - string - Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set). Note that this is not used for API, Desktop, or Web interface.
909
917
  # user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
@@ -1139,6 +1147,8 @@ def update(id, params=None, options=None):
1139
1147
  raise InvalidParameterError(
1140
1148
  "Bad parameter: require_2fa must be an str"
1141
1149
  )
1150
+ if "tags" in params and not isinstance(params["tags"], str):
1151
+ raise InvalidParameterError("Bad parameter: tags must be an str")
1142
1152
  if "time_zone" in params and not isinstance(params["time_zone"], str):
1143
1153
  raise InvalidParameterError("Bad parameter: time_zone must be an str")
1144
1154
  if "user_root" in params and not isinstance(params["user_root"], str):
@@ -11,15 +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
14
+ "authentication_method": None, # string - User authentication method for which the rule will apply.
15
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.
16
- "inactivity_days": None, # int64 - Number of days of inactivity before the rule applies
17
- "include_folder_admins": None, # boolean - Include folder admins in the rule
18
- "include_site_admins": None, # boolean - Include site admins in the rule
19
16
  "action": None, # string - Action to take on inactive users (disable or delete)
20
- "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.
21
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.
22
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.
23
25
  }
24
26
 
25
27
  def __init__(self, attributes=None, options=None):
@@ -46,13 +48,15 @@ class UserLifecycleRule:
46
48
 
47
49
  # Parameters:
48
50
  # action - string - Action to take on inactive users (disable or delete)
49
- # authentication_method - string - User authentication method for the rule
51
+ # authentication_method - string - User authentication method for which the rule will apply.
50
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.
51
53
  # inactivity_days - int64 - Number of days of inactivity before the rule applies
52
- # include_site_admins - boolean - Include site admins in the rule
53
- # include_folder_admins - boolean - Include folder admins in the rule
54
- # user_state - string - State of the users to apply the rule to (inactive or disabled)
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.
55
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.
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.
56
60
  def update(self, params=None):
57
61
  if not isinstance(params, dict):
58
62
  params = {}
@@ -85,14 +89,24 @@ class UserLifecycleRule:
85
89
  raise InvalidParameterError(
86
90
  "Bad parameter: inactivity_days must be an int"
87
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
+ )
88
100
  if "user_state" in params and not isinstance(
89
101
  params["user_state"], str
90
102
  ):
91
103
  raise InvalidParameterError(
92
104
  "Bad parameter: user_state must be an str"
93
105
  )
94
- if "name" in params and not isinstance(params["name"], str):
95
- raise InvalidParameterError("Bad parameter: name must be an str")
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
+ )
96
110
  response, _options = Api.send_request(
97
111
  "PATCH",
98
112
  "/user_lifecycle_rules/{id}".format(id=params["id"]),
@@ -137,6 +151,7 @@ class UserLifecycleRule:
137
151
  # Parameters:
138
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.
139
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`.
140
155
  def list(params=None, options=None):
141
156
  if not isinstance(params, dict):
142
157
  params = {}
@@ -146,6 +161,8 @@ def list(params=None, options=None):
146
161
  raise InvalidParameterError("Bad parameter: cursor must be an str")
147
162
  if "per_page" in params and not isinstance(params["per_page"], int):
148
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")
149
166
  return ListObj(
150
167
  UserLifecycleRule, "GET", "/user_lifecycle_rules", params, options
151
168
  )
@@ -182,13 +199,15 @@ def get(id, params=None, options=None):
182
199
 
183
200
  # Parameters:
184
201
  # action - string - Action to take on inactive users (disable or delete)
185
- # authentication_method - string - User authentication method for the rule
202
+ # authentication_method - string - User authentication method for which the rule will apply.
186
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.
187
204
  # inactivity_days - int64 - Number of days of inactivity before the rule applies
188
- # include_site_admins - boolean - Include site admins in the rule
189
- # include_folder_admins - boolean - Include folder admins in the rule
190
- # user_state - string - State of the users to apply the rule to (inactive or disabled)
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.
191
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.
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.
192
211
  def create(params=None, options=None):
193
212
  if not isinstance(params, dict):
194
213
  params = {}
@@ -224,10 +243,16 @@ def create(params=None, options=None):
224
243
  raise InvalidParameterError(
225
244
  "Bad parameter: include_folder_admins must be an bool"
226
245
  )
227
- if "user_state" in params and not isinstance(params["user_state"], str):
228
- raise InvalidParameterError("Bad parameter: user_state must be an str")
229
246
  if "name" in params and not isinstance(params["name"], str):
230
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
+ )
252
+ if "user_state" in params and not isinstance(params["user_state"], str):
253
+ raise InvalidParameterError("Bad parameter: user_state must be an str")
254
+ if "user_tag" in params and not isinstance(params["user_tag"], str):
255
+ raise InvalidParameterError("Bad parameter: user_tag must be an str")
231
256
  response, options = Api.send_request(
232
257
  "POST", "/user_lifecycle_rules", params, options
233
258
  )
@@ -236,13 +261,15 @@ def create(params=None, options=None):
236
261
 
237
262
  # Parameters:
238
263
  # action - string - Action to take on inactive users (disable or delete)
239
- # authentication_method - string - User authentication method for the rule
264
+ # authentication_method - string - User authentication method for which the rule will apply.
240
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.
241
266
  # inactivity_days - int64 - Number of days of inactivity before the rule applies
242
- # include_site_admins - boolean - Include site admins in the rule
243
- # include_folder_admins - boolean - Include folder admins in the rule
244
- # user_state - string - State of the users to apply the rule to (inactive or disabled)
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.
245
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.
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.
246
273
  def update(id, params=None, options=None):
247
274
  if not isinstance(params, dict):
248
275
  params = {}
@@ -281,10 +308,16 @@ def update(id, params=None, options=None):
281
308
  raise InvalidParameterError(
282
309
  "Bad parameter: include_folder_admins must be an bool"
283
310
  )
284
- if "user_state" in params and not isinstance(params["user_state"], str):
285
- raise InvalidParameterError("Bad parameter: user_state must be an str")
286
311
  if "name" in params and not isinstance(params["name"], str):
287
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
+ )
317
+ if "user_state" in params and not isinstance(params["user_state"], str):
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")
288
321
  if "id" not in params:
289
322
  raise MissingParameterError("Parameter missing: id")
290
323
  response, options = Api.send_request(