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,309 @@
|
|
|
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="MessageOut")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class MessageOut:
|
|
26
|
+
""" `specs/18` §5.1.
|
|
27
|
+
|
|
28
|
+
`org_id`, `raw_s3_key`, `revision_id`, `event_id`, `deleted_at`,
|
|
29
|
+
`suppress_auto_reply` and `suppression_reason` are absent on purpose, each
|
|
30
|
+
for its own reason recorded in the spec. `risk_level`/`risk_signals` ARE
|
|
31
|
+
present: `architecture.md` §9 makes injection risk advisory metadata for
|
|
32
|
+
the developer's downstream agent, and withholding it defeats its purpose.
|
|
33
|
+
|
|
34
|
+
Attributes:
|
|
35
|
+
body_text (Union[None, str]):
|
|
36
|
+
channel (str):
|
|
37
|
+
created_at (datetime.datetime):
|
|
38
|
+
id (UUID):
|
|
39
|
+
in_reply_to (Union[None, str]):
|
|
40
|
+
inbox_id (UUID):
|
|
41
|
+
is_automated (bool):
|
|
42
|
+
is_bulk (bool):
|
|
43
|
+
list_id (Union[None, str]):
|
|
44
|
+
message_id_header (Union[None, str]):
|
|
45
|
+
recipient (str):
|
|
46
|
+
references_message_ids (Union[None, list[str]]):
|
|
47
|
+
risk_level (str):
|
|
48
|
+
risk_signals (Union[None, list[str]]):
|
|
49
|
+
sender (str):
|
|
50
|
+
sequence_number (int):
|
|
51
|
+
subject (Union[None, str]):
|
|
52
|
+
thread_id (UUID):
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
body_text: Union[None, str]
|
|
56
|
+
channel: str
|
|
57
|
+
created_at: datetime.datetime
|
|
58
|
+
id: UUID
|
|
59
|
+
in_reply_to: Union[None, str]
|
|
60
|
+
inbox_id: UUID
|
|
61
|
+
is_automated: bool
|
|
62
|
+
is_bulk: bool
|
|
63
|
+
list_id: Union[None, str]
|
|
64
|
+
message_id_header: Union[None, str]
|
|
65
|
+
recipient: str
|
|
66
|
+
references_message_ids: Union[None, list[str]]
|
|
67
|
+
risk_level: str
|
|
68
|
+
risk_signals: Union[None, list[str]]
|
|
69
|
+
sender: str
|
|
70
|
+
sequence_number: int
|
|
71
|
+
subject: Union[None, str]
|
|
72
|
+
thread_id: UUID
|
|
73
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict[str, Any]:
|
|
80
|
+
body_text: Union[None, str]
|
|
81
|
+
body_text = self.body_text
|
|
82
|
+
|
|
83
|
+
channel = self.channel
|
|
84
|
+
|
|
85
|
+
created_at = self.created_at.isoformat()
|
|
86
|
+
|
|
87
|
+
id = str(self.id)
|
|
88
|
+
|
|
89
|
+
in_reply_to: Union[None, str]
|
|
90
|
+
in_reply_to = self.in_reply_to
|
|
91
|
+
|
|
92
|
+
inbox_id = str(self.inbox_id)
|
|
93
|
+
|
|
94
|
+
is_automated = self.is_automated
|
|
95
|
+
|
|
96
|
+
is_bulk = self.is_bulk
|
|
97
|
+
|
|
98
|
+
list_id: Union[None, str]
|
|
99
|
+
list_id = self.list_id
|
|
100
|
+
|
|
101
|
+
message_id_header: Union[None, str]
|
|
102
|
+
message_id_header = self.message_id_header
|
|
103
|
+
|
|
104
|
+
recipient = self.recipient
|
|
105
|
+
|
|
106
|
+
references_message_ids: Union[None, list[str]]
|
|
107
|
+
if isinstance(self.references_message_ids, list):
|
|
108
|
+
references_message_ids = self.references_message_ids
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
else:
|
|
112
|
+
references_message_ids = self.references_message_ids
|
|
113
|
+
|
|
114
|
+
risk_level = self.risk_level
|
|
115
|
+
|
|
116
|
+
risk_signals: Union[None, list[str]]
|
|
117
|
+
if isinstance(self.risk_signals, list):
|
|
118
|
+
risk_signals = self.risk_signals
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
else:
|
|
122
|
+
risk_signals = self.risk_signals
|
|
123
|
+
|
|
124
|
+
sender = self.sender
|
|
125
|
+
|
|
126
|
+
sequence_number = self.sequence_number
|
|
127
|
+
|
|
128
|
+
subject: Union[None, str]
|
|
129
|
+
subject = self.subject
|
|
130
|
+
|
|
131
|
+
thread_id = str(self.thread_id)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
field_dict: dict[str, Any] = {}
|
|
135
|
+
field_dict.update(self.additional_properties)
|
|
136
|
+
field_dict.update({
|
|
137
|
+
"body_text": body_text,
|
|
138
|
+
"channel": channel,
|
|
139
|
+
"created_at": created_at,
|
|
140
|
+
"id": id,
|
|
141
|
+
"in_reply_to": in_reply_to,
|
|
142
|
+
"inbox_id": inbox_id,
|
|
143
|
+
"is_automated": is_automated,
|
|
144
|
+
"is_bulk": is_bulk,
|
|
145
|
+
"list_id": list_id,
|
|
146
|
+
"message_id_header": message_id_header,
|
|
147
|
+
"recipient": recipient,
|
|
148
|
+
"references_message_ids": references_message_ids,
|
|
149
|
+
"risk_level": risk_level,
|
|
150
|
+
"risk_signals": risk_signals,
|
|
151
|
+
"sender": sender,
|
|
152
|
+
"sequence_number": sequence_number,
|
|
153
|
+
"subject": subject,
|
|
154
|
+
"thread_id": thread_id,
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
return field_dict
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
@classmethod
|
|
162
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
163
|
+
d = dict(src_dict)
|
|
164
|
+
def _parse_body_text(data: object) -> Union[None, str]:
|
|
165
|
+
if data is None:
|
|
166
|
+
return data
|
|
167
|
+
return cast(Union[None, str], data)
|
|
168
|
+
|
|
169
|
+
body_text = _parse_body_text(d.pop("body_text"))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
channel = d.pop("channel")
|
|
173
|
+
|
|
174
|
+
created_at = isoparse(d.pop("created_at"))
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
id = UUID(d.pop("id"))
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def _parse_in_reply_to(data: object) -> Union[None, str]:
|
|
185
|
+
if data is None:
|
|
186
|
+
return data
|
|
187
|
+
return cast(Union[None, str], data)
|
|
188
|
+
|
|
189
|
+
in_reply_to = _parse_in_reply_to(d.pop("in_reply_to"))
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
inbox_id = UUID(d.pop("inbox_id"))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
is_automated = d.pop("is_automated")
|
|
198
|
+
|
|
199
|
+
is_bulk = d.pop("is_bulk")
|
|
200
|
+
|
|
201
|
+
def _parse_list_id(data: object) -> Union[None, str]:
|
|
202
|
+
if data is None:
|
|
203
|
+
return data
|
|
204
|
+
return cast(Union[None, str], data)
|
|
205
|
+
|
|
206
|
+
list_id = _parse_list_id(d.pop("list_id"))
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def _parse_message_id_header(data: object) -> Union[None, str]:
|
|
210
|
+
if data is None:
|
|
211
|
+
return data
|
|
212
|
+
return cast(Union[None, str], data)
|
|
213
|
+
|
|
214
|
+
message_id_header = _parse_message_id_header(d.pop("message_id_header"))
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
recipient = d.pop("recipient")
|
|
218
|
+
|
|
219
|
+
def _parse_references_message_ids(data: object) -> Union[None, list[str]]:
|
|
220
|
+
if data is None:
|
|
221
|
+
return data
|
|
222
|
+
try:
|
|
223
|
+
if not isinstance(data, list):
|
|
224
|
+
raise TypeError()
|
|
225
|
+
references_message_ids_type_0 = cast(list[str], data)
|
|
226
|
+
|
|
227
|
+
return references_message_ids_type_0
|
|
228
|
+
except: # noqa: E722
|
|
229
|
+
pass
|
|
230
|
+
return cast(Union[None, list[str]], data)
|
|
231
|
+
|
|
232
|
+
references_message_ids = _parse_references_message_ids(d.pop("references_message_ids"))
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
risk_level = d.pop("risk_level")
|
|
236
|
+
|
|
237
|
+
def _parse_risk_signals(data: object) -> Union[None, list[str]]:
|
|
238
|
+
if data is None:
|
|
239
|
+
return data
|
|
240
|
+
try:
|
|
241
|
+
if not isinstance(data, list):
|
|
242
|
+
raise TypeError()
|
|
243
|
+
risk_signals_type_0 = cast(list[str], data)
|
|
244
|
+
|
|
245
|
+
return risk_signals_type_0
|
|
246
|
+
except: # noqa: E722
|
|
247
|
+
pass
|
|
248
|
+
return cast(Union[None, list[str]], data)
|
|
249
|
+
|
|
250
|
+
risk_signals = _parse_risk_signals(d.pop("risk_signals"))
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
sender = d.pop("sender")
|
|
254
|
+
|
|
255
|
+
sequence_number = d.pop("sequence_number")
|
|
256
|
+
|
|
257
|
+
def _parse_subject(data: object) -> Union[None, str]:
|
|
258
|
+
if data is None:
|
|
259
|
+
return data
|
|
260
|
+
return cast(Union[None, str], data)
|
|
261
|
+
|
|
262
|
+
subject = _parse_subject(d.pop("subject"))
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
thread_id = UUID(d.pop("thread_id"))
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
message_out = cls(
|
|
271
|
+
body_text=body_text,
|
|
272
|
+
channel=channel,
|
|
273
|
+
created_at=created_at,
|
|
274
|
+
id=id,
|
|
275
|
+
in_reply_to=in_reply_to,
|
|
276
|
+
inbox_id=inbox_id,
|
|
277
|
+
is_automated=is_automated,
|
|
278
|
+
is_bulk=is_bulk,
|
|
279
|
+
list_id=list_id,
|
|
280
|
+
message_id_header=message_id_header,
|
|
281
|
+
recipient=recipient,
|
|
282
|
+
references_message_ids=references_message_ids,
|
|
283
|
+
risk_level=risk_level,
|
|
284
|
+
risk_signals=risk_signals,
|
|
285
|
+
sender=sender,
|
|
286
|
+
sequence_number=sequence_number,
|
|
287
|
+
subject=subject,
|
|
288
|
+
thread_id=thread_id,
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
message_out.additional_properties = d
|
|
293
|
+
return message_out
|
|
294
|
+
|
|
295
|
+
@property
|
|
296
|
+
def additional_keys(self) -> list[str]:
|
|
297
|
+
return list(self.additional_properties.keys())
|
|
298
|
+
|
|
299
|
+
def __getitem__(self, key: str) -> Any:
|
|
300
|
+
return self.additional_properties[key]
|
|
301
|
+
|
|
302
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
303
|
+
self.additional_properties[key] = value
|
|
304
|
+
|
|
305
|
+
def __delitem__(self, key: str) -> None:
|
|
306
|
+
del self.additional_properties[key]
|
|
307
|
+
|
|
308
|
+
def __contains__(self, key: str) -> bool:
|
|
309
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,116 @@
|
|
|
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 typing import cast
|
|
10
|
+
from typing import cast, Union
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.message_out import MessageOut
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="MessagePage")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class MessagePage:
|
|
25
|
+
"""
|
|
26
|
+
Attributes:
|
|
27
|
+
has_more (bool):
|
|
28
|
+
items (list['MessageOut']):
|
|
29
|
+
next_cursor (Union[None, str]):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
has_more: bool
|
|
33
|
+
items: list['MessageOut']
|
|
34
|
+
next_cursor: Union[None, str]
|
|
35
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_dict(self) -> dict[str, Any]:
|
|
42
|
+
from ..models.message_out import MessageOut
|
|
43
|
+
has_more = self.has_more
|
|
44
|
+
|
|
45
|
+
items = []
|
|
46
|
+
for items_item_data in self.items:
|
|
47
|
+
items_item = items_item_data.to_dict()
|
|
48
|
+
items.append(items_item)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
next_cursor: Union[None, str]
|
|
53
|
+
next_cursor = self.next_cursor
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update({
|
|
59
|
+
"has_more": has_more,
|
|
60
|
+
"items": items,
|
|
61
|
+
"next_cursor": next_cursor,
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
70
|
+
from ..models.message_out import MessageOut
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
has_more = d.pop("has_more")
|
|
73
|
+
|
|
74
|
+
items = []
|
|
75
|
+
_items = d.pop("items")
|
|
76
|
+
for items_item_data in (_items):
|
|
77
|
+
items_item = MessageOut.from_dict(items_item_data)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
items.append(items_item)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _parse_next_cursor(data: object) -> Union[None, str]:
|
|
85
|
+
if data is None:
|
|
86
|
+
return data
|
|
87
|
+
return cast(Union[None, str], data)
|
|
88
|
+
|
|
89
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
message_page = cls(
|
|
93
|
+
has_more=has_more,
|
|
94
|
+
items=items,
|
|
95
|
+
next_cursor=next_cursor,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
message_page.additional_properties = d
|
|
100
|
+
return message_page
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def additional_keys(self) -> list[str]:
|
|
104
|
+
return list(self.additional_properties.keys())
|
|
105
|
+
|
|
106
|
+
def __getitem__(self, key: str) -> Any:
|
|
107
|
+
return self.additional_properties[key]
|
|
108
|
+
|
|
109
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
110
|
+
self.additional_properties[key] = value
|
|
111
|
+
|
|
112
|
+
def __delitem__(self, key: str) -> None:
|
|
113
|
+
del self.additional_properties[key]
|
|
114
|
+
|
|
115
|
+
def __contains__(self, key: str) -> bool:
|
|
116
|
+
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="ReadErasureRequestResponseReadErasureRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ReadErasureRequestResponseReadErasureRequest:
|
|
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
|
+
read_erasure_request_response_read_erasure_request = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
read_erasure_request_response_read_erasure_request.additional_properties = d
|
|
47
|
+
return read_erasure_request_response_read_erasure_request
|
|
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,113 @@
|
|
|
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
|
+
from uuid import UUID
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="ReplayResponse")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class ReplayResponse:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
event_id (str):
|
|
27
|
+
outbox_id (UUID):
|
|
28
|
+
replay_count (int):
|
|
29
|
+
status (str):
|
|
30
|
+
event_id_preserved (Union[Unset, bool]): Default: True.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
event_id: str
|
|
34
|
+
outbox_id: UUID
|
|
35
|
+
replay_count: int
|
|
36
|
+
status: str
|
|
37
|
+
event_id_preserved: Union[Unset, bool] = True
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
event_id = self.event_id
|
|
46
|
+
|
|
47
|
+
outbox_id = str(self.outbox_id)
|
|
48
|
+
|
|
49
|
+
replay_count = self.replay_count
|
|
50
|
+
|
|
51
|
+
status = self.status
|
|
52
|
+
|
|
53
|
+
event_id_preserved = self.event_id_preserved
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update({
|
|
59
|
+
"event_id": event_id,
|
|
60
|
+
"outbox_id": outbox_id,
|
|
61
|
+
"replay_count": replay_count,
|
|
62
|
+
"status": status,
|
|
63
|
+
})
|
|
64
|
+
if event_id_preserved is not UNSET:
|
|
65
|
+
field_dict["event_id_preserved"] = event_id_preserved
|
|
66
|
+
|
|
67
|
+
return field_dict
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
73
|
+
d = dict(src_dict)
|
|
74
|
+
event_id = d.pop("event_id")
|
|
75
|
+
|
|
76
|
+
outbox_id = UUID(d.pop("outbox_id"))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
replay_count = d.pop("replay_count")
|
|
82
|
+
|
|
83
|
+
status = d.pop("status")
|
|
84
|
+
|
|
85
|
+
event_id_preserved = d.pop("event_id_preserved", UNSET)
|
|
86
|
+
|
|
87
|
+
replay_response = cls(
|
|
88
|
+
event_id=event_id,
|
|
89
|
+
outbox_id=outbox_id,
|
|
90
|
+
replay_count=replay_count,
|
|
91
|
+
status=status,
|
|
92
|
+
event_id_preserved=event_id_preserved,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
replay_response.additional_properties = d
|
|
97
|
+
return replay_response
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def additional_keys(self) -> list[str]:
|
|
101
|
+
return list(self.additional_properties.keys())
|
|
102
|
+
|
|
103
|
+
def __getitem__(self, key: str) -> Any:
|
|
104
|
+
return self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
107
|
+
self.additional_properties[key] = value
|
|
108
|
+
|
|
109
|
+
def __delitem__(self, key: str) -> None:
|
|
110
|
+
del self.additional_properties[key]
|
|
111
|
+
|
|
112
|
+
def __contains__(self, key: str) -> bool:
|
|
113
|
+
return key in self.additional_properties
|
|
@@ -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
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="RevokeRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class RevokeRequest:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
recipient (str):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
recipient: str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
recipient = self.recipient
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update({
|
|
40
|
+
"recipient": recipient,
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
49
|
+
d = dict(src_dict)
|
|
50
|
+
recipient = d.pop("recipient")
|
|
51
|
+
|
|
52
|
+
revoke_request = cls(
|
|
53
|
+
recipient=recipient,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
revoke_request.additional_properties = d
|
|
58
|
+
return revoke_request
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> list[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|