daknode 0.2.0__tar.gz → 0.3.0__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.2.0 → daknode-0.3.0}/PKG-INFO +1 -1
- daknode-0.3.0/daknode/api/send/forward_message.py +244 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/send/send.py +4 -4
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/__init__.py +4 -0
- daknode-0.3.0/daknode/models/forward_message_response_forward_message.py +63 -0
- daknode-0.3.0/daknode/models/forward_request.py +165 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/message_out.py +68 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/send_request.py +107 -6
- {daknode-0.2.0 → daknode-0.3.0}/pyproject.toml +1 -1
- {daknode-0.2.0 → daknode-0.3.0}/README.md +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/block_rules/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/block_rules/create_block_rule.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/block_rules/create_inbox_block_rule.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/block_rules/delete_block_rule.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/block_rules/list_block_rules.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/block_rules/list_inbox_block_rules.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/consent/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/consent/create_consent.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/consent/revoke.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/control_plane/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/control_plane/close_workspace.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/control_plane/create_workspace.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/control_plane/list_workspaces.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/control_plane/read_workspace.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/control_plane/update_workspace.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/dead_letters/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/dead_letters/list_dead_letters.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/dead_letters/replay_dead_letter.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/create_inbox.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/delete_inbox.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/get_inbox.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/list_inboxes.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/register_webhook.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/rotate_webhook_secret.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/inboxes/update_inbox.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/messages/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/messages/get_message.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/messages/get_thread.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/messages/list_messages.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/messages/list_threads.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/privacy/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/privacy/create_erasure_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/privacy/read_erasure_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/public/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/public/agent_signup.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/public/agent_verify.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/search/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/search/search.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/api/send/__init__.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/client.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/errors.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/block_rule_create.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/block_rule_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/block_rule_page.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/consent_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/consent_response.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/create_erasure_request_response_create_erasure_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/create_in.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/dead_letter_response.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/erasure_request_body.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/http_validation_error.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/inbox_create_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/inbox_deleted.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/inbox_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/inbox_page.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/inbox_response.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/inbox_update_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/message_page.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/read_erasure_request_response_read_erasure_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/replay_response.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/revoke_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/revoke_response_revoke.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/search_match.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/search_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/search_response.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/send_response_send.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/signup_in.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/signup_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/thread_detail_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/thread_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/thread_page.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/timeline_item_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/update_in.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/validation_error.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/validation_error_context.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/verify_in.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/verify_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/webhook_register_request.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/workspace_list_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/models/workspace_out.py +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/py.typed +0 -0
- {daknode-0.2.0 → daknode-0.3.0}/daknode/types.py +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient, Client
|
|
7
|
+
from ...types import Response, UNSET
|
|
8
|
+
from ... import errors
|
|
9
|
+
|
|
10
|
+
from ...models.forward_message_response_forward_message import ForwardMessageResponseForwardMessage
|
|
11
|
+
from ...models.forward_request import ForwardRequest
|
|
12
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
13
|
+
from ...types import UNSET, Unset
|
|
14
|
+
from typing import cast
|
|
15
|
+
from typing import cast, Union
|
|
16
|
+
from typing import Union
|
|
17
|
+
from uuid import UUID
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _get_kwargs(
|
|
22
|
+
message_id: UUID,
|
|
23
|
+
*,
|
|
24
|
+
body: ForwardRequest,
|
|
25
|
+
idempotency_key: Union[None, Unset, str] = UNSET,
|
|
26
|
+
|
|
27
|
+
) -> dict[str, Any]:
|
|
28
|
+
headers: dict[str, Any] = {}
|
|
29
|
+
if not isinstance(idempotency_key, Unset):
|
|
30
|
+
headers["Idempotency-Key"] = idempotency_key
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
_kwargs: dict[str, Any] = {
|
|
39
|
+
"method": "post",
|
|
40
|
+
"url": "/v1/messages/{message_id}/forward".format(message_id=message_id,),
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
_kwargs["json"] = body.to_dict()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
headers["Content-Type"] = "application/json"
|
|
47
|
+
|
|
48
|
+
_kwargs["headers"] = headers
|
|
49
|
+
return _kwargs
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]:
|
|
53
|
+
if response.status_code == 200:
|
|
54
|
+
response_200 = ForwardMessageResponseForwardMessage.from_dict(response.json())
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
return response_200
|
|
59
|
+
if response.status_code == 422:
|
|
60
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
return response_422
|
|
65
|
+
if client.raise_on_unexpected_status:
|
|
66
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
67
|
+
else:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]:
|
|
72
|
+
return Response(
|
|
73
|
+
status_code=HTTPStatus(response.status_code),
|
|
74
|
+
content=response.content,
|
|
75
|
+
headers=response.headers,
|
|
76
|
+
parsed=_parse_response(client=client, response=response),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync_detailed(
|
|
81
|
+
message_id: UUID,
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
body: ForwardRequest,
|
|
85
|
+
idempotency_key: Union[None, Unset, str] = UNSET,
|
|
86
|
+
|
|
87
|
+
) -> Response[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]:
|
|
88
|
+
""" Forward Message
|
|
89
|
+
|
|
90
|
+
MULTI-RCPT-A3: forward a received message from the inbox it arrived at.
|
|
91
|
+
|
|
92
|
+
The message is read through the same scoped, live-inbox read as
|
|
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 not
|
|
95
|
+
forwarded until P0 #2.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
message_id (UUID):
|
|
99
|
+
idempotency_key (Union[None, Unset, str]):
|
|
100
|
+
body (ForwardRequest): MULTI-RCPT-A3. Same identity rules as `SendRequest`: no From field.
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Response[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
kwargs = _get_kwargs(
|
|
112
|
+
message_id=message_id,
|
|
113
|
+
body=body,
|
|
114
|
+
idempotency_key=idempotency_key,
|
|
115
|
+
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
response = client.get_httpx_client().request(
|
|
119
|
+
**kwargs,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
return _build_response(client=client, response=response)
|
|
123
|
+
|
|
124
|
+
def sync(
|
|
125
|
+
message_id: UUID,
|
|
126
|
+
*,
|
|
127
|
+
client: AuthenticatedClient,
|
|
128
|
+
body: ForwardRequest,
|
|
129
|
+
idempotency_key: Union[None, Unset, str] = UNSET,
|
|
130
|
+
|
|
131
|
+
) -> Optional[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]:
|
|
132
|
+
""" Forward Message
|
|
133
|
+
|
|
134
|
+
MULTI-RCPT-A3: forward a received message from the inbox it arrived at.
|
|
135
|
+
|
|
136
|
+
The message is read through the same scoped, live-inbox read as
|
|
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 not
|
|
139
|
+
forwarded until P0 #2.
|
|
140
|
+
|
|
141
|
+
Args:
|
|
142
|
+
message_id (UUID):
|
|
143
|
+
idempotency_key (Union[None, Unset, str]):
|
|
144
|
+
body (ForwardRequest): MULTI-RCPT-A3. Same identity rules as `SendRequest`: no From field.
|
|
145
|
+
|
|
146
|
+
Raises:
|
|
147
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
148
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
Union[ForwardMessageResponseForwardMessage, HTTPValidationError]
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
return sync_detailed(
|
|
156
|
+
message_id=message_id,
|
|
157
|
+
client=client,
|
|
158
|
+
body=body,
|
|
159
|
+
idempotency_key=idempotency_key,
|
|
160
|
+
|
|
161
|
+
).parsed
|
|
162
|
+
|
|
163
|
+
async def asyncio_detailed(
|
|
164
|
+
message_id: UUID,
|
|
165
|
+
*,
|
|
166
|
+
client: AuthenticatedClient,
|
|
167
|
+
body: ForwardRequest,
|
|
168
|
+
idempotency_key: Union[None, Unset, str] = UNSET,
|
|
169
|
+
|
|
170
|
+
) -> Response[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]:
|
|
171
|
+
""" Forward Message
|
|
172
|
+
|
|
173
|
+
MULTI-RCPT-A3: forward a received message from the inbox it arrived at.
|
|
174
|
+
|
|
175
|
+
The message is read through the same scoped, live-inbox read as
|
|
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 not
|
|
178
|
+
forwarded until P0 #2.
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
message_id (UUID):
|
|
182
|
+
idempotency_key (Union[None, Unset, str]):
|
|
183
|
+
body (ForwardRequest): MULTI-RCPT-A3. Same identity rules as `SendRequest`: no From field.
|
|
184
|
+
|
|
185
|
+
Raises:
|
|
186
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
187
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
Response[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
kwargs = _get_kwargs(
|
|
195
|
+
message_id=message_id,
|
|
196
|
+
body=body,
|
|
197
|
+
idempotency_key=idempotency_key,
|
|
198
|
+
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
response = await client.get_async_httpx_client().request(
|
|
202
|
+
**kwargs
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
return _build_response(client=client, response=response)
|
|
206
|
+
|
|
207
|
+
async def asyncio(
|
|
208
|
+
message_id: UUID,
|
|
209
|
+
*,
|
|
210
|
+
client: AuthenticatedClient,
|
|
211
|
+
body: ForwardRequest,
|
|
212
|
+
idempotency_key: Union[None, Unset, str] = UNSET,
|
|
213
|
+
|
|
214
|
+
) -> Optional[Union[ForwardMessageResponseForwardMessage, HTTPValidationError]]:
|
|
215
|
+
""" Forward Message
|
|
216
|
+
|
|
217
|
+
MULTI-RCPT-A3: forward a received message from the inbox it arrived at.
|
|
218
|
+
|
|
219
|
+
The message is read through the same scoped, live-inbox read as
|
|
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 not
|
|
222
|
+
forwarded until P0 #2.
|
|
223
|
+
|
|
224
|
+
Args:
|
|
225
|
+
message_id (UUID):
|
|
226
|
+
idempotency_key (Union[None, Unset, str]):
|
|
227
|
+
body (ForwardRequest): MULTI-RCPT-A3. Same identity rules as `SendRequest`: no From field.
|
|
228
|
+
|
|
229
|
+
Raises:
|
|
230
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
231
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
232
|
+
|
|
233
|
+
Returns:
|
|
234
|
+
Union[ForwardMessageResponseForwardMessage, HTTPValidationError]
|
|
235
|
+
"""
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
return (await asyncio_detailed(
|
|
239
|
+
message_id=message_id,
|
|
240
|
+
client=client,
|
|
241
|
+
body=body,
|
|
242
|
+
idempotency_key=idempotency_key,
|
|
243
|
+
|
|
244
|
+
)).parsed
|
|
@@ -84,7 +84,7 @@ def sync_detailed(
|
|
|
84
84
|
) -> Response[Union[HTTPValidationError, SendResponseSend]]:
|
|
85
85
|
""" Send
|
|
86
86
|
|
|
87
|
-
Accept one outbound message.
|
|
87
|
+
Accept one outbound message — to one recipient (unchanged) or several.
|
|
88
88
|
|
|
89
89
|
The header is **mandatory**. An endpoint that sends email on a retryable
|
|
90
90
|
verb without one has no way to tell a retry from a second request, and the
|
|
@@ -131,7 +131,7 @@ def sync(
|
|
|
131
131
|
) -> Optional[Union[HTTPValidationError, SendResponseSend]]:
|
|
132
132
|
""" Send
|
|
133
133
|
|
|
134
|
-
Accept one outbound message.
|
|
134
|
+
Accept one outbound message — to one recipient (unchanged) or several.
|
|
135
135
|
|
|
136
136
|
The header is **mandatory**. An endpoint that sends email on a retryable
|
|
137
137
|
verb without one has no way to tell a retry from a second request, and the
|
|
@@ -173,7 +173,7 @@ async def asyncio_detailed(
|
|
|
173
173
|
) -> Response[Union[HTTPValidationError, SendResponseSend]]:
|
|
174
174
|
""" Send
|
|
175
175
|
|
|
176
|
-
Accept one outbound message.
|
|
176
|
+
Accept one outbound message — to one recipient (unchanged) or several.
|
|
177
177
|
|
|
178
178
|
The header is **mandatory**. An endpoint that sends email on a retryable
|
|
179
179
|
verb without one has no way to tell a retry from a second request, and the
|
|
@@ -220,7 +220,7 @@ async def asyncio(
|
|
|
220
220
|
) -> Optional[Union[HTTPValidationError, SendResponseSend]]:
|
|
221
221
|
""" Send
|
|
222
222
|
|
|
223
|
-
Accept one outbound message.
|
|
223
|
+
Accept one outbound message — to one recipient (unchanged) or several.
|
|
224
224
|
|
|
225
225
|
The header is **mandatory**. An endpoint that sends email on a retryable
|
|
226
226
|
verb without one has no way to tell a retry from a second request, and the
|
|
@@ -9,6 +9,8 @@ from .create_erasure_request_response_create_erasure_request import CreateErasur
|
|
|
9
9
|
from .create_in import CreateIn
|
|
10
10
|
from .dead_letter_response import DeadLetterResponse
|
|
11
11
|
from .erasure_request_body import ErasureRequestBody
|
|
12
|
+
from .forward_message_response_forward_message import ForwardMessageResponseForwardMessage
|
|
13
|
+
from .forward_request import ForwardRequest
|
|
12
14
|
from .http_validation_error import HTTPValidationError
|
|
13
15
|
from .inbox_create_request import InboxCreateRequest
|
|
14
16
|
from .inbox_deleted import InboxDeleted
|
|
@@ -52,6 +54,8 @@ __all__ = (
|
|
|
52
54
|
"CreateIn",
|
|
53
55
|
"DeadLetterResponse",
|
|
54
56
|
"ErasureRequestBody",
|
|
57
|
+
"ForwardMessageResponseForwardMessage",
|
|
58
|
+
"ForwardRequest",
|
|
55
59
|
"HTTPValidationError",
|
|
56
60
|
"InboxCreateRequest",
|
|
57
61
|
"InboxDeleted",
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="ForwardMessageResponseForwardMessage")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ForwardMessageResponseForwardMessage:
|
|
21
|
+
"""
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
forward_message_response_forward_message = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
forward_message_response_forward_message.additional_properties = d
|
|
47
|
+
return forward_message_response_forward_message
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def additional_keys(self) -> list[str]:
|
|
51
|
+
return list(self.additional_properties.keys())
|
|
52
|
+
|
|
53
|
+
def __getitem__(self, key: str) -> Any:
|
|
54
|
+
return self.additional_properties[key]
|
|
55
|
+
|
|
56
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
57
|
+
self.additional_properties[key] = value
|
|
58
|
+
|
|
59
|
+
def __delitem__(self, key: str) -> None:
|
|
60
|
+
del self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __contains__(self, key: str) -> bool:
|
|
63
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,165 @@
|
|
|
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 cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="ForwardRequest")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class ForwardRequest:
|
|
25
|
+
""" MULTI-RCPT-A3. Same identity rules as `SendRequest`: no From field.
|
|
26
|
+
|
|
27
|
+
Attributes:
|
|
28
|
+
to (Union[list[str], str]):
|
|
29
|
+
bcc (Union[None, Unset, list[str]]):
|
|
30
|
+
body_text (Union[None, Unset, str]):
|
|
31
|
+
cc (Union[None, Unset, list[str]]):
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
to: Union[list[str], str]
|
|
35
|
+
bcc: Union[None, Unset, list[str]] = UNSET
|
|
36
|
+
body_text: Union[None, Unset, str] = UNSET
|
|
37
|
+
cc: Union[None, Unset, list[str]] = UNSET
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
to: Union[list[str], str]
|
|
45
|
+
if isinstance(self.to, list):
|
|
46
|
+
to = self.to
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
else:
|
|
50
|
+
to = self.to
|
|
51
|
+
|
|
52
|
+
bcc: Union[None, Unset, list[str]]
|
|
53
|
+
if isinstance(self.bcc, Unset):
|
|
54
|
+
bcc = UNSET
|
|
55
|
+
elif isinstance(self.bcc, list):
|
|
56
|
+
bcc = self.bcc
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
else:
|
|
60
|
+
bcc = self.bcc
|
|
61
|
+
|
|
62
|
+
body_text: Union[None, Unset, str]
|
|
63
|
+
if isinstance(self.body_text, Unset):
|
|
64
|
+
body_text = UNSET
|
|
65
|
+
else:
|
|
66
|
+
body_text = self.body_text
|
|
67
|
+
|
|
68
|
+
cc: Union[None, Unset, list[str]]
|
|
69
|
+
if isinstance(self.cc, Unset):
|
|
70
|
+
cc = UNSET
|
|
71
|
+
elif isinstance(self.cc, list):
|
|
72
|
+
cc = self.cc
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
else:
|
|
76
|
+
cc = self.cc
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
field_dict: dict[str, Any] = {}
|
|
80
|
+
|
|
81
|
+
field_dict.update({
|
|
82
|
+
"to": to,
|
|
83
|
+
})
|
|
84
|
+
if bcc is not UNSET:
|
|
85
|
+
field_dict["bcc"] = bcc
|
|
86
|
+
if body_text is not UNSET:
|
|
87
|
+
field_dict["body_text"] = body_text
|
|
88
|
+
if cc is not UNSET:
|
|
89
|
+
field_dict["cc"] = cc
|
|
90
|
+
|
|
91
|
+
return field_dict
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
def _parse_to(data: object) -> Union[list[str], str]:
|
|
99
|
+
try:
|
|
100
|
+
if not isinstance(data, list):
|
|
101
|
+
raise TypeError()
|
|
102
|
+
to_type_1 = cast(list[str], data)
|
|
103
|
+
|
|
104
|
+
return to_type_1
|
|
105
|
+
except: # noqa: E722
|
|
106
|
+
pass
|
|
107
|
+
return cast(Union[list[str], str], data)
|
|
108
|
+
|
|
109
|
+
to = _parse_to(d.pop("to"))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _parse_bcc(data: object) -> Union[None, Unset, list[str]]:
|
|
113
|
+
if data is None:
|
|
114
|
+
return data
|
|
115
|
+
if isinstance(data, Unset):
|
|
116
|
+
return data
|
|
117
|
+
try:
|
|
118
|
+
if not isinstance(data, list):
|
|
119
|
+
raise TypeError()
|
|
120
|
+
bcc_type_0 = cast(list[str], data)
|
|
121
|
+
|
|
122
|
+
return bcc_type_0
|
|
123
|
+
except: # noqa: E722
|
|
124
|
+
pass
|
|
125
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
126
|
+
|
|
127
|
+
bcc = _parse_bcc(d.pop("bcc", UNSET))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def _parse_body_text(data: object) -> Union[None, Unset, str]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
return cast(Union[None, Unset, str], data)
|
|
136
|
+
|
|
137
|
+
body_text = _parse_body_text(d.pop("body_text", UNSET))
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def _parse_cc(data: object) -> Union[None, Unset, list[str]]:
|
|
141
|
+
if data is None:
|
|
142
|
+
return data
|
|
143
|
+
if isinstance(data, Unset):
|
|
144
|
+
return data
|
|
145
|
+
try:
|
|
146
|
+
if not isinstance(data, list):
|
|
147
|
+
raise TypeError()
|
|
148
|
+
cc_type_0 = cast(list[str], data)
|
|
149
|
+
|
|
150
|
+
return cc_type_0
|
|
151
|
+
except: # noqa: E722
|
|
152
|
+
pass
|
|
153
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
154
|
+
|
|
155
|
+
cc = _parse_cc(d.pop("cc", UNSET))
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
forward_request = cls(
|
|
159
|
+
to=to,
|
|
160
|
+
bcc=bcc,
|
|
161
|
+
body_text=body_text,
|
|
162
|
+
cc=cc,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
return forward_request
|
|
@@ -6,9 +6,11 @@ from attrs import field as _attrs_field
|
|
|
6
6
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
9
10
|
from dateutil.parser import isoparse
|
|
10
11
|
from typing import cast
|
|
11
12
|
from typing import cast, Union
|
|
13
|
+
from typing import Union
|
|
12
14
|
from uuid import UUID
|
|
13
15
|
import datetime
|
|
14
16
|
|
|
@@ -50,6 +52,8 @@ class MessageOut:
|
|
|
50
52
|
sequence_number (int):
|
|
51
53
|
subject (Union[None, str]):
|
|
52
54
|
thread_id (UUID):
|
|
55
|
+
cc_addresses (Union[None, Unset, list[str]]):
|
|
56
|
+
to_addresses (Union[None, Unset, list[str]]):
|
|
53
57
|
"""
|
|
54
58
|
|
|
55
59
|
body_text: Union[None, str]
|
|
@@ -70,6 +74,8 @@ class MessageOut:
|
|
|
70
74
|
sequence_number: int
|
|
71
75
|
subject: Union[None, str]
|
|
72
76
|
thread_id: UUID
|
|
77
|
+
cc_addresses: Union[None, Unset, list[str]] = UNSET
|
|
78
|
+
to_addresses: Union[None, Unset, list[str]] = UNSET
|
|
73
79
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
74
80
|
|
|
75
81
|
|
|
@@ -130,6 +136,26 @@ class MessageOut:
|
|
|
130
136
|
|
|
131
137
|
thread_id = str(self.thread_id)
|
|
132
138
|
|
|
139
|
+
cc_addresses: Union[None, Unset, list[str]]
|
|
140
|
+
if isinstance(self.cc_addresses, Unset):
|
|
141
|
+
cc_addresses = UNSET
|
|
142
|
+
elif isinstance(self.cc_addresses, list):
|
|
143
|
+
cc_addresses = self.cc_addresses
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
else:
|
|
147
|
+
cc_addresses = self.cc_addresses
|
|
148
|
+
|
|
149
|
+
to_addresses: Union[None, Unset, list[str]]
|
|
150
|
+
if isinstance(self.to_addresses, Unset):
|
|
151
|
+
to_addresses = UNSET
|
|
152
|
+
elif isinstance(self.to_addresses, list):
|
|
153
|
+
to_addresses = self.to_addresses
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
else:
|
|
157
|
+
to_addresses = self.to_addresses
|
|
158
|
+
|
|
133
159
|
|
|
134
160
|
field_dict: dict[str, Any] = {}
|
|
135
161
|
field_dict.update(self.additional_properties)
|
|
@@ -153,6 +179,10 @@ class MessageOut:
|
|
|
153
179
|
"subject": subject,
|
|
154
180
|
"thread_id": thread_id,
|
|
155
181
|
})
|
|
182
|
+
if cc_addresses is not UNSET:
|
|
183
|
+
field_dict["cc_addresses"] = cc_addresses
|
|
184
|
+
if to_addresses is not UNSET:
|
|
185
|
+
field_dict["to_addresses"] = to_addresses
|
|
156
186
|
|
|
157
187
|
return field_dict
|
|
158
188
|
|
|
@@ -267,6 +297,42 @@ class MessageOut:
|
|
|
267
297
|
|
|
268
298
|
|
|
269
299
|
|
|
300
|
+
def _parse_cc_addresses(data: object) -> Union[None, Unset, list[str]]:
|
|
301
|
+
if data is None:
|
|
302
|
+
return data
|
|
303
|
+
if isinstance(data, Unset):
|
|
304
|
+
return data
|
|
305
|
+
try:
|
|
306
|
+
if not isinstance(data, list):
|
|
307
|
+
raise TypeError()
|
|
308
|
+
cc_addresses_type_0 = cast(list[str], data)
|
|
309
|
+
|
|
310
|
+
return cc_addresses_type_0
|
|
311
|
+
except: # noqa: E722
|
|
312
|
+
pass
|
|
313
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
314
|
+
|
|
315
|
+
cc_addresses = _parse_cc_addresses(d.pop("cc_addresses", UNSET))
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
def _parse_to_addresses(data: object) -> Union[None, Unset, list[str]]:
|
|
319
|
+
if data is None:
|
|
320
|
+
return data
|
|
321
|
+
if isinstance(data, Unset):
|
|
322
|
+
return data
|
|
323
|
+
try:
|
|
324
|
+
if not isinstance(data, list):
|
|
325
|
+
raise TypeError()
|
|
326
|
+
to_addresses_type_0 = cast(list[str], data)
|
|
327
|
+
|
|
328
|
+
return to_addresses_type_0
|
|
329
|
+
except: # noqa: E722
|
|
330
|
+
pass
|
|
331
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
332
|
+
|
|
333
|
+
to_addresses = _parse_to_addresses(d.pop("to_addresses", UNSET))
|
|
334
|
+
|
|
335
|
+
|
|
270
336
|
message_out = cls(
|
|
271
337
|
body_text=body_text,
|
|
272
338
|
channel=channel,
|
|
@@ -286,6 +352,8 @@ class MessageOut:
|
|
|
286
352
|
sequence_number=sequence_number,
|
|
287
353
|
subject=subject,
|
|
288
354
|
thread_id=thread_id,
|
|
355
|
+
cc_addresses=cc_addresses,
|
|
356
|
+
to_addresses=to_addresses,
|
|
289
357
|
)
|
|
290
358
|
|
|
291
359
|
|
|
@@ -7,6 +7,7 @@ from attrs import field as _attrs_field
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
9
|
from ..types import UNSET, Unset
|
|
10
|
+
from typing import cast
|
|
10
11
|
from typing import cast, Union
|
|
11
12
|
from typing import Union
|
|
12
13
|
from uuid import UUID
|
|
@@ -33,19 +34,25 @@ class SendRequest:
|
|
|
33
34
|
|
|
34
35
|
Attributes:
|
|
35
36
|
inbox_id (UUID):
|
|
36
|
-
|
|
37
|
+
bcc (Union[None, Unset, list[str]]):
|
|
37
38
|
body_html (Union[None, Unset, str]):
|
|
38
39
|
body_text (Union[None, Unset, str]):
|
|
40
|
+
cc (Union[None, Unset, list[str]]):
|
|
41
|
+
reply_all (Union[Unset, bool]): Default: False.
|
|
39
42
|
subject (Union[Unset, str]): Default: ''.
|
|
40
43
|
thread_id (Union[None, UUID, Unset]):
|
|
44
|
+
to (Union[None, Unset, list[str], str]):
|
|
41
45
|
"""
|
|
42
46
|
|
|
43
47
|
inbox_id: UUID
|
|
44
|
-
|
|
48
|
+
bcc: Union[None, Unset, list[str]] = UNSET
|
|
45
49
|
body_html: Union[None, Unset, str] = UNSET
|
|
46
50
|
body_text: Union[None, Unset, str] = UNSET
|
|
51
|
+
cc: Union[None, Unset, list[str]] = UNSET
|
|
52
|
+
reply_all: Union[Unset, bool] = False
|
|
47
53
|
subject: Union[Unset, str] = ''
|
|
48
54
|
thread_id: Union[None, UUID, Unset] = UNSET
|
|
55
|
+
to: Union[None, Unset, list[str], str] = UNSET
|
|
49
56
|
|
|
50
57
|
|
|
51
58
|
|
|
@@ -54,7 +61,15 @@ class SendRequest:
|
|
|
54
61
|
def to_dict(self) -> dict[str, Any]:
|
|
55
62
|
inbox_id = str(self.inbox_id)
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
bcc: Union[None, Unset, list[str]]
|
|
65
|
+
if isinstance(self.bcc, Unset):
|
|
66
|
+
bcc = UNSET
|
|
67
|
+
elif isinstance(self.bcc, list):
|
|
68
|
+
bcc = self.bcc
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
else:
|
|
72
|
+
bcc = self.bcc
|
|
58
73
|
|
|
59
74
|
body_html: Union[None, Unset, str]
|
|
60
75
|
if isinstance(self.body_html, Unset):
|
|
@@ -68,6 +83,18 @@ class SendRequest:
|
|
|
68
83
|
else:
|
|
69
84
|
body_text = self.body_text
|
|
70
85
|
|
|
86
|
+
cc: Union[None, Unset, list[str]]
|
|
87
|
+
if isinstance(self.cc, Unset):
|
|
88
|
+
cc = UNSET
|
|
89
|
+
elif isinstance(self.cc, list):
|
|
90
|
+
cc = self.cc
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
else:
|
|
94
|
+
cc = self.cc
|
|
95
|
+
|
|
96
|
+
reply_all = self.reply_all
|
|
97
|
+
|
|
71
98
|
subject = self.subject
|
|
72
99
|
|
|
73
100
|
thread_id: Union[None, Unset, str]
|
|
@@ -78,21 +105,38 @@ class SendRequest:
|
|
|
78
105
|
else:
|
|
79
106
|
thread_id = self.thread_id
|
|
80
107
|
|
|
108
|
+
to: Union[None, Unset, list[str], str]
|
|
109
|
+
if isinstance(self.to, Unset):
|
|
110
|
+
to = UNSET
|
|
111
|
+
elif isinstance(self.to, list):
|
|
112
|
+
to = self.to
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
else:
|
|
116
|
+
to = self.to
|
|
117
|
+
|
|
81
118
|
|
|
82
119
|
field_dict: dict[str, Any] = {}
|
|
83
120
|
|
|
84
121
|
field_dict.update({
|
|
85
122
|
"inbox_id": inbox_id,
|
|
86
|
-
"to": to,
|
|
87
123
|
})
|
|
124
|
+
if bcc is not UNSET:
|
|
125
|
+
field_dict["bcc"] = bcc
|
|
88
126
|
if body_html is not UNSET:
|
|
89
127
|
field_dict["body_html"] = body_html
|
|
90
128
|
if body_text is not UNSET:
|
|
91
129
|
field_dict["body_text"] = body_text
|
|
130
|
+
if cc is not UNSET:
|
|
131
|
+
field_dict["cc"] = cc
|
|
132
|
+
if reply_all is not UNSET:
|
|
133
|
+
field_dict["reply_all"] = reply_all
|
|
92
134
|
if subject is not UNSET:
|
|
93
135
|
field_dict["subject"] = subject
|
|
94
136
|
if thread_id is not UNSET:
|
|
95
137
|
field_dict["thread_id"] = thread_id
|
|
138
|
+
if to is not UNSET:
|
|
139
|
+
field_dict["to"] = to
|
|
96
140
|
|
|
97
141
|
return field_dict
|
|
98
142
|
|
|
@@ -106,7 +150,23 @@ class SendRequest:
|
|
|
106
150
|
|
|
107
151
|
|
|
108
152
|
|
|
109
|
-
|
|
153
|
+
def _parse_bcc(data: object) -> Union[None, Unset, list[str]]:
|
|
154
|
+
if data is None:
|
|
155
|
+
return data
|
|
156
|
+
if isinstance(data, Unset):
|
|
157
|
+
return data
|
|
158
|
+
try:
|
|
159
|
+
if not isinstance(data, list):
|
|
160
|
+
raise TypeError()
|
|
161
|
+
bcc_type_0 = cast(list[str], data)
|
|
162
|
+
|
|
163
|
+
return bcc_type_0
|
|
164
|
+
except: # noqa: E722
|
|
165
|
+
pass
|
|
166
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
167
|
+
|
|
168
|
+
bcc = _parse_bcc(d.pop("bcc", UNSET))
|
|
169
|
+
|
|
110
170
|
|
|
111
171
|
def _parse_body_html(data: object) -> Union[None, Unset, str]:
|
|
112
172
|
if data is None:
|
|
@@ -128,6 +188,26 @@ class SendRequest:
|
|
|
128
188
|
body_text = _parse_body_text(d.pop("body_text", UNSET))
|
|
129
189
|
|
|
130
190
|
|
|
191
|
+
def _parse_cc(data: object) -> Union[None, Unset, list[str]]:
|
|
192
|
+
if data is None:
|
|
193
|
+
return data
|
|
194
|
+
if isinstance(data, Unset):
|
|
195
|
+
return data
|
|
196
|
+
try:
|
|
197
|
+
if not isinstance(data, list):
|
|
198
|
+
raise TypeError()
|
|
199
|
+
cc_type_0 = cast(list[str], data)
|
|
200
|
+
|
|
201
|
+
return cc_type_0
|
|
202
|
+
except: # noqa: E722
|
|
203
|
+
pass
|
|
204
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
205
|
+
|
|
206
|
+
cc = _parse_cc(d.pop("cc", UNSET))
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
reply_all = d.pop("reply_all", UNSET)
|
|
210
|
+
|
|
131
211
|
subject = d.pop("subject", UNSET)
|
|
132
212
|
|
|
133
213
|
def _parse_thread_id(data: object) -> Union[None, UUID, Unset]:
|
|
@@ -150,13 +230,34 @@ class SendRequest:
|
|
|
150
230
|
thread_id = _parse_thread_id(d.pop("thread_id", UNSET))
|
|
151
231
|
|
|
152
232
|
|
|
233
|
+
def _parse_to(data: object) -> Union[None, Unset, list[str], str]:
|
|
234
|
+
if data is None:
|
|
235
|
+
return data
|
|
236
|
+
if isinstance(data, Unset):
|
|
237
|
+
return data
|
|
238
|
+
try:
|
|
239
|
+
if not isinstance(data, list):
|
|
240
|
+
raise TypeError()
|
|
241
|
+
to_type_1 = cast(list[str], data)
|
|
242
|
+
|
|
243
|
+
return to_type_1
|
|
244
|
+
except: # noqa: E722
|
|
245
|
+
pass
|
|
246
|
+
return cast(Union[None, Unset, list[str], str], data)
|
|
247
|
+
|
|
248
|
+
to = _parse_to(d.pop("to", UNSET))
|
|
249
|
+
|
|
250
|
+
|
|
153
251
|
send_request = cls(
|
|
154
252
|
inbox_id=inbox_id,
|
|
155
|
-
|
|
253
|
+
bcc=bcc,
|
|
156
254
|
body_html=body_html,
|
|
157
255
|
body_text=body_text,
|
|
256
|
+
cc=cc,
|
|
257
|
+
reply_all=reply_all,
|
|
158
258
|
subject=subject,
|
|
159
259
|
thread_id=thread_id,
|
|
260
|
+
to=to,
|
|
160
261
|
)
|
|
161
262
|
|
|
162
263
|
return send_request
|
|
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.2.0 → daknode-0.3.0}/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
|