files-com 1.6.164__py3-none-any.whl → 1.6.171__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.
_VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.164
1
+ 1.6.171
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: files_com
3
- Version: 1.6.164
3
+ Version: 1.6.171
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=8aKN5Kzi5hFh2nzFLY_3V3TF0_B83n6kIP-nPWktZzk,32129
2
- _VERSION,sha256=jf4LeylDDnoYSQatZfbtleitbNkndIgOAoPczL5l9Nw,8
3
- files_com-1.6.164.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
- files_sdk/__init__.py,sha256=20244XJ9MYhdvH35G014Cv5EMuZNvJw5BAv1Eddff5Q,13766
2
+ _VERSION,sha256=5aUJcoa81Z84Sw9_uXjWPR0MpdscPyfGIlzUcMpjikE,8
3
+ files_com-1.6.171.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
+ files_sdk/__init__.py,sha256=4yTPKxiutgJkzpdT9NyUWLjIjj0IpF2XWl55gE5RmFQ,13766
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=iC7_kFNXRn-xpHfnCix0J5UIT3JtkUpVotp1Okrm3u0,67004
@@ -27,7 +27,7 @@ files_sdk/models/automation_log.py,sha256=jFaFfDJTTpY9Jsy1lVRjFtIHYTzbmxuFTTBp4a
27
27
  files_sdk/models/automation_run.py,sha256=ThDA_5inLYaunKOcNgXFD9QLlhndJXC2TOl7-GqK098,5341
28
28
  files_sdk/models/bandwidth_snapshot.py,sha256=IBcRP5r_iFl86lhHOb5o5UZdsT8_-cBrAjKyPAc7OBw,4722
29
29
  files_sdk/models/behavior.py,sha256=0LnyXfOo3v3z0t2LXvbYcTSXcAdaKgC8am_2sDbjqC4,17847
30
- files_sdk/models/bundle.py,sha256=DO6vTAnbdh7A1mkRkHqdv629t701XRwRAl4hrNepUHo,36214
30
+ files_sdk/models/bundle.py,sha256=AarFYeaoRP_9rxLU7jR-vTBLVVDLK_i9355RLFOn4JI,36698
31
31
  files_sdk/models/bundle_action.py,sha256=Ze0A2n0EyzSxNHO_joS9fOYuQ7fmlOX_RJwC5FWSwyQ,5430
32
32
  files_sdk/models/bundle_download.py,sha256=ZSjf6R0kCiFGgjQq7bu5nsFAtaW0sE72IZhCx2g5D10,4832
33
33
  files_sdk/models/bundle_notification.py,sha256=tMauRH6qmejEisqsneVeprh4rb6UIjB43i6GY022NK8,10081
@@ -68,7 +68,7 @@ files_sdk/models/inbox_upload.py,sha256=37SxR8JX_eMn9wJQMeAfDDhqEl-_1o6nCJMHzMGW
68
68
  files_sdk/models/invoice.py,sha256=W5fGwC5s53PZsEu_SzGXsIdxN1Pw7MQ0wGZq4brMZ1c,3753
69
69
  files_sdk/models/invoice_line_item.py,sha256=EXuvWqQyNgLBs4KLNLzatStBdJpniyn_K5dUgmUewbM,2011
70
70
  files_sdk/models/ip_address.py,sha256=Uyqd0-8gpbv2Nlt1ttTLH9ylDSTdw1dcrmRjtwDgkIw,5783
71
- files_sdk/models/key_lifecycle_rule.py,sha256=USPe-iCsZJDpFRtP3yotNorm6tUB9YagY2sOBB4vdUM,9143
71
+ files_sdk/models/key_lifecycle_rule.py,sha256=Q4Qf6OeYeLjKetm3iTOb7XDCoXRFO3lkEHgnsVVjrP4,9432
72
72
  files_sdk/models/lock.py,sha256=RjMPVJJsWOKJ8ll3YwalC64NHDtq5GIBIh9A1w3bM7o,7229
73
73
  files_sdk/models/message.py,sha256=Lp2CHdf2AyXNjSF0giOdozvch-_sdC8FlemSPJMOZLs,10192
74
74
  files_sdk/models/message_comment.py,sha256=6Y0k_uRCKExD-0g9NobqTp22lprrwpZndrmKYhRnuHQ,8546
@@ -92,7 +92,7 @@ files_sdk/models/remote_server.py,sha256=dpDH1wFSOfRXSzkdiQwCM8VlkQH1oci-ool0rQk
92
92
  files_sdk/models/remote_server_configuration_file.py,sha256=So6cK83z_6xwLnHJYgEwzSb9eBkDK5XG2Q4k8kp9nno,3476
93
93
  files_sdk/models/remote_server_credential.py,sha256=kNZuzTvsc5wLIQlg0GAOm9rmbAPaXWeArjAPd3gCJ3g,37640
94
94
  files_sdk/models/request.py,sha256=mWOS36b5pRiAZqDuf1tGidw-FAikYPDqfv5LXdDJA9Q,8867
95
- files_sdk/models/restore.py,sha256=ukXp-fwsuGFhWl2ULAEWiKarIY3DjOIk3x3hHlshjqE,6685
95
+ files_sdk/models/restore.py,sha256=fDxydLjxeVPwDxxHGKI9sjGLR1fB7DcgGow2EgGU-A0,8620
96
96
  files_sdk/models/scim_log.py,sha256=4j_IynVzpnSttAUAxTGhT2t56_Mx7KNvZdhVplxLmPM,3747
97
97
  files_sdk/models/session.py,sha256=kgRwlDHDtwyMA3U9rk2T37Wfoo8VVr76vwLcZyaJJxM,3790
98
98
  files_sdk/models/settings_change.py,sha256=KdcDdnJVPJGRLLx-W_7pTXSJ5TJnjNHADjU9MnSr2tc,3412
@@ -119,7 +119,7 @@ files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6q
119
119
  files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
120
120
  files_sdk/models/web_dav_action_log.py,sha256=q--_QSmpOhtoJUP2ATx5OQq1tp1eQT5zkzyow8R3B_o,76414
121
121
  files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
122
- files_com-1.6.164.dist-info/METADATA,sha256=QSix1qEdrKMw7Nm9ey1pXeOJnOgWT0Tmpvou7NTNCeY,32422
123
- files_com-1.6.164.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
124
- files_com-1.6.164.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
125
- files_com-1.6.164.dist-info/RECORD,,
122
+ files_com-1.6.171.dist-info/METADATA,sha256=6EYwZZ_TNcDhZyx_mKN7V-0HpGtDZmpMT1LxkFqZRx4,32422
123
+ files_com-1.6.171.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
124
+ files_com-1.6.171.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
125
+ files_com-1.6.171.dist-info/RECORD,,
files_sdk/__init__.py CHANGED
@@ -239,7 +239,7 @@ session_id = None
239
239
  source_ip = None
240
240
  base_url = "https://app.files.com"
241
241
  base_path = "api/rest/v1"
242
- version = "1.6.164"
242
+ version = "1.6.171"
243
243
 
244
244
  __version__ = version
245
245
 
@@ -136,6 +136,7 @@ class Bundle:
136
136
  # start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
137
137
  # skip_email - boolean - BundleRegistrations can be saved without providing email?
138
138
  # skip_name - boolean - BundleRegistrations can be saved without providing name?
139
+ # user_id - int64 - The owning user id. Only site admins can set this.
139
140
  # watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
140
141
  # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
141
142
  def update(self, params=None):
@@ -218,6 +219,10 @@ class Bundle:
218
219
  raise InvalidParameterError(
219
220
  "Bad parameter: start_access_on_date must be an str"
220
221
  )
222
+ if "user_id" in params and not isinstance(params["user_id"], int):
223
+ raise InvalidParameterError(
224
+ "Bad parameter: user_id must be an int"
225
+ )
221
226
  response, _options = Api.send_request(
222
227
  "PATCH",
223
228
  "/bundles/{id}".format(id=params["id"]),
@@ -531,6 +536,7 @@ def share(id, params=None, options=None):
531
536
  # start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
532
537
  # skip_email - boolean - BundleRegistrations can be saved without providing email?
533
538
  # skip_name - boolean - BundleRegistrations can be saved without providing name?
539
+ # user_id - int64 - The owning user id. Only site admins can set this.
534
540
  # watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
535
541
  # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
536
542
  def update(id, params=None, options=None):
@@ -641,6 +647,8 @@ def update(id, params=None, options=None):
641
647
  )
642
648
  if "skip_name" in params and not isinstance(params["skip_name"], bool):
643
649
  raise InvalidParameterError("Bad parameter: skip_name must be an bool")
650
+ if "user_id" in params and not isinstance(params["user_id"], int):
651
+ raise InvalidParameterError("Bad parameter: user_id must be an int")
644
652
  if "watermark_attachment_delete" in params and not isinstance(
645
653
  params["watermark_attachment_delete"], bool
646
654
  ):
@@ -110,7 +110,8 @@ class KeyLifecycleRule:
110
110
  # Parameters:
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 .
113
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `key_type`.
114
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `key_type`.
114
115
  def list(params=None, options=None):
115
116
  if not isinstance(params, dict):
116
117
  params = {}
@@ -122,6 +123,8 @@ def list(params=None, options=None):
122
123
  raise InvalidParameterError("Bad parameter: per_page must be an int")
123
124
  if "sort_by" in params and not isinstance(params["sort_by"], dict):
124
125
  raise InvalidParameterError("Bad parameter: sort_by must be an dict")
126
+ if "filter" in params and not isinstance(params["filter"], dict):
127
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
125
128
  return ListObj(
126
129
  KeyLifecycleRule, "GET", "/key_lifecycle_rules", params, options
127
130
  )
@@ -19,8 +19,15 @@ class Restore:
19
19
  "files_errored": None, # int64 - Number of files that were not able to be restored.
20
20
  "files_total": None, # int64 - Total number of files processed.
21
21
  "prefix": None, # string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
22
+ "restoration_type": None, # string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records.
22
23
  "restore_in_place": None, # boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
23
24
  "restore_deleted_permissions": None, # boolean - If true, we will also restore any Permissions that match the same path prefix from the same dates.
25
+ "users_restored": None, # int64 - Number of users successfully restored (only present for `restoration_type=users`).
26
+ "users_errored": None, # int64 - Number of users that failed to restore (only present for `restoration_type=users`).
27
+ "users_total": None, # int64 - Total number of users processed (only present for `restoration_type=users`).
28
+ "api_keys_restored": None, # int64 - Number of API keys restored (only present for `restoration_type=users`).
29
+ "public_keys_restored": None, # int64 - Number of public keys restored (only present for `restoration_type=users`).
30
+ "two_factor_authentication_methods_restored": None, # int64 - Number of two factor authentication methods restored (only present for `restoration_type=users`).
24
31
  "status": None, # string - Status of the restoration process.
25
32
  "update_timestamps": None, # boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
26
33
  "error_messages": None, # array(string) - Error messages received while restoring files and/or directories. Only present if there were errors.
@@ -59,6 +66,8 @@ class Restore:
59
66
  # Parameters:
60
67
  # 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.
61
68
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
69
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
70
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `restoration_type`.
62
71
  def list(params=None, options=None):
63
72
  if not isinstance(params, dict):
64
73
  params = {}
@@ -68,6 +77,10 @@ def list(params=None, options=None):
68
77
  raise InvalidParameterError("Bad parameter: cursor must be an str")
69
78
  if "per_page" in params and not isinstance(params["per_page"], int):
70
79
  raise InvalidParameterError("Bad parameter: per_page must be an int")
80
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
81
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
82
+ if "filter" in params and not isinstance(params["filter"], dict):
83
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
71
84
  return ListObj(Restore, "GET", "/restores", params, options)
72
85
 
73
86
 
@@ -78,6 +91,7 @@ def all(params=None, options=None):
78
91
  # Parameters:
79
92
  # earliest_date (required) - string - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
80
93
  # prefix - string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
94
+ # restoration_type - string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records.
81
95
  # restore_deleted_permissions - boolean - If true, we will also restore any Permissions that match the same path prefix from the same dates.
82
96
  # restore_in_place - boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
83
97
  # update_timestamps - boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
@@ -94,6 +108,12 @@ def create(params=None, options=None):
94
108
  )
95
109
  if "prefix" in params and not isinstance(params["prefix"], str):
96
110
  raise InvalidParameterError("Bad parameter: prefix must be an str")
111
+ if "restoration_type" in params and not isinstance(
112
+ params["restoration_type"], str
113
+ ):
114
+ raise InvalidParameterError(
115
+ "Bad parameter: restoration_type must be an str"
116
+ )
97
117
  if "restore_deleted_permissions" in params and not isinstance(
98
118
  params["restore_deleted_permissions"], bool
99
119
  ):