robosystems-client 0.1.19__py3-none-any.whl → 0.2.1__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 +9 -3
- robosystems_client/api/agent/batch_process_queries.py +8 -3
- robosystems_client/api/agent/execute_specific_agent.py +10 -3
- robosystems_client/api/agent/get_agent_metadata.py +3 -0
- robosystems_client/api/agent/list_agents.py +3 -0
- robosystems_client/api/agent/recommend_agent.py +3 -0
- 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 +13 -7
- robosystems_client/api/backup/get_backup_download_url.py +8 -3
- robosystems_client/api/backup/get_backup_stats.py +2 -0
- robosystems_client/api/backup/list_backups.py +6 -4
- robosystems_client/api/backup/restore_backup.py +27 -8
- robosystems_client/api/connections/create_connection.py +13 -7
- robosystems_client/api/connections/create_link_token.py +8 -3
- robosystems_client/api/connections/delete_connection.py +12 -7
- robosystems_client/api/connections/exchange_link_token.py +8 -3
- robosystems_client/api/connections/get_connection.py +8 -3
- robosystems_client/api/connections/get_connection_options.py +7 -3
- robosystems_client/api/connections/init_o_auth.py +2 -0
- robosystems_client/api/connections/list_connections.py +7 -3
- robosystems_client/api/connections/oauth_callback.py +9 -3
- robosystems_client/api/connections/sync_connection.py +12 -7
- robosystems_client/api/graph_analytics/get_graph_metrics.py +12 -7
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +11 -7
- robosystems_client/api/graph_billing/get_current_graph_bill.py +8 -3
- robosystems_client/api/graph_billing/get_graph_billing_history.py +8 -3
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +9 -3
- robosystems_client/api/graph_billing/get_graph_usage_details.py +9 -3
- robosystems_client/api/graph_credits/check_credit_balance.py +8 -3
- robosystems_client/api/graph_credits/check_storage_limits.py +8 -3
- robosystems_client/api/graph_credits/get_credit_summary.py +8 -3
- robosystems_client/api/graph_credits/get_storage_usage.py +7 -3
- robosystems_client/api/graph_credits/list_credit_transactions.py +8 -3
- robosystems_client/api/graph_health/get_database_health.py +8 -3
- robosystems_client/api/graph_info/get_database_info.py +8 -3
- robosystems_client/api/graph_limits/get_graph_limits.py +8 -3
- robosystems_client/api/graphs/create_graph.py +6 -4
- robosystems_client/api/graphs/get_available_extensions.py +1 -0
- robosystems_client/api/graphs/get_graphs.py +2 -0
- robosystems_client/api/graphs/select_graph.py +8 -3
- robosystems_client/api/mcp/call_mcp_tool.py +17 -7
- robosystems_client/api/mcp/list_mcp_tools.py +11 -7
- 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 +48 -15
- robosystems_client/api/schema/export_graph_schema.py +2 -0
- robosystems_client/api/schema/{get_graph_schema_info.py → get_graph_schema.py} +37 -47
- robosystems_client/api/schema/validate_schema.py +9 -4
- 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 +2 -0
- robosystems_client/api/subgraphs/delete_subgraph.py +14 -6
- robosystems_client/api/subgraphs/get_subgraph_info.py +13 -6
- robosystems_client/api/subgraphs/get_subgraph_quota.py +9 -3
- robosystems_client/api/subgraphs/list_subgraphs.py +2 -0
- 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 -29
- 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_graph_request.py +4 -3
- robosystems_client/models/delete_file_v1_graphs_graph_id_tables_files_file_id_delete_response_delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +47 -0
- 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.19.dist-info → robosystems_client-0.2.1.dist-info}/METADATA +25 -12
- {robosystems_client-0.1.19.dist-info → robosystems_client-0.2.1.dist-info}/RECORD +129 -122
- 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 → tables}/__init__.py +0 -0
- {robosystems_client-0.1.19.dist-info → robosystems_client-0.2.1.dist-info}/WHEEL +0 -0
- {robosystems_client-0.1.19.dist-info → robosystems_client-0.2.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,486 +0,0 @@
|
|
|
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.copy_response import CopyResponse
|
|
9
|
-
from ...models.data_frame_copy_request import DataFrameCopyRequest
|
|
10
|
-
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
-
from ...models.s3_copy_request import S3CopyRequest
|
|
12
|
-
from ...models.url_copy_request import URLCopyRequest
|
|
13
|
-
from ...types import UNSET, Response, Unset
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def _get_kwargs(
|
|
17
|
-
graph_id: str,
|
|
18
|
-
*,
|
|
19
|
-
body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"],
|
|
20
|
-
token: Union[None, Unset, str] = UNSET,
|
|
21
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
22
|
-
) -> dict[str, Any]:
|
|
23
|
-
headers: dict[str, Any] = {}
|
|
24
|
-
if not isinstance(authorization, Unset):
|
|
25
|
-
headers["authorization"] = authorization
|
|
26
|
-
|
|
27
|
-
params: dict[str, Any] = {}
|
|
28
|
-
|
|
29
|
-
json_token: Union[None, Unset, str]
|
|
30
|
-
if isinstance(token, Unset):
|
|
31
|
-
json_token = UNSET
|
|
32
|
-
else:
|
|
33
|
-
json_token = token
|
|
34
|
-
params["token"] = json_token
|
|
35
|
-
|
|
36
|
-
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
37
|
-
|
|
38
|
-
_kwargs: dict[str, Any] = {
|
|
39
|
-
"method": "post",
|
|
40
|
-
"url": f"/v1/graphs/{graph_id}/copy",
|
|
41
|
-
"params": params,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_kwargs["json"]: dict[str, Any]
|
|
45
|
-
if isinstance(body, S3CopyRequest):
|
|
46
|
-
_kwargs["json"] = body.to_dict()
|
|
47
|
-
elif isinstance(body, URLCopyRequest):
|
|
48
|
-
_kwargs["json"] = body.to_dict()
|
|
49
|
-
else:
|
|
50
|
-
_kwargs["json"] = body.to_dict()
|
|
51
|
-
|
|
52
|
-
headers["Content-Type"] = "application/json"
|
|
53
|
-
|
|
54
|
-
_kwargs["headers"] = headers
|
|
55
|
-
return _kwargs
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def _parse_response(
|
|
59
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
60
|
-
) -> Optional[Union[Any, CopyResponse, HTTPValidationError]]:
|
|
61
|
-
if response.status_code == 200:
|
|
62
|
-
response_200 = CopyResponse.from_dict(response.json())
|
|
63
|
-
|
|
64
|
-
return response_200
|
|
65
|
-
if response.status_code == 202:
|
|
66
|
-
response_202 = cast(Any, None)
|
|
67
|
-
return response_202
|
|
68
|
-
if response.status_code == 400:
|
|
69
|
-
response_400 = cast(Any, None)
|
|
70
|
-
return response_400
|
|
71
|
-
if response.status_code == 403:
|
|
72
|
-
response_403 = cast(Any, None)
|
|
73
|
-
return response_403
|
|
74
|
-
if response.status_code == 408:
|
|
75
|
-
response_408 = cast(Any, None)
|
|
76
|
-
return response_408
|
|
77
|
-
if response.status_code == 429:
|
|
78
|
-
response_429 = cast(Any, None)
|
|
79
|
-
return response_429
|
|
80
|
-
if response.status_code == 500:
|
|
81
|
-
response_500 = cast(Any, None)
|
|
82
|
-
return response_500
|
|
83
|
-
if response.status_code == 503:
|
|
84
|
-
response_503 = cast(Any, None)
|
|
85
|
-
return response_503
|
|
86
|
-
if response.status_code == 422:
|
|
87
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
88
|
-
|
|
89
|
-
return response_422
|
|
90
|
-
if client.raise_on_unexpected_status:
|
|
91
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
92
|
-
else:
|
|
93
|
-
return None
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
def _build_response(
|
|
97
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
98
|
-
) -> Response[Union[Any, CopyResponse, HTTPValidationError]]:
|
|
99
|
-
return Response(
|
|
100
|
-
status_code=HTTPStatus(response.status_code),
|
|
101
|
-
content=response.content,
|
|
102
|
-
headers=response.headers,
|
|
103
|
-
parsed=_parse_response(client=client, response=response),
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
def sync_detailed(
|
|
108
|
-
graph_id: str,
|
|
109
|
-
*,
|
|
110
|
-
client: AuthenticatedClient,
|
|
111
|
-
body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"],
|
|
112
|
-
token: Union[None, Unset, str] = UNSET,
|
|
113
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
114
|
-
) -> Response[Union[Any, CopyResponse, HTTPValidationError]]:
|
|
115
|
-
"""Copy Data to Graph
|
|
116
|
-
|
|
117
|
-
Copy data from external sources into the graph database.
|
|
118
|
-
|
|
119
|
-
This endpoint supports multiple data sources through a unified interface:
|
|
120
|
-
- **S3**: Copy from S3 buckets with user-provided credentials
|
|
121
|
-
- **URL** (future): Copy from HTTP(S) URLs
|
|
122
|
-
- **DataFrame** (future): Copy from uploaded DataFrames
|
|
123
|
-
|
|
124
|
-
**Security:**
|
|
125
|
-
- Requires write permissions to the target graph
|
|
126
|
-
- **Not allowed on shared repositories** (sec, industry, economic) - these are read-only
|
|
127
|
-
- User must provide their own AWS credentials for S3 access
|
|
128
|
-
- All operations are logged for audit purposes
|
|
129
|
-
|
|
130
|
-
**Tier Limits:**
|
|
131
|
-
- Standard: 10GB max file size, 15 min timeout
|
|
132
|
-
- Enterprise: 50GB max file size, 30 min timeout
|
|
133
|
-
- Premium: 100GB max file size, 60 min timeout
|
|
134
|
-
|
|
135
|
-
**Copy Options:**
|
|
136
|
-
- `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior). Note: When enabled,
|
|
137
|
-
row counts may not be accurately reported
|
|
138
|
-
- `extended_timeout`: Use extended timeout for large datasets
|
|
139
|
-
- `validate_schema`: Validate source schema against target table
|
|
140
|
-
|
|
141
|
-
**Asynchronous Execution with SSE:**
|
|
142
|
-
For large data imports, this endpoint returns immediately with an operation ID
|
|
143
|
-
and SSE monitoring endpoint. Connect to the returned stream URL for real-time updates:
|
|
144
|
-
|
|
145
|
-
```javascript
|
|
146
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
147
|
-
eventSource.onmessage = (event) => {
|
|
148
|
-
const data = JSON.parse(event.data);
|
|
149
|
-
console.log('Progress:', data.message);
|
|
150
|
-
};
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**SSE Events Emitted:**
|
|
154
|
-
- `operation_started`: Copy operation begins
|
|
155
|
-
- `operation_progress`: Progress updates during data transfer
|
|
156
|
-
- `operation_completed`: Copy successful with statistics
|
|
157
|
-
- `operation_error`: Copy failed with error details
|
|
158
|
-
|
|
159
|
-
**SSE Connection Limits:**
|
|
160
|
-
- Maximum 5 concurrent SSE connections per user
|
|
161
|
-
- Rate limited to 10 new connections per minute
|
|
162
|
-
- Automatic circuit breaker for Redis failures
|
|
163
|
-
- Graceful degradation if event system unavailable
|
|
164
|
-
|
|
165
|
-
**Error Handling:**
|
|
166
|
-
- `403 Forbidden`: Attempted copy to shared repository
|
|
167
|
-
- `408 Request Timeout`: Operation exceeded timeout limit
|
|
168
|
-
- `429 Too Many Requests`: Rate limit exceeded
|
|
169
|
-
- `503 Service Unavailable`: Circuit breaker open or service unavailable
|
|
170
|
-
- Clients should implement exponential backoff on errors
|
|
171
|
-
|
|
172
|
-
**Note:**
|
|
173
|
-
Copy operations are FREE - no credit consumption required.
|
|
174
|
-
All copy operations are performed asynchronously with progress monitoring.
|
|
175
|
-
|
|
176
|
-
Args:
|
|
177
|
-
graph_id (str): Target graph identifier (user graphs only - shared repositories not
|
|
178
|
-
allowed)
|
|
179
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
180
|
-
authorization (Union[None, Unset, str]):
|
|
181
|
-
body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']):
|
|
182
|
-
|
|
183
|
-
Raises:
|
|
184
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
185
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
186
|
-
|
|
187
|
-
Returns:
|
|
188
|
-
Response[Union[Any, CopyResponse, HTTPValidationError]]
|
|
189
|
-
"""
|
|
190
|
-
|
|
191
|
-
kwargs = _get_kwargs(
|
|
192
|
-
graph_id=graph_id,
|
|
193
|
-
body=body,
|
|
194
|
-
token=token,
|
|
195
|
-
authorization=authorization,
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
response = client.get_httpx_client().request(
|
|
199
|
-
**kwargs,
|
|
200
|
-
)
|
|
201
|
-
|
|
202
|
-
return _build_response(client=client, response=response)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
def sync(
|
|
206
|
-
graph_id: str,
|
|
207
|
-
*,
|
|
208
|
-
client: AuthenticatedClient,
|
|
209
|
-
body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"],
|
|
210
|
-
token: Union[None, Unset, str] = UNSET,
|
|
211
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
212
|
-
) -> Optional[Union[Any, CopyResponse, HTTPValidationError]]:
|
|
213
|
-
"""Copy Data to Graph
|
|
214
|
-
|
|
215
|
-
Copy data from external sources into the graph database.
|
|
216
|
-
|
|
217
|
-
This endpoint supports multiple data sources through a unified interface:
|
|
218
|
-
- **S3**: Copy from S3 buckets with user-provided credentials
|
|
219
|
-
- **URL** (future): Copy from HTTP(S) URLs
|
|
220
|
-
- **DataFrame** (future): Copy from uploaded DataFrames
|
|
221
|
-
|
|
222
|
-
**Security:**
|
|
223
|
-
- Requires write permissions to the target graph
|
|
224
|
-
- **Not allowed on shared repositories** (sec, industry, economic) - these are read-only
|
|
225
|
-
- User must provide their own AWS credentials for S3 access
|
|
226
|
-
- All operations are logged for audit purposes
|
|
227
|
-
|
|
228
|
-
**Tier Limits:**
|
|
229
|
-
- Standard: 10GB max file size, 15 min timeout
|
|
230
|
-
- Enterprise: 50GB max file size, 30 min timeout
|
|
231
|
-
- Premium: 100GB max file size, 60 min timeout
|
|
232
|
-
|
|
233
|
-
**Copy Options:**
|
|
234
|
-
- `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior). Note: When enabled,
|
|
235
|
-
row counts may not be accurately reported
|
|
236
|
-
- `extended_timeout`: Use extended timeout for large datasets
|
|
237
|
-
- `validate_schema`: Validate source schema against target table
|
|
238
|
-
|
|
239
|
-
**Asynchronous Execution with SSE:**
|
|
240
|
-
For large data imports, this endpoint returns immediately with an operation ID
|
|
241
|
-
and SSE monitoring endpoint. Connect to the returned stream URL for real-time updates:
|
|
242
|
-
|
|
243
|
-
```javascript
|
|
244
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
245
|
-
eventSource.onmessage = (event) => {
|
|
246
|
-
const data = JSON.parse(event.data);
|
|
247
|
-
console.log('Progress:', data.message);
|
|
248
|
-
};
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
**SSE Events Emitted:**
|
|
252
|
-
- `operation_started`: Copy operation begins
|
|
253
|
-
- `operation_progress`: Progress updates during data transfer
|
|
254
|
-
- `operation_completed`: Copy successful with statistics
|
|
255
|
-
- `operation_error`: Copy failed with error details
|
|
256
|
-
|
|
257
|
-
**SSE Connection Limits:**
|
|
258
|
-
- Maximum 5 concurrent SSE connections per user
|
|
259
|
-
- Rate limited to 10 new connections per minute
|
|
260
|
-
- Automatic circuit breaker for Redis failures
|
|
261
|
-
- Graceful degradation if event system unavailable
|
|
262
|
-
|
|
263
|
-
**Error Handling:**
|
|
264
|
-
- `403 Forbidden`: Attempted copy to shared repository
|
|
265
|
-
- `408 Request Timeout`: Operation exceeded timeout limit
|
|
266
|
-
- `429 Too Many Requests`: Rate limit exceeded
|
|
267
|
-
- `503 Service Unavailable`: Circuit breaker open or service unavailable
|
|
268
|
-
- Clients should implement exponential backoff on errors
|
|
269
|
-
|
|
270
|
-
**Note:**
|
|
271
|
-
Copy operations are FREE - no credit consumption required.
|
|
272
|
-
All copy operations are performed asynchronously with progress monitoring.
|
|
273
|
-
|
|
274
|
-
Args:
|
|
275
|
-
graph_id (str): Target graph identifier (user graphs only - shared repositories not
|
|
276
|
-
allowed)
|
|
277
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
278
|
-
authorization (Union[None, Unset, str]):
|
|
279
|
-
body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']):
|
|
280
|
-
|
|
281
|
-
Raises:
|
|
282
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
283
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
284
|
-
|
|
285
|
-
Returns:
|
|
286
|
-
Union[Any, CopyResponse, HTTPValidationError]
|
|
287
|
-
"""
|
|
288
|
-
|
|
289
|
-
return sync_detailed(
|
|
290
|
-
graph_id=graph_id,
|
|
291
|
-
client=client,
|
|
292
|
-
body=body,
|
|
293
|
-
token=token,
|
|
294
|
-
authorization=authorization,
|
|
295
|
-
).parsed
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
async def asyncio_detailed(
|
|
299
|
-
graph_id: str,
|
|
300
|
-
*,
|
|
301
|
-
client: AuthenticatedClient,
|
|
302
|
-
body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"],
|
|
303
|
-
token: Union[None, Unset, str] = UNSET,
|
|
304
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
305
|
-
) -> Response[Union[Any, CopyResponse, HTTPValidationError]]:
|
|
306
|
-
"""Copy Data to Graph
|
|
307
|
-
|
|
308
|
-
Copy data from external sources into the graph database.
|
|
309
|
-
|
|
310
|
-
This endpoint supports multiple data sources through a unified interface:
|
|
311
|
-
- **S3**: Copy from S3 buckets with user-provided credentials
|
|
312
|
-
- **URL** (future): Copy from HTTP(S) URLs
|
|
313
|
-
- **DataFrame** (future): Copy from uploaded DataFrames
|
|
314
|
-
|
|
315
|
-
**Security:**
|
|
316
|
-
- Requires write permissions to the target graph
|
|
317
|
-
- **Not allowed on shared repositories** (sec, industry, economic) - these are read-only
|
|
318
|
-
- User must provide their own AWS credentials for S3 access
|
|
319
|
-
- All operations are logged for audit purposes
|
|
320
|
-
|
|
321
|
-
**Tier Limits:**
|
|
322
|
-
- Standard: 10GB max file size, 15 min timeout
|
|
323
|
-
- Enterprise: 50GB max file size, 30 min timeout
|
|
324
|
-
- Premium: 100GB max file size, 60 min timeout
|
|
325
|
-
|
|
326
|
-
**Copy Options:**
|
|
327
|
-
- `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior). Note: When enabled,
|
|
328
|
-
row counts may not be accurately reported
|
|
329
|
-
- `extended_timeout`: Use extended timeout for large datasets
|
|
330
|
-
- `validate_schema`: Validate source schema against target table
|
|
331
|
-
|
|
332
|
-
**Asynchronous Execution with SSE:**
|
|
333
|
-
For large data imports, this endpoint returns immediately with an operation ID
|
|
334
|
-
and SSE monitoring endpoint. Connect to the returned stream URL for real-time updates:
|
|
335
|
-
|
|
336
|
-
```javascript
|
|
337
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
338
|
-
eventSource.onmessage = (event) => {
|
|
339
|
-
const data = JSON.parse(event.data);
|
|
340
|
-
console.log('Progress:', data.message);
|
|
341
|
-
};
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
**SSE Events Emitted:**
|
|
345
|
-
- `operation_started`: Copy operation begins
|
|
346
|
-
- `operation_progress`: Progress updates during data transfer
|
|
347
|
-
- `operation_completed`: Copy successful with statistics
|
|
348
|
-
- `operation_error`: Copy failed with error details
|
|
349
|
-
|
|
350
|
-
**SSE Connection Limits:**
|
|
351
|
-
- Maximum 5 concurrent SSE connections per user
|
|
352
|
-
- Rate limited to 10 new connections per minute
|
|
353
|
-
- Automatic circuit breaker for Redis failures
|
|
354
|
-
- Graceful degradation if event system unavailable
|
|
355
|
-
|
|
356
|
-
**Error Handling:**
|
|
357
|
-
- `403 Forbidden`: Attempted copy to shared repository
|
|
358
|
-
- `408 Request Timeout`: Operation exceeded timeout limit
|
|
359
|
-
- `429 Too Many Requests`: Rate limit exceeded
|
|
360
|
-
- `503 Service Unavailable`: Circuit breaker open or service unavailable
|
|
361
|
-
- Clients should implement exponential backoff on errors
|
|
362
|
-
|
|
363
|
-
**Note:**
|
|
364
|
-
Copy operations are FREE - no credit consumption required.
|
|
365
|
-
All copy operations are performed asynchronously with progress monitoring.
|
|
366
|
-
|
|
367
|
-
Args:
|
|
368
|
-
graph_id (str): Target graph identifier (user graphs only - shared repositories not
|
|
369
|
-
allowed)
|
|
370
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
371
|
-
authorization (Union[None, Unset, str]):
|
|
372
|
-
body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']):
|
|
373
|
-
|
|
374
|
-
Raises:
|
|
375
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
376
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
377
|
-
|
|
378
|
-
Returns:
|
|
379
|
-
Response[Union[Any, CopyResponse, HTTPValidationError]]
|
|
380
|
-
"""
|
|
381
|
-
|
|
382
|
-
kwargs = _get_kwargs(
|
|
383
|
-
graph_id=graph_id,
|
|
384
|
-
body=body,
|
|
385
|
-
token=token,
|
|
386
|
-
authorization=authorization,
|
|
387
|
-
)
|
|
388
|
-
|
|
389
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
390
|
-
|
|
391
|
-
return _build_response(client=client, response=response)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
async def asyncio(
|
|
395
|
-
graph_id: str,
|
|
396
|
-
*,
|
|
397
|
-
client: AuthenticatedClient,
|
|
398
|
-
body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"],
|
|
399
|
-
token: Union[None, Unset, str] = UNSET,
|
|
400
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
401
|
-
) -> Optional[Union[Any, CopyResponse, HTTPValidationError]]:
|
|
402
|
-
"""Copy Data to Graph
|
|
403
|
-
|
|
404
|
-
Copy data from external sources into the graph database.
|
|
405
|
-
|
|
406
|
-
This endpoint supports multiple data sources through a unified interface:
|
|
407
|
-
- **S3**: Copy from S3 buckets with user-provided credentials
|
|
408
|
-
- **URL** (future): Copy from HTTP(S) URLs
|
|
409
|
-
- **DataFrame** (future): Copy from uploaded DataFrames
|
|
410
|
-
|
|
411
|
-
**Security:**
|
|
412
|
-
- Requires write permissions to the target graph
|
|
413
|
-
- **Not allowed on shared repositories** (sec, industry, economic) - these are read-only
|
|
414
|
-
- User must provide their own AWS credentials for S3 access
|
|
415
|
-
- All operations are logged for audit purposes
|
|
416
|
-
|
|
417
|
-
**Tier Limits:**
|
|
418
|
-
- Standard: 10GB max file size, 15 min timeout
|
|
419
|
-
- Enterprise: 50GB max file size, 30 min timeout
|
|
420
|
-
- Premium: 100GB max file size, 60 min timeout
|
|
421
|
-
|
|
422
|
-
**Copy Options:**
|
|
423
|
-
- `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior). Note: When enabled,
|
|
424
|
-
row counts may not be accurately reported
|
|
425
|
-
- `extended_timeout`: Use extended timeout for large datasets
|
|
426
|
-
- `validate_schema`: Validate source schema against target table
|
|
427
|
-
|
|
428
|
-
**Asynchronous Execution with SSE:**
|
|
429
|
-
For large data imports, this endpoint returns immediately with an operation ID
|
|
430
|
-
and SSE monitoring endpoint. Connect to the returned stream URL for real-time updates:
|
|
431
|
-
|
|
432
|
-
```javascript
|
|
433
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
434
|
-
eventSource.onmessage = (event) => {
|
|
435
|
-
const data = JSON.parse(event.data);
|
|
436
|
-
console.log('Progress:', data.message);
|
|
437
|
-
};
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**SSE Events Emitted:**
|
|
441
|
-
- `operation_started`: Copy operation begins
|
|
442
|
-
- `operation_progress`: Progress updates during data transfer
|
|
443
|
-
- `operation_completed`: Copy successful with statistics
|
|
444
|
-
- `operation_error`: Copy failed with error details
|
|
445
|
-
|
|
446
|
-
**SSE Connection Limits:**
|
|
447
|
-
- Maximum 5 concurrent SSE connections per user
|
|
448
|
-
- Rate limited to 10 new connections per minute
|
|
449
|
-
- Automatic circuit breaker for Redis failures
|
|
450
|
-
- Graceful degradation if event system unavailable
|
|
451
|
-
|
|
452
|
-
**Error Handling:**
|
|
453
|
-
- `403 Forbidden`: Attempted copy to shared repository
|
|
454
|
-
- `408 Request Timeout`: Operation exceeded timeout limit
|
|
455
|
-
- `429 Too Many Requests`: Rate limit exceeded
|
|
456
|
-
- `503 Service Unavailable`: Circuit breaker open or service unavailable
|
|
457
|
-
- Clients should implement exponential backoff on errors
|
|
458
|
-
|
|
459
|
-
**Note:**
|
|
460
|
-
Copy operations are FREE - no credit consumption required.
|
|
461
|
-
All copy operations are performed asynchronously with progress monitoring.
|
|
462
|
-
|
|
463
|
-
Args:
|
|
464
|
-
graph_id (str): Target graph identifier (user graphs only - shared repositories not
|
|
465
|
-
allowed)
|
|
466
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
467
|
-
authorization (Union[None, Unset, str]):
|
|
468
|
-
body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']):
|
|
469
|
-
|
|
470
|
-
Raises:
|
|
471
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
472
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
473
|
-
|
|
474
|
-
Returns:
|
|
475
|
-
Union[Any, CopyResponse, HTTPValidationError]
|
|
476
|
-
"""
|
|
477
|
-
|
|
478
|
-
return (
|
|
479
|
-
await asyncio_detailed(
|
|
480
|
-
graph_id=graph_id,
|
|
481
|
-
client=client,
|
|
482
|
-
body=body,
|
|
483
|
-
token=token,
|
|
484
|
-
authorization=authorization,
|
|
485
|
-
)
|
|
486
|
-
).parsed
|