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.

Files changed (145) hide show
  1. robosystems_client/api/agent/auto_select_agent.py +10 -4
  2. robosystems_client/api/agent/batch_process_queries.py +9 -4
  3. robosystems_client/api/agent/execute_specific_agent.py +11 -4
  4. robosystems_client/api/agent/get_agent_metadata.py +4 -1
  5. robosystems_client/api/agent/list_agents.py +4 -1
  6. robosystems_client/api/agent/recommend_agent.py +4 -1
  7. robosystems_client/api/auth/check_password_strength.py +2 -0
  8. robosystems_client/api/auth/complete_sso_auth.py +3 -0
  9. robosystems_client/api/auth/forgot_password.py +6 -3
  10. robosystems_client/api/auth/generate_sso_token.py +3 -0
  11. robosystems_client/api/auth/get_captcha_config.py +1 -0
  12. robosystems_client/api/auth/get_current_auth_user.py +3 -0
  13. robosystems_client/api/auth/get_password_policy.py +1 -0
  14. robosystems_client/api/auth/login_user.py +7 -3
  15. robosystems_client/api/auth/logout_user.py +2 -0
  16. robosystems_client/api/auth/refresh_auth_session.py +3 -0
  17. robosystems_client/api/auth/register_user.py +11 -6
  18. robosystems_client/api/auth/resend_verification_email.py +8 -3
  19. robosystems_client/api/auth/reset_password.py +3 -0
  20. robosystems_client/api/auth/sso_token_exchange.py +7 -3
  21. robosystems_client/api/auth/validate_reset_token.py +2 -0
  22. robosystems_client/api/auth/verify_email.py +3 -0
  23. robosystems_client/api/backup/create_backup.py +14 -8
  24. robosystems_client/api/backup/get_backup_download_url.py +9 -4
  25. robosystems_client/api/backup/get_backup_stats.py +3 -1
  26. robosystems_client/api/backup/list_backups.py +7 -5
  27. robosystems_client/api/backup/restore_backup.py +27 -8
  28. robosystems_client/api/connections/create_connection.py +14 -8
  29. robosystems_client/api/connections/create_link_token.py +9 -4
  30. robosystems_client/api/connections/delete_connection.py +13 -8
  31. robosystems_client/api/connections/exchange_link_token.py +9 -4
  32. robosystems_client/api/connections/get_connection.py +9 -4
  33. robosystems_client/api/connections/get_connection_options.py +8 -4
  34. robosystems_client/api/connections/init_o_auth.py +3 -1
  35. robosystems_client/api/connections/list_connections.py +8 -4
  36. robosystems_client/api/connections/oauth_callback.py +10 -4
  37. robosystems_client/api/connections/sync_connection.py +13 -8
  38. robosystems_client/api/graph_analytics/get_graph_metrics.py +13 -8
  39. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +12 -8
  40. robosystems_client/api/graph_billing/get_current_graph_bill.py +9 -4
  41. robosystems_client/api/graph_billing/get_graph_billing_history.py +9 -4
  42. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +10 -4
  43. robosystems_client/api/graph_billing/get_graph_usage_details.py +10 -4
  44. robosystems_client/api/graph_credits/check_credit_balance.py +9 -4
  45. robosystems_client/api/graph_credits/check_storage_limits.py +9 -4
  46. robosystems_client/api/graph_credits/get_credit_summary.py +9 -4
  47. robosystems_client/api/graph_credits/get_storage_usage.py +8 -4
  48. robosystems_client/api/graph_credits/list_credit_transactions.py +9 -4
  49. robosystems_client/api/graph_health/get_database_health.py +9 -4
  50. robosystems_client/api/graph_info/get_database_info.py +9 -4
  51. robosystems_client/api/graph_limits/get_graph_limits.py +9 -4
  52. robosystems_client/api/{create → graphs}/create_graph.py +7 -5
  53. robosystems_client/api/{create → graphs}/get_available_extensions.py +2 -1
  54. robosystems_client/api/{user/get_user_graphs.py → graphs/get_graphs.py} +3 -1
  55. robosystems_client/api/{user/select_user_graph.py → graphs/select_graph.py} +13 -8
  56. robosystems_client/api/mcp/call_mcp_tool.py +18 -8
  57. robosystems_client/api/mcp/list_mcp_tools.py +12 -8
  58. robosystems_client/api/operations/cancel_operation.py +9 -3
  59. robosystems_client/api/operations/get_operation_status.py +8 -3
  60. robosystems_client/api/operations/stream_operation_events.py +8 -3
  61. robosystems_client/api/query/execute_cypher_query.py +49 -16
  62. robosystems_client/api/schema/export_graph_schema.py +3 -1
  63. robosystems_client/api/schema/{get_graph_schema_info.py → get_graph_schema.py} +37 -47
  64. robosystems_client/api/schema/validate_schema.py +10 -5
  65. robosystems_client/api/service_offerings/get_service_offerings.py +2 -0
  66. robosystems_client/api/status/get_service_status.py +1 -0
  67. robosystems_client/api/subgraphs/create_subgraph.py +3 -1
  68. robosystems_client/api/subgraphs/delete_subgraph.py +15 -7
  69. robosystems_client/api/subgraphs/get_subgraph_info.py +14 -7
  70. robosystems_client/api/subgraphs/get_subgraph_quota.py +10 -4
  71. robosystems_client/api/subgraphs/list_subgraphs.py +3 -1
  72. robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +287 -0
  73. robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +283 -0
  74. robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +260 -0
  75. robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +251 -0
  76. robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +283 -0
  77. robosystems_client/api/{backup/export_backup.py → tables/list_tables_v1_graphs_graph_id_tables_get.py} +36 -36
  78. robosystems_client/api/{schema/list_schema_extensions.py → tables/query_tables_v1_graphs_graph_id_tables_query_post.py} +67 -43
  79. robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +306 -0
  80. robosystems_client/api/user/create_user_api_key.py +2 -0
  81. robosystems_client/api/user/get_all_credit_summaries.py +6 -3
  82. robosystems_client/api/user/get_current_user.py +2 -0
  83. robosystems_client/api/user/list_user_api_keys.py +2 -0
  84. robosystems_client/api/user/revoke_user_api_key.py +7 -3
  85. robosystems_client/api/user/update_user.py +2 -0
  86. robosystems_client/api/user/update_user_api_key.py +2 -0
  87. robosystems_client/api/user/update_user_password.py +8 -3
  88. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +2 -0
  89. robosystems_client/api/user_analytics/get_user_usage_overview.py +2 -0
  90. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +2 -0
  91. robosystems_client/api/user_limits/get_shared_repository_limits.py +6 -4
  92. robosystems_client/api/user_limits/get_user_limits.py +3 -0
  93. robosystems_client/api/user_limits/get_user_usage.py +2 -0
  94. robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +11 -6
  95. robosystems_client/api/user_subscriptions/get_repository_credits.py +7 -3
  96. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +7 -3
  97. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +7 -3
  98. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +8 -3
  99. robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +12 -6
  100. robosystems_client/extensions/README.md +1 -212
  101. robosystems_client/extensions/__init__.py +12 -28
  102. robosystems_client/extensions/extensions.py +3 -17
  103. robosystems_client/extensions/operation_client.py +12 -4
  104. robosystems_client/extensions/query_client.py +38 -24
  105. robosystems_client/extensions/sse_client.py +11 -0
  106. robosystems_client/extensions/table_ingest_client.py +466 -0
  107. robosystems_client/models/__init__.py +39 -31
  108. robosystems_client/models/api_key_info.py +20 -0
  109. robosystems_client/models/backup_restore_request.py +1 -12
  110. robosystems_client/models/bulk_ingest_request.py +50 -0
  111. robosystems_client/models/bulk_ingest_response.py +137 -0
  112. robosystems_client/models/create_api_key_request.py +20 -0
  113. robosystems_client/models/create_graph_request.py +4 -3
  114. 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
  115. robosystems_client/models/file_update_request.py +62 -0
  116. robosystems_client/models/file_upload_request.py +51 -0
  117. robosystems_client/models/file_upload_response.py +83 -0
  118. 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
  119. robosystems_client/models/{copy_response_error_details_type_0.py → get_graph_schema_response_getgraphschema.py} +5 -5
  120. 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
  121. robosystems_client/models/table_info.py +107 -0
  122. robosystems_client/models/table_ingest_result.py +107 -0
  123. robosystems_client/models/table_list_response.py +81 -0
  124. robosystems_client/models/table_query_request.py +40 -0
  125. robosystems_client/models/table_query_response.py +92 -0
  126. 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
  127. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/METADATA +15 -3
  128. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/RECORD +132 -127
  129. robosystems_client/api/auth/sso_login.py +0 -177
  130. robosystems_client/api/copy/copy_data_to_graph.py +0 -486
  131. robosystems_client/extensions/copy_client.py +0 -479
  132. robosystems_client/models/copy_response.py +0 -275
  133. robosystems_client/models/copy_response_status.py +0 -11
  134. robosystems_client/models/data_frame_copy_request.py +0 -125
  135. robosystems_client/models/data_frame_copy_request_format.py +0 -10
  136. robosystems_client/models/s3_copy_request.py +0 -378
  137. robosystems_client/models/s3_copy_request_file_format.py +0 -12
  138. robosystems_client/models/s3_copy_request_s3_url_style_type_0.py +0 -9
  139. robosystems_client/models/url_copy_request.py +0 -157
  140. robosystems_client/models/url_copy_request_file_format.py +0 -10
  141. robosystems_client/models/url_copy_request_headers_type_0.py +0 -44
  142. /robosystems_client/api/{copy → graphs}/__init__.py +0 -0
  143. /robosystems_client/api/{create → tables}/__init__.py +0 -0
  144. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/WHEEL +0 -0
  145. {robosystems_client-0.1.18.dist-info → robosystems_client-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,177 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.auth_response import AuthResponse
9
- from ...models.error_response import ErrorResponse
10
- from ...models.http_validation_error import HTTPValidationError
11
- from ...models.sso_login_request import SSOLoginRequest
12
- from ...types import Response
13
-
14
-
15
- def _get_kwargs(
16
- *,
17
- body: SSOLoginRequest,
18
- ) -> dict[str, Any]:
19
- headers: dict[str, Any] = {}
20
-
21
- _kwargs: dict[str, Any] = {
22
- "method": "post",
23
- "url": "/v1/auth/sso-login",
24
- }
25
-
26
- _kwargs["json"] = body.to_dict()
27
-
28
- headers["Content-Type"] = "application/json"
29
-
30
- _kwargs["headers"] = headers
31
- return _kwargs
32
-
33
-
34
- def _parse_response(
35
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
36
- ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
37
- if response.status_code == 200:
38
- response_200 = AuthResponse.from_dict(response.json())
39
-
40
- return response_200
41
- if response.status_code == 401:
42
- response_401 = ErrorResponse.from_dict(response.json())
43
-
44
- return response_401
45
- if response.status_code == 422:
46
- response_422 = HTTPValidationError.from_dict(response.json())
47
-
48
- return response_422
49
- if client.raise_on_unexpected_status:
50
- raise errors.UnexpectedStatus(response.status_code, response.content)
51
- else:
52
- return None
53
-
54
-
55
- def _build_response(
56
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
57
- ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
58
- return Response(
59
- status_code=HTTPStatus(response.status_code),
60
- content=response.content,
61
- headers=response.headers,
62
- parsed=_parse_response(client=client, response=response),
63
- )
64
-
65
-
66
- def sync_detailed(
67
- *,
68
- client: Union[AuthenticatedClient, Client],
69
- body: SSOLoginRequest,
70
- ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
71
- """SSO Login
72
-
73
- Authenticate user with SSO token and establish session.
74
-
75
- Args:
76
- body (SSOLoginRequest): SSO login request model.
77
-
78
- Raises:
79
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
80
- httpx.TimeoutException: If the request takes longer than Client.timeout.
81
-
82
- Returns:
83
- Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]
84
- """
85
-
86
- kwargs = _get_kwargs(
87
- body=body,
88
- )
89
-
90
- response = client.get_httpx_client().request(
91
- **kwargs,
92
- )
93
-
94
- return _build_response(client=client, response=response)
95
-
96
-
97
- def sync(
98
- *,
99
- client: Union[AuthenticatedClient, Client],
100
- body: SSOLoginRequest,
101
- ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
102
- """SSO Login
103
-
104
- Authenticate user with SSO token and establish session.
105
-
106
- Args:
107
- body (SSOLoginRequest): SSO login request model.
108
-
109
- Raises:
110
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
111
- httpx.TimeoutException: If the request takes longer than Client.timeout.
112
-
113
- Returns:
114
- Union[AuthResponse, ErrorResponse, HTTPValidationError]
115
- """
116
-
117
- return sync_detailed(
118
- client=client,
119
- body=body,
120
- ).parsed
121
-
122
-
123
- async def asyncio_detailed(
124
- *,
125
- client: Union[AuthenticatedClient, Client],
126
- body: SSOLoginRequest,
127
- ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
128
- """SSO Login
129
-
130
- Authenticate user with SSO token and establish session.
131
-
132
- Args:
133
- body (SSOLoginRequest): SSO login request model.
134
-
135
- Raises:
136
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
137
- httpx.TimeoutException: If the request takes longer than Client.timeout.
138
-
139
- Returns:
140
- Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]
141
- """
142
-
143
- kwargs = _get_kwargs(
144
- body=body,
145
- )
146
-
147
- response = await client.get_async_httpx_client().request(**kwargs)
148
-
149
- return _build_response(client=client, response=response)
150
-
151
-
152
- async def asyncio(
153
- *,
154
- client: Union[AuthenticatedClient, Client],
155
- body: SSOLoginRequest,
156
- ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
157
- """SSO Login
158
-
159
- Authenticate user with SSO token and establish session.
160
-
161
- Args:
162
- body (SSOLoginRequest): SSO login request model.
163
-
164
- Raises:
165
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
166
- httpx.TimeoutException: If the request takes longer than Client.timeout.
167
-
168
- Returns:
169
- Union[AuthResponse, ErrorResponse, HTTPValidationError]
170
- """
171
-
172
- return (
173
- await asyncio_detailed(
174
- client=client,
175
- body=body,
176
- )
177
- ).parsed
@@ -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/{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