files-com 1.6.14__py3-none-any.whl → 1.6.119__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.

Files changed (53) hide show
  1. README.md +80 -18
  2. _VERSION +1 -1
  3. {files_com-1.6.14.dist-info → files_com-1.6.119.dist-info}/METADATA +81 -19
  4. {files_com-1.6.14.dist-info → files_com-1.6.119.dist-info}/RECORD +53 -46
  5. files_sdk/__init__.py +17 -1
  6. files_sdk/error.py +98 -23
  7. files_sdk/models/__init__.py +9 -0
  8. files_sdk/models/api_key.py +10 -0
  9. files_sdk/models/api_request_log.py +20 -3
  10. files_sdk/models/as2_partner.py +27 -5
  11. files_sdk/models/as2_station.py +1 -1
  12. files_sdk/models/automation.py +49 -5
  13. files_sdk/models/automation_log.py +20 -3
  14. files_sdk/models/behavior.py +2 -16
  15. files_sdk/models/bundle.py +1 -1
  16. files_sdk/models/bundle_action.py +5 -1
  17. files_sdk/models/bundle_registration.py +1 -1
  18. files_sdk/models/child_site_management_policy.py +278 -0
  19. files_sdk/models/email_log.py +17 -7
  20. files_sdk/models/exavault_api_request_log.py +20 -3
  21. files_sdk/models/file.py +8 -0
  22. files_sdk/models/file_migration_log.py +17 -7
  23. files_sdk/models/folder.py +11 -1
  24. files_sdk/models/ftp_action_log.py +20 -3
  25. files_sdk/models/gpg_key.py +61 -9
  26. files_sdk/models/history_export.py +4 -4
  27. files_sdk/models/history_export_result.py +2 -2
  28. files_sdk/models/holiday_region.py +58 -0
  29. files_sdk/models/inbox_registration.py +1 -1
  30. files_sdk/models/invoice_line_item.py +5 -0
  31. files_sdk/models/outbound_connection_log.py +20 -3
  32. files_sdk/models/partner.py +296 -0
  33. files_sdk/models/permission.py +10 -2
  34. files_sdk/models/public_hosting_request_log.py +27 -8
  35. files_sdk/models/public_key.py +39 -3
  36. files_sdk/models/remote_mount_backend.py +438 -0
  37. files_sdk/models/remote_server.py +19 -91
  38. files_sdk/models/remote_server_configuration_file.py +1 -0
  39. files_sdk/models/scim_log.py +88 -0
  40. files_sdk/models/sftp_action_log.py +20 -3
  41. files_sdk/models/siem_http_destination.py +98 -19
  42. files_sdk/models/site.py +37 -20
  43. files_sdk/models/sso_strategy.py +2 -1
  44. files_sdk/models/sync.py +574 -0
  45. files_sdk/models/sync_log.py +19 -8
  46. files_sdk/models/sync_run.py +123 -0
  47. files_sdk/models/user.py +79 -2
  48. files_sdk/models/user_cipher_use.py +24 -1
  49. files_sdk/models/user_lifecycle_rule.py +94 -39
  50. files_sdk/models/web_dav_action_log.py +20 -3
  51. {files_com-1.6.14.dist-info → files_com-1.6.119.dist-info}/WHEEL +0 -0
  52. {files_com-1.6.14.dist-info → files_com-1.6.119.dist-info}/licenses/LICENSE +0 -0
  53. {files_com-1.6.14.dist-info → files_com-1.6.119.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,278 @@
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 ChildSiteManagementPolicy:
12
+ default_attributes = {
13
+ "id": None, # int64 - Policy ID.
14
+ "policy_type": None, # string - Type of policy. Valid values: `settings`.
15
+ "name": None, # string - Name for this policy.
16
+ "description": None, # string - Description for this policy.
17
+ "value": None, # object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
18
+ "applied_child_site_ids": None, # array(int64) - IDs of child sites that this policy has been applied to. This field is read-only.
19
+ "skip_child_site_ids": None, # array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
20
+ "created_at": None, # date-time - When this policy was created.
21
+ "updated_at": None, # date-time - When this policy was last updated.
22
+ }
23
+
24
+ def __init__(self, attributes=None, options=None):
25
+ if not isinstance(attributes, dict):
26
+ attributes = {}
27
+ if not isinstance(options, dict):
28
+ options = {}
29
+ self.set_attributes(attributes)
30
+ self.options = options
31
+
32
+ def set_attributes(self, attributes):
33
+ for (
34
+ attribute,
35
+ default_value,
36
+ ) in ChildSiteManagementPolicy.default_attributes.items():
37
+ setattr(self, attribute, attributes.get(attribute, default_value))
38
+
39
+ def get_attributes(self):
40
+ return {
41
+ k: getattr(self, k, None)
42
+ for k in ChildSiteManagementPolicy.default_attributes
43
+ if getattr(self, k, None) is not None
44
+ }
45
+
46
+ # Parameters:
47
+ # value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
48
+ # skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
49
+ # policy_type - string - Type of policy. Valid values: `settings`.
50
+ # name - string - Name for this policy.
51
+ # description - string - Description for this policy.
52
+ def update(self, params=None):
53
+ if not isinstance(params, dict):
54
+ params = {}
55
+
56
+ if hasattr(self, "id") and self.id:
57
+ params["id"] = self.id
58
+ else:
59
+ raise MissingParameterError("Current object doesn't have a id")
60
+ if "id" not in params:
61
+ raise MissingParameterError("Parameter missing: id")
62
+ if "id" in params and not isinstance(params["id"], int):
63
+ raise InvalidParameterError("Bad parameter: id must be an int")
64
+ if "skip_child_site_ids" in params and not isinstance(
65
+ params["skip_child_site_ids"], builtins.list
66
+ ):
67
+ raise InvalidParameterError(
68
+ "Bad parameter: skip_child_site_ids must be an list"
69
+ )
70
+ if "policy_type" in params and not isinstance(
71
+ params["policy_type"], str
72
+ ):
73
+ raise InvalidParameterError(
74
+ "Bad parameter: policy_type must be an str"
75
+ )
76
+ if "name" in params and not isinstance(params["name"], str):
77
+ raise InvalidParameterError("Bad parameter: name must be an str")
78
+ if "description" in params and not isinstance(
79
+ params["description"], str
80
+ ):
81
+ raise InvalidParameterError(
82
+ "Bad parameter: description must be an str"
83
+ )
84
+ response, _options = Api.send_request(
85
+ "PATCH",
86
+ "/child_site_management_policies/{id}".format(id=params["id"]),
87
+ params,
88
+ self.options,
89
+ )
90
+ return response.data
91
+
92
+ def delete(self, params=None):
93
+ if not isinstance(params, dict):
94
+ params = {}
95
+
96
+ if hasattr(self, "id") and self.id:
97
+ params["id"] = self.id
98
+ else:
99
+ raise MissingParameterError("Current object doesn't have a id")
100
+ if "id" not in params:
101
+ raise MissingParameterError("Parameter missing: id")
102
+ if "id" in params and not isinstance(params["id"], int):
103
+ raise InvalidParameterError("Bad parameter: id must be an int")
104
+ Api.send_request(
105
+ "DELETE",
106
+ "/child_site_management_policies/{id}".format(id=params["id"]),
107
+ params,
108
+ self.options,
109
+ )
110
+
111
+ def destroy(self, params=None):
112
+ self.delete(params)
113
+
114
+ def save(self):
115
+ if hasattr(self, "id") and self.id:
116
+ new_obj = self.update(self.get_attributes())
117
+ self.set_attributes(new_obj.get_attributes())
118
+ return True
119
+ else:
120
+ new_obj = create(self.get_attributes(), self.options)
121
+ self.set_attributes(new_obj.get_attributes())
122
+ return True
123
+
124
+
125
+ # Parameters:
126
+ # 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.
127
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
128
+ def list(params=None, options=None):
129
+ if not isinstance(params, dict):
130
+ params = {}
131
+ if not isinstance(options, dict):
132
+ options = {}
133
+ if "cursor" in params and not isinstance(params["cursor"], str):
134
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
135
+ if "per_page" in params and not isinstance(params["per_page"], int):
136
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
137
+ return ListObj(
138
+ ChildSiteManagementPolicy,
139
+ "GET",
140
+ "/child_site_management_policies",
141
+ params,
142
+ options,
143
+ )
144
+
145
+
146
+ def all(params=None, options=None):
147
+ list(params, options)
148
+
149
+
150
+ # Parameters:
151
+ # id (required) - int64 - Child Site Management Policy ID.
152
+ def find(id, params=None, options=None):
153
+ if not isinstance(params, dict):
154
+ params = {}
155
+ if not isinstance(options, dict):
156
+ options = {}
157
+ params["id"] = id
158
+ if "id" in params and not isinstance(params["id"], int):
159
+ raise InvalidParameterError("Bad parameter: id must be an int")
160
+ if "id" not in params:
161
+ raise MissingParameterError("Parameter missing: id")
162
+ response, options = Api.send_request(
163
+ "GET",
164
+ "/child_site_management_policies/{id}".format(id=params["id"]),
165
+ params,
166
+ options,
167
+ )
168
+ return ChildSiteManagementPolicy(response.data, options)
169
+
170
+
171
+ def get(id, params=None, options=None):
172
+ find(id, params, options)
173
+
174
+
175
+ # Parameters:
176
+ # value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
177
+ # skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
178
+ # policy_type (required) - string - Type of policy. Valid values: `settings`.
179
+ # name - string - Name for this policy.
180
+ # description - string - Description for this policy.
181
+ def create(params=None, options=None):
182
+ if not isinstance(params, dict):
183
+ params = {}
184
+ if not isinstance(options, dict):
185
+ options = {}
186
+ if "value" in params and not isinstance(params["value"], dict):
187
+ raise InvalidParameterError("Bad parameter: value must be an dict")
188
+ if "skip_child_site_ids" in params and not isinstance(
189
+ params["skip_child_site_ids"], builtins.list
190
+ ):
191
+ raise InvalidParameterError(
192
+ "Bad parameter: skip_child_site_ids must be an list"
193
+ )
194
+ if "policy_type" in params and not isinstance(params["policy_type"], str):
195
+ raise InvalidParameterError(
196
+ "Bad parameter: policy_type must be an str"
197
+ )
198
+ if "name" in params and not isinstance(params["name"], str):
199
+ raise InvalidParameterError("Bad parameter: name must be an str")
200
+ if "description" in params and not isinstance(params["description"], str):
201
+ raise InvalidParameterError(
202
+ "Bad parameter: description must be an str"
203
+ )
204
+ if "policy_type" not in params:
205
+ raise MissingParameterError("Parameter missing: policy_type")
206
+ response, options = Api.send_request(
207
+ "POST", "/child_site_management_policies", params, options
208
+ )
209
+ return ChildSiteManagementPolicy(response.data, options)
210
+
211
+
212
+ # Parameters:
213
+ # value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
214
+ # skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
215
+ # policy_type - string - Type of policy. Valid values: `settings`.
216
+ # name - string - Name for this policy.
217
+ # description - string - Description for this policy.
218
+ def update(id, params=None, options=None):
219
+ if not isinstance(params, dict):
220
+ params = {}
221
+ if not isinstance(options, dict):
222
+ options = {}
223
+ params["id"] = id
224
+ if "id" in params and not isinstance(params["id"], int):
225
+ raise InvalidParameterError("Bad parameter: id must be an int")
226
+ if "value" in params and not isinstance(params["value"], dict):
227
+ raise InvalidParameterError("Bad parameter: value must be an dict")
228
+ if "skip_child_site_ids" in params and not isinstance(
229
+ params["skip_child_site_ids"], builtins.list
230
+ ):
231
+ raise InvalidParameterError(
232
+ "Bad parameter: skip_child_site_ids must be an list"
233
+ )
234
+ if "policy_type" in params and not isinstance(params["policy_type"], str):
235
+ raise InvalidParameterError(
236
+ "Bad parameter: policy_type must be an str"
237
+ )
238
+ if "name" in params and not isinstance(params["name"], str):
239
+ raise InvalidParameterError("Bad parameter: name must be an str")
240
+ if "description" in params and not isinstance(params["description"], str):
241
+ raise InvalidParameterError(
242
+ "Bad parameter: description must be an str"
243
+ )
244
+ if "id" not in params:
245
+ raise MissingParameterError("Parameter missing: id")
246
+ response, options = Api.send_request(
247
+ "PATCH",
248
+ "/child_site_management_policies/{id}".format(id=params["id"]),
249
+ params,
250
+ options,
251
+ )
252
+ return ChildSiteManagementPolicy(response.data, options)
253
+
254
+
255
+ def delete(id, params=None, options=None):
256
+ if not isinstance(params, dict):
257
+ params = {}
258
+ if not isinstance(options, dict):
259
+ options = {}
260
+ params["id"] = id
261
+ if "id" in params and not isinstance(params["id"], int):
262
+ raise InvalidParameterError("Bad parameter: id must be an int")
263
+ if "id" not in params:
264
+ raise MissingParameterError("Parameter missing: id")
265
+ Api.send_request(
266
+ "DELETE",
267
+ "/child_site_management_policies/{id}".format(id=params["id"]),
268
+ params,
269
+ options,
270
+ )
271
+
272
+
273
+ def destroy(id, params=None, options=None):
274
+ delete(id, params, options)
275
+
276
+
277
+ def new(*args, **kwargs):
278
+ return ChildSiteManagementPolicy(*args, **kwargs)
@@ -10,7 +10,7 @@ from files_sdk.error import ( # noqa: F401
10
10
 
11
11
  class EmailLog:
12
12
  default_attributes = {
13
- "timestamp": None, # date-time - Start Time of Action
13
+ "timestamp": None, # date-time - Start Time of Action. Deprecrated: Use created_at.
14
14
  "message": None, # string - Log Message
15
15
  "status": None, # string - Status of E-Mail delivery
16
16
  "subject": None, # string - Subject line of E-Mail
@@ -19,6 +19,7 @@ class EmailLog:
19
19
  "delivery_method": None, # string - How was the email delivered? `customer_smtp` or `files.com`
20
20
  "smtp_hostname": None, # string - Customer SMTP Hostname used.
21
21
  "smtp_ip": None, # string - Customer SMTP IP address as resolved for use (useful for troubleshooting DNS issues with customer SMTP).
22
+ "created_at": None, # date-time - Start Time of Action
22
23
  }
23
24
 
24
25
  def __init__(self, attributes=None, options=None):
@@ -44,8 +45,11 @@ class EmailLog:
44
45
  # Parameters:
45
46
  # 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.
46
47
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
47
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date` or `status`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ status ]`, `[ start_date, end_date ]`, `[ start_date, status ]` or `[ end_date, status ]`.
48
- # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `status`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ status ]`, `[ start_date, end_date ]`, `[ start_date, status ]` or `[ end_date, status ]`.
48
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status` and `created_at`. Valid field combinations are `[ status ]`, `[ created_at ]` or `[ status, created_at ]`.
49
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ status ]`, `[ created_at ]` or `[ status, created_at ]`.
50
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ status ]`, `[ created_at ]` or `[ status, created_at ]`.
51
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ status ]`, `[ created_at ]` or `[ status, created_at ]`.
52
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ status ]`, `[ created_at ]` or `[ status, created_at ]`.
49
53
  def list(params=None, options=None):
50
54
  if not isinstance(params, dict):
51
55
  params = {}
@@ -57,11 +61,17 @@ def list(params=None, options=None):
57
61
  raise InvalidParameterError("Bad parameter: per_page must be an int")
58
62
  if "filter" in params and not isinstance(params["filter"], dict):
59
63
  raise InvalidParameterError("Bad parameter: filter must be an dict")
60
- if "filter_prefix" in params and not isinstance(
61
- params["filter_prefix"], dict
62
- ):
64
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
65
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
66
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
63
67
  raise InvalidParameterError(
64
- "Bad parameter: filter_prefix must be an dict"
68
+ "Bad parameter: filter_gteq must be an dict"
69
+ )
70
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
71
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
72
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
73
+ raise InvalidParameterError(
74
+ "Bad parameter: filter_lteq must be an dict"
65
75
  )
66
76
  return ListObj(EmailLog, "GET", "/email_logs", params, options)
67
77
 
@@ -10,7 +10,7 @@ from files_sdk.error import ( # noqa: F401
10
10
 
11
11
  class ExavaultApiRequestLog:
12
12
  default_attributes = {
13
- "timestamp": None, # date-time - Start Time of Action
13
+ "timestamp": None, # date-time - Start Time of Action. Deprecrated: Use created_at.
14
14
  "endpoint": None, # string - Name of API Endpoint
15
15
  "version": None, # int64 - Exavault API Version
16
16
  "request_ip": None, # string - IP of requesting client
@@ -21,6 +21,7 @@ class ExavaultApiRequestLog:
21
21
  "response_code": None, # int64 - HTTP Response Code
22
22
  "success": None, # boolean - `false` if HTTP Response Code is 4xx or 5xx
23
23
  "duration_ms": None, # int64 - Duration (in milliseconds)
24
+ "created_at": None, # date-time - Start Time of Action
24
25
  }
25
26
 
26
27
  def __init__(self, attributes=None, options=None):
@@ -49,8 +50,12 @@ class ExavaultApiRequestLog:
49
50
  # Parameters:
50
51
  # 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.
51
52
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
52
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date`, `request_ip`, `request_method` or `success`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ start_date, end_date ]`, `[ start_date, request_ip ]`, `[ start_date, request_method ]`, `[ start_date, success ]`, `[ end_date, request_ip ]`, `[ end_date, request_method ]`, `[ end_date, success ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_method, success ]`, `[ start_date, end_date, request_ip ]`, `[ start_date, end_date, request_method ]`, `[ start_date, end_date, success ]`, `[ start_date, request_ip, request_method ]`, `[ start_date, request_ip, success ]`, `[ start_date, request_method, success ]`, `[ end_date, request_ip, request_method ]`, `[ end_date, request_ip, success ]`, `[ end_date, request_method, success ]`, `[ request_ip, request_method, success ]`, `[ start_date, end_date, request_ip, request_method ]`, `[ start_date, end_date, request_ip, success ]`, `[ start_date, end_date, request_method, success ]`, `[ start_date, request_ip, request_method, success ]` or `[ end_date, request_ip, request_method, success ]`.
53
- # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `request_ip` and `request_method`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ start_date, end_date ]`, `[ start_date, request_ip ]`, `[ start_date, request_method ]`, `[ start_date, success ]`, `[ end_date, request_ip ]`, `[ end_date, request_method ]`, `[ end_date, success ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_method, success ]`, `[ start_date, end_date, request_ip ]`, `[ start_date, end_date, request_method ]`, `[ start_date, end_date, success ]`, `[ start_date, request_ip, request_method ]`, `[ start_date, request_ip, success ]`, `[ start_date, request_method, success ]`, `[ end_date, request_ip, request_method ]`, `[ end_date, request_ip, success ]`, `[ end_date, request_method, success ]`, `[ request_ip, request_method, success ]`, `[ start_date, end_date, request_ip, request_method ]`, `[ start_date, end_date, request_ip, success ]`, `[ start_date, end_date, request_method, success ]`, `[ start_date, request_ip, request_method, success ]` or `[ end_date, request_ip, request_method, success ]`.
53
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `request_ip`, `request_method`, `success` or `created_at`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
54
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
55
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
56
+ # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `request_ip` and `request_method`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
57
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
58
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
54
59
  def list(params=None, options=None):
55
60
  if not isinstance(params, dict):
56
61
  params = {}
@@ -62,12 +67,24 @@ def list(params=None, options=None):
62
67
  raise InvalidParameterError("Bad parameter: per_page must be an int")
63
68
  if "filter" in params and not isinstance(params["filter"], dict):
64
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
+ )
65
76
  if "filter_prefix" in params and not isinstance(
66
77
  params["filter_prefix"], dict
67
78
  ):
68
79
  raise InvalidParameterError(
69
80
  "Bad parameter: filter_prefix must be an dict"
70
81
  )
82
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
83
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
84
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
85
+ raise InvalidParameterError(
86
+ "Bad parameter: filter_lteq must be an dict"
87
+ )
71
88
  return ListObj(
72
89
  ExavaultApiRequestLog,
73
90
  "GET",
files_sdk/models/file.py CHANGED
@@ -59,6 +59,7 @@ class File:
59
59
  "restart": None, # int64 - File byte offset to restart from.
60
60
  "structure": None, # string - If copying folder, copy just the structure?
61
61
  "with_rename": None, # boolean - Allow file rename instead of overwrite?
62
+ "buffered_upload": None, # boolean - If true, and the path refers to a destination not stored on Files.com (such as a remote server mount), the upload will be uploaded first to Files.com before being sent to the remote server mount. This can allow clients to upload using parallel parts to a remote server destination that does not offer parallel parts support natively.
62
63
  }
63
64
 
64
65
  def __init__(self, *args):
@@ -477,6 +478,7 @@ def download(path, params=None, options=None):
477
478
  # size - int64 - Size of file.
478
479
  # structure - string - If copying folder, copy just the structure?
479
480
  # with_rename - boolean - Allow file rename instead of overwrite?
481
+ # buffered_upload - boolean - If true, and the path refers to a destination not stored on Files.com (such as a remote server mount), the upload will be uploaded first to Files.com before being sent to the remote server mount. This can allow clients to upload using parallel parts to a remote server destination that does not offer parallel parts support natively.
480
482
  def create(path, params=None, options=None):
481
483
  if not isinstance(params, dict):
482
484
  params = {}
@@ -517,6 +519,12 @@ def create(path, params=None, options=None):
517
519
  raise InvalidParameterError(
518
520
  "Bad parameter: with_rename must be an bool"
519
521
  )
522
+ if "buffered_upload" in params and not isinstance(
523
+ params["buffered_upload"], bool
524
+ ):
525
+ raise InvalidParameterError(
526
+ "Bad parameter: buffered_upload must be an bool"
527
+ )
520
528
  if "path" not in params:
521
529
  raise MissingParameterError("Parameter missing: path")
522
530
  response, options = Api.send_request(
@@ -10,7 +10,7 @@ from files_sdk.error import ( # noqa: F401
10
10
 
11
11
  class FileMigrationLog:
12
12
  default_attributes = {
13
- "timestamp": None, # date-time - Start Time of Action
13
+ "timestamp": None, # date-time - Start Time of Action. Deprecrated: Use created_at.
14
14
  "file_migration_id": None, # int64 - File Migration ID
15
15
  "dest_path": None, # string - Destination path, for moves and copies
16
16
  "error_type": None, # string - Error type, if applicable
@@ -18,6 +18,7 @@ class FileMigrationLog:
18
18
  "operation": None, # string - Operation type
19
19
  "path": None, # string - File path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
20
20
  "status": None, # string - Status
21
+ "created_at": None, # date-time - Start Time of Action
21
22
  }
22
23
 
23
24
  def __init__(self, attributes=None, options=None):
@@ -46,8 +47,11 @@ class FileMigrationLog:
46
47
  # Parameters:
47
48
  # 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
49
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
49
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date`, `file_migration_id`, `operation`, `status` or `type`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ start_date, end_date ]`, `[ start_date, file_migration_id ]`, `[ start_date, operation ]`, `[ start_date, status ]`, `[ start_date, type ]`, `[ end_date, file_migration_id ]`, `[ end_date, operation ]`, `[ end_date, status ]`, `[ end_date, type ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ operation, status ]`, `[ operation, type ]`, `[ status, type ]`, `[ start_date, end_date, file_migration_id ]`, `[ start_date, end_date, operation ]`, `[ start_date, end_date, status ]`, `[ start_date, end_date, type ]`, `[ start_date, file_migration_id, operation ]`, `[ start_date, file_migration_id, status ]`, `[ start_date, file_migration_id, type ]`, `[ start_date, operation, status ]`, `[ start_date, operation, type ]`, `[ start_date, status, type ]`, `[ end_date, file_migration_id, operation ]`, `[ end_date, file_migration_id, status ]`, `[ end_date, file_migration_id, type ]`, `[ end_date, operation, status ]`, `[ end_date, operation, type ]`, `[ end_date, status, type ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, status, type ]`, `[ operation, status, type ]`, `[ start_date, end_date, file_migration_id, operation ]`, `[ start_date, end_date, file_migration_id, status ]`, `[ start_date, end_date, file_migration_id, type ]`, `[ start_date, end_date, operation, status ]`, `[ start_date, end_date, operation, type ]`, `[ start_date, end_date, status, type ]`, `[ start_date, file_migration_id, operation, status ]`, `[ start_date, file_migration_id, operation, type ]`, `[ start_date, file_migration_id, status, type ]`, `[ start_date, operation, status, type ]`, `[ end_date, file_migration_id, operation, status ]`, `[ end_date, file_migration_id, operation, type ]`, `[ end_date, file_migration_id, status, type ]`, `[ end_date, operation, status, type ]`, `[ file_migration_id, operation, status, type ]`, `[ start_date, end_date, file_migration_id, operation, status ]`, `[ start_date, end_date, file_migration_id, operation, type ]`, `[ start_date, end_date, file_migration_id, status, type ]`, `[ start_date, end_date, operation, status, type ]`, `[ start_date, file_migration_id, operation, status, type ]` or `[ end_date, file_migration_id, operation, status, type ]`.
50
- # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `operation` and `status`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ start_date, end_date ]`, `[ start_date, file_migration_id ]`, `[ start_date, operation ]`, `[ start_date, status ]`, `[ start_date, type ]`, `[ end_date, file_migration_id ]`, `[ end_date, operation ]`, `[ end_date, status ]`, `[ end_date, type ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ operation, status ]`, `[ operation, type ]`, `[ status, type ]`, `[ start_date, end_date, file_migration_id ]`, `[ start_date, end_date, operation ]`, `[ start_date, end_date, status ]`, `[ start_date, end_date, type ]`, `[ start_date, file_migration_id, operation ]`, `[ start_date, file_migration_id, status ]`, `[ start_date, file_migration_id, type ]`, `[ start_date, operation, status ]`, `[ start_date, operation, type ]`, `[ start_date, status, type ]`, `[ end_date, file_migration_id, operation ]`, `[ end_date, file_migration_id, status ]`, `[ end_date, file_migration_id, type ]`, `[ end_date, operation, status ]`, `[ end_date, operation, type ]`, `[ end_date, status, type ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, status, type ]`, `[ operation, status, type ]`, `[ start_date, end_date, file_migration_id, operation ]`, `[ start_date, end_date, file_migration_id, status ]`, `[ start_date, end_date, file_migration_id, type ]`, `[ start_date, end_date, operation, status ]`, `[ start_date, end_date, operation, type ]`, `[ start_date, end_date, status, type ]`, `[ start_date, file_migration_id, operation, status ]`, `[ start_date, file_migration_id, operation, type ]`, `[ start_date, file_migration_id, status, type ]`, `[ start_date, operation, status, type ]`, `[ end_date, file_migration_id, operation, status ]`, `[ end_date, file_migration_id, operation, type ]`, `[ end_date, file_migration_id, status, type ]`, `[ end_date, operation, status, type ]`, `[ file_migration_id, operation, status, type ]`, `[ start_date, end_date, file_migration_id, operation, status ]`, `[ start_date, end_date, file_migration_id, operation, type ]`, `[ start_date, end_date, file_migration_id, status, type ]`, `[ start_date, end_date, operation, status, type ]`, `[ start_date, file_migration_id, operation, status, type ]` or `[ end_date, file_migration_id, operation, status, type ]`.
50
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `file_migration_id`, `operation`, `status`, `type` or `created_at`. Valid field combinations are `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ created_at ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ file_migration_id, created_at ]`, `[ operation, status ]`, `[ operation, type ]`, `[ operation, created_at ]`, `[ status, type ]`, `[ status, created_at ]`, `[ type, created_at ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, operation, created_at ]`, `[ file_migration_id, status, type ]`, `[ file_migration_id, status, created_at ]`, `[ file_migration_id, type, created_at ]`, `[ operation, status, type ]`, `[ operation, status, created_at ]`, `[ operation, type, created_at ]`, `[ status, type, created_at ]`, `[ file_migration_id, operation, status, type ]`, `[ file_migration_id, operation, status, created_at ]`, `[ file_migration_id, operation, type, created_at ]`, `[ file_migration_id, status, type, created_at ]`, `[ operation, status, type, created_at ]` or `[ file_migration_id, operation, status, type, created_at ]`.
51
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ created_at ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ file_migration_id, created_at ]`, `[ operation, status ]`, `[ operation, type ]`, `[ operation, created_at ]`, `[ status, type ]`, `[ status, created_at ]`, `[ type, created_at ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, operation, created_at ]`, `[ file_migration_id, status, type ]`, `[ file_migration_id, status, created_at ]`, `[ file_migration_id, type, created_at ]`, `[ operation, status, type ]`, `[ operation, status, created_at ]`, `[ operation, type, created_at ]`, `[ status, type, created_at ]`, `[ file_migration_id, operation, status, type ]`, `[ file_migration_id, operation, status, created_at ]`, `[ file_migration_id, operation, type, created_at ]`, `[ file_migration_id, status, type, created_at ]`, `[ operation, status, type, created_at ]` or `[ file_migration_id, operation, status, type, created_at ]`.
52
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ created_at ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ file_migration_id, created_at ]`, `[ operation, status ]`, `[ operation, type ]`, `[ operation, created_at ]`, `[ status, type ]`, `[ status, created_at ]`, `[ type, created_at ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, operation, created_at ]`, `[ file_migration_id, status, type ]`, `[ file_migration_id, status, created_at ]`, `[ file_migration_id, type, created_at ]`, `[ operation, status, type ]`, `[ operation, status, created_at ]`, `[ operation, type, created_at ]`, `[ status, type, created_at ]`, `[ file_migration_id, operation, status, type ]`, `[ file_migration_id, operation, status, created_at ]`, `[ file_migration_id, operation, type, created_at ]`, `[ file_migration_id, status, type, created_at ]`, `[ operation, status, type, created_at ]` or `[ file_migration_id, operation, status, type, created_at ]`.
53
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ created_at ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ file_migration_id, created_at ]`, `[ operation, status ]`, `[ operation, type ]`, `[ operation, created_at ]`, `[ status, type ]`, `[ status, created_at ]`, `[ type, created_at ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, operation, created_at ]`, `[ file_migration_id, status, type ]`, `[ file_migration_id, status, created_at ]`, `[ file_migration_id, type, created_at ]`, `[ operation, status, type ]`, `[ operation, status, created_at ]`, `[ operation, type, created_at ]`, `[ status, type, created_at ]`, `[ file_migration_id, operation, status, type ]`, `[ file_migration_id, operation, status, created_at ]`, `[ file_migration_id, operation, type, created_at ]`, `[ file_migration_id, status, type, created_at ]`, `[ operation, status, type, created_at ]` or `[ file_migration_id, operation, status, type, created_at ]`.
54
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ file_migration_id ]`, `[ operation ]`, `[ status ]`, `[ type ]`, `[ created_at ]`, `[ file_migration_id, operation ]`, `[ file_migration_id, status ]`, `[ file_migration_id, type ]`, `[ file_migration_id, created_at ]`, `[ operation, status ]`, `[ operation, type ]`, `[ operation, created_at ]`, `[ status, type ]`, `[ status, created_at ]`, `[ type, created_at ]`, `[ file_migration_id, operation, status ]`, `[ file_migration_id, operation, type ]`, `[ file_migration_id, operation, created_at ]`, `[ file_migration_id, status, type ]`, `[ file_migration_id, status, created_at ]`, `[ file_migration_id, type, created_at ]`, `[ operation, status, type ]`, `[ operation, status, created_at ]`, `[ operation, type, created_at ]`, `[ status, type, created_at ]`, `[ file_migration_id, operation, status, type ]`, `[ file_migration_id, operation, status, created_at ]`, `[ file_migration_id, operation, type, created_at ]`, `[ file_migration_id, status, type, created_at ]`, `[ operation, status, type, created_at ]` or `[ file_migration_id, operation, status, type, created_at ]`.
51
55
  def list(params=None, options=None):
52
56
  if not isinstance(params, dict):
53
57
  params = {}
@@ -59,11 +63,17 @@ def list(params=None, options=None):
59
63
  raise InvalidParameterError("Bad parameter: per_page must be an int")
60
64
  if "filter" in params and not isinstance(params["filter"], dict):
61
65
  raise InvalidParameterError("Bad parameter: filter must be an dict")
62
- if "filter_prefix" in params and not isinstance(
63
- params["filter_prefix"], dict
64
- ):
66
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
67
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
68
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
65
69
  raise InvalidParameterError(
66
- "Bad parameter: filter_prefix must be an dict"
70
+ "Bad parameter: filter_gteq must be an dict"
71
+ )
72
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
73
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
74
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
75
+ raise InvalidParameterError(
76
+ "Bad parameter: filter_lteq must be an dict"
67
77
  )
68
78
  return ListObj(
69
79
  FileMigrationLog, "GET", "/file_migration_logs", params, options
@@ -82,9 +82,11 @@ class Folder:
82
82
  # sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
83
83
  # search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
84
84
  # search_custom_metadata_key - string - If provided, the search string in `search` will search for files where this custom metadata key matches the value sent in `search`. Set this to `*` to allow any metadata key to match the value sent in `search`.
85
- # search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
85
+ # search_all - boolean - Search entire site? If true, we will search the entire site. Do not provide a path when using this parameter. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
86
86
  # with_previews - boolean - Include file previews?
87
87
  # with_priority_color - boolean - Include file priority color information?
88
+ # type - string - Type of objects to return. Can be `folder` or `file`.
89
+ # modified_at_datetime - string - If provided, will only return files/folders modified after this time. Can be used only in combination with `type` filter.
88
90
  def list_for(path, params=None, options=None):
89
91
  if not isinstance(params, dict):
90
92
  params = {}
@@ -129,6 +131,14 @@ def list_for(path, params=None, options=None):
129
131
  raise InvalidParameterError(
130
132
  "Bad parameter: with_priority_color must be an bool"
131
133
  )
134
+ if "type" in params and not isinstance(params["type"], str):
135
+ raise InvalidParameterError("Bad parameter: type must be an str")
136
+ if "modified_at_datetime" in params and not isinstance(
137
+ params["modified_at_datetime"], str
138
+ ):
139
+ raise InvalidParameterError(
140
+ "Bad parameter: modified_at_datetime must be an str"
141
+ )
132
142
  if "path" not in params:
133
143
  raise MissingParameterError("Parameter missing: path")
134
144
  return ListObj(