files-com 1.6.28__py3-none-any.whl → 1.6.30__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.28
1
+ 1.6.30
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: files_com
3
- Version: 1.6.28
3
+ Version: 1.6.30
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=dJpTjuJA-JJIQ4CKgQhlbqyxanVatHk0RXgCD6KFl3A,28758
2
- _VERSION,sha256=6lWguq-7ZVIMO_dKpRRqpFyjwOaTEUflNeMR6gEgvkw,7
3
- files_com-1.6.28.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
- files_sdk/__init__.py,sha256=_SDTfqH3vKpExnfKMRIn4sXorWp4tdLeueZYrtpVuaE,12769
2
+ _VERSION,sha256=PfJdPIeiJm1oSZ9yT_lVfv-OBA0z8TPl_6dS0tU9zK0,7
3
+ files_com-1.6.30.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
+ files_sdk/__init__.py,sha256=pJ08a-0_kWIXL8vowoeaiiGH1JzlgDHile5nKuBsGHk,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
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=AmxdZaVf9i7sKE_sv7JJD8hpi271Yp2DFead0Apq6fQ,5763
11
+ files_sdk/models/__init__.py,sha256=T3P5rFWVBuEhcTdIXu40Vic0EnG-FM08A4BLadgWxKY,5821
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
@@ -21,7 +21,7 @@ files_sdk/models/as2_outgoing_message.py,sha256=7mSM2Ce-9HUsk7klRmS30kBBPMJBRWsX
21
21
  files_sdk/models/as2_partner.py,sha256=e7gPlPqTYZorX7XZSA8iSaDAkV9U12ANAFKCviw3T3U,22467
22
22
  files_sdk/models/as2_station.py,sha256=XKgf0t8HVPevF1nkx8IrvGb00leahz-LSU9RG6Rn2Y4,11003
23
23
  files_sdk/models/auto.py,sha256=nODYUPqEsTw7suz0s6zDTsFd8j5yeSIzBELTiaXxzRE,995
24
- files_sdk/models/automation.py,sha256=MmzKUW6VbOGUcNOEQdyhMPAT49M8sIvuf3jakXG4m6s,48097
24
+ files_sdk/models/automation.py,sha256=u1FPXXJF5sjsAWcVLggzoJjnKcVzkhkALLB-iX3UjcY,48283
25
25
  files_sdk/models/automation_log.py,sha256=wiv5ih_lUk0NKoV777IuevJz6JChm2lcpasqzW6o26c,85083
26
26
  files_sdk/models/automation_run.py,sha256=ThDA_5inLYaunKOcNgXFD9QLlhndJXC2TOl7-GqK098,5341
27
27
  files_sdk/models/bandwidth_snapshot.py,sha256=IBcRP5r_iFl86lhHOb5o5UZdsT8_-cBrAjKyPAc7OBw,4722
@@ -57,6 +57,7 @@ files_sdk/models/group_user.py,sha256=ZVl2vQ2FuPFC9YW5Geo9iST438eLvs6Pc_BlQRGg9S
57
57
  files_sdk/models/history.py,sha256=Elc04ji3rWWhEc68KzPzcEeCqfMSA4Jmjb9sAZ4LvKc,14138
58
58
  files_sdk/models/history_export.py,sha256=M7sfb60oVCWTsP5ZnIsQTx7743BlehM2ciLv6WOqHMk,14400
59
59
  files_sdk/models/history_export_result.py,sha256=bn7GrrQRN4v09uyWsf9kELgj4PXtfDtbhjvL4vWmutg,6358
60
+ files_sdk/models/holiday_region.py,sha256=WJyvwskMxRf3WwGgxH0bndf04xTnf1cwNEpnjZs0QUQ,2259
60
61
  files_sdk/models/image.py,sha256=xGDz4VULw5EkYGS0h6cmsRkpYv-c1qi5bhOgiyLA3mM,1052
61
62
  files_sdk/models/inbox_recipient.py,sha256=_iUVVsBJLmAU2GatfjxYNBTEiv4D-DoJ0vbBKAwbG1I,5762
62
63
  files_sdk/models/inbox_registration.py,sha256=d2JxmVNko0G3W1_YHdGwgs6o1RiCxagtEFMf4UKS0mA,3341
@@ -93,12 +94,12 @@ files_sdk/models/sftp_host_key.py,sha256=3r5noHhRg-Hn3TLGBUDQYayKIw_Dn5waB9YmGSf
93
94
  files_sdk/models/share_group.py,sha256=rw-W2x5XFBPc48rvazaro28HfjOli885417i702Mowc,9066
94
95
  files_sdk/models/share_group_member.py,sha256=m0BUE4AhClJIoaV-_kU0yryCOwQ5EloZlyHQ4WaCVdU,1248
95
96
  files_sdk/models/siem_http_destination.py,sha256=BDExKltNMH8q3ZoKJO_fBRtjVliqzjnj1KHEKycXiCw,49945
96
- files_sdk/models/site.py,sha256=CmUvexrJNjra8kg_EvYpqUWmNmxUE-pC8IbJrorYzFg,69964
97
+ files_sdk/models/site.py,sha256=XqYd3bFupgLejXchndaz4WicIq41E_xBkZUmd0RArPw,69364
97
98
  files_sdk/models/snapshot.py,sha256=zmdQWKR8EhUkF1mFQHFzWfreaEVXG1p_jEtmY4j3cKA,9840
98
99
  files_sdk/models/sso_strategy.py,sha256=vWNCPfot8z15xUhAoFsS52W-1vg8IpKIqAALZ6pBwd0,9112
99
100
  files_sdk/models/status.py,sha256=IIY3RiJ2RZ2yPByAAh8eIq_cgZFTj13eR4UpqHTANQI,1363
100
101
  files_sdk/models/style.py,sha256=KZY0fZ4kP4AtwZpCi24EtNXL8WFLhE9a1Jme1gA6Kkw,5201
101
- files_sdk/models/sync.py,sha256=6fIhJ2P9DplRkaOrD9QE4Ep8Y9KKRASlCLi8W1mCQQI,24793
102
+ files_sdk/models/sync.py,sha256=R2FlrQOgqPpwBVQsTSTWBSXR2iDQSd0nbN8PolXhJu0,24979
102
103
  files_sdk/models/sync_log.py,sha256=N8hRyRNkvKYJhQkSlwre47aFL_JWLlvj_bVrvHBVPsE,40135
103
104
  files_sdk/models/sync_run.py,sha256=o7JXDrLqivKxK-NkUIle3m6Ukk0d_0yX7i5gPjuAjtg,5302
104
105
  files_sdk/models/usage_by_top_level_dir.py,sha256=o_dETvzcgEA9lsdES_yzwPVAZVFk4ZcnsCTugR8O8eY,1185
@@ -106,12 +107,12 @@ files_sdk/models/usage_daily_snapshot.py,sha256=rWf6GaTlN9spkUPwfF4IJ0Y6z-JTV9TA
106
107
  files_sdk/models/usage_snapshot.py,sha256=3GzMIxBjKelgNP7ksWq4XlrRlAFcYxzd_J6vAgb52qc,4005
107
108
  files_sdk/models/user.py,sha256=VRpgFNf8rSddzSRb62hXLq7YeVHkVuTzPrQ6jTJkQX4,59714
108
109
  files_sdk/models/user_cipher_use.py,sha256=FugKNQhWaRuqxLiYabpXeskk9DcWVVCN2iL7A3xY-pM,3011
109
- files_sdk/models/user_lifecycle_rule.py,sha256=Rj4lYUt_11fny42dvpP6WSRz8ipB6E4SP3t8HaHDkPM,11937
110
+ files_sdk/models/user_lifecycle_rule.py,sha256=UfCRC2zPN-G-Z08_MJ7TrqEBS85L12xOGoMWeaPCjIM,12842
110
111
  files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6qxgU,6187
111
112
  files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
112
113
  files_sdk/models/web_dav_action_log.py,sha256=7__LZvb_fInvXwy90ur7IrcRSxKOwF8L6OwpjJbS73Y,355354
113
114
  files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
114
- files_com-1.6.28.dist-info/METADATA,sha256=dEW_IJvua37VzwVrcZM6dbbaTly-DXLAxQhaFVHXZRY,29050
115
- files_com-1.6.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
116
- files_com-1.6.28.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
117
- files_com-1.6.28.dist-info/RECORD,,
115
+ files_com-1.6.30.dist-info/METADATA,sha256=V_djcizc-Hy1S10Nrt39zp9KJckco3rToQ926EcgTYA,29050
116
+ files_com-1.6.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
117
+ files_com-1.6.30.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
118
+ files_com-1.6.30.dist-info/RECORD,,
files_sdk/__init__.py CHANGED
@@ -47,6 +47,7 @@ import files_sdk.models.group_user as group_user
47
47
  import files_sdk.models.history as history
48
48
  import files_sdk.models.history_export as history_export
49
49
  import files_sdk.models.history_export_result as history_export_result
50
+ import files_sdk.models.holiday_region as holiday_region
50
51
  import files_sdk.models.image as image
51
52
  import files_sdk.models.inbox_recipient as inbox_recipient
52
53
  import files_sdk.models.inbox_registration as inbox_registration
@@ -154,6 +155,7 @@ from files_sdk.models.group_user import GroupUser
154
155
  from files_sdk.models.history import History
155
156
  from files_sdk.models.history_export import HistoryExport
156
157
  from files_sdk.models.history_export_result import HistoryExportResult
158
+ from files_sdk.models.holiday_region import HolidayRegion
157
159
  from files_sdk.models.image import Image
158
160
  from files_sdk.models.inbox_recipient import InboxRecipient
159
161
  from files_sdk.models.inbox_registration import InboxRegistration
@@ -221,7 +223,7 @@ session_id = None
221
223
  source_ip = None
222
224
  base_url = "https://app.files.com"
223
225
  base_path = "api/rest/v1"
224
- version = "1.6.28"
226
+ version = "1.6.30"
225
227
 
226
228
  __version__ = version
227
229
 
@@ -50,6 +50,7 @@ from files_sdk.models.group_user import GroupUser
50
50
  from files_sdk.models.history import History
51
51
  from files_sdk.models.history_export import HistoryExport
52
52
  from files_sdk.models.history_export_result import HistoryExportResult
53
+ from files_sdk.models.holiday_region import HolidayRegion
53
54
  from files_sdk.models.image import Image
54
55
  from files_sdk.models.inbox_recipient import InboxRecipient
55
56
  from files_sdk.models.inbox_registration import InboxRegistration
@@ -48,6 +48,7 @@ class Automation:
48
48
  "user_ids": None, # array(int64) - IDs of Users for the Automation (i.e. who to Request File from)
49
49
  "value": None, # object - A Hash of attributes specific to the automation type.
50
50
  "webhook_url": None, # string - If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
51
+ "holiday_region": None, # string - If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
51
52
  }
52
53
 
53
54
  def __init__(self, attributes=None, options=None):
@@ -0,0 +1,58 @@
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 HolidayRegion:
12
+ default_attributes = {
13
+ "code": None, # string - The code representing a region
14
+ "name": None, # string - The name of the region
15
+ }
16
+
17
+ def __init__(self, attributes=None, options=None):
18
+ if not isinstance(attributes, dict):
19
+ attributes = {}
20
+ if not isinstance(options, dict):
21
+ options = {}
22
+ self.set_attributes(attributes)
23
+ self.options = options
24
+
25
+ def set_attributes(self, attributes):
26
+ for (
27
+ attribute,
28
+ default_value,
29
+ ) in HolidayRegion.default_attributes.items():
30
+ setattr(self, attribute, attributes.get(attribute, default_value))
31
+
32
+ def get_attributes(self):
33
+ return {
34
+ k: getattr(self, k, None)
35
+ for k in HolidayRegion.default_attributes
36
+ if getattr(self, k, None) is not None
37
+ }
38
+
39
+
40
+ # Parameters:
41
+ # 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.
42
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
43
+ def get_supported(params=None, options=None):
44
+ if not isinstance(params, dict):
45
+ params = {}
46
+ if not isinstance(options, dict):
47
+ options = {}
48
+ if "cursor" in params and not isinstance(params["cursor"], str):
49
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
50
+ if "per_page" in params and not isinstance(params["per_page"], int):
51
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
52
+ return ListObj(
53
+ HolidayRegion, "GET", "/holiday_regions/supported", params, options
54
+ )
55
+
56
+
57
+ def new(*args, **kwargs):
58
+ return HolidayRegion(*args, **kwargs)
files_sdk/models/site.py CHANGED
@@ -57,7 +57,6 @@ class Site:
57
57
  "custom_namespace": None, # boolean - Is this site using a custom namespace for users?
58
58
  "dav_enabled": None, # boolean - Is WebDAV enabled?
59
59
  "dav_user_root_enabled": None, # boolean - Use user FTP roots also for WebDAV?
60
- "days_before_deleting_disabled_users": None, # int64 - Number of days to keep disabled users before deleting them. If set to 0, disabled users will not be deleted.
61
60
  "days_to_retain_backups": None, # int64 - Number of days to keep deleted files
62
61
  "document_edits_in_bundle_allowed": None, # boolean - If true, allow public viewers of Bundles with full permissions to use document editing integrations.
63
62
  "default_time_zone": None, # string - Site default time zone
@@ -279,7 +278,6 @@ def get_usage(params=None, options=None):
279
278
  # allowed_countries - string - Comma separated list of allowed Country codes
280
279
  # allowed_ips - string - List of allowed IP addresses
281
280
  # disallowed_countries - string - Comma separated list of disallowed Country codes
282
- # days_before_deleting_disabled_users - int64 - Number of days to keep disabled users before deleting them. If set to 0, disabled users will not be deleted.
283
281
  # days_to_retain_backups - int64 - Number of days to keep deleted files
284
282
  # max_prior_passwords - int64 - Number of prior passwords to disallow
285
283
  # password_validity_days - int64 - Number of days password is valid
@@ -704,12 +702,6 @@ def update(params=None, options=None):
704
702
  raise InvalidParameterError(
705
703
  "Bad parameter: disallowed_countries must be an str"
706
704
  )
707
- if "days_before_deleting_disabled_users" in params and not isinstance(
708
- params["days_before_deleting_disabled_users"], int
709
- ):
710
- raise InvalidParameterError(
711
- "Bad parameter: days_before_deleting_disabled_users must be an int"
712
- )
713
705
  if "days_to_retain_backups" in params and not isinstance(
714
706
  params["days_to_retain_backups"], int
715
707
  ):
files_sdk/models/sync.py CHANGED
@@ -35,6 +35,7 @@ class Sync:
35
35
  "schedule_days_of_week": None, # array(int64) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
36
36
  "schedule_times_of_day": None, # array(string) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. Times of day in HH:MM format.
37
37
  "schedule_time_zone": None, # string - If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
38
+ "holiday_region": None, # string - If trigger is `custom_schedule`, the Automation will check if there is a formal, observed holiday for the region, and if so, it will not run.
38
39
  }
39
40
 
40
41
  def __init__(self, attributes=None, options=None):
@@ -16,6 +16,7 @@ class UserLifecycleRule:
16
16
  "include_folder_admins": None, # boolean - Include folder admins in the rule
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
+ "user_state": None, # string - State of the users to apply the rule to (inactive or disabled)
19
20
  "site_id": None, # int64 - Site ID
20
21
  }
21
22
 
@@ -47,6 +48,7 @@ class UserLifecycleRule:
47
48
  # inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
48
49
  # include_site_admins - boolean - Include site admins in the rule
49
50
  # include_folder_admins - boolean - Include folder admins in the rule
51
+ # user_state - string - State of the users to apply the rule to (inactive or disabled)
50
52
  def update(self, params=None):
51
53
  if not isinstance(params, dict):
52
54
  params = {}
@@ -81,6 +83,12 @@ class UserLifecycleRule:
81
83
  raise InvalidParameterError(
82
84
  "Bad parameter: inactivity_days must be an int"
83
85
  )
86
+ if "user_state" in params and not isinstance(
87
+ params["user_state"], str
88
+ ):
89
+ raise InvalidParameterError(
90
+ "Bad parameter: user_state must be an str"
91
+ )
84
92
  response, _options = Api.send_request(
85
93
  "PATCH",
86
94
  "/user_lifecycle_rules/{id}".format(id=params["id"]),
@@ -174,6 +182,7 @@ def get(id, params=None, options=None):
174
182
  # inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
175
183
  # include_site_admins - boolean - Include site admins in the rule
176
184
  # include_folder_admins - boolean - Include folder admins in the rule
185
+ # user_state - string - State of the users to apply the rule to (inactive or disabled)
177
186
  def create(params=None, options=None):
178
187
  if not isinstance(params, dict):
179
188
  params = {}
@@ -205,6 +214,8 @@ def create(params=None, options=None):
205
214
  raise InvalidParameterError(
206
215
  "Bad parameter: include_folder_admins must be an bool"
207
216
  )
217
+ if "user_state" in params and not isinstance(params["user_state"], str):
218
+ raise InvalidParameterError("Bad parameter: user_state must be an str")
208
219
  if "action" not in params:
209
220
  raise MissingParameterError("Parameter missing: action")
210
221
  if "authentication_method" not in params:
@@ -223,6 +234,7 @@ def create(params=None, options=None):
223
234
  # inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
224
235
  # include_site_admins - boolean - Include site admins in the rule
225
236
  # include_folder_admins - boolean - Include folder admins in the rule
237
+ # user_state - string - State of the users to apply the rule to (inactive or disabled)
226
238
  def update(id, params=None, options=None):
227
239
  if not isinstance(params, dict):
228
240
  params = {}
@@ -257,6 +269,8 @@ def update(id, params=None, options=None):
257
269
  raise InvalidParameterError(
258
270
  "Bad parameter: include_folder_admins must be an bool"
259
271
  )
272
+ if "user_state" in params and not isinstance(params["user_state"], str):
273
+ raise InvalidParameterError("Bad parameter: user_state must be an str")
260
274
  if "id" not in params:
261
275
  raise MissingParameterError("Parameter missing: id")
262
276
  if "action" not in params: