robosystems-client 0.1.11__py3-none-any.whl → 0.1.13__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.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/query_financial_agent.py +4 -4
- robosystems_client/api/backup/create_backup.py +1 -1
- robosystems_client/api/backup/export_backup.py +14 -19
- robosystems_client/api/backup/get_backup_download_url.py +1 -1
- robosystems_client/api/backup/get_backup_stats.py +19 -1
- robosystems_client/api/backup/list_backups.py +19 -1
- robosystems_client/api/backup/restore_backup.py +1 -1
- robosystems_client/api/copy/copy_data_to_graph.py +314 -0
- robosystems_client/api/{credits_ → graph_credits}/check_credit_balance.py +42 -20
- robosystems_client/api/graph_health/__init__.py +1 -0
- robosystems_client/api/{graph_status → graph_health}/get_database_health.py +1 -1
- robosystems_client/api/graph_info/__init__.py +1 -0
- robosystems_client/api/{graph_status → graph_info}/get_database_info.py +1 -1
- robosystems_client/api/graph_limits/__init__.py +1 -0
- robosystems_client/api/graph_limits/get_graph_limits.py +259 -0
- robosystems_client/api/subgraphs/__init__.py +1 -0
- robosystems_client/api/{billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py → subgraphs/create_subgraph.py} +82 -36
- robosystems_client/api/subgraphs/delete_subgraph.py +317 -0
- robosystems_client/api/subgraphs/get_subgraph_info.py +300 -0
- robosystems_client/api/subgraphs/get_subgraph_quota.py +276 -0
- robosystems_client/api/{billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py → subgraphs/list_subgraphs.py} +58 -32
- robosystems_client/api/user/get_all_credit_summaries.py +1 -1
- robosystems_client/extensions/README.md +2 -6
- robosystems_client/models/__init__.py +46 -10
- robosystems_client/models/copy_response.py +223 -0
- robosystems_client/models/{kuzu_backup_health_response_kuzubackuphealth.py → copy_response_error_details_type_0.py} +5 -5
- robosystems_client/models/copy_response_status.py +10 -0
- robosystems_client/models/create_subgraph_request.py +185 -0
- robosystems_client/models/create_subgraph_request_metadata_type_0.py +44 -0
- robosystems_client/models/credit_summary_response.py +0 -8
- robosystems_client/models/custom_schema_definition.py +2 -2
- robosystems_client/models/data_frame_copy_request.py +125 -0
- robosystems_client/models/data_frame_copy_request_format.py +10 -0
- robosystems_client/models/delete_subgraph_request.py +89 -0
- robosystems_client/models/delete_subgraph_response.py +120 -0
- robosystems_client/models/get_graph_limits_response_getgraphlimits.py +44 -0
- robosystems_client/models/list_subgraphs_response.py +148 -0
- robosystems_client/models/s3_copy_request.py +375 -0
- robosystems_client/models/s3_copy_request_file_format.py +12 -0
- robosystems_client/models/s3_copy_request_s3_url_style_type_0.py +9 -0
- robosystems_client/models/subgraph_quota_response.py +158 -0
- robosystems_client/models/subgraph_response.py +279 -0
- robosystems_client/models/subgraph_response_metadata_type_0.py +44 -0
- robosystems_client/models/subgraph_summary.py +155 -0
- robosystems_client/models/subgraph_type.py +11 -0
- robosystems_client/models/url_copy_request.py +157 -0
- robosystems_client/models/url_copy_request_file_format.py +10 -0
- robosystems_client/models/url_copy_request_headers_type_0.py +44 -0
- {robosystems_client-0.1.11.dist-info → robosystems_client-0.1.13.dist-info}/METADATA +1 -1
- {robosystems_client-0.1.11.dist-info → robosystems_client-0.1.13.dist-info}/RECORD +62 -39
- robosystems_client/api/backup/kuzu_backup_health.py +0 -202
- robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py +0 -198
- robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py +0 -198
- robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py +0 -198
- robosystems_client/models/backup_export_request.py +0 -72
- robosystems_client/models/credit_check_request.py +0 -82
- robosystems_client/models/upgrade_subscription_request.py +0 -82
- /robosystems_client/api/{billing → copy}/__init__.py +0 -0
- /robosystems_client/api/{credits_ → graph_billing}/__init__.py +0 -0
- /robosystems_client/api/{billing → graph_billing}/get_current_graph_bill.py +0 -0
- /robosystems_client/api/{billing → graph_billing}/get_graph_billing_history.py +0 -0
- /robosystems_client/api/{billing → graph_billing}/get_graph_monthly_bill.py +0 -0
- /robosystems_client/api/{billing → graph_billing}/get_graph_usage_details.py +0 -0
- /robosystems_client/api/{graph_status → graph_credits}/__init__.py +0 -0
- /robosystems_client/api/{credits_ → graph_credits}/check_storage_limits.py +0 -0
- /robosystems_client/api/{credits_ → graph_credits}/get_credit_summary.py +0 -0
- /robosystems_client/api/{credits_ → graph_credits}/get_storage_usage.py +0 -0
- /robosystems_client/api/{credits_ → graph_credits}/list_credit_transactions.py +0 -0
- {robosystems_client-0.1.11.dist-info → robosystems_client-0.1.13.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.delete_subgraph_request import DeleteSubgraphRequest
|
|
9
|
+
from ...models.delete_subgraph_response import DeleteSubgraphResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
graph_id: str,
|
|
16
|
+
subgraph_id: str,
|
|
17
|
+
*,
|
|
18
|
+
body: DeleteSubgraphRequest,
|
|
19
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
20
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
headers: dict[str, Any] = {}
|
|
23
|
+
if not isinstance(authorization, Unset):
|
|
24
|
+
headers["authorization"] = authorization
|
|
25
|
+
|
|
26
|
+
cookies = {}
|
|
27
|
+
if auth_token is not UNSET:
|
|
28
|
+
cookies["auth-token"] = auth_token
|
|
29
|
+
|
|
30
|
+
_kwargs: dict[str, Any] = {
|
|
31
|
+
"method": "delete",
|
|
32
|
+
"url": f"/v1/{graph_id}/subgraphs/{subgraph_id}",
|
|
33
|
+
"cookies": cookies,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_kwargs["json"] = body.to_dict()
|
|
37
|
+
|
|
38
|
+
headers["Content-Type"] = "application/json"
|
|
39
|
+
|
|
40
|
+
_kwargs["headers"] = headers
|
|
41
|
+
return _kwargs
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _parse_response(
|
|
45
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
46
|
+
) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]:
|
|
47
|
+
if response.status_code == 200:
|
|
48
|
+
response_200 = DeleteSubgraphResponse.from_dict(response.json())
|
|
49
|
+
|
|
50
|
+
return response_200
|
|
51
|
+
if response.status_code == 401:
|
|
52
|
+
response_401 = cast(Any, None)
|
|
53
|
+
return response_401
|
|
54
|
+
if response.status_code == 403:
|
|
55
|
+
response_403 = cast(Any, None)
|
|
56
|
+
return response_403
|
|
57
|
+
if response.status_code == 404:
|
|
58
|
+
response_404 = cast(Any, None)
|
|
59
|
+
return response_404
|
|
60
|
+
if response.status_code == 400:
|
|
61
|
+
response_400 = cast(Any, None)
|
|
62
|
+
return response_400
|
|
63
|
+
if response.status_code == 409:
|
|
64
|
+
response_409 = cast(Any, None)
|
|
65
|
+
return response_409
|
|
66
|
+
if response.status_code == 500:
|
|
67
|
+
response_500 = cast(Any, None)
|
|
68
|
+
return response_500
|
|
69
|
+
if response.status_code == 422:
|
|
70
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
71
|
+
|
|
72
|
+
return response_422
|
|
73
|
+
if client.raise_on_unexpected_status:
|
|
74
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
75
|
+
else:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _build_response(
|
|
80
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
81
|
+
) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]:
|
|
82
|
+
return Response(
|
|
83
|
+
status_code=HTTPStatus(response.status_code),
|
|
84
|
+
content=response.content,
|
|
85
|
+
headers=response.headers,
|
|
86
|
+
parsed=_parse_response(client=client, response=response),
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def sync_detailed(
|
|
91
|
+
graph_id: str,
|
|
92
|
+
subgraph_id: str,
|
|
93
|
+
*,
|
|
94
|
+
client: AuthenticatedClient,
|
|
95
|
+
body: DeleteSubgraphRequest,
|
|
96
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
97
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
98
|
+
) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]:
|
|
99
|
+
"""Delete Subgraph
|
|
100
|
+
|
|
101
|
+
Delete a subgraph database.
|
|
102
|
+
|
|
103
|
+
**Requirements:**
|
|
104
|
+
- Must be a valid subgraph (not parent graph)
|
|
105
|
+
- User must have admin access to parent graph
|
|
106
|
+
- Optional backup before deletion
|
|
107
|
+
|
|
108
|
+
**Deletion Options:**
|
|
109
|
+
- `force`: Delete even if contains data
|
|
110
|
+
- `backup_first`: Create backup before deletion
|
|
111
|
+
|
|
112
|
+
**Warning:**
|
|
113
|
+
Deletion is permanent unless backup is created.
|
|
114
|
+
All data in the subgraph will be lost.
|
|
115
|
+
|
|
116
|
+
**Backup Location:**
|
|
117
|
+
If backup requested, stored in S3 at:
|
|
118
|
+
`s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup`
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
graph_id (str): Parent graph identifier
|
|
122
|
+
subgraph_id (str): Subgraph identifier to delete
|
|
123
|
+
authorization (Union[None, Unset, str]):
|
|
124
|
+
auth_token (Union[None, Unset, str]):
|
|
125
|
+
body (DeleteSubgraphRequest): Request model for deleting a subgraph.
|
|
126
|
+
|
|
127
|
+
Raises:
|
|
128
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
129
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
130
|
+
|
|
131
|
+
Returns:
|
|
132
|
+
Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
kwargs = _get_kwargs(
|
|
136
|
+
graph_id=graph_id,
|
|
137
|
+
subgraph_id=subgraph_id,
|
|
138
|
+
body=body,
|
|
139
|
+
authorization=authorization,
|
|
140
|
+
auth_token=auth_token,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
response = client.get_httpx_client().request(
|
|
144
|
+
**kwargs,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
return _build_response(client=client, response=response)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def sync(
|
|
151
|
+
graph_id: str,
|
|
152
|
+
subgraph_id: str,
|
|
153
|
+
*,
|
|
154
|
+
client: AuthenticatedClient,
|
|
155
|
+
body: DeleteSubgraphRequest,
|
|
156
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
157
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
158
|
+
) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]:
|
|
159
|
+
"""Delete Subgraph
|
|
160
|
+
|
|
161
|
+
Delete a subgraph database.
|
|
162
|
+
|
|
163
|
+
**Requirements:**
|
|
164
|
+
- Must be a valid subgraph (not parent graph)
|
|
165
|
+
- User must have admin access to parent graph
|
|
166
|
+
- Optional backup before deletion
|
|
167
|
+
|
|
168
|
+
**Deletion Options:**
|
|
169
|
+
- `force`: Delete even if contains data
|
|
170
|
+
- `backup_first`: Create backup before deletion
|
|
171
|
+
|
|
172
|
+
**Warning:**
|
|
173
|
+
Deletion is permanent unless backup is created.
|
|
174
|
+
All data in the subgraph will be lost.
|
|
175
|
+
|
|
176
|
+
**Backup Location:**
|
|
177
|
+
If backup requested, stored in S3 at:
|
|
178
|
+
`s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup`
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
graph_id (str): Parent graph identifier
|
|
182
|
+
subgraph_id (str): Subgraph identifier to delete
|
|
183
|
+
authorization (Union[None, Unset, str]):
|
|
184
|
+
auth_token (Union[None, Unset, str]):
|
|
185
|
+
body (DeleteSubgraphRequest): Request model for deleting a subgraph.
|
|
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[Any, DeleteSubgraphResponse, HTTPValidationError]
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
return sync_detailed(
|
|
196
|
+
graph_id=graph_id,
|
|
197
|
+
subgraph_id=subgraph_id,
|
|
198
|
+
client=client,
|
|
199
|
+
body=body,
|
|
200
|
+
authorization=authorization,
|
|
201
|
+
auth_token=auth_token,
|
|
202
|
+
).parsed
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
async def asyncio_detailed(
|
|
206
|
+
graph_id: str,
|
|
207
|
+
subgraph_id: str,
|
|
208
|
+
*,
|
|
209
|
+
client: AuthenticatedClient,
|
|
210
|
+
body: DeleteSubgraphRequest,
|
|
211
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
212
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
213
|
+
) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]:
|
|
214
|
+
"""Delete Subgraph
|
|
215
|
+
|
|
216
|
+
Delete a subgraph database.
|
|
217
|
+
|
|
218
|
+
**Requirements:**
|
|
219
|
+
- Must be a valid subgraph (not parent graph)
|
|
220
|
+
- User must have admin access to parent graph
|
|
221
|
+
- Optional backup before deletion
|
|
222
|
+
|
|
223
|
+
**Deletion Options:**
|
|
224
|
+
- `force`: Delete even if contains data
|
|
225
|
+
- `backup_first`: Create backup before deletion
|
|
226
|
+
|
|
227
|
+
**Warning:**
|
|
228
|
+
Deletion is permanent unless backup is created.
|
|
229
|
+
All data in the subgraph will be lost.
|
|
230
|
+
|
|
231
|
+
**Backup Location:**
|
|
232
|
+
If backup requested, stored in S3 at:
|
|
233
|
+
`s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup`
|
|
234
|
+
|
|
235
|
+
Args:
|
|
236
|
+
graph_id (str): Parent graph identifier
|
|
237
|
+
subgraph_id (str): Subgraph identifier to delete
|
|
238
|
+
authorization (Union[None, Unset, str]):
|
|
239
|
+
auth_token (Union[None, Unset, str]):
|
|
240
|
+
body (DeleteSubgraphRequest): Request model for deleting a subgraph.
|
|
241
|
+
|
|
242
|
+
Raises:
|
|
243
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
244
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
245
|
+
|
|
246
|
+
Returns:
|
|
247
|
+
Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]
|
|
248
|
+
"""
|
|
249
|
+
|
|
250
|
+
kwargs = _get_kwargs(
|
|
251
|
+
graph_id=graph_id,
|
|
252
|
+
subgraph_id=subgraph_id,
|
|
253
|
+
body=body,
|
|
254
|
+
authorization=authorization,
|
|
255
|
+
auth_token=auth_token,
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
259
|
+
|
|
260
|
+
return _build_response(client=client, response=response)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
async def asyncio(
|
|
264
|
+
graph_id: str,
|
|
265
|
+
subgraph_id: str,
|
|
266
|
+
*,
|
|
267
|
+
client: AuthenticatedClient,
|
|
268
|
+
body: DeleteSubgraphRequest,
|
|
269
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
270
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
271
|
+
) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]:
|
|
272
|
+
"""Delete Subgraph
|
|
273
|
+
|
|
274
|
+
Delete a subgraph database.
|
|
275
|
+
|
|
276
|
+
**Requirements:**
|
|
277
|
+
- Must be a valid subgraph (not parent graph)
|
|
278
|
+
- User must have admin access to parent graph
|
|
279
|
+
- Optional backup before deletion
|
|
280
|
+
|
|
281
|
+
**Deletion Options:**
|
|
282
|
+
- `force`: Delete even if contains data
|
|
283
|
+
- `backup_first`: Create backup before deletion
|
|
284
|
+
|
|
285
|
+
**Warning:**
|
|
286
|
+
Deletion is permanent unless backup is created.
|
|
287
|
+
All data in the subgraph will be lost.
|
|
288
|
+
|
|
289
|
+
**Backup Location:**
|
|
290
|
+
If backup requested, stored in S3 at:
|
|
291
|
+
`s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup`
|
|
292
|
+
|
|
293
|
+
Args:
|
|
294
|
+
graph_id (str): Parent graph identifier
|
|
295
|
+
subgraph_id (str): Subgraph identifier to delete
|
|
296
|
+
authorization (Union[None, Unset, str]):
|
|
297
|
+
auth_token (Union[None, Unset, str]):
|
|
298
|
+
body (DeleteSubgraphRequest): Request model for deleting a subgraph.
|
|
299
|
+
|
|
300
|
+
Raises:
|
|
301
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
302
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
303
|
+
|
|
304
|
+
Returns:
|
|
305
|
+
Union[Any, DeleteSubgraphResponse, HTTPValidationError]
|
|
306
|
+
"""
|
|
307
|
+
|
|
308
|
+
return (
|
|
309
|
+
await asyncio_detailed(
|
|
310
|
+
graph_id=graph_id,
|
|
311
|
+
subgraph_id=subgraph_id,
|
|
312
|
+
client=client,
|
|
313
|
+
body=body,
|
|
314
|
+
authorization=authorization,
|
|
315
|
+
auth_token=auth_token,
|
|
316
|
+
)
|
|
317
|
+
).parsed
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.subgraph_response import SubgraphResponse
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
graph_id: str,
|
|
15
|
+
subgraph_id: str,
|
|
16
|
+
*,
|
|
17
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
18
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
if not isinstance(authorization, Unset):
|
|
22
|
+
headers["authorization"] = authorization
|
|
23
|
+
|
|
24
|
+
cookies = {}
|
|
25
|
+
if auth_token is not UNSET:
|
|
26
|
+
cookies["auth-token"] = auth_token
|
|
27
|
+
|
|
28
|
+
_kwargs: dict[str, Any] = {
|
|
29
|
+
"method": "get",
|
|
30
|
+
"url": f"/v1/{graph_id}/subgraphs/{subgraph_id}/info",
|
|
31
|
+
"cookies": cookies,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_kwargs["headers"] = headers
|
|
35
|
+
return _kwargs
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _parse_response(
|
|
39
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
40
|
+
) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
41
|
+
if response.status_code == 200:
|
|
42
|
+
response_200 = SubgraphResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_200
|
|
45
|
+
if response.status_code == 401:
|
|
46
|
+
response_401 = cast(Any, None)
|
|
47
|
+
return response_401
|
|
48
|
+
if response.status_code == 403:
|
|
49
|
+
response_403 = cast(Any, None)
|
|
50
|
+
return response_403
|
|
51
|
+
if response.status_code == 404:
|
|
52
|
+
response_404 = cast(Any, None)
|
|
53
|
+
return response_404
|
|
54
|
+
if response.status_code == 400:
|
|
55
|
+
response_400 = cast(Any, None)
|
|
56
|
+
return response_400
|
|
57
|
+
if response.status_code == 500:
|
|
58
|
+
response_500 = cast(Any, None)
|
|
59
|
+
return response_500
|
|
60
|
+
if response.status_code == 422:
|
|
61
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
62
|
+
|
|
63
|
+
return response_422
|
|
64
|
+
if client.raise_on_unexpected_status:
|
|
65
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
66
|
+
else:
|
|
67
|
+
return None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _build_response(
|
|
71
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
72
|
+
) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
73
|
+
return Response(
|
|
74
|
+
status_code=HTTPStatus(response.status_code),
|
|
75
|
+
content=response.content,
|
|
76
|
+
headers=response.headers,
|
|
77
|
+
parsed=_parse_response(client=client, response=response),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def sync_detailed(
|
|
82
|
+
graph_id: str,
|
|
83
|
+
subgraph_id: str,
|
|
84
|
+
*,
|
|
85
|
+
client: AuthenticatedClient,
|
|
86
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
87
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
88
|
+
) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
89
|
+
"""Get Subgraph Details
|
|
90
|
+
|
|
91
|
+
Get detailed information about a specific subgraph.
|
|
92
|
+
|
|
93
|
+
**Requirements:**
|
|
94
|
+
- User must have read access to parent graph
|
|
95
|
+
|
|
96
|
+
**Response includes:**
|
|
97
|
+
- Full subgraph metadata
|
|
98
|
+
- Database statistics (nodes, edges)
|
|
99
|
+
- Size information
|
|
100
|
+
- Schema configuration
|
|
101
|
+
- Creation/modification timestamps
|
|
102
|
+
- Last access time (when available)
|
|
103
|
+
|
|
104
|
+
**Statistics:**
|
|
105
|
+
Real-time statistics queried from Kuzu:
|
|
106
|
+
- Node count
|
|
107
|
+
- Edge count
|
|
108
|
+
- Database size on disk
|
|
109
|
+
- Schema information
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
graph_id (str): Parent graph identifier
|
|
113
|
+
subgraph_id (str): Subgraph identifier
|
|
114
|
+
authorization (Union[None, Unset, str]):
|
|
115
|
+
auth_token (Union[None, Unset, str]):
|
|
116
|
+
|
|
117
|
+
Raises:
|
|
118
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
119
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Response[Union[Any, HTTPValidationError, SubgraphResponse]]
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
kwargs = _get_kwargs(
|
|
126
|
+
graph_id=graph_id,
|
|
127
|
+
subgraph_id=subgraph_id,
|
|
128
|
+
authorization=authorization,
|
|
129
|
+
auth_token=auth_token,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
response = client.get_httpx_client().request(
|
|
133
|
+
**kwargs,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
return _build_response(client=client, response=response)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def sync(
|
|
140
|
+
graph_id: str,
|
|
141
|
+
subgraph_id: str,
|
|
142
|
+
*,
|
|
143
|
+
client: AuthenticatedClient,
|
|
144
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
145
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
146
|
+
) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
147
|
+
"""Get Subgraph Details
|
|
148
|
+
|
|
149
|
+
Get detailed information about a specific subgraph.
|
|
150
|
+
|
|
151
|
+
**Requirements:**
|
|
152
|
+
- User must have read access to parent graph
|
|
153
|
+
|
|
154
|
+
**Response includes:**
|
|
155
|
+
- Full subgraph metadata
|
|
156
|
+
- Database statistics (nodes, edges)
|
|
157
|
+
- Size information
|
|
158
|
+
- Schema configuration
|
|
159
|
+
- Creation/modification timestamps
|
|
160
|
+
- Last access time (when available)
|
|
161
|
+
|
|
162
|
+
**Statistics:**
|
|
163
|
+
Real-time statistics queried from Kuzu:
|
|
164
|
+
- Node count
|
|
165
|
+
- Edge count
|
|
166
|
+
- Database size on disk
|
|
167
|
+
- Schema information
|
|
168
|
+
|
|
169
|
+
Args:
|
|
170
|
+
graph_id (str): Parent graph identifier
|
|
171
|
+
subgraph_id (str): Subgraph identifier
|
|
172
|
+
authorization (Union[None, Unset, str]):
|
|
173
|
+
auth_token (Union[None, Unset, str]):
|
|
174
|
+
|
|
175
|
+
Raises:
|
|
176
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
177
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
178
|
+
|
|
179
|
+
Returns:
|
|
180
|
+
Union[Any, HTTPValidationError, SubgraphResponse]
|
|
181
|
+
"""
|
|
182
|
+
|
|
183
|
+
return sync_detailed(
|
|
184
|
+
graph_id=graph_id,
|
|
185
|
+
subgraph_id=subgraph_id,
|
|
186
|
+
client=client,
|
|
187
|
+
authorization=authorization,
|
|
188
|
+
auth_token=auth_token,
|
|
189
|
+
).parsed
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
async def asyncio_detailed(
|
|
193
|
+
graph_id: str,
|
|
194
|
+
subgraph_id: str,
|
|
195
|
+
*,
|
|
196
|
+
client: AuthenticatedClient,
|
|
197
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
198
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
199
|
+
) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
200
|
+
"""Get Subgraph Details
|
|
201
|
+
|
|
202
|
+
Get detailed information about a specific subgraph.
|
|
203
|
+
|
|
204
|
+
**Requirements:**
|
|
205
|
+
- User must have read access to parent graph
|
|
206
|
+
|
|
207
|
+
**Response includes:**
|
|
208
|
+
- Full subgraph metadata
|
|
209
|
+
- Database statistics (nodes, edges)
|
|
210
|
+
- Size information
|
|
211
|
+
- Schema configuration
|
|
212
|
+
- Creation/modification timestamps
|
|
213
|
+
- Last access time (when available)
|
|
214
|
+
|
|
215
|
+
**Statistics:**
|
|
216
|
+
Real-time statistics queried from Kuzu:
|
|
217
|
+
- Node count
|
|
218
|
+
- Edge count
|
|
219
|
+
- Database size on disk
|
|
220
|
+
- Schema information
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
graph_id (str): Parent graph identifier
|
|
224
|
+
subgraph_id (str): Subgraph identifier
|
|
225
|
+
authorization (Union[None, Unset, str]):
|
|
226
|
+
auth_token (Union[None, Unset, str]):
|
|
227
|
+
|
|
228
|
+
Raises:
|
|
229
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
230
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
231
|
+
|
|
232
|
+
Returns:
|
|
233
|
+
Response[Union[Any, HTTPValidationError, SubgraphResponse]]
|
|
234
|
+
"""
|
|
235
|
+
|
|
236
|
+
kwargs = _get_kwargs(
|
|
237
|
+
graph_id=graph_id,
|
|
238
|
+
subgraph_id=subgraph_id,
|
|
239
|
+
authorization=authorization,
|
|
240
|
+
auth_token=auth_token,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
244
|
+
|
|
245
|
+
return _build_response(client=client, response=response)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
async def asyncio(
|
|
249
|
+
graph_id: str,
|
|
250
|
+
subgraph_id: str,
|
|
251
|
+
*,
|
|
252
|
+
client: AuthenticatedClient,
|
|
253
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
254
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
255
|
+
) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
256
|
+
"""Get Subgraph Details
|
|
257
|
+
|
|
258
|
+
Get detailed information about a specific subgraph.
|
|
259
|
+
|
|
260
|
+
**Requirements:**
|
|
261
|
+
- User must have read access to parent graph
|
|
262
|
+
|
|
263
|
+
**Response includes:**
|
|
264
|
+
- Full subgraph metadata
|
|
265
|
+
- Database statistics (nodes, edges)
|
|
266
|
+
- Size information
|
|
267
|
+
- Schema configuration
|
|
268
|
+
- Creation/modification timestamps
|
|
269
|
+
- Last access time (when available)
|
|
270
|
+
|
|
271
|
+
**Statistics:**
|
|
272
|
+
Real-time statistics queried from Kuzu:
|
|
273
|
+
- Node count
|
|
274
|
+
- Edge count
|
|
275
|
+
- Database size on disk
|
|
276
|
+
- Schema information
|
|
277
|
+
|
|
278
|
+
Args:
|
|
279
|
+
graph_id (str): Parent graph identifier
|
|
280
|
+
subgraph_id (str): Subgraph identifier
|
|
281
|
+
authorization (Union[None, Unset, str]):
|
|
282
|
+
auth_token (Union[None, Unset, str]):
|
|
283
|
+
|
|
284
|
+
Raises:
|
|
285
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
286
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
287
|
+
|
|
288
|
+
Returns:
|
|
289
|
+
Union[Any, HTTPValidationError, SubgraphResponse]
|
|
290
|
+
"""
|
|
291
|
+
|
|
292
|
+
return (
|
|
293
|
+
await asyncio_detailed(
|
|
294
|
+
graph_id=graph_id,
|
|
295
|
+
subgraph_id=subgraph_id,
|
|
296
|
+
client=client,
|
|
297
|
+
authorization=authorization,
|
|
298
|
+
auth_token=auth_token,
|
|
299
|
+
)
|
|
300
|
+
).parsed
|