robosystems-client 0.2.2__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 (121) 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 +68 -57
  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 +317 -0
  59. robosystems_client/api/tables/get_file_info.py +249 -0
  60. robosystems_client/api/tables/get_upload_url.py +352 -0
  61. robosystems_client/api/tables/ingest_tables.py +428 -0
  62. robosystems_client/api/tables/list_table_files.py +329 -0
  63. robosystems_client/api/tables/list_tables.py +316 -0
  64. robosystems_client/api/tables/query_tables.py +431 -0
  65. robosystems_client/api/tables/update_file_status.py +395 -0
  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/graph_client.py +5 -0
  89. robosystems_client/extensions/query_client.py +3 -2
  90. robosystems_client/extensions/sse_client.py +1 -1
  91. robosystems_client/extensions/table_ingest_client.py +36 -40
  92. robosystems_client/extensions/utils.py +2 -2
  93. robosystems_client/models/__init__.py +17 -21
  94. robosystems_client/models/create_graph_request.py +15 -3
  95. robosystems_client/models/cypher_query_request.py +5 -22
  96. robosystems_client/models/{delete_file_v1_graphs_graph_id_tables_files_file_id_delete_response_delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py → delete_file_response.py} +45 -9
  97. robosystems_client/models/file_info.py +169 -0
  98. robosystems_client/models/file_status_update.py +41 -0
  99. robosystems_client/models/get_file_info_response.py +205 -0
  100. robosystems_client/models/list_table_files_response.py +105 -0
  101. robosystems_client/models/schema_export_response.py +4 -2
  102. robosystems_client/models/schema_info_response.py +77 -0
  103. robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
  104. robosystems_client/models/schema_validation_response.py +7 -6
  105. robosystems_client/models/table_query_request.py +37 -2
  106. robosystems_client/models/{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 → update_file_status_response_updatefilestatus.py} +5 -8
  107. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
  108. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +110 -108
  109. robosystems_client/api/tables/delete_file_v1_graphs_graph_id_tables_files_file_id_delete.py +0 -287
  110. robosystems_client/api/tables/get_file_info_v1_graphs_graph_id_tables_files_file_id_get.py +0 -283
  111. robosystems_client/api/tables/get_upload_url_v1_graphs_graph_id_tables_table_name_files_post.py +0 -260
  112. robosystems_client/api/tables/ingest_tables_v1_graphs_graph_id_tables_ingest_post.py +0 -251
  113. robosystems_client/api/tables/list_table_files_v1_graphs_graph_id_tables_table_name_files_get.py +0 -283
  114. robosystems_client/api/tables/list_tables_v1_graphs_graph_id_tables_get.py +0 -224
  115. robosystems_client/api/tables/query_tables_v1_graphs_graph_id_tables_query_post.py +0 -247
  116. robosystems_client/api/tables/update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +0 -306
  117. robosystems_client/models/file_update_request.py +0 -62
  118. 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 +0 -47
  119. robosystems_client/models/update_file_v1_graphs_graph_id_tables_files_file_id_patch_response_update_file_v1_graphs_graph_id_tables_files_file_id_patch.py +0 -47
  120. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
  121. {robosystems_client-0.2.2.dist-info → robosystems_client-0.2.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,352 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.error_response import ErrorResponse
9
+ from ...models.file_upload_request import FileUploadRequest
10
+ from ...models.file_upload_response import FileUploadResponse
11
+ from ...models.http_validation_error import HTTPValidationError
12
+ from ...types import Response
13
+
14
+
15
+ def _get_kwargs(
16
+ graph_id: str,
17
+ table_name: str,
18
+ *,
19
+ body: FileUploadRequest,
20
+ ) -> dict[str, Any]:
21
+ headers: dict[str, Any] = {}
22
+
23
+ _kwargs: dict[str, Any] = {
24
+ "method": "post",
25
+ "url": f"/v1/graphs/{graph_id}/tables/{table_name}/files",
26
+ }
27
+
28
+ _kwargs["json"] = body.to_dict()
29
+
30
+ headers["Content-Type"] = "application/json"
31
+
32
+ _kwargs["headers"] = headers
33
+ return _kwargs
34
+
35
+
36
+ def _parse_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
39
+ if response.status_code == 200:
40
+ response_200 = FileUploadResponse.from_dict(response.json())
41
+
42
+ return response_200
43
+
44
+ if response.status_code == 400:
45
+ response_400 = ErrorResponse.from_dict(response.json())
46
+
47
+ return response_400
48
+
49
+ if response.status_code == 401:
50
+ response_401 = cast(Any, None)
51
+ return response_401
52
+
53
+ if response.status_code == 403:
54
+ response_403 = ErrorResponse.from_dict(response.json())
55
+
56
+ return response_403
57
+
58
+ if response.status_code == 404:
59
+ response_404 = ErrorResponse.from_dict(response.json())
60
+
61
+ return response_404
62
+
63
+ if response.status_code == 422:
64
+ response_422 = HTTPValidationError.from_dict(response.json())
65
+
66
+ return response_422
67
+
68
+ if response.status_code == 500:
69
+ response_500 = cast(Any, None)
70
+ return response_500
71
+
72
+ if client.raise_on_unexpected_status:
73
+ raise errors.UnexpectedStatus(response.status_code, response.content)
74
+ else:
75
+ return None
76
+
77
+
78
+ def _build_response(
79
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
80
+ ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
81
+ return Response(
82
+ status_code=HTTPStatus(response.status_code),
83
+ content=response.content,
84
+ headers=response.headers,
85
+ parsed=_parse_response(client=client, response=response),
86
+ )
87
+
88
+
89
+ def sync_detailed(
90
+ graph_id: str,
91
+ table_name: str,
92
+ *,
93
+ client: AuthenticatedClient,
94
+ body: FileUploadRequest,
95
+ ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
96
+ r"""Get File Upload URL
97
+
98
+ Generate a presigned S3 URL for secure file upload.
99
+
100
+ Initiates file upload to a staging table by generating a secure, time-limited
101
+ presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
102
+ optimal performance.
103
+
104
+ **Upload Workflow:**
105
+ 1. Call this endpoint to get presigned URL
106
+ 2. PUT file directly to S3 URL
107
+ 3. Call PATCH /tables/files/{file_id} with status='uploaded'
108
+ 4. Backend validates file and calculates metrics
109
+ 5. File ready for ingestion
110
+
111
+ **Supported Formats:**
112
+ - Parquet (`application/x-parquet` with `.parquet` extension)
113
+ - CSV (`text/csv` with `.csv` extension)
114
+ - JSON (`application/json` with `.json` extension)
115
+
116
+ **Validation:**
117
+ - File extension must match content type
118
+ - File name 1-255 characters
119
+ - No path traversal characters (.. / \)
120
+ - Auto-creates table if it doesn't exist
121
+
122
+ **Auto-Table Creation:**
123
+ Tables are automatically created on first file upload with type inferred from name
124
+ (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
125
+
126
+ **Important Notes:**
127
+ - Presigned URLs expire (default: 1 hour)
128
+ - Use appropriate Content-Type header when uploading to S3
129
+ - File extension must match content type
130
+ - Upload URL generation is included - no credit consumption
131
+
132
+ Args:
133
+ graph_id (str):
134
+ table_name (str): Table name
135
+ body (FileUploadRequest):
136
+
137
+ Raises:
138
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
139
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
140
+
141
+ Returns:
142
+ Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
143
+ """
144
+
145
+ kwargs = _get_kwargs(
146
+ graph_id=graph_id,
147
+ table_name=table_name,
148
+ body=body,
149
+ )
150
+
151
+ response = client.get_httpx_client().request(
152
+ **kwargs,
153
+ )
154
+
155
+ return _build_response(client=client, response=response)
156
+
157
+
158
+ def sync(
159
+ graph_id: str,
160
+ table_name: str,
161
+ *,
162
+ client: AuthenticatedClient,
163
+ body: FileUploadRequest,
164
+ ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
165
+ r"""Get File Upload URL
166
+
167
+ Generate a presigned S3 URL for secure file upload.
168
+
169
+ Initiates file upload to a staging table by generating a secure, time-limited
170
+ presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
171
+ optimal performance.
172
+
173
+ **Upload Workflow:**
174
+ 1. Call this endpoint to get presigned URL
175
+ 2. PUT file directly to S3 URL
176
+ 3. Call PATCH /tables/files/{file_id} with status='uploaded'
177
+ 4. Backend validates file and calculates metrics
178
+ 5. File ready for ingestion
179
+
180
+ **Supported Formats:**
181
+ - Parquet (`application/x-parquet` with `.parquet` extension)
182
+ - CSV (`text/csv` with `.csv` extension)
183
+ - JSON (`application/json` with `.json` extension)
184
+
185
+ **Validation:**
186
+ - File extension must match content type
187
+ - File name 1-255 characters
188
+ - No path traversal characters (.. / \)
189
+ - Auto-creates table if it doesn't exist
190
+
191
+ **Auto-Table Creation:**
192
+ Tables are automatically created on first file upload with type inferred from name
193
+ (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
194
+
195
+ **Important Notes:**
196
+ - Presigned URLs expire (default: 1 hour)
197
+ - Use appropriate Content-Type header when uploading to S3
198
+ - File extension must match content type
199
+ - Upload URL generation is included - no credit consumption
200
+
201
+ Args:
202
+ graph_id (str):
203
+ table_name (str): Table name
204
+ body (FileUploadRequest):
205
+
206
+ Raises:
207
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
208
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
209
+
210
+ Returns:
211
+ Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
212
+ """
213
+
214
+ return sync_detailed(
215
+ graph_id=graph_id,
216
+ table_name=table_name,
217
+ client=client,
218
+ body=body,
219
+ ).parsed
220
+
221
+
222
+ async def asyncio_detailed(
223
+ graph_id: str,
224
+ table_name: str,
225
+ *,
226
+ client: AuthenticatedClient,
227
+ body: FileUploadRequest,
228
+ ) -> Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
229
+ r"""Get File Upload URL
230
+
231
+ Generate a presigned S3 URL for secure file upload.
232
+
233
+ Initiates file upload to a staging table by generating a secure, time-limited
234
+ presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
235
+ optimal performance.
236
+
237
+ **Upload Workflow:**
238
+ 1. Call this endpoint to get presigned URL
239
+ 2. PUT file directly to S3 URL
240
+ 3. Call PATCH /tables/files/{file_id} with status='uploaded'
241
+ 4. Backend validates file and calculates metrics
242
+ 5. File ready for ingestion
243
+
244
+ **Supported Formats:**
245
+ - Parquet (`application/x-parquet` with `.parquet` extension)
246
+ - CSV (`text/csv` with `.csv` extension)
247
+ - JSON (`application/json` with `.json` extension)
248
+
249
+ **Validation:**
250
+ - File extension must match content type
251
+ - File name 1-255 characters
252
+ - No path traversal characters (.. / \)
253
+ - Auto-creates table if it doesn't exist
254
+
255
+ **Auto-Table Creation:**
256
+ Tables are automatically created on first file upload with type inferred from name
257
+ (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
258
+
259
+ **Important Notes:**
260
+ - Presigned URLs expire (default: 1 hour)
261
+ - Use appropriate Content-Type header when uploading to S3
262
+ - File extension must match content type
263
+ - Upload URL generation is included - no credit consumption
264
+
265
+ Args:
266
+ graph_id (str):
267
+ table_name (str): Table name
268
+ body (FileUploadRequest):
269
+
270
+ Raises:
271
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
272
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
273
+
274
+ Returns:
275
+ Response[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]
276
+ """
277
+
278
+ kwargs = _get_kwargs(
279
+ graph_id=graph_id,
280
+ table_name=table_name,
281
+ body=body,
282
+ )
283
+
284
+ response = await client.get_async_httpx_client().request(**kwargs)
285
+
286
+ return _build_response(client=client, response=response)
287
+
288
+
289
+ async def asyncio(
290
+ graph_id: str,
291
+ table_name: str,
292
+ *,
293
+ client: AuthenticatedClient,
294
+ body: FileUploadRequest,
295
+ ) -> Optional[Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]]:
296
+ r"""Get File Upload URL
297
+
298
+ Generate a presigned S3 URL for secure file upload.
299
+
300
+ Initiates file upload to a staging table by generating a secure, time-limited
301
+ presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
302
+ optimal performance.
303
+
304
+ **Upload Workflow:**
305
+ 1. Call this endpoint to get presigned URL
306
+ 2. PUT file directly to S3 URL
307
+ 3. Call PATCH /tables/files/{file_id} with status='uploaded'
308
+ 4. Backend validates file and calculates metrics
309
+ 5. File ready for ingestion
310
+
311
+ **Supported Formats:**
312
+ - Parquet (`application/x-parquet` with `.parquet` extension)
313
+ - CSV (`text/csv` with `.csv` extension)
314
+ - JSON (`application/json` with `.json` extension)
315
+
316
+ **Validation:**
317
+ - File extension must match content type
318
+ - File name 1-255 characters
319
+ - No path traversal characters (.. / \)
320
+ - Auto-creates table if it doesn't exist
321
+
322
+ **Auto-Table Creation:**
323
+ Tables are automatically created on first file upload with type inferred from name
324
+ (e.g., \"Transaction\" → relationship) and empty schema populated during ingestion.
325
+
326
+ **Important Notes:**
327
+ - Presigned URLs expire (default: 1 hour)
328
+ - Use appropriate Content-Type header when uploading to S3
329
+ - File extension must match content type
330
+ - Upload URL generation is included - no credit consumption
331
+
332
+ Args:
333
+ graph_id (str):
334
+ table_name (str): Table name
335
+ body (FileUploadRequest):
336
+
337
+ Raises:
338
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
339
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
340
+
341
+ Returns:
342
+ Union[Any, ErrorResponse, FileUploadResponse, HTTPValidationError]
343
+ """
344
+
345
+ return (
346
+ await asyncio_detailed(
347
+ graph_id=graph_id,
348
+ table_name=table_name,
349
+ client=client,
350
+ body=body,
351
+ )
352
+ ).parsed