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.

Files changed (103) hide show
  1. robosystems_client/api/agent/auto_select_agent.py +1 -41
  2. robosystems_client/api/agent/batch_process_queries.py +1 -41
  3. robosystems_client/api/agent/execute_specific_agent.py +1 -41
  4. robosystems_client/api/agent/get_agent_metadata.py +5 -49
  5. robosystems_client/api/agent/list_agents.py +4 -42
  6. robosystems_client/api/agent/recommend_agent.py +5 -45
  7. robosystems_client/api/auth/generate_sso_token.py +0 -18
  8. robosystems_client/api/auth/get_current_auth_user.py +14 -74
  9. robosystems_client/api/auth/logout_user.py +14 -50
  10. robosystems_client/api/auth/refresh_auth_session.py +14 -50
  11. robosystems_client/api/auth/resend_verification_email.py +14 -74
  12. robosystems_client/api/backup/create_backup.py +5 -45
  13. robosystems_client/api/backup/get_backup_download_url.py +4 -42
  14. robosystems_client/api/backup/get_backup_stats.py +5 -49
  15. robosystems_client/api/backup/list_backups.py +4 -42
  16. robosystems_client/api/backup/restore_backup.py +5 -45
  17. robosystems_client/api/connections/create_connection.py +5 -45
  18. robosystems_client/api/connections/create_link_token.py +5 -45
  19. robosystems_client/api/connections/delete_connection.py +5 -49
  20. robosystems_client/api/connections/exchange_link_token.py +5 -45
  21. robosystems_client/api/connections/get_connection.py +5 -49
  22. robosystems_client/api/connections/get_connection_options.py +5 -49
  23. robosystems_client/api/connections/init_o_auth.py +5 -45
  24. robosystems_client/api/connections/list_connections.py +4 -42
  25. robosystems_client/api/connections/oauth_callback.py +5 -45
  26. robosystems_client/api/connections/sync_connection.py +5 -45
  27. robosystems_client/api/graph_analytics/get_graph_metrics.py +5 -49
  28. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +4 -42
  29. robosystems_client/api/graph_billing/get_current_graph_bill.py +5 -49
  30. robosystems_client/api/graph_billing/get_graph_billing_history.py +4 -42
  31. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +5 -49
  32. robosystems_client/api/graph_billing/get_graph_usage_details.py +4 -42
  33. robosystems_client/api/graph_credits/check_credit_balance.py +0 -38
  34. robosystems_client/api/graph_credits/check_storage_limits.py +1 -45
  35. robosystems_client/api/graph_credits/get_credit_summary.py +1 -45
  36. robosystems_client/api/graph_credits/get_storage_usage.py +0 -38
  37. robosystems_client/api/graph_credits/list_credit_transactions.py +4 -42
  38. robosystems_client/api/graph_health/get_database_health.py +5 -49
  39. robosystems_client/api/graph_info/get_database_info.py +5 -49
  40. robosystems_client/api/graph_limits/get_graph_limits.py +5 -49
  41. robosystems_client/api/graphs/create_graph.py +21 -57
  42. robosystems_client/api/graphs/get_available_extensions.py +131 -15
  43. robosystems_client/api/graphs/get_graphs.py +154 -79
  44. robosystems_client/api/graphs/select_graph.py +117 -49
  45. robosystems_client/api/mcp/call_mcp_tool.py +24 -47
  46. robosystems_client/api/mcp/list_mcp_tools.py +13 -61
  47. robosystems_client/api/operations/cancel_operation.py +1 -45
  48. robosystems_client/api/operations/get_operation_status.py +1 -45
  49. robosystems_client/api/query/execute_cypher_query.py +69 -53
  50. robosystems_client/api/schema/export_graph_schema.py +223 -65
  51. robosystems_client/api/schema/get_graph_schema.py +137 -79
  52. robosystems_client/api/schema/validate_schema.py +5 -45
  53. robosystems_client/api/subgraphs/create_subgraph.py +5 -45
  54. robosystems_client/api/subgraphs/delete_subgraph.py +5 -45
  55. robosystems_client/api/subgraphs/get_subgraph_info.py +5 -49
  56. robosystems_client/api/subgraphs/get_subgraph_quota.py +5 -49
  57. robosystems_client/api/subgraphs/list_subgraphs.py +5 -49
  58. robosystems_client/api/tables/delete_file.py +181 -301
  59. robosystems_client/api/tables/get_file_info.py +117 -265
  60. robosystems_client/api/tables/get_upload_url.py +193 -389
  61. robosystems_client/api/tables/ingest_tables.py +277 -465
  62. robosystems_client/api/tables/list_table_files.py +193 -373
  63. robosystems_client/api/tables/list_tables.py +189 -361
  64. robosystems_client/api/tables/query_tables.py +85 -141
  65. robosystems_client/api/tables/update_file_status.py +205 -349
  66. robosystems_client/api/user/create_user_api_key.py +1 -41
  67. robosystems_client/api/user/get_all_credit_summaries.py +14 -111
  68. robosystems_client/api/user/get_current_user.py +14 -75
  69. robosystems_client/api/user/list_user_api_keys.py +14 -75
  70. robosystems_client/api/user/revoke_user_api_key.py +1 -45
  71. robosystems_client/api/user/update_user.py +1 -41
  72. robosystems_client/api/user/update_user_api_key.py +1 -41
  73. robosystems_client/api/user/update_user_password.py +1 -41
  74. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -38
  75. robosystems_client/api/user_analytics/get_user_usage_overview.py +14 -75
  76. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +14 -105
  77. robosystems_client/api/user_limits/get_shared_repository_limits.py +1 -45
  78. robosystems_client/api/user_limits/get_user_limits.py +14 -75
  79. robosystems_client/api/user_limits/get_user_usage.py +14 -75
  80. robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +1 -45
  81. robosystems_client/api/user_subscriptions/get_repository_credits.py +1 -45
  82. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +14 -75
  83. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -38
  84. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +1 -41
  85. robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +1 -41
  86. robosystems_client/extensions/__init__.py +8 -1
  87. robosystems_client/extensions/auth_integration.py +1 -2
  88. robosystems_client/extensions/query_client.py +3 -2
  89. robosystems_client/extensions/sse_client.py +1 -1
  90. robosystems_client/extensions/table_ingest_client.py +5 -0
  91. robosystems_client/extensions/utils.py +2 -2
  92. robosystems_client/models/__init__.py +4 -4
  93. robosystems_client/models/create_graph_request.py +4 -3
  94. robosystems_client/models/cypher_query_request.py +5 -22
  95. robosystems_client/models/schema_export_response.py +4 -2
  96. robosystems_client/models/schema_info_response.py +77 -0
  97. robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
  98. robosystems_client/models/schema_validation_response.py +7 -6
  99. robosystems_client/models/table_query_request.py +37 -2
  100. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
  101. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +103 -102
  102. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
  103. {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 UNSET, Response, Unset
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
- r""" Update File Upload Status
134
-
135
- Update file status after upload completes.
136
-
137
- **Purpose:**
138
- Mark files as uploaded after successful S3 upload. The backend validates
139
- the file, calculates size and row count, enforces storage limits, and
140
- registers the DuckDB table for queries.
141
-
142
- **Status Values:**
143
- - `uploaded`: File successfully uploaded to S3 (triggers validation)
144
- - `disabled`: Exclude file from ingestion
145
- - `archived`: Soft delete file
146
-
147
- **What Happens on 'uploaded' Status:**
148
- 1. Verify file exists in S3
149
- 2. Calculate actual file size
150
- 3. Enforce tier storage limits
151
- 4. Calculate or estimate row count
152
- 5. Update table statistics
153
- 6. Register DuckDB external table
154
- 7. File ready for ingestion
155
-
156
- **Row Count Calculation:**
157
- - **Parquet**: Exact count from file metadata
158
- - **CSV**: Count rows (minus header)
159
- - **JSON**: Count array elements
160
- - **Fallback**: Estimate from file size if reading fails
161
-
162
- **Storage Limits:**
163
- Enforced per subscription tier:
164
- - Prevents uploads exceeding tier limit
165
- - Returns HTTP 413 if limit exceeded
166
- - Check current usage before large uploads
167
-
168
- **Example Response:**
169
- ```json
170
- {
171
- \"status\": \"success\",
172
- \"file_id\": \"f123\",
173
- \"upload_status\": \"uploaded\",
174
- \"file_size_bytes\": 1048576,
175
- \"row_count\": 5000,
176
- \"message\": \"File validated and ready for ingestion\"
177
- }
178
- ```
179
-
180
- **Example Usage:**
181
- ```bash
182
- # After uploading file to S3 presigned URL
183
- curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \
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
- r""" Update File Upload Status
242
-
243
- Update file status after upload completes.
244
-
245
- **Purpose:**
246
- Mark files as uploaded after successful S3 upload. The backend validates
247
- the file, calculates size and row count, enforces storage limits, and
248
- registers the DuckDB table for queries.
249
-
250
- **Status Values:**
251
- - `uploaded`: File successfully uploaded to S3 (triggers validation)
252
- - `disabled`: Exclude file from ingestion
253
- - `archived`: Soft delete file
254
-
255
- **What Happens on 'uploaded' Status:**
256
- 1. Verify file exists in S3
257
- 2. Calculate actual file size
258
- 3. Enforce tier storage limits
259
- 4. Calculate or estimate row count
260
- 5. Update table statistics
261
- 6. Register DuckDB external table
262
- 7. File ready for ingestion
263
-
264
- **Row Count Calculation:**
265
- - **Parquet**: Exact count from file metadata
266
- - **CSV**: Count rows (minus header)
267
- - **JSON**: Count array elements
268
- - **Fallback**: Estimate from file size if reading fails
269
-
270
- **Storage Limits:**
271
- Enforced per subscription tier:
272
- - Prevents uploads exceeding tier limit
273
- - Returns HTTP 413 if limit exceeded
274
- - Check current usage before large uploads
275
-
276
- **Example Response:**
277
- ```json
278
- {
279
- \"status\": \"success\",
280
- \"file_id\": \"f123\",
281
- \"upload_status\": \"uploaded\",
282
- \"file_size_bytes\": 1048576,
283
- \"row_count\": 5000,
284
- \"message\": \"File validated and ready for ingestion\"
285
- }
286
- ```
287
-
288
- **Example Usage:**
289
- ```bash
290
- # After uploading file to S3 presigned URL
291
- curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \
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
- r""" Update File Upload Status
345
-
346
- Update file status after upload completes.
347
-
348
- **Purpose:**
349
- Mark files as uploaded after successful S3 upload. The backend validates
350
- the file, calculates size and row count, enforces storage limits, and
351
- registers the DuckDB table for queries.
352
-
353
- **Status Values:**
354
- - `uploaded`: File successfully uploaded to S3 (triggers validation)
355
- - `disabled`: Exclude file from ingestion
356
- - `archived`: Soft delete file
357
-
358
- **What Happens on 'uploaded' Status:**
359
- 1. Verify file exists in S3
360
- 2. Calculate actual file size
361
- 3. Enforce tier storage limits
362
- 4. Calculate or estimate row count
363
- 5. Update table statistics
364
- 6. Register DuckDB external table
365
- 7. File ready for ingestion
366
-
367
- **Row Count Calculation:**
368
- - **Parquet**: Exact count from file metadata
369
- - **CSV**: Count rows (minus header)
370
- - **JSON**: Count array elements
371
- - **Fallback**: Estimate from file size if reading fails
372
-
373
- **Storage Limits:**
374
- Enforced per subscription tier:
375
- - Prevents uploads exceeding tier limit
376
- - Returns HTTP 413 if limit exceeded
377
- - Check current usage before large uploads
378
-
379
- **Example Response:**
380
- ```json
381
- {
382
- \"status\": \"success\",
383
- \"file_id\": \"f123\",
384
- \"upload_status\": \"uploaded\",
385
- \"file_size_bytes\": 1048576,
386
- \"row_count\": 5000,
387
- \"message\": \"File validated and ready for ingestion\"
388
- }
389
- ```
390
-
391
- **Example Usage:**
392
- ```bash
393
- # After uploading file to S3 presigned URL
394
- curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \
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
- r""" Update File Upload Status
451
-
452
- Update file status after upload completes.
453
-
454
- **Purpose:**
455
- Mark files as uploaded after successful S3 upload. The backend validates
456
- the file, calculates size and row count, enforces storage limits, and
457
- registers the DuckDB table for queries.
458
-
459
- **Status Values:**
460
- - `uploaded`: File successfully uploaded to S3 (triggers validation)
461
- - `disabled`: Exclude file from ingestion
462
- - `archived`: Soft delete file
463
-
464
- **What Happens on 'uploaded' Status:**
465
- 1. Verify file exists in S3
466
- 2. Calculate actual file size
467
- 3. Enforce tier storage limits
468
- 4. Calculate or estimate row count
469
- 5. Update table statistics
470
- 6. Register DuckDB external table
471
- 7. File ready for ingestion
472
-
473
- **Row Count Calculation:**
474
- - **Parquet**: Exact count from file metadata
475
- - **CSV**: Count rows (minus header)
476
- - **JSON**: Count array elements
477
- - **Fallback**: Estimate from file size if reading fails
478
-
479
- **Storage Limits:**
480
- Enforced per subscription tier:
481
- - Prevents uploads exceeding tier limit
482
- - Returns HTTP 413 if limit exceeded
483
- - Check current usage before large uploads
484
-
485
- **Example Response:**
486
- ```json
487
- {
488
- \"status\": \"success\",
489
- \"file_id\": \"f123\",
490
- \"upload_status\": \"uploaded\",
491
- \"file_size_bytes\": 1048576,
492
- \"row_count\": 5000,
493
- \"message\": \"File validated and ready for ingestion\"
494
- }
495
- ```
496
-
497
- **Example Usage:**
498
- ```bash
499
- # After uploading file to S3 presigned URL
500
- curl -X PATCH \"https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123\" \
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