robosystems-client 0.1.18__py3-none-any.whl → 0.2.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.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +10 -4
- robosystems_client/api/agent/batch_process_queries.py +9 -4
- robosystems_client/api/agent/execute_specific_agent.py +11 -4
- robosystems_client/api/agent/get_agent_metadata.py +4 -1
- robosystems_client/api/agent/list_agents.py +4 -1
- robosystems_client/api/agent/recommend_agent.py +4 -1
- robosystems_client/api/auth/check_password_strength.py +2 -0
- robosystems_client/api/auth/complete_sso_auth.py +3 -0
- robosystems_client/api/auth/forgot_password.py +6 -3
- robosystems_client/api/auth/generate_sso_token.py +3 -0
- robosystems_client/api/auth/get_captcha_config.py +1 -0
- robosystems_client/api/auth/get_current_auth_user.py +3 -0
- robosystems_client/api/auth/get_password_policy.py +1 -0
- robosystems_client/api/auth/login_user.py +7 -3
- robosystems_client/api/auth/logout_user.py +2 -0
- robosystems_client/api/auth/refresh_auth_session.py +3 -0
- robosystems_client/api/auth/register_user.py +11 -6
- robosystems_client/api/auth/resend_verification_email.py +8 -3
- robosystems_client/api/auth/reset_password.py +3 -0
- robosystems_client/api/auth/sso_token_exchange.py +7 -3
- robosystems_client/api/auth/validate_reset_token.py +2 -0
- robosystems_client/api/auth/verify_email.py +3 -0
- robosystems_client/api/backup/create_backup.py +14 -8
- robosystems_client/api/backup/get_backup_download_url.py +9 -4
- robosystems_client/api/backup/get_backup_stats.py +3 -1
- robosystems_client/api/backup/list_backups.py +7 -5
- robosystems_client/api/backup/restore_backup.py +27 -8
- robosystems_client/api/connections/create_connection.py +14 -8
- robosystems_client/api/connections/create_link_token.py +9 -4
- robosystems_client/api/connections/delete_connection.py +13 -8
- robosystems_client/api/connections/exchange_link_token.py +9 -4
- robosystems_client/api/connections/get_connection.py +9 -4
- robosystems_client/api/connections/get_connection_options.py +8 -4
- robosystems_client/api/connections/init_o_auth.py +3 -1
- robosystems_client/api/connections/list_connections.py +8 -4
- robosystems_client/api/connections/oauth_callback.py +10 -4
- robosystems_client/api/connections/sync_connection.py +13 -8
- robosystems_client/api/graph_analytics/get_graph_metrics.py +13 -8
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +12 -8
- robosystems_client/api/graph_billing/get_current_graph_bill.py +9 -4
- robosystems_client/api/graph_billing/get_graph_billing_history.py +9 -4
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +10 -4
- robosystems_client/api/graph_billing/get_graph_usage_details.py +10 -4
- robosystems_client/api/graph_credits/check_credit_balance.py +9 -4
- robosystems_client/api/graph_credits/check_storage_limits.py +9 -4
- robosystems_client/api/graph_credits/get_credit_summary.py +9 -4
- robosystems_client/api/graph_credits/get_storage_usage.py +8 -4
- robosystems_client/api/graph_credits/list_credit_transactions.py +9 -4
- robosystems_client/api/graph_health/get_database_health.py +9 -4
- robosystems_client/api/graph_info/get_database_info.py +9 -4
- robosystems_client/api/graph_limits/get_graph_limits.py +9 -4
- robosystems_client/api/{create → graphs}/create_graph.py +7 -5
- robosystems_client/api/{create → graphs}/get_available_extensions.py +2 -1
- robosystems_client/api/{user/get_user_graphs.py → graphs/get_graphs.py} +3 -1
- robosystems_client/api/{user/select_user_graph.py → graphs/select_graph.py} +13 -8
- robosystems_client/api/mcp/call_mcp_tool.py +18 -8
- robosystems_client/api/mcp/list_mcp_tools.py +12 -8
- robosystems_client/api/operations/cancel_operation.py +9 -3
- robosystems_client/api/operations/get_operation_status.py +8 -3
- robosystems_client/api/operations/stream_operation_events.py +8 -3
- robosystems_client/api/query/execute_cypher_query.py +49 -16
- robosystems_client/api/schema/export_graph_schema.py +3 -1
- robosystems_client/api/schema/{get_graph_schema_info.py → get_graph_schema.py} +37 -47
- robosystems_client/api/schema/validate_schema.py +10 -5
- robosystems_client/api/service_offerings/get_service_offerings.py +2 -0
- robosystems_client/api/status/get_service_status.py +1 -0
- robosystems_client/api/subgraphs/create_subgraph.py +3 -1
- robosystems_client/api/subgraphs/delete_subgraph.py +15 -7
- robosystems_client/api/subgraphs/get_subgraph_info.py +14 -7
- robosystems_client/api/subgraphs/get_subgraph_quota.py +10 -4
- robosystems_client/api/subgraphs/list_subgraphs.py +3 -1
- robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +287 -0
- robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +283 -0
- robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +260 -0
- robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +251 -0
- robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +283 -0
- robosystems_client/api/{backup/export_backup.py → tables/list_tables_v1_graphs_graph_id_tables_get.py} +36 -36
- robosystems_client/api/{schema/list_schema_extensions.py → tables/query_tables_v1_graphs_graph_id_tables_query_post.py} +67 -43
- robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +306 -0
- robosystems_client/api/user/create_user_api_key.py +2 -0
- robosystems_client/api/user/get_all_credit_summaries.py +6 -3
- robosystems_client/api/user/get_current_user.py +2 -0
- robosystems_client/api/user/list_user_api_keys.py +2 -0
- robosystems_client/api/user/revoke_user_api_key.py +7 -3
- robosystems_client/api/user/update_user.py +2 -0
- robosystems_client/api/user/update_user_api_key.py +2 -0
- robosystems_client/api/user/update_user_password.py +8 -3
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +2 -0
- robosystems_client/api/user_analytics/get_user_usage_overview.py +2 -0
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +2 -0
- robosystems_client/api/user_limits/get_shared_repository_limits.py +6 -4
- robosystems_client/api/user_limits/get_user_limits.py +3 -0
- robosystems_client/api/user_limits/get_user_usage.py +2 -0
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +11 -6
- robosystems_client/api/user_subscriptions/get_repository_credits.py +7 -3
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +7 -3
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +7 -3
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +8 -3
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +12 -6
- robosystems_client/extensions/README.md +1 -212
- robosystems_client/extensions/__init__.py +12 -28
- robosystems_client/extensions/extensions.py +3 -17
- robosystems_client/extensions/operation_client.py +12 -4
- robosystems_client/extensions/query_client.py +38 -24
- robosystems_client/extensions/sse_client.py +11 -0
- robosystems_client/extensions/table_ingest_client.py +466 -0
- robosystems_client/models/__init__.py +39 -31
- robosystems_client/models/api_key_info.py +20 -0
- robosystems_client/models/backup_restore_request.py +1 -12
- robosystems_client/models/bulk_ingest_request.py +50 -0
- robosystems_client/models/bulk_ingest_response.py +137 -0
- robosystems_client/models/create_api_key_request.py +20 -0
- robosystems_client/models/create_graph_request.py +4 -3
- robosystems_client/models/{sso_login_request.py → delete_file_v1_graphs_graph_id_tables_files_file_id_delete_response_delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py} +9 -22
- robosystems_client/models/file_update_request.py +62 -0
- robosystems_client/models/file_upload_request.py +51 -0
- robosystems_client/models/file_upload_response.py +83 -0
- robosystems_client/models/{get_graph_schema_info_response_getgraphschemainfo.py → get_file_info_v1_graphs_graph_id_tables_files_file_id_get_response_get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py} +8 -5
- robosystems_client/models/{copy_response_error_details_type_0.py → get_graph_schema_response_getgraphschema.py} +5 -5
- robosystems_client/models/list_table_files_v1_graphs_graph_id_tables_table_name_files_get_response_list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +47 -0
- robosystems_client/models/table_info.py +107 -0
- robosystems_client/models/table_ingest_result.py +107 -0
- robosystems_client/models/table_list_response.py +81 -0
- robosystems_client/models/table_query_request.py +40 -0
- robosystems_client/models/table_query_response.py +92 -0
- robosystems_client/models/{list_schema_extensions_response_listschemaextensions.py → update_file_v1_graphs_graph_id_tables_files_file_id_patch_response_update_file_v1_graphs_graph_id_tables_files_file_id_patch.py} +8 -5
- {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/METADATA +15 -3
- {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/RECORD +132 -127
- robosystems_client/api/auth/sso_login.py +0 -177
- robosystems_client/api/copy/copy_data_to_graph.py +0 -486
- robosystems_client/extensions/copy_client.py +0 -479
- robosystems_client/models/copy_response.py +0 -275
- robosystems_client/models/copy_response_status.py +0 -11
- robosystems_client/models/data_frame_copy_request.py +0 -125
- robosystems_client/models/data_frame_copy_request_format.py +0 -10
- robosystems_client/models/s3_copy_request.py +0 -378
- robosystems_client/models/s3_copy_request_file_format.py +0 -12
- robosystems_client/models/s3_copy_request_s3_url_style_type_0.py +0 -9
- robosystems_client/models/url_copy_request.py +0 -157
- robosystems_client/models/url_copy_request_file_format.py +0 -10
- robosystems_client/models/url_copy_request_headers_type_0.py +0 -44
- /robosystems_client/api/{copy → graphs}/__init__.py +0 -0
- /robosystems_client/api/{create → tables}/__init__.py +0 -0
- {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/WHEEL +0 -0
- {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Optional, Union
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error_response import ErrorResponse
|
|
8
9
|
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
-
from ...models.
|
|
10
|
-
|
|
11
|
-
)
|
|
10
|
+
from ...models.table_query_request import TableQueryRequest
|
|
11
|
+
from ...models.table_query_response import TableQueryResponse
|
|
12
12
|
from ...types import UNSET, Response, Unset
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def _get_kwargs(
|
|
16
16
|
graph_id: str,
|
|
17
17
|
*,
|
|
18
|
+
body: TableQueryRequest,
|
|
18
19
|
token: Union[None, Unset, str] = UNSET,
|
|
19
20
|
authorization: Union[None, Unset, str] = UNSET,
|
|
20
21
|
) -> dict[str, Any]:
|
|
@@ -34,30 +35,51 @@ def _get_kwargs(
|
|
|
34
35
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
35
36
|
|
|
36
37
|
_kwargs: dict[str, Any] = {
|
|
37
|
-
"method": "
|
|
38
|
-
"url": f"/v1/{graph_id}/
|
|
38
|
+
"method": "post",
|
|
39
|
+
"url": f"/v1/graphs/{graph_id}/tables/query",
|
|
39
40
|
"params": params,
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
_kwargs["json"] = body.to_dict()
|
|
44
|
+
|
|
45
|
+
headers["Content-Type"] = "application/json"
|
|
46
|
+
|
|
42
47
|
_kwargs["headers"] = headers
|
|
43
48
|
return _kwargs
|
|
44
49
|
|
|
45
50
|
|
|
46
51
|
def _parse_response(
|
|
47
52
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
48
|
-
) -> Optional[
|
|
49
|
-
Union[HTTPValidationError, ListSchemaExtensionsResponseListschemaextensions]
|
|
50
|
-
]:
|
|
53
|
+
) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
|
|
51
54
|
if response.status_code == 200:
|
|
52
|
-
response_200 =
|
|
53
|
-
response.json()
|
|
54
|
-
)
|
|
55
|
+
response_200 = TableQueryResponse.from_dict(response.json())
|
|
55
56
|
|
|
56
57
|
return response_200
|
|
58
|
+
|
|
59
|
+
if response.status_code == 400:
|
|
60
|
+
response_400 = ErrorResponse.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
return response_400
|
|
63
|
+
|
|
64
|
+
if response.status_code == 401:
|
|
65
|
+
response_401 = cast(Any, None)
|
|
66
|
+
return response_401
|
|
67
|
+
|
|
68
|
+
if response.status_code == 403:
|
|
69
|
+
response_403 = ErrorResponse.from_dict(response.json())
|
|
70
|
+
|
|
71
|
+
return response_403
|
|
72
|
+
|
|
73
|
+
if response.status_code == 404:
|
|
74
|
+
response_404 = ErrorResponse.from_dict(response.json())
|
|
75
|
+
|
|
76
|
+
return response_404
|
|
77
|
+
|
|
57
78
|
if response.status_code == 422:
|
|
58
79
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
59
80
|
|
|
60
81
|
return response_422
|
|
82
|
+
|
|
61
83
|
if client.raise_on_unexpected_status:
|
|
62
84
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
63
85
|
else:
|
|
@@ -66,9 +88,7 @@ def _parse_response(
|
|
|
66
88
|
|
|
67
89
|
def _build_response(
|
|
68
90
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
69
|
-
) -> Response[
|
|
70
|
-
Union[HTTPValidationError, ListSchemaExtensionsResponseListschemaextensions]
|
|
71
|
-
]:
|
|
91
|
+
) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
|
|
72
92
|
return Response(
|
|
73
93
|
status_code=HTTPStatus(response.status_code),
|
|
74
94
|
content=response.content,
|
|
@@ -81,30 +101,31 @@ def sync_detailed(
|
|
|
81
101
|
graph_id: str,
|
|
82
102
|
*,
|
|
83
103
|
client: AuthenticatedClient,
|
|
104
|
+
body: TableQueryRequest,
|
|
84
105
|
token: Union[None, Unset, str] = UNSET,
|
|
85
106
|
authorization: Union[None, Unset, str] = UNSET,
|
|
86
|
-
) -> Response[
|
|
87
|
-
|
|
88
|
-
]:
|
|
89
|
-
"""List Available Schema Extensions
|
|
107
|
+
) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
|
|
108
|
+
"""Query Staging Tables with SQL
|
|
90
109
|
|
|
91
|
-
|
|
110
|
+
Execute SQL queries on DuckDB staging tables
|
|
92
111
|
|
|
93
112
|
Args:
|
|
94
|
-
graph_id (str):
|
|
113
|
+
graph_id (str): Graph database identifier
|
|
95
114
|
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
96
115
|
authorization (Union[None, Unset, str]):
|
|
116
|
+
body (TableQueryRequest):
|
|
97
117
|
|
|
98
118
|
Raises:
|
|
99
119
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
120
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
121
|
|
|
102
122
|
Returns:
|
|
103
|
-
Response[Union[HTTPValidationError,
|
|
123
|
+
Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]
|
|
104
124
|
"""
|
|
105
125
|
|
|
106
126
|
kwargs = _get_kwargs(
|
|
107
127
|
graph_id=graph_id,
|
|
128
|
+
body=body,
|
|
108
129
|
token=token,
|
|
109
130
|
authorization=authorization,
|
|
110
131
|
)
|
|
@@ -120,31 +141,32 @@ def sync(
|
|
|
120
141
|
graph_id: str,
|
|
121
142
|
*,
|
|
122
143
|
client: AuthenticatedClient,
|
|
144
|
+
body: TableQueryRequest,
|
|
123
145
|
token: Union[None, Unset, str] = UNSET,
|
|
124
146
|
authorization: Union[None, Unset, str] = UNSET,
|
|
125
|
-
) -> Optional[
|
|
126
|
-
|
|
127
|
-
]:
|
|
128
|
-
"""List Available Schema Extensions
|
|
147
|
+
) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
|
|
148
|
+
"""Query Staging Tables with SQL
|
|
129
149
|
|
|
130
|
-
|
|
150
|
+
Execute SQL queries on DuckDB staging tables
|
|
131
151
|
|
|
132
152
|
Args:
|
|
133
|
-
graph_id (str):
|
|
153
|
+
graph_id (str): Graph database identifier
|
|
134
154
|
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
135
155
|
authorization (Union[None, Unset, str]):
|
|
156
|
+
body (TableQueryRequest):
|
|
136
157
|
|
|
137
158
|
Raises:
|
|
138
159
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
139
160
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
140
161
|
|
|
141
162
|
Returns:
|
|
142
|
-
Union[HTTPValidationError,
|
|
163
|
+
Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]
|
|
143
164
|
"""
|
|
144
165
|
|
|
145
166
|
return sync_detailed(
|
|
146
167
|
graph_id=graph_id,
|
|
147
168
|
client=client,
|
|
169
|
+
body=body,
|
|
148
170
|
token=token,
|
|
149
171
|
authorization=authorization,
|
|
150
172
|
).parsed
|
|
@@ -154,30 +176,31 @@ async def asyncio_detailed(
|
|
|
154
176
|
graph_id: str,
|
|
155
177
|
*,
|
|
156
178
|
client: AuthenticatedClient,
|
|
179
|
+
body: TableQueryRequest,
|
|
157
180
|
token: Union[None, Unset, str] = UNSET,
|
|
158
181
|
authorization: Union[None, Unset, str] = UNSET,
|
|
159
|
-
) -> Response[
|
|
160
|
-
|
|
161
|
-
]:
|
|
162
|
-
"""List Available Schema Extensions
|
|
182
|
+
) -> Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
|
|
183
|
+
"""Query Staging Tables with SQL
|
|
163
184
|
|
|
164
|
-
|
|
185
|
+
Execute SQL queries on DuckDB staging tables
|
|
165
186
|
|
|
166
187
|
Args:
|
|
167
|
-
graph_id (str):
|
|
188
|
+
graph_id (str): Graph database identifier
|
|
168
189
|
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
169
190
|
authorization (Union[None, Unset, str]):
|
|
191
|
+
body (TableQueryRequest):
|
|
170
192
|
|
|
171
193
|
Raises:
|
|
172
194
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
173
195
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
174
196
|
|
|
175
197
|
Returns:
|
|
176
|
-
Response[Union[HTTPValidationError,
|
|
198
|
+
Response[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]
|
|
177
199
|
"""
|
|
178
200
|
|
|
179
201
|
kwargs = _get_kwargs(
|
|
180
202
|
graph_id=graph_id,
|
|
203
|
+
body=body,
|
|
181
204
|
token=token,
|
|
182
205
|
authorization=authorization,
|
|
183
206
|
)
|
|
@@ -191,32 +214,33 @@ async def asyncio(
|
|
|
191
214
|
graph_id: str,
|
|
192
215
|
*,
|
|
193
216
|
client: AuthenticatedClient,
|
|
217
|
+
body: TableQueryRequest,
|
|
194
218
|
token: Union[None, Unset, str] = UNSET,
|
|
195
219
|
authorization: Union[None, Unset, str] = UNSET,
|
|
196
|
-
) -> Optional[
|
|
197
|
-
|
|
198
|
-
]:
|
|
199
|
-
"""List Available Schema Extensions
|
|
220
|
+
) -> Optional[Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]]:
|
|
221
|
+
"""Query Staging Tables with SQL
|
|
200
222
|
|
|
201
|
-
|
|
223
|
+
Execute SQL queries on DuckDB staging tables
|
|
202
224
|
|
|
203
225
|
Args:
|
|
204
|
-
graph_id (str):
|
|
226
|
+
graph_id (str): Graph database identifier
|
|
205
227
|
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
206
228
|
authorization (Union[None, Unset, str]):
|
|
229
|
+
body (TableQueryRequest):
|
|
207
230
|
|
|
208
231
|
Raises:
|
|
209
232
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
210
233
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
211
234
|
|
|
212
235
|
Returns:
|
|
213
|
-
Union[HTTPValidationError,
|
|
236
|
+
Union[Any, ErrorResponse, HTTPValidationError, TableQueryResponse]
|
|
214
237
|
"""
|
|
215
238
|
|
|
216
239
|
return (
|
|
217
240
|
await asyncio_detailed(
|
|
218
241
|
graph_id=graph_id,
|
|
219
242
|
client=client,
|
|
243
|
+
body=body,
|
|
220
244
|
token=token,
|
|
221
245
|
authorization=authorization,
|
|
222
246
|
)
|
|
@@ -0,0 +1,306 @@
|
|
|
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.error_response import ErrorResponse
|
|
9
|
+
from ...models.file_update_request import FileUpdateRequest
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.update_file_v1_graphs_graph_id_tables_files_file_id_patch_response_update_file_v1_graphs_graph_id_tables_files_file_id_patch import (
|
|
12
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
13
|
+
)
|
|
14
|
+
from ...types import UNSET, Response, Unset
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _get_kwargs(
|
|
18
|
+
graph_id: str,
|
|
19
|
+
file_id: str,
|
|
20
|
+
*,
|
|
21
|
+
body: FileUpdateRequest,
|
|
22
|
+
token: Union[None, Unset, str] = UNSET,
|
|
23
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
24
|
+
) -> dict[str, Any]:
|
|
25
|
+
headers: dict[str, Any] = {}
|
|
26
|
+
if not isinstance(authorization, Unset):
|
|
27
|
+
headers["authorization"] = authorization
|
|
28
|
+
|
|
29
|
+
params: dict[str, Any] = {}
|
|
30
|
+
|
|
31
|
+
json_token: Union[None, Unset, str]
|
|
32
|
+
if isinstance(token, Unset):
|
|
33
|
+
json_token = UNSET
|
|
34
|
+
else:
|
|
35
|
+
json_token = token
|
|
36
|
+
params["token"] = json_token
|
|
37
|
+
|
|
38
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
39
|
+
|
|
40
|
+
_kwargs: dict[str, Any] = {
|
|
41
|
+
"method": "patch",
|
|
42
|
+
"url": f"/v1/graphs/{graph_id}/tables/files/{file_id}",
|
|
43
|
+
"params": params,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_kwargs["json"] = body.to_dict()
|
|
47
|
+
|
|
48
|
+
headers["Content-Type"] = "application/json"
|
|
49
|
+
|
|
50
|
+
_kwargs["headers"] = headers
|
|
51
|
+
return _kwargs
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _parse_response(
|
|
55
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
56
|
+
) -> Optional[
|
|
57
|
+
Union[
|
|
58
|
+
Any,
|
|
59
|
+
ErrorResponse,
|
|
60
|
+
HTTPValidationError,
|
|
61
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
62
|
+
]
|
|
63
|
+
]:
|
|
64
|
+
if response.status_code == 200:
|
|
65
|
+
response_200 = UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch.from_dict(
|
|
66
|
+
response.json()
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return response_200
|
|
70
|
+
|
|
71
|
+
if response.status_code == 400:
|
|
72
|
+
response_400 = ErrorResponse.from_dict(response.json())
|
|
73
|
+
|
|
74
|
+
return response_400
|
|
75
|
+
|
|
76
|
+
if response.status_code == 401:
|
|
77
|
+
response_401 = cast(Any, None)
|
|
78
|
+
return response_401
|
|
79
|
+
|
|
80
|
+
if response.status_code == 403:
|
|
81
|
+
response_403 = ErrorResponse.from_dict(response.json())
|
|
82
|
+
|
|
83
|
+
return response_403
|
|
84
|
+
|
|
85
|
+
if response.status_code == 404:
|
|
86
|
+
response_404 = ErrorResponse.from_dict(response.json())
|
|
87
|
+
|
|
88
|
+
return response_404
|
|
89
|
+
|
|
90
|
+
if response.status_code == 422:
|
|
91
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
92
|
+
|
|
93
|
+
return response_422
|
|
94
|
+
|
|
95
|
+
if client.raise_on_unexpected_status:
|
|
96
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
97
|
+
else:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _build_response(
|
|
102
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
103
|
+
) -> Response[
|
|
104
|
+
Union[
|
|
105
|
+
Any,
|
|
106
|
+
ErrorResponse,
|
|
107
|
+
HTTPValidationError,
|
|
108
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
109
|
+
]
|
|
110
|
+
]:
|
|
111
|
+
return Response(
|
|
112
|
+
status_code=HTTPStatus(response.status_code),
|
|
113
|
+
content=response.content,
|
|
114
|
+
headers=response.headers,
|
|
115
|
+
parsed=_parse_response(client=client, response=response),
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def sync_detailed(
|
|
120
|
+
graph_id: str,
|
|
121
|
+
file_id: str,
|
|
122
|
+
*,
|
|
123
|
+
client: AuthenticatedClient,
|
|
124
|
+
body: FileUpdateRequest,
|
|
125
|
+
token: Union[None, Unset, str] = UNSET,
|
|
126
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
127
|
+
) -> Response[
|
|
128
|
+
Union[
|
|
129
|
+
Any,
|
|
130
|
+
ErrorResponse,
|
|
131
|
+
HTTPValidationError,
|
|
132
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
133
|
+
]
|
|
134
|
+
]:
|
|
135
|
+
"""Update File
|
|
136
|
+
|
|
137
|
+
Update file metadata after upload (size, row count). Marks file as completed.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
graph_id (str): Graph database identifier
|
|
141
|
+
file_id (str): File identifier
|
|
142
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
143
|
+
authorization (Union[None, Unset, str]):
|
|
144
|
+
body (FileUpdateRequest):
|
|
145
|
+
|
|
146
|
+
Raises:
|
|
147
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
148
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch]]
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
kwargs = _get_kwargs(
|
|
155
|
+
graph_id=graph_id,
|
|
156
|
+
file_id=file_id,
|
|
157
|
+
body=body,
|
|
158
|
+
token=token,
|
|
159
|
+
authorization=authorization,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
response = client.get_httpx_client().request(
|
|
163
|
+
**kwargs,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
return _build_response(client=client, response=response)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def sync(
|
|
170
|
+
graph_id: str,
|
|
171
|
+
file_id: str,
|
|
172
|
+
*,
|
|
173
|
+
client: AuthenticatedClient,
|
|
174
|
+
body: FileUpdateRequest,
|
|
175
|
+
token: Union[None, Unset, str] = UNSET,
|
|
176
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
177
|
+
) -> Optional[
|
|
178
|
+
Union[
|
|
179
|
+
Any,
|
|
180
|
+
ErrorResponse,
|
|
181
|
+
HTTPValidationError,
|
|
182
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
183
|
+
]
|
|
184
|
+
]:
|
|
185
|
+
"""Update File
|
|
186
|
+
|
|
187
|
+
Update file metadata after upload (size, row count). Marks file as completed.
|
|
188
|
+
|
|
189
|
+
Args:
|
|
190
|
+
graph_id (str): Graph database identifier
|
|
191
|
+
file_id (str): File identifier
|
|
192
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
193
|
+
authorization (Union[None, Unset, str]):
|
|
194
|
+
body (FileUpdateRequest):
|
|
195
|
+
|
|
196
|
+
Raises:
|
|
197
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
198
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
Union[Any, ErrorResponse, HTTPValidationError, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch]
|
|
202
|
+
"""
|
|
203
|
+
|
|
204
|
+
return sync_detailed(
|
|
205
|
+
graph_id=graph_id,
|
|
206
|
+
file_id=file_id,
|
|
207
|
+
client=client,
|
|
208
|
+
body=body,
|
|
209
|
+
token=token,
|
|
210
|
+
authorization=authorization,
|
|
211
|
+
).parsed
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
async def asyncio_detailed(
|
|
215
|
+
graph_id: str,
|
|
216
|
+
file_id: str,
|
|
217
|
+
*,
|
|
218
|
+
client: AuthenticatedClient,
|
|
219
|
+
body: FileUpdateRequest,
|
|
220
|
+
token: Union[None, Unset, str] = UNSET,
|
|
221
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
222
|
+
) -> Response[
|
|
223
|
+
Union[
|
|
224
|
+
Any,
|
|
225
|
+
ErrorResponse,
|
|
226
|
+
HTTPValidationError,
|
|
227
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
228
|
+
]
|
|
229
|
+
]:
|
|
230
|
+
"""Update File
|
|
231
|
+
|
|
232
|
+
Update file metadata after upload (size, row count). Marks file as completed.
|
|
233
|
+
|
|
234
|
+
Args:
|
|
235
|
+
graph_id (str): Graph database identifier
|
|
236
|
+
file_id (str): File identifier
|
|
237
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
238
|
+
authorization (Union[None, Unset, str]):
|
|
239
|
+
body (FileUpdateRequest):
|
|
240
|
+
|
|
241
|
+
Raises:
|
|
242
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
243
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
244
|
+
|
|
245
|
+
Returns:
|
|
246
|
+
Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch]]
|
|
247
|
+
"""
|
|
248
|
+
|
|
249
|
+
kwargs = _get_kwargs(
|
|
250
|
+
graph_id=graph_id,
|
|
251
|
+
file_id=file_id,
|
|
252
|
+
body=body,
|
|
253
|
+
token=token,
|
|
254
|
+
authorization=authorization,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
258
|
+
|
|
259
|
+
return _build_response(client=client, response=response)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
async def asyncio(
|
|
263
|
+
graph_id: str,
|
|
264
|
+
file_id: str,
|
|
265
|
+
*,
|
|
266
|
+
client: AuthenticatedClient,
|
|
267
|
+
body: FileUpdateRequest,
|
|
268
|
+
token: Union[None, Unset, str] = UNSET,
|
|
269
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
270
|
+
) -> Optional[
|
|
271
|
+
Union[
|
|
272
|
+
Any,
|
|
273
|
+
ErrorResponse,
|
|
274
|
+
HTTPValidationError,
|
|
275
|
+
UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch,
|
|
276
|
+
]
|
|
277
|
+
]:
|
|
278
|
+
"""Update File
|
|
279
|
+
|
|
280
|
+
Update file metadata after upload (size, row count). Marks file as completed.
|
|
281
|
+
|
|
282
|
+
Args:
|
|
283
|
+
graph_id (str): Graph database identifier
|
|
284
|
+
file_id (str): File identifier
|
|
285
|
+
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
286
|
+
authorization (Union[None, Unset, str]):
|
|
287
|
+
body (FileUpdateRequest):
|
|
288
|
+
|
|
289
|
+
Raises:
|
|
290
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
291
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
292
|
+
|
|
293
|
+
Returns:
|
|
294
|
+
Union[Any, ErrorResponse, HTTPValidationError, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponseUpdateFileV1GraphsGraphIdTablesFilesFileIdPatch]
|
|
295
|
+
"""
|
|
296
|
+
|
|
297
|
+
return (
|
|
298
|
+
await asyncio_detailed(
|
|
299
|
+
graph_id=graph_id,
|
|
300
|
+
file_id=file_id,
|
|
301
|
+
client=client,
|
|
302
|
+
body=body,
|
|
303
|
+
token=token,
|
|
304
|
+
authorization=authorization,
|
|
305
|
+
)
|
|
306
|
+
).parsed
|
|
@@ -53,10 +53,12 @@ def _parse_response(
|
|
|
53
53
|
response_201 = CreateAPIKeyResponse.from_dict(response.json())
|
|
54
54
|
|
|
55
55
|
return response_201
|
|
56
|
+
|
|
56
57
|
if response.status_code == 422:
|
|
57
58
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
58
59
|
|
|
59
60
|
return response_422
|
|
61
|
+
|
|
60
62
|
if client.raise_on_unexpected_status:
|
|
61
63
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
62
64
|
else:
|
|
@@ -58,14 +58,17 @@ def _parse_response(
|
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
return response_200
|
|
61
|
-
if response.status_code == 500:
|
|
62
|
-
response_500 = ErrorResponse.from_dict(response.json())
|
|
63
61
|
|
|
64
|
-
return response_500
|
|
65
62
|
if response.status_code == 422:
|
|
66
63
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
67
64
|
|
|
68
65
|
return response_422
|
|
66
|
+
|
|
67
|
+
if response.status_code == 500:
|
|
68
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
69
|
+
|
|
70
|
+
return response_500
|
|
71
|
+
|
|
69
72
|
if client.raise_on_unexpected_status:
|
|
70
73
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
71
74
|
else:
|
|
@@ -47,10 +47,12 @@ def _parse_response(
|
|
|
47
47
|
response_200 = UserResponse.from_dict(response.json())
|
|
48
48
|
|
|
49
49
|
return response_200
|
|
50
|
+
|
|
50
51
|
if response.status_code == 422:
|
|
51
52
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
52
53
|
|
|
53
54
|
return response_422
|
|
55
|
+
|
|
54
56
|
if client.raise_on_unexpected_status:
|
|
55
57
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
56
58
|
else:
|
|
@@ -47,10 +47,12 @@ def _parse_response(
|
|
|
47
47
|
response_200 = APIKeysResponse.from_dict(response.json())
|
|
48
48
|
|
|
49
49
|
return response_200
|
|
50
|
+
|
|
50
51
|
if response.status_code == 422:
|
|
51
52
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
52
53
|
|
|
53
54
|
return response_422
|
|
55
|
+
|
|
54
56
|
if client.raise_on_unexpected_status:
|
|
55
57
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
56
58
|
else:
|
|
@@ -49,18 +49,22 @@ def _parse_response(
|
|
|
49
49
|
response_200 = SuccessResponse.from_dict(response.json())
|
|
50
50
|
|
|
51
51
|
return response_200
|
|
52
|
+
|
|
52
53
|
if response.status_code == 404:
|
|
53
54
|
response_404 = ErrorResponse.from_dict(response.json())
|
|
54
55
|
|
|
55
56
|
return response_404
|
|
56
|
-
if response.status_code == 500:
|
|
57
|
-
response_500 = ErrorResponse.from_dict(response.json())
|
|
58
57
|
|
|
59
|
-
return response_500
|
|
60
58
|
if response.status_code == 422:
|
|
61
59
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
62
60
|
|
|
63
61
|
return response_422
|
|
62
|
+
|
|
63
|
+
if response.status_code == 500:
|
|
64
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
65
|
+
|
|
66
|
+
return response_500
|
|
67
|
+
|
|
64
68
|
if client.raise_on_unexpected_status:
|
|
65
69
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
66
70
|
else:
|
|
@@ -53,10 +53,12 @@ def _parse_response(
|
|
|
53
53
|
response_200 = UserResponse.from_dict(response.json())
|
|
54
54
|
|
|
55
55
|
return response_200
|
|
56
|
+
|
|
56
57
|
if response.status_code == 422:
|
|
57
58
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
58
59
|
|
|
59
60
|
return response_422
|
|
61
|
+
|
|
60
62
|
if client.raise_on_unexpected_status:
|
|
61
63
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
62
64
|
else:
|
|
@@ -54,10 +54,12 @@ def _parse_response(
|
|
|
54
54
|
response_200 = APIKeyInfo.from_dict(response.json())
|
|
55
55
|
|
|
56
56
|
return response_200
|
|
57
|
+
|
|
57
58
|
if response.status_code == 422:
|
|
58
59
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
59
60
|
|
|
60
61
|
return response_422
|
|
62
|
+
|
|
61
63
|
if client.raise_on_unexpected_status:
|
|
62
64
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
63
65
|
else:
|