daknode 0.1.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.
- daknode/__init__.py +8 -0
- daknode/api/__init__.py +1 -0
- daknode/api/block_rules/__init__.py +1 -0
- daknode/api/block_rules/create_block_rule.py +211 -0
- daknode/api/block_rules/create_inbox_block_rule.py +225 -0
- daknode/api/block_rules/delete_block_rule.py +192 -0
- daknode/api/block_rules/list_block_rules.py +214 -0
- daknode/api/block_rules/list_inbox_block_rules.py +228 -0
- daknode/api/consent/__init__.py +1 -0
- daknode/api/consent/create_consent.py +203 -0
- daknode/api/consent/revoke.py +195 -0
- daknode/api/control_plane/__init__.py +1 -0
- daknode/api/control_plane/close_workspace.py +184 -0
- daknode/api/control_plane/create_workspace.py +211 -0
- daknode/api/control_plane/list_workspaces.py +155 -0
- daknode/api/control_plane/read_workspace.py +176 -0
- daknode/api/control_plane/update_workspace.py +197 -0
- daknode/api/dead_letters/__init__.py +1 -0
- daknode/api/dead_letters/list_dead_letters.py +198 -0
- daknode/api/dead_letters/replay_dead_letter.py +216 -0
- daknode/api/inboxes/__init__.py +1 -0
- daknode/api/inboxes/create_inbox.py +183 -0
- daknode/api/inboxes/register_webhook.py +225 -0
- daknode/api/inboxes/rotate_webhook_secret.py +224 -0
- daknode/api/messages/__init__.py +1 -0
- daknode/api/messages/get_message.py +176 -0
- daknode/api/messages/get_thread.py +184 -0
- daknode/api/messages/list_messages.py +228 -0
- daknode/api/messages/list_threads.py +228 -0
- daknode/api/privacy/__init__.py +1 -0
- daknode/api/privacy/create_erasure_request.py +227 -0
- daknode/api/privacy/read_erasure_request.py +200 -0
- daknode/api/public/__init__.py +1 -0
- daknode/api/public/agent_signup.py +191 -0
- daknode/api/public/agent_verify.py +191 -0
- daknode/api/search/__init__.py +1 -0
- daknode/api/search/search.py +207 -0
- daknode/api/send/__init__.py +1 -0
- daknode/api/send/send.py +254 -0
- daknode/client.py +270 -0
- daknode/errors.py +14 -0
- daknode/models/__init__.py +79 -0
- daknode/models/block_rule_create.py +104 -0
- daknode/models/block_rule_out.py +160 -0
- daknode/models/block_rule_page.py +116 -0
- daknode/models/consent_request.py +104 -0
- daknode/models/consent_response.py +105 -0
- daknode/models/create_erasure_request_response_create_erasure_request.py +63 -0
- daknode/models/create_in.py +119 -0
- daknode/models/dead_letter_response.py +205 -0
- daknode/models/erasure_request_body.py +60 -0
- daknode/models/http_validation_error.py +97 -0
- daknode/models/inbox_create_request.py +120 -0
- daknode/models/inbox_response.py +148 -0
- daknode/models/message_out.py +309 -0
- daknode/models/message_page.py +116 -0
- daknode/models/read_erasure_request_response_read_erasure_request.py +63 -0
- daknode/models/replay_response.py +113 -0
- daknode/models/revoke_request.py +74 -0
- daknode/models/revoke_response_revoke.py +63 -0
- daknode/models/search_match.py +170 -0
- daknode/models/search_request.py +107 -0
- daknode/models/search_response.py +124 -0
- daknode/models/send_request.py +162 -0
- daknode/models/send_response_send.py +63 -0
- daknode/models/signup_in.py +63 -0
- daknode/models/signup_out.py +102 -0
- daknode/models/thread_detail_out.py +223 -0
- daknode/models/thread_out.py +163 -0
- daknode/models/thread_page.py +116 -0
- daknode/models/timeline_item_out.py +280 -0
- daknode/models/update_in.py +111 -0
- daknode/models/validation_error.py +141 -0
- daknode/models/validation_error_context.py +63 -0
- daknode/models/verify_in.py +67 -0
- daknode/models/verify_out.py +74 -0
- daknode/models/webhook_register_request.py +74 -0
- daknode/models/workspace_list_out.py +92 -0
- daknode/models/workspace_out.py +147 -0
- daknode/py.typed +1 -0
- daknode/types.py +53 -0
- daknode-0.1.0.dist-info/METADATA +143 -0
- daknode-0.1.0.dist-info/RECORD +84 -0
- daknode-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,280 @@
|
|
|
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 dateutil.parser import isoparse
|
|
10
|
+
from typing import cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from uuid import UUID
|
|
13
|
+
import datetime
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="TimelineItemOut")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class TimelineItemOut:
|
|
26
|
+
""" One entry in a conversation, from either direction (AT-8).
|
|
27
|
+
|
|
28
|
+
A single ordered timeline rather than two lists: an agent reading a thread
|
|
29
|
+
wants to know what was said and in what order, and reconstructing that from
|
|
30
|
+
two arrays is work every caller would have to repeat.
|
|
31
|
+
|
|
32
|
+
`direction` is derived from the **source table**, never from inspecting
|
|
33
|
+
`sender` — erasure redacts addresses, so an inferred direction would flip on
|
|
34
|
+
an erased row.
|
|
35
|
+
|
|
36
|
+
Fields that belong to only one direction are `null` on the other, and each
|
|
37
|
+
is null for a stated reason rather than because it was not wired up:
|
|
38
|
+
outbound has no `sender` (the address is the inbox's own and is not stored
|
|
39
|
+
twice), no `sequence_number` (that sequence is inbound-only so webhook
|
|
40
|
+
reordering keeps working), and no `message_id_header` (SES overrides
|
|
41
|
+
`Message-ID` and never reveals it).
|
|
42
|
+
|
|
43
|
+
Attributes:
|
|
44
|
+
body_text (Union[None, str]):
|
|
45
|
+
direction (str):
|
|
46
|
+
id (UUID):
|
|
47
|
+
in_reply_to (Union[None, str]):
|
|
48
|
+
message_id_header (Union[None, str]):
|
|
49
|
+
occurred_at (datetime.datetime):
|
|
50
|
+
recipient (Union[None, str]):
|
|
51
|
+
risk_level (Union[None, str]):
|
|
52
|
+
risk_signals (Union[None, list[str]]):
|
|
53
|
+
sender (Union[None, str]):
|
|
54
|
+
sequence_number (Union[None, int]):
|
|
55
|
+
status (Union[None, str]):
|
|
56
|
+
subject (Union[None, str]):
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
body_text: Union[None, str]
|
|
60
|
+
direction: str
|
|
61
|
+
id: UUID
|
|
62
|
+
in_reply_to: Union[None, str]
|
|
63
|
+
message_id_header: Union[None, str]
|
|
64
|
+
occurred_at: datetime.datetime
|
|
65
|
+
recipient: Union[None, str]
|
|
66
|
+
risk_level: Union[None, str]
|
|
67
|
+
risk_signals: Union[None, list[str]]
|
|
68
|
+
sender: Union[None, str]
|
|
69
|
+
sequence_number: Union[None, int]
|
|
70
|
+
status: Union[None, str]
|
|
71
|
+
subject: Union[None, str]
|
|
72
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def to_dict(self) -> dict[str, Any]:
|
|
79
|
+
body_text: Union[None, str]
|
|
80
|
+
body_text = self.body_text
|
|
81
|
+
|
|
82
|
+
direction = self.direction
|
|
83
|
+
|
|
84
|
+
id = str(self.id)
|
|
85
|
+
|
|
86
|
+
in_reply_to: Union[None, str]
|
|
87
|
+
in_reply_to = self.in_reply_to
|
|
88
|
+
|
|
89
|
+
message_id_header: Union[None, str]
|
|
90
|
+
message_id_header = self.message_id_header
|
|
91
|
+
|
|
92
|
+
occurred_at = self.occurred_at.isoformat()
|
|
93
|
+
|
|
94
|
+
recipient: Union[None, str]
|
|
95
|
+
recipient = self.recipient
|
|
96
|
+
|
|
97
|
+
risk_level: Union[None, str]
|
|
98
|
+
risk_level = self.risk_level
|
|
99
|
+
|
|
100
|
+
risk_signals: Union[None, list[str]]
|
|
101
|
+
if isinstance(self.risk_signals, list):
|
|
102
|
+
risk_signals = self.risk_signals
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
else:
|
|
106
|
+
risk_signals = self.risk_signals
|
|
107
|
+
|
|
108
|
+
sender: Union[None, str]
|
|
109
|
+
sender = self.sender
|
|
110
|
+
|
|
111
|
+
sequence_number: Union[None, int]
|
|
112
|
+
sequence_number = self.sequence_number
|
|
113
|
+
|
|
114
|
+
status: Union[None, str]
|
|
115
|
+
status = self.status
|
|
116
|
+
|
|
117
|
+
subject: Union[None, str]
|
|
118
|
+
subject = self.subject
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
field_dict: dict[str, Any] = {}
|
|
122
|
+
field_dict.update(self.additional_properties)
|
|
123
|
+
field_dict.update({
|
|
124
|
+
"body_text": body_text,
|
|
125
|
+
"direction": direction,
|
|
126
|
+
"id": id,
|
|
127
|
+
"in_reply_to": in_reply_to,
|
|
128
|
+
"message_id_header": message_id_header,
|
|
129
|
+
"occurred_at": occurred_at,
|
|
130
|
+
"recipient": recipient,
|
|
131
|
+
"risk_level": risk_level,
|
|
132
|
+
"risk_signals": risk_signals,
|
|
133
|
+
"sender": sender,
|
|
134
|
+
"sequence_number": sequence_number,
|
|
135
|
+
"status": status,
|
|
136
|
+
"subject": subject,
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
return field_dict
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@classmethod
|
|
144
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
145
|
+
d = dict(src_dict)
|
|
146
|
+
def _parse_body_text(data: object) -> Union[None, str]:
|
|
147
|
+
if data is None:
|
|
148
|
+
return data
|
|
149
|
+
return cast(Union[None, str], data)
|
|
150
|
+
|
|
151
|
+
body_text = _parse_body_text(d.pop("body_text"))
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
direction = d.pop("direction")
|
|
155
|
+
|
|
156
|
+
id = UUID(d.pop("id"))
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def _parse_in_reply_to(data: object) -> Union[None, str]:
|
|
162
|
+
if data is None:
|
|
163
|
+
return data
|
|
164
|
+
return cast(Union[None, str], data)
|
|
165
|
+
|
|
166
|
+
in_reply_to = _parse_in_reply_to(d.pop("in_reply_to"))
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def _parse_message_id_header(data: object) -> Union[None, str]:
|
|
170
|
+
if data is None:
|
|
171
|
+
return data
|
|
172
|
+
return cast(Union[None, str], data)
|
|
173
|
+
|
|
174
|
+
message_id_header = _parse_message_id_header(d.pop("message_id_header"))
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
occurred_at = isoparse(d.pop("occurred_at"))
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def _parse_recipient(data: object) -> Union[None, str]:
|
|
183
|
+
if data is None:
|
|
184
|
+
return data
|
|
185
|
+
return cast(Union[None, str], data)
|
|
186
|
+
|
|
187
|
+
recipient = _parse_recipient(d.pop("recipient"))
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _parse_risk_level(data: object) -> Union[None, str]:
|
|
191
|
+
if data is None:
|
|
192
|
+
return data
|
|
193
|
+
return cast(Union[None, str], data)
|
|
194
|
+
|
|
195
|
+
risk_level = _parse_risk_level(d.pop("risk_level"))
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def _parse_risk_signals(data: object) -> Union[None, list[str]]:
|
|
199
|
+
if data is None:
|
|
200
|
+
return data
|
|
201
|
+
try:
|
|
202
|
+
if not isinstance(data, list):
|
|
203
|
+
raise TypeError()
|
|
204
|
+
risk_signals_type_0 = cast(list[str], data)
|
|
205
|
+
|
|
206
|
+
return risk_signals_type_0
|
|
207
|
+
except: # noqa: E722
|
|
208
|
+
pass
|
|
209
|
+
return cast(Union[None, list[str]], data)
|
|
210
|
+
|
|
211
|
+
risk_signals = _parse_risk_signals(d.pop("risk_signals"))
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def _parse_sender(data: object) -> Union[None, str]:
|
|
215
|
+
if data is None:
|
|
216
|
+
return data
|
|
217
|
+
return cast(Union[None, str], data)
|
|
218
|
+
|
|
219
|
+
sender = _parse_sender(d.pop("sender"))
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def _parse_sequence_number(data: object) -> Union[None, int]:
|
|
223
|
+
if data is None:
|
|
224
|
+
return data
|
|
225
|
+
return cast(Union[None, int], data)
|
|
226
|
+
|
|
227
|
+
sequence_number = _parse_sequence_number(d.pop("sequence_number"))
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def _parse_status(data: object) -> Union[None, str]:
|
|
231
|
+
if data is None:
|
|
232
|
+
return data
|
|
233
|
+
return cast(Union[None, str], data)
|
|
234
|
+
|
|
235
|
+
status = _parse_status(d.pop("status"))
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def _parse_subject(data: object) -> Union[None, str]:
|
|
239
|
+
if data is None:
|
|
240
|
+
return data
|
|
241
|
+
return cast(Union[None, str], data)
|
|
242
|
+
|
|
243
|
+
subject = _parse_subject(d.pop("subject"))
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
timeline_item_out = cls(
|
|
247
|
+
body_text=body_text,
|
|
248
|
+
direction=direction,
|
|
249
|
+
id=id,
|
|
250
|
+
in_reply_to=in_reply_to,
|
|
251
|
+
message_id_header=message_id_header,
|
|
252
|
+
occurred_at=occurred_at,
|
|
253
|
+
recipient=recipient,
|
|
254
|
+
risk_level=risk_level,
|
|
255
|
+
risk_signals=risk_signals,
|
|
256
|
+
sender=sender,
|
|
257
|
+
sequence_number=sequence_number,
|
|
258
|
+
status=status,
|
|
259
|
+
subject=subject,
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
timeline_item_out.additional_properties = d
|
|
264
|
+
return timeline_item_out
|
|
265
|
+
|
|
266
|
+
@property
|
|
267
|
+
def additional_keys(self) -> list[str]:
|
|
268
|
+
return list(self.additional_properties.keys())
|
|
269
|
+
|
|
270
|
+
def __getitem__(self, key: str) -> Any:
|
|
271
|
+
return self.additional_properties[key]
|
|
272
|
+
|
|
273
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
274
|
+
self.additional_properties[key] = value
|
|
275
|
+
|
|
276
|
+
def __delitem__(self, key: str) -> None:
|
|
277
|
+
del self.additional_properties[key]
|
|
278
|
+
|
|
279
|
+
def __contains__(self, key: str) -> bool:
|
|
280
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,111 @@
|
|
|
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, Union
|
|
11
|
+
from typing import Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="UpdateIn")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class UpdateIn:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
external_client_id (Union[None, Unset, str]):
|
|
27
|
+
name (Union[None, Unset, str]):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
external_client_id: Union[None, Unset, str] = UNSET
|
|
31
|
+
name: Union[None, Unset, str] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
external_client_id: Union[None, Unset, str]
|
|
40
|
+
if isinstance(self.external_client_id, Unset):
|
|
41
|
+
external_client_id = UNSET
|
|
42
|
+
else:
|
|
43
|
+
external_client_id = self.external_client_id
|
|
44
|
+
|
|
45
|
+
name: Union[None, Unset, str]
|
|
46
|
+
if isinstance(self.name, Unset):
|
|
47
|
+
name = UNSET
|
|
48
|
+
else:
|
|
49
|
+
name = self.name
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
field_dict: dict[str, Any] = {}
|
|
53
|
+
field_dict.update(self.additional_properties)
|
|
54
|
+
field_dict.update({
|
|
55
|
+
})
|
|
56
|
+
if external_client_id is not UNSET:
|
|
57
|
+
field_dict["external_client_id"] = external_client_id
|
|
58
|
+
if name is not UNSET:
|
|
59
|
+
field_dict["name"] = name
|
|
60
|
+
|
|
61
|
+
return field_dict
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
67
|
+
d = dict(src_dict)
|
|
68
|
+
def _parse_external_client_id(data: object) -> Union[None, Unset, str]:
|
|
69
|
+
if data is None:
|
|
70
|
+
return data
|
|
71
|
+
if isinstance(data, Unset):
|
|
72
|
+
return data
|
|
73
|
+
return cast(Union[None, Unset, str], data)
|
|
74
|
+
|
|
75
|
+
external_client_id = _parse_external_client_id(d.pop("external_client_id", UNSET))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _parse_name(data: object) -> Union[None, Unset, str]:
|
|
79
|
+
if data is None:
|
|
80
|
+
return data
|
|
81
|
+
if isinstance(data, Unset):
|
|
82
|
+
return data
|
|
83
|
+
return cast(Union[None, Unset, str], data)
|
|
84
|
+
|
|
85
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
update_in = cls(
|
|
89
|
+
external_client_id=external_client_id,
|
|
90
|
+
name=name,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
update_in.additional_properties = d
|
|
95
|
+
return update_in
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def additional_keys(self) -> list[str]:
|
|
99
|
+
return list(self.additional_properties.keys())
|
|
100
|
+
|
|
101
|
+
def __getitem__(self, key: str) -> Any:
|
|
102
|
+
return self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
105
|
+
self.additional_properties[key] = value
|
|
106
|
+
|
|
107
|
+
def __delitem__(self, key: str) -> None:
|
|
108
|
+
del self.additional_properties[key]
|
|
109
|
+
|
|
110
|
+
def __contains__(self, key: str) -> bool:
|
|
111
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
if TYPE_CHECKING:
|
|
15
|
+
from ..models.validation_error_context import ValidationErrorContext
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="ValidationError")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@_attrs_define
|
|
26
|
+
class ValidationError:
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
loc (list[Union[int, str]]):
|
|
30
|
+
msg (str):
|
|
31
|
+
type_ (str):
|
|
32
|
+
ctx (Union[Unset, ValidationErrorContext]):
|
|
33
|
+
input_ (Union[Unset, Any]):
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
loc: list[Union[int, str]]
|
|
37
|
+
msg: str
|
|
38
|
+
type_: str
|
|
39
|
+
ctx: Union[Unset, 'ValidationErrorContext'] = UNSET
|
|
40
|
+
input_: Union[Unset, Any] = UNSET
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
from ..models.validation_error_context import ValidationErrorContext
|
|
49
|
+
loc = []
|
|
50
|
+
for loc_item_data in self.loc:
|
|
51
|
+
loc_item: Union[int, str]
|
|
52
|
+
loc_item = loc_item_data
|
|
53
|
+
loc.append(loc_item)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
msg = self.msg
|
|
58
|
+
|
|
59
|
+
type_ = self.type_
|
|
60
|
+
|
|
61
|
+
ctx: Union[Unset, dict[str, Any]] = UNSET
|
|
62
|
+
if not isinstance(self.ctx, Unset):
|
|
63
|
+
ctx = self.ctx.to_dict()
|
|
64
|
+
|
|
65
|
+
input_ = self.input_
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
field_dict: dict[str, Any] = {}
|
|
69
|
+
field_dict.update(self.additional_properties)
|
|
70
|
+
field_dict.update({
|
|
71
|
+
"loc": loc,
|
|
72
|
+
"msg": msg,
|
|
73
|
+
"type": type_,
|
|
74
|
+
})
|
|
75
|
+
if ctx is not UNSET:
|
|
76
|
+
field_dict["ctx"] = ctx
|
|
77
|
+
if input_ is not UNSET:
|
|
78
|
+
field_dict["input"] = input_
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
from ..models.validation_error_context import ValidationErrorContext
|
|
87
|
+
d = dict(src_dict)
|
|
88
|
+
loc = []
|
|
89
|
+
_loc = d.pop("loc")
|
|
90
|
+
for loc_item_data in (_loc):
|
|
91
|
+
def _parse_loc_item(data: object) -> Union[int, str]:
|
|
92
|
+
return cast(Union[int, str], data)
|
|
93
|
+
|
|
94
|
+
loc_item = _parse_loc_item(loc_item_data)
|
|
95
|
+
|
|
96
|
+
loc.append(loc_item)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
msg = d.pop("msg")
|
|
100
|
+
|
|
101
|
+
type_ = d.pop("type")
|
|
102
|
+
|
|
103
|
+
_ctx = d.pop("ctx", UNSET)
|
|
104
|
+
ctx: Union[Unset, ValidationErrorContext]
|
|
105
|
+
if isinstance(_ctx, Unset):
|
|
106
|
+
ctx = UNSET
|
|
107
|
+
else:
|
|
108
|
+
ctx = ValidationErrorContext.from_dict(_ctx)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
input_ = d.pop("input", UNSET)
|
|
114
|
+
|
|
115
|
+
validation_error = cls(
|
|
116
|
+
loc=loc,
|
|
117
|
+
msg=msg,
|
|
118
|
+
type_=type_,
|
|
119
|
+
ctx=ctx,
|
|
120
|
+
input_=input_,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
validation_error.additional_properties = d
|
|
125
|
+
return validation_error
|
|
126
|
+
|
|
127
|
+
@property
|
|
128
|
+
def additional_keys(self) -> list[str]:
|
|
129
|
+
return list(self.additional_properties.keys())
|
|
130
|
+
|
|
131
|
+
def __getitem__(self, key: str) -> Any:
|
|
132
|
+
return self.additional_properties[key]
|
|
133
|
+
|
|
134
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
135
|
+
self.additional_properties[key] = value
|
|
136
|
+
|
|
137
|
+
def __delitem__(self, key: str) -> None:
|
|
138
|
+
del self.additional_properties[key]
|
|
139
|
+
|
|
140
|
+
def __contains__(self, key: str) -> bool:
|
|
141
|
+
return key in self.additional_properties
|
|
@@ -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="ValidationErrorContext")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ValidationErrorContext:
|
|
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
|
+
validation_error_context = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
validation_error_context.additional_properties = d
|
|
47
|
+
return validation_error_context
|
|
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,67 @@
|
|
|
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 uuid import UUID
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="VerifyIn")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class VerifyIn:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
agent_id (UUID):
|
|
25
|
+
code (str):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
agent_id: UUID
|
|
29
|
+
code: str
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
agent_id = str(self.agent_id)
|
|
37
|
+
|
|
38
|
+
code = self.code
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
field_dict: dict[str, Any] = {}
|
|
42
|
+
|
|
43
|
+
field_dict.update({
|
|
44
|
+
"agent_id": agent_id,
|
|
45
|
+
"code": code,
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
agent_id = UUID(d.pop("agent_id"))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
code = d.pop("code")
|
|
61
|
+
|
|
62
|
+
verify_in = cls(
|
|
63
|
+
agent_id=agent_id,
|
|
64
|
+
code=code,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return verify_in
|