files-com 1.5.0__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.
- README.md +682 -0
- _VERSION +1 -0
- files_com-1.5.0.dist-info/METADATA +694 -0
- files_com-1.5.0.dist-info/RECORD +113 -0
- files_com-1.5.0.dist-info/WHEEL +5 -0
- files_com-1.5.0.dist-info/licenses/LICENSE +21 -0
- files_com-1.5.0.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +270 -0
- files_sdk/api.py +57 -0
- files_sdk/api_client.py +327 -0
- files_sdk/error.py +2891 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +104 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +147 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/api_key.py +322 -0
- files_sdk/models/api_request_log.py +87 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +123 -0
- files_sdk/models/as2_outgoing_message.py +119 -0
- files_sdk/models/as2_partner.py +374 -0
- files_sdk/models/as2_station.py +271 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +691 -0
- files_sdk/models/automation_log.py +77 -0
- files_sdk/models/automation_run.py +108 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +334 -0
- files_sdk/models/bundle.py +550 -0
- files_sdk/models/bundle_action.py +86 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +217 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +120 -0
- files_sdk/models/bundle_registration.py +79 -0
- files_sdk/models/clickwrap.py +268 -0
- files_sdk/models/dns_record.py +59 -0
- files_sdk/models/email_incoming_message.py +102 -0
- files_sdk/models/email_log.py +74 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +85 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +791 -0
- files_sdk/models/file_action.py +39 -0
- files_sdk/models/file_comment.py +191 -0
- files_sdk/models/file_comment_reaction.py +125 -0
- files_sdk/models/file_migration.py +69 -0
- files_sdk/models/file_migration_log.py +78 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +154 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +240 -0
- files_sdk/models/ftp_action_log.py +87 -0
- files_sdk/models/gpg_key.py +254 -0
- files_sdk/models/group.py +276 -0
- files_sdk/models/group_user.py +231 -0
- files_sdk/models/history.py +236 -0
- files_sdk/models/history_export.py +238 -0
- files_sdk/models/history_export_result.py +98 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbox_recipient.py +118 -0
- files_sdk/models/inbox_registration.py +79 -0
- files_sdk/models/inbox_upload.py +80 -0
- files_sdk/models/invoice.py +91 -0
- files_sdk/models/invoice_line_item.py +46 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/lock.py +158 -0
- files_sdk/models/message.py +244 -0
- files_sdk/models/message_comment.py +223 -0
- files_sdk/models/message_comment_reaction.py +181 -0
- files_sdk/models/message_reaction.py +170 -0
- files_sdk/models/notification.py +357 -0
- files_sdk/models/outbound_connection_log.py +88 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +174 -0
- files_sdk/models/preview.py +40 -0
- files_sdk/models/priority.py +63 -0
- files_sdk/models/project.py +205 -0
- files_sdk/models/public_hosting_request_log.py +82 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +212 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_server.py +1677 -0
- files_sdk/models/remote_server_configuration_file.py +72 -0
- files_sdk/models/request.py +180 -0
- files_sdk/models/restore.py +104 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +91 -0
- files_sdk/models/sftp_host_key.py +215 -0
- files_sdk/models/share_group.py +228 -0
- files_sdk/models/share_group_member.py +41 -0
- files_sdk/models/siem_http_destination.py +773 -0
- files_sdk/models/site.py +767 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +167 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync_log.py +75 -0
- files_sdk/models/usage_by_top_level_dir.py +41 -0
- files_sdk/models/usage_daily_snapshot.py +93 -0
- files_sdk/models/usage_snapshot.py +73 -0
- files_sdk/models/user.py +893 -0
- files_sdk/models/user_cipher_use.py +68 -0
- files_sdk/models/user_request.py +166 -0
- files_sdk/models/user_sftp_client_use.py +68 -0
- files_sdk/models/web_dav_action_log.py +87 -0
- files_sdk/models/webhook_test.py +104 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
|
@@ -0,0 +1,268 @@
|
|
|
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 Clickwrap:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Clickwrap ID
|
|
14
|
+
"name": None, # string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
|
15
|
+
"body": None, # string - Body text of Clickwrap (supports Markdown formatting).
|
|
16
|
+
"use_with_users": None, # string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
|
17
|
+
"use_with_bundles": None, # string - Use this Clickwrap for Bundles?
|
|
18
|
+
"use_with_inboxes": None, # string - Use this Clickwrap for Inboxes?
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
def __init__(self, attributes=None, options=None):
|
|
22
|
+
if not isinstance(attributes, dict):
|
|
23
|
+
attributes = {}
|
|
24
|
+
if not isinstance(options, dict):
|
|
25
|
+
options = {}
|
|
26
|
+
self.set_attributes(attributes)
|
|
27
|
+
self.options = options
|
|
28
|
+
|
|
29
|
+
def set_attributes(self, attributes):
|
|
30
|
+
for attribute, default_value in Clickwrap.default_attributes.items():
|
|
31
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
32
|
+
|
|
33
|
+
def get_attributes(self):
|
|
34
|
+
return {
|
|
35
|
+
k: getattr(self, k, None)
|
|
36
|
+
for k in Clickwrap.default_attributes
|
|
37
|
+
if getattr(self, k, None) is not None
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# Parameters:
|
|
41
|
+
# name - string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
|
42
|
+
# body - string - Body text of Clickwrap (supports Markdown formatting).
|
|
43
|
+
# use_with_bundles - string - Use this Clickwrap for Bundles?
|
|
44
|
+
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
|
45
|
+
# use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
|
46
|
+
def update(self, params=None):
|
|
47
|
+
if not isinstance(params, dict):
|
|
48
|
+
params = {}
|
|
49
|
+
|
|
50
|
+
if hasattr(self, "id") and self.id:
|
|
51
|
+
params["id"] = self.id
|
|
52
|
+
else:
|
|
53
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
54
|
+
if "id" not in params:
|
|
55
|
+
raise MissingParameterError("Parameter missing: id")
|
|
56
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
57
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
58
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
59
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
60
|
+
if "body" in params and not isinstance(params["body"], str):
|
|
61
|
+
raise InvalidParameterError("Bad parameter: body must be an str")
|
|
62
|
+
if "use_with_bundles" in params and not isinstance(
|
|
63
|
+
params["use_with_bundles"], str
|
|
64
|
+
):
|
|
65
|
+
raise InvalidParameterError(
|
|
66
|
+
"Bad parameter: use_with_bundles must be an str"
|
|
67
|
+
)
|
|
68
|
+
if "use_with_inboxes" in params and not isinstance(
|
|
69
|
+
params["use_with_inboxes"], str
|
|
70
|
+
):
|
|
71
|
+
raise InvalidParameterError(
|
|
72
|
+
"Bad parameter: use_with_inboxes must be an str"
|
|
73
|
+
)
|
|
74
|
+
if "use_with_users" in params and not isinstance(
|
|
75
|
+
params["use_with_users"], str
|
|
76
|
+
):
|
|
77
|
+
raise InvalidParameterError(
|
|
78
|
+
"Bad parameter: use_with_users must be an str"
|
|
79
|
+
)
|
|
80
|
+
response, _options = Api.send_request(
|
|
81
|
+
"PATCH",
|
|
82
|
+
"/clickwraps/{id}".format(id=params["id"]),
|
|
83
|
+
params,
|
|
84
|
+
self.options,
|
|
85
|
+
)
|
|
86
|
+
return response.data
|
|
87
|
+
|
|
88
|
+
def delete(self, params=None):
|
|
89
|
+
if not isinstance(params, dict):
|
|
90
|
+
params = {}
|
|
91
|
+
|
|
92
|
+
if hasattr(self, "id") and self.id:
|
|
93
|
+
params["id"] = self.id
|
|
94
|
+
else:
|
|
95
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
96
|
+
if "id" not in params:
|
|
97
|
+
raise MissingParameterError("Parameter missing: id")
|
|
98
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
99
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
100
|
+
Api.send_request(
|
|
101
|
+
"DELETE",
|
|
102
|
+
"/clickwraps/{id}".format(id=params["id"]),
|
|
103
|
+
params,
|
|
104
|
+
self.options,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
def destroy(self, params=None):
|
|
108
|
+
self.delete(params)
|
|
109
|
+
|
|
110
|
+
def save(self):
|
|
111
|
+
if hasattr(self, "id") and self.id:
|
|
112
|
+
new_obj = self.update(self.get_attributes())
|
|
113
|
+
self.set_attributes(new_obj.get_attributes())
|
|
114
|
+
return True
|
|
115
|
+
else:
|
|
116
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
117
|
+
self.set_attributes(new_obj.get_attributes())
|
|
118
|
+
return True
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# Parameters:
|
|
122
|
+
# 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.
|
|
123
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
124
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
|
125
|
+
def list(params=None, options=None):
|
|
126
|
+
if not isinstance(params, dict):
|
|
127
|
+
params = {}
|
|
128
|
+
if not isinstance(options, dict):
|
|
129
|
+
options = {}
|
|
130
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
131
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
132
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
133
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
134
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
135
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
136
|
+
return ListObj(Clickwrap, "GET", "/clickwraps", params, options)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def all(params=None, options=None):
|
|
140
|
+
list(params, options)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# Parameters:
|
|
144
|
+
# id (required) - int64 - Clickwrap ID.
|
|
145
|
+
def find(id, params=None, options=None):
|
|
146
|
+
if not isinstance(params, dict):
|
|
147
|
+
params = {}
|
|
148
|
+
if not isinstance(options, dict):
|
|
149
|
+
options = {}
|
|
150
|
+
params["id"] = id
|
|
151
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
152
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
153
|
+
if "id" not in params:
|
|
154
|
+
raise MissingParameterError("Parameter missing: id")
|
|
155
|
+
response, options = Api.send_request(
|
|
156
|
+
"GET", "/clickwraps/{id}".format(id=params["id"]), params, options
|
|
157
|
+
)
|
|
158
|
+
return Clickwrap(response.data, options)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def get(id, params=None, options=None):
|
|
162
|
+
find(id, params, options)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# Parameters:
|
|
166
|
+
# name - string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
|
167
|
+
# body - string - Body text of Clickwrap (supports Markdown formatting).
|
|
168
|
+
# use_with_bundles - string - Use this Clickwrap for Bundles?
|
|
169
|
+
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
|
170
|
+
# use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
|
171
|
+
def create(params=None, options=None):
|
|
172
|
+
if not isinstance(params, dict):
|
|
173
|
+
params = {}
|
|
174
|
+
if not isinstance(options, dict):
|
|
175
|
+
options = {}
|
|
176
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
177
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
178
|
+
if "body" in params and not isinstance(params["body"], str):
|
|
179
|
+
raise InvalidParameterError("Bad parameter: body must be an str")
|
|
180
|
+
if "use_with_bundles" in params and not isinstance(
|
|
181
|
+
params["use_with_bundles"], str
|
|
182
|
+
):
|
|
183
|
+
raise InvalidParameterError(
|
|
184
|
+
"Bad parameter: use_with_bundles must be an str"
|
|
185
|
+
)
|
|
186
|
+
if "use_with_inboxes" in params and not isinstance(
|
|
187
|
+
params["use_with_inboxes"], str
|
|
188
|
+
):
|
|
189
|
+
raise InvalidParameterError(
|
|
190
|
+
"Bad parameter: use_with_inboxes must be an str"
|
|
191
|
+
)
|
|
192
|
+
if "use_with_users" in params and not isinstance(
|
|
193
|
+
params["use_with_users"], str
|
|
194
|
+
):
|
|
195
|
+
raise InvalidParameterError(
|
|
196
|
+
"Bad parameter: use_with_users must be an str"
|
|
197
|
+
)
|
|
198
|
+
response, options = Api.send_request(
|
|
199
|
+
"POST", "/clickwraps", params, options
|
|
200
|
+
)
|
|
201
|
+
return Clickwrap(response.data, options)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
# Parameters:
|
|
205
|
+
# name - string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
|
206
|
+
# body - string - Body text of Clickwrap (supports Markdown formatting).
|
|
207
|
+
# use_with_bundles - string - Use this Clickwrap for Bundles?
|
|
208
|
+
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
|
209
|
+
# use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
|
210
|
+
def update(id, params=None, options=None):
|
|
211
|
+
if not isinstance(params, dict):
|
|
212
|
+
params = {}
|
|
213
|
+
if not isinstance(options, dict):
|
|
214
|
+
options = {}
|
|
215
|
+
params["id"] = id
|
|
216
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
217
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
218
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
219
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
220
|
+
if "body" in params and not isinstance(params["body"], str):
|
|
221
|
+
raise InvalidParameterError("Bad parameter: body must be an str")
|
|
222
|
+
if "use_with_bundles" in params and not isinstance(
|
|
223
|
+
params["use_with_bundles"], str
|
|
224
|
+
):
|
|
225
|
+
raise InvalidParameterError(
|
|
226
|
+
"Bad parameter: use_with_bundles must be an str"
|
|
227
|
+
)
|
|
228
|
+
if "use_with_inboxes" in params and not isinstance(
|
|
229
|
+
params["use_with_inboxes"], str
|
|
230
|
+
):
|
|
231
|
+
raise InvalidParameterError(
|
|
232
|
+
"Bad parameter: use_with_inboxes must be an str"
|
|
233
|
+
)
|
|
234
|
+
if "use_with_users" in params and not isinstance(
|
|
235
|
+
params["use_with_users"], str
|
|
236
|
+
):
|
|
237
|
+
raise InvalidParameterError(
|
|
238
|
+
"Bad parameter: use_with_users must be an str"
|
|
239
|
+
)
|
|
240
|
+
if "id" not in params:
|
|
241
|
+
raise MissingParameterError("Parameter missing: id")
|
|
242
|
+
response, options = Api.send_request(
|
|
243
|
+
"PATCH", "/clickwraps/{id}".format(id=params["id"]), params, options
|
|
244
|
+
)
|
|
245
|
+
return Clickwrap(response.data, options)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def delete(id, params=None, options=None):
|
|
249
|
+
if not isinstance(params, dict):
|
|
250
|
+
params = {}
|
|
251
|
+
if not isinstance(options, dict):
|
|
252
|
+
options = {}
|
|
253
|
+
params["id"] = id
|
|
254
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
255
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
256
|
+
if "id" not in params:
|
|
257
|
+
raise MissingParameterError("Parameter missing: id")
|
|
258
|
+
Api.send_request(
|
|
259
|
+
"DELETE", "/clickwraps/{id}".format(id=params["id"]), params, options
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def destroy(id, params=None, options=None):
|
|
264
|
+
delete(id, params, options)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def new(*args, **kwargs):
|
|
268
|
+
return Clickwrap(*args, **kwargs)
|
|
@@ -0,0 +1,59 @@
|
|
|
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 DnsRecord:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # string - Unique label for DNS record; used by Zapier and other integrations.
|
|
14
|
+
"domain": None, # string - DNS record domain name
|
|
15
|
+
"rrtype": None, # string - DNS record type
|
|
16
|
+
"value": None, # string - DNS record value
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
def __init__(self, attributes=None, options=None):
|
|
20
|
+
if not isinstance(attributes, dict):
|
|
21
|
+
attributes = {}
|
|
22
|
+
if not isinstance(options, dict):
|
|
23
|
+
options = {}
|
|
24
|
+
self.set_attributes(attributes)
|
|
25
|
+
self.options = options
|
|
26
|
+
|
|
27
|
+
def set_attributes(self, attributes):
|
|
28
|
+
for attribute, default_value in DnsRecord.default_attributes.items():
|
|
29
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
30
|
+
|
|
31
|
+
def get_attributes(self):
|
|
32
|
+
return {
|
|
33
|
+
k: getattr(self, k, None)
|
|
34
|
+
for k in DnsRecord.default_attributes
|
|
35
|
+
if getattr(self, k, None) is not None
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Parameters:
|
|
40
|
+
# 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.
|
|
41
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
42
|
+
def list(params=None, options=None):
|
|
43
|
+
if not isinstance(params, dict):
|
|
44
|
+
params = {}
|
|
45
|
+
if not isinstance(options, dict):
|
|
46
|
+
options = {}
|
|
47
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
48
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
49
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
50
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
51
|
+
return ListObj(DnsRecord, "GET", "/dns_records", params, options)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def all(params=None, options=None):
|
|
55
|
+
list(params, options)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def new(*args, **kwargs):
|
|
59
|
+
return DnsRecord(*args, **kwargs)
|
|
@@ -0,0 +1,102 @@
|
|
|
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 EmailIncomingMessage:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Id of the Email Incoming Message
|
|
14
|
+
"inbox_id": None, # int64 - Id of the Inbox associated with this message
|
|
15
|
+
"sender": None, # string - Sender of the email
|
|
16
|
+
"sender_name": None, # string - Sender name
|
|
17
|
+
"status": None, # string - Status of the message
|
|
18
|
+
"body": None, # string - Body of the email
|
|
19
|
+
"message": None, # string - Message describing the failure
|
|
20
|
+
"created_at": None, # date-time - Message creation date/time
|
|
21
|
+
"inbox_title": None, # string - Title of the Inbox associated with this message
|
|
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 EmailIncomingMessage.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 EmailIncomingMessage.default_attributes
|
|
43
|
+
if getattr(self, k, None) is not None
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Parameters:
|
|
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.
|
|
49
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
50
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`, `sender`, `status` or `inbox_id`.
|
|
51
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `inbox_id`, `sender` or `status`. Valid field combinations are `[ inbox_id, created_at ]`, `[ sender, created_at ]`, `[ status, created_at ]`, `[ inbox_id, status ]`, `[ status, sender ]`, `[ inbox_id, status, created_at ]`, `[ status, sender, created_at ]`, `[ inbox_id, status, sender ]` or `[ inbox_id, status, sender, created_at ]`.
|
|
52
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
53
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
54
|
+
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `sender`.
|
|
55
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
56
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
57
|
+
def list(params=None, options=None):
|
|
58
|
+
if not isinstance(params, dict):
|
|
59
|
+
params = {}
|
|
60
|
+
if not isinstance(options, dict):
|
|
61
|
+
options = {}
|
|
62
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
63
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
64
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
65
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
66
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
67
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
68
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
69
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
70
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
71
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
72
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
73
|
+
raise InvalidParameterError(
|
|
74
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
75
|
+
)
|
|
76
|
+
if "filter_prefix" in params and not isinstance(
|
|
77
|
+
params["filter_prefix"], dict
|
|
78
|
+
):
|
|
79
|
+
raise InvalidParameterError(
|
|
80
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
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
|
+
)
|
|
88
|
+
return ListObj(
|
|
89
|
+
EmailIncomingMessage,
|
|
90
|
+
"GET",
|
|
91
|
+
"/email_incoming_messages",
|
|
92
|
+
params,
|
|
93
|
+
options,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def all(params=None, options=None):
|
|
98
|
+
list(params, options)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def new(*args, **kwargs):
|
|
102
|
+
return EmailIncomingMessage(*args, **kwargs)
|
|
@@ -0,0 +1,74 @@
|
|
|
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 EmailLog:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"timestamp": None, # date-time - Start Time of Action
|
|
14
|
+
"message": None, # string - Log Message
|
|
15
|
+
"status": None, # string - Status of E-Mail delivery
|
|
16
|
+
"subject": None, # string - Subject line of E-Mail
|
|
17
|
+
"to": None, # string - To field of E-Mail
|
|
18
|
+
"cc": None, # string - CC field of E-Mail
|
|
19
|
+
"delivery_method": None, # string - How was the email delivered? `customer_smtp` or `files.com`
|
|
20
|
+
"smtp_hostname": None, # string - Customer SMTP Hostname used.
|
|
21
|
+
"smtp_ip": None, # string - Customer SMTP IP address as resolved for use (useful for troubleshooting DNS issues with customer SMTP).
|
|
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 attribute, default_value in EmailLog.default_attributes.items():
|
|
34
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
35
|
+
|
|
36
|
+
def get_attributes(self):
|
|
37
|
+
return {
|
|
38
|
+
k: getattr(self, k, None)
|
|
39
|
+
for k in EmailLog.default_attributes
|
|
40
|
+
if getattr(self, k, None) is not None
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Parameters:
|
|
45
|
+
# 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
|
+
# 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 ]`.
|
|
49
|
+
def list(params=None, options=None):
|
|
50
|
+
if not isinstance(params, dict):
|
|
51
|
+
params = {}
|
|
52
|
+
if not isinstance(options, dict):
|
|
53
|
+
options = {}
|
|
54
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
55
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
56
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
57
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
58
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
59
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
60
|
+
if "filter_prefix" in params and not isinstance(
|
|
61
|
+
params["filter_prefix"], dict
|
|
62
|
+
):
|
|
63
|
+
raise InvalidParameterError(
|
|
64
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
65
|
+
)
|
|
66
|
+
return ListObj(EmailLog, "GET", "/email_logs", params, options)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def all(params=None, options=None):
|
|
70
|
+
list(params, options)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def new(*args, **kwargs):
|
|
74
|
+
return EmailLog(*args, **kwargs)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.error import ( # noqa: F401
|
|
4
|
+
InvalidParameterError,
|
|
5
|
+
MissingParameterError,
|
|
6
|
+
NotImplementedError,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Errors:
|
|
11
|
+
default_attributes = {
|
|
12
|
+
"fields": None, # array(string) - A list of fields where errors occur
|
|
13
|
+
"messages": None, # array(string) - A list of error messages
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
def __init__(self, attributes=None, options=None):
|
|
17
|
+
if not isinstance(attributes, dict):
|
|
18
|
+
attributes = {}
|
|
19
|
+
if not isinstance(options, dict):
|
|
20
|
+
options = {}
|
|
21
|
+
self.set_attributes(attributes)
|
|
22
|
+
self.options = options
|
|
23
|
+
|
|
24
|
+
def set_attributes(self, attributes):
|
|
25
|
+
for attribute, default_value in Errors.default_attributes.items():
|
|
26
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
27
|
+
|
|
28
|
+
def get_attributes(self):
|
|
29
|
+
return {
|
|
30
|
+
k: getattr(self, k, None)
|
|
31
|
+
for k in Errors.default_attributes
|
|
32
|
+
if getattr(self, k, None) is not None
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def new(*args, **kwargs):
|
|
37
|
+
return Errors(*args, **kwargs)
|
|
@@ -0,0 +1,85 @@
|
|
|
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 ExavaultApiRequestLog:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"timestamp": None, # date-time - Start Time of Action
|
|
14
|
+
"endpoint": None, # string - Name of API Endpoint
|
|
15
|
+
"version": None, # string - Exavault API Version
|
|
16
|
+
"request_ip": None, # string - IP of requesting client
|
|
17
|
+
"request_method": None, # string - HTTP Method
|
|
18
|
+
"error_type": None, # string - Error type, if applicable
|
|
19
|
+
"error_message": None, # string - Error message, if applicable
|
|
20
|
+
"user_agent": None, # string - User-Agent
|
|
21
|
+
"response_code": None, # int64 - HTTP Response Code
|
|
22
|
+
"success": None, # boolean - `false` if HTTP Response Code is 4xx or 5xx
|
|
23
|
+
"duration_ms": None, # int64 - Duration (in milliseconds)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def __init__(self, attributes=None, options=None):
|
|
27
|
+
if not isinstance(attributes, dict):
|
|
28
|
+
attributes = {}
|
|
29
|
+
if not isinstance(options, dict):
|
|
30
|
+
options = {}
|
|
31
|
+
self.set_attributes(attributes)
|
|
32
|
+
self.options = options
|
|
33
|
+
|
|
34
|
+
def set_attributes(self, attributes):
|
|
35
|
+
for (
|
|
36
|
+
attribute,
|
|
37
|
+
default_value,
|
|
38
|
+
) in ExavaultApiRequestLog.default_attributes.items():
|
|
39
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
40
|
+
|
|
41
|
+
def get_attributes(self):
|
|
42
|
+
return {
|
|
43
|
+
k: getattr(self, k, None)
|
|
44
|
+
for k in ExavaultApiRequestLog.default_attributes
|
|
45
|
+
if getattr(self, k, None) is not None
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Parameters:
|
|
50
|
+
# 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
|
+
# 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 ]`.
|
|
54
|
+
def list(params=None, options=None):
|
|
55
|
+
if not isinstance(params, dict):
|
|
56
|
+
params = {}
|
|
57
|
+
if not isinstance(options, dict):
|
|
58
|
+
options = {}
|
|
59
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
60
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
61
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
62
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
63
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
64
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
65
|
+
if "filter_prefix" in params and not isinstance(
|
|
66
|
+
params["filter_prefix"], dict
|
|
67
|
+
):
|
|
68
|
+
raise InvalidParameterError(
|
|
69
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
70
|
+
)
|
|
71
|
+
return ListObj(
|
|
72
|
+
ExavaultApiRequestLog,
|
|
73
|
+
"GET",
|
|
74
|
+
"/exavault_api_request_logs",
|
|
75
|
+
params,
|
|
76
|
+
options,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def all(params=None, options=None):
|
|
81
|
+
list(params, options)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def new(*args, **kwargs):
|
|
85
|
+
return ExavaultApiRequestLog(*args, **kwargs)
|