daknode 0.1.0__tar.gz → 0.2.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.1.0 → daknode-0.2.0}/PKG-INFO +1 -1
- daknode-0.2.0/daknode/api/inboxes/delete_inbox.py +200 -0
- daknode-0.2.0/daknode/api/inboxes/get_inbox.py +176 -0
- daknode-0.2.0/daknode/api/inboxes/list_inboxes.py +226 -0
- daknode-0.2.0/daknode/api/inboxes/update_inbox.py +205 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/__init__.py +8 -0
- daknode-0.2.0/daknode/models/inbox_deleted.py +100 -0
- daknode-0.2.0/daknode/models/inbox_out.py +140 -0
- daknode-0.2.0/daknode/models/inbox_page.py +116 -0
- daknode-0.2.0/daknode/models/inbox_update_request.py +92 -0
- {daknode-0.1.0 → daknode-0.2.0}/pyproject.toml +1 -1
- {daknode-0.1.0 → daknode-0.2.0}/README.md +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/block_rules/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/block_rules/create_block_rule.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/block_rules/create_inbox_block_rule.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/block_rules/delete_block_rule.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/block_rules/list_block_rules.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/block_rules/list_inbox_block_rules.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/consent/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/consent/create_consent.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/consent/revoke.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/control_plane/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/control_plane/close_workspace.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/control_plane/create_workspace.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/control_plane/list_workspaces.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/control_plane/read_workspace.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/control_plane/update_workspace.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/dead_letters/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/dead_letters/list_dead_letters.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/dead_letters/replay_dead_letter.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/inboxes/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/inboxes/create_inbox.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/inboxes/register_webhook.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/inboxes/rotate_webhook_secret.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/messages/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/messages/get_message.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/messages/get_thread.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/messages/list_messages.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/messages/list_threads.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/privacy/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/privacy/create_erasure_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/privacy/read_erasure_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/public/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/public/agent_signup.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/public/agent_verify.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/search/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/search/search.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/send/__init__.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/api/send/send.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/client.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/errors.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/block_rule_create.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/block_rule_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/block_rule_page.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/consent_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/consent_response.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/create_erasure_request_response_create_erasure_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/create_in.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/dead_letter_response.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/erasure_request_body.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/http_validation_error.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/inbox_create_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/inbox_response.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/message_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/message_page.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/read_erasure_request_response_read_erasure_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/replay_response.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/revoke_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/revoke_response_revoke.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/search_match.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/search_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/search_response.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/send_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/send_response_send.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/signup_in.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/signup_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/thread_detail_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/thread_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/thread_page.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/timeline_item_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/update_in.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/validation_error.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/validation_error_context.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/verify_in.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/verify_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/webhook_register_request.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/workspace_list_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/models/workspace_out.py +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/py.typed +0 -0
- {daknode-0.1.0 → daknode-0.2.0}/daknode/types.py +0 -0
|
@@ -0,0 +1,200 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.inbox_deleted import InboxDeleted
|
|
12
|
+
from typing import cast
|
|
13
|
+
from uuid import UUID
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _get_kwargs(
|
|
18
|
+
inbox_id: UUID,
|
|
19
|
+
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
_kwargs: dict[str, Any] = {
|
|
28
|
+
"method": "delete",
|
|
29
|
+
"url": "/v1/inboxes/{inbox_id}".format(inbox_id=inbox_id,),
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[HTTPValidationError, InboxDeleted]]:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = InboxDeleted.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
if response.status_code == 422:
|
|
44
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
return response_422
|
|
49
|
+
if client.raise_on_unexpected_status:
|
|
50
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
51
|
+
else:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[HTTPValidationError, InboxDeleted]]:
|
|
56
|
+
return Response(
|
|
57
|
+
status_code=HTTPStatus(response.status_code),
|
|
58
|
+
content=response.content,
|
|
59
|
+
headers=response.headers,
|
|
60
|
+
parsed=_parse_response(client=client, response=response),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def sync_detailed(
|
|
65
|
+
inbox_id: UUID,
|
|
66
|
+
*,
|
|
67
|
+
client: AuthenticatedClient,
|
|
68
|
+
|
|
69
|
+
) -> Response[Union[HTTPValidationError, InboxDeleted]]:
|
|
70
|
+
""" Delete Inbox
|
|
71
|
+
|
|
72
|
+
Deactivate an inbox — `specs/inbox_lifecycle_api.md#delete-semantics`.
|
|
73
|
+
|
|
74
|
+
**Workspace-scoped keys only.** This route shares its template with GET and
|
|
75
|
+
PATCH, which an inbox-scoped key may use, so the refusal is made here: a
|
|
76
|
+
key scoped to one inbox must not be able to destroy it.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
inbox_id (UUID):
|
|
80
|
+
|
|
81
|
+
Raises:
|
|
82
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
83
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Response[Union[HTTPValidationError, InboxDeleted]]
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
kwargs = _get_kwargs(
|
|
91
|
+
inbox_id=inbox_id,
|
|
92
|
+
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
response = client.get_httpx_client().request(
|
|
96
|
+
**kwargs,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
return _build_response(client=client, response=response)
|
|
100
|
+
|
|
101
|
+
def sync(
|
|
102
|
+
inbox_id: UUID,
|
|
103
|
+
*,
|
|
104
|
+
client: AuthenticatedClient,
|
|
105
|
+
|
|
106
|
+
) -> Optional[Union[HTTPValidationError, InboxDeleted]]:
|
|
107
|
+
""" Delete Inbox
|
|
108
|
+
|
|
109
|
+
Deactivate an inbox — `specs/inbox_lifecycle_api.md#delete-semantics`.
|
|
110
|
+
|
|
111
|
+
**Workspace-scoped keys only.** This route shares its template with GET and
|
|
112
|
+
PATCH, which an inbox-scoped key may use, so the refusal is made here: a
|
|
113
|
+
key scoped to one inbox must not be able to destroy it.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
inbox_id (UUID):
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
120
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
Union[HTTPValidationError, InboxDeleted]
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
return sync_detailed(
|
|
128
|
+
inbox_id=inbox_id,
|
|
129
|
+
client=client,
|
|
130
|
+
|
|
131
|
+
).parsed
|
|
132
|
+
|
|
133
|
+
async def asyncio_detailed(
|
|
134
|
+
inbox_id: UUID,
|
|
135
|
+
*,
|
|
136
|
+
client: AuthenticatedClient,
|
|
137
|
+
|
|
138
|
+
) -> Response[Union[HTTPValidationError, InboxDeleted]]:
|
|
139
|
+
""" Delete Inbox
|
|
140
|
+
|
|
141
|
+
Deactivate an inbox — `specs/inbox_lifecycle_api.md#delete-semantics`.
|
|
142
|
+
|
|
143
|
+
**Workspace-scoped keys only.** This route shares its template with GET and
|
|
144
|
+
PATCH, which an inbox-scoped key may use, so the refusal is made here: a
|
|
145
|
+
key scoped to one inbox must not be able to destroy it.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
inbox_id (UUID):
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
152
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
Response[Union[HTTPValidationError, InboxDeleted]]
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
kwargs = _get_kwargs(
|
|
160
|
+
inbox_id=inbox_id,
|
|
161
|
+
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
response = await client.get_async_httpx_client().request(
|
|
165
|
+
**kwargs
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
return _build_response(client=client, response=response)
|
|
169
|
+
|
|
170
|
+
async def asyncio(
|
|
171
|
+
inbox_id: UUID,
|
|
172
|
+
*,
|
|
173
|
+
client: AuthenticatedClient,
|
|
174
|
+
|
|
175
|
+
) -> Optional[Union[HTTPValidationError, InboxDeleted]]:
|
|
176
|
+
""" Delete Inbox
|
|
177
|
+
|
|
178
|
+
Deactivate an inbox — `specs/inbox_lifecycle_api.md#delete-semantics`.
|
|
179
|
+
|
|
180
|
+
**Workspace-scoped keys only.** This route shares its template with GET and
|
|
181
|
+
PATCH, which an inbox-scoped key may use, so the refusal is made here: a
|
|
182
|
+
key scoped to one inbox must not be able to destroy it.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
inbox_id (UUID):
|
|
186
|
+
|
|
187
|
+
Raises:
|
|
188
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
189
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
190
|
+
|
|
191
|
+
Returns:
|
|
192
|
+
Union[HTTPValidationError, InboxDeleted]
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
return (await asyncio_detailed(
|
|
197
|
+
inbox_id=inbox_id,
|
|
198
|
+
client=client,
|
|
199
|
+
|
|
200
|
+
)).parsed
|
|
@@ -0,0 +1,176 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.inbox_out import InboxOut
|
|
12
|
+
from typing import cast
|
|
13
|
+
from uuid import UUID
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _get_kwargs(
|
|
18
|
+
inbox_id: UUID,
|
|
19
|
+
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
_kwargs: dict[str, Any] = {
|
|
28
|
+
"method": "get",
|
|
29
|
+
"url": "/v1/inboxes/{inbox_id}".format(inbox_id=inbox_id,),
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[HTTPValidationError, InboxOut]]:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = InboxOut.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
if response.status_code == 422:
|
|
44
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
return response_422
|
|
49
|
+
if client.raise_on_unexpected_status:
|
|
50
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
51
|
+
else:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[HTTPValidationError, InboxOut]]:
|
|
56
|
+
return Response(
|
|
57
|
+
status_code=HTTPStatus(response.status_code),
|
|
58
|
+
content=response.content,
|
|
59
|
+
headers=response.headers,
|
|
60
|
+
parsed=_parse_response(client=client, response=response),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def sync_detailed(
|
|
65
|
+
inbox_id: UUID,
|
|
66
|
+
*,
|
|
67
|
+
client: AuthenticatedClient,
|
|
68
|
+
|
|
69
|
+
) -> Response[Union[HTTPValidationError, InboxOut]]:
|
|
70
|
+
""" Get Inbox
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
inbox_id (UUID):
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
77
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
Response[Union[HTTPValidationError, InboxOut]]
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
kwargs = _get_kwargs(
|
|
85
|
+
inbox_id=inbox_id,
|
|
86
|
+
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
response = client.get_httpx_client().request(
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(client=client, response=response)
|
|
94
|
+
|
|
95
|
+
def sync(
|
|
96
|
+
inbox_id: UUID,
|
|
97
|
+
*,
|
|
98
|
+
client: AuthenticatedClient,
|
|
99
|
+
|
|
100
|
+
) -> Optional[Union[HTTPValidationError, InboxOut]]:
|
|
101
|
+
""" Get Inbox
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
inbox_id (UUID):
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Union[HTTPValidationError, InboxOut]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
return sync_detailed(
|
|
116
|
+
inbox_id=inbox_id,
|
|
117
|
+
client=client,
|
|
118
|
+
|
|
119
|
+
).parsed
|
|
120
|
+
|
|
121
|
+
async def asyncio_detailed(
|
|
122
|
+
inbox_id: UUID,
|
|
123
|
+
*,
|
|
124
|
+
client: AuthenticatedClient,
|
|
125
|
+
|
|
126
|
+
) -> Response[Union[HTTPValidationError, InboxOut]]:
|
|
127
|
+
""" Get Inbox
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
inbox_id (UUID):
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
134
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
135
|
+
|
|
136
|
+
Returns:
|
|
137
|
+
Response[Union[HTTPValidationError, InboxOut]]
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
kwargs = _get_kwargs(
|
|
142
|
+
inbox_id=inbox_id,
|
|
143
|
+
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
response = await client.get_async_httpx_client().request(
|
|
147
|
+
**kwargs
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
return _build_response(client=client, response=response)
|
|
151
|
+
|
|
152
|
+
async def asyncio(
|
|
153
|
+
inbox_id: UUID,
|
|
154
|
+
*,
|
|
155
|
+
client: AuthenticatedClient,
|
|
156
|
+
|
|
157
|
+
) -> Optional[Union[HTTPValidationError, InboxOut]]:
|
|
158
|
+
""" Get Inbox
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
inbox_id (UUID):
|
|
162
|
+
|
|
163
|
+
Raises:
|
|
164
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
165
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
166
|
+
|
|
167
|
+
Returns:
|
|
168
|
+
Union[HTTPValidationError, InboxOut]
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
return (await asyncio_detailed(
|
|
173
|
+
inbox_id=inbox_id,
|
|
174
|
+
client=client,
|
|
175
|
+
|
|
176
|
+
)).parsed
|
|
@@ -0,0 +1,226 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.inbox_page import InboxPage
|
|
12
|
+
from ...types import UNSET, Unset
|
|
13
|
+
from typing import cast
|
|
14
|
+
from typing import cast, Union
|
|
15
|
+
from typing import Union
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _get_kwargs(
|
|
20
|
+
*,
|
|
21
|
+
limit: Union[Unset, int] = 25,
|
|
22
|
+
cursor: Union[None, Unset, str] = UNSET,
|
|
23
|
+
|
|
24
|
+
) -> dict[str, Any]:
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
params: dict[str, Any] = {}
|
|
30
|
+
|
|
31
|
+
params["limit"] = limit
|
|
32
|
+
|
|
33
|
+
json_cursor: Union[None, Unset, str]
|
|
34
|
+
if isinstance(cursor, Unset):
|
|
35
|
+
json_cursor = UNSET
|
|
36
|
+
else:
|
|
37
|
+
json_cursor = cursor
|
|
38
|
+
params["cursor"] = json_cursor
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
_kwargs: dict[str, Any] = {
|
|
45
|
+
"method": "get",
|
|
46
|
+
"url": "/v1/inboxes",
|
|
47
|
+
"params": params,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
return _kwargs
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[HTTPValidationError, InboxPage]]:
|
|
55
|
+
if response.status_code == 200:
|
|
56
|
+
response_200 = InboxPage.from_dict(response.json())
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
return response_200
|
|
61
|
+
if response.status_code == 422:
|
|
62
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
return response_422
|
|
67
|
+
if client.raise_on_unexpected_status:
|
|
68
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
69
|
+
else:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[HTTPValidationError, InboxPage]]:
|
|
74
|
+
return Response(
|
|
75
|
+
status_code=HTTPStatus(response.status_code),
|
|
76
|
+
content=response.content,
|
|
77
|
+
headers=response.headers,
|
|
78
|
+
parsed=_parse_response(client=client, response=response),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def sync_detailed(
|
|
83
|
+
*,
|
|
84
|
+
client: AuthenticatedClient,
|
|
85
|
+
limit: Union[Unset, int] = 25,
|
|
86
|
+
cursor: Union[None, Unset, str] = UNSET,
|
|
87
|
+
|
|
88
|
+
) -> Response[Union[HTTPValidationError, InboxPage]]:
|
|
89
|
+
""" List Inboxes
|
|
90
|
+
|
|
91
|
+
Live inboxes in the key's Workspace, newest first.
|
|
92
|
+
|
|
93
|
+
Workspace-scoped keys only: `/v1/inboxes` is deliberately absent from the
|
|
94
|
+
inbox-scope table, because listing it would also open `POST /v1/inboxes`.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
limit (Union[Unset, int]): Default: 25.
|
|
98
|
+
cursor (Union[None, Unset, str]):
|
|
99
|
+
|
|
100
|
+
Raises:
|
|
101
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
102
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
103
|
+
|
|
104
|
+
Returns:
|
|
105
|
+
Response[Union[HTTPValidationError, InboxPage]]
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
kwargs = _get_kwargs(
|
|
110
|
+
limit=limit,
|
|
111
|
+
cursor=cursor,
|
|
112
|
+
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
response = client.get_httpx_client().request(
|
|
116
|
+
**kwargs,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
return _build_response(client=client, response=response)
|
|
120
|
+
|
|
121
|
+
def sync(
|
|
122
|
+
*,
|
|
123
|
+
client: AuthenticatedClient,
|
|
124
|
+
limit: Union[Unset, int] = 25,
|
|
125
|
+
cursor: Union[None, Unset, str] = UNSET,
|
|
126
|
+
|
|
127
|
+
) -> Optional[Union[HTTPValidationError, InboxPage]]:
|
|
128
|
+
""" List Inboxes
|
|
129
|
+
|
|
130
|
+
Live inboxes in the key's Workspace, newest first.
|
|
131
|
+
|
|
132
|
+
Workspace-scoped keys only: `/v1/inboxes` is deliberately absent from the
|
|
133
|
+
inbox-scope table, because listing it would also open `POST /v1/inboxes`.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
limit (Union[Unset, int]): Default: 25.
|
|
137
|
+
cursor (Union[None, Unset, str]):
|
|
138
|
+
|
|
139
|
+
Raises:
|
|
140
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
141
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
Union[HTTPValidationError, InboxPage]
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
return sync_detailed(
|
|
149
|
+
client=client,
|
|
150
|
+
limit=limit,
|
|
151
|
+
cursor=cursor,
|
|
152
|
+
|
|
153
|
+
).parsed
|
|
154
|
+
|
|
155
|
+
async def asyncio_detailed(
|
|
156
|
+
*,
|
|
157
|
+
client: AuthenticatedClient,
|
|
158
|
+
limit: Union[Unset, int] = 25,
|
|
159
|
+
cursor: Union[None, Unset, str] = UNSET,
|
|
160
|
+
|
|
161
|
+
) -> Response[Union[HTTPValidationError, InboxPage]]:
|
|
162
|
+
""" List Inboxes
|
|
163
|
+
|
|
164
|
+
Live inboxes in the key's Workspace, newest first.
|
|
165
|
+
|
|
166
|
+
Workspace-scoped keys only: `/v1/inboxes` is deliberately absent from the
|
|
167
|
+
inbox-scope table, because listing it would also open `POST /v1/inboxes`.
|
|
168
|
+
|
|
169
|
+
Args:
|
|
170
|
+
limit (Union[Unset, int]): Default: 25.
|
|
171
|
+
cursor (Union[None, Unset, str]):
|
|
172
|
+
|
|
173
|
+
Raises:
|
|
174
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
175
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
176
|
+
|
|
177
|
+
Returns:
|
|
178
|
+
Response[Union[HTTPValidationError, InboxPage]]
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
kwargs = _get_kwargs(
|
|
183
|
+
limit=limit,
|
|
184
|
+
cursor=cursor,
|
|
185
|
+
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
response = await client.get_async_httpx_client().request(
|
|
189
|
+
**kwargs
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
return _build_response(client=client, response=response)
|
|
193
|
+
|
|
194
|
+
async def asyncio(
|
|
195
|
+
*,
|
|
196
|
+
client: AuthenticatedClient,
|
|
197
|
+
limit: Union[Unset, int] = 25,
|
|
198
|
+
cursor: Union[None, Unset, str] = UNSET,
|
|
199
|
+
|
|
200
|
+
) -> Optional[Union[HTTPValidationError, InboxPage]]:
|
|
201
|
+
""" List Inboxes
|
|
202
|
+
|
|
203
|
+
Live inboxes in the key's Workspace, newest first.
|
|
204
|
+
|
|
205
|
+
Workspace-scoped keys only: `/v1/inboxes` is deliberately absent from the
|
|
206
|
+
inbox-scope table, because listing it would also open `POST /v1/inboxes`.
|
|
207
|
+
|
|
208
|
+
Args:
|
|
209
|
+
limit (Union[Unset, int]): Default: 25.
|
|
210
|
+
cursor (Union[None, Unset, str]):
|
|
211
|
+
|
|
212
|
+
Raises:
|
|
213
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
214
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
215
|
+
|
|
216
|
+
Returns:
|
|
217
|
+
Union[HTTPValidationError, InboxPage]
|
|
218
|
+
"""
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
return (await asyncio_detailed(
|
|
222
|
+
client=client,
|
|
223
|
+
limit=limit,
|
|
224
|
+
cursor=cursor,
|
|
225
|
+
|
|
226
|
+
)).parsed
|