diff --git a/.vscode/tasks.json b/.vscode/tasks.json index eb7215d..59540a9 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -17,9 +17,9 @@ "group": "build" }, { - "label": "Generate Client", + "label": "Generate SDK", "type": "shell", - "command": "just generate-client ${input:apiUrl}", + "command": "just generate-sdk ${input:apiUrl}", "problemMatcher": [], "group": "build" }, diff --git a/justfile b/justfile index c9745cd..e5a121e 100644 --- a/justfile +++ b/justfile @@ -71,8 +71,8 @@ clean: find . -type d -name "__pycache__" -exec rm -rf {} + find . -type f -name "*.pyc" -delete -# Generate Client from localhost API -generate-client url="http://localhost:8000/openapi.json": +# Generate SDK from localhost API +generate-sdk url="http://localhost:8000/openapi.json": @echo "🚀 Generating Client from {{url}}..." rm -rf generated openapi-python-client generate --url {{url}} --output-path generated --config robosystems_client/sdk-config.yaml diff --git a/pyproject.toml b/pyproject.toml index 8ab4d4a..ace185d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "robosystems-client" -version = "0.1.10" +version = "0.1.11" description = "Python Client for RoboSystems financial graph database API" readme = "README.md" requires-python = ">=3.10" diff --git a/robosystems_client/api/agent/query_financial_agent.py b/robosystems_client/api/agent/query_financial_agent.py index c6ddda4..423bcaf 100644 --- a/robosystems_client/api/agent/query_financial_agent.py +++ b/robosystems_client/api/agent/query_financial_agent.py @@ -137,10 +137,10 @@ def sync_detailed( - Fallback to status polling endpoint if SSE unavailable **Credit Consumption:** - - Variable based on complexity: 3-60 credits - - Simple queries: 3-15 credits - - Complex analysis: 15-60 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + - AI operations consume credits based on actual token usage + - Claude 4 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens + - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens + - Credits are consumed after operation completes based on actual usage The agent automatically determines query complexity or you can force extended analysis. @@ -224,10 +224,10 @@ def sync( - Fallback to status polling endpoint if SSE unavailable **Credit Consumption:** - - Variable based on complexity: 3-60 credits - - Simple queries: 3-15 credits - - Complex analysis: 15-60 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + - AI operations consume credits based on actual token usage + - Claude 4 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens + - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens + - Credits are consumed after operation completes based on actual usage The agent automatically determines query complexity or you can force extended analysis. @@ -306,10 +306,10 @@ async def asyncio_detailed( - Fallback to status polling endpoint if SSE unavailable **Credit Consumption:** - - Variable based on complexity: 3-60 credits - - Simple queries: 3-15 credits - - Complex analysis: 15-60 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + - AI operations consume credits based on actual token usage + - Claude 4 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens + - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens + - Credits are consumed after operation completes based on actual usage The agent automatically determines query complexity or you can force extended analysis. @@ -391,10 +391,10 @@ async def asyncio( - Fallback to status polling endpoint if SSE unavailable **Credit Consumption:** - - Variable based on complexity: 3-60 credits - - Simple queries: 3-15 credits - - Complex analysis: 15-60 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + - AI operations consume credits based on actual token usage + - Claude 4 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens + - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens + - Credits are consumed after operation completes based on actual usage The agent automatically determines query complexity or you can force extended analysis. diff --git a/robosystems_client/api/backup/create_backup.py b/robosystems_client/api/backup/create_backup.py index b657ab0..517bd30 100644 --- a/robosystems_client/api/backup/create_backup.py +++ b/robosystems_client/api/backup/create_backup.py @@ -50,10 +50,6 @@ def _parse_response( response_400 = ErrorResponse.from_dict(response.json()) return response_400 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) diff --git a/robosystems_client/api/backup/export_backup.py b/robosystems_client/api/backup/export_backup.py index 4c0152c..6ba9281 100644 --- a/robosystems_client/api/backup/export_backup.py +++ b/robosystems_client/api/backup/export_backup.py @@ -45,9 +45,6 @@ def _parse_response( if response.status_code == 200: response_200 = response.json() return response_200 - if response.status_code == 402: - response_402 = cast(Any, None) - return response_402 if response.status_code == 403: response_403 = cast(Any, None) return response_403 diff --git a/robosystems_client/api/backup/get_backup_download_url.py b/robosystems_client/api/backup/get_backup_download_url.py index f8ca821..22bfba6 100644 --- a/robosystems_client/api/backup/get_backup_download_url.py +++ b/robosystems_client/api/backup/get_backup_download_url.py @@ -36,7 +36,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/backup/{backup_id}/download-url", + "url": f"/v1/{graph_id}/backup/{backup_id}/download", "params": params, "cookies": cookies, } diff --git a/robosystems_client/api/backup/restore_backup.py b/robosystems_client/api/backup/restore_backup.py index f6862de..12522ca 100644 --- a/robosystems_client/api/backup/restore_backup.py +++ b/robosystems_client/api/backup/restore_backup.py @@ -50,10 +50,6 @@ def _parse_response( response_400 = ErrorResponse.from_dict(response.json()) return response_400 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) diff --git a/robosystems_client/api/connections/create_connection.py b/robosystems_client/api/connections/create_connection.py index 2b760bc..7de5e99 100644 --- a/robosystems_client/api/connections/create_connection.py +++ b/robosystems_client/api/connections/create_connection.py @@ -52,10 +52,6 @@ def _parse_response( response_400 = ErrorResponse.from_dict(response.json()) return response_400 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) @@ -118,10 +114,8 @@ def sync_detailed( - User completes bank authentication - Exchange public token for access - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier - - Additional credits consumed during data sync + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier @@ -180,10 +174,8 @@ def sync( - User completes bank authentication - Exchange public token for access - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier - - Additional credits consumed during data sync + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier @@ -237,10 +229,8 @@ async def asyncio_detailed( - User completes bank authentication - Exchange public token for access - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier - - Additional credits consumed during data sync + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier @@ -297,10 +287,8 @@ async def asyncio( - User completes bank authentication - Exchange public token for access - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier - - Additional credits consumed during data sync + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier diff --git a/robosystems_client/api/connections/delete_connection.py b/robosystems_client/api/connections/delete_connection.py index 81803c0..f6f7dbe 100644 --- a/robosystems_client/api/connections/delete_connection.py +++ b/robosystems_client/api/connections/delete_connection.py @@ -43,10 +43,6 @@ def _parse_response( response_200 = SuccessResponse.from_dict(response.json()) return response_200 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) @@ -98,9 +94,8 @@ def sync_detailed( - Performs provider-specific cleanup - Revokes stored credentials - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Only users with admin role can delete connections. @@ -150,9 +145,8 @@ def sync( - Performs provider-specific cleanup - Revokes stored credentials - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Only users with admin role can delete connections. @@ -197,9 +191,8 @@ async def asyncio_detailed( - Performs provider-specific cleanup - Revokes stored credentials - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Only users with admin role can delete connections. @@ -247,9 +240,8 @@ async def asyncio( - Performs provider-specific cleanup - Revokes stored credentials - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Only users with admin role can delete connections. diff --git a/robosystems_client/api/connections/sync_connection.py b/robosystems_client/api/connections/sync_connection.py index 3e0e92a..b5be57f 100644 --- a/robosystems_client/api/connections/sync_connection.py +++ b/robosystems_client/api/connections/sync_connection.py @@ -53,10 +53,6 @@ def _parse_response( response_200 = SyncConnectionResponseSyncconnection.from_dict(response.json()) return response_200 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) @@ -125,10 +121,8 @@ def sync_detailed( - Updates account balances - Categorizes new transactions - Credit consumption: - - Base cost: 20.0 credits - - Multiplied by graph tier - - Additional credits may be consumed during processing + Note: + This operation is FREE - no credit consumption required. Returns a task ID for monitoring sync progress. @@ -195,10 +189,8 @@ def sync( - Updates account balances - Categorizes new transactions - Credit consumption: - - Base cost: 20.0 credits - - Multiplied by graph tier - - Additional credits may be consumed during processing + Note: + This operation is FREE - no credit consumption required. Returns a task ID for monitoring sync progress. @@ -260,10 +252,8 @@ async def asyncio_detailed( - Updates account balances - Categorizes new transactions - Credit consumption: - - Base cost: 20.0 credits - - Multiplied by graph tier - - Additional credits may be consumed during processing + Note: + This operation is FREE - no credit consumption required. Returns a task ID for monitoring sync progress. @@ -328,10 +318,8 @@ async def asyncio( - Updates account balances - Categorizes new transactions - Credit consumption: - - Base cost: 20.0 credits - - Multiplied by graph tier - - Additional credits may be consumed during processing + Note: + This operation is FREE - no credit consumption required. Returns a task ID for monitoring sync progress. diff --git a/robosystems_client/api/create/get_available_extensions.py b/robosystems_client/api/create/get_available_extensions.py index 8cb51ec..3e55268 100644 --- a/robosystems_client/api/create/get_available_extensions.py +++ b/robosystems_client/api/create/get_available_extensions.py @@ -12,7 +12,7 @@ def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/create/graph/available-extensions", + "url": "/v1/create/graph/extensions", } return _kwargs diff --git a/robosystems_client/api/graph_analytics/get_graph_metrics.py b/robosystems_client/api/graph_analytics/get_graph_metrics.py index 7befe12..833c047 100644 --- a/robosystems_client/api/graph_analytics/get_graph_metrics.py +++ b/robosystems_client/api/graph_analytics/get_graph_metrics.py @@ -42,10 +42,6 @@ def _parse_response( response_200 = GraphMetricsResponse.from_dict(response.json()) return response_200 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) @@ -103,9 +99,8 @@ def sync_detailed( - Capacity planning - Performance optimization - Credit consumption: - - Base cost: 15.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get metrics for @@ -157,9 +152,8 @@ def sync( - Capacity planning - Performance optimization - Credit consumption: - - Base cost: 15.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get metrics for @@ -206,9 +200,8 @@ async def asyncio_detailed( - Capacity planning - Performance optimization - Credit consumption: - - Base cost: 15.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get metrics for @@ -258,9 +251,8 @@ async def asyncio( - Capacity planning - Performance optimization - Credit consumption: - - Base cost: 15.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get metrics for diff --git a/robosystems_client/api/graph_analytics/get_graph_usage_stats.py b/robosystems_client/api/graph_analytics/get_graph_usage_stats.py index d63366b..963ceb6 100644 --- a/robosystems_client/api/graph_analytics/get_graph_usage_stats.py +++ b/robosystems_client/api/graph_analytics/get_graph_usage_stats.py @@ -50,10 +50,6 @@ def _parse_response( response_200 = GraphUsageResponse.from_dict(response.json()) return response_200 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) @@ -114,9 +110,8 @@ def sync_detailed( - Usage trend analysis - Performance tuning - Credit consumption: - - Base cost: 10.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get usage stats for @@ -178,9 +173,8 @@ def sync( - Usage trend analysis - Performance tuning - Credit consumption: - - Base cost: 10.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get usage stats for @@ -237,9 +231,8 @@ async def asyncio_detailed( - Usage trend analysis - Performance tuning - Credit consumption: - - Base cost: 10.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get usage stats for @@ -299,9 +292,8 @@ async def asyncio( - Usage trend analysis - Performance tuning - Credit consumption: - - Base cost: 10.0 credits - - Multiplied by graph tier + Note: + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph ID to get usage stats for diff --git a/robosystems_client/api/mcp/call_mcp_tool.py b/robosystems_client/api/mcp/call_mcp_tool.py index e378b0d..f146657 100644 --- a/robosystems_client/api/mcp/call_mcp_tool.py +++ b/robosystems_client/api/mcp/call_mcp_tool.py @@ -158,11 +158,8 @@ def sync_detailed( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Credit Consumption:** - - Simple tools: 2-5 credits - - Schema tools: 5-10 credits - - Query tools: 10-50 credits (based on complexity) - - Multiplied by graph tier + **Note:** + MCP tool calls are currently FREE and do not consume credits. Args: graph_id (str): Graph database identifier @@ -240,11 +237,8 @@ def sync( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Credit Consumption:** - - Simple tools: 2-5 credits - - Schema tools: 5-10 credits - - Query tools: 10-50 credits (based on complexity) - - Multiplied by graph tier + **Note:** + MCP tool calls are currently FREE and do not consume credits. Args: graph_id (str): Graph database identifier @@ -317,11 +311,8 @@ async def asyncio_detailed( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Credit Consumption:** - - Simple tools: 2-5 credits - - Schema tools: 5-10 credits - - Query tools: 10-50 credits (based on complexity) - - Multiplied by graph tier + **Note:** + MCP tool calls are currently FREE and do not consume credits. Args: graph_id (str): Graph database identifier @@ -397,11 +388,8 @@ async def asyncio( - `408 Request Timeout`: Tool execution exceeded timeout - Clients should implement exponential backoff on errors - **Credit Consumption:** - - Simple tools: 2-5 credits - - Schema tools: 5-10 credits - - Query tools: 10-50 credits (based on complexity) - - Multiplied by graph tier + **Note:** + MCP tool calls are currently FREE and do not consume credits. Args: graph_id (str): Graph database identifier diff --git a/robosystems_client/api/query/execute_cypher_query.py b/robosystems_client/api/query/execute_cypher_query.py index 8f19fab..f351f80 100644 --- a/robosystems_client/api/query/execute_cypher_query.py +++ b/robosystems_client/api/query/execute_cypher_query.py @@ -73,9 +73,6 @@ def _parse_response( if response.status_code == 400: response_400 = cast(Any, None) return response_400 - if response.status_code == 402: - response_402 = cast(Any, None) - return response_402 if response.status_code == 403: response_403 = cast(Any, None) return response_403 @@ -136,7 +133,7 @@ def sync_detailed( **Response Modes:** - `auto` (default): Intelligent automatic selection - `sync`: Force synchronous JSON response (best for testing) - - `async`: Force queued response with polling URLs + - `async`: Force queued response with SSE monitoring endpoints (no polling needed) - `stream`: Force streaming response (SSE or NDJSON) **Client Detection:** @@ -159,19 +156,19 @@ def sync_detailed( **Queue Management:** - Automatic queuing under high load - - SSE-based queue monitoring (no polling needed) + - Real-time monitoring via SSE events (no polling needed) - Priority based on subscription tier - - Queue position updates via SSE events + - Queue position and progress updates pushed via SSE + - Connect to returned `/v1/operations/{id}/stream` endpoint for updates **Error Handling:** - `429 Too Many Requests`: Rate limit or connection limit exceeded - `503 Service Unavailable`: Circuit breaker open or SSE disabled - Clients should implement exponential backoff - **Credit Consumption:** - - Variable based on query complexity: 1-50 credits - - Streaming queries charged per 1000 rows - - Queue position based on subscription tier + **Note:** + Query operations are FREE - no credit consumption required. + Queue position is based on subscription tier for priority. Args: graph_id (str): Graph database identifier @@ -231,7 +228,7 @@ def sync( **Response Modes:** - `auto` (default): Intelligent automatic selection - `sync`: Force synchronous JSON response (best for testing) - - `async`: Force queued response with polling URLs + - `async`: Force queued response with SSE monitoring endpoints (no polling needed) - `stream`: Force streaming response (SSE or NDJSON) **Client Detection:** @@ -254,19 +251,19 @@ def sync( **Queue Management:** - Automatic queuing under high load - - SSE-based queue monitoring (no polling needed) + - Real-time monitoring via SSE events (no polling needed) - Priority based on subscription tier - - Queue position updates via SSE events + - Queue position and progress updates pushed via SSE + - Connect to returned `/v1/operations/{id}/stream` endpoint for updates **Error Handling:** - `429 Too Many Requests`: Rate limit or connection limit exceeded - `503 Service Unavailable`: Circuit breaker open or SSE disabled - Clients should implement exponential backoff - **Credit Consumption:** - - Variable based on query complexity: 1-50 credits - - Streaming queries charged per 1000 rows - - Queue position based on subscription tier + **Note:** + Query operations are FREE - no credit consumption required. + Queue position is based on subscription tier for priority. Args: graph_id (str): Graph database identifier @@ -321,7 +318,7 @@ async def asyncio_detailed( **Response Modes:** - `auto` (default): Intelligent automatic selection - `sync`: Force synchronous JSON response (best for testing) - - `async`: Force queued response with polling URLs + - `async`: Force queued response with SSE monitoring endpoints (no polling needed) - `stream`: Force streaming response (SSE or NDJSON) **Client Detection:** @@ -344,19 +341,19 @@ async def asyncio_detailed( **Queue Management:** - Automatic queuing under high load - - SSE-based queue monitoring (no polling needed) + - Real-time monitoring via SSE events (no polling needed) - Priority based on subscription tier - - Queue position updates via SSE events + - Queue position and progress updates pushed via SSE + - Connect to returned `/v1/operations/{id}/stream` endpoint for updates **Error Handling:** - `429 Too Many Requests`: Rate limit or connection limit exceeded - `503 Service Unavailable`: Circuit breaker open or SSE disabled - Clients should implement exponential backoff - **Credit Consumption:** - - Variable based on query complexity: 1-50 credits - - Streaming queries charged per 1000 rows - - Queue position based on subscription tier + **Note:** + Query operations are FREE - no credit consumption required. + Queue position is based on subscription tier for priority. Args: graph_id (str): Graph database identifier @@ -414,7 +411,7 @@ async def asyncio( **Response Modes:** - `auto` (default): Intelligent automatic selection - `sync`: Force synchronous JSON response (best for testing) - - `async`: Force queued response with polling URLs + - `async`: Force queued response with SSE monitoring endpoints (no polling needed) - `stream`: Force streaming response (SSE or NDJSON) **Client Detection:** @@ -437,19 +434,19 @@ async def asyncio( **Queue Management:** - Automatic queuing under high load - - SSE-based queue monitoring (no polling needed) + - Real-time monitoring via SSE events (no polling needed) - Priority based on subscription tier - - Queue position updates via SSE events + - Queue position and progress updates pushed via SSE + - Connect to returned `/v1/operations/{id}/stream` endpoint for updates **Error Handling:** - `429 Too Many Requests`: Rate limit or connection limit exceeded - `503 Service Unavailable`: Circuit breaker open or SSE disabled - Clients should implement exponential backoff - **Credit Consumption:** - - Variable based on query complexity: 1-50 credits - - Streaming queries charged per 1000 rows - - Queue position based on subscription tier + **Note:** + Query operations are FREE - no credit consumption required. + Queue position is based on subscription tier for priority. Args: graph_id (str): Graph database identifier diff --git a/robosystems_client/api/schema/get_graph_schema_info.py b/robosystems_client/api/schema/get_graph_schema_info.py index 1b9ffd6..3db052d 100644 --- a/robosystems_client/api/schema/get_graph_schema_info.py +++ b/robosystems_client/api/schema/get_graph_schema_info.py @@ -47,9 +47,6 @@ def _parse_response( ) return response_200 - if response.status_code == 402: - response_402 = cast(Any, None) - return response_402 if response.status_code == 403: response_403 = cast(Any, None) return response_403 @@ -100,10 +97,7 @@ def sync_detailed( This is different from custom schema management - it shows what actually exists in the database, useful for understanding the current graph structure before writing queries. - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) - - Schema information is cached for performance + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph database to get schema for @@ -152,10 +146,7 @@ def sync( This is different from custom schema management - it shows what actually exists in the database, useful for understanding the current graph structure before writing queries. - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) - - Schema information is cached for performance + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph database to get schema for @@ -199,10 +190,7 @@ async def asyncio_detailed( This is different from custom schema management - it shows what actually exists in the database, useful for understanding the current graph structure before writing queries. - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) - - Schema information is cached for performance + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph database to get schema for @@ -249,10 +237,7 @@ async def asyncio( This is different from custom schema management - it shows what actually exists in the database, useful for understanding the current graph structure before writing queries. - Credit consumption: - - Base cost: 2.0 credits - - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x) - - Schema information is cached for performance + This operation is FREE - no credit consumption required. Args: graph_id (str): The graph database to get schema for diff --git a/robosystems_client/api/schema/validate_schema.py b/robosystems_client/api/schema/validate_schema.py index 878f067..915126d 100644 --- a/robosystems_client/api/schema/validate_schema.py +++ b/robosystems_client/api/schema/validate_schema.py @@ -51,10 +51,6 @@ def _parse_response( response_400 = ErrorResponse.from_dict(response.json()) return response_400 - if response.status_code == 402: - response_402 = ErrorResponse.from_dict(response.json()) - - return response_402 if response.status_code == 403: response_403 = ErrorResponse.from_dict(response.json()) @@ -115,9 +111,7 @@ def sync_detailed( - Performance problems - Naming conflicts - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier @@ -178,9 +172,7 @@ def sync( - Performance problems - Naming conflicts - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier @@ -236,9 +228,7 @@ async def asyncio_detailed( - Performance problems - Naming conflicts - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier @@ -297,9 +287,7 @@ async def asyncio( - Performance problems - Naming conflicts - Credit consumption: - - Base cost: 5.0 credits - - Multiplied by graph tier + This operation is FREE - no credit consumption required. Args: graph_id (str): Graph database identifier diff --git a/robosystems_client/api/service_offerings/get_service_offerings.py b/robosystems_client/api/service_offerings/get_service_offerings.py index f300927..e651563 100644 --- a/robosystems_client/api/service_offerings/get_service_offerings.py +++ b/robosystems_client/api/service_offerings/get_service_offerings.py @@ -58,7 +58,7 @@ def sync_detailed( applications to display subscription options. Includes: - - Graph subscription tiers (trial, standard, enterprise, premium) + - Graph subscription tiers (standard, enterprise, premium) - Shared repository subscriptions (SEC, industry, economic data) - Operation costs and credit information - Features and capabilities for each tier @@ -98,7 +98,7 @@ def sync( applications to display subscription options. Includes: - - Graph subscription tiers (trial, standard, enterprise, premium) + - Graph subscription tiers (standard, enterprise, premium) - Shared repository subscriptions (SEC, industry, economic data) - Operation costs and credit information - Features and capabilities for each tier @@ -134,7 +134,7 @@ async def asyncio_detailed( applications to display subscription options. Includes: - - Graph subscription tiers (trial, standard, enterprise, premium) + - Graph subscription tiers (standard, enterprise, premium) - Shared repository subscriptions (SEC, industry, economic data) - Operation costs and credit information - Features and capabilities for each tier @@ -172,7 +172,7 @@ async def asyncio( applications to display subscription options. Includes: - - Graph subscription tiers (trial, standard, enterprise, premium) + - Graph subscription tiers (standard, enterprise, premium) - Shared repository subscriptions (SEC, industry, economic data) - Operation costs and credit information - Features and capabilities for each tier diff --git a/robosystems_client/api/status/get_mcp_health.py b/robosystems_client/api/status/get_mcp_health.py deleted file mode 100644 index b044148..0000000 --- a/robosystems_client/api/status/get_mcp_health.py +++ /dev/null @@ -1,136 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.get_mcp_health_response_getmcphealth import ( - GetMCPHealthResponseGetmcphealth, -) -from ...types import Response - - -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/mcp/health", - } - - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[GetMCPHealthResponseGetmcphealth]: - if response.status_code == 200: - response_200 = GetMCPHealthResponseGetmcphealth.from_dict(response.json()) - - return response_200 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[GetMCPHealthResponseGetmcphealth]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[GetMCPHealthResponseGetmcphealth]: - """MCP System Health Check - - Basic health check for MCP system components - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[GetMCPHealthResponseGetmcphealth] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[GetMCPHealthResponseGetmcphealth]: - """MCP System Health Check - - Basic health check for MCP system components - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - GetMCPHealthResponseGetmcphealth - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[GetMCPHealthResponseGetmcphealth]: - """MCP System Health Check - - Basic health check for MCP system components - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[GetMCPHealthResponseGetmcphealth] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[GetMCPHealthResponseGetmcphealth]: - """MCP System Health Check - - Basic health check for MCP system components - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - GetMCPHealthResponseGetmcphealth - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/robosystems_client/api/user/select_user_graph.py b/robosystems_client/api/user/select_user_graph.py index 710797f..8dfd2c8 100644 --- a/robosystems_client/api/user/select_user_graph.py +++ b/robosystems_client/api/user/select_user_graph.py @@ -27,7 +27,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/user/graphs/select/{graph_id}", + "url": f"/v1/user/graphs/{graph_id}/select", "cookies": cookies, } diff --git a/robosystems_client/api/user_limits/get_all_shared_repository_limits.py b/robosystems_client/api/user_limits/get_all_shared_repository_limits.py new file mode 100644 index 0000000..2151244 --- /dev/null +++ b/robosystems_client/api/user_limits/get_all_shared_repository_limits.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_all_shared_repository_limits_response_getallsharedrepositorylimits import ( + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(authorization, Unset): + headers["authorization"] = authorization + + cookies = {} + if auth_token is not UNSET: + cookies["auth-token"] = auth_token + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/user/limits/shared-repositories/summary", + "cookies": cookies, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ + Union[ + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, + HTTPValidationError, + ] +]: + if response.status_code == 200: + response_200 = ( + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits.from_dict( + response.json() + ) + ) + + return response_200 + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ + Union[ + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, + HTTPValidationError, + ] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[ + Union[ + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, + HTTPValidationError, + ] +]: + """Get all shared repository limits + + Get rate limit status for all shared repositories the user has access to. + + Args: + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + authorization=authorization, + auth_token=auth_token, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[ + Union[ + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, + HTTPValidationError, + ] +]: + """Get all shared repository limits + + Get rate limit status for all shared repositories the user has access to. + + Args: + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError] + """ + + return sync_detailed( + client=client, + authorization=authorization, + auth_token=auth_token, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[ + Union[ + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, + HTTPValidationError, + ] +]: + """Get all shared repository limits + + Get rate limit status for all shared repositories the user has access to. + + Args: + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + authorization=authorization, + auth_token=auth_token, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[ + Union[ + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, + HTTPValidationError, + ] +]: + """Get all shared repository limits + + Get rate limit status for all shared repositories the user has access to. + + Args: + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, HTTPValidationError] + """ + + return ( + await asyncio_detailed( + client=client, + authorization=authorization, + auth_token=auth_token, + ) + ).parsed diff --git a/robosystems_client/api/user_limits/get_shared_repository_limits.py b/robosystems_client/api/user_limits/get_shared_repository_limits.py new file mode 100644 index 0000000..f07550c --- /dev/null +++ b/robosystems_client/api/user_limits/get_shared_repository_limits.py @@ -0,0 +1,248 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_shared_repository_limits_response_getsharedrepositorylimits import ( + GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + repository: str, + *, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(authorization, Unset): + headers["authorization"] = authorization + + cookies = {} + if auth_token is not UNSET: + cookies["auth-token"] = auth_token + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/user/limits/shared-repositories/{repository}", + "cookies": cookies, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] +]: + if response.status_code == 200: + response_200 = GetSharedRepositoryLimitsResponseGetsharedrepositorylimits.from_dict( + response.json() + ) + + return response_200 + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + repository: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[ + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] +]: + """Get shared repository rate limit status + + Get current rate limit status and usage for a shared repository. + + Returns: + - Current usage across different time windows + - Rate limits based on subscription tier + - Remaining quota + - Reset times + + Note: All queries are FREE - this only shows rate limit status. + + Args: + repository (str): Repository name (e.g., 'sec') + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + repository=repository, + authorization=authorization, + auth_token=auth_token, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + repository: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[ + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] +]: + """Get shared repository rate limit status + + Get current rate limit status and usage for a shared repository. + + Returns: + - Current usage across different time windows + - Rate limits based on subscription tier + - Remaining quota + - Reset times + + Note: All queries are FREE - this only shows rate limit status. + + Args: + repository (str): Repository name (e.g., 'sec') + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] + """ + + return sync_detailed( + repository=repository, + client=client, + authorization=authorization, + auth_token=auth_token, + ).parsed + + +async def asyncio_detailed( + repository: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[ + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] +]: + """Get shared repository rate limit status + + Get current rate limit status and usage for a shared repository. + + Returns: + - Current usage across different time windows + - Rate limits based on subscription tier + - Remaining quota + - Reset times + + Note: All queries are FREE - this only shows rate limit status. + + Args: + repository (str): Repository name (e.g., 'sec') + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + repository=repository, + authorization=authorization, + auth_token=auth_token, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + repository: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[ + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] +]: + """Get shared repository rate limit status + + Get current rate limit status and usage for a shared repository. + + Returns: + - Current usage across different time windows + - Rate limits based on subscription tier + - Remaining quota + - Reset times + + Note: All queries are FREE - this only shows rate limit status. + + Args: + repository (str): Repository name (e.g., 'sec') + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] + """ + + return ( + await asyncio_detailed( + repository=repository, + client=client, + authorization=authorization, + auth_token=auth_token, + ) + ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_repository_credits.py b/robosystems_client/api/user_subscriptions/get_repository_credits.py index 440ea3a..1d04727 100644 --- a/robosystems_client/api/user_subscriptions/get_repository_credits.py +++ b/robosystems_client/api/user_subscriptions/get_repository_credits.py @@ -11,7 +11,7 @@ def _get_kwargs( - repository_type: str, + repository: str, *, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, @@ -26,7 +26,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/user/subscriptions/shared-repositories/credits/{repository_type}", + "url": f"/v1/user/subscriptions/shared-repositories/credits/{repository}", "cookies": cookies, } @@ -69,7 +69,7 @@ def _build_response( def sync_detailed( - repository_type: str, + repository: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -77,10 +77,10 @@ def sync_detailed( ) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits - Get credit balance for a specific shared repository type + Get credit balance for a specific shared repository Args: - repository_type (str): + repository (str): authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -93,7 +93,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - repository_type=repository_type, + repository=repository, authorization=authorization, auth_token=auth_token, ) @@ -106,7 +106,7 @@ def sync_detailed( def sync( - repository_type: str, + repository: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -114,10 +114,10 @@ def sync( ) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits - Get credit balance for a specific shared repository type + Get credit balance for a specific shared repository Args: - repository_type (str): + repository (str): authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -130,7 +130,7 @@ def sync( """ return sync_detailed( - repository_type=repository_type, + repository=repository, client=client, authorization=authorization, auth_token=auth_token, @@ -138,7 +138,7 @@ def sync( async def asyncio_detailed( - repository_type: str, + repository: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -146,10 +146,10 @@ async def asyncio_detailed( ) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits - Get credit balance for a specific shared repository type + Get credit balance for a specific shared repository Args: - repository_type (str): + repository (str): authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -162,7 +162,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - repository_type=repository_type, + repository=repository, authorization=authorization, auth_token=auth_token, ) @@ -173,7 +173,7 @@ async def asyncio_detailed( async def asyncio( - repository_type: str, + repository: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -181,10 +181,10 @@ async def asyncio( ) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits - Get credit balance for a specific shared repository type + Get credit balance for a specific shared repository Args: - repository_type (str): + repository (str): authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -198,7 +198,7 @@ async def asyncio( return ( await asyncio_detailed( - repository_type=repository_type, + repository=repository, client=client, authorization=authorization, auth_token=auth_token, diff --git a/robosystems_client/extensions/README.md b/robosystems_client/extensions/README.md index 9883519..6da267a 100644 --- a/robosystems_client/extensions/README.md +++ b/robosystems_client/extensions/README.md @@ -602,7 +602,7 @@ MIT License - see [LICENSE](LICENSE) file for details. - **Documentation**: [docs.robosystems.ai](https://docs.robosystems.ai) - **API Reference**: [api.robosystems.ai/docs](https://api.robosystems.ai/docs) - **Issues**: [GitHub Issues](https://github.com/robosystems/python-sdk/issues) -- **Email**: support@robosystems.ai +- **Email**: hello@robosystems.ai --- diff --git a/robosystems_client/extensions/__init__.py b/robosystems_client/extensions/__init__.py index 8d07d7b..88b8141 100644 --- a/robosystems_client/extensions/__init__.py +++ b/robosystems_client/extensions/__init__.py @@ -1,4 +1,4 @@ -"""RoboSystems SDK Extensions for Python +"""RoboSystems Client Extensions for Python Enhanced clients with SSE support for the RoboSystems API. Provides seamless integration with streaming operations, queue management, diff --git a/robosystems_client/extensions/auth_integration.py b/robosystems_client/extensions/auth_integration.py index 6a01f1f..6a7b580 100644 --- a/robosystems_client/extensions/auth_integration.py +++ b/robosystems_client/extensions/auth_integration.py @@ -1,6 +1,6 @@ -"""Authentication Integration for RoboSystems SDK Extensions +"""Authentication Integration for RoboSystems Client Extensions -Provides proper integration with the generated SDK authentication system. +Provides proper integration with the generated Client authentication system. """ from typing import Dict, Any diff --git a/robosystems_client/extensions/extensions.py b/robosystems_client/extensions/extensions.py index dcf77d8..7e31898 100644 --- a/robosystems_client/extensions/extensions.py +++ b/robosystems_client/extensions/extensions.py @@ -1,4 +1,4 @@ -"""RoboSystems SDK Extensions - Main entry point +"""RoboSystems Client Extensions - Main entry point Enhanced clients with SSE support for the RoboSystems API. """ diff --git a/robosystems_client/extensions/tests/__init__.py b/robosystems_client/extensions/tests/__init__.py index 151bb54..6e8da8f 100644 --- a/robosystems_client/extensions/tests/__init__.py +++ b/robosystems_client/extensions/tests/__init__.py @@ -1 +1 @@ -"""Tests for RoboSystems SDK Extensions""" +"""Tests for RoboSystems Client Extensions""" diff --git a/robosystems_client/extensions/tests/test_integration.py b/robosystems_client/extensions/tests/test_integration.py index 725b035..de5283c 100644 --- a/robosystems_client/extensions/tests/test_integration.py +++ b/robosystems_client/extensions/tests/test_integration.py @@ -1,7 +1,7 @@ -"""Integration Tests for RoboSystems SDK Extensions +"""Integration Tests for RoboSystems Client Extensions These tests demonstrate real usage patterns and verify the extensions work correctly -with the generated SDK. +with the generated Client. """ import pytest @@ -438,7 +438,7 @@ def test_end_to_end_query_workflow(self): # Integration test runner def run_integration_tests(): """Run all integration tests manually (for environments without pytest)""" - print("Running RoboSystems SDK Extensions Integration Tests...") + print("Running RoboSystems Client Extensions Integration Tests...") # Test classes to run test_classes = [ diff --git a/robosystems_client/extensions/tests/test_unit.py b/robosystems_client/extensions/tests/test_unit.py index 5496d1c..8a21f97 100644 --- a/robosystems_client/extensions/tests/test_unit.py +++ b/robosystems_client/extensions/tests/test_unit.py @@ -1,4 +1,4 @@ -"""Unit Tests for RoboSystems SDK Extensions +"""Unit Tests for RoboSystems Client Extensions Focused unit tests for individual components. """ @@ -14,8 +14,10 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../..")) sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) -from sse_client import SSEClient, SSEConfig, SSEEvent -from utils import ( +from robosystems_client.extensions import ( + SSEClient, + SSEConfig, + SSEEvent, QueryBuilder, CacheManager, ProgressTracker, diff --git a/robosystems_client/extensions/utils.py b/robosystems_client/extensions/utils.py index 9a37553..9c8f308 100644 --- a/robosystems_client/extensions/utils.py +++ b/robosystems_client/extensions/utils.py @@ -1,4 +1,4 @@ -"""Utility functions for RoboSystems SDK Extensions +"""Utility functions for RoboSystems Client Extensions Common helper functions for working with queries, operations, and data processing. """ diff --git a/robosystems_client/models/__init__.py b/robosystems_client/models/__init__.py index c046cc3..295416d 100644 --- a/robosystems_client/models/__init__.py +++ b/robosystems_client/models/__init__.py @@ -71,6 +71,9 @@ from .get_all_credit_summaries_response_getallcreditsummaries import ( GetAllCreditSummariesResponseGetallcreditsummaries, ) +from .get_all_shared_repository_limits_response_getallsharedrepositorylimits import ( + GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits, +) from .get_backup_download_url_response_getbackupdownloadurl import ( GetBackupDownloadUrlResponseGetbackupdownloadurl, ) @@ -92,10 +95,12 @@ from .get_graph_usage_details_response_getgraphusagedetails import ( GetGraphUsageDetailsResponseGetgraphusagedetails, ) -from .get_mcp_health_response_getmcphealth import GetMCPHealthResponseGetmcphealth from .get_operation_status_response_getoperationstatus import ( GetOperationStatusResponseGetoperationstatus, ) +from .get_shared_repository_limits_response_getsharedrepositorylimits import ( + GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, +) from .get_storage_usage_response_getstorageusage import ( GetStorageUsageResponseGetstorageusage, ) @@ -275,6 +280,7 @@ "ExchangeTokenRequest", "ExchangeTokenRequestMetadataType0", "GetAllCreditSummariesResponseGetallcreditsummaries", + "GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits", "GetBackupDownloadUrlResponseGetbackupdownloadurl", "GetCurrentAuthUserResponseGetcurrentauthuser", "GetCurrentGraphBillResponseGetcurrentgraphbill", @@ -282,8 +288,8 @@ "GetGraphMonthlyBillResponseGetgraphmonthlybill", "GetGraphSchemaInfoResponseGetgraphschemainfo", "GetGraphUsageDetailsResponseGetgraphusagedetails", - "GetMCPHealthResponseGetmcphealth", "GetOperationStatusResponseGetoperationstatus", + "GetSharedRepositoryLimitsResponseGetsharedrepositorylimits", "GetStorageUsageResponseGetstorageusage", "GraphInfo", "GraphMetadata", diff --git a/robosystems_client/models/create_graph_request.py b/robosystems_client/models/create_graph_request.py index 2bc662a..0df2810 100644 --- a/robosystems_client/models/create_graph_request.py +++ b/robosystems_client/models/create_graph_request.py @@ -30,14 +30,14 @@ class CreateGraphRequest: custom_schema (Union['CustomSchemaDefinition', None, Unset]): Custom schema definition to apply initial_entity (Union['InitialEntityData', None, Unset]): Optional initial entity to create in the graph. If provided, creates a entity-focused graph. - tags (Union[None, Unset, list[str]]): Optional tags for organization + tags (Union[Unset, list[str]]): Optional tags for organization """ metadata: "GraphMetadata" instance_tier: Union[Unset, str] = "standard" custom_schema: Union["CustomSchemaDefinition", None, Unset] = UNSET initial_entity: Union["InitialEntityData", None, Unset] = UNSET - tags: Union[None, Unset, list[str]] = UNSET + tags: Union[Unset, list[str]] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -64,13 +64,8 @@ def to_dict(self) -> dict[str, Any]: else: initial_entity = self.initial_entity - tags: Union[None, Unset, list[str]] - if isinstance(self.tags, Unset): - tags = UNSET - elif isinstance(self.tags, list): - tags = self.tags - - else: + tags: Union[Unset, list[str]] = UNSET + if not isinstance(self.tags, Unset): tags = self.tags field_dict: dict[str, Any] = {} @@ -138,22 +133,7 @@ def _parse_initial_entity(data: object) -> Union["InitialEntityData", None, Unse initial_entity = _parse_initial_entity(d.pop("initial_entity", UNSET)) - def _parse_tags(data: object) -> Union[None, Unset, list[str]]: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - tags_type_0 = cast(list[str], data) - - return tags_type_0 - except: # noqa: E722 - pass - return cast(Union[None, Unset, list[str]], data) - - tags = _parse_tags(d.pop("tags", UNSET)) + tags = cast(list[str], d.pop("tags", UNSET)) create_graph_request = cls( metadata=metadata, diff --git a/robosystems_client/models/database_health_response.py b/robosystems_client/models/database_health_response.py index 2aa7e44..7b7a149 100644 --- a/robosystems_client/models/database_health_response.py +++ b/robosystems_client/models/database_health_response.py @@ -14,7 +14,7 @@ class DatabaseHealthResponse: """Response model for database health check. Attributes: - graph_id (str): Graph database identifier Example: entity_12345. + graph_id (str): Graph database identifier Example: kg1a2b3c4d5. status (str): Overall health status Example: healthy. connection_status (str): Database connection status Example: connected. uptime_seconds (float): Database uptime in seconds Example: 3600.5. diff --git a/robosystems_client/models/database_info_response.py b/robosystems_client/models/database_info_response.py index b743d82..a3c83ca 100644 --- a/robosystems_client/models/database_info_response.py +++ b/robosystems_client/models/database_info_response.py @@ -14,8 +14,8 @@ class DatabaseInfoResponse: """Response model for database information and statistics. Attributes: - graph_id (str): Graph database identifier Example: entity_12345. - database_name (str): Database name Example: entity_12345. + graph_id (str): Graph database identifier Example: kg1a2b3c4d5. + database_name (str): Database name Example: kg1a2b3c4d5. database_size_bytes (int): Database size in bytes Example: 1048576. database_size_mb (float): Database size in MB Example: 1.0. node_count (int): Total number of nodes Example: 1250. diff --git a/robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py b/robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py new file mode 100644 index 0000000..e130a8e --- /dev/null +++ b/robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py @@ -0,0 +1,46 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits" +) + + +@_attrs_define +class GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_all_shared_repository_limits_response_getallsharedrepositorylimits = cls() + + get_all_shared_repository_limits_response_getallsharedrepositorylimits.additional_properties = d + return get_all_shared_repository_limits_response_getallsharedrepositorylimits + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/get_mcp_health_response_getmcphealth.py b/robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py similarity index 71% rename from robosystems_client/models/get_mcp_health_response_getmcphealth.py rename to robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py index 36f3f15..f4b3781 100644 --- a/robosystems_client/models/get_mcp_health_response_getmcphealth.py +++ b/robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py @@ -4,11 +4,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="GetMCPHealthResponseGetmcphealth") +T = TypeVar("T", bound="GetSharedRepositoryLimitsResponseGetsharedrepositorylimits") @_attrs_define -class GetMCPHealthResponseGetmcphealth: +class GetSharedRepositoryLimitsResponseGetsharedrepositorylimits: """ """ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -22,10 +22,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - get_mcp_health_response_getmcphealth = cls() + get_shared_repository_limits_response_getsharedrepositorylimits = cls() - get_mcp_health_response_getmcphealth.additional_properties = d - return get_mcp_health_response_getmcphealth + get_shared_repository_limits_response_getsharedrepositorylimits.additional_properties = d + return get_shared_repository_limits_response_getsharedrepositorylimits @property def additional_keys(self) -> list[str]: diff --git a/robosystems_client/models/repository_credits_response.py b/robosystems_client/models/repository_credits_response.py index 73d6950..fc0444a 100644 --- a/robosystems_client/models/repository_credits_response.py +++ b/robosystems_client/models/repository_credits_response.py @@ -18,20 +18,20 @@ class RepositoryCreditsResponse: """Response for repository-specific credits. Attributes: - repository_type (str): Repository type + repository (str): Repository identifier has_access (bool): Whether user has access message (Union[Unset, str]): Access message credits_ (Union[Unset, CreditSummary]): Credit balance summary. """ - repository_type: str + repository: str has_access: bool message: Union[Unset, str] = UNSET credits_: Union[Unset, "CreditSummary"] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - repository_type = self.repository_type + repository = self.repository has_access = self.has_access @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "repository_type": repository_type, + "repository": repository, "has_access": has_access, } ) @@ -61,7 +61,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.credit_summary import CreditSummary d = dict(src_dict) - repository_type = d.pop("repository_type") + repository = d.pop("repository") has_access = d.pop("has_access") @@ -75,7 +75,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: credits_ = CreditSummary.from_dict(_credits_) repository_credits_response = cls( - repository_type=repository_type, + repository=repository, has_access=has_access, message=message, credits_=credits_, diff --git a/robosystems_client/models/schema_export_response.py b/robosystems_client/models/schema_export_response.py index 9cbdb01..9f9f409 100644 --- a/robosystems_client/models/schema_export_response.py +++ b/robosystems_client/models/schema_export_response.py @@ -23,9 +23,9 @@ class SchemaExportResponse: """Response model for schema export. Attributes: - graph_id (str): Graph ID Example: entity_12345. + graph_id (str): Graph ID Example: kg1a2b3c4d5. schema_definition (Union['SchemaExportResponseSchemaDefinitionType0', str]): Exported schema definition Example: - {'name': 'entity_12345_schema', 'nodes': [{'name': 'Entity', 'properties': []}], 'relationships': [], 'version': + {'name': 'kg1a2b3c4d5_schema', 'nodes': [{'name': 'Entity', 'properties': []}], 'relationships': [], 'version': '1.0.0'}. format_ (str): Export format used Example: json. exported_at (str): Export timestamp Example: 2024-01-15T10:30:00Z. diff --git a/robosystems_client/models/subscription_info.py b/robosystems_client/models/subscription_info.py index ed28665..9a5007b 100644 --- a/robosystems_client/models/subscription_info.py +++ b/robosystems_client/models/subscription_info.py @@ -23,12 +23,10 @@ class SubscriptionInfo: addon_type (str): Add-on type addon_tier (str): Subscription tier is_active (bool): Whether subscription is active - is_trial (bool): Whether this is a trial subscription activated_at (str): Activation date (ISO format) monthly_price_cents (int): Monthly price in cents features (list[str]): List of features metadata (SubscriptionInfoMetadata): Additional metadata - trial_ends_at (Union[None, Unset, str]): Trial expiration date (ISO format) expires_at (Union[None, Unset, str]): Expiration date (ISO format) """ @@ -37,12 +35,10 @@ class SubscriptionInfo: addon_type: str addon_tier: str is_active: bool - is_trial: bool activated_at: str monthly_price_cents: int features: list[str] metadata: "SubscriptionInfoMetadata" - trial_ends_at: Union[None, Unset, str] = UNSET expires_at: Union[None, Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -57,8 +53,6 @@ def to_dict(self) -> dict[str, Any]: is_active = self.is_active - is_trial = self.is_trial - activated_at = self.activated_at monthly_price_cents = self.monthly_price_cents @@ -67,12 +61,6 @@ def to_dict(self) -> dict[str, Any]: metadata = self.metadata.to_dict() - trial_ends_at: Union[None, Unset, str] - if isinstance(self.trial_ends_at, Unset): - trial_ends_at = UNSET - else: - trial_ends_at = self.trial_ends_at - expires_at: Union[None, Unset, str] if isinstance(self.expires_at, Unset): expires_at = UNSET @@ -88,15 +76,12 @@ def to_dict(self) -> dict[str, Any]: "addon_type": addon_type, "addon_tier": addon_tier, "is_active": is_active, - "is_trial": is_trial, "activated_at": activated_at, "monthly_price_cents": monthly_price_cents, "features": features, "metadata": metadata, } ) - if trial_ends_at is not UNSET: - field_dict["trial_ends_at"] = trial_ends_at if expires_at is not UNSET: field_dict["expires_at"] = expires_at @@ -117,8 +102,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: is_active = d.pop("is_active") - is_trial = d.pop("is_trial") - activated_at = d.pop("activated_at") monthly_price_cents = d.pop("monthly_price_cents") @@ -127,15 +110,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: metadata = SubscriptionInfoMetadata.from_dict(d.pop("metadata")) - def _parse_trial_ends_at(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - trial_ends_at = _parse_trial_ends_at(d.pop("trial_ends_at", UNSET)) - def _parse_expires_at(data: object) -> Union[None, Unset, str]: if data is None: return data @@ -151,12 +125,10 @@ def _parse_expires_at(data: object) -> Union[None, Unset, str]: addon_type=addon_type, addon_tier=addon_tier, is_active=is_active, - is_trial=is_trial, activated_at=activated_at, monthly_price_cents=monthly_price_cents, features=features, metadata=metadata, - trial_ends_at=trial_ends_at, expires_at=expires_at, ) diff --git a/robosystems_client/models/subscription_request.py b/robosystems_client/models/subscription_request.py index 0b817ff..f7f3846 100644 --- a/robosystems_client/models/subscription_request.py +++ b/robosystems_client/models/subscription_request.py @@ -18,12 +18,10 @@ class SubscriptionRequest: Attributes: repository_type (RepositoryType): Types of shared repositories. repository_plan (Union[Unset, RepositoryPlan]): Repository access plans for shared data. - is_trial (Union[Unset, bool]): Start with trial period Default: False. """ repository_type: RepositoryType repository_plan: Union[Unset, RepositoryPlan] = UNSET - is_trial: Union[Unset, bool] = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -33,8 +31,6 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.repository_plan, Unset): repository_plan = self.repository_plan.value - is_trial = self.is_trial - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -44,8 +40,6 @@ def to_dict(self) -> dict[str, Any]: ) if repository_plan is not UNSET: field_dict["repository_plan"] = repository_plan - if is_trial is not UNSET: - field_dict["is_trial"] = is_trial return field_dict @@ -61,12 +55,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: repository_plan = RepositoryPlan(_repository_plan) - is_trial = d.pop("is_trial", UNSET) - subscription_request = cls( repository_type=repository_type, repository_plan=repository_plan, - is_trial=is_trial, ) subscription_request.additional_properties = d diff --git a/robosystems_client/models/subscription_response.py b/robosystems_client/models/subscription_response.py index 74da0af..931bce3 100644 --- a/robosystems_client/models/subscription_response.py +++ b/robosystems_client/models/subscription_response.py @@ -18,12 +18,10 @@ class SubscriptionResponse: Attributes: message (str): Success message subscription (SubscriptionInfo): User subscription information. - trial_period (int): Trial period in days """ message: str subscription: "SubscriptionInfo" - trial_period: int additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -31,15 +29,12 @@ def to_dict(self) -> dict[str, Any]: subscription = self.subscription.to_dict() - trial_period = self.trial_period - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "message": message, "subscription": subscription, - "trial_period": trial_period, } ) @@ -54,12 +49,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subscription = SubscriptionInfo.from_dict(d.pop("subscription")) - trial_period = d.pop("trial_period") - subscription_response = cls( message=message, subscription=subscription, - trial_period=trial_period, ) subscription_response.additional_properties = d diff --git a/robosystems_client/sdk-config.yaml b/robosystems_client/sdk-config.yaml index ef385ab..95fc4d7 100644 --- a/robosystems_client/sdk-config.yaml +++ b/robosystems_client/sdk-config.yaml @@ -1,5 +1,5 @@ class_name: RoboSystemsClient package_name: robosystems_client project_name: robosystems-sdk -package_description: "Python SDK for RoboSystems financial graph database API" +package_description: "Python Client for RoboSystems financial graph database API" package_version: "0.1.0" \ No newline at end of file diff --git a/tests/test_client.py b/tests/test_client.py index 80b866f..e5962a9 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,4 +1,4 @@ -"""Test the RoboSystems SDK.""" +"""Test the RoboSystems Client.""" from robosystems_client import RoboSystemsSDK, AuthenticatedClient, Client