daknode 0.3.1__tar.gz → 0.3.2__tar.gz
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.
- {daknode-0.3.1 → daknode-0.3.2}/PKG-INFO +1 -1
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/send/forward_message.py +8 -8
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/__init__.py +2 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/forward_request.py +44 -0
- daknode-0.3.2/daknode/models/outgoing_attachment.py +74 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/send_request.py +47 -0
- {daknode-0.3.1 → daknode-0.3.2}/pyproject.toml +1 -1
- {daknode-0.3.1 → daknode-0.3.2}/README.md +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/block_rules/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/block_rules/create_block_rule.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/block_rules/create_inbox_block_rule.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/block_rules/delete_block_rule.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/block_rules/list_block_rules.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/block_rules/list_inbox_block_rules.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/consent/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/consent/create_consent.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/consent/revoke.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/control_plane/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/control_plane/close_workspace.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/control_plane/create_workspace.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/control_plane/list_workspaces.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/control_plane/read_workspace.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/control_plane/update_workspace.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/dead_letters/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/dead_letters/list_dead_letters.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/dead_letters/replay_dead_letter.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/domains/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/domains/disable_domain.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/domains/get_domain.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/domains/list_domains.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/domains/register_domain.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/domains/verify_domain.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/create_inbox.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/delete_inbox.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/get_inbox.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/list_inboxes.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/register_webhook.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/rotate_webhook_secret.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/inboxes/update_inbox.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/download_received_attachment.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/get_message.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/get_thread.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/list_messages.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/list_received_attachments.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/messages/list_threads.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/privacy/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/privacy/create_erasure_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/privacy/read_erasure_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/public/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/public/agent_signup.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/public/agent_verify.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/search/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/search/search.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/send/__init__.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/api/send/send.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/client.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/errors.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/attachment_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/block_rule_create.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/block_rule_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/block_rule_page.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/check_domain_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/consent_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/consent_response.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/create_erasure_request_response_create_erasure_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/create_in.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/dead_letter_response.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/dns_record.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/domain_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/domain_page.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/erasure_request_body.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/forward_message_response_forward_message.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/http_validation_error.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/inbox_create_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/inbox_deleted.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/inbox_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/inbox_page.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/inbox_response.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/inbox_update_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/message_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/message_page.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/read_erasure_request_response_read_erasure_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/register_domain_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/replay_response.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/revoke_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/revoke_response_revoke.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/search_match.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/search_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/search_response.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/send_response_send.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/signup_in.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/signup_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/thread_detail_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/thread_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/thread_page.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/timeline_item_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/update_in.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/validation_error.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/validation_error_context.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/verify_in.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/verify_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/webhook_register_request.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/workspace_list_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/models/workspace_out.py +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/py.typed +0 -0
- {daknode-0.3.1 → daknode-0.3.2}/daknode/types.py +0 -0
|
@@ -91,8 +91,8 @@ def sync_detailed(
|
|
|
91
91
|
|
|
92
92
|
The message is read through the same scoped, live-inbox read as
|
|
93
93
|
`GET /v1/messages/{id}`, so a scoped key can forward only its own inbox's
|
|
94
|
-
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
95
|
-
|
|
94
|
+
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
95
|
+
text-only by default; attachment_ids explicitly selects signed-SES-PASS files.
|
|
96
96
|
|
|
97
97
|
Args:
|
|
98
98
|
message_id (UUID):
|
|
@@ -135,8 +135,8 @@ def sync(
|
|
|
135
135
|
|
|
136
136
|
The message is read through the same scoped, live-inbox read as
|
|
137
137
|
`GET /v1/messages/{id}`, so a scoped key can forward only its own inbox's
|
|
138
|
-
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
139
|
-
|
|
138
|
+
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
139
|
+
text-only by default; attachment_ids explicitly selects signed-SES-PASS files.
|
|
140
140
|
|
|
141
141
|
Args:
|
|
142
142
|
message_id (UUID):
|
|
@@ -174,8 +174,8 @@ async def asyncio_detailed(
|
|
|
174
174
|
|
|
175
175
|
The message is read through the same scoped, live-inbox read as
|
|
176
176
|
`GET /v1/messages/{id}`, so a scoped key can forward only its own inbox's
|
|
177
|
-
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
178
|
-
|
|
177
|
+
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
178
|
+
text-only by default; attachment_ids explicitly selects signed-SES-PASS files.
|
|
179
179
|
|
|
180
180
|
Args:
|
|
181
181
|
message_id (UUID):
|
|
@@ -218,8 +218,8 @@ async def asyncio(
|
|
|
218
218
|
|
|
219
219
|
The message is read through the same scoped, live-inbox read as
|
|
220
220
|
`GET /v1/messages/{id}`, so a scoped key can forward only its own inbox's
|
|
221
|
-
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
222
|
-
|
|
221
|
+
mail and a deleted inbox's mail cannot be forwarded. Attachments are
|
|
222
|
+
text-only by default; attachment_ids explicitly selects signed-SES-PASS files.
|
|
223
223
|
|
|
224
224
|
Args:
|
|
225
225
|
message_id (UUID):
|
|
@@ -25,6 +25,7 @@ from .inbox_response import InboxResponse
|
|
|
25
25
|
from .inbox_update_request import InboxUpdateRequest
|
|
26
26
|
from .message_out import MessageOut
|
|
27
27
|
from .message_page import MessagePage
|
|
28
|
+
from .outgoing_attachment import OutgoingAttachment
|
|
28
29
|
from .read_erasure_request_response_read_erasure_request import ReadErasureRequestResponseReadErasureRequest
|
|
29
30
|
from .register_domain_request import RegisterDomainRequest
|
|
30
31
|
from .replay_response import ReplayResponse
|
|
@@ -76,6 +77,7 @@ __all__ = (
|
|
|
76
77
|
"InboxUpdateRequest",
|
|
77
78
|
"MessageOut",
|
|
78
79
|
"MessagePage",
|
|
80
|
+
"OutgoingAttachment",
|
|
79
81
|
"ReadErasureRequestResponseReadErasureRequest",
|
|
80
82
|
"RegisterDomainRequest",
|
|
81
83
|
"ReplayResponse",
|
|
@@ -10,6 +10,7 @@ from ..types import UNSET, Unset
|
|
|
10
10
|
from typing import cast
|
|
11
11
|
from typing import cast, Union
|
|
12
12
|
from typing import Union
|
|
13
|
+
from uuid import UUID
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
@@ -26,12 +27,14 @@ class ForwardRequest:
|
|
|
26
27
|
|
|
27
28
|
Attributes:
|
|
28
29
|
to (Union[list[str], str]):
|
|
30
|
+
attachment_ids (Union[None, Unset, list[UUID]]):
|
|
29
31
|
bcc (Union[None, Unset, list[str]]):
|
|
30
32
|
body_text (Union[None, Unset, str]):
|
|
31
33
|
cc (Union[None, Unset, list[str]]):
|
|
32
34
|
"""
|
|
33
35
|
|
|
34
36
|
to: Union[list[str], str]
|
|
37
|
+
attachment_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
35
38
|
bcc: Union[None, Unset, list[str]] = UNSET
|
|
36
39
|
body_text: Union[None, Unset, str] = UNSET
|
|
37
40
|
cc: Union[None, Unset, list[str]] = UNSET
|
|
@@ -49,6 +52,19 @@ class ForwardRequest:
|
|
|
49
52
|
else:
|
|
50
53
|
to = self.to
|
|
51
54
|
|
|
55
|
+
attachment_ids: Union[None, Unset, list[str]]
|
|
56
|
+
if isinstance(self.attachment_ids, Unset):
|
|
57
|
+
attachment_ids = UNSET
|
|
58
|
+
elif isinstance(self.attachment_ids, list):
|
|
59
|
+
attachment_ids = []
|
|
60
|
+
for attachment_ids_type_0_item_data in self.attachment_ids:
|
|
61
|
+
attachment_ids_type_0_item = str(attachment_ids_type_0_item_data)
|
|
62
|
+
attachment_ids.append(attachment_ids_type_0_item)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
else:
|
|
66
|
+
attachment_ids = self.attachment_ids
|
|
67
|
+
|
|
52
68
|
bcc: Union[None, Unset, list[str]]
|
|
53
69
|
if isinstance(self.bcc, Unset):
|
|
54
70
|
bcc = UNSET
|
|
@@ -81,6 +97,8 @@ class ForwardRequest:
|
|
|
81
97
|
field_dict.update({
|
|
82
98
|
"to": to,
|
|
83
99
|
})
|
|
100
|
+
if attachment_ids is not UNSET:
|
|
101
|
+
field_dict["attachment_ids"] = attachment_ids
|
|
84
102
|
if bcc is not UNSET:
|
|
85
103
|
field_dict["bcc"] = bcc
|
|
86
104
|
if body_text is not UNSET:
|
|
@@ -109,6 +127,31 @@ class ForwardRequest:
|
|
|
109
127
|
to = _parse_to(d.pop("to"))
|
|
110
128
|
|
|
111
129
|
|
|
130
|
+
def _parse_attachment_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
try:
|
|
136
|
+
if not isinstance(data, list):
|
|
137
|
+
raise TypeError()
|
|
138
|
+
attachment_ids_type_0 = []
|
|
139
|
+
_attachment_ids_type_0 = data
|
|
140
|
+
for attachment_ids_type_0_item_data in (_attachment_ids_type_0):
|
|
141
|
+
attachment_ids_type_0_item = UUID(attachment_ids_type_0_item_data)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
attachment_ids_type_0.append(attachment_ids_type_0_item)
|
|
146
|
+
|
|
147
|
+
return attachment_ids_type_0
|
|
148
|
+
except: # noqa: E722
|
|
149
|
+
pass
|
|
150
|
+
return cast(Union[None, Unset, list[UUID]], data)
|
|
151
|
+
|
|
152
|
+
attachment_ids = _parse_attachment_ids(d.pop("attachment_ids", UNSET))
|
|
153
|
+
|
|
154
|
+
|
|
112
155
|
def _parse_bcc(data: object) -> Union[None, Unset, list[str]]:
|
|
113
156
|
if data is None:
|
|
114
157
|
return data
|
|
@@ -157,6 +200,7 @@ class ForwardRequest:
|
|
|
157
200
|
|
|
158
201
|
forward_request = cls(
|
|
159
202
|
to=to,
|
|
203
|
+
attachment_ids=attachment_ids,
|
|
160
204
|
bcc=bcc,
|
|
161
205
|
body_text=body_text,
|
|
162
206
|
cc=cc,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import Union
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="OutgoingAttachment")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class OutgoingAttachment:
|
|
23
|
+
"""
|
|
24
|
+
Attributes:
|
|
25
|
+
content_base64 (str):
|
|
26
|
+
filename (str):
|
|
27
|
+
content_type (Union[Unset, str]): Default: 'application/octet-stream'.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
content_base64: str
|
|
31
|
+
filename: str
|
|
32
|
+
content_type: Union[Unset, str] = 'application/octet-stream'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
content_base64 = self.content_base64
|
|
40
|
+
|
|
41
|
+
filename = self.filename
|
|
42
|
+
|
|
43
|
+
content_type = self.content_type
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
|
|
48
|
+
field_dict.update({
|
|
49
|
+
"content_base64": content_base64,
|
|
50
|
+
"filename": filename,
|
|
51
|
+
})
|
|
52
|
+
if content_type is not UNSET:
|
|
53
|
+
field_dict["content_type"] = content_type
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
content_base64 = d.pop("content_base64")
|
|
63
|
+
|
|
64
|
+
filename = d.pop("filename")
|
|
65
|
+
|
|
66
|
+
content_type = d.pop("content_type", UNSET)
|
|
67
|
+
|
|
68
|
+
outgoing_attachment = cls(
|
|
69
|
+
content_base64=content_base64,
|
|
70
|
+
filename=filename,
|
|
71
|
+
content_type=content_type,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return outgoing_attachment
|
|
@@ -12,6 +12,8 @@ from typing import cast, Union
|
|
|
12
12
|
from typing import Union
|
|
13
13
|
from uuid import UUID
|
|
14
14
|
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from ..models.outgoing_attachment import OutgoingAttachment
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
|
|
@@ -34,6 +36,7 @@ class SendRequest:
|
|
|
34
36
|
|
|
35
37
|
Attributes:
|
|
36
38
|
inbox_id (UUID):
|
|
39
|
+
attachments (Union[None, Unset, list['OutgoingAttachment']]):
|
|
37
40
|
bcc (Union[None, Unset, list[str]]):
|
|
38
41
|
body_html (Union[None, Unset, str]):
|
|
39
42
|
body_text (Union[None, Unset, str]):
|
|
@@ -45,6 +48,7 @@ class SendRequest:
|
|
|
45
48
|
"""
|
|
46
49
|
|
|
47
50
|
inbox_id: UUID
|
|
51
|
+
attachments: Union[None, Unset, list['OutgoingAttachment']] = UNSET
|
|
48
52
|
bcc: Union[None, Unset, list[str]] = UNSET
|
|
49
53
|
body_html: Union[None, Unset, str] = UNSET
|
|
50
54
|
body_text: Union[None, Unset, str] = UNSET
|
|
@@ -59,8 +63,22 @@ class SendRequest:
|
|
|
59
63
|
|
|
60
64
|
|
|
61
65
|
def to_dict(self) -> dict[str, Any]:
|
|
66
|
+
from ..models.outgoing_attachment import OutgoingAttachment
|
|
62
67
|
inbox_id = str(self.inbox_id)
|
|
63
68
|
|
|
69
|
+
attachments: Union[None, Unset, list[dict[str, Any]]]
|
|
70
|
+
if isinstance(self.attachments, Unset):
|
|
71
|
+
attachments = UNSET
|
|
72
|
+
elif isinstance(self.attachments, list):
|
|
73
|
+
attachments = []
|
|
74
|
+
for attachments_type_0_item_data in self.attachments:
|
|
75
|
+
attachments_type_0_item = attachments_type_0_item_data.to_dict()
|
|
76
|
+
attachments.append(attachments_type_0_item)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
else:
|
|
80
|
+
attachments = self.attachments
|
|
81
|
+
|
|
64
82
|
bcc: Union[None, Unset, list[str]]
|
|
65
83
|
if isinstance(self.bcc, Unset):
|
|
66
84
|
bcc = UNSET
|
|
@@ -121,6 +139,8 @@ class SendRequest:
|
|
|
121
139
|
field_dict.update({
|
|
122
140
|
"inbox_id": inbox_id,
|
|
123
141
|
})
|
|
142
|
+
if attachments is not UNSET:
|
|
143
|
+
field_dict["attachments"] = attachments
|
|
124
144
|
if bcc is not UNSET:
|
|
125
145
|
field_dict["bcc"] = bcc
|
|
126
146
|
if body_html is not UNSET:
|
|
@@ -144,12 +164,38 @@ class SendRequest:
|
|
|
144
164
|
|
|
145
165
|
@classmethod
|
|
146
166
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
167
|
+
from ..models.outgoing_attachment import OutgoingAttachment
|
|
147
168
|
d = dict(src_dict)
|
|
148
169
|
inbox_id = UUID(d.pop("inbox_id"))
|
|
149
170
|
|
|
150
171
|
|
|
151
172
|
|
|
152
173
|
|
|
174
|
+
def _parse_attachments(data: object) -> Union[None, Unset, list['OutgoingAttachment']]:
|
|
175
|
+
if data is None:
|
|
176
|
+
return data
|
|
177
|
+
if isinstance(data, Unset):
|
|
178
|
+
return data
|
|
179
|
+
try:
|
|
180
|
+
if not isinstance(data, list):
|
|
181
|
+
raise TypeError()
|
|
182
|
+
attachments_type_0 = []
|
|
183
|
+
_attachments_type_0 = data
|
|
184
|
+
for attachments_type_0_item_data in (_attachments_type_0):
|
|
185
|
+
attachments_type_0_item = OutgoingAttachment.from_dict(attachments_type_0_item_data)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
attachments_type_0.append(attachments_type_0_item)
|
|
190
|
+
|
|
191
|
+
return attachments_type_0
|
|
192
|
+
except: # noqa: E722
|
|
193
|
+
pass
|
|
194
|
+
return cast(Union[None, Unset, list['OutgoingAttachment']], data)
|
|
195
|
+
|
|
196
|
+
attachments = _parse_attachments(d.pop("attachments", UNSET))
|
|
197
|
+
|
|
198
|
+
|
|
153
199
|
def _parse_bcc(data: object) -> Union[None, Unset, list[str]]:
|
|
154
200
|
if data is None:
|
|
155
201
|
return data
|
|
@@ -250,6 +296,7 @@ class SendRequest:
|
|
|
250
296
|
|
|
251
297
|
send_request = cls(
|
|
252
298
|
inbox_id=inbox_id,
|
|
299
|
+
attachments=attachments,
|
|
253
300
|
bcc=bcc,
|
|
254
301
|
body_html=body_html,
|
|
255
302
|
body_text=body_text,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{daknode-0.3.1 → daknode-0.3.2}/daknode/models/read_erasure_request_response_read_erasure_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|