robosystems-client 0.2.3__py3-none-any.whl → 0.2.4__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 +1 -41
- robosystems_client/api/agent/batch_process_queries.py +1 -41
- robosystems_client/api/agent/execute_specific_agent.py +1 -41
- robosystems_client/api/agent/get_agent_metadata.py +5 -49
- robosystems_client/api/agent/list_agents.py +4 -42
- robosystems_client/api/agent/recommend_agent.py +5 -45
- robosystems_client/api/auth/generate_sso_token.py +0 -18
- robosystems_client/api/auth/get_current_auth_user.py +14 -74
- robosystems_client/api/auth/logout_user.py +14 -50
- robosystems_client/api/auth/refresh_auth_session.py +14 -50
- robosystems_client/api/auth/resend_verification_email.py +14 -74
- robosystems_client/api/backup/create_backup.py +5 -45
- robosystems_client/api/backup/get_backup_download_url.py +4 -42
- robosystems_client/api/backup/get_backup_stats.py +5 -49
- robosystems_client/api/backup/list_backups.py +4 -42
- robosystems_client/api/backup/restore_backup.py +5 -45
- robosystems_client/api/connections/create_connection.py +5 -45
- robosystems_client/api/connections/create_link_token.py +5 -45
- robosystems_client/api/connections/delete_connection.py +5 -49
- robosystems_client/api/connections/exchange_link_token.py +5 -45
- robosystems_client/api/connections/get_connection.py +5 -49
- robosystems_client/api/connections/get_connection_options.py +5 -49
- robosystems_client/api/connections/init_o_auth.py +5 -45
- robosystems_client/api/connections/list_connections.py +4 -42
- robosystems_client/api/connections/oauth_callback.py +5 -45
- robosystems_client/api/connections/sync_connection.py +5 -45
- robosystems_client/api/graph_analytics/get_graph_metrics.py +5 -49
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +4 -42
- robosystems_client/api/graph_billing/get_current_graph_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_billing_history.py +4 -42
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_usage_details.py +4 -42
- robosystems_client/api/graph_credits/check_credit_balance.py +0 -38
- robosystems_client/api/graph_credits/check_storage_limits.py +1 -45
- robosystems_client/api/graph_credits/get_credit_summary.py +1 -45
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -38
- robosystems_client/api/graph_credits/list_credit_transactions.py +4 -42
- robosystems_client/api/graph_health/get_database_health.py +5 -49
- robosystems_client/api/graph_info/get_database_info.py +5 -49
- robosystems_client/api/graph_limits/get_graph_limits.py +5 -49
- robosystems_client/api/graphs/create_graph.py +21 -57
- robosystems_client/api/graphs/get_available_extensions.py +131 -15
- robosystems_client/api/graphs/get_graphs.py +154 -79
- robosystems_client/api/graphs/select_graph.py +117 -49
- robosystems_client/api/mcp/call_mcp_tool.py +24 -47
- robosystems_client/api/mcp/list_mcp_tools.py +13 -61
- robosystems_client/api/operations/cancel_operation.py +1 -45
- robosystems_client/api/operations/get_operation_status.py +1 -45
- robosystems_client/api/query/execute_cypher_query.py +69 -53
- robosystems_client/api/schema/export_graph_schema.py +223 -65
- robosystems_client/api/schema/get_graph_schema.py +137 -79
- robosystems_client/api/schema/validate_schema.py +5 -45
- robosystems_client/api/subgraphs/create_subgraph.py +5 -45
- robosystems_client/api/subgraphs/delete_subgraph.py +5 -45
- robosystems_client/api/subgraphs/get_subgraph_info.py +5 -49
- robosystems_client/api/subgraphs/get_subgraph_quota.py +5 -49
- robosystems_client/api/subgraphs/list_subgraphs.py +5 -49
- robosystems_client/api/tables/delete_file.py +181 -301
- robosystems_client/api/tables/get_file_info.py +117 -265
- robosystems_client/api/tables/get_upload_url.py +193 -389
- robosystems_client/api/tables/ingest_tables.py +277 -465
- robosystems_client/api/tables/list_table_files.py +193 -373
- robosystems_client/api/tables/list_tables.py +189 -361
- robosystems_client/api/tables/query_tables.py +85 -141
- robosystems_client/api/tables/update_file_status.py +205 -349
- robosystems_client/api/user/create_user_api_key.py +1 -41
- robosystems_client/api/user/get_all_credit_summaries.py +14 -111
- robosystems_client/api/user/get_current_user.py +14 -75
- robosystems_client/api/user/list_user_api_keys.py +14 -75
- robosystems_client/api/user/revoke_user_api_key.py +1 -45
- robosystems_client/api/user/update_user.py +1 -41
- robosystems_client/api/user/update_user_api_key.py +1 -41
- robosystems_client/api/user/update_user_password.py +1 -41
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -38
- robosystems_client/api/user_analytics/get_user_usage_overview.py +14 -75
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +14 -105
- robosystems_client/api/user_limits/get_shared_repository_limits.py +1 -45
- robosystems_client/api/user_limits/get_user_limits.py +14 -75
- robosystems_client/api/user_limits/get_user_usage.py +14 -75
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +1 -45
- robosystems_client/api/user_subscriptions/get_repository_credits.py +1 -45
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +14 -75
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -38
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +1 -41
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +1 -41
- robosystems_client/extensions/__init__.py +8 -1
- robosystems_client/extensions/auth_integration.py +1 -2
- robosystems_client/extensions/query_client.py +3 -2
- robosystems_client/extensions/sse_client.py +1 -1
- robosystems_client/extensions/table_ingest_client.py +5 -0
- robosystems_client/extensions/utils.py +2 -2
- robosystems_client/models/__init__.py +4 -4
- robosystems_client/models/create_graph_request.py +4 -3
- robosystems_client/models/cypher_query_request.py +5 -22
- robosystems_client/models/schema_export_response.py +4 -2
- robosystems_client/models/schema_info_response.py +77 -0
- robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
- robosystems_client/models/schema_validation_response.py +7 -6
- robosystems_client/models/table_query_request.py +37 -2
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +103 -102
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,7 +11,7 @@ from ...models.http_validation_error import HTTPValidationError
|
|
|
11
11
|
from ...models.update_file_status_response_updatefilestatus import (
|
|
12
12
|
UpdateFileStatusResponseUpdatefilestatus,
|
|
13
13
|
)
|
|
14
|
-
from ...types import
|
|
14
|
+
from ...types import Response
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def _get_kwargs(
|
|
@@ -19,28 +19,12 @@ def _get_kwargs(
|
|
|
19
19
|
file_id: str,
|
|
20
20
|
*,
|
|
21
21
|
body: FileStatusUpdate,
|
|
22
|
-
token: Union[None, Unset, str] = UNSET,
|
|
23
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
24
22
|
) -> dict[str, Any]:
|
|
25
23
|
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
24
|
|
|
40
25
|
_kwargs: dict[str, Any] = {
|
|
41
26
|
"method": "patch",
|
|
42
27
|
"url": f"/v1/graphs/{graph_id}/tables/files/{file_id}",
|
|
43
|
-
"params": params,
|
|
44
28
|
}
|
|
45
29
|
|
|
46
30
|
_kwargs["json"] = body.to_dict()
|
|
@@ -123,99 +107,67 @@ def sync_detailed(
|
|
|
123
107
|
*,
|
|
124
108
|
client: AuthenticatedClient,
|
|
125
109
|
body: FileStatusUpdate,
|
|
126
|
-
token: Union[None, Unset, str] = UNSET,
|
|
127
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
128
110
|
) -> Response[
|
|
129
111
|
Union[
|
|
130
112
|
Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus
|
|
131
113
|
]
|
|
132
114
|
]:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
185
|
-
-H \"Content-Type: application/json\" \
|
|
186
|
-
-d '{\"status\": \"uploaded\"}'
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Tips:**
|
|
190
|
-
- Always call this after S3 upload completes
|
|
191
|
-
- Check response for actual row count
|
|
192
|
-
- Storage limit errors (413) mean tier upgrade needed
|
|
193
|
-
- DuckDB registration failures are non-fatal (retried later)
|
|
194
|
-
|
|
195
|
-
**Note:**
|
|
196
|
-
Status updates are included - no credit consumption.
|
|
197
|
-
|
|
198
|
-
Args:
|
|
199
|
-
graph_id (str): Graph database identifier
|
|
200
|
-
file_id (str): File identifier
|
|
201
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
202
|
-
authorization (Union[None, Unset, str]):
|
|
203
|
-
body (FileStatusUpdate):
|
|
204
|
-
|
|
205
|
-
Raises:
|
|
206
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
207
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
208
|
-
|
|
209
|
-
Returns:
|
|
210
|
-
Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]]
|
|
211
|
-
"""
|
|
115
|
+
"""Update File Upload Status
|
|
116
|
+
|
|
117
|
+
Update file status after upload completes.
|
|
118
|
+
|
|
119
|
+
Marks files as uploaded after successful S3 upload. The backend validates
|
|
120
|
+
the file, calculates size and row count, enforces storage limits, and
|
|
121
|
+
registers the DuckDB table for queries.
|
|
122
|
+
|
|
123
|
+
**Status Values:**
|
|
124
|
+
- `uploaded`: File successfully uploaded to S3 (triggers validation)
|
|
125
|
+
- `disabled`: Exclude file from ingestion
|
|
126
|
+
- `archived`: Soft delete file
|
|
127
|
+
|
|
128
|
+
**What Happens on 'uploaded' Status:**
|
|
129
|
+
1. Verify file exists in S3
|
|
130
|
+
2. Calculate actual file size
|
|
131
|
+
3. Enforce tier storage limits
|
|
132
|
+
4. Calculate or estimate row count
|
|
133
|
+
5. Update table statistics
|
|
134
|
+
6. Register DuckDB external table
|
|
135
|
+
7. File ready for ingestion
|
|
136
|
+
|
|
137
|
+
**Row Count Calculation:**
|
|
138
|
+
- **Parquet**: Exact count from file metadata
|
|
139
|
+
- **CSV**: Count rows (minus header)
|
|
140
|
+
- **JSON**: Count array elements
|
|
141
|
+
- **Fallback**: Estimate from file size if reading fails
|
|
142
|
+
|
|
143
|
+
**Storage Limits:**
|
|
144
|
+
Enforced per subscription tier. Returns HTTP 413 if limit exceeded.
|
|
145
|
+
Check current usage before large uploads.
|
|
146
|
+
|
|
147
|
+
**Important Notes:**
|
|
148
|
+
- Always call this after S3 upload completes
|
|
149
|
+
- Check response for actual row count
|
|
150
|
+
- Storage limit errors (413) mean tier upgrade needed
|
|
151
|
+
- DuckDB registration failures are non-fatal (retried later)
|
|
152
|
+
- Status updates are included - no credit consumption
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
graph_id (str):
|
|
156
|
+
file_id (str): File identifier
|
|
157
|
+
body (FileStatusUpdate):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]]
|
|
165
|
+
"""
|
|
212
166
|
|
|
213
167
|
kwargs = _get_kwargs(
|
|
214
168
|
graph_id=graph_id,
|
|
215
169
|
file_id=file_id,
|
|
216
170
|
body=body,
|
|
217
|
-
token=token,
|
|
218
|
-
authorization=authorization,
|
|
219
171
|
)
|
|
220
172
|
|
|
221
173
|
response = client.get_httpx_client().request(
|
|
@@ -231,100 +183,68 @@ def sync(
|
|
|
231
183
|
*,
|
|
232
184
|
client: AuthenticatedClient,
|
|
233
185
|
body: FileStatusUpdate,
|
|
234
|
-
token: Union[None, Unset, str] = UNSET,
|
|
235
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
236
186
|
) -> Optional[
|
|
237
187
|
Union[
|
|
238
188
|
Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus
|
|
239
189
|
]
|
|
240
190
|
]:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
293
|
-
-H \"Content-Type: application/json\" \
|
|
294
|
-
-d '{\"status\": \"uploaded\"}'
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
**Tips:**
|
|
298
|
-
- Always call this after S3 upload completes
|
|
299
|
-
- Check response for actual row count
|
|
300
|
-
- Storage limit errors (413) mean tier upgrade needed
|
|
301
|
-
- DuckDB registration failures are non-fatal (retried later)
|
|
302
|
-
|
|
303
|
-
**Note:**
|
|
304
|
-
Status updates are included - no credit consumption.
|
|
305
|
-
|
|
306
|
-
Args:
|
|
307
|
-
graph_id (str): Graph database identifier
|
|
308
|
-
file_id (str): File identifier
|
|
309
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
310
|
-
authorization (Union[None, Unset, str]):
|
|
311
|
-
body (FileStatusUpdate):
|
|
312
|
-
|
|
313
|
-
Raises:
|
|
314
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
315
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
316
|
-
|
|
317
|
-
Returns:
|
|
318
|
-
Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]
|
|
319
|
-
"""
|
|
191
|
+
"""Update File Upload Status
|
|
192
|
+
|
|
193
|
+
Update file status after upload completes.
|
|
194
|
+
|
|
195
|
+
Marks files as uploaded after successful S3 upload. The backend validates
|
|
196
|
+
the file, calculates size and row count, enforces storage limits, and
|
|
197
|
+
registers the DuckDB table for queries.
|
|
198
|
+
|
|
199
|
+
**Status Values:**
|
|
200
|
+
- `uploaded`: File successfully uploaded to S3 (triggers validation)
|
|
201
|
+
- `disabled`: Exclude file from ingestion
|
|
202
|
+
- `archived`: Soft delete file
|
|
203
|
+
|
|
204
|
+
**What Happens on 'uploaded' Status:**
|
|
205
|
+
1. Verify file exists in S3
|
|
206
|
+
2. Calculate actual file size
|
|
207
|
+
3. Enforce tier storage limits
|
|
208
|
+
4. Calculate or estimate row count
|
|
209
|
+
5. Update table statistics
|
|
210
|
+
6. Register DuckDB external table
|
|
211
|
+
7. File ready for ingestion
|
|
212
|
+
|
|
213
|
+
**Row Count Calculation:**
|
|
214
|
+
- **Parquet**: Exact count from file metadata
|
|
215
|
+
- **CSV**: Count rows (minus header)
|
|
216
|
+
- **JSON**: Count array elements
|
|
217
|
+
- **Fallback**: Estimate from file size if reading fails
|
|
218
|
+
|
|
219
|
+
**Storage Limits:**
|
|
220
|
+
Enforced per subscription tier. Returns HTTP 413 if limit exceeded.
|
|
221
|
+
Check current usage before large uploads.
|
|
222
|
+
|
|
223
|
+
**Important Notes:**
|
|
224
|
+
- Always call this after S3 upload completes
|
|
225
|
+
- Check response for actual row count
|
|
226
|
+
- Storage limit errors (413) mean tier upgrade needed
|
|
227
|
+
- DuckDB registration failures are non-fatal (retried later)
|
|
228
|
+
- Status updates are included - no credit consumption
|
|
229
|
+
|
|
230
|
+
Args:
|
|
231
|
+
graph_id (str):
|
|
232
|
+
file_id (str): File identifier
|
|
233
|
+
body (FileStatusUpdate):
|
|
234
|
+
|
|
235
|
+
Raises:
|
|
236
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
237
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
238
|
+
|
|
239
|
+
Returns:
|
|
240
|
+
Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]
|
|
241
|
+
"""
|
|
320
242
|
|
|
321
243
|
return sync_detailed(
|
|
322
244
|
graph_id=graph_id,
|
|
323
245
|
file_id=file_id,
|
|
324
246
|
client=client,
|
|
325
247
|
body=body,
|
|
326
|
-
token=token,
|
|
327
|
-
authorization=authorization,
|
|
328
248
|
).parsed
|
|
329
249
|
|
|
330
250
|
|
|
@@ -334,99 +254,67 @@ async def asyncio_detailed(
|
|
|
334
254
|
*,
|
|
335
255
|
client: AuthenticatedClient,
|
|
336
256
|
body: FileStatusUpdate,
|
|
337
|
-
token: Union[None, Unset, str] = UNSET,
|
|
338
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
339
257
|
) -> Response[
|
|
340
258
|
Union[
|
|
341
259
|
Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus
|
|
342
260
|
]
|
|
343
261
|
]:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
396
|
-
-H \"Content-Type: application/json\" \
|
|
397
|
-
-d '{\"status\": \"uploaded\"}'
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
**Tips:**
|
|
401
|
-
- Always call this after S3 upload completes
|
|
402
|
-
- Check response for actual row count
|
|
403
|
-
- Storage limit errors (413) mean tier upgrade needed
|
|
404
|
-
- DuckDB registration failures are non-fatal (retried later)
|
|
405
|
-
|
|
406
|
-
**Note:**
|
|
407
|
-
Status updates are included - no credit consumption.
|
|
408
|
-
|
|
409
|
-
Args:
|
|
410
|
-
graph_id (str): Graph database identifier
|
|
411
|
-
file_id (str): File identifier
|
|
412
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
413
|
-
authorization (Union[None, Unset, str]):
|
|
414
|
-
body (FileStatusUpdate):
|
|
415
|
-
|
|
416
|
-
Raises:
|
|
417
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
418
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
419
|
-
|
|
420
|
-
Returns:
|
|
421
|
-
Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]]
|
|
422
|
-
"""
|
|
262
|
+
"""Update File Upload Status
|
|
263
|
+
|
|
264
|
+
Update file status after upload completes.
|
|
265
|
+
|
|
266
|
+
Marks files as uploaded after successful S3 upload. The backend validates
|
|
267
|
+
the file, calculates size and row count, enforces storage limits, and
|
|
268
|
+
registers the DuckDB table for queries.
|
|
269
|
+
|
|
270
|
+
**Status Values:**
|
|
271
|
+
- `uploaded`: File successfully uploaded to S3 (triggers validation)
|
|
272
|
+
- `disabled`: Exclude file from ingestion
|
|
273
|
+
- `archived`: Soft delete file
|
|
274
|
+
|
|
275
|
+
**What Happens on 'uploaded' Status:**
|
|
276
|
+
1. Verify file exists in S3
|
|
277
|
+
2. Calculate actual file size
|
|
278
|
+
3. Enforce tier storage limits
|
|
279
|
+
4. Calculate or estimate row count
|
|
280
|
+
5. Update table statistics
|
|
281
|
+
6. Register DuckDB external table
|
|
282
|
+
7. File ready for ingestion
|
|
283
|
+
|
|
284
|
+
**Row Count Calculation:**
|
|
285
|
+
- **Parquet**: Exact count from file metadata
|
|
286
|
+
- **CSV**: Count rows (minus header)
|
|
287
|
+
- **JSON**: Count array elements
|
|
288
|
+
- **Fallback**: Estimate from file size if reading fails
|
|
289
|
+
|
|
290
|
+
**Storage Limits:**
|
|
291
|
+
Enforced per subscription tier. Returns HTTP 413 if limit exceeded.
|
|
292
|
+
Check current usage before large uploads.
|
|
293
|
+
|
|
294
|
+
**Important Notes:**
|
|
295
|
+
- Always call this after S3 upload completes
|
|
296
|
+
- Check response for actual row count
|
|
297
|
+
- Storage limit errors (413) mean tier upgrade needed
|
|
298
|
+
- DuckDB registration failures are non-fatal (retried later)
|
|
299
|
+
- Status updates are included - no credit consumption
|
|
300
|
+
|
|
301
|
+
Args:
|
|
302
|
+
graph_id (str):
|
|
303
|
+
file_id (str): File identifier
|
|
304
|
+
body (FileStatusUpdate):
|
|
305
|
+
|
|
306
|
+
Raises:
|
|
307
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
308
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
309
|
+
|
|
310
|
+
Returns:
|
|
311
|
+
Response[Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]]
|
|
312
|
+
"""
|
|
423
313
|
|
|
424
314
|
kwargs = _get_kwargs(
|
|
425
315
|
graph_id=graph_id,
|
|
426
316
|
file_id=file_id,
|
|
427
317
|
body=body,
|
|
428
|
-
token=token,
|
|
429
|
-
authorization=authorization,
|
|
430
318
|
)
|
|
431
319
|
|
|
432
320
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -440,92 +328,62 @@ async def asyncio(
|
|
|
440
328
|
*,
|
|
441
329
|
client: AuthenticatedClient,
|
|
442
330
|
body: FileStatusUpdate,
|
|
443
|
-
token: Union[None, Unset, str] = UNSET,
|
|
444
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
445
331
|
) -> Optional[
|
|
446
332
|
Union[
|
|
447
333
|
Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus
|
|
448
334
|
]
|
|
449
335
|
]:
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
-H \"Authorization: Bearer YOUR_TOKEN\" \
|
|
502
|
-
-H \"Content-Type: application/json\" \
|
|
503
|
-
-d '{\"status\": \"uploaded\"}'
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
**Tips:**
|
|
507
|
-
- Always call this after S3 upload completes
|
|
508
|
-
- Check response for actual row count
|
|
509
|
-
- Storage limit errors (413) mean tier upgrade needed
|
|
510
|
-
- DuckDB registration failures are non-fatal (retried later)
|
|
511
|
-
|
|
512
|
-
**Note:**
|
|
513
|
-
Status updates are included - no credit consumption.
|
|
514
|
-
|
|
515
|
-
Args:
|
|
516
|
-
graph_id (str): Graph database identifier
|
|
517
|
-
file_id (str): File identifier
|
|
518
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
519
|
-
authorization (Union[None, Unset, str]):
|
|
520
|
-
body (FileStatusUpdate):
|
|
521
|
-
|
|
522
|
-
Raises:
|
|
523
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
524
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
525
|
-
|
|
526
|
-
Returns:
|
|
527
|
-
Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]
|
|
528
|
-
"""
|
|
336
|
+
"""Update File Upload Status
|
|
337
|
+
|
|
338
|
+
Update file status after upload completes.
|
|
339
|
+
|
|
340
|
+
Marks files as uploaded after successful S3 upload. The backend validates
|
|
341
|
+
the file, calculates size and row count, enforces storage limits, and
|
|
342
|
+
registers the DuckDB table for queries.
|
|
343
|
+
|
|
344
|
+
**Status Values:**
|
|
345
|
+
- `uploaded`: File successfully uploaded to S3 (triggers validation)
|
|
346
|
+
- `disabled`: Exclude file from ingestion
|
|
347
|
+
- `archived`: Soft delete file
|
|
348
|
+
|
|
349
|
+
**What Happens on 'uploaded' Status:**
|
|
350
|
+
1. Verify file exists in S3
|
|
351
|
+
2. Calculate actual file size
|
|
352
|
+
3. Enforce tier storage limits
|
|
353
|
+
4. Calculate or estimate row count
|
|
354
|
+
5. Update table statistics
|
|
355
|
+
6. Register DuckDB external table
|
|
356
|
+
7. File ready for ingestion
|
|
357
|
+
|
|
358
|
+
**Row Count Calculation:**
|
|
359
|
+
- **Parquet**: Exact count from file metadata
|
|
360
|
+
- **CSV**: Count rows (minus header)
|
|
361
|
+
- **JSON**: Count array elements
|
|
362
|
+
- **Fallback**: Estimate from file size if reading fails
|
|
363
|
+
|
|
364
|
+
**Storage Limits:**
|
|
365
|
+
Enforced per subscription tier. Returns HTTP 413 if limit exceeded.
|
|
366
|
+
Check current usage before large uploads.
|
|
367
|
+
|
|
368
|
+
**Important Notes:**
|
|
369
|
+
- Always call this after S3 upload completes
|
|
370
|
+
- Check response for actual row count
|
|
371
|
+
- Storage limit errors (413) mean tier upgrade needed
|
|
372
|
+
- DuckDB registration failures are non-fatal (retried later)
|
|
373
|
+
- Status updates are included - no credit consumption
|
|
374
|
+
|
|
375
|
+
Args:
|
|
376
|
+
graph_id (str):
|
|
377
|
+
file_id (str): File identifier
|
|
378
|
+
body (FileStatusUpdate):
|
|
379
|
+
|
|
380
|
+
Raises:
|
|
381
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
382
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
383
|
+
|
|
384
|
+
Returns:
|
|
385
|
+
Union[Any, ErrorResponse, HTTPValidationError, UpdateFileStatusResponseUpdatefilestatus]
|
|
386
|
+
"""
|
|
529
387
|
|
|
530
388
|
return (
|
|
531
389
|
await asyncio_detailed(
|
|
@@ -533,7 +391,5 @@ async def asyncio(
|
|
|
533
391
|
file_id=file_id,
|
|
534
392
|
client=client,
|
|
535
393
|
body=body,
|
|
536
|
-
token=token,
|
|
537
|
-
authorization=authorization,
|
|
538
394
|
)
|
|
539
395
|
).parsed
|