files-com 1.6.208__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 +758 -0
- _VERSION +1 -0
- files_com-1.6.208.dist-info/METADATA +770 -0
- files_com-1.6.208.dist-info/RECORD +126 -0
- files_com-1.6.208.dist-info/WHEEL +5 -0
- files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
- files_com-1.6.208.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +309 -0
- files_sdk/api.py +63 -0
- files_sdk/api_client.py +336 -0
- files_sdk/error.py +2981 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +119 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +153 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/agent_push_update.py +44 -0
- files_sdk/models/api_key.py +318 -0
- files_sdk/models/api_request_log.py +105 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +117 -0
- files_sdk/models/as2_outgoing_message.py +113 -0
- files_sdk/models/as2_partner.py +415 -0
- files_sdk/models/as2_station.py +282 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +823 -0
- files_sdk/models/automation_log.py +94 -0
- files_sdk/models/automation_run.py +112 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +340 -0
- files_sdk/models/bundle.py +686 -0
- files_sdk/models/bundle_action.py +93 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +252 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +133 -0
- files_sdk/models/bundle_registration.py +82 -0
- files_sdk/models/child_site_management_policy.py +278 -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 +84 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +102 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +851 -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 +88 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +186 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +265 -0
- files_sdk/models/ftp_action_log.py +104 -0
- files_sdk/models/gpg_key.py +333 -0
- files_sdk/models/group.py +338 -0
- files_sdk/models/group_user.py +235 -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/holiday_region.py +58 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbound_s3_log.py +95 -0
- files_sdk/models/inbox_recipient.py +124 -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 +51 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/key_lifecycle_rule.py +243 -0
- files_sdk/models/lock.py +174 -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 +451 -0
- files_sdk/models/outbound_connection_log.py +105 -0
- files_sdk/models/partner.py +307 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +190 -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 +101 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +269 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_mount_backend.py +438 -0
- files_sdk/models/remote_server.py +1854 -0
- files_sdk/models/remote_server_configuration_file.py +73 -0
- files_sdk/models/remote_server_credential.py +855 -0
- files_sdk/models/request.py +184 -0
- files_sdk/models/restore.py +142 -0
- files_sdk/models/scim_log.py +88 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +108 -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 +1074 -0
- files_sdk/models/site.py +1289 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +168 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync.py +588 -0
- files_sdk/models/sync_log.py +86 -0
- files_sdk/models/sync_run.py +124 -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 +1232 -0
- files_sdk/models/user_cipher_use.py +91 -0
- files_sdk/models/user_lifecycle_rule.py +355 -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 +104 -0
- files_sdk/models/webhook_test.py +116 -0
- files_sdk/models/workspace.py +202 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
files_sdk/models/app.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
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 App:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"app_type": None, # string - The type of the App
|
|
14
|
+
"documentation_links": None, # object - Collection of named links to documentation
|
|
15
|
+
"extended_description": None, # string - Long description for the in-App landing page
|
|
16
|
+
"extended_description_for_marketing_site": None, # string - Long form description of the App
|
|
17
|
+
"external_homepage_url": None, # string - Link to external homepage
|
|
18
|
+
"featured": None, # boolean - Is featured on the App listing?
|
|
19
|
+
"folder_behavior_type": None, # string - Associated Folder Behavior type, if any
|
|
20
|
+
"icon_url": None, # string - App icon
|
|
21
|
+
"logo_thumbnail_url": None, # string - Logo thumbnail for the App
|
|
22
|
+
"logo_url": None, # string - Full size logo for the App
|
|
23
|
+
"marketing_intro": None, # string - Marketing introdution of the App
|
|
24
|
+
"marketing_youtube_url": None, # string - Marketing video page
|
|
25
|
+
"name": None, # string - Name of the App
|
|
26
|
+
"package_manager_install_command": None, # string - Package manager install command
|
|
27
|
+
"remote_server_type": None, # string - Associated Remote Server type, if any
|
|
28
|
+
"screenshot_list_urls": None, # array(string) - Screenshots of the App
|
|
29
|
+
"sdk_installation_instructions_link": None, # string - Link to SDK installation instructions
|
|
30
|
+
"short_description": None, # string - Short description of the App
|
|
31
|
+
"sso_strategy_type": None, # string - Associated SSO Strategy type, if any
|
|
32
|
+
"siem_type": None, # string - Associated SIEM type, if any
|
|
33
|
+
"tutorial_youtube_url": None, # string - Tutorial video page
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
def __init__(self, attributes=None, options=None):
|
|
37
|
+
if not isinstance(attributes, dict):
|
|
38
|
+
attributes = {}
|
|
39
|
+
if not isinstance(options, dict):
|
|
40
|
+
options = {}
|
|
41
|
+
self.set_attributes(attributes)
|
|
42
|
+
self.options = options
|
|
43
|
+
|
|
44
|
+
def set_attributes(self, attributes):
|
|
45
|
+
for attribute, default_value in App.default_attributes.items():
|
|
46
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
47
|
+
|
|
48
|
+
def get_attributes(self):
|
|
49
|
+
return {
|
|
50
|
+
k: getattr(self, k, None)
|
|
51
|
+
for k in App.default_attributes
|
|
52
|
+
if getattr(self, k, None) is not None
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# Parameters:
|
|
57
|
+
# 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.
|
|
58
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
59
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name` and `app_type`.
|
|
60
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name` and `app_type`. Valid field combinations are `[ name, app_type ]`.
|
|
61
|
+
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`.
|
|
62
|
+
def list(params=None, options=None):
|
|
63
|
+
if not isinstance(params, dict):
|
|
64
|
+
params = {}
|
|
65
|
+
if not isinstance(options, dict):
|
|
66
|
+
options = {}
|
|
67
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
68
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
69
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
70
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
71
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
72
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
73
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
74
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
75
|
+
if "filter_prefix" in params and not isinstance(
|
|
76
|
+
params["filter_prefix"], dict
|
|
77
|
+
):
|
|
78
|
+
raise InvalidParameterError(
|
|
79
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
80
|
+
)
|
|
81
|
+
return ListObj(App, "GET", "/apps", params, options)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def all(params=None, options=None):
|
|
85
|
+
list(params, options)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def new(*args, **kwargs):
|
|
89
|
+
return App(*args, **kwargs)
|
|
@@ -0,0 +1,117 @@
|
|
|
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 As2IncomingMessage:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Id of the AS2 Partner.
|
|
14
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Incoming Message.
|
|
15
|
+
"as2_partner_id": None, # int64 - Id of the AS2 Partner associated with this message.
|
|
16
|
+
"as2_station_id": None, # int64 - Id of the AS2 Station associated with this message.
|
|
17
|
+
"uuid": None, # string - UUID assigned to this message.
|
|
18
|
+
"content_type": None, # string - Content Type header of the incoming message.
|
|
19
|
+
"http_headers": None, # object - HTTP Headers sent with this message.
|
|
20
|
+
"processing_result": None, # string - Result of processing.
|
|
21
|
+
"processing_result_description": None, # string - Result of processing description.
|
|
22
|
+
"mic": None, # string - AS2 Message Integrity Check
|
|
23
|
+
"mic_algo": None, # string - AS2 Message Integrity Check Algorithm Used
|
|
24
|
+
"as2_to": None, # string - AS2 TO header of message
|
|
25
|
+
"as2_from": None, # string - AS2 FROM header of message
|
|
26
|
+
"message_id": None, # string - AS2 Message Id
|
|
27
|
+
"subject": None, # string - AS2 Subject Header
|
|
28
|
+
"date": None, # string - Date Header
|
|
29
|
+
"body_size": None, # string - Encrypted Payload Body Size
|
|
30
|
+
"attachment_filename": None, # string - Filename of the file being received.
|
|
31
|
+
"ip": None, # string - IP Address of the Sender
|
|
32
|
+
"created_at": None, # date-time - Message creation date/time
|
|
33
|
+
"http_response_code": None, # string - HTTP Response Code sent for this message
|
|
34
|
+
"http_response_headers": None, # object - HTTP Headers sent for this message.
|
|
35
|
+
"recipient_serial": None, # string - Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial
|
|
36
|
+
"hex_recipient_serial": None, # string - Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial in hex format.
|
|
37
|
+
"recipient_issuer": None, # string - Incoming Message Recipient(the Client Cert used to encrypt this message)'s issuer
|
|
38
|
+
"message_received": None, # boolean - Message body received?
|
|
39
|
+
"message_decrypted": None, # boolean - Message decrypted successfully?
|
|
40
|
+
"message_signature_verified": None, # boolean - Message signature verified?
|
|
41
|
+
"message_processing_success": None, # boolean - Message processed successfully?
|
|
42
|
+
"message_mdn_returned": None, # boolean - MDN returned?
|
|
43
|
+
"encrypted_uri": None, # string - URL to download the encrypted signed smime that is to sent as AS2 body
|
|
44
|
+
"smime_signed_uri": None, # string - URL to download the file contents as smime with signature
|
|
45
|
+
"smime_uri": None, # string - URL to download the file contents encoded as smime
|
|
46
|
+
"raw_uri": None, # string - URL to download the original file contents
|
|
47
|
+
"mdn_response_uri": None, # string - URL to download the http response body
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
def __init__(self, attributes=None, options=None):
|
|
51
|
+
if not isinstance(attributes, dict):
|
|
52
|
+
attributes = {}
|
|
53
|
+
if not isinstance(options, dict):
|
|
54
|
+
options = {}
|
|
55
|
+
self.set_attributes(attributes)
|
|
56
|
+
self.options = options
|
|
57
|
+
|
|
58
|
+
def set_attributes(self, attributes):
|
|
59
|
+
for (
|
|
60
|
+
attribute,
|
|
61
|
+
default_value,
|
|
62
|
+
) in As2IncomingMessage.default_attributes.items():
|
|
63
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
64
|
+
|
|
65
|
+
def get_attributes(self):
|
|
66
|
+
return {
|
|
67
|
+
k: getattr(self, k, None)
|
|
68
|
+
for k in As2IncomingMessage.default_attributes
|
|
69
|
+
if getattr(self, k, None) is not None
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Parameters:
|
|
74
|
+
# 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.
|
|
75
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
76
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `as2_partner_id`.
|
|
77
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `as2_station_id`, `workspace_id` or `as2_partner_id`. Valid field combinations are `[ as2_station_id, created_at ]`, `[ workspace_id, created_at ]`, `[ as2_partner_id, created_at ]`, `[ workspace_id, as2_station_id ]`, `[ workspace_id, as2_partner_id ]`, `[ workspace_id, as2_station_id, created_at ]` or `[ workspace_id, as2_partner_id, created_at ]`.
|
|
78
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
79
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
80
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
81
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
82
|
+
def list(params=None, options=None):
|
|
83
|
+
if not isinstance(params, dict):
|
|
84
|
+
params = {}
|
|
85
|
+
if not isinstance(options, dict):
|
|
86
|
+
options = {}
|
|
87
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
88
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
89
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
90
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
91
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
92
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
93
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
94
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
95
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
96
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
97
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
98
|
+
raise InvalidParameterError(
|
|
99
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
100
|
+
)
|
|
101
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
102
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
103
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
104
|
+
raise InvalidParameterError(
|
|
105
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
106
|
+
)
|
|
107
|
+
return ListObj(
|
|
108
|
+
As2IncomingMessage, "GET", "/as2_incoming_messages", params, options
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def all(params=None, options=None):
|
|
113
|
+
list(params, options)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def new(*args, **kwargs):
|
|
117
|
+
return As2IncomingMessage(*args, **kwargs)
|
|
@@ -0,0 +1,113 @@
|
|
|
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 As2OutgoingMessage:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Id of the AS2 Partner.
|
|
14
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Outgoing Message.
|
|
15
|
+
"as2_partner_id": None, # int64 - Id of the AS2 Partner associated with this message.
|
|
16
|
+
"as2_station_id": None, # int64 - Id of the AS2 Station associated with this message.
|
|
17
|
+
"uuid": None, # string - UUID assigned to this message.
|
|
18
|
+
"http_headers": None, # object - HTTP Headers sent with this message.
|
|
19
|
+
"processing_result": None, # string - Result of processing.
|
|
20
|
+
"processing_result_description": None, # string - Result of processing description.
|
|
21
|
+
"mic": None, # string - AS2 Message Integrity Check SHA1
|
|
22
|
+
"mic_sha_256": None, # string - AS2 Message Integrity Check SHA256
|
|
23
|
+
"as2_to": None, # string - AS2 TO
|
|
24
|
+
"as2_from": None, # string - AS2 FROM
|
|
25
|
+
"date": None, # string - Date Header
|
|
26
|
+
"message_id": None, # string - AS2 Message Id
|
|
27
|
+
"body_size": None, # string - Encrypted Payload Body Size
|
|
28
|
+
"attachment_filename": None, # string - Filename of the file being sent.
|
|
29
|
+
"created_at": None, # date-time - Message creation date/time
|
|
30
|
+
"http_response_code": None, # string - HTTP Response Code received for this message
|
|
31
|
+
"http_response_headers": None, # object - HTTP Headers received for this message.
|
|
32
|
+
"http_transmission_duration": None, # double - HTTP transmission duration in seceonds
|
|
33
|
+
"mdn_received": None, # boolean - Did the partner give a response body?
|
|
34
|
+
"mdn_valid": None, # boolean - Is the response in MDN format?
|
|
35
|
+
"mdn_signature_verified": None, # boolean - MDN signature verified?
|
|
36
|
+
"mdn_message_id_matched": None, # boolean - MDN message id matched?
|
|
37
|
+
"mdn_mic_matched": None, # boolean - MDN MIC matched?
|
|
38
|
+
"mdn_processing_success": None, # boolean - MDN disposition indicate a successful processing?
|
|
39
|
+
"raw_uri": None, # string - URL to download the original file contents
|
|
40
|
+
"smime_uri": None, # string - URL to download the file contents encoded as smime
|
|
41
|
+
"smime_signed_uri": None, # string - URL to download the file contents as smime with signature
|
|
42
|
+
"encrypted_uri": None, # string - URL to download the encrypted signed smime that is to sent as AS2 body
|
|
43
|
+
"mdn_response_uri": None, # string - URL to download the http response body
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
def __init__(self, attributes=None, options=None):
|
|
47
|
+
if not isinstance(attributes, dict):
|
|
48
|
+
attributes = {}
|
|
49
|
+
if not isinstance(options, dict):
|
|
50
|
+
options = {}
|
|
51
|
+
self.set_attributes(attributes)
|
|
52
|
+
self.options = options
|
|
53
|
+
|
|
54
|
+
def set_attributes(self, attributes):
|
|
55
|
+
for (
|
|
56
|
+
attribute,
|
|
57
|
+
default_value,
|
|
58
|
+
) in As2OutgoingMessage.default_attributes.items():
|
|
59
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
60
|
+
|
|
61
|
+
def get_attributes(self):
|
|
62
|
+
return {
|
|
63
|
+
k: getattr(self, k, None)
|
|
64
|
+
for k in As2OutgoingMessage.default_attributes
|
|
65
|
+
if getattr(self, k, None) is not None
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# Parameters:
|
|
70
|
+
# 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.
|
|
71
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
72
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `as2_partner_id`.
|
|
73
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `as2_station_id`, `workspace_id` or `as2_partner_id`. Valid field combinations are `[ as2_station_id, created_at ]`, `[ workspace_id, created_at ]`, `[ as2_partner_id, created_at ]`, `[ workspace_id, as2_station_id ]`, `[ workspace_id, as2_partner_id ]`, `[ workspace_id, as2_station_id, created_at ]` or `[ workspace_id, as2_partner_id, created_at ]`.
|
|
74
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
75
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
76
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
77
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
78
|
+
def list(params=None, options=None):
|
|
79
|
+
if not isinstance(params, dict):
|
|
80
|
+
params = {}
|
|
81
|
+
if not isinstance(options, dict):
|
|
82
|
+
options = {}
|
|
83
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
84
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
85
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
86
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
87
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
88
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
89
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
90
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
91
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
92
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
93
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
94
|
+
raise InvalidParameterError(
|
|
95
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
96
|
+
)
|
|
97
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
98
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
99
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
100
|
+
raise InvalidParameterError(
|
|
101
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
102
|
+
)
|
|
103
|
+
return ListObj(
|
|
104
|
+
As2OutgoingMessage, "GET", "/as2_outgoing_messages", params, options
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def all(params=None, options=None):
|
|
109
|
+
list(params, options)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def new(*args, **kwargs):
|
|
113
|
+
return As2OutgoingMessage(*args, **kwargs)
|