From 51296cf4a0cb827f3734fdb7972cbf96a29c7ac4 Mon Sep 17 00:00:00 2001 From: Joey French Date: Mon, 22 Sep 2025 12:29:49 -0500 Subject: [PATCH 1/2] Enhance API methods by adding optional token parameter - Introduced a new optional `token` parameter across multiple API methods to improve authentication flexibility. - Updated method signatures in various modules, including agent, backup, connections, and user management, to accommodate the new parameter. - This change enhances the overall API consistency and allows for better integration with authentication workflows. No breaking changes introduced; existing functionality remains intact. --- .../api/agent/auto_select_agent.py | 25 +++++++++++++++++++ .../api/agent/batch_process_queries.py | 25 +++++++++++++++++++ .../api/agent/execute_specific_agent.py | 25 +++++++++++++++++++ .../api/agent/get_agent_metadata.py | 25 +++++++++++++++++++ robosystems_client/api/agent/list_agents.py | 20 +++++++++++++++ .../api/agent/recommend_agent.py | 25 +++++++++++++++++++ .../api/backup/create_backup.py | 25 +++++++++++++++++++ .../api/backup/export_backup.py | 25 +++++++++++++++++++ .../api/backup/get_backup_download_url.py | 20 +++++++++++++++ .../api/backup/get_backup_stats.py | 25 +++++++++++++++++++ robosystems_client/api/backup/list_backups.py | 20 +++++++++++++++ .../api/backup/restore_backup.py | 25 +++++++++++++++++++ .../api/connections/create_connection.py | 25 +++++++++++++++++++ .../api/connections/create_link_token.py | 25 +++++++++++++++++++ .../api/connections/delete_connection.py | 25 +++++++++++++++++++ .../api/connections/exchange_link_token.py | 25 +++++++++++++++++++ .../api/connections/get_connection.py | 25 +++++++++++++++++++ .../api/connections/get_connection_options.py | 25 +++++++++++++++++++ .../api/connections/init_o_auth.py | 25 +++++++++++++++++++ .../api/connections/list_connections.py | 20 +++++++++++++++ .../api/connections/oauth_callback.py | 25 +++++++++++++++++++ .../api/connections/sync_connection.py | 25 +++++++++++++++++++ .../api/copy/copy_data_to_graph.py | 25 +++++++++++++++++++ robosystems_client/api/create/create_graph.py | 25 +++++++++++++++++++ .../api/graph_analytics/get_graph_metrics.py | 25 +++++++++++++++++++ .../graph_analytics/get_graph_usage_stats.py | 20 +++++++++++++++ .../graph_billing/get_current_graph_bill.py | 25 +++++++++++++++++++ .../get_graph_billing_history.py | 20 +++++++++++++++ .../graph_billing/get_graph_monthly_bill.py | 25 +++++++++++++++++++ .../graph_billing/get_graph_usage_details.py | 20 +++++++++++++++ .../api/graph_credits/check_credit_balance.py | 20 +++++++++++++++ .../api/graph_credits/check_storage_limits.py | 25 +++++++++++++++++++ .../api/graph_credits/get_credit_summary.py | 25 +++++++++++++++++++ .../api/graph_credits/get_storage_usage.py | 20 +++++++++++++++ .../graph_credits/list_credit_transactions.py | 20 +++++++++++++++ .../api/graph_health/get_database_health.py | 25 +++++++++++++++++++ .../api/graph_info/get_database_info.py | 25 +++++++++++++++++++ .../api/graph_limits/get_graph_limits.py | 25 +++++++++++++++++++ robosystems_client/api/mcp/call_mcp_tool.py | 20 +++++++++++++++ robosystems_client/api/mcp/list_mcp_tools.py | 25 +++++++++++++++++++ .../api/operations/cancel_operation.py | 25 +++++++++++++++++++ .../api/operations/get_operation_status.py | 25 +++++++++++++++++++ .../api/operations/stream_operation_events.py | 20 +++++++++++++++ .../api/query/execute_cypher_query.py | 20 +++++++++++++++ .../api/schema/export_graph_schema.py | 20 +++++++++++++++ .../api/schema/get_graph_schema_info.py | 25 +++++++++++++++++++ .../api/schema/list_schema_extensions.py | 25 +++++++++++++++++++ .../api/schema/validate_schema.py | 25 +++++++++++++++++++ .../api/subgraphs/create_subgraph.py | 25 +++++++++++++++++++ .../api/subgraphs/delete_subgraph.py | 25 +++++++++++++++++++ .../api/subgraphs/get_subgraph_info.py | 25 +++++++++++++++++++ .../api/subgraphs/get_subgraph_quota.py | 25 +++++++++++++++++++ .../api/subgraphs/list_subgraphs.py | 25 +++++++++++++++++++ .../api/user/create_user_api_key.py | 25 +++++++++++++++++++ .../api/user/get_all_credit_summaries.py | 25 +++++++++++++++++++ .../api/user/get_current_user.py | 25 +++++++++++++++++++ .../api/user/get_user_graphs.py | 25 +++++++++++++++++++ .../api/user/list_user_api_keys.py | 25 +++++++++++++++++++ .../api/user/revoke_user_api_key.py | 25 +++++++++++++++++++ .../api/user/select_user_graph.py | 25 +++++++++++++++++++ robosystems_client/api/user/update_user.py | 25 +++++++++++++++++++ .../api/user/update_user_api_key.py | 25 +++++++++++++++++++ .../api/user/update_user_password.py | 25 +++++++++++++++++++ .../get_detailed_user_analytics.py | 20 +++++++++++++++ .../user_analytics/get_user_usage_overview.py | 25 +++++++++++++++++++ .../get_all_shared_repository_limits.py | 25 +++++++++++++++++++ .../get_shared_repository_limits.py | 25 +++++++++++++++++++ .../api/user_limits/get_user_limits.py | 25 +++++++++++++++++++ .../api/user_limits/get_user_usage.py | 25 +++++++++++++++++++ .../cancel_shared_repository_subscription.py | 25 +++++++++++++++++++ .../get_repository_credits.py | 25 +++++++++++++++++++ .../get_shared_repository_credits.py | 25 +++++++++++++++++++ .../get_user_shared_subscriptions.py | 20 +++++++++++++++ .../subscribe_to_shared_repository.py | 25 +++++++++++++++++++ .../upgrade_shared_repository_subscription.py | 25 +++++++++++++++++++ 75 files changed, 1795 insertions(+) diff --git a/robosystems_client/api/agent/auto_select_agent.py b/robosystems_client/api/agent/auto_select_agent.py index 424b92e..8c3a0bb 100644 --- a/robosystems_client/api/agent/auto_select_agent.py +++ b/robosystems_client/api/agent/auto_select_agent.py @@ -16,15 +16,28 @@ def _get_kwargs( graph_id: str, *, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/agent", + "params": params, } _kwargs["json"] = body.to_dict() @@ -81,6 +94,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -97,6 +111,7 @@ def sync_detailed( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -111,6 +126,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -126,6 +142,7 @@ def sync( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -142,6 +159,7 @@ def sync( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -157,6 +175,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -166,6 +185,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -182,6 +202,7 @@ async def asyncio_detailed( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -196,6 +217,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -209,6 +231,7 @@ async def asyncio( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Auto-select agent for query @@ -225,6 +248,7 @@ async def asyncio( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -241,6 +265,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/batch_process_queries.py b/robosystems_client/api/agent/batch_process_queries.py index fbf96fc..5b500c1 100644 --- a/robosystems_client/api/agent/batch_process_queries.py +++ b/robosystems_client/api/agent/batch_process_queries.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: BatchAgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/agent/batch", + "params": params, } _kwargs["json"] = body.to_dict() @@ -76,6 +89,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: BatchAgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -97,6 +111,7 @@ def sync_detailed( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. @@ -111,6 +126,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -126,6 +142,7 @@ def sync( *, client: AuthenticatedClient, body: BatchAgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -147,6 +164,7 @@ def sync( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. @@ -162,6 +180,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -171,6 +190,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BatchAgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -192,6 +212,7 @@ async def asyncio_detailed( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. @@ -206,6 +227,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -219,6 +241,7 @@ async def asyncio( *, client: AuthenticatedClient, body: BatchAgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, BatchAgentResponse, HTTPValidationError]]: """Batch process multiple queries @@ -240,6 +263,7 @@ async def asyncio( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BatchAgentRequest): Request for batch processing multiple queries. @@ -256,6 +280,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/execute_specific_agent.py b/robosystems_client/api/agent/execute_specific_agent.py index f160c04..c974250 100644 --- a/robosystems_client/api/agent/execute_specific_agent.py +++ b/robosystems_client/api/agent/execute_specific_agent.py @@ -17,15 +17,28 @@ def _get_kwargs( agent_type: str, *, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/agent/{agent_type}", + "params": params, } _kwargs["json"] = body.to_dict() @@ -86,6 +99,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -102,6 +116,7 @@ def sync_detailed( Args: graph_id (str): agent_type (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -117,6 +132,7 @@ def sync_detailed( graph_id=graph_id, agent_type=agent_type, body=body, + token=token, authorization=authorization, ) @@ -133,6 +149,7 @@ def sync( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -149,6 +166,7 @@ def sync( Args: graph_id (str): agent_type (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -165,6 +183,7 @@ def sync( agent_type=agent_type, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -175,6 +194,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -191,6 +211,7 @@ async def asyncio_detailed( Args: graph_id (str): agent_type (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -206,6 +227,7 @@ async def asyncio_detailed( graph_id=graph_id, agent_type=agent_type, body=body, + token=token, authorization=authorization, ) @@ -220,6 +242,7 @@ async def asyncio( *, client: AuthenticatedClient, body: AgentRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentResponse, Any, ErrorResponse, HTTPValidationError]]: """Execute specific agent @@ -236,6 +259,7 @@ async def asyncio( Args: graph_id (str): agent_type (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRequest): Request model for agent interactions. @@ -253,6 +277,7 @@ async def asyncio( agent_type=agent_type, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/get_agent_metadata.py b/robosystems_client/api/agent/get_agent_metadata.py index 63984e5..7737c1b 100644 --- a/robosystems_client/api/agent/get_agent_metadata.py +++ b/robosystems_client/api/agent/get_agent_metadata.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, agent_type: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/agent/{agent_type}/metadata", + "params": params, } _kwargs["headers"] = headers @@ -65,6 +78,7 @@ def sync_detailed( agent_type: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -84,6 +98,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -97,6 +112,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, agent_type=agent_type, + token=token, authorization=authorization, ) @@ -112,6 +128,7 @@ def sync( agent_type: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -131,6 +148,7 @@ def sync( Args: graph_id (str): Graph database identifier agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -145,6 +163,7 @@ def sync( graph_id=graph_id, agent_type=agent_type, client=client, + token=token, authorization=authorization, ).parsed @@ -154,6 +173,7 @@ async def asyncio_detailed( agent_type: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -173,6 +193,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -186,6 +207,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, agent_type=agent_type, + token=token, authorization=authorization, ) @@ -199,6 +221,7 @@ async def asyncio( agent_type: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentMetadataResponse, Any, HTTPValidationError]]: """Get agent metadata @@ -218,6 +241,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier agent_type (str): Agent type identifier (e.g., 'financial', 'research', 'rag') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -233,6 +257,7 @@ async def asyncio( graph_id=graph_id, agent_type=agent_type, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/list_agents.py b/robosystems_client/api/agent/list_agents.py index 078d442..da7a8d7 100644 --- a/robosystems_client/api/agent/list_agents.py +++ b/robosystems_client/api/agent/list_agents.py @@ -14,6 +14,7 @@ def _get_kwargs( graph_id: str, *, capability: Union[None, Unset, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -29,6 +30,13 @@ def _get_kwargs( json_capability = capability params["capability"] = json_capability + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -77,6 +85,7 @@ def sync_detailed( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -95,6 +104,7 @@ def sync_detailed( graph_id (str): Graph database identifier capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +118,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, capability=capability, + token=token, authorization=authorization, ) @@ -123,6 +134,7 @@ def sync( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -141,6 +153,7 @@ def sync( graph_id (str): Graph database identifier capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -155,6 +168,7 @@ def sync( graph_id=graph_id, client=client, capability=capability, + token=token, authorization=authorization, ).parsed @@ -164,6 +178,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -182,6 +197,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -195,6 +211,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, capability=capability, + token=token, authorization=authorization, ) @@ -208,6 +225,7 @@ async def asyncio( *, client: AuthenticatedClient, capability: Union[None, Unset, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentListResponse, Any, HTTPValidationError]]: """List available agents @@ -226,6 +244,7 @@ async def asyncio( graph_id (str): Graph database identifier capability (Union[None, Unset, str]): Filter by capability (e.g., 'financial_analysis', 'rag_search') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -241,6 +260,7 @@ async def asyncio( graph_id=graph_id, client=client, capability=capability, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/agent/recommend_agent.py b/robosystems_client/api/agent/recommend_agent.py index 2ded377..fcca13a 100644 --- a/robosystems_client/api/agent/recommend_agent.py +++ b/robosystems_client/api/agent/recommend_agent.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: AgentRecommendationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/agent/recommend", + "params": params, } _kwargs["json"] = body.to_dict() @@ -70,6 +83,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: AgentRecommendationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -91,6 +105,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRecommendationRequest): Request for agent recommendations. @@ -105,6 +120,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -120,6 +136,7 @@ def sync( *, client: AuthenticatedClient, body: AgentRecommendationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -141,6 +158,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRecommendationRequest): Request for agent recommendations. @@ -156,6 +174,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -165,6 +184,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: AgentRecommendationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -186,6 +206,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRecommendationRequest): Request for agent recommendations. @@ -200,6 +221,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -213,6 +235,7 @@ async def asyncio( *, client: AuthenticatedClient, body: AgentRecommendationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[AgentRecommendationResponse, Any, HTTPValidationError]]: """Get agent recommendations @@ -234,6 +257,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (AgentRecommendationRequest): Request for agent recommendations. @@ -250,6 +274,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/create_backup.py b/robosystems_client/api/backup/create_backup.py index a5d1a74..380777b 100644 --- a/robosystems_client/api/backup/create_backup.py +++ b/robosystems_client/api/backup/create_backup.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: BackupCreateRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/backups", + "params": params, } _kwargs["json"] = body.to_dict() @@ -82,6 +95,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: BackupCreateRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -131,6 +145,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupCreateRequest): Request model for creating a backup. @@ -145,6 +160,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -160,6 +176,7 @@ def sync( *, client: AuthenticatedClient, body: BackupCreateRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -209,6 +226,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupCreateRequest): Request model for creating a backup. @@ -224,6 +242,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -233,6 +252,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BackupCreateRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -282,6 +302,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupCreateRequest): Request model for creating a backup. @@ -296,6 +317,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -309,6 +331,7 @@ async def asyncio( *, client: AuthenticatedClient, body: BackupCreateRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Backup @@ -358,6 +381,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupCreateRequest): Request model for creating a backup. @@ -374,6 +398,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/export_backup.py b/robosystems_client/api/backup/export_backup.py index e610329..730eddd 100644 --- a/robosystems_client/api/backup/export_backup.py +++ b/robosystems_client/api/backup/export_backup.py @@ -13,15 +13,28 @@ def _get_kwargs( graph_id: str, backup_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/backups/{backup_id}/export", + "params": params, } _kwargs["headers"] = headers @@ -66,6 +79,7 @@ def sync_detailed( backup_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Export Kuzu backup for download @@ -75,6 +89,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier backup_id (str): Backup identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -88,6 +103,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, backup_id=backup_id, + token=token, authorization=authorization, ) @@ -103,6 +119,7 @@ def sync( backup_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Export Kuzu backup for download @@ -112,6 +129,7 @@ def sync( Args: graph_id (str): Graph database identifier backup_id (str): Backup identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -126,6 +144,7 @@ def sync( graph_id=graph_id, backup_id=backup_id, client=client, + token=token, authorization=authorization, ).parsed @@ -135,6 +154,7 @@ async def asyncio_detailed( backup_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Export Kuzu backup for download @@ -144,6 +164,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier backup_id (str): Backup identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -157,6 +178,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, backup_id=backup_id, + token=token, authorization=authorization, ) @@ -170,6 +192,7 @@ async def asyncio( backup_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Export Kuzu backup for download @@ -179,6 +202,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier backup_id (str): Backup identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -194,6 +218,7 @@ async def asyncio( graph_id=graph_id, backup_id=backup_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/get_backup_download_url.py b/robosystems_client/api/backup/get_backup_download_url.py index dc6be40..a1b5c7f 100644 --- a/robosystems_client/api/backup/get_backup_download_url.py +++ b/robosystems_client/api/backup/get_backup_download_url.py @@ -17,6 +17,7 @@ def _get_kwargs( backup_id: str, *, expires_in: Union[Unset, int] = 3600, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -27,6 +28,13 @@ def _get_kwargs( params["expires_in"] = expires_in + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -88,6 +96,7 @@ def sync_detailed( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] @@ -100,6 +109,7 @@ def sync_detailed( graph_id (str): Graph database identifier backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -114,6 +124,7 @@ def sync_detailed( graph_id=graph_id, backup_id=backup_id, expires_in=expires_in, + token=token, authorization=authorization, ) @@ -130,6 +141,7 @@ def sync( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] @@ -142,6 +154,7 @@ def sync( graph_id (str): Graph database identifier backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -157,6 +170,7 @@ def sync( backup_id=backup_id, client=client, expires_in=expires_in, + token=token, authorization=authorization, ).parsed @@ -167,6 +181,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] @@ -179,6 +194,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -193,6 +209,7 @@ async def asyncio_detailed( graph_id=graph_id, backup_id=backup_id, expires_in=expires_in, + token=token, authorization=authorization, ) @@ -207,6 +224,7 @@ async def asyncio( *, client: AuthenticatedClient, expires_in: Union[Unset, int] = 3600, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetBackupDownloadUrlResponseGetbackupdownloadurl, HTTPValidationError] @@ -219,6 +237,7 @@ async def asyncio( graph_id (str): Graph database identifier backup_id (str): Backup identifier expires_in (Union[Unset, int]): URL expiration time in seconds Default: 3600. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -235,6 +254,7 @@ async def asyncio( backup_id=backup_id, client=client, expires_in=expires_in, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/get_backup_stats.py b/robosystems_client/api/backup/get_backup_stats.py index 48835c2..fa2ada2 100644 --- a/robosystems_client/api/backup/get_backup_stats.py +++ b/robosystems_client/api/backup/get_backup_stats.py @@ -13,15 +13,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/backups/stats", + "params": params, } _kwargs["headers"] = headers @@ -60,6 +73,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -68,6 +82,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -80,6 +95,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -94,6 +110,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -102,6 +119,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -115,6 +133,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -123,6 +142,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -131,6 +151,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -143,6 +164,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -155,6 +177,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -163,6 +186,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -177,6 +201,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/list_backups.py b/robosystems_client/api/backup/list_backups.py index bce34c6..0a4c01f 100644 --- a/robosystems_client/api/backup/list_backups.py +++ b/robosystems_client/api/backup/list_backups.py @@ -15,6 +15,7 @@ def _get_kwargs( *, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -27,6 +28,13 @@ def _get_kwargs( params["offset"] = offset + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -73,6 +81,7 @@ def sync_detailed( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -83,6 +92,7 @@ def sync_detailed( graph_id (str): Graph database identifier limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -97,6 +107,7 @@ def sync_detailed( graph_id=graph_id, limit=limit, offset=offset, + token=token, authorization=authorization, ) @@ -113,6 +124,7 @@ def sync( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -123,6 +135,7 @@ def sync( graph_id (str): Graph database identifier limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -138,6 +151,7 @@ def sync( client=client, limit=limit, offset=offset, + token=token, authorization=authorization, ).parsed @@ -148,6 +162,7 @@ async def asyncio_detailed( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -158,6 +173,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -172,6 +188,7 @@ async def asyncio_detailed( graph_id=graph_id, limit=limit, offset=offset, + token=token, authorization=authorization, ) @@ -186,6 +203,7 @@ async def asyncio( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -196,6 +214,7 @@ async def asyncio( graph_id (str): Graph database identifier limit (Union[Unset, int]): Maximum number of backups to return Default: 50. offset (Union[Unset, int]): Number of backups to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -212,6 +231,7 @@ async def asyncio( client=client, limit=limit, offset=offset, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/backup/restore_backup.py b/robosystems_client/api/backup/restore_backup.py index 2ea73ba..2defbb4 100644 --- a/robosystems_client/api/backup/restore_backup.py +++ b/robosystems_client/api/backup/restore_backup.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: BackupRestoreRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/backups/restore", + "params": params, } _kwargs["json"] = body.to_dict() @@ -82,6 +95,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: BackupRestoreRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -131,6 +145,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. @@ -145,6 +160,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -160,6 +176,7 @@ def sync( *, client: AuthenticatedClient, body: BackupRestoreRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -209,6 +226,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. @@ -224,6 +242,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -233,6 +252,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: BackupRestoreRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -282,6 +302,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. @@ -296,6 +317,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -309,6 +331,7 @@ async def asyncio( *, client: AuthenticatedClient, body: BackupRestoreRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Restore Encrypted Backup @@ -358,6 +381,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (BackupRestoreRequest): Request model for restoring from a backup. @@ -374,6 +398,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/create_connection.py b/robosystems_client/api/connections/create_connection.py index 158cd06..2f6881f 100644 --- a/robosystems_client/api/connections/create_connection.py +++ b/robosystems_client/api/connections/create_connection.py @@ -16,15 +16,28 @@ def _get_kwargs( graph_id: str, *, body: CreateConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/connections", + "params": params, } _kwargs["json"] = body.to_dict() @@ -84,6 +97,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -112,6 +126,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateConnectionRequest): Request to create a new connection. @@ -126,6 +141,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -141,6 +157,7 @@ def sync( *, client: AuthenticatedClient, body: CreateConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -169,6 +186,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateConnectionRequest): Request to create a new connection. @@ -184,6 +202,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -193,6 +212,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -221,6 +241,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateConnectionRequest): Request to create a new connection. @@ -235,6 +256,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -248,6 +270,7 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Create Connection @@ -276,6 +299,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateConnectionRequest): Request to create a new connection. @@ -292,6 +316,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/create_link_token.py b/robosystems_client/api/connections/create_link_token.py index 1430d69..50b69d6 100644 --- a/robosystems_client/api/connections/create_link_token.py +++ b/robosystems_client/api/connections/create_link_token.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: LinkTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/connections/link/token", + "params": params, } _kwargs["json"] = body.to_dict() @@ -78,6 +91,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: LinkTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -99,6 +113,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (LinkTokenRequest): Request to create a link token for embedded authentication. @@ -113,6 +128,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -128,6 +144,7 @@ def sync( *, client: AuthenticatedClient, body: LinkTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -149,6 +166,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (LinkTokenRequest): Request to create a link token for embedded authentication. @@ -164,6 +182,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -173,6 +192,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: LinkTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -194,6 +214,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (LinkTokenRequest): Request to create a link token for embedded authentication. @@ -208,6 +229,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -221,6 +243,7 @@ async def asyncio( *, client: AuthenticatedClient, body: LinkTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Create Link Token @@ -242,6 +265,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (LinkTokenRequest): Request to create a link token for embedded authentication. @@ -258,6 +282,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/delete_connection.py b/robosystems_client/api/connections/delete_connection.py index 3c06673..6dca655 100644 --- a/robosystems_client/api/connections/delete_connection.py +++ b/robosystems_client/api/connections/delete_connection.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, connection_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/{graph_id}/connections/{connection_id}", + "params": params, } _kwargs["headers"] = headers @@ -75,6 +88,7 @@ def sync_detailed( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -95,6 +109,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +123,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, + token=token, authorization=authorization, ) @@ -123,6 +139,7 @@ def sync( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -143,6 +160,7 @@ def sync( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -157,6 +175,7 @@ def sync( graph_id=graph_id, connection_id=connection_id, client=client, + token=token, authorization=authorization, ).parsed @@ -166,6 +185,7 @@ async def asyncio_detailed( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -186,6 +206,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -199,6 +220,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, + token=token, authorization=authorization, ) @@ -212,6 +234,7 @@ async def asyncio( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Delete Connection @@ -232,6 +255,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -247,6 +271,7 @@ async def asyncio( graph_id=graph_id, connection_id=connection_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/exchange_link_token.py b/robosystems_client/api/connections/exchange_link_token.py index c27cdab..20a3cfd 100644 --- a/robosystems_client/api/connections/exchange_link_token.py +++ b/robosystems_client/api/connections/exchange_link_token.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: ExchangeTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/connections/link/exchange", + "params": params, } _kwargs["json"] = body.to_dict() @@ -78,6 +91,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ExchangeTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -104,6 +118,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. @@ -118,6 +133,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -133,6 +149,7 @@ def sync( *, client: AuthenticatedClient, body: ExchangeTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -159,6 +176,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. @@ -174,6 +192,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -183,6 +202,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ExchangeTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -209,6 +229,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. @@ -223,6 +244,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -236,6 +258,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ExchangeTokenRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Exchange Link Token @@ -262,6 +285,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. @@ -278,6 +302,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/get_connection.py b/robosystems_client/api/connections/get_connection.py index 5a2dd68..8f9d10f 100644 --- a/robosystems_client/api/connections/get_connection.py +++ b/robosystems_client/api/connections/get_connection.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, connection_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/connections/{connection_id}", + "params": params, } _kwargs["headers"] = headers @@ -75,6 +88,7 @@ def sync_detailed( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -93,6 +107,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier connection_id (str): Unique connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -106,6 +121,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, + token=token, authorization=authorization, ) @@ -121,6 +137,7 @@ def sync( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -139,6 +156,7 @@ def sync( Args: graph_id (str): Graph database identifier connection_id (str): Unique connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -153,6 +171,7 @@ def sync( graph_id=graph_id, connection_id=connection_id, client=client, + token=token, authorization=authorization, ).parsed @@ -162,6 +181,7 @@ async def asyncio_detailed( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -180,6 +200,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier connection_id (str): Unique connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -193,6 +214,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, connection_id=connection_id, + token=token, authorization=authorization, ) @@ -206,6 +228,7 @@ async def asyncio( connection_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionResponse, ErrorResponse, HTTPValidationError]]: """Get Connection @@ -224,6 +247,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier connection_id (str): Unique connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -239,6 +263,7 @@ async def asyncio( graph_id=graph_id, connection_id=connection_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/get_connection_options.py b/robosystems_client/api/connections/get_connection_options.py index 5e36b67..eed4876 100644 --- a/robosystems_client/api/connections/get_connection_options.py +++ b/robosystems_client/api/connections/get_connection_options.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/connections/options", + "params": params, } _kwargs["headers"] = headers @@ -69,6 +82,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -96,6 +110,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +123,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -122,6 +138,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -149,6 +166,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -162,6 +180,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -170,6 +189,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -197,6 +217,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -209,6 +230,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -221,6 +243,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ConnectionOptionsResponse, ErrorResponse, HTTPValidationError]]: """List Connection Options @@ -248,6 +271,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -262,6 +286,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/init_o_auth.py b/robosystems_client/api/connections/init_o_auth.py index bb0174a..85069c1 100644 --- a/robosystems_client/api/connections/init_o_auth.py +++ b/robosystems_client/api/connections/init_o_auth.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: OAuthInitRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/connections/oauth/init", + "params": params, } _kwargs["json"] = body.to_dict() @@ -67,6 +80,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: OAuthInitRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -78,6 +92,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthInitRequest): Request to initiate OAuth flow. @@ -92,6 +107,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -107,6 +123,7 @@ def sync( *, client: AuthenticatedClient, body: OAuthInitRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -118,6 +135,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthInitRequest): Request to initiate OAuth flow. @@ -133,6 +151,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -142,6 +161,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: OAuthInitRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -153,6 +173,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthInitRequest): Request to initiate OAuth flow. @@ -167,6 +188,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -180,6 +202,7 @@ async def asyncio( *, client: AuthenticatedClient, body: OAuthInitRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]: """Init Oauth @@ -191,6 +214,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthInitRequest): Request to initiate OAuth flow. @@ -207,6 +231,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/list_connections.py b/robosystems_client/api/connections/list_connections.py index 7215dc5..aae6547 100644 --- a/robosystems_client/api/connections/list_connections.py +++ b/robosystems_client/api/connections/list_connections.py @@ -17,6 +17,7 @@ def _get_kwargs( *, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -41,6 +42,13 @@ def _get_kwargs( json_provider = provider params["provider"] = json_provider + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -100,6 +108,7 @@ def sync_detailed( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -123,6 +132,7 @@ def sync_detailed( graph_id (str): Graph database identifier entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -137,6 +147,7 @@ def sync_detailed( graph_id=graph_id, entity_id=entity_id, provider=provider, + token=token, authorization=authorization, ) @@ -153,6 +164,7 @@ def sync( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -176,6 +188,7 @@ def sync( graph_id (str): Graph database identifier entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -191,6 +204,7 @@ def sync( client=client, entity_id=entity_id, provider=provider, + token=token, authorization=authorization, ).parsed @@ -201,6 +215,7 @@ async def asyncio_detailed( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -224,6 +239,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -238,6 +254,7 @@ async def asyncio_detailed( graph_id=graph_id, entity_id=entity_id, provider=provider, + token=token, authorization=authorization, ) @@ -252,6 +269,7 @@ async def asyncio( client: AuthenticatedClient, entity_id: Union[None, Unset, str] = UNSET, provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]: """List Connections @@ -275,6 +293,7 @@ async def asyncio( graph_id (str): Graph database identifier entity_id (Union[None, Unset, str]): Filter by entity ID provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -291,6 +310,7 @@ async def asyncio( client=client, entity_id=entity_id, provider=provider, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/oauth_callback.py b/robosystems_client/api/connections/oauth_callback.py index f35b52c..837d280 100644 --- a/robosystems_client/api/connections/oauth_callback.py +++ b/robosystems_client/api/connections/oauth_callback.py @@ -16,15 +16,28 @@ def _get_kwargs( provider: str, *, body: OAuthCallbackRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/connections/oauth/callback/{provider}", + "params": params, } _kwargs["json"] = body.to_dict() @@ -84,6 +97,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: OAuthCallbackRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -111,6 +125,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier provider (str): OAuth provider name + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. @@ -126,6 +141,7 @@ def sync_detailed( graph_id=graph_id, provider=provider, body=body, + token=token, authorization=authorization, ) @@ -142,6 +158,7 @@ def sync( *, client: AuthenticatedClient, body: OAuthCallbackRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -169,6 +186,7 @@ def sync( Args: graph_id (str): Graph database identifier provider (str): OAuth provider name + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. @@ -185,6 +203,7 @@ def sync( provider=provider, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -195,6 +214,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: OAuthCallbackRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -222,6 +242,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier provider (str): OAuth provider name + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. @@ -237,6 +258,7 @@ async def asyncio_detailed( graph_id=graph_id, provider=provider, body=body, + token=token, authorization=authorization, ) @@ -251,6 +273,7 @@ async def asyncio( *, client: AuthenticatedClient, body: OAuthCallbackRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """OAuth Callback @@ -278,6 +301,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier provider (str): OAuth provider name + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (OAuthCallbackRequest): OAuth callback parameters. @@ -295,6 +319,7 @@ async def asyncio( provider=provider, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/connections/sync_connection.py b/robosystems_client/api/connections/sync_connection.py index 9c9a3ec..adf65de 100644 --- a/robosystems_client/api/connections/sync_connection.py +++ b/robosystems_client/api/connections/sync_connection.py @@ -19,15 +19,28 @@ def _get_kwargs( connection_id: str, *, body: SyncConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/connections/{connection_id}/sync", + "params": params, } _kwargs["json"] = body.to_dict() @@ -88,6 +101,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: SyncConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] @@ -122,6 +136,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. @@ -137,6 +152,7 @@ def sync_detailed( graph_id=graph_id, connection_id=connection_id, body=body, + token=token, authorization=authorization, ) @@ -153,6 +169,7 @@ def sync( *, client: AuthenticatedClient, body: SyncConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] @@ -187,6 +204,7 @@ def sync( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. @@ -203,6 +221,7 @@ def sync( connection_id=connection_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -213,6 +232,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: SyncConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] @@ -247,6 +267,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. @@ -262,6 +283,7 @@ async def asyncio_detailed( graph_id=graph_id, connection_id=connection_id, body=body, + token=token, authorization=authorization, ) @@ -276,6 +298,7 @@ async def asyncio( *, client: AuthenticatedClient, body: SyncConnectionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, HTTPValidationError, SyncConnectionResponseSyncconnection] @@ -310,6 +333,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier connection_id (str): Connection identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SyncConnectionRequest): Request to sync a connection. @@ -327,6 +351,7 @@ async def asyncio( connection_id=connection_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/copy/copy_data_to_graph.py b/robosystems_client/api/copy/copy_data_to_graph.py index a1bf429..360cc5f 100644 --- a/robosystems_client/api/copy/copy_data_to_graph.py +++ b/robosystems_client/api/copy/copy_data_to_graph.py @@ -17,15 +17,28 @@ def _get_kwargs( graph_id: str, *, body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/copy", + "params": params, } _kwargs["json"]: dict[str, Any] @@ -96,6 +109,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CopyResponse, HTTPValidationError]]: """Copy Data to Graph @@ -162,6 +176,7 @@ def sync_detailed( Args: graph_id (str): Target graph identifier (user graphs only - shared repositories not allowed) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): @@ -176,6 +191,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -191,6 +207,7 @@ def sync( *, client: AuthenticatedClient, body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CopyResponse, HTTPValidationError]]: """Copy Data to Graph @@ -257,6 +274,7 @@ def sync( Args: graph_id (str): Target graph identifier (user graphs only - shared repositories not allowed) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): @@ -272,6 +290,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -281,6 +300,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CopyResponse, HTTPValidationError]]: """Copy Data to Graph @@ -347,6 +367,7 @@ async def asyncio_detailed( Args: graph_id (str): Target graph identifier (user graphs only - shared repositories not allowed) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): @@ -361,6 +382,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -374,6 +396,7 @@ async def asyncio( *, client: AuthenticatedClient, body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CopyResponse, HTTPValidationError]]: """Copy Data to Graph @@ -440,6 +463,7 @@ async def asyncio( Args: graph_id (str): Target graph identifier (user graphs only - shared repositories not allowed) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): @@ -456,6 +480,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/create/create_graph.py b/robosystems_client/api/create/create_graph.py index 624d9e0..3d426f4 100644 --- a/robosystems_client/api/create/create_graph.py +++ b/robosystems_client/api/create/create_graph.py @@ -13,15 +13,28 @@ def _get_kwargs( *, body: CreateGraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/create/graph", + "params": params, } _kwargs["json"] = body.to_dict() @@ -63,6 +76,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateGraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -109,6 +123,7 @@ def sync_detailed( - `_links.status`: Point-in-time status check endpoint Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, @@ -126,6 +141,7 @@ def sync_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -140,6 +156,7 @@ def sync( *, client: AuthenticatedClient, body: CreateGraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -186,6 +203,7 @@ def sync( - `_links.status`: Point-in-time status check endpoint Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, @@ -204,6 +222,7 @@ def sync( return sync_detailed( client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -212,6 +231,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateGraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -258,6 +278,7 @@ async def asyncio_detailed( - `_links.status`: Point-in-time status check endpoint Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, @@ -275,6 +296,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -287,6 +309,7 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateGraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Create New Graph Database @@ -333,6 +356,7 @@ async def asyncio( - `_links.status`: Point-in-time status check endpoint Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateGraphRequest): Request model for creating a new graph. Example: {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, @@ -352,6 +376,7 @@ async def asyncio( await asyncio_detailed( client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_analytics/get_graph_metrics.py b/robosystems_client/api/graph_analytics/get_graph_metrics.py index c9d8b58..231e194 100644 --- a/robosystems_client/api/graph_analytics/get_graph_metrics.py +++ b/robosystems_client/api/graph_analytics/get_graph_metrics.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/analytics", + "params": params, } _kwargs["headers"] = headers @@ -73,6 +86,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -97,6 +111,7 @@ def sync_detailed( Args: graph_id (str): The graph ID to get metrics for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -109,6 +124,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -123,6 +139,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -147,6 +164,7 @@ def sync( Args: graph_id (str): The graph ID to get metrics for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -160,6 +178,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -168,6 +187,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -192,6 +212,7 @@ async def asyncio_detailed( Args: graph_id (str): The graph ID to get metrics for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -204,6 +225,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -216,6 +238,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphMetricsResponse, HTTPValidationError]]: """Get Graph Metrics @@ -240,6 +263,7 @@ async def asyncio( Args: graph_id (str): The graph ID to get metrics for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -254,6 +278,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed 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 ce11203..7e366db 100644 --- a/robosystems_client/api/graph_analytics/get_graph_usage_stats.py +++ b/robosystems_client/api/graph_analytics/get_graph_usage_stats.py @@ -15,6 +15,7 @@ def _get_kwargs( graph_id: str, *, include_details: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -25,6 +26,13 @@ def _get_kwargs( params["include_details"] = include_details + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -78,6 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -110,6 +119,7 @@ def sync_detailed( graph_id (str): The graph ID to get usage stats for include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -123,6 +133,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, include_details=include_details, + token=token, authorization=authorization, ) @@ -138,6 +149,7 @@ def sync( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -170,6 +182,7 @@ def sync( graph_id (str): The graph ID to get usage stats for include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -184,6 +197,7 @@ def sync( graph_id=graph_id, client=client, include_details=include_details, + token=token, authorization=authorization, ).parsed @@ -193,6 +207,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -225,6 +240,7 @@ async def asyncio_detailed( graph_id (str): The graph ID to get usage stats for include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -238,6 +254,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, include_details=include_details, + token=token, authorization=authorization, ) @@ -251,6 +268,7 @@ async def asyncio( *, client: AuthenticatedClient, include_details: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]: """Get Usage Statistics @@ -283,6 +301,7 @@ async def asyncio( graph_id (str): The graph ID to get usage stats for include_details (Union[Unset, bool]): Include detailed metrics (may be slower) Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -298,6 +317,7 @@ async def asyncio( graph_id=graph_id, client=client, include_details=include_details, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_current_graph_bill.py b/robosystems_client/api/graph_billing/get_current_graph_bill.py index c73e582..d65470b 100644 --- a/robosystems_client/api/graph_billing/get_current_graph_bill.py +++ b/robosystems_client/api/graph_billing/get_current_graph_bill.py @@ -16,15 +16,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/billing/current", + "params": params, } _kwargs["headers"] = headers @@ -85,6 +98,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -108,6 +122,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -120,6 +135,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -134,6 +150,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -157,6 +174,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -170,6 +188,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -178,6 +197,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -201,6 +221,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -213,6 +234,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -225,6 +247,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -248,6 +271,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -262,6 +286,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_graph_billing_history.py b/robosystems_client/api/graph_billing/get_graph_billing_history.py index 45ce508..6fe3e41 100644 --- a/robosystems_client/api/graph_billing/get_graph_billing_history.py +++ b/robosystems_client/api/graph_billing/get_graph_billing_history.py @@ -17,6 +17,7 @@ def _get_kwargs( graph_id: str, *, months: Union[Unset, int] = 6, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -27,6 +28,13 @@ def _get_kwargs( params["months"] = months + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -98,6 +106,7 @@ def sync_detailed( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -127,6 +136,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -140,6 +150,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, months=months, + token=token, authorization=authorization, ) @@ -155,6 +166,7 @@ def sync( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -184,6 +196,7 @@ def sync( Args: graph_id (str): Graph database identifier months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -198,6 +211,7 @@ def sync( graph_id=graph_id, client=client, months=months, + token=token, authorization=authorization, ).parsed @@ -207,6 +221,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -236,6 +251,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -249,6 +265,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, months=months, + token=token, authorization=authorization, ) @@ -262,6 +279,7 @@ async def asyncio( *, client: AuthenticatedClient, months: Union[Unset, int] = 6, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -291,6 +309,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier months (Union[Unset, int]): Number of months to retrieve (1-24) Default: 6. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -306,6 +325,7 @@ async def asyncio( graph_id=graph_id, client=client, months=months, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_graph_monthly_bill.py b/robosystems_client/api/graph_billing/get_graph_monthly_bill.py index 3b3a2cb..7f075dd 100644 --- a/robosystems_client/api/graph_billing/get_graph_monthly_bill.py +++ b/robosystems_client/api/graph_billing/get_graph_monthly_bill.py @@ -18,15 +18,28 @@ def _get_kwargs( year: int, month: int, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/billing/history/{year}/{month}", + "params": params, } _kwargs["headers"] = headers @@ -93,6 +106,7 @@ def sync_detailed( month: int, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -118,6 +132,7 @@ def sync_detailed( graph_id (str): Graph database identifier year (int): Year (2024-2030) month (int): Month (1-12) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -132,6 +147,7 @@ def sync_detailed( graph_id=graph_id, year=year, month=month, + token=token, authorization=authorization, ) @@ -148,6 +164,7 @@ def sync( month: int, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -173,6 +190,7 @@ def sync( graph_id (str): Graph database identifier year (int): Year (2024-2030) month (int): Month (1-12) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -188,6 +206,7 @@ def sync( year=year, month=month, client=client, + token=token, authorization=authorization, ).parsed @@ -198,6 +217,7 @@ async def asyncio_detailed( month: int, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -223,6 +243,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier year (int): Year (2024-2030) month (int): Month (1-12) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -237,6 +258,7 @@ async def asyncio_detailed( graph_id=graph_id, year=year, month=month, + token=token, authorization=authorization, ) @@ -251,6 +273,7 @@ async def asyncio( month: int, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -276,6 +299,7 @@ async def asyncio( graph_id (str): Graph database identifier year (int): Year (2024-2030) month (int): Month (1-12) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -292,6 +316,7 @@ async def asyncio( year=year, month=month, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_billing/get_graph_usage_details.py b/robosystems_client/api/graph_billing/get_graph_usage_details.py index 0fb5db6..820ca45 100644 --- a/robosystems_client/api/graph_billing/get_graph_usage_details.py +++ b/robosystems_client/api/graph_billing/get_graph_usage_details.py @@ -18,6 +18,7 @@ def _get_kwargs( *, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -40,6 +41,13 @@ def _get_kwargs( json_month = month params["month"] = json_month + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -112,6 +120,7 @@ def sync_detailed( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -141,6 +150,7 @@ def sync_detailed( graph_id (str): Graph database identifier year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -155,6 +165,7 @@ def sync_detailed( graph_id=graph_id, year=year, month=month, + token=token, authorization=authorization, ) @@ -171,6 +182,7 @@ def sync( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -200,6 +212,7 @@ def sync( graph_id (str): Graph database identifier year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -215,6 +228,7 @@ def sync( client=client, year=year, month=month, + token=token, authorization=authorization, ).parsed @@ -225,6 +239,7 @@ async def asyncio_detailed( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -254,6 +269,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -268,6 +284,7 @@ async def asyncio_detailed( graph_id=graph_id, year=year, month=month, + token=token, authorization=authorization, ) @@ -282,6 +299,7 @@ async def asyncio( client: AuthenticatedClient, year: Union[None, Unset, int] = UNSET, month: Union[None, Unset, int] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -311,6 +329,7 @@ async def asyncio( graph_id (str): Graph database identifier year (Union[None, Unset, int]): Year (defaults to current) month (Union[None, Unset, int]): Month (defaults to current) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -327,6 +346,7 @@ async def asyncio( client=client, year=year, month=month, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/check_credit_balance.py b/robosystems_client/api/graph_credits/check_credit_balance.py index 74f9d07..68e6f21 100644 --- a/robosystems_client/api/graph_credits/check_credit_balance.py +++ b/robosystems_client/api/graph_credits/check_credit_balance.py @@ -18,6 +18,7 @@ def _get_kwargs( *, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -35,6 +36,13 @@ def _get_kwargs( json_base_cost = base_cost params["base_cost"] = json_base_cost + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -103,6 +111,7 @@ def sync_detailed( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -128,6 +137,7 @@ def sync_detailed( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -142,6 +152,7 @@ def sync_detailed( graph_id=graph_id, operation_type=operation_type, base_cost=base_cost, + token=token, authorization=authorization, ) @@ -158,6 +169,7 @@ def sync( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -183,6 +195,7 @@ def sync( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -198,6 +211,7 @@ def sync( client=client, operation_type=operation_type, base_cost=base_cost, + token=token, authorization=authorization, ).parsed @@ -208,6 +222,7 @@ async def asyncio_detailed( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -233,6 +248,7 @@ async def asyncio_detailed( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -247,6 +263,7 @@ async def asyncio_detailed( graph_id=graph_id, operation_type=operation_type, base_cost=base_cost, + token=token, authorization=authorization, ) @@ -261,6 +278,7 @@ async def asyncio( client: AuthenticatedClient, operation_type: str, base_cost: Union[None, Unset, float, str] = UNSET, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -286,6 +304,7 @@ async def asyncio( operation_type (str): Type of operation to check base_cost (Union[None, Unset, float, str]): Custom base cost (uses default if not provided) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -302,6 +321,7 @@ async def asyncio( client=client, operation_type=operation_type, base_cost=base_cost, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/check_storage_limits.py b/robosystems_client/api/graph_credits/check_storage_limits.py index 812ca18..72217e4 100644 --- a/robosystems_client/api/graph_credits/check_storage_limits.py +++ b/robosystems_client/api/graph_credits/check_storage_limits.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/credits/storage/limits", + "params": params, } _kwargs["headers"] = headers @@ -73,6 +86,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -90,6 +104,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -102,6 +117,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -116,6 +132,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -133,6 +150,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -146,6 +164,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -154,6 +173,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -171,6 +191,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -183,6 +204,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -195,6 +217,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, StorageLimitResponse]]: """Check Storage Limits @@ -212,6 +235,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -226,6 +250,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/get_credit_summary.py b/robosystems_client/api/graph_credits/get_credit_summary.py index 5b416b6..9804278 100644 --- a/robosystems_client/api/graph_credits/get_credit_summary.py +++ b/robosystems_client/api/graph_credits/get_credit_summary.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/credits/summary", + "params": params, } _kwargs["headers"] = headers @@ -73,6 +86,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -89,6 +103,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -101,6 +116,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -115,6 +131,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -131,6 +148,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -144,6 +162,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -152,6 +171,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -168,6 +188,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -180,6 +201,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -192,6 +214,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreditSummaryResponse, ErrorResponse, HTTPValidationError]]: """Get Credit Summary @@ -208,6 +231,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -222,6 +246,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/get_storage_usage.py b/robosystems_client/api/graph_credits/get_storage_usage.py index fc31c69..666b8a3 100644 --- a/robosystems_client/api/graph_credits/get_storage_usage.py +++ b/robosystems_client/api/graph_credits/get_storage_usage.py @@ -17,6 +17,7 @@ def _get_kwargs( graph_id: str, *, days: Union[Unset, int] = 30, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -27,6 +28,13 @@ def _get_kwargs( params["days"] = days + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -84,6 +92,7 @@ def sync_detailed( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] @@ -104,6 +113,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -117,6 +127,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, days=days, + token=token, authorization=authorization, ) @@ -132,6 +143,7 @@ def sync( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] @@ -152,6 +164,7 @@ def sync( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -166,6 +179,7 @@ def sync( graph_id=graph_id, client=client, days=days, + token=token, authorization=authorization, ).parsed @@ -175,6 +189,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] @@ -195,6 +210,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -208,6 +224,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, days=days, + token=token, authorization=authorization, ) @@ -221,6 +238,7 @@ async def asyncio( *, client: AuthenticatedClient, days: Union[Unset, int] = 30, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ErrorResponse, GetStorageUsageResponseGetstorageusage, HTTPValidationError] @@ -241,6 +259,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier days (Union[Unset, int]): Number of days of history to return Default: 30. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -256,6 +275,7 @@ async def asyncio( graph_id=graph_id, client=client, days=days, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_credits/list_credit_transactions.py b/robosystems_client/api/graph_credits/list_credit_transactions.py index 6f6997d..db4050b 100644 --- a/robosystems_client/api/graph_credits/list_credit_transactions.py +++ b/robosystems_client/api/graph_credits/list_credit_transactions.py @@ -20,6 +20,7 @@ def _get_kwargs( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -60,6 +61,13 @@ def _get_kwargs( params["offset"] = offset + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -122,6 +130,7 @@ def sync_detailed( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -152,6 +161,7 @@ def sync_detailed( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -170,6 +180,7 @@ def sync_detailed( end_date=end_date, limit=limit, offset=offset, + token=token, authorization=authorization, ) @@ -190,6 +201,7 @@ def sync( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -220,6 +232,7 @@ def sync( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -239,6 +252,7 @@ def sync( end_date=end_date, limit=limit, offset=offset, + token=token, authorization=authorization, ).parsed @@ -253,6 +267,7 @@ async def asyncio_detailed( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -283,6 +298,7 @@ async def asyncio_detailed( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -301,6 +317,7 @@ async def asyncio_detailed( end_date=end_date, limit=limit, offset=offset, + token=token, authorization=authorization, ) @@ -319,6 +336,7 @@ async def asyncio( end_date: Union[None, Unset, str] = UNSET, limit: Union[Unset, int] = 100, offset: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[DetailedTransactionsResponse, ErrorResponse, HTTPValidationError]]: """List Credit Transactions @@ -349,6 +367,7 @@ async def asyncio( end_date (Union[None, Unset, str]): End date for filtering (ISO format: YYYY-MM-DD) limit (Union[Unset, int]): Maximum number of transactions to return Default: 100. offset (Union[Unset, int]): Number of transactions to skip Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -369,6 +388,7 @@ async def asyncio( end_date=end_date, limit=limit, offset=offset, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_health/get_database_health.py b/robosystems_client/api/graph_health/get_database_health.py index a32c74f..de9f3ba 100644 --- a/robosystems_client/api/graph_health/get_database_health.py +++ b/robosystems_client/api/graph_health/get_database_health.py @@ -13,15 +13,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/health", + "params": params, } _kwargs["headers"] = headers @@ -69,6 +82,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -93,6 +107,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -105,6 +120,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -119,6 +135,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -143,6 +160,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -156,6 +174,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -164,6 +183,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -188,6 +208,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -200,6 +221,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -212,6 +234,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseHealthResponse, HTTPValidationError]]: """Database Health Check @@ -236,6 +259,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -250,6 +274,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_info/get_database_info.py b/robosystems_client/api/graph_info/get_database_info.py index 107baba..70c315e 100644 --- a/robosystems_client/api/graph_info/get_database_info.py +++ b/robosystems_client/api/graph_info/get_database_info.py @@ -13,15 +13,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/info", + "params": params, } _kwargs["headers"] = headers @@ -69,6 +82,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -94,6 +108,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -106,6 +121,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -120,6 +136,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -145,6 +162,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -158,6 +176,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -166,6 +185,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -191,6 +211,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -203,6 +224,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -215,6 +237,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DatabaseInfoResponse, HTTPValidationError]]: """Database Information @@ -240,6 +263,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -254,6 +278,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/graph_limits/get_graph_limits.py b/robosystems_client/api/graph_limits/get_graph_limits.py index 69075b5..cb9f7f6 100644 --- a/robosystems_client/api/graph_limits/get_graph_limits.py +++ b/robosystems_client/api/graph_limits/get_graph_limits.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/limits", + "params": params, } _kwargs["headers"] = headers @@ -71,6 +84,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -91,6 +105,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier (user graph or shared repository) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -103,6 +118,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -117,6 +133,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -137,6 +154,7 @@ def sync( Args: graph_id (str): Graph database identifier (user graph or shared repository) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -150,6 +168,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -158,6 +177,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -178,6 +198,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier (user graph or shared repository) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -190,6 +211,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -202,6 +224,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: """Get Graph Operational Limits @@ -222,6 +245,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier (user graph or shared repository) + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -236,6 +260,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/mcp/call_mcp_tool.py b/robosystems_client/api/mcp/call_mcp_tool.py index 21b43f0..0564de8 100644 --- a/robosystems_client/api/mcp/call_mcp_tool.py +++ b/robosystems_client/api/mcp/call_mcp_tool.py @@ -17,6 +17,7 @@ def _get_kwargs( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -34,6 +35,13 @@ def _get_kwargs( params["test_mode"] = test_mode + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -115,6 +123,7 @@ def sync_detailed( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -158,6 +167,7 @@ def sync_detailed( graph_id (str): Graph database identifier format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. @@ -174,6 +184,7 @@ def sync_detailed( body=body, format_=format_, test_mode=test_mode, + token=token, authorization=authorization, ) @@ -191,6 +202,7 @@ def sync( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -234,6 +246,7 @@ def sync( graph_id (str): Graph database identifier format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. @@ -251,6 +264,7 @@ def sync( body=body, format_=format_, test_mode=test_mode, + token=token, authorization=authorization, ).parsed @@ -262,6 +276,7 @@ async def asyncio_detailed( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -305,6 +320,7 @@ async def asyncio_detailed( graph_id (str): Graph database identifier format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. @@ -321,6 +337,7 @@ async def asyncio_detailed( body=body, format_=format_, test_mode=test_mode, + token=token, authorization=authorization, ) @@ -336,6 +353,7 @@ async def asyncio( body: MCPToolCall, format_: Union[None, Unset, str] = UNSET, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, ErrorResponse, HTTPValidationError]]: """Execute MCP Tool @@ -379,6 +397,7 @@ async def asyncio( graph_id (str): Graph database identifier format_ (Union[None, Unset, str]): Response format override (json, sse, ndjson) test_mode (Union[Unset, bool]): Enable test mode for debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (MCPToolCall): Request model for MCP tool execution. @@ -397,6 +416,7 @@ async def asyncio( body=body, format_=format_, test_mode=test_mode, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/mcp/list_mcp_tools.py b/robosystems_client/api/mcp/list_mcp_tools.py index d4bf0bf..bf645e5 100644 --- a/robosystems_client/api/mcp/list_mcp_tools.py +++ b/robosystems_client/api/mcp/list_mcp_tools.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/mcp/tools", + "params": params, } _kwargs["headers"] = headers @@ -69,6 +82,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -91,6 +105,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -103,6 +118,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -117,6 +133,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -139,6 +156,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -152,6 +170,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -160,6 +179,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -182,6 +202,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -194,6 +215,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -206,6 +228,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, MCPToolsResponse]]: """List MCP Tools @@ -228,6 +251,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -242,6 +266,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/operations/cancel_operation.py b/robosystems_client/api/operations/cancel_operation.py index afc6771..6c9d74e 100644 --- a/robosystems_client/api/operations/cancel_operation.py +++ b/robosystems_client/api/operations/cancel_operation.py @@ -15,15 +15,28 @@ def _get_kwargs( operation_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/operations/{operation_id}", + "params": params, } _kwargs["headers"] = headers @@ -74,6 +87,7 @@ def sync_detailed( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -90,6 +104,7 @@ def sync_detailed( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -102,6 +117,7 @@ def sync_detailed( kwargs = _get_kwargs( operation_id=operation_id, + token=token, authorization=authorization, ) @@ -116,6 +132,7 @@ def sync( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -132,6 +149,7 @@ def sync( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -145,6 +163,7 @@ def sync( return sync_detailed( operation_id=operation_id, client=client, + token=token, authorization=authorization, ).parsed @@ -153,6 +172,7 @@ async def asyncio_detailed( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -169,6 +189,7 @@ async def asyncio_detailed( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -181,6 +202,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( operation_id=operation_id, + token=token, authorization=authorization, ) @@ -193,6 +215,7 @@ async def asyncio( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancelOperationResponseCanceloperation, HTTPValidationError]]: """Cancel Operation @@ -209,6 +232,7 @@ async def asyncio( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -223,6 +247,7 @@ async def asyncio( await asyncio_detailed( operation_id=operation_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/operations/get_operation_status.py b/robosystems_client/api/operations/get_operation_status.py index 65043c3..b8b218b 100644 --- a/robosystems_client/api/operations/get_operation_status.py +++ b/robosystems_client/api/operations/get_operation_status.py @@ -15,15 +15,28 @@ def _get_kwargs( operation_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/operations/{operation_id}/status", + "params": params, } _kwargs["headers"] = headers @@ -77,6 +90,7 @@ def sync_detailed( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] @@ -99,6 +113,7 @@ def sync_detailed( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -111,6 +126,7 @@ def sync_detailed( kwargs = _get_kwargs( operation_id=operation_id, + token=token, authorization=authorization, ) @@ -125,6 +141,7 @@ def sync( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] @@ -147,6 +164,7 @@ def sync( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -160,6 +178,7 @@ def sync( return sync_detailed( operation_id=operation_id, client=client, + token=token, authorization=authorization, ).parsed @@ -168,6 +187,7 @@ async def asyncio_detailed( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] @@ -190,6 +210,7 @@ async def asyncio_detailed( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -202,6 +223,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( operation_id=operation_id, + token=token, authorization=authorization, ) @@ -214,6 +236,7 @@ async def asyncio( operation_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetOperationStatusResponseGetoperationstatus, HTTPValidationError] @@ -236,6 +259,7 @@ async def asyncio( Args: operation_id (str): Operation identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -250,6 +274,7 @@ async def asyncio( await asyncio_detailed( operation_id=operation_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/operations/stream_operation_events.py b/robosystems_client/api/operations/stream_operation_events.py index 0044509..4f9f436 100644 --- a/robosystems_client/api/operations/stream_operation_events.py +++ b/robosystems_client/api/operations/stream_operation_events.py @@ -13,6 +13,7 @@ def _get_kwargs( operation_id: str, *, from_sequence: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -23,6 +24,13 @@ def _get_kwargs( params["from_sequence"] = from_sequence + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -76,6 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, from_sequence: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Stream Operation Events @@ -132,6 +141,7 @@ def sync_detailed( operation_id (str): Operation identifier from initial submission from_sequence (Union[Unset, int]): Start streaming from this sequence number (0 = from beginning) Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -145,6 +155,7 @@ def sync_detailed( kwargs = _get_kwargs( operation_id=operation_id, from_sequence=from_sequence, + token=token, authorization=authorization, ) @@ -160,6 +171,7 @@ def sync( *, client: AuthenticatedClient, from_sequence: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Stream Operation Events @@ -216,6 +228,7 @@ def sync( operation_id (str): Operation identifier from initial submission from_sequence (Union[Unset, int]): Start streaming from this sequence number (0 = from beginning) Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -230,6 +243,7 @@ def sync( operation_id=operation_id, client=client, from_sequence=from_sequence, + token=token, authorization=authorization, ).parsed @@ -239,6 +253,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, from_sequence: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Stream Operation Events @@ -295,6 +310,7 @@ async def asyncio_detailed( operation_id (str): Operation identifier from initial submission from_sequence (Union[Unset, int]): Start streaming from this sequence number (0 = from beginning) Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -308,6 +324,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( operation_id=operation_id, from_sequence=from_sequence, + token=token, authorization=authorization, ) @@ -321,6 +338,7 @@ async def asyncio( *, client: AuthenticatedClient, from_sequence: Union[Unset, int] = 0, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Stream Operation Events @@ -377,6 +395,7 @@ async def asyncio( operation_id (str): Operation identifier from initial submission from_sequence (Union[Unset, int]): Start streaming from this sequence number (0 = from beginning) Default: 0. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -392,6 +411,7 @@ async def asyncio( operation_id=operation_id, client=client, from_sequence=from_sequence, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/query/execute_cypher_query.py b/robosystems_client/api/query/execute_cypher_query.py index ca7459a..7da23f3 100644 --- a/robosystems_client/api/query/execute_cypher_query.py +++ b/robosystems_client/api/query/execute_cypher_query.py @@ -18,6 +18,7 @@ def _get_kwargs( mode: Union[None, ResponseMode, Unset] = UNSET, chunk_size: Union[Unset, int] = 1000, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -39,6 +40,13 @@ def _get_kwargs( params["test_mode"] = test_mode + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -111,6 +119,7 @@ def sync_detailed( mode: Union[None, ResponseMode, Unset] = UNSET, chunk_size: Union[Unset, int] = 1000, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Execute Cypher Query @@ -168,6 +177,7 @@ def sync_detailed( mode (Union[None, ResponseMode, Unset]): Response mode override chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. @@ -185,6 +195,7 @@ def sync_detailed( mode=mode, chunk_size=chunk_size, test_mode=test_mode, + token=token, authorization=authorization, ) @@ -203,6 +214,7 @@ def sync( mode: Union[None, ResponseMode, Unset] = UNSET, chunk_size: Union[Unset, int] = 1000, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Execute Cypher Query @@ -260,6 +272,7 @@ def sync( mode (Union[None, ResponseMode, Unset]): Response mode override chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. @@ -278,6 +291,7 @@ def sync( mode=mode, chunk_size=chunk_size, test_mode=test_mode, + token=token, authorization=authorization, ).parsed @@ -290,6 +304,7 @@ async def asyncio_detailed( mode: Union[None, ResponseMode, Unset] = UNSET, chunk_size: Union[Unset, int] = 1000, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Execute Cypher Query @@ -347,6 +362,7 @@ async def asyncio_detailed( mode (Union[None, ResponseMode, Unset]): Response mode override chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. @@ -364,6 +380,7 @@ async def asyncio_detailed( mode=mode, chunk_size=chunk_size, test_mode=test_mode, + token=token, authorization=authorization, ) @@ -380,6 +397,7 @@ async def asyncio( mode: Union[None, ResponseMode, Unset] = UNSET, chunk_size: Union[Unset, int] = 1000, test_mode: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Execute Cypher Query @@ -437,6 +455,7 @@ async def asyncio( mode (Union[None, ResponseMode, Unset]): Response mode override chunk_size (Union[Unset, int]): Rows per chunk for streaming Default: 1000. test_mode (Union[Unset, bool]): Enable test mode for better debugging Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CypherQueryRequest): Request model for Cypher query execution. @@ -456,6 +475,7 @@ async def asyncio( mode=mode, chunk_size=chunk_size, test_mode=test_mode, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/export_graph_schema.py b/robosystems_client/api/schema/export_graph_schema.py index 0890fb7..0f07881 100644 --- a/robosystems_client/api/schema/export_graph_schema.py +++ b/robosystems_client/api/schema/export_graph_schema.py @@ -15,6 +15,7 @@ def _get_kwargs( *, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -27,6 +28,13 @@ def _get_kwargs( params["include_data_stats"] = include_data_stats + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -73,6 +81,7 @@ def sync_detailed( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, SchemaExportResponse]]: """Export Graph Schema @@ -84,6 +93,7 @@ def sync_detailed( format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -98,6 +108,7 @@ def sync_detailed( graph_id=graph_id, format_=format_, include_data_stats=include_data_stats, + token=token, authorization=authorization, ) @@ -114,6 +125,7 @@ def sync( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, SchemaExportResponse]]: """Export Graph Schema @@ -125,6 +137,7 @@ def sync( format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -140,6 +153,7 @@ def sync( client=client, format_=format_, include_data_stats=include_data_stats, + token=token, authorization=authorization, ).parsed @@ -150,6 +164,7 @@ async def asyncio_detailed( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, SchemaExportResponse]]: """Export Graph Schema @@ -161,6 +176,7 @@ async def asyncio_detailed( format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -175,6 +191,7 @@ async def asyncio_detailed( graph_id=graph_id, format_=format_, include_data_stats=include_data_stats, + token=token, authorization=authorization, ) @@ -189,6 +206,7 @@ async def asyncio( client: AuthenticatedClient, format_: Union[Unset, str] = "json", include_data_stats: Union[Unset, bool] = False, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, SchemaExportResponse]]: """Export Graph Schema @@ -200,6 +218,7 @@ async def asyncio( format_ (Union[Unset, str]): Export format: json, yaml, or cypher Default: 'json'. include_data_stats (Union[Unset, bool]): Include statistics about actual data in the graph Default: False. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -216,6 +235,7 @@ async def asyncio( client=client, format_=format_, include_data_stats=include_data_stats, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/get_graph_schema_info.py b/robosystems_client/api/schema/get_graph_schema_info.py index b308c5b..d2f19ca 100644 --- a/robosystems_client/api/schema/get_graph_schema_info.py +++ b/robosystems_client/api/schema/get_graph_schema_info.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/schema/info", + "params": params, } _kwargs["headers"] = headers @@ -74,6 +87,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetGraphSchemaInfoResponseGetgraphschemainfo, HTTPValidationError] @@ -94,6 +108,7 @@ def sync_detailed( Args: graph_id (str): The graph database to get schema for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -106,6 +121,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -120,6 +136,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetGraphSchemaInfoResponseGetgraphschemainfo, HTTPValidationError] @@ -140,6 +157,7 @@ def sync( Args: graph_id (str): The graph database to get schema for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -153,6 +171,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -161,6 +180,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[Any, GetGraphSchemaInfoResponseGetgraphschemainfo, HTTPValidationError] @@ -181,6 +201,7 @@ async def asyncio_detailed( Args: graph_id (str): The graph database to get schema for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -193,6 +214,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -205,6 +227,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[Any, GetGraphSchemaInfoResponseGetgraphschemainfo, HTTPValidationError] @@ -225,6 +248,7 @@ async def asyncio( Args: graph_id (str): The graph database to get schema for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -239,6 +263,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/list_schema_extensions.py b/robosystems_client/api/schema/list_schema_extensions.py index 1a0b285..3d412ec 100644 --- a/robosystems_client/api/schema/list_schema_extensions.py +++ b/robosystems_client/api/schema/list_schema_extensions.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/schema/extensions", + "params": params, } _kwargs["headers"] = headers @@ -68,6 +81,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[HTTPValidationError, ListSchemaExtensionsResponseListschemaextensions] @@ -78,6 +92,7 @@ def sync_detailed( Args: graph_id (str): The graph ID to list extensions for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -90,6 +105,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -104,6 +120,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[HTTPValidationError, ListSchemaExtensionsResponseListschemaextensions] @@ -114,6 +131,7 @@ def sync( Args: graph_id (str): The graph ID to list extensions for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -127,6 +145,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -135,6 +154,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[HTTPValidationError, ListSchemaExtensionsResponseListschemaextensions] @@ -145,6 +165,7 @@ async def asyncio_detailed( Args: graph_id (str): The graph ID to list extensions for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -157,6 +178,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -169,6 +191,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[HTTPValidationError, ListSchemaExtensionsResponseListschemaextensions] @@ -179,6 +202,7 @@ async def asyncio( Args: graph_id (str): The graph ID to list extensions for + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -193,6 +217,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/schema/validate_schema.py b/robosystems_client/api/schema/validate_schema.py index c1728e5..19ffca2 100644 --- a/robosystems_client/api/schema/validate_schema.py +++ b/robosystems_client/api/schema/validate_schema.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: SchemaValidationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/schema/validate", + "params": params, } _kwargs["json"] = body.to_dict() @@ -79,6 +92,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: SchemaValidationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -108,6 +122,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SchemaValidationRequest): Request model for schema validation. @@ -122,6 +137,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -137,6 +153,7 @@ def sync( *, client: AuthenticatedClient, body: SchemaValidationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -166,6 +183,7 @@ def sync( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SchemaValidationRequest): Request model for schema validation. @@ -181,6 +199,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -190,6 +209,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: SchemaValidationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -219,6 +239,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SchemaValidationRequest): Request model for schema validation. @@ -233,6 +254,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -246,6 +268,7 @@ async def asyncio( *, client: AuthenticatedClient, body: SchemaValidationRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, SchemaValidationResponse]]: """Validate Schema @@ -275,6 +298,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SchemaValidationRequest): Request model for schema validation. @@ -291,6 +315,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/create_subgraph.py b/robosystems_client/api/subgraphs/create_subgraph.py index f8a1ca9..125bb77 100644 --- a/robosystems_client/api/subgraphs/create_subgraph.py +++ b/robosystems_client/api/subgraphs/create_subgraph.py @@ -15,15 +15,28 @@ def _get_kwargs( graph_id: str, *, body: CreateSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/{graph_id}/subgraphs", + "params": params, } _kwargs["json"] = body.to_dict() @@ -67,6 +80,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -86,6 +100,7 @@ def sync_detailed( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -100,6 +115,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -115,6 +131,7 @@ def sync( *, client: AuthenticatedClient, body: CreateSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -134,6 +151,7 @@ def sync( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -149,6 +167,7 @@ def sync( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -158,6 +177,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -177,6 +197,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -191,6 +212,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, body=body, + token=token, authorization=authorization, ) @@ -204,6 +226,7 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: """Create Subgraph @@ -223,6 +246,7 @@ async def asyncio( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -239,6 +263,7 @@ async def asyncio( graph_id=graph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/delete_subgraph.py b/robosystems_client/api/subgraphs/delete_subgraph.py index 61e30ef..00e314b 100644 --- a/robosystems_client/api/subgraphs/delete_subgraph.py +++ b/robosystems_client/api/subgraphs/delete_subgraph.py @@ -16,15 +16,28 @@ def _get_kwargs( subgraph_id: str, *, body: DeleteSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/{graph_id}/subgraphs/{subgraph_id}", + "params": params, } _kwargs["json"] = body.to_dict() @@ -87,6 +100,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -113,6 +127,7 @@ def sync_detailed( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier to delete + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -128,6 +143,7 @@ def sync_detailed( graph_id=graph_id, subgraph_id=subgraph_id, body=body, + token=token, authorization=authorization, ) @@ -144,6 +160,7 @@ def sync( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -170,6 +187,7 @@ def sync( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier to delete + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -186,6 +204,7 @@ def sync( subgraph_id=subgraph_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -196,6 +215,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -222,6 +242,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier to delete + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -237,6 +258,7 @@ async def asyncio_detailed( graph_id=graph_id, subgraph_id=subgraph_id, body=body, + token=token, authorization=authorization, ) @@ -251,6 +273,7 @@ async def asyncio( *, client: AuthenticatedClient, body: DeleteSubgraphRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, DeleteSubgraphResponse, HTTPValidationError]]: """Delete Subgraph @@ -277,6 +300,7 @@ async def asyncio( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier to delete + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -294,6 +318,7 @@ async def asyncio( subgraph_id=subgraph_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/get_subgraph_info.py b/robosystems_client/api/subgraphs/get_subgraph_info.py index 4a5cbde..2799201 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_info.py +++ b/robosystems_client/api/subgraphs/get_subgraph_info.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, subgraph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/subgraphs/{subgraph_id}/info", + "params": params, } _kwargs["headers"] = headers @@ -77,6 +90,7 @@ def sync_detailed( subgraph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -104,6 +118,7 @@ def sync_detailed( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -117,6 +132,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, subgraph_id=subgraph_id, + token=token, authorization=authorization, ) @@ -132,6 +148,7 @@ def sync( subgraph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -159,6 +176,7 @@ def sync( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -173,6 +191,7 @@ def sync( graph_id=graph_id, subgraph_id=subgraph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -182,6 +201,7 @@ async def asyncio_detailed( subgraph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -209,6 +229,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -222,6 +243,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, subgraph_id=subgraph_id, + token=token, authorization=authorization, ) @@ -235,6 +257,7 @@ async def asyncio( subgraph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: """Get Subgraph Details @@ -262,6 +285,7 @@ async def asyncio( Args: graph_id (str): Parent graph identifier subgraph_id (str): Subgraph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -277,6 +301,7 @@ async def asyncio( graph_id=graph_id, subgraph_id=subgraph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/get_subgraph_quota.py b/robosystems_client/api/subgraphs/get_subgraph_quota.py index f260c65..4e47fc4 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_quota.py +++ b/robosystems_client/api/subgraphs/get_subgraph_quota.py @@ -13,15 +13,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/subgraphs/quota", + "params": params, } _kwargs["headers"] = headers @@ -72,6 +85,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -96,6 +110,7 @@ def sync_detailed( Args: graph_id (str): Parent graph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +123,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -122,6 +138,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -146,6 +163,7 @@ def sync( Args: graph_id (str): Parent graph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -159,6 +177,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -167,6 +186,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -191,6 +211,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -203,6 +224,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -215,6 +237,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubgraphQuotaResponse]]: """Get Subgraph Quota @@ -239,6 +262,7 @@ async def asyncio( Args: graph_id (str): Parent graph identifier + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -253,6 +277,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/subgraphs/list_subgraphs.py b/robosystems_client/api/subgraphs/list_subgraphs.py index 96ec781..657598e 100644 --- a/robosystems_client/api/subgraphs/list_subgraphs.py +++ b/robosystems_client/api/subgraphs/list_subgraphs.py @@ -13,15 +13,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/{graph_id}/subgraphs", + "params": params, } _kwargs["headers"] = headers @@ -60,6 +73,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -77,6 +91,7 @@ def sync_detailed( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -89,6 +104,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -103,6 +119,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -120,6 +137,7 @@ def sync( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -133,6 +151,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -141,6 +160,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -158,6 +178,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -170,6 +191,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -182,6 +204,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs @@ -199,6 +222,7 @@ async def asyncio( Args: graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -213,6 +237,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/create_user_api_key.py b/robosystems_client/api/user/create_user_api_key.py index 5db5d49..c90fc05 100644 --- a/robosystems_client/api/user/create_user_api_key.py +++ b/robosystems_client/api/user/create_user_api_key.py @@ -14,15 +14,28 @@ def _get_kwargs( *, body: CreateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/user/api-keys", + "params": params, } _kwargs["json"] = body.to_dict() @@ -65,6 +78,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key @@ -72,6 +86,7 @@ def sync_detailed( Create a new API key for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. @@ -85,6 +100,7 @@ def sync_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -99,6 +115,7 @@ def sync( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key @@ -106,6 +123,7 @@ def sync( Create a new API key for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. @@ -120,6 +138,7 @@ def sync( return sync_detailed( client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -128,6 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key @@ -135,6 +155,7 @@ async def asyncio_detailed( Create a new API key for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. @@ -148,6 +169,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -160,6 +182,7 @@ async def asyncio( *, client: AuthenticatedClient, body: CreateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[CreateAPIKeyResponse, HTTPValidationError]]: """Create API Key @@ -167,6 +190,7 @@ async def asyncio( Create a new API key for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (CreateAPIKeyRequest): Request model for creating a new API key. @@ -182,6 +206,7 @@ async def asyncio( await asyncio_detailed( client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/get_all_credit_summaries.py b/robosystems_client/api/user/get_all_credit_summaries.py index 0814903..cd5900c 100644 --- a/robosystems_client/api/user/get_all_credit_summaries.py +++ b/robosystems_client/api/user/get_all_credit_summaries.py @@ -15,15 +15,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/credits", + "params": params, } _kwargs["headers"] = headers @@ -79,6 +92,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -98,6 +112,7 @@ def sync_detailed( No credits are consumed for viewing summaries. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -109,6 +124,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -122,6 +138,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -141,6 +158,7 @@ def sync( No credits are consumed for viewing summaries. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -153,6 +171,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -160,6 +179,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -179,6 +199,7 @@ async def asyncio_detailed( No credits are consumed for viewing summaries. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -190,6 +211,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -201,6 +223,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -220,6 +243,7 @@ async def asyncio( No credits are consumed for viewing summaries. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -233,6 +257,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/get_current_user.py b/robosystems_client/api/user/get_current_user.py index 301f246..eab746d 100644 --- a/robosystems_client/api/user/get_current_user.py +++ b/robosystems_client/api/user/get_current_user.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user", + "params": params, } _kwargs["headers"] = headers @@ -58,6 +71,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserResponse]]: """Get Current User @@ -65,6 +79,7 @@ def sync_detailed( Returns information about the currently authenticated user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -76,6 +91,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -89,6 +105,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserResponse]]: """Get Current User @@ -96,6 +113,7 @@ def sync( Returns information about the currently authenticated user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +126,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -115,6 +134,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserResponse]]: """Get Current User @@ -122,6 +142,7 @@ async def asyncio_detailed( Returns information about the currently authenticated user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -133,6 +154,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -144,6 +166,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserResponse]]: """Get Current User @@ -151,6 +174,7 @@ async def asyncio( Returns information about the currently authenticated user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -164,6 +188,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/get_user_graphs.py b/robosystems_client/api/user/get_user_graphs.py index 72913a5..28c5aa5 100644 --- a/robosystems_client/api/user/get_user_graphs.py +++ b/robosystems_client/api/user/get_user_graphs.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/graphs", + "params": params, } _kwargs["headers"] = headers @@ -58,6 +71,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserGraphsResponse]]: """Get User Graphs @@ -65,6 +79,7 @@ def sync_detailed( Get all graph databases accessible to the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -76,6 +91,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -89,6 +105,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserGraphsResponse]]: """Get User Graphs @@ -96,6 +113,7 @@ def sync( Get all graph databases accessible to the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +126,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -115,6 +134,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserGraphsResponse]]: """Get User Graphs @@ -122,6 +142,7 @@ async def asyncio_detailed( Get all graph databases accessible to the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -133,6 +154,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -144,6 +166,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserGraphsResponse]]: """Get User Graphs @@ -151,6 +174,7 @@ async def asyncio( Get all graph databases accessible to the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -164,6 +188,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/list_user_api_keys.py b/robosystems_client/api/user/list_user_api_keys.py index a751f17..58c69dd 100644 --- a/robosystems_client/api/user/list_user_api_keys.py +++ b/robosystems_client/api/user/list_user_api_keys.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/api-keys", + "params": params, } _kwargs["headers"] = headers @@ -58,6 +71,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[APIKeysResponse, HTTPValidationError]]: """List API Keys @@ -65,6 +79,7 @@ def sync_detailed( Get all API keys for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -76,6 +91,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -89,6 +105,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[APIKeysResponse, HTTPValidationError]]: """List API Keys @@ -96,6 +113,7 @@ def sync( Get all API keys for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +126,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -115,6 +134,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[APIKeysResponse, HTTPValidationError]]: """List API Keys @@ -122,6 +142,7 @@ async def asyncio_detailed( Get all API keys for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -133,6 +154,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -144,6 +166,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[APIKeysResponse, HTTPValidationError]]: """List API Keys @@ -151,6 +174,7 @@ async def asyncio( Get all API keys for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -164,6 +188,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/revoke_user_api_key.py b/robosystems_client/api/user/revoke_user_api_key.py index ea700f6..b3e8e18 100644 --- a/robosystems_client/api/user/revoke_user_api_key.py +++ b/robosystems_client/api/user/revoke_user_api_key.py @@ -14,15 +14,28 @@ def _get_kwargs( api_key_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/user/api-keys/{api_key_id}", + "params": params, } _kwargs["headers"] = headers @@ -69,6 +82,7 @@ def sync_detailed( api_key_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -77,6 +91,7 @@ def sync_detailed( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -89,6 +104,7 @@ def sync_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, + token=token, authorization=authorization, ) @@ -103,6 +119,7 @@ def sync( api_key_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -111,6 +128,7 @@ def sync( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -124,6 +142,7 @@ def sync( return sync_detailed( api_key_id=api_key_id, client=client, + token=token, authorization=authorization, ).parsed @@ -132,6 +151,7 @@ async def asyncio_detailed( api_key_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -140,6 +160,7 @@ async def asyncio_detailed( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -152,6 +173,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, + token=token, authorization=authorization, ) @@ -164,6 +186,7 @@ async def asyncio( api_key_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Revoke API Key @@ -172,6 +195,7 @@ async def asyncio( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -186,6 +210,7 @@ async def asyncio( await asyncio_detailed( api_key_id=api_key_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/select_user_graph.py b/robosystems_client/api/user/select_user_graph.py index 2589034..33c1e03 100644 --- a/robosystems_client/api/user/select_user_graph.py +++ b/robosystems_client/api/user/select_user_graph.py @@ -14,15 +14,28 @@ def _get_kwargs( graph_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": f"/v1/user/graphs/{graph_id}/select", + "params": params, } _kwargs["headers"] = headers @@ -73,6 +86,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select User Graph @@ -81,6 +95,7 @@ def sync_detailed( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -93,6 +108,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -107,6 +123,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select User Graph @@ -115,6 +132,7 @@ def sync( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -128,6 +146,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ).parsed @@ -136,6 +155,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select User Graph @@ -144,6 +164,7 @@ async def asyncio_detailed( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -156,6 +177,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + token=token, authorization=authorization, ) @@ -168,6 +190,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Select User Graph @@ -176,6 +199,7 @@ async def asyncio( Args: graph_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -190,6 +214,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/update_user.py b/robosystems_client/api/user/update_user.py index 5d1780d..594bbc6 100644 --- a/robosystems_client/api/user/update_user.py +++ b/robosystems_client/api/user/update_user.py @@ -14,15 +14,28 @@ def _get_kwargs( *, body: UpdateUserRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "put", "url": "/v1/user", + "params": params, } _kwargs["json"] = body.to_dict() @@ -65,6 +78,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserResponse]]: """Update User Profile @@ -72,6 +86,7 @@ def sync_detailed( Update the current user's profile information. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. @@ -85,6 +100,7 @@ def sync_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -99,6 +115,7 @@ def sync( *, client: AuthenticatedClient, body: UpdateUserRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserResponse]]: """Update User Profile @@ -106,6 +123,7 @@ def sync( Update the current user's profile information. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. @@ -120,6 +138,7 @@ def sync( return sync_detailed( client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -128,6 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateUserRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserResponse]]: """Update User Profile @@ -135,6 +155,7 @@ async def asyncio_detailed( Update the current user's profile information. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. @@ -148,6 +169,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -160,6 +182,7 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdateUserRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserResponse]]: """Update User Profile @@ -167,6 +190,7 @@ async def asyncio( Update the current user's profile information. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateUserRequest): Request model for updating user profile. @@ -182,6 +206,7 @@ async def asyncio( await asyncio_detailed( client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/update_user_api_key.py b/robosystems_client/api/user/update_user_api_key.py index d774448..cd8e81b 100644 --- a/robosystems_client/api/user/update_user_api_key.py +++ b/robosystems_client/api/user/update_user_api_key.py @@ -15,15 +15,28 @@ def _get_kwargs( api_key_id: str, *, body: UpdateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "put", "url": f"/v1/user/api-keys/{api_key_id}", + "params": params, } _kwargs["json"] = body.to_dict() @@ -67,6 +80,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -75,6 +89,7 @@ def sync_detailed( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. @@ -89,6 +104,7 @@ def sync_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, body=body, + token=token, authorization=authorization, ) @@ -104,6 +120,7 @@ def sync( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -112,6 +129,7 @@ def sync( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. @@ -127,6 +145,7 @@ def sync( api_key_id=api_key_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -136,6 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -144,6 +164,7 @@ async def asyncio_detailed( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. @@ -158,6 +179,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( api_key_id=api_key_id, body=body, + token=token, authorization=authorization, ) @@ -171,6 +193,7 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdateAPIKeyRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[APIKeyInfo, HTTPValidationError]]: """Update API Key @@ -179,6 +202,7 @@ async def asyncio( Args: api_key_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdateAPIKeyRequest): Request model for updating an API key. @@ -195,6 +219,7 @@ async def asyncio( api_key_id=api_key_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user/update_user_password.py b/robosystems_client/api/user/update_user_password.py index a602740..c823bb7 100644 --- a/robosystems_client/api/user/update_user_password.py +++ b/robosystems_client/api/user/update_user_password.py @@ -15,15 +15,28 @@ def _get_kwargs( *, body: UpdatePasswordRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "put", "url": "/v1/user/password", + "params": params, } _kwargs["json"] = body.to_dict() @@ -78,6 +91,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePasswordRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password @@ -85,6 +99,7 @@ def sync_detailed( Update the current user's password. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. @@ -98,6 +113,7 @@ def sync_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -112,6 +128,7 @@ def sync( *, client: AuthenticatedClient, body: UpdatePasswordRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password @@ -119,6 +136,7 @@ def sync( Update the current user's password. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. @@ -133,6 +151,7 @@ def sync( return sync_detailed( client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -141,6 +160,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdatePasswordRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password @@ -148,6 +168,7 @@ async def asyncio_detailed( Update the current user's password. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. @@ -161,6 +182,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -173,6 +195,7 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdatePasswordRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[ErrorResponse, HTTPValidationError, SuccessResponse]]: """Update Password @@ -180,6 +203,7 @@ async def asyncio( Update the current user's password. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (UpdatePasswordRequest): Request model for updating user password. @@ -195,6 +219,7 @@ async def asyncio( await asyncio_detailed( client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_analytics/get_detailed_user_analytics.py b/robosystems_client/api/user_analytics/get_detailed_user_analytics.py index a7ae851..1f96a54 100644 --- a/robosystems_client/api/user_analytics/get_detailed_user_analytics.py +++ b/robosystems_client/api/user_analytics/get_detailed_user_analytics.py @@ -14,6 +14,7 @@ def _get_kwargs( *, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -26,6 +27,13 @@ def _get_kwargs( params["include_recent_activity"] = include_recent_activity + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -71,6 +79,7 @@ def sync_detailed( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -80,6 +89,7 @@ def sync_detailed( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -93,6 +103,7 @@ def sync_detailed( kwargs = _get_kwargs( include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, + token=token, authorization=authorization, ) @@ -108,6 +119,7 @@ def sync( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -117,6 +129,7 @@ def sync( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -131,6 +144,7 @@ def sync( client=client, include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, + token=token, authorization=authorization, ).parsed @@ -140,6 +154,7 @@ async def asyncio_detailed( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -149,6 +164,7 @@ async def asyncio_detailed( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -162,6 +178,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, + token=token, authorization=authorization, ) @@ -175,6 +192,7 @@ async def asyncio( client: AuthenticatedClient, include_api_stats: Union[Unset, bool] = True, include_recent_activity: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]: """Get Detailed User Analytics @@ -184,6 +202,7 @@ async def asyncio( Args: include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True. include_recent_activity (Union[Unset, bool]): Include recent activity Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -199,6 +218,7 @@ async def asyncio( client=client, include_api_stats=include_api_stats, include_recent_activity=include_recent_activity, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_analytics/get_user_usage_overview.py b/robosystems_client/api/user_analytics/get_user_usage_overview.py index 0f03a42..4647671 100644 --- a/robosystems_client/api/user_analytics/get_user_usage_overview.py +++ b/robosystems_client/api/user_analytics/get_user_usage_overview.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/analytics/overview", + "params": params, } _kwargs["headers"] = headers @@ -58,6 +71,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserUsageSummaryResponse]]: """Get User Usage Overview @@ -65,6 +79,7 @@ def sync_detailed( Get a high-level overview of usage statistics for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -76,6 +91,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -89,6 +105,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserUsageSummaryResponse]]: """Get User Usage Overview @@ -96,6 +113,7 @@ def sync( Get a high-level overview of usage statistics for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +126,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -115,6 +134,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserUsageSummaryResponse]]: """Get User Usage Overview @@ -122,6 +142,7 @@ async def asyncio_detailed( Get a high-level overview of usage statistics for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -133,6 +154,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -144,6 +166,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserUsageSummaryResponse]]: """Get User Usage Overview @@ -151,6 +174,7 @@ async def asyncio( Get a high-level overview of usage statistics for the current user. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -164,6 +188,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed 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 index cb88f47..6f9cd6e 100644 --- a/robosystems_client/api/user_limits/get_all_shared_repository_limits.py +++ b/robosystems_client/api/user_limits/get_all_shared_repository_limits.py @@ -14,15 +14,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/limits/shared-repositories/summary", + "params": params, } _kwargs["headers"] = headers @@ -74,6 +87,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -86,6 +100,7 @@ def sync_detailed( Get rate limit status for all shared repositories the user has access to. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -97,6 +112,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -110,6 +126,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -122,6 +139,7 @@ def sync( Get rate limit status for all shared repositories the user has access to. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -134,6 +152,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -141,6 +160,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[ @@ -153,6 +173,7 @@ async def asyncio_detailed( Get rate limit status for all shared repositories the user has access to. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -164,6 +185,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -175,6 +197,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[ @@ -187,6 +210,7 @@ async def asyncio( Get rate limit status for all shared repositories the user has access to. Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -200,6 +224,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).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 index 34d0ace..28ea03e 100644 --- a/robosystems_client/api/user_limits/get_shared_repository_limits.py +++ b/robosystems_client/api/user_limits/get_shared_repository_limits.py @@ -15,15 +15,28 @@ def _get_kwargs( repository: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/user/limits/shared-repositories/{repository}", + "params": params, } _kwargs["headers"] = headers @@ -68,6 +81,7 @@ def sync_detailed( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] @@ -86,6 +100,7 @@ def sync_detailed( Args: repository (str): Repository name (e.g., 'sec') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -98,6 +113,7 @@ def sync_detailed( kwargs = _get_kwargs( repository=repository, + token=token, authorization=authorization, ) @@ -112,6 +128,7 @@ def sync( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] @@ -130,6 +147,7 @@ def sync( Args: repository (str): Repository name (e.g., 'sec') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -143,6 +161,7 @@ def sync( return sync_detailed( repository=repository, client=client, + token=token, authorization=authorization, ).parsed @@ -151,6 +170,7 @@ async def asyncio_detailed( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] @@ -169,6 +189,7 @@ async def asyncio_detailed( Args: repository (str): Repository name (e.g., 'sec') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -181,6 +202,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( repository=repository, + token=token, authorization=authorization, ) @@ -193,6 +215,7 @@ async def asyncio( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[ Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError] @@ -211,6 +234,7 @@ async def asyncio( Args: repository (str): Repository name (e.g., 'sec') + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -225,6 +249,7 @@ async def asyncio( await asyncio_detailed( repository=repository, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_limits/get_user_limits.py b/robosystems_client/api/user_limits/get_user_limits.py index c946a79..a8115b7 100644 --- a/robosystems_client/api/user_limits/get_user_limits.py +++ b/robosystems_client/api/user_limits/get_user_limits.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/limits", + "params": params, } _kwargs["headers"] = headers @@ -61,6 +74,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, UserLimitsResponse]]: """Get user limits @@ -68,6 +82,7 @@ def sync_detailed( Retrieve current limits and restrictions for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -79,6 +94,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -92,6 +108,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, UserLimitsResponse]]: """Get user limits @@ -99,6 +116,7 @@ def sync( Retrieve current limits and restrictions for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -111,6 +129,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -118,6 +137,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, UserLimitsResponse]]: """Get user limits @@ -125,6 +145,7 @@ async def asyncio_detailed( Retrieve current limits and restrictions for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -136,6 +157,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -147,6 +169,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, UserLimitsResponse]]: """Get user limits @@ -154,6 +177,7 @@ async def asyncio( Retrieve current limits and restrictions for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -167,6 +191,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_limits/get_user_usage.py b/robosystems_client/api/user_limits/get_user_usage.py index 6c5e0b2..6426c15 100644 --- a/robosystems_client/api/user_limits/get_user_usage.py +++ b/robosystems_client/api/user_limits/get_user_usage.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/limits/usage", + "params": params, } _kwargs["headers"] = headers @@ -58,6 +71,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserUsageResponse]]: """Get user usage statistics @@ -65,6 +79,7 @@ def sync_detailed( Retrieve current usage statistics and remaining limits for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -76,6 +91,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -89,6 +105,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserUsageResponse]]: """Get user usage statistics @@ -96,6 +113,7 @@ def sync( Retrieve current usage statistics and remaining limits for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -108,6 +126,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -115,6 +134,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[HTTPValidationError, UserUsageResponse]]: """Get user usage statistics @@ -122,6 +142,7 @@ async def asyncio_detailed( Retrieve current usage statistics and remaining limits for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -133,6 +154,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -144,6 +166,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[HTTPValidationError, UserUsageResponse]]: """Get user usage statistics @@ -151,6 +174,7 @@ async def asyncio( Retrieve current usage statistics and remaining limits for the authenticated user Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -164,6 +188,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py b/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py index 463a7a0..67b873a 100644 --- a/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +++ b/robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py @@ -13,15 +13,28 @@ def _get_kwargs( subscription_id: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/v1/user/subscriptions/shared-repositories/{subscription_id}", + "params": params, } _kwargs["headers"] = headers @@ -69,6 +82,7 @@ def sync_detailed( subscription_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -77,6 +91,7 @@ def sync_detailed( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -89,6 +104,7 @@ def sync_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, + token=token, authorization=authorization, ) @@ -103,6 +119,7 @@ def sync( subscription_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -111,6 +128,7 @@ def sync( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -124,6 +142,7 @@ def sync( return sync_detailed( subscription_id=subscription_id, client=client, + token=token, authorization=authorization, ).parsed @@ -132,6 +151,7 @@ async def asyncio_detailed( subscription_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -140,6 +160,7 @@ async def asyncio_detailed( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -152,6 +173,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, + token=token, authorization=authorization, ) @@ -164,6 +186,7 @@ async def asyncio( subscription_id: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CancellationResponse, HTTPValidationError]]: """Cancel Subscription @@ -172,6 +195,7 @@ async def asyncio( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -186,6 +210,7 @@ async def asyncio( await asyncio_detailed( subscription_id=subscription_id, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_repository_credits.py b/robosystems_client/api/user_subscriptions/get_repository_credits.py index 5eba211..22b2d00 100644 --- a/robosystems_client/api/user_subscriptions/get_repository_credits.py +++ b/robosystems_client/api/user_subscriptions/get_repository_credits.py @@ -13,15 +13,28 @@ def _get_kwargs( repository: str, *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/user/subscriptions/shared-repositories/credits/{repository}", + "params": params, } _kwargs["headers"] = headers @@ -66,6 +79,7 @@ def sync_detailed( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -74,6 +88,7 @@ def sync_detailed( Args: repository (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -86,6 +101,7 @@ def sync_detailed( kwargs = _get_kwargs( repository=repository, + token=token, authorization=authorization, ) @@ -100,6 +116,7 @@ def sync( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -108,6 +125,7 @@ def sync( Args: repository (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -121,6 +139,7 @@ def sync( return sync_detailed( repository=repository, client=client, + token=token, authorization=authorization, ).parsed @@ -129,6 +148,7 @@ async def asyncio_detailed( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -137,6 +157,7 @@ async def asyncio_detailed( Args: repository (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -149,6 +170,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( repository=repository, + token=token, authorization=authorization, ) @@ -161,6 +183,7 @@ async def asyncio( repository: str, *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]: """Get Repository Credits @@ -169,6 +192,7 @@ async def asyncio( Args: repository (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -183,6 +207,7 @@ async def asyncio( await asyncio_detailed( repository=repository, client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py b/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py index 408b3f1..250de34 100644 --- a/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +++ b/robosystems_client/api/user_subscriptions/get_shared_repository_credits.py @@ -12,15 +12,28 @@ def _get_kwargs( *, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/user/subscriptions/shared-repositories/credits", + "params": params, } _kwargs["headers"] = headers @@ -64,6 +77,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: """Get Credit Balances @@ -71,6 +85,7 @@ def sync_detailed( Retrieve credit balances for all shared repository subscriptions Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -82,6 +97,7 @@ def sync_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -95,6 +111,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: """Get Credit Balances @@ -102,6 +119,7 @@ def sync( Retrieve credit balances for all shared repository subscriptions Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -114,6 +132,7 @@ def sync( return sync_detailed( client=client, + token=token, authorization=authorization, ).parsed @@ -121,6 +140,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: """Get Credit Balances @@ -128,6 +148,7 @@ async def asyncio_detailed( Retrieve credit balances for all shared repository subscriptions Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -139,6 +160,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + token=token, authorization=authorization, ) @@ -150,6 +172,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, CreditsSummaryResponse, HTTPValidationError]]: """Get Credit Balances @@ -157,6 +180,7 @@ async def asyncio( Retrieve credit balances for all shared repository subscriptions Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -170,6 +194,7 @@ async def asyncio( return ( await asyncio_detailed( client=client, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py b/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py index 8f1d82f..d92f99a 100644 --- a/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +++ b/robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py @@ -13,6 +13,7 @@ def _get_kwargs( *, active_only: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -23,6 +24,13 @@ def _get_kwargs( params["active_only"] = active_only + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -73,6 +81,7 @@ def sync_detailed( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -81,6 +90,7 @@ def sync_detailed( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -93,6 +103,7 @@ def sync_detailed( kwargs = _get_kwargs( active_only=active_only, + token=token, authorization=authorization, ) @@ -107,6 +118,7 @@ def sync( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -115,6 +127,7 @@ def sync( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -128,6 +141,7 @@ def sync( return sync_detailed( client=client, active_only=active_only, + token=token, authorization=authorization, ).parsed @@ -136,6 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -144,6 +159,7 @@ async def asyncio_detailed( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -156,6 +172,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( active_only=active_only, + token=token, authorization=authorization, ) @@ -168,6 +185,7 @@ async def asyncio( *, client: AuthenticatedClient, active_only: Union[Unset, bool] = True, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]: """Get User Subscriptions @@ -176,6 +194,7 @@ async def asyncio( Args: active_only (Union[Unset, bool]): Only return active subscriptions Default: True. + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): Raises: @@ -190,6 +209,7 @@ async def asyncio( await asyncio_detailed( client=client, active_only=active_only, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py b/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py index ed908f8..2edb0c5 100644 --- a/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +++ b/robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py @@ -14,15 +14,28 @@ def _get_kwargs( *, body: SubscriptionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/user/subscriptions/shared-repositories/subscribe", + "params": params, } _kwargs["json"] = body.to_dict() @@ -74,6 +87,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: SubscriptionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository @@ -81,6 +95,7 @@ def sync_detailed( Create a new subscription to a shared repository add-on with specified tier Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. @@ -94,6 +109,7 @@ def sync_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -108,6 +124,7 @@ def sync( *, client: AuthenticatedClient, body: SubscriptionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository @@ -115,6 +132,7 @@ def sync( Create a new subscription to a shared repository add-on with specified tier Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. @@ -129,6 +147,7 @@ def sync( return sync_detailed( client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -137,6 +156,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: SubscriptionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository @@ -144,6 +164,7 @@ async def asyncio_detailed( Create a new subscription to a shared repository add-on with specified tier Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. @@ -157,6 +178,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( body=body, + token=token, authorization=authorization, ) @@ -169,6 +191,7 @@ async def asyncio( *, client: AuthenticatedClient, body: SubscriptionRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]: """Subscribe to Shared Repository @@ -176,6 +199,7 @@ async def asyncio( Create a new subscription to a shared repository add-on with specified tier Args: + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (SubscriptionRequest): Request to create a new subscription. @@ -191,6 +215,7 @@ async def asyncio( await asyncio_detailed( client=client, body=body, + token=token, authorization=authorization, ) ).parsed diff --git a/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py b/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py index c92f4e3..f681e93 100644 --- a/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +++ b/robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py @@ -14,15 +14,28 @@ def _get_kwargs( subscription_id: str, *, body: TierUpgradeRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(authorization, Unset): headers["authorization"] = authorization + params: dict[str, Any] = {} + + json_token: Union[None, Unset, str] + if isinstance(token, Unset): + json_token = UNSET + else: + json_token = token + params["token"] = json_token + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "put", "url": f"/v1/user/subscriptions/shared-repositories/{subscription_id}/upgrade", + "params": params, } _kwargs["json"] = body.to_dict() @@ -77,6 +90,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: TierUpgradeRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -85,6 +99,7 @@ def sync_detailed( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. @@ -99,6 +114,7 @@ def sync_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, body=body, + token=token, authorization=authorization, ) @@ -114,6 +130,7 @@ def sync( *, client: AuthenticatedClient, body: TierUpgradeRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -122,6 +139,7 @@ def sync( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. @@ -137,6 +155,7 @@ def sync( subscription_id=subscription_id, client=client, body=body, + token=token, authorization=authorization, ).parsed @@ -146,6 +165,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: TierUpgradeRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -154,6 +174,7 @@ async def asyncio_detailed( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. @@ -168,6 +189,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( subscription_id=subscription_id, body=body, + token=token, authorization=authorization, ) @@ -181,6 +203,7 @@ async def asyncio( *, client: AuthenticatedClient, body: TierUpgradeRequest, + token: Union[None, Unset, str] = UNSET, authorization: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: """Upgrade Subscription Tier @@ -189,6 +212,7 @@ async def asyncio( Args: subscription_id (str): + token (Union[None, Unset, str]): JWT token for SSE authentication authorization (Union[None, Unset, str]): body (TierUpgradeRequest): Request to upgrade subscription tier. @@ -205,6 +229,7 @@ async def asyncio( subscription_id=subscription_id, client=client, body=body, + token=token, authorization=authorization, ) ).parsed From 0202fbd986bfa19f4f20ddae4c9d006234d9ba15 Mon Sep 17 00:00:00 2001 From: Joey French Date: Mon, 22 Sep 2025 13:30:05 -0500 Subject: [PATCH 2/2] Refactor SDK to enhance token management and introduce DataFrame utilities - Updated the SDK to improve token handling across various clients, allowing for better authentication flexibility. - Introduced new DataFrame utilities for seamless integration with Pandas, enabling conversion of query results to DataFrames and supporting CSV exports. - Enhanced error handling in query execution and copy operations to provide clearer feedback on authentication issues. - Added comprehensive tests for new DataFrame functionalities and JWT token utilities to ensure reliability. These changes enhance the overall usability and maintainability of the SDK while introducing new features without breaking existing functionality. --- robosystems_client/__init__.py | 19 +- robosystems_client/extensions/__init__.py | 70 +++ .../extensions/auth_integration.py | 15 +- robosystems_client/extensions/copy_client.py | 54 ++- .../extensions/dataframe_utils.py | 455 ++++++++++++++++++ robosystems_client/extensions/extensions.py | 16 + .../extensions/operation_client.py | 64 ++- robosystems_client/extensions/query_client.py | 121 ++++- .../extensions/tests/test_dataframe_utils.py | 334 +++++++++++++ .../extensions/tests/test_integration.py | 2 +- .../extensions/tests/test_token_utils.py | 274 +++++++++++ robosystems_client/extensions/token_utils.py | 417 ++++++++++++++++ robosystems_client/extensions/utils.py | 34 +- 13 files changed, 1812 insertions(+), 63 deletions(-) create mode 100644 robosystems_client/extensions/dataframe_utils.py create mode 100644 robosystems_client/extensions/tests/test_dataframe_utils.py create mode 100644 robosystems_client/extensions/tests/test_token_utils.py create mode 100644 robosystems_client/extensions/token_utils.py diff --git a/robosystems_client/__init__.py b/robosystems_client/__init__.py index 46d5145..d643eaf 100644 --- a/robosystems_client/__init__.py +++ b/robosystems_client/__init__.py @@ -1,14 +1,25 @@ """RoboSystems Python Client.""" -__version__ = "0.1.0" - from .client import AuthenticatedClient, Client +# Convenience alias for the main SDK +RoboSystemsSDK = AuthenticatedClient + __all__ = ( "AuthenticatedClient", "Client", "RoboSystemsSDK", ) -# Convenience alias for the main SDK -RoboSystemsSDK = AuthenticatedClient + +def _get_version() -> str: + """Get version from package metadata.""" + try: + from importlib.metadata import version + + return version("robosystems-client") + except Exception: + return "0.0.0+development" + + +__version__ = _get_version() diff --git a/robosystems_client/extensions/__init__.py b/robosystems_client/extensions/__init__.py index efe3d03..24a424a 100644 --- a/robosystems_client/extensions/__init__.py +++ b/robosystems_client/extensions/__init__.py @@ -54,6 +54,47 @@ create_development_extensions, ) +# JWT Token utilities +from .token_utils import ( + validate_jwt_format, + extract_jwt_from_header, + decode_jwt_payload, + is_jwt_expired, + get_jwt_claims, + get_jwt_expiration, + extract_token_from_environment, + extract_token_from_cookie, + find_valid_token, + TokenManager, + TokenSource, +) + +# DataFrame utilities (optional - requires pandas) +try: + from .dataframe_utils import ( + query_result_to_dataframe, + DataFrameQueryClient, + HAS_PANDAS, + ) + + # Re-export the imported functions for module API + from .dataframe_utils import ( + parse_datetime_columns, + stream_to_dataframe as _stream_to_dataframe, + dataframe_to_cypher_params, + export_query_to_csv, + compare_dataframes, + ) +except ImportError: + HAS_PANDAS = False + DataFrameQueryClient = None + # Set placeholders for optional functions + parse_datetime_columns = None + _stream_to_dataframe = None + dataframe_to_cypher_params = None + export_query_to_csv = None + compare_dataframes = None + __all__ = [ # Core extension classes "RoboSystemsExtensions", @@ -101,6 +142,21 @@ "create_extensions", "create_production_extensions", "create_development_extensions", + # JWT Token utilities + "validate_jwt_format", + "extract_jwt_from_header", + "decode_jwt_payload", + "is_jwt_expired", + "get_jwt_claims", + "get_jwt_expiration", + "extract_token_from_environment", + "extract_token_from_cookie", + "find_valid_token", + "TokenManager", + "TokenSource", + # DataFrame utilities (optional) + "HAS_PANDAS", + "DataFrameQueryClient", ] # Create a default extensions instance @@ -135,3 +191,17 @@ def copy_from_s3( return extensions.copy_from_s3( graph_id, table_name, s3_path, access_key_id, secret_access_key, **kwargs ) + + +# DataFrame convenience functions (if pandas is available) +if HAS_PANDAS: + + def query_to_dataframe(graph_id: str, query: str, parameters=None, **kwargs): + """Execute query and return results as pandas DataFrame""" + result = execute_query(graph_id, query, parameters) + return query_result_to_dataframe(result, **kwargs) + + def stream_to_dataframe(graph_id: str, query: str, parameters=None, chunk_size=10000): + """Stream query results and return as pandas DataFrame""" + stream = stream_query(graph_id, query, parameters, chunk_size) + return _stream_to_dataframe(stream, chunk_size) diff --git a/robosystems_client/extensions/auth_integration.py b/robosystems_client/extensions/auth_integration.py index 6a7b580..ca82f42 100644 --- a/robosystems_client/extensions/auth_integration.py +++ b/robosystems_client/extensions/auth_integration.py @@ -36,6 +36,9 @@ def __init__( config.headers["X-API-Key"] = api_key config.headers["Authorization"] = f"Bearer {api_key}" + # Store the token for later use by child clients + self._token = api_key + super().__init__(config) # Store authenticated client for SDK operations @@ -57,8 +60,12 @@ def execute_cypher_query( request = CypherQueryRequest(query=query, parameters=parameters or {}) + # Pass the token parameter along with the client response = sync_detailed( - graph_id=graph_id, client=self._authenticated_client, body=request + graph_id=graph_id, + client=self._authenticated_client, + body=request, + token=self._authenticated_client.token, ) if response.parsed: @@ -96,6 +103,9 @@ def __init__( elif not config.base_url: config.base_url = "https://api.robosystems.ai" + # Extract token from cookies if present + self._token = cookies.get("auth-token") + super().__init__(config) # Store cookies for requests @@ -138,6 +148,9 @@ def __init__( config.headers = {} config.headers["Authorization"] = f"Bearer {token}" + # Store the token for later use by child clients + self._token = token + super().__init__(config) # Store authenticated client diff --git a/robosystems_client/extensions/copy_client.py b/robosystems_client/extensions/copy_client.py index 95ece87..19889e3 100644 --- a/robosystems_client/extensions/copy_client.py +++ b/robosystems_client/extensions/copy_client.py @@ -74,12 +74,11 @@ class CopyClient: def __init__(self, config: Dict[str, Any]): self.config = config self.base_url = config["base_url"] + self.headers = config.get("headers", {}) + # Get token from config if passed by parent + self.token = config.get("token") self.sse_client: Optional[SSEClient] = None - # Get client authentication if provided - self.auth_token = config.get("auth_token") - self.api_key = config.get("api_key") - def copy_from_s3( self, graph_id: str, request: S3CopyRequest, options: Optional[CopyOptions] = None ) -> CopyResult: @@ -115,18 +114,18 @@ def _execute_copy( start_time = time.time() # Import client here to avoid circular imports - from ..client import AuthenticatedClient + from ..client import Client - # Create authenticated client - client = AuthenticatedClient( - base_url=self.base_url, - token=self.auth_token, - headers={"X-API-Key": self.api_key} if self.api_key else None, - ) + # Create client with headers + client = Client(base_url=self.base_url, headers=self.headers) try: - # Execute the copy request - response = copy_data_to_graph(graph_id=graph_id, client=client, body=request) + # Execute the copy request with token if available + kwargs = {"graph_id": graph_id, "client": client, "body": request} + # Only add token if it's a valid string + if self.token and isinstance(self.token, str) and self.token.strip(): + kwargs["token"] = self.token + response = copy_data_to_graph(**kwargs) if response.parsed: response_data: CopyResponse = response.parsed @@ -164,11 +163,24 @@ def _execute_copy( ) except Exception as e: - return CopyResult( - status="failed", - error=str(e), - execution_time_ms=(time.time() - start_time) * 1000, - ) + error_msg = str(e) + # Check for authentication errors + if ( + "401" in error_msg or "403" in error_msg or "unauthorized" in error_msg.lower() + ): + logger.error(f"Authentication failed during copy operation: {e}") + return CopyResult( + status="failed", + error=f"Authentication failed: {error_msg}", + execution_time_ms=(time.time() - start_time) * 1000, + ) + else: + logger.error(f"Copy operation failed: {e}") + return CopyResult( + status="failed", + error=error_msg, + execution_time_ms=(time.time() - start_time) * 1000, + ) def _monitor_copy_operation( self, operation_id: str, options: CopyOptions, start_time: float @@ -449,10 +461,8 @@ def __init__(self, config: Dict[str, Any]): self.config = config self.base_url = config["base_url"] self.sse_client: Optional[AsyncSSEClient] = None - - # Get client authentication if provided - self.auth_token = config.get("auth_token") - self.api_key = config.get("api_key") + # Get token from config if passed by parent + self.token = config.get("token") async def copy_from_s3( self, graph_id: str, request: S3CopyRequest, options: Optional[CopyOptions] = None diff --git a/robosystems_client/extensions/dataframe_utils.py b/robosystems_client/extensions/dataframe_utils.py new file mode 100644 index 0000000..8035ea4 --- /dev/null +++ b/robosystems_client/extensions/dataframe_utils.py @@ -0,0 +1,455 @@ +"""Pandas DataFrame integration utilities for RoboSystems SDK + +Provides seamless integration between query results and Pandas DataFrames. +""" + +from typing import Dict, Any, Optional, List, Union, TYPE_CHECKING +import logging + +if TYPE_CHECKING: + from .query_client import QueryResult + +# Make pandas optional to avoid forcing dependency +try: + import pandas as pd + + HAS_PANDAS = True +except ImportError: + HAS_PANDAS = False + pd = None + +logger = logging.getLogger(__name__) + + +def require_pandas(): + """Check if pandas is available, raise helpful error if not""" + if not HAS_PANDAS: + raise ImportError( + "Pandas is required for DataFrame features. Install it with: pip install pandas" + ) + + +def query_result_to_dataframe( + result: Union[Dict[str, Any], "QueryResult"], + normalize_nested: bool = True, + parse_dates: bool = True, +) -> "pd.DataFrame": + """Convert query result to Pandas DataFrame + + Args: + result: Query result dict or QueryResult object + normalize_nested: Flatten nested dictionaries in results + parse_dates: Automatically parse date/datetime strings + + Returns: + Pandas DataFrame with query results + + Example: + >>> result = query_client.query(graph_id, "MATCH (c:Company) RETURN c") + >>> df = query_result_to_dataframe(result) + >>> print(df.head()) + """ + require_pandas() + + # Handle QueryResult object + if hasattr(result, "data") and hasattr(result, "columns"): + data = result.data + columns = result.columns + # Handle dict result + elif isinstance(result, dict): + data = result.get("data", []) + columns = result.get("columns", []) + else: + raise ValueError("Invalid result format") + + # Create DataFrame + if not data: + # Empty DataFrame with columns + df = pd.DataFrame(columns=columns if columns else []) + elif normalize_nested and data and isinstance(data[0], dict): + # Use json_normalize for nested data + df = pd.json_normalize(data) + else: + df = pd.DataFrame(data, columns=columns if columns else None) + + # Parse dates if requested + if parse_dates and not df.empty: + df = parse_datetime_columns(df) + + return df + + +def parse_datetime_columns( + df: "pd.DataFrame", date_columns: Optional[List[str]] = None, infer: bool = True +) -> "pd.DataFrame": + """Parse datetime columns in DataFrame + + Args: + df: Input DataFrame + date_columns: Specific columns to parse as dates + infer: Automatically infer date columns + + Returns: + DataFrame with parsed datetime columns + + Example: + >>> df = parse_datetime_columns(df, date_columns=['created_at', 'updated_at']) + """ + require_pandas() + + if date_columns: + for col in date_columns: + if col in df.columns: + df[col] = pd.to_datetime(df[col], errors="coerce") + + elif infer: + # Infer datetime columns + for col in df.columns: + if df[col].dtype == "object": + # Check if column contains date-like strings + sample = df[col].dropna().head(10) + if len(sample) > 0: + try: + # Try to parse sample + pd.to_datetime(sample, errors="raise") + # If successful, parse entire column + df[col] = pd.to_datetime(df[col], errors="coerce") + except (ValueError, TypeError): + # Not a date column + pass + + return df + + +def stream_to_dataframe( + stream_iterator, + chunk_size: int = 10000, + columns: Optional[List[str]] = None, + on_chunk: Optional[callable] = None, +) -> "pd.DataFrame": + """Convert streaming query results to DataFrame + + Args: + stream_iterator: Iterator from stream_query + chunk_size: Process records in chunks + columns: Column names (will be inferred if not provided) + on_chunk: Callback for each chunk processed + + Returns: + Complete DataFrame from streamed results + + Example: + >>> stream = query_client.stream_query(graph_id, "MATCH (n) RETURN n") + >>> df = stream_to_dataframe(stream, chunk_size=5000) + """ + require_pandas() + + chunks = [] + current_chunk = [] + + for i, record in enumerate(stream_iterator): + current_chunk.append(record) + + if len(current_chunk) >= chunk_size: + # Process chunk + chunk_df = pd.DataFrame(current_chunk, columns=columns) + chunks.append(chunk_df) + + if on_chunk: + on_chunk(chunk_df, i + 1) + + current_chunk = [] + + # Process remaining records + if current_chunk: + chunk_df = pd.DataFrame(current_chunk, columns=columns) + chunks.append(chunk_df) + + if on_chunk: + on_chunk(chunk_df, len(current_chunk)) + + # Combine all chunks + if chunks: + return pd.concat(chunks, ignore_index=True) + else: + return pd.DataFrame(columns=columns if columns else []) + + +def dataframe_to_cypher_params( + df: "pd.DataFrame", param_name: str = "data" +) -> Dict[str, List[Dict[str, Any]]]: + """Convert DataFrame to Cypher query parameters + + Args: + df: DataFrame to convert + param_name: Parameter name for query + + Returns: + Dict with parameter suitable for Cypher queries + + Example: + >>> df = pd.DataFrame({'name': ['Alice', 'Bob'], 'age': [30, 25]}) + >>> params = dataframe_to_cypher_params(df) + >>> query = "UNWIND $data AS row CREATE (p:Person {name: row.name, age: row.age})" + >>> result = query_client.query(graph_id, query, params) + """ + require_pandas() + import numpy as np + + # Convert DataFrame to list of dicts + # First convert to dict format + records = df.to_dict("records") + + # Then clean up NaN/NA values in each record + for record in records: + for key, value in record.items(): + # Check for any form of missing value (NaN, NA, NaT) + if pd.isna(value): + record[key] = None + # Also handle numpy nan explicitly + elif isinstance(value, float) and np.isnan(value): + record[key] = None + + return {param_name: records} + + +def export_query_to_csv( + query_client, + graph_id: str, + query: str, + output_file: str, + parameters: Optional[Dict[str, Any]] = None, + chunk_size: int = 5000, + **csv_kwargs, +) -> int: + """Export query results directly to CSV file + + Args: + query_client: QueryClient instance + graph_id: Graph ID to query + query: Cypher query + output_file: Output CSV file path + parameters: Query parameters + chunk_size: Records per chunk for streaming + **csv_kwargs: Additional arguments for to_csv + + Returns: + Number of records exported + + Example: + >>> count = export_query_to_csv( + ... query_client, 'graph_id', + ... "MATCH (c:Company) RETURN c.name, c.revenue", + ... "companies.csv" + ... ) + >>> print(f"Exported {count} records") + """ + require_pandas() + + # Stream query results + stream = query_client.stream_query(graph_id, query, parameters, chunk_size) + + # Process in chunks for memory efficiency + total_count = 0 + first_chunk = True + + chunks = [] + for record in stream: + chunks.append(record) + + if len(chunks) >= chunk_size: + # Convert chunk to DataFrame + df_chunk = pd.DataFrame(chunks) + + # Write to CSV + if first_chunk: + df_chunk.to_csv(output_file, index=False, **csv_kwargs) + first_chunk = False + else: + df_chunk.to_csv(output_file, mode="a", index=False, header=False, **csv_kwargs) + + total_count += len(chunks) + chunks = [] + + # Write remaining records + if chunks: + df_chunk = pd.DataFrame(chunks) + if first_chunk: + df_chunk.to_csv(output_file, index=False, **csv_kwargs) + else: + df_chunk.to_csv(output_file, mode="a", index=False, header=False, **csv_kwargs) + total_count += len(chunks) + + logger.info(f"Exported {total_count} records to {output_file}") + return total_count + + +def compare_dataframes( + df1: "pd.DataFrame", + df2: "pd.DataFrame", + key_columns: Optional[List[str]] = None, + compare_columns: Optional[List[str]] = None, +) -> "pd.DataFrame": + """Compare two DataFrames and return differences + + Args: + df1: First DataFrame + df2: Second DataFrame + key_columns: Columns to use as keys for comparison + compare_columns: Specific columns to compare + + Returns: + DataFrame with differences + + Example: + >>> old_data = query_to_dataframe(old_result) + >>> new_data = query_to_dataframe(new_result) + >>> diff = compare_dataframes(old_data, new_data, key_columns=['id']) + """ + require_pandas() + + if key_columns: + # Merge on key columns + merged = pd.merge( + df1, df2, on=key_columns, how="outer", suffixes=("_old", "_new"), indicator=True + ) + + # Find differences + if compare_columns: + for col in compare_columns: + col_old = f"{col}_old" + col_new = f"{col}_new" + if col_old in merged.columns and col_new in merged.columns: + merged[f"{col}_changed"] = merged[col_old] != merged[col_new] + + return merged + else: + # Compare entire DataFrames + return pd.concat([df1, df2]).drop_duplicates(keep=False) + + +class DataFrameQueryClient: + """Query client with built-in DataFrame support""" + + def __init__(self, query_client): + """Initialize with a QueryClient instance + + Args: + query_client: Existing QueryClient instance + """ + require_pandas() + self.query_client = query_client + + def query_df( + self, + graph_id: str, + query: str, + parameters: Optional[Dict[str, Any]] = None, + normalize_nested: bool = True, + parse_dates: bool = True, + ) -> "pd.DataFrame": + """Execute query and return results as DataFrame + + Args: + graph_id: Graph ID to query + query: Cypher query + parameters: Query parameters + normalize_nested: Flatten nested dictionaries + parse_dates: Parse datetime columns + + Returns: + Query results as pandas DataFrame + + Example: + >>> df_client = DataFrameQueryClient(query_client) + >>> df = df_client.query_df('graph_id', "MATCH (c:Company) RETURN c") + >>> print(df.describe()) + """ + result = self.query_client.query(graph_id, query, parameters) + return query_result_to_dataframe(result, normalize_nested, parse_dates) + + def stream_df( + self, + graph_id: str, + query: str, + parameters: Optional[Dict[str, Any]] = None, + chunk_size: int = 10000, + ) -> "pd.DataFrame": + """Stream query results and return as DataFrame + + Args: + graph_id: Graph ID to query + query: Cypher query + parameters: Query parameters + chunk_size: Records per chunk + + Returns: + Complete DataFrame from streamed results + + Example: + >>> df = df_client.stream_df( + ... 'graph_id', + ... "MATCH (n) RETURN n", + ... chunk_size=5000 + ... ) + """ + stream = self.query_client.stream_query(graph_id, query, parameters, chunk_size) + return stream_to_dataframe(stream, chunk_size) + + def query_batch_df( + self, + graph_id: str, + queries: List[str], + parameters_list: Optional[List[Dict[str, Any]]] = None, + ) -> List["pd.DataFrame"]: + """Execute multiple queries and return as DataFrames + + Args: + graph_id: Graph ID to query + queries: List of Cypher queries + parameters_list: List of parameter dicts + + Returns: + List of DataFrames, one per query + + Example: + >>> dfs = df_client.query_batch_df('graph_id', [ + ... "MATCH (p:Person) RETURN p", + ... "MATCH (c:Company) RETURN c" + ... ]) + """ + results = self.query_client.query_batch(graph_id, queries, parameters_list) + dfs = [] + + for result in results: + if isinstance(result, dict) and "error" in result: + # Create error DataFrame + dfs.append(pd.DataFrame([result])) + else: + dfs.append(query_result_to_dataframe(result)) + + return dfs + + def export_to_csv( + self, + graph_id: str, + query: str, + output_file: str, + parameters: Optional[Dict[str, Any]] = None, + **csv_kwargs, + ) -> int: + """Export query results to CSV + + Args: + graph_id: Graph ID to query + query: Cypher query + output_file: Output CSV file path + parameters: Query parameters + **csv_kwargs: Additional arguments for to_csv + + Returns: + Number of records exported + """ + return export_query_to_csv( + self.query_client, graph_id, query, output_file, parameters, **csv_kwargs + ) diff --git a/robosystems_client/extensions/extensions.py b/robosystems_client/extensions/extensions.py index bc85250..6a53ead 100644 --- a/robosystems_client/extensions/extensions.py +++ b/robosystems_client/extensions/extensions.py @@ -39,6 +39,22 @@ def __init__(self, config: RoboSystemsExtensionConfig = None): "timeout": config.timeout, } + # Extract token from headers if it was set by auth classes + # The auth classes should set the token in a standard way + token = None + if config.headers: + # Check for Authorization Bearer token + auth_header = config.headers.get("Authorization", "") + if auth_header.startswith("Bearer "): + token = auth_header[7:] + # Check for X-API-Key + elif config.headers.get("X-API-Key"): + token = config.headers.get("X-API-Key") + + # Pass token to child clients if available + if token: + self.config["token"] = token + # Initialize clients self.copy = CopyClient(self.config) self.query = QueryClient(self.config) diff --git a/robosystems_client/extensions/operation_client.py b/robosystems_client/extensions/operation_client.py index 7d01fda..d4c860d 100644 --- a/robosystems_client/extensions/operation_client.py +++ b/robosystems_client/extensions/operation_client.py @@ -71,7 +71,14 @@ class OperationClient: def __init__(self, config: Dict[str, Any]): self.config = config self.base_url = config["base_url"] + self.headers = config.get("headers", {}) + # Get token from config if passed by parent + self.token = config.get("token") self.active_operations: Dict[str, SSEClient] = {} + # Thread safety for operations tracking + import threading + + self._lock = threading.Lock() def monitor_operation( self, operation_id: str, options: MonitorOptions = None @@ -144,7 +151,8 @@ def on_operation_cancelled(): # Connect and monitor try: sse_client.connect(operation_id) - self.active_operations[operation_id] = sse_client + with self._lock: + self.active_operations[operation_id] = sse_client # Wait for completion import time @@ -166,10 +174,11 @@ def on_operation_cancelled(): time.sleep(options.poll_interval or 0.1) finally: - # Clean up - if operation_id in self.active_operations: - self.active_operations[operation_id].close() - del self.active_operations[operation_id] + # Clean up with thread safety + with self._lock: + if operation_id in self.active_operations: + self.active_operations[operation_id].close() + del self.active_operations[operation_id] return result @@ -179,11 +188,16 @@ def get_operation_status(self, operation_id: str) -> Dict[str, Any]: from ..api.operations.get_operation_status import ( sync_detailed as get_operation_status, ) - from ..client import AuthenticatedClient + from ..client import Client - client = AuthenticatedClient(base_url=self.base_url) + # Use regular Client with headers instead of AuthenticatedClient + client = Client(base_url=self.base_url, headers=self.headers) try: - response = get_operation_status(operation_id=operation_id, client=client) + kwargs = {"operation_id": operation_id, "client": client} + # Only add token if it's a valid string + if self.token and isinstance(self.token, str) and self.token.strip(): + kwargs["token"] = self.token + response = get_operation_status(**kwargs) if response.parsed: return { "operation_id": operation_id, @@ -201,21 +215,27 @@ def cancel_operation(self, operation_id: str) -> bool: """Cancel an operation""" # This would use the generated SDK to call /v1/operations/{operation_id}/cancel from ..api.operations.cancel_operation import sync_detailed as cancel_operation - from ..client import AuthenticatedClient + from ..client import Client - client = AuthenticatedClient(base_url=self.base_url) + # Use regular Client with headers instead of AuthenticatedClient + client = Client(base_url=self.base_url, headers=self.headers) try: - response = cancel_operation(operation_id=operation_id, client=client) + kwargs = {"operation_id": operation_id, "client": client} + # Only add token if it's a valid string + if self.token and isinstance(self.token, str) and self.token.strip(): + kwargs["token"] = self.token + response = cancel_operation(**kwargs) if response.parsed: return response.parsed.cancelled or False except Exception as e: print(f"Failed to cancel operation {operation_id}: {e}") return False - # Also close any active SSE connection - if operation_id in self.active_operations: - self.active_operations[operation_id].close() - del self.active_operations[operation_id] + # Also close any active SSE connection with thread safety + with self._lock: + if operation_id in self.active_operations: + self.active_operations[operation_id].close() + del self.active_operations[operation_id] return False @@ -226,15 +246,17 @@ def list_operations(self) -> List[Dict[str, Any]]: def close_all(self): """Close all active operation monitors""" - for sse_client in self.active_operations.values(): - sse_client.close() - self.active_operations.clear() + with self._lock: + for sse_client in self.active_operations.values(): + sse_client.close() + self.active_operations.clear() def close_operation(self, operation_id: str): """Close monitoring for a specific operation""" - if operation_id in self.active_operations: - self.active_operations[operation_id].close() - del self.active_operations[operation_id] + with self._lock: + if operation_id in self.active_operations: + self.active_operations[operation_id].close() + del self.active_operations[operation_id] class AsyncOperationClient: diff --git a/robosystems_client/extensions/query_client.py b/robosystems_client/extensions/query_client.py index e1087fb..b6d0999 100644 --- a/robosystems_client/extensions/query_client.py +++ b/robosystems_client/extensions/query_client.py @@ -4,7 +4,17 @@ """ from dataclasses import dataclass -from typing import Dict, Any, Optional, Callable, AsyncIterator, Iterator, Union +from typing import ( + Dict, + Any, + Optional, + Callable, + AsyncIterator, + Iterator, + Union, + Generator, + List, +) from datetime import datetime from ..api.query.execute_cypher_query import sync_detailed as execute_cypher_query @@ -70,6 +80,9 @@ class QueryClient: def __init__(self, config: Dict[str, Any]): self.config = config self.base_url = config["base_url"] + self.headers = config.get("headers", {}) + # Get token from config if passed by parent + self.token = config.get("token") self.sse_client: Optional[SSEClient] = None def execute_query( @@ -85,15 +98,17 @@ def execute_query( ) # Execute the query through the generated client - from ..client import AuthenticatedClient + from ..client import Client - # Get client instance (you'd configure this based on your setup) - client = AuthenticatedClient(base_url=self.base_url) + # Create client with headers + client = Client(base_url=self.base_url, headers=self.headers) try: - response = execute_cypher_query( - graph_id=graph_id, client=client, body=query_request - ) + kwargs = {"graph_id": graph_id, "client": client, "body": query_request} + # Only add token if it's a valid string + if self.token and isinstance(self.token, str) and self.token.strip(): + kwargs["token"] = self.token + response = execute_cypher_query(**kwargs) # Check response type and handle accordingly if hasattr(response, "parsed") and response.parsed: @@ -145,7 +160,15 @@ def execute_query( except Exception as e: if isinstance(e, QueuedQueryError): raise - raise Exception(f"Query execution failed: {str(e)}") + + error_msg = str(e) + # Check for authentication errors + if ( + "401" in error_msg or "403" in error_msg or "unauthorized" in error_msg.lower() + ): + raise Exception(f"Authentication failed during query execution: {error_msg}") + else: + raise Exception(f"Query execution failed: {error_msg}") # Unexpected response format raise Exception("Unexpected response format from query endpoint") @@ -316,18 +339,92 @@ def stream_query( cypher: str, parameters: Dict[str, Any] = None, chunk_size: int = 1000, - ) -> Iterator[Any]: - """Streaming query for large results""" + on_progress: Optional[Callable[[int, int], None]] = None, + ) -> Generator[Any, None, None]: + """Stream query results for large datasets with progress tracking + + Args: + graph_id: Graph ID to query + cypher: Cypher query string + parameters: Query parameters + chunk_size: Number of records per chunk + on_progress: Callback for progress updates (current, total) + + Yields: + Individual records from query results + + Example: + >>> def progress(current, total): + ... print(f"Processed {current}/{total} records") + >>> for record in query_client.stream_query( + ... 'graph_id', + ... 'MATCH (n) RETURN n', + ... chunk_size=100, + ... on_progress=progress + ... ): + ... process_record(record) + """ request = QueryRequest(query=cypher, parameters=parameters) result = self.execute_query( graph_id, request, QueryOptions(mode="stream", chunk_size=chunk_size) ) + count = 0 if isinstance(result, Iterator): - yield from result + for item in result: + count += 1 + if on_progress and count % chunk_size == 0: + on_progress(count, None) # Total unknown in streaming + yield item else: # If not streaming, yield all results at once - yield from result.data + total = len(result.data) + for item in result.data: + count += 1 + if on_progress: + on_progress(count, total) + yield item + + def query_batch( + self, + graph_id: str, + queries: List[str], + parameters_list: Optional[List[Dict[str, Any]]] = None, + parallel: bool = False, + ) -> List[Union[QueryResult, Dict[str, Any]]]: + """Execute multiple queries in batch + + Args: + graph_id: Graph ID to query + queries: List of Cypher query strings + parameters_list: List of parameter dicts (one per query) + parallel: Execute queries in parallel (experimental) + + Returns: + List of QueryResult objects or error dicts + + Example: + >>> results = query_client.query_batch('graph_id', [ + ... 'MATCH (n:Person) RETURN count(n)', + ... 'MATCH (c:Company) RETURN count(c)' + ... ]) + """ + if parameters_list is None: + parameters_list = [None] * len(queries) + + if len(queries) != len(parameters_list): + raise ValueError("queries and parameters_list must have same length") + + results = [] + for query, params in zip(queries, parameters_list): + try: + result = self.query(graph_id, query, params) + results.append(result) + except Exception as e: + # Store error as result + results.append({"error": str(e), "query": query}) + + return results def close(self): """Cancel any active SSE connections""" diff --git a/robosystems_client/extensions/tests/test_dataframe_utils.py b/robosystems_client/extensions/tests/test_dataframe_utils.py new file mode 100644 index 0000000..4aad57e --- /dev/null +++ b/robosystems_client/extensions/tests/test_dataframe_utils.py @@ -0,0 +1,334 @@ +"""Tests for DataFrame utilities""" + +import pytest +from unittest.mock import Mock, patch +import tempfile +import os + +# Make pandas optional for tests +try: + import pandas as pd + + HAS_PANDAS = True +except ImportError: + HAS_PANDAS = False + pd = None + +# Only run tests if pandas is available +pytestmark = pytest.mark.skipif(not HAS_PANDAS, reason="pandas not installed") + +if HAS_PANDAS: + from robosystems_client.extensions.dataframe_utils import ( + query_result_to_dataframe, + parse_datetime_columns, + stream_to_dataframe, + dataframe_to_cypher_params, + export_query_to_csv, + compare_dataframes, + DataFrameQueryClient, + ) + + +class TestQueryResultToDataFrame: + """Test converting query results to DataFrames""" + + def test_query_result_to_dataframe_basic(self): + """Test basic conversion from query result to DataFrame""" + result = { + "data": [ + {"name": "Alice", "age": 30}, + {"name": "Bob", "age": 25}, + {"name": "Charlie", "age": 35}, + ], + "columns": ["name", "age"], + "row_count": 3, + } + + df = query_result_to_dataframe(result) + + assert len(df) == 3 + assert list(df.columns) == ["name", "age"] + assert df.iloc[0]["name"] == "Alice" + assert df.iloc[1]["age"] == 25 + + def test_query_result_to_dataframe_nested(self): + """Test conversion with nested data""" + result = { + "data": [ + {"name": "Alice", "company": {"name": "TechCorp", "revenue": 1000000}}, + {"name": "Bob", "company": {"name": "StartupInc", "revenue": 500000}}, + ], + "columns": ["name", "company"], + } + + df = query_result_to_dataframe(result, normalize_nested=True) + + assert "name" in df.columns + assert "company.name" in df.columns + assert "company.revenue" in df.columns + assert df.iloc[0]["company.name"] == "TechCorp" + + def test_query_result_to_dataframe_empty(self): + """Test conversion of empty result""" + result = {"data": [], "columns": ["name", "age"], "row_count": 0} + + df = query_result_to_dataframe(result) + + assert len(df) == 0 + assert list(df.columns) == ["name", "age"] + + def test_query_result_to_dataframe_with_dates(self): + """Test conversion with date parsing""" + result = { + "data": [ + {"name": "Alice", "created_at": "2023-01-15T10:30:00"}, + {"name": "Bob", "created_at": "2023-02-20T14:45:00"}, + ], + "columns": ["name", "created_at"], + } + + df = query_result_to_dataframe(result, parse_dates=True) + + assert pd.api.types.is_datetime64_any_dtype(df["created_at"]) + assert df.iloc[0]["created_at"].year == 2023 + + +class TestParseDateTimeColumns: + """Test datetime parsing functionality""" + + def test_parse_datetime_columns_specific(self): + """Test parsing specific datetime columns""" + df = pd.DataFrame( + { + "name": ["Alice", "Bob"], + "created_at": ["2023-01-15", "2023-02-20"], + "updated_at": ["2023-01-16T10:30:00", "2023-02-21T14:45:00"], + "count": [1, 2], + } + ) + + df = parse_datetime_columns(df, date_columns=["created_at", "updated_at"]) + + assert pd.api.types.is_datetime64_any_dtype(df["created_at"]) + assert pd.api.types.is_datetime64_any_dtype(df["updated_at"]) + assert not pd.api.types.is_datetime64_any_dtype(df["count"]) + + def test_parse_datetime_columns_infer(self): + """Test automatic datetime column inference""" + df = pd.DataFrame( + { + "name": ["Alice", "Bob"], + "timestamp": ["2023-01-15T10:30:00", "2023-02-20T14:45:00"], + "not_a_date": ["abc", "def"], + } + ) + + df = parse_datetime_columns(df, infer=True) + + assert pd.api.types.is_datetime64_any_dtype(df["timestamp"]) + assert df["not_a_date"].dtype == "object" + + +class TestStreamToDataFrame: + """Test streaming results to DataFrame""" + + def test_stream_to_dataframe_basic(self): + """Test converting stream to DataFrame""" + + def mock_stream(): + for i in range(10): + yield {"id": i, "value": i * 2} + + df = stream_to_dataframe(mock_stream(), chunk_size=3) + + assert len(df) == 10 + assert df.iloc[5]["value"] == 10 + + def test_stream_to_dataframe_with_callback(self): + """Test stream with chunk callback""" + chunk_counts = [] + + def on_chunk(chunk_df, total): + chunk_counts.append(len(chunk_df)) + + def mock_stream(): + for i in range(10): + yield {"id": i, "value": i * 2} + + df = stream_to_dataframe(mock_stream(), chunk_size=3, on_chunk=on_chunk) + + assert len(df) == 10 + assert chunk_counts == [3, 3, 3, 1] # 3 chunks of 3, 1 chunk of 1 + + +class TestDataFrameToCypherParams: + """Test DataFrame to Cypher parameter conversion""" + + def test_dataframe_to_cypher_params(self): + """Test converting DataFrame to Cypher parameters""" + df = pd.DataFrame( + { + "name": ["Alice", "Bob", "Charlie"], + "age": [30, 25, 35], + "active": [True, False, True], + } + ) + + params = dataframe_to_cypher_params(df) + + assert "data" in params + assert len(params["data"]) == 3 + assert params["data"][0]["name"] == "Alice" + assert params["data"][1]["age"] == 25 + + def test_dataframe_to_cypher_params_with_nan(self): + """Test handling NaN values""" + df = pd.DataFrame( + {"name": ["Alice", "Bob"], "age": [30, pd.NA], "score": [95.5, None]} + ) + + params = dataframe_to_cypher_params(df, param_name="records") + + assert "records" in params + assert params["records"][1]["age"] is None + assert params["records"][1]["score"] is None + + +class TestExportQueryToCSV: + """Test CSV export functionality""" + + @patch("robosystems_client.extensions.dataframe_utils.logger") + def test_export_query_to_csv(self, mock_logger): + """Test exporting query results to CSV""" + mock_client = Mock() + + def mock_stream(*args, **kwargs): + for i in range(5): + yield {"id": i, "name": f"Item {i}"} + + mock_client.stream_query = Mock(side_effect=mock_stream) + + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".csv") as f: + temp_file = f.name + + try: + count = export_query_to_csv( + mock_client, "graph_id", "MATCH (n) RETURN n", temp_file, chunk_size=2 + ) + + assert count == 5 + mock_logger.info.assert_called() + + # Verify CSV content + df = pd.read_csv(temp_file) + assert len(df) == 5 + assert df.iloc[0]["name"] == "Item 0" + + finally: + if os.path.exists(temp_file): + os.unlink(temp_file) + + +class TestCompareDataFrames: + """Test DataFrame comparison""" + + def test_compare_dataframes_with_keys(self): + """Test comparing DataFrames with key columns""" + df1 = pd.DataFrame( + {"id": [1, 2, 3], "name": ["Alice", "Bob", "Charlie"], "age": [30, 25, 35]} + ) + + df2 = pd.DataFrame( + {"id": [1, 2, 4], "name": ["Alice", "Robert", "David"], "age": [31, 25, 40]} + ) + + diff = compare_dataframes(df1, df2, key_columns=["id"]) + + assert "_merge" in diff.columns + assert "name_old" in diff.columns + assert "name_new" in diff.columns + + def test_compare_dataframes_without_keys(self): + """Test comparing DataFrames without keys""" + df1 = pd.DataFrame({"name": ["Alice", "Bob"], "age": [30, 25]}) + + df2 = pd.DataFrame({"name": ["Alice", "Charlie"], "age": [30, 35]}) + + diff = compare_dataframes(df1, df2) + + assert len(diff) == 2 # Bob and Charlie rows + + +class TestDataFrameQueryClient: + """Test DataFrameQueryClient class""" + + def test_query_df(self): + """Test query_df method""" + mock_client = Mock() + mock_client.query.return_value = { + "data": [{"name": "Alice"}, {"name": "Bob"}], + "columns": ["name"], + "row_count": 2, + } + + df_client = DataFrameQueryClient(mock_client) + df = df_client.query_df("graph_id", "MATCH (n) RETURN n") + + assert len(df) == 2 + assert df.iloc[0]["name"] == "Alice" + mock_client.query.assert_called_once() + + def test_stream_df(self): + """Test stream_df method""" + mock_client = Mock() + + def mock_stream(*args, **kwargs): + for i in range(3): + yield {"id": i, "value": i * 10} + + mock_client.stream_query.return_value = mock_stream() + + df_client = DataFrameQueryClient(mock_client) + df = df_client.stream_df("graph_id", "MATCH (n) RETURN n") + + assert len(df) == 3 + assert df.iloc[1]["value"] == 10 + + def test_query_batch_df(self): + """Test query_batch_df method""" + mock_client = Mock() + mock_client.query_batch.return_value = [ + {"data": [{"count": 10}], "columns": ["count"]}, + {"data": [{"count": 20}], "columns": ["count"]}, + {"error": "Query failed", "query": "INVALID"}, + ] + + df_client = DataFrameQueryClient(mock_client) + dfs = df_client.query_batch_df( + "graph_id", + [ + "MATCH (p:Person) RETURN count(p)", + "MATCH (c:Company) RETURN count(c)", + "INVALID", + ], + ) + + assert len(dfs) == 3 + assert dfs[0].iloc[0]["count"] == 10 + assert dfs[1].iloc[0]["count"] == 20 + assert "error" in dfs[2].columns + + def test_export_to_csv(self): + """Test export_to_csv method""" + mock_client = Mock() + + with patch( + "robosystems_client.extensions.dataframe_utils.export_query_to_csv" + ) as mock_export: + mock_export.return_value = 100 + + df_client = DataFrameQueryClient(mock_client) + count = df_client.export_to_csv("graph_id", "MATCH (n) RETURN n", "output.csv") + + assert count == 100 + mock_export.assert_called_once() diff --git a/robosystems_client/extensions/tests/test_integration.py b/robosystems_client/extensions/tests/test_integration.py index de5283c..0509e04 100644 --- a/robosystems_client/extensions/tests/test_integration.py +++ b/robosystems_client/extensions/tests/test_integration.py @@ -71,7 +71,7 @@ def test_create_extensions_factory(self, mock_api_key): ) assert ext.config["headers"]["Authorization"] == "Bearer jwt_token_here" - @patch("robosystems_client.extensions.auth_integration.sync_detailed") + @patch("robosystems_client.api.query.execute_cypher_query.sync_detailed") def test_cypher_query_execution(self, mock_sync_detailed, extensions): """Test executing Cypher queries through authenticated client""" # Mock the response diff --git a/robosystems_client/extensions/tests/test_token_utils.py b/robosystems_client/extensions/tests/test_token_utils.py new file mode 100644 index 0000000..a50a865 --- /dev/null +++ b/robosystems_client/extensions/tests/test_token_utils.py @@ -0,0 +1,274 @@ +"""Tests for JWT token utilities""" + +import pytest +from datetime import datetime, timedelta +import json +import base64 +import os + +from robosystems_client.extensions.token_utils import ( + validate_jwt_format, + extract_jwt_from_header, + decode_jwt_payload, + is_jwt_expired, + get_jwt_claims, + get_jwt_expiration, + extract_token_from_environment, + extract_token_from_cookie, + find_valid_token, + TokenManager, +) + + +def create_test_jwt(payload: dict = None, exp_delta_seconds: int = 3600) -> str: + """Create a test JWT token""" + header = {"alg": "HS256", "typ": "JWT"} + + if payload is None: + payload = { + "sub": "test_user", + "user_id": "123", + "exp": int((datetime.now() + timedelta(seconds=exp_delta_seconds)).timestamp()), + } + + # Encode header and payload + header_b64 = ( + base64.urlsafe_b64encode(json.dumps(header).encode()).decode().rstrip("=") + ) + + payload_b64 = ( + base64.urlsafe_b64encode(json.dumps(payload).encode()).decode().rstrip("=") + ) + + # Create fake signature + signature = "test_signature_123" + + return f"{header_b64}.{payload_b64}.{signature}" + + +class TestJWTValidation: + """Test JWT format validation""" + + def test_validate_jwt_format_valid(self): + """Test validation of valid JWT format""" + token = create_test_jwt() + assert validate_jwt_format(token) is True + + def test_validate_jwt_format_invalid(self): + """Test validation of invalid JWT formats""" + # Missing parts + assert validate_jwt_format("header.payload") is False + # Wrong format + assert validate_jwt_format("not-a-jwt") is False + # Empty + assert validate_jwt_format("") is False + # None + assert validate_jwt_format(None) is False + # Not a string + assert validate_jwt_format(123) is False + + def test_validate_jwt_with_padding(self): + """Test JWT validation handles padding correctly""" + # JWT with different padding requirements + token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.signature" + assert validate_jwt_format(token) is True + + +class TestJWTExtraction: + """Test JWT extraction from various sources""" + + def test_extract_jwt_from_header_bearer(self): + """Test extraction from Bearer authorization header""" + token = create_test_jwt() + + # Standard Bearer format + assert extract_jwt_from_header(f"Bearer {token}") == token + # Case insensitive + assert extract_jwt_from_header(f"bearer {token}") == token + # Extra spaces + assert extract_jwt_from_header(f"Bearer {token} ") == token + + def test_extract_jwt_from_header_dict(self): + """Test extraction from headers dictionary""" + token = create_test_jwt() + + headers = {"Authorization": f"Bearer {token}"} + assert extract_jwt_from_header(headers) == token + + # Case variation + headers = {"authorization": f"Bearer {token}"} + assert extract_jwt_from_header(headers) == token + + def test_extract_jwt_from_header_invalid(self): + """Test extraction returns None for invalid inputs""" + assert extract_jwt_from_header(None) is None + assert extract_jwt_from_header("") is None + assert extract_jwt_from_header("NotBearer token") is None + assert extract_jwt_from_header({"Other": "header"}) is None + + +class TestJWTDecoding: + """Test JWT payload decoding""" + + def test_decode_jwt_payload(self): + """Test decoding JWT payload""" + payload = {"sub": "test_user", "user_id": "123", "roles": ["admin", "user"]} + token = create_test_jwt(payload) + + decoded = decode_jwt_payload(token) + assert decoded["sub"] == "test_user" + assert decoded["user_id"] == "123" + assert decoded["roles"] == ["admin", "user"] + + def test_decode_jwt_payload_invalid(self): + """Test decoding invalid JWT returns None""" + assert decode_jwt_payload("invalid.token") is None + assert decode_jwt_payload("") is None + + def test_get_jwt_claims(self): + """Test getting all claims from JWT""" + payload = {"claim1": "value1", "claim2": "value2"} + token = create_test_jwt(payload) + + claims = get_jwt_claims(token) + assert claims["claim1"] == "value1" + assert claims["claim2"] == "value2" + + +class TestJWTExpiration: + """Test JWT expiration checking""" + + def test_is_jwt_expired_not_expired(self): + """Test checking non-expired token""" + # Token expires in 1 hour + token = create_test_jwt(exp_delta_seconds=3600) + assert is_jwt_expired(token) is False + + def test_is_jwt_expired_expired(self): + """Test checking expired token""" + # Token expired 1 hour ago + token = create_test_jwt(exp_delta_seconds=-3600) + assert is_jwt_expired(token) is True + + def test_is_jwt_expired_with_buffer(self): + """Test expiration with buffer time""" + # Token expires in 30 seconds + token = create_test_jwt(exp_delta_seconds=30) + # With 60 second buffer, should be considered expired + assert is_jwt_expired(token, buffer_seconds=60) is True + # With no buffer, should not be expired + assert is_jwt_expired(token, buffer_seconds=0) is False + + def test_get_jwt_expiration(self): + """Test getting expiration datetime""" + exp_time = datetime.now() + timedelta(hours=1) + payload = {"exp": int(exp_time.timestamp())} + token = create_test_jwt(payload) + + exp = get_jwt_expiration(token) + assert exp is not None + # Allow 1 second difference for test execution + assert abs((exp - exp_time).total_seconds()) < 1 + + +class TestTokenExtraction: + """Test token extraction from various sources""" + + def test_extract_token_from_environment(self): + """Test extracting token from environment variable""" + token = create_test_jwt() + os.environ["ROBOSYSTEMS_TOKEN"] = token + + try: + assert extract_token_from_environment() == token + # Custom env var + os.environ["CUSTOM_TOKEN"] = token + assert extract_token_from_environment("CUSTOM_TOKEN") == token + finally: + # Clean up + os.environ.pop("ROBOSYSTEMS_TOKEN", None) + os.environ.pop("CUSTOM_TOKEN", None) + + def test_extract_token_from_cookie(self): + """Test extracting token from cookies""" + token = create_test_jwt() + cookies = {"auth-token": token} + + assert extract_token_from_cookie(cookies) == token + # Custom cookie name + cookies = {"session_token": token} + assert extract_token_from_cookie(cookies, "session_token") == token + # Missing cookie + assert extract_token_from_cookie({}) is None + + def test_find_valid_token(self): + """Test finding first valid token from multiple sources""" + token = create_test_jwt() + + # Found in second source + result = find_valid_token(None, "invalid-token", token, "another-invalid") + assert result == token + + # Found in headers dict + headers = {"Authorization": f"Bearer {token}"} + result = find_valid_token(None, headers) + assert result == token + + # Not found + result = find_valid_token(None, "", "invalid") + assert result is None + + +class TestTokenManager: + """Test TokenManager class""" + + def test_token_manager_basic(self): + """Test basic TokenManager functionality""" + token = create_test_jwt() + manager = TokenManager(token) + + assert manager.token == token + assert manager.is_valid() is True + + claims = manager.get_claims() + assert claims["sub"] == "test_user" + + def test_token_manager_refresh(self): + """Test token refresh functionality""" + old_token = create_test_jwt(exp_delta_seconds=30) + new_token = create_test_jwt(exp_delta_seconds=3600) + + def refresh_callback(): + return new_token + + manager = TokenManager( + old_token, refresh_callback=refresh_callback, auto_refresh=True, refresh_buffer=60 + ) + + # Token should be refreshed automatically + assert manager.token == new_token + + def test_token_manager_invalid_token(self): + """Test TokenManager with invalid token""" + manager = TokenManager() + + with pytest.raises(ValueError): + manager.token = "invalid-token" + + assert manager.is_valid() is False + assert manager.get_claims() is None + assert manager.get_expiration() is None + + def test_token_manager_manual_refresh(self): + """Test manual token refresh""" + token = create_test_jwt() + new_token = create_test_jwt(exp_delta_seconds=7200) + + manager = TokenManager( + token, refresh_callback=lambda: new_token, auto_refresh=False + ) + + assert manager.token == token + refreshed = manager.refresh() + assert refreshed == new_token + assert manager.token == new_token diff --git a/robosystems_client/extensions/token_utils.py b/robosystems_client/extensions/token_utils.py new file mode 100644 index 0000000..71a2ff3 --- /dev/null +++ b/robosystems_client/extensions/token_utils.py @@ -0,0 +1,417 @@ +"""JWT Token validation and management utilities for RoboSystems SDK + +Provides comprehensive JWT handling, validation, and extraction utilities. +""" + +import base64 +import json +import os +from datetime import datetime, timedelta +from typing import Dict, Any, Optional, Union +from enum import Enum +import logging + +logger = logging.getLogger(__name__) + + +class TokenSource(Enum): + """Sources where tokens can be extracted from""" + + HEADER = "header" + COOKIE = "cookie" + ENVIRONMENT = "environment" + CONFIG = "config" + + +def validate_jwt_format(token: Optional[str]) -> bool: + """Validate JWT token format (basic validation without cryptographic verification) + + Args: + token: JWT token string to validate + + Returns: + True if token appears to be valid JWT format + + Example: + >>> validate_jwt_format("eyJhbGc.eyJzdWI.SflKxwRJSM") + True + >>> validate_jwt_format("invalid-token") + False + """ + if not token or not isinstance(token, str): + return False + + try: + # JWT should have exactly 3 parts: header.payload.signature + parts = token.split(".") + if len(parts) != 3: + return False + + # Each part should be base64url encoded + for part in parts[:2]: # Check header and payload only + # Add padding if needed + padding = 4 - (len(part) % 4) + if padding != 4: + part += "=" * padding + + try: + # Try to decode base64 + base64.urlsafe_b64decode(part) + except Exception: + return False + + return True + except Exception: + return False + + +def extract_jwt_from_header( + auth_header: Optional[Union[str, Dict[str, str]]], +) -> Optional[str]: + """Extract JWT token from Authorization header + + Args: + auth_header: Authorization header value (e.g., "Bearer token123") or headers dict + + Returns: + JWT token if found, None otherwise + + Example: + >>> extract_jwt_from_header("Bearer eyJhbGc.eyJzdWI.SflKxwRJSM") + "eyJhbGc.eyJzdWI.SflKxwRJSM" + >>> extract_jwt_from_header({"Authorization": "Bearer token123"}) + "token123" + """ + if not auth_header: + return None + + # Handle dict of headers + if isinstance(auth_header, dict): + auth_value = auth_header.get("Authorization") or auth_header.get("authorization") + if not auth_value: + return None + auth_header = auth_value + + # Extract token from Bearer scheme + if isinstance(auth_header, str): + auth_header = auth_header.strip() + if auth_header.startswith("Bearer "): + token = auth_header[7:].strip() + return token if token else None + elif auth_header.startswith("bearer "): # Case insensitive + token = auth_header[7:].strip() + return token if token else None + + return None + + +def decode_jwt_payload(token: str, verify: bool = False) -> Optional[Dict[str, Any]]: + """Decode JWT payload without verification (for reading claims only) + + Args: + token: JWT token to decode + verify: If True, will validate format first (default: False) + + Returns: + Decoded payload as dictionary, None if invalid + + Note: + This does NOT verify the signature. Use only for reading non-sensitive claims. + + Example: + >>> payload = decode_jwt_payload("eyJhbGc.eyJzdWI.SflKxwRJSM") + >>> payload.get("sub") # Get subject claim + """ + if verify and not validate_jwt_format(token): + return None + + try: + # Split token and get payload (second part) + parts = token.split(".") + if len(parts) != 3: + return None + + payload_part = parts[1] + + # Add padding if needed + padding = 4 - (len(payload_part) % 4) + if padding != 4: + payload_part += "=" * padding + + # Decode base64url + payload_bytes = base64.urlsafe_b64decode(payload_part) + payload = json.loads(payload_bytes.decode("utf-8")) + + return payload + except Exception as e: + logger.debug(f"Failed to decode JWT payload: {e}") + return None + + +def is_jwt_expired(token: str, buffer_seconds: int = 60) -> bool: + """Check if JWT token is expired based on exp claim + + Args: + token: JWT token to check + buffer_seconds: Consider expired if expiring within this many seconds (default: 60) + + Returns: + True if token is expired or expiring soon + + Example: + >>> is_jwt_expired("eyJhbGc.eyJleHAiOjE2MzA0MjU2MDB9.SflKxwRJSM") + True # If current time is past exp claim + """ + payload = decode_jwt_payload(token) + if not payload: + return True + + exp = payload.get("exp") + if not exp: + # No expiration claim, consider as non-expiring + return False + + try: + exp_datetime = datetime.fromtimestamp(exp) + buffer = timedelta(seconds=buffer_seconds) + return datetime.now() >= (exp_datetime - buffer) + except Exception: + return True + + +def get_jwt_claims(token: str) -> Optional[Dict[str, Any]]: + """Get all claims from JWT token + + Args: + token: JWT token + + Returns: + Dictionary of all claims, None if invalid + + Example: + >>> claims = get_jwt_claims(token) + >>> user_id = claims.get("user_id") + >>> roles = claims.get("roles", []) + """ + return decode_jwt_payload(token) + + +def get_jwt_expiration(token: str) -> Optional[datetime]: + """Get expiration datetime from JWT token + + Args: + token: JWT token + + Returns: + Expiration datetime, None if no exp claim or invalid + + Example: + >>> exp = get_jwt_expiration(token) + >>> if exp and exp > datetime.now(): + ... print(f"Token valid until {exp}") + """ + payload = decode_jwt_payload(token) + if not payload: + return None + + exp = payload.get("exp") + if not exp: + return None + + try: + return datetime.fromtimestamp(exp) + except Exception: + return None + + +def extract_token_from_environment(env_var: str = "ROBOSYSTEMS_TOKEN") -> Optional[str]: + """Extract JWT token from environment variable + + Args: + env_var: Environment variable name (default: ROBOSYSTEMS_TOKEN) + + Returns: + JWT token if found and valid format, None otherwise + + Example: + >>> os.environ["ROBOSYSTEMS_TOKEN"] = "eyJhbGc..." + >>> token = extract_token_from_environment() + """ + token = os.environ.get(env_var) + if token and validate_jwt_format(token): + return token + return None + + +def extract_token_from_cookie( + cookies: Dict[str, str], cookie_name: str = "auth-token" +) -> Optional[str]: + """Extract JWT token from cookies + + Args: + cookies: Dictionary of cookies + cookie_name: Name of cookie containing token (default: auth-token) + + Returns: + JWT token if found, None otherwise + + Example: + >>> cookies = {"auth-token": "eyJhbGc..."} + >>> token = extract_token_from_cookie(cookies) + """ + token = cookies.get(cookie_name) + if token and validate_jwt_format(token): + return token + return None + + +def find_valid_token(*sources: Union[str, Dict[str, str], None]) -> Optional[str]: + """Find first valid JWT token from multiple sources + + Args: + *sources: Variable number of potential token sources + (strings, dicts with Authorization header, etc.) + + Returns: + First valid JWT token found, None if none found + + Example: + >>> token = find_valid_token( + ... os.environ.get("TOKEN"), + ... headers, + ... cookies.get("auth-token"), + ... config.get("token") + ... ) + """ + for source in sources: + if not source: + continue + + # Direct token string + if isinstance(source, str): + if validate_jwt_format(source): + return source + + # Headers dict + elif isinstance(source, dict): + # Try as headers + token = extract_jwt_from_header(source) + if token and validate_jwt_format(token): + return token + + # Try as cookies + for key in ["auth-token", "auth_token", "token", "jwt"]: + token = source.get(key) + if token and validate_jwt_format(token): + return token + + return None + + +class TokenManager: + """Manages JWT tokens with automatic refresh and validation""" + + def __init__( + self, + token: Optional[str] = None, + refresh_callback: Optional[callable] = None, + auto_refresh: bool = True, + refresh_buffer: int = 300, + ): + """Initialize token manager + + Args: + token: Initial JWT token + refresh_callback: Callback to refresh token when expired + auto_refresh: Automatically refresh before expiration + refresh_buffer: Seconds before expiration to trigger refresh (default: 300) + """ + self._token = token + self._refresh_callback = refresh_callback + self._auto_refresh = auto_refresh + self._refresh_buffer = refresh_buffer + + @property + def token(self) -> Optional[str]: + """Get current token, refreshing if needed""" + if self._auto_refresh and self._token and self._refresh_callback: + if is_jwt_expired(self._token, self._refresh_buffer): + self.refresh() + return self._token + + @token.setter + def token(self, value: Optional[str]): + """Set new token""" + if value and not validate_jwt_format(value): + raise ValueError("Invalid JWT token format") + self._token = value + + def refresh(self) -> Optional[str]: + """Refresh token using callback""" + if not self._refresh_callback: + raise RuntimeError("No refresh callback configured") + + try: + new_token = self._refresh_callback() + if new_token and validate_jwt_format(new_token): + self._token = new_token + logger.info("Token refreshed successfully") + return new_token + except Exception as e: + logger.error(f"Token refresh failed: {e}") + + return None + + def is_valid(self) -> bool: + """Check if current token is valid""" + return bool( + self._token + and validate_jwt_format(self._token) + and not is_jwt_expired(self._token, 0) + ) + + def get_claims(self) -> Optional[Dict[str, Any]]: + """Get claims from current token""" + if self._token: + return get_jwt_claims(self._token) + return None + + def get_expiration(self) -> Optional[datetime]: + """Get expiration time of current token""" + if self._token: + return get_jwt_expiration(self._token) + return None + + +# Convenience function for quick token extraction from client config +def extract_token_from_client(client) -> Optional[str]: + """Extract JWT token from RoboSystems client configuration + + Args: + client: RoboSystems client instance + + Returns: + JWT token if found, None otherwise + """ + # Try to get from authenticated client + if hasattr(client, "token"): + return client.token + + # Try from headers + if hasattr(client, "_headers"): + token = extract_jwt_from_header(client._headers) + if token: + return token + + # Try from config + if hasattr(client, "config"): + config = client.config + if isinstance(config, dict): + # Direct token + if config.get("token"): + return config["token"] + # From headers in config + if config.get("headers"): + return extract_jwt_from_header(config["headers"]) + + return None diff --git a/robosystems_client/extensions/utils.py b/robosystems_client/extensions/utils.py index 9c8f308..a198a33 100644 --- a/robosystems_client/extensions/utils.py +++ b/robosystems_client/extensions/utils.py @@ -294,15 +294,31 @@ def get_elapsed_time(self) -> timedelta: def get_estimated_completion(self) -> Optional[datetime]: """Estimate completion time based on progress""" - if not self.progress_history or self.total_steps is None: + if not self.progress_history: return None latest = self.progress_history[-1] - if latest["percentage"] and latest["percentage"] > 0: + + # If we have a percentage, use it for estimation + if ( + latest.get("percentage") + and latest["percentage"] > 0 + and latest["percentage"] < 100 + ): elapsed = self.get_elapsed_time() estimated_total = elapsed.total_seconds() / (latest["percentage"] / 100) return self.started_at + timedelta(seconds=estimated_total) + # If we have steps, use them for estimation + if ( + self.total_steps + and self.current_step > 0 + and self.current_step < self.total_steps + ): + elapsed = self.get_elapsed_time() + estimated_total = elapsed.total_seconds() * (self.total_steps / self.current_step) + return self.started_at + timedelta(seconds=estimated_total) + return None def get_summary(self) -> Dict[str, Any]: @@ -494,6 +510,20 @@ def validate_cypher_query(query: str) -> Dict[str, Any]: if query.count("{") != query.count("}"): issues.append("Unbalanced curly braces") + # Check for invalid Cypher patterns + import re + + # In Cypher, nodes use parentheses (), not square brackets [] + # MATCH [n] is invalid, should be MATCH (n) + if re.search(r"\b(match|create|merge)\s+\[", query_lower): + issues.append( + "Invalid syntax: Nodes must use parentheses (), not square brackets []" + ) + + # Check for relationship patterns without nodes + if re.search(r"^\s*\[.*?\]\s*return", query_lower): + issues.append("Invalid syntax: Square brackets are for relationships, not nodes") + # Basic keyword checks if not any( keyword in query_lower