From e27bf07b82f3c4862045dab0d271c2b98ac69859 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Aug 2025 06:51:31 +0000 Subject: [PATCH 1/2] Bump version from 0.1.12 to 0.1.13 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e244370..99cc008 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "robosystems-client" -version = "0.1.12" +version = "0.1.13" description = "Python Client for RoboSystems financial graph database API" readme = "README.md" requires-python = ">=3.10" From 90508c2bf465b2e50c61ab3fef9464f240809e96 Mon Sep 17 00:00:00 2001 From: Joey French Date: Tue, 26 Aug 2025 00:18:25 -0500 Subject: [PATCH 2/2] Refactor backup API endpoints to use pluralized URLs and remove unused BackupExportRequest model. Introduce new copy and graph billing models, enhancing the API with S3 and URL copy request functionalities. Update subgraph-related methods to improve clarity and consistency in parameter naming. --- .../api/backup/create_backup.py | 2 +- .../api/backup/export_backup.py | 33 +- .../api/backup/get_backup_download_url.py | 2 +- .../api/backup/get_backup_stats.py | 20 +- .../api/backup/kuzu_backup_health.py | 202 ---------- robosystems_client/api/backup/list_backups.py | 20 +- .../api/backup/restore_backup.py | 2 +- ...v1_graph_id_billing_available_plans_get.py | 198 --------- ...ng_info_v1_graph_id_billing_credits_get.py | 210 ---------- ...ng_info_v1_graph_id_billing_pricing_get.py | 198 --------- ...on_v1_graph_id_billing_subscription_get.py | 198 --------- ...ph_id_billing_subscription_upgrade_post.py | 216 ---------- .../api/{billing => copy}/__init__.py | 0 .../api/copy/copy_data_to_graph.py | 314 +++++++++++++++ .../{credits_ => graph_billing}/__init__.py | 0 .../get_current_graph_bill.py | 0 .../get_graph_billing_history.py | 0 .../get_graph_monthly_bill.py | 0 .../get_graph_usage_details.py | 0 .../__init__.py | 0 .../check_credit_balance.py | 62 ++- .../check_storage_limits.py | 0 .../get_credit_summary.py | 0 .../get_storage_usage.py | 0 .../list_credit_transactions.py | 0 .../api/graph_health/__init__.py | 1 + .../get_database_health.py | 2 +- robosystems_client/api/graph_info/__init__.py | 1 + .../get_database_info.py | 2 +- .../api/graph_limits/__init__.py | 1 + .../api/graph_limits/get_graph_limits.py | 259 ++++++++++++ .../api/subgraphs/create_subgraph.py | 236 +++-------- .../api/subgraphs/delete_subgraph.py | 28 +- .../api/subgraphs/get_subgraph_info.py | 28 +- .../api/subgraphs/get_subgraph_quota.py | 12 +- .../api/subgraphs/list_subgraphs.py | 114 ++---- .../api/user/get_all_credit_summaries.py | 2 +- robosystems_client/models/__init__.py | 36 +- .../models/backup_export_request.py | 72 ---- robosystems_client/models/copy_response.py | 223 +++++++++++ ... => copy_response_error_details_type_0.py} | 10 +- .../models/copy_response_status.py | 10 + .../models/credit_check_request.py | 82 ---- .../models/custom_schema_definition.py | 4 +- .../models/data_frame_copy_request.py | 125 ++++++ .../models/data_frame_copy_request_format.py | 10 + ...et_graph_limits_response_getgraphlimits.py | 44 ++ robosystems_client/models/s3_copy_request.py | 375 ++++++++++++++++++ .../models/s3_copy_request_file_format.py | 12 + .../s3_copy_request_s3_url_style_type_0.py | 9 + .../models/upgrade_subscription_request.py | 82 ---- robosystems_client/models/url_copy_request.py | 157 ++++++++ .../models/url_copy_request_file_format.py | 10 + .../models/url_copy_request_headers_type_0.py | 44 ++ 54 files changed, 1866 insertions(+), 1802 deletions(-) delete mode 100644 robosystems_client/api/backup/kuzu_backup_health.py delete mode 100644 robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py delete mode 100644 robosystems_client/api/billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py delete mode 100644 robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py delete mode 100644 robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py delete mode 100644 robosystems_client/api/billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py rename robosystems_client/api/{billing => copy}/__init__.py (100%) create mode 100644 robosystems_client/api/copy/copy_data_to_graph.py rename robosystems_client/api/{credits_ => graph_billing}/__init__.py (100%) rename robosystems_client/api/{billing => graph_billing}/get_current_graph_bill.py (100%) rename robosystems_client/api/{billing => graph_billing}/get_graph_billing_history.py (100%) rename robosystems_client/api/{billing => graph_billing}/get_graph_monthly_bill.py (100%) rename robosystems_client/api/{billing => graph_billing}/get_graph_usage_details.py (100%) rename robosystems_client/api/{graph_status => graph_credits}/__init__.py (100%) rename robosystems_client/api/{credits_ => graph_credits}/check_credit_balance.py (82%) rename robosystems_client/api/{credits_ => graph_credits}/check_storage_limits.py (100%) rename robosystems_client/api/{credits_ => graph_credits}/get_credit_summary.py (100%) rename robosystems_client/api/{credits_ => graph_credits}/get_storage_usage.py (100%) rename robosystems_client/api/{credits_ => graph_credits}/list_credit_transactions.py (100%) create mode 100644 robosystems_client/api/graph_health/__init__.py rename robosystems_client/api/{graph_status => graph_health}/get_database_health.py (99%) create mode 100644 robosystems_client/api/graph_info/__init__.py rename robosystems_client/api/{graph_status => graph_info}/get_database_info.py (99%) create mode 100644 robosystems_client/api/graph_limits/__init__.py create mode 100644 robosystems_client/api/graph_limits/get_graph_limits.py delete mode 100644 robosystems_client/models/backup_export_request.py create mode 100644 robosystems_client/models/copy_response.py rename robosystems_client/models/{kuzu_backup_health_response_kuzubackuphealth.py => copy_response_error_details_type_0.py} (76%) create mode 100644 robosystems_client/models/copy_response_status.py delete mode 100644 robosystems_client/models/credit_check_request.py create mode 100644 robosystems_client/models/data_frame_copy_request.py create mode 100644 robosystems_client/models/data_frame_copy_request_format.py create mode 100644 robosystems_client/models/get_graph_limits_response_getgraphlimits.py create mode 100644 robosystems_client/models/s3_copy_request.py create mode 100644 robosystems_client/models/s3_copy_request_file_format.py create mode 100644 robosystems_client/models/s3_copy_request_s3_url_style_type_0.py delete mode 100644 robosystems_client/models/upgrade_subscription_request.py create mode 100644 robosystems_client/models/url_copy_request.py create mode 100644 robosystems_client/models/url_copy_request_file_format.py create mode 100644 robosystems_client/models/url_copy_request_headers_type_0.py diff --git a/robosystems_client/api/backup/create_backup.py b/robosystems_client/api/backup/create_backup.py index 517bd30..1a8e5d5 100644 --- a/robosystems_client/api/backup/create_backup.py +++ b/robosystems_client/api/backup/create_backup.py @@ -28,7 +28,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/{graph_id}/backup/create", + "url": f"/v1/{graph_id}/backups", "cookies": cookies, } diff --git a/robosystems_client/api/backup/export_backup.py b/robosystems_client/api/backup/export_backup.py index 6ba9281..7852ace 100644 --- a/robosystems_client/api/backup/export_backup.py +++ b/robosystems_client/api/backup/export_backup.py @@ -5,15 +5,14 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.backup_export_request import BackupExportRequest from ...models.http_validation_error import HTTPValidationError from ...types import UNSET, Response, Unset def _get_kwargs( graph_id: str, + backup_id: str, *, - body: BackupExportRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: @@ -27,14 +26,10 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/{graph_id}/backup/export", + "url": f"/v1/{graph_id}/backups/{backup_id}/export", "cookies": cookies, } - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - _kwargs["headers"] = headers return _kwargs @@ -74,9 +69,9 @@ def _build_response( def sync_detailed( graph_id: str, + backup_id: str, *, client: AuthenticatedClient, - body: BackupExportRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: @@ -86,9 +81,9 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + backup_id (str): Backup identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (BackupExportRequest): Request model for exporting a backup. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,7 +95,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - body=body, + backup_id=backup_id, authorization=authorization, auth_token=auth_token, ) @@ -114,9 +109,9 @@ def sync_detailed( def sync( graph_id: str, + backup_id: str, *, client: AuthenticatedClient, - body: BackupExportRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: @@ -126,9 +121,9 @@ def sync( Args: graph_id (str): Graph database identifier + backup_id (str): Backup identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (BackupExportRequest): Request model for exporting a backup. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,8 +135,8 @@ def sync( return sync_detailed( graph_id=graph_id, + backup_id=backup_id, client=client, - body=body, authorization=authorization, auth_token=auth_token, ).parsed @@ -149,9 +144,9 @@ def sync( async def asyncio_detailed( graph_id: str, + backup_id: str, *, client: AuthenticatedClient, - body: BackupExportRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[Any, HTTPValidationError]]: @@ -161,9 +156,9 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + backup_id (str): Backup identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (BackupExportRequest): Request model for exporting a backup. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,7 +170,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - body=body, + backup_id=backup_id, authorization=authorization, auth_token=auth_token, ) @@ -187,9 +182,9 @@ async def asyncio_detailed( async def asyncio( graph_id: str, + backup_id: str, *, client: AuthenticatedClient, - body: BackupExportRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[Any, HTTPValidationError]]: @@ -199,9 +194,9 @@ async def asyncio( Args: graph_id (str): Graph database identifier + backup_id (str): Backup identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (BackupExportRequest): Request model for exporting a backup. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,8 +209,8 @@ async def asyncio( return ( await asyncio_detailed( graph_id=graph_id, + backup_id=backup_id, client=client, - body=body, authorization=authorization, auth_token=auth_token, ) diff --git a/robosystems_client/api/backup/get_backup_download_url.py b/robosystems_client/api/backup/get_backup_download_url.py index 22bfba6..ec457a7 100644 --- a/robosystems_client/api/backup/get_backup_download_url.py +++ b/robosystems_client/api/backup/get_backup_download_url.py @@ -36,7 +36,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/backup/{backup_id}/download", + "url": f"/v1/{graph_id}/backups/{backup_id}/download", "params": params, "cookies": cookies, } diff --git a/robosystems_client/api/backup/get_backup_stats.py b/robosystems_client/api/backup/get_backup_stats.py index d663cf0..8efc8fe 100644 --- a/robosystems_client/api/backup/get_backup_stats.py +++ b/robosystems_client/api/backup/get_backup_stats.py @@ -13,18 +13,24 @@ def _get_kwargs( graph_id: str, *, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(authorization, Unset): + headers["authorization"] = authorization + cookies = {} if auth_token is not UNSET: cookies["auth-token"] = auth_token _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/backup/stats", + "url": f"/v1/{graph_id}/backups/stats", "cookies": cookies, } + _kwargs["headers"] = headers return _kwargs @@ -60,6 +66,7 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -68,6 +75,7 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -80,6 +88,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, + authorization=authorization, auth_token=auth_token, ) @@ -94,6 +103,7 @@ def sync( graph_id: str, *, client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -102,6 +112,7 @@ def sync( Args: graph_id (str): Graph database identifier + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -115,6 +126,7 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, + authorization=authorization, auth_token=auth_token, ).parsed @@ -123,6 +135,7 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -131,6 +144,7 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -143,6 +157,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, + authorization=authorization, auth_token=auth_token, ) @@ -155,6 +170,7 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]: """Get backup statistics @@ -163,6 +179,7 @@ async def asyncio( Args: graph_id (str): Graph database identifier + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -177,6 +194,7 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, + authorization=authorization, auth_token=auth_token, ) ).parsed diff --git a/robosystems_client/api/backup/kuzu_backup_health.py b/robosystems_client/api/backup/kuzu_backup_health.py deleted file mode 100644 index 7b10d1b..0000000 --- a/robosystems_client/api/backup/kuzu_backup_health.py +++ /dev/null @@ -1,202 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...models.kuzu_backup_health_response_kuzubackuphealth import ( - KuzuBackupHealthResponseKuzubackuphealth, -) -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - cookies = {} - if auth_token is not UNSET: - cookies["auth-token"] = auth_token - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/{graph_id}/backup/health", - "cookies": cookies, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]]: - if response.status_code == 200: - response_200 = KuzuBackupHealthResponseKuzubackuphealth.from_dict(response.json()) - - return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]]: - """Check Kuzu backup system health - - Check the health status of the Kuzu backup system - - Args: - graph_id (str): Graph database identifier - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]]: - """Check Kuzu backup system health - - Check the health status of the Kuzu backup system - - Args: - graph_id (str): Graph database identifier - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]]: - """Check Kuzu backup system health - - Check the health status of the Kuzu backup system - - Args: - graph_id (str): Graph database identifier - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth]]: - """Check Kuzu backup system health - - Check the health status of the Kuzu backup system - - Args: - graph_id (str): Graph database identifier - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[HTTPValidationError, KuzuBackupHealthResponseKuzubackuphealth] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ) - ).parsed diff --git a/robosystems_client/api/backup/list_backups.py b/robosystems_client/api/backup/list_backups.py index 13d40b3..68c95eb 100644 --- a/robosystems_client/api/backup/list_backups.py +++ b/robosystems_client/api/backup/list_backups.py @@ -15,8 +15,13 @@ def _get_kwargs( *, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(authorization, Unset): + headers["authorization"] = authorization + cookies = {} if auth_token is not UNSET: cookies["auth-token"] = auth_token @@ -31,11 +36,12 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/backup/list", + "url": f"/v1/{graph_id}/backups", "params": params, "cookies": cookies, } + _kwargs["headers"] = headers return _kwargs @@ -73,6 +79,7 @@ def sync_detailed( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -83,6 +90,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. + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -97,6 +105,7 @@ def sync_detailed( graph_id=graph_id, limit=limit, offset=offset, + authorization=authorization, auth_token=auth_token, ) @@ -113,6 +122,7 @@ def sync( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -123,6 +133,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. + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -138,6 +149,7 @@ def sync( client=client, limit=limit, offset=offset, + authorization=authorization, auth_token=auth_token, ).parsed @@ -148,6 +160,7 @@ async def asyncio_detailed( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -158,6 +171,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. + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -172,6 +186,7 @@ async def asyncio_detailed( graph_id=graph_id, limit=limit, offset=offset, + authorization=authorization, auth_token=auth_token, ) @@ -186,6 +201,7 @@ async def asyncio( client: AuthenticatedClient, limit: Union[Unset, int] = 50, offset: Union[Unset, int] = 0, + authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[Union[BackupListResponse, HTTPValidationError]]: """List Kuzu graph backups @@ -196,6 +212,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. + authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): Raises: @@ -212,6 +229,7 @@ async def asyncio( client=client, limit=limit, offset=offset, + authorization=authorization, auth_token=auth_token, ) ).parsed diff --git a/robosystems_client/api/backup/restore_backup.py b/robosystems_client/api/backup/restore_backup.py index 12522ca..5cf8687 100644 --- a/robosystems_client/api/backup/restore_backup.py +++ b/robosystems_client/api/backup/restore_backup.py @@ -28,7 +28,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/{graph_id}/backup/restore", + "url": f"/v1/{graph_id}/backups/restore", "cookies": cookies, } diff --git a/robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py b/robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py deleted file mode 100644 index 2dfd94c..0000000 --- a/robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - cookies = {} - if auth_token is not UNSET: - cookies["auth-token"] = auth_token - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/{graph_id}/billing/available-plans", - "cookies": cookies, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Available Subscription Plans - - Get available subscription plans for upgrade. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Available Subscription Plans - - Get available subscription plans for upgrade. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Available Subscription Plans - - Get available subscription plans for upgrade. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Available Subscription Plans - - Get available subscription plans for upgrade. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ) - ).parsed diff --git a/robosystems_client/api/billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py b/robosystems_client/api/billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py deleted file mode 100644 index 6c1ec38..0000000 --- a/robosystems_client/api/billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py +++ /dev/null @@ -1,210 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - cookies = {} - if auth_token is not UNSET: - cookies["auth-token"] = auth_token - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/{graph_id}/billing/credits", - "cookies": cookies, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Credit Billing Info - - Get credit-based billing information for a specific graph. - - This endpoint provides comprehensive credit usage and billing information - without consuming credits (for billing transparency). - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Credit Billing Info - - Get credit-based billing information for a specific graph. - - This endpoint provides comprehensive credit usage and billing information - without consuming credits (for billing transparency). - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Credit Billing Info - - Get credit-based billing information for a specific graph. - - This endpoint provides comprehensive credit usage and billing information - without consuming credits (for billing transparency). - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Credit Billing Info - - Get credit-based billing information for a specific graph. - - This endpoint provides comprehensive credit usage and billing information - without consuming credits (for billing transparency). - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ) - ).parsed diff --git a/robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py b/robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py deleted file mode 100644 index 7234ea5..0000000 --- a/robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - cookies = {} - if auth_token is not UNSET: - cookies["auth-token"] = auth_token - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/{graph_id}/billing/pricing", - "cookies": cookies, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Graph Pricing Info - - Get pricing information for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Graph Pricing Info - - Get pricing information for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Graph Pricing Info - - Get pricing information for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Graph Pricing Info - - Get pricing information for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ) - ).parsed diff --git a/robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py b/robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py deleted file mode 100644 index e298b83..0000000 --- a/robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py +++ /dev/null @@ -1,198 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - cookies = {} - if auth_token is not UNSET: - cookies["auth-token"] = auth_token - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/{graph_id}/billing/subscription", - "cookies": cookies, - } - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Graph Subscription - - Get current subscription for a graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Graph Subscription - - Get current subscription for a graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Get Graph Subscription - - Get current subscription for a graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - authorization=authorization, - auth_token=auth_token, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Get Graph Subscription - - Get current subscription for a graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - authorization=authorization, - auth_token=auth_token, - ) - ).parsed diff --git a/robosystems_client/api/billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py b/robosystems_client/api/billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py deleted file mode 100644 index 2581781..0000000 --- a/robosystems_client/api/billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py +++ /dev/null @@ -1,216 +0,0 @@ -from http import HTTPStatus -from typing import Any, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...models.upgrade_subscription_request import UpgradeSubscriptionRequest -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - body: UpgradeSubscriptionRequest, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(authorization, Unset): - headers["authorization"] = authorization - - cookies = {} - if auth_token is not UNSET: - cookies["auth-token"] = auth_token - - _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/{graph_id}/billing/subscription/upgrade", - "cookies": cookies, - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: UpgradeSubscriptionRequest, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Upgrade Graph Subscription - - Upgrade subscription for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - body (UpgradeSubscriptionRequest): Request to upgrade a graph database subscription. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - authorization=authorization, - auth_token=auth_token, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: UpgradeSubscriptionRequest, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Upgrade Graph Subscription - - Upgrade subscription for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - body (UpgradeSubscriptionRequest): Request to upgrade a graph database subscription. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - authorization=authorization, - auth_token=auth_token, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: UpgradeSubscriptionRequest, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError]]: - """Upgrade Graph Subscription - - Upgrade subscription for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - body (UpgradeSubscriptionRequest): Request to upgrade a graph database subscription. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, HTTPValidationError]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - authorization=authorization, - auth_token=auth_token, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: UpgradeSubscriptionRequest, - authorization: Union[None, Unset, str] = UNSET, - auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError]]: - """Upgrade Graph Subscription - - Upgrade subscription for a specific graph database. - - Args: - graph_id (str): Graph database ID - authorization (Union[None, Unset, str]): - auth_token (Union[None, Unset, str]): - body (UpgradeSubscriptionRequest): Request to upgrade a graph database subscription. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, HTTPValidationError] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - authorization=authorization, - auth_token=auth_token, - ) - ).parsed diff --git a/robosystems_client/api/billing/__init__.py b/robosystems_client/api/copy/__init__.py similarity index 100% rename from robosystems_client/api/billing/__init__.py rename to robosystems_client/api/copy/__init__.py diff --git a/robosystems_client/api/copy/copy_data_to_graph.py b/robosystems_client/api/copy/copy_data_to_graph.py new file mode 100644 index 0000000..204915e --- /dev/null +++ b/robosystems_client/api/copy/copy_data_to_graph.py @@ -0,0 +1,314 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.copy_response import CopyResponse +from ...models.data_frame_copy_request import DataFrameCopyRequest +from ...models.http_validation_error import HTTPValidationError +from ...models.s3_copy_request import S3CopyRequest +from ...models.url_copy_request import URLCopyRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + graph_id: str, + *, + body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(authorization, Unset): + headers["authorization"] = authorization + + cookies = {} + if auth_token is not UNSET: + cookies["auth-token"] = auth_token + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/{graph_id}/copy", + "cookies": cookies, + } + + _kwargs["json"]: dict[str, Any] + if isinstance(body, S3CopyRequest): + _kwargs["json"] = body.to_dict() + elif isinstance(body, URLCopyRequest): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[CopyResponse, HTTPValidationError]]: + if response.status_code == 200: + response_200 = CopyResponse.from_dict(response.json()) + + return response_200 + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[CopyResponse, HTTPValidationError]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + graph_id: str, + *, + client: AuthenticatedClient, + body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[Union[CopyResponse, HTTPValidationError]]: + """Copy Data to Graph + + Copy data from external sources into the graph database. + + This endpoint supports multiple data sources through a unified interface: + - **S3**: Copy from S3 buckets with user-provided credentials + - **URL** (future): Copy from HTTP(S) URLs + - **DataFrame** (future): Copy from uploaded DataFrames + + **Security:** + - Requires write permissions to the target graph + - **Not allowed on shared repositories** (sec, industry, economic) - these are read-only + - User must provide their own AWS credentials for S3 access + - All operations are logged for audit purposes + + **Tier Limits:** + - Standard: 10GB max file size, 15 min timeout + - Enterprise: 50GB max file size, 30 min timeout + - Premium: 100GB max file size, 60 min timeout + + **Copy Options:** + - `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior) + - `extended_timeout`: Use extended timeout for large datasets + - `validate_schema`: Validate source schema against target table + + Args: + graph_id (str): Target graph identifier (user graphs only - shared repositories not + allowed) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[CopyResponse, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + graph_id=graph_id, + body=body, + authorization=authorization, + auth_token=auth_token, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + graph_id: str, + *, + client: AuthenticatedClient, + body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[Union[CopyResponse, HTTPValidationError]]: + """Copy Data to Graph + + Copy data from external sources into the graph database. + + This endpoint supports multiple data sources through a unified interface: + - **S3**: Copy from S3 buckets with user-provided credentials + - **URL** (future): Copy from HTTP(S) URLs + - **DataFrame** (future): Copy from uploaded DataFrames + + **Security:** + - Requires write permissions to the target graph + - **Not allowed on shared repositories** (sec, industry, economic) - these are read-only + - User must provide their own AWS credentials for S3 access + - All operations are logged for audit purposes + + **Tier Limits:** + - Standard: 10GB max file size, 15 min timeout + - Enterprise: 50GB max file size, 30 min timeout + - Premium: 100GB max file size, 60 min timeout + + **Copy Options:** + - `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior) + - `extended_timeout`: Use extended timeout for large datasets + - `validate_schema`: Validate source schema against target table + + Args: + graph_id (str): Target graph identifier (user graphs only - shared repositories not + allowed) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[CopyResponse, HTTPValidationError] + """ + + return sync_detailed( + graph_id=graph_id, + client=client, + body=body, + authorization=authorization, + auth_token=auth_token, + ).parsed + + +async def asyncio_detailed( + graph_id: str, + *, + client: AuthenticatedClient, + body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[Union[CopyResponse, HTTPValidationError]]: + """Copy Data to Graph + + Copy data from external sources into the graph database. + + This endpoint supports multiple data sources through a unified interface: + - **S3**: Copy from S3 buckets with user-provided credentials + - **URL** (future): Copy from HTTP(S) URLs + - **DataFrame** (future): Copy from uploaded DataFrames + + **Security:** + - Requires write permissions to the target graph + - **Not allowed on shared repositories** (sec, industry, economic) - these are read-only + - User must provide their own AWS credentials for S3 access + - All operations are logged for audit purposes + + **Tier Limits:** + - Standard: 10GB max file size, 15 min timeout + - Enterprise: 50GB max file size, 30 min timeout + - Premium: 100GB max file size, 60 min timeout + + **Copy Options:** + - `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior) + - `extended_timeout`: Use extended timeout for large datasets + - `validate_schema`: Validate source schema against target table + + Args: + graph_id (str): Target graph identifier (user graphs only - shared repositories not + allowed) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[CopyResponse, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + graph_id=graph_id, + body=body, + authorization=authorization, + auth_token=auth_token, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + graph_id: str, + *, + client: AuthenticatedClient, + body: Union["DataFrameCopyRequest", "S3CopyRequest", "URLCopyRequest"], + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[Union[CopyResponse, HTTPValidationError]]: + """Copy Data to Graph + + Copy data from external sources into the graph database. + + This endpoint supports multiple data sources through a unified interface: + - **S3**: Copy from S3 buckets with user-provided credentials + - **URL** (future): Copy from HTTP(S) URLs + - **DataFrame** (future): Copy from uploaded DataFrames + + **Security:** + - Requires write permissions to the target graph + - **Not allowed on shared repositories** (sec, industry, economic) - these are read-only + - User must provide their own AWS credentials for S3 access + - All operations are logged for audit purposes + + **Tier Limits:** + - Standard: 10GB max file size, 15 min timeout + - Enterprise: 50GB max file size, 30 min timeout + - Premium: 100GB max file size, 60 min timeout + + **Copy Options:** + - `ignore_errors`: Skip duplicate/invalid rows (enables upsert-like behavior) + - `extended_timeout`: Use extended timeout for large datasets + - `validate_schema`: Validate source schema against target table + + Args: + graph_id (str): Target graph identifier (user graphs only - shared repositories not + allowed) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + body (Union['DataFrameCopyRequest', 'S3CopyRequest', 'URLCopyRequest']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[CopyResponse, HTTPValidationError] + """ + + return ( + await asyncio_detailed( + graph_id=graph_id, + client=client, + body=body, + authorization=authorization, + auth_token=auth_token, + ) + ).parsed diff --git a/robosystems_client/api/credits_/__init__.py b/robosystems_client/api/graph_billing/__init__.py similarity index 100% rename from robosystems_client/api/credits_/__init__.py rename to robosystems_client/api/graph_billing/__init__.py diff --git a/robosystems_client/api/billing/get_current_graph_bill.py b/robosystems_client/api/graph_billing/get_current_graph_bill.py similarity index 100% rename from robosystems_client/api/billing/get_current_graph_bill.py rename to robosystems_client/api/graph_billing/get_current_graph_bill.py diff --git a/robosystems_client/api/billing/get_graph_billing_history.py b/robosystems_client/api/graph_billing/get_graph_billing_history.py similarity index 100% rename from robosystems_client/api/billing/get_graph_billing_history.py rename to robosystems_client/api/graph_billing/get_graph_billing_history.py diff --git a/robosystems_client/api/billing/get_graph_monthly_bill.py b/robosystems_client/api/graph_billing/get_graph_monthly_bill.py similarity index 100% rename from robosystems_client/api/billing/get_graph_monthly_bill.py rename to robosystems_client/api/graph_billing/get_graph_monthly_bill.py diff --git a/robosystems_client/api/billing/get_graph_usage_details.py b/robosystems_client/api/graph_billing/get_graph_usage_details.py similarity index 100% rename from robosystems_client/api/billing/get_graph_usage_details.py rename to robosystems_client/api/graph_billing/get_graph_usage_details.py diff --git a/robosystems_client/api/graph_status/__init__.py b/robosystems_client/api/graph_credits/__init__.py similarity index 100% rename from robosystems_client/api/graph_status/__init__.py rename to robosystems_client/api/graph_credits/__init__.py diff --git a/robosystems_client/api/credits_/check_credit_balance.py b/robosystems_client/api/graph_credits/check_credit_balance.py similarity index 82% rename from robosystems_client/api/credits_/check_credit_balance.py rename to robosystems_client/api/graph_credits/check_credit_balance.py index 88c6e1b..635d206 100644 --- a/robosystems_client/api/credits_/check_credit_balance.py +++ b/robosystems_client/api/graph_credits/check_credit_balance.py @@ -8,7 +8,6 @@ from ...models.check_credit_balance_response_checkcreditbalance import ( CheckCreditBalanceResponseCheckcreditbalance, ) -from ...models.credit_check_request import CreditCheckRequest from ...models.error_response import ErrorResponse from ...models.http_validation_error import HTTPValidationError from ...types import UNSET, Response, Unset @@ -17,7 +16,8 @@ def _get_kwargs( graph_id: str, *, - body: CreditCheckRequest, + operation_type: str, + base_cost: Union[None, Unset, float] = UNSET, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> dict[str, Any]: @@ -29,16 +29,26 @@ def _get_kwargs( if auth_token is not UNSET: cookies["auth-token"] = auth_token + params: dict[str, Any] = {} + + params["operation_type"] = operation_type + + json_base_cost: Union[None, Unset, float] + if isinstance(base_cost, Unset): + json_base_cost = UNSET + else: + json_base_cost = base_cost + params["base_cost"] = json_base_cost + + 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}/credits/check", + "method": "get", + "url": f"/v1/{graph_id}/credits/balance/check", + "params": params, "cookies": cookies, } - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - _kwargs["headers"] = headers return _kwargs @@ -97,7 +107,8 @@ def sync_detailed( graph_id: str, *, client: AuthenticatedClient, - body: CreditCheckRequest, + operation_type: str, + base_cost: Union[None, Unset, float] = UNSET, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[ @@ -121,9 +132,10 @@ def sync_detailed( Args: graph_id (str): Graph database identifier + operation_type (str): Type of operation to check + base_cost (Union[None, Unset, float]): Custom base cost (uses default if not provided) authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (CreditCheckRequest): Request to check credit balance. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +147,8 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - body=body, + operation_type=operation_type, + base_cost=base_cost, authorization=authorization, auth_token=auth_token, ) @@ -151,7 +164,8 @@ def sync( graph_id: str, *, client: AuthenticatedClient, - body: CreditCheckRequest, + operation_type: str, + base_cost: Union[None, Unset, float] = UNSET, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[ @@ -175,9 +189,10 @@ def sync( Args: graph_id (str): Graph database identifier + operation_type (str): Type of operation to check + base_cost (Union[None, Unset, float]): Custom base cost (uses default if not provided) authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (CreditCheckRequest): Request to check credit balance. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +205,8 @@ def sync( return sync_detailed( graph_id=graph_id, client=client, - body=body, + operation_type=operation_type, + base_cost=base_cost, authorization=authorization, auth_token=auth_token, ).parsed @@ -200,7 +216,8 @@ async def asyncio_detailed( graph_id: str, *, client: AuthenticatedClient, - body: CreditCheckRequest, + operation_type: str, + base_cost: Union[None, Unset, float] = UNSET, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Response[ @@ -224,9 +241,10 @@ async def asyncio_detailed( Args: graph_id (str): Graph database identifier + operation_type (str): Type of operation to check + base_cost (Union[None, Unset, float]): Custom base cost (uses default if not provided) authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (CreditCheckRequest): Request to check credit balance. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -238,7 +256,8 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - body=body, + operation_type=operation_type, + base_cost=base_cost, authorization=authorization, auth_token=auth_token, ) @@ -252,7 +271,8 @@ async def asyncio( graph_id: str, *, client: AuthenticatedClient, - body: CreditCheckRequest, + operation_type: str, + base_cost: Union[None, Unset, float] = UNSET, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, ) -> Optional[ @@ -276,9 +296,10 @@ async def asyncio( Args: graph_id (str): Graph database identifier + operation_type (str): Type of operation to check + base_cost (Union[None, Unset, float]): Custom base cost (uses default if not provided) authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): - body (CreditCheckRequest): Request to check credit balance. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -292,7 +313,8 @@ async def asyncio( await asyncio_detailed( graph_id=graph_id, client=client, - body=body, + operation_type=operation_type, + base_cost=base_cost, authorization=authorization, auth_token=auth_token, ) diff --git a/robosystems_client/api/credits_/check_storage_limits.py b/robosystems_client/api/graph_credits/check_storage_limits.py similarity index 100% rename from robosystems_client/api/credits_/check_storage_limits.py rename to robosystems_client/api/graph_credits/check_storage_limits.py diff --git a/robosystems_client/api/credits_/get_credit_summary.py b/robosystems_client/api/graph_credits/get_credit_summary.py similarity index 100% rename from robosystems_client/api/credits_/get_credit_summary.py rename to robosystems_client/api/graph_credits/get_credit_summary.py diff --git a/robosystems_client/api/credits_/get_storage_usage.py b/robosystems_client/api/graph_credits/get_storage_usage.py similarity index 100% rename from robosystems_client/api/credits_/get_storage_usage.py rename to robosystems_client/api/graph_credits/get_storage_usage.py diff --git a/robosystems_client/api/credits_/list_credit_transactions.py b/robosystems_client/api/graph_credits/list_credit_transactions.py similarity index 100% rename from robosystems_client/api/credits_/list_credit_transactions.py rename to robosystems_client/api/graph_credits/list_credit_transactions.py diff --git a/robosystems_client/api/graph_health/__init__.py b/robosystems_client/api/graph_health/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/robosystems_client/api/graph_health/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/robosystems_client/api/graph_status/get_database_health.py b/robosystems_client/api/graph_health/get_database_health.py similarity index 99% rename from robosystems_client/api/graph_status/get_database_health.py rename to robosystems_client/api/graph_health/get_database_health.py index b788774..10be7b8 100644 --- a/robosystems_client/api/graph_status/get_database_health.py +++ b/robosystems_client/api/graph_health/get_database_health.py @@ -26,7 +26,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/status/health", + "url": f"/v1/{graph_id}/health", "cookies": cookies, } diff --git a/robosystems_client/api/graph_info/__init__.py b/robosystems_client/api/graph_info/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/robosystems_client/api/graph_info/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/robosystems_client/api/graph_status/get_database_info.py b/robosystems_client/api/graph_info/get_database_info.py similarity index 99% rename from robosystems_client/api/graph_status/get_database_info.py rename to robosystems_client/api/graph_info/get_database_info.py index 88b6cc5..90fe688 100644 --- a/robosystems_client/api/graph_status/get_database_info.py +++ b/robosystems_client/api/graph_info/get_database_info.py @@ -26,7 +26,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/status/info", + "url": f"/v1/{graph_id}/info", "cookies": cookies, } diff --git a/robosystems_client/api/graph_limits/__init__.py b/robosystems_client/api/graph_limits/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/robosystems_client/api/graph_limits/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/robosystems_client/api/graph_limits/get_graph_limits.py b/robosystems_client/api/graph_limits/get_graph_limits.py new file mode 100644 index 0000000..8e50bae --- /dev/null +++ b/robosystems_client/api/graph_limits/get_graph_limits.py @@ -0,0 +1,259 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_graph_limits_response_getgraphlimits import ( + GetGraphLimitsResponseGetgraphlimits, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + graph_id: str, + *, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(authorization, Unset): + headers["authorization"] = authorization + + cookies = {} + if auth_token is not UNSET: + cookies["auth-token"] = auth_token + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/{graph_id}/limits", + "cookies": cookies, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: + if response.status_code == 200: + response_200 = GetGraphLimitsResponseGetgraphlimits.from_dict(response.json()) + + return response_200 + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + if response.status_code == 404: + response_404 = cast(Any, None) + return response_404 + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + graph_id: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: + """Get Graph Operational Limits + + Get comprehensive operational limits for the graph database. + + Returns all operational limits that apply to this graph including: + - **Storage Limits**: Maximum storage size and current usage + - **Query Limits**: Timeouts, complexity, row limits + - **Copy/Ingestion Limits**: File sizes, timeouts, concurrent operations + - **Backup Limits**: Frequency, retention, size limits + - **Rate Limits**: Requests per minute/hour based on tier + - **Credit Limits**: AI operation credits (if applicable) + + This unified endpoint provides all limits in one place for easier client integration. + + **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). + + Args: + graph_id (str): Graph database identifier (user graph or shared repository) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + graph_id=graph_id, + authorization=authorization, + auth_token=auth_token, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + graph_id: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: + """Get Graph Operational Limits + + Get comprehensive operational limits for the graph database. + + Returns all operational limits that apply to this graph including: + - **Storage Limits**: Maximum storage size and current usage + - **Query Limits**: Timeouts, complexity, row limits + - **Copy/Ingestion Limits**: File sizes, timeouts, concurrent operations + - **Backup Limits**: Frequency, retention, size limits + - **Rate Limits**: Requests per minute/hour based on tier + - **Credit Limits**: AI operation credits (if applicable) + + This unified endpoint provides all limits in one place for easier client integration. + + **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). + + Args: + graph_id (str): Graph database identifier (user graph or shared repository) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError] + """ + + return sync_detailed( + graph_id=graph_id, + client=client, + authorization=authorization, + auth_token=auth_token, + ).parsed + + +async def asyncio_detailed( + graph_id: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: + """Get Graph Operational Limits + + Get comprehensive operational limits for the graph database. + + Returns all operational limits that apply to this graph including: + - **Storage Limits**: Maximum storage size and current usage + - **Query Limits**: Timeouts, complexity, row limits + - **Copy/Ingestion Limits**: File sizes, timeouts, concurrent operations + - **Backup Limits**: Frequency, retention, size limits + - **Rate Limits**: Requests per minute/hour based on tier + - **Credit Limits**: AI operation credits (if applicable) + + This unified endpoint provides all limits in one place for easier client integration. + + **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). + + Args: + graph_id (str): Graph database identifier (user graph or shared repository) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]] + """ + + kwargs = _get_kwargs( + graph_id=graph_id, + authorization=authorization, + auth_token=auth_token, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + graph_id: str, + *, + client: AuthenticatedClient, + authorization: Union[None, Unset, str] = UNSET, + auth_token: Union[None, Unset, str] = UNSET, +) -> Optional[Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError]]: + """Get Graph Operational Limits + + Get comprehensive operational limits for the graph database. + + Returns all operational limits that apply to this graph including: + - **Storage Limits**: Maximum storage size and current usage + - **Query Limits**: Timeouts, complexity, row limits + - **Copy/Ingestion Limits**: File sizes, timeouts, concurrent operations + - **Backup Limits**: Frequency, retention, size limits + - **Rate Limits**: Requests per minute/hour based on tier + - **Credit Limits**: AI operation credits (if applicable) + + This unified endpoint provides all limits in one place for easier client integration. + + **Note**: Limits vary based on subscription tier (Standard, Enterprise, Premium). + + Args: + graph_id (str): Graph database identifier (user graph or shared repository) + authorization (Union[None, Unset, str]): + auth_token (Union[None, Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, GetGraphLimitsResponseGetgraphlimits, HTTPValidationError] + """ + + return ( + await asyncio_detailed( + graph_id=graph_id, + client=client, + authorization=authorization, + auth_token=auth_token, + ) + ).parsed diff --git a/robosystems_client/api/subgraphs/create_subgraph.py b/robosystems_client/api/subgraphs/create_subgraph.py index b915835..49b5484 100644 --- a/robosystems_client/api/subgraphs/create_subgraph.py +++ b/robosystems_client/api/subgraphs/create_subgraph.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, Optional, Union import httpx @@ -42,29 +42,11 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: - if response.status_code == 200: - response_200 = SubgraphResponse.from_dict(response.json()) - - return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = cast(Any, None) - return response_404 - if response.status_code == 400: - response_400 = cast(Any, None) - return response_400 - if response.status_code == 409: - response_409 = cast(Any, None) - return response_409 - if response.status_code == 500: - response_500 = cast(Any, None) - return response_500 +) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: + if response.status_code == 201: + response_201 = SubgraphResponse.from_dict(response.json()) + + return response_201 if response.status_code == 422: response_422 = HTTPValidationError.from_dict(response.json()) @@ -77,7 +59,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: +) -> Response[Union[HTTPValidationError, SubgraphResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -93,47 +75,24 @@ def sync_detailed( body: CreateSubgraphRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: - """Create New Subgraph +) -> Response[Union[HTTPValidationError, SubgraphResponse]]: + """Create Subgraph - Create a new subgraph database under an Enterprise or Premium parent graph. + Create a new subgraph within a parent graph. **Requirements:** - - Parent graph must be Enterprise or Premium tier - - User must have admin access to parent graph - - Subgraph name must be unique within parent - - Subgraph name must be alphanumeric (1-20 chars) - - **Subgraph Benefits:** - - Shares parent's infrastructure (no additional cost) - - Inherits parent's credit pool - - Isolated database on same instance - - Full Kuzu database capabilities - - **Use Cases:** - - Separate environments (dev/staging/prod) - - Department-specific data isolation - - Multi-tenant applications - - Testing and experimentation - - **Schema Inheritance:** - - Subgraphs can use parent's schema or custom extensions - - Extensions are additive only - - Base schema always included - - **Limits:** - - Enterprise: Maximum 10 subgraphs - - Premium: Unlimited subgraphs - - Standard: Not supported - - **Response includes:** - - `graph_id`: Full subgraph identifier - - `parent_graph_id`: Parent graph ID - - `subgraph_name`: Short name within parent - - `status`: Creation status + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have 'admin' permission on the parent graph + - Parent graph tier must support subgraphs (Enterprise or Premium only) + - Must be within subgraph quota limits + - Subgraph name must be unique within the parent graph + + **Returns:** + - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -143,7 +102,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, HTTPValidationError, SubgraphResponse]] + Response[Union[HTTPValidationError, SubgraphResponse]] """ kwargs = _get_kwargs( @@ -167,47 +126,24 @@ def sync( body: CreateSubgraphRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: - """Create New Subgraph +) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: + """Create Subgraph - Create a new subgraph database under an Enterprise or Premium parent graph. + Create a new subgraph within a parent graph. **Requirements:** - - Parent graph must be Enterprise or Premium tier - - User must have admin access to parent graph - - Subgraph name must be unique within parent - - Subgraph name must be alphanumeric (1-20 chars) - - **Subgraph Benefits:** - - Shares parent's infrastructure (no additional cost) - - Inherits parent's credit pool - - Isolated database on same instance - - Full Kuzu database capabilities - - **Use Cases:** - - Separate environments (dev/staging/prod) - - Department-specific data isolation - - Multi-tenant applications - - Testing and experimentation - - **Schema Inheritance:** - - Subgraphs can use parent's schema or custom extensions - - Extensions are additive only - - Base schema always included - - **Limits:** - - Enterprise: Maximum 10 subgraphs - - Premium: Unlimited subgraphs - - Standard: Not supported - - **Response includes:** - - `graph_id`: Full subgraph identifier - - `parent_graph_id`: Parent graph ID - - `subgraph_name`: Short name within parent - - `status`: Creation status + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have 'admin' permission on the parent graph + - Parent graph tier must support subgraphs (Enterprise or Premium only) + - Must be within subgraph quota limits + - Subgraph name must be unique within the parent graph + + **Returns:** + - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -217,7 +153,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, HTTPValidationError, SubgraphResponse] + Union[HTTPValidationError, SubgraphResponse] """ return sync_detailed( @@ -236,47 +172,24 @@ async def asyncio_detailed( body: CreateSubgraphRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]: - """Create New Subgraph +) -> Response[Union[HTTPValidationError, SubgraphResponse]]: + """Create Subgraph - Create a new subgraph database under an Enterprise or Premium parent graph. + Create a new subgraph within a parent graph. **Requirements:** - - Parent graph must be Enterprise or Premium tier - - User must have admin access to parent graph - - Subgraph name must be unique within parent - - Subgraph name must be alphanumeric (1-20 chars) - - **Subgraph Benefits:** - - Shares parent's infrastructure (no additional cost) - - Inherits parent's credit pool - - Isolated database on same instance - - Full Kuzu database capabilities - - **Use Cases:** - - Separate environments (dev/staging/prod) - - Department-specific data isolation - - Multi-tenant applications - - Testing and experimentation - - **Schema Inheritance:** - - Subgraphs can use parent's schema or custom extensions - - Extensions are additive only - - Base schema always included - - **Limits:** - - Enterprise: Maximum 10 subgraphs - - Premium: Unlimited subgraphs - - Standard: Not supported - - **Response includes:** - - `graph_id`: Full subgraph identifier - - `parent_graph_id`: Parent graph ID - - `subgraph_name`: Short name within parent - - `status`: Creation status + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have 'admin' permission on the parent graph + - Parent graph tier must support subgraphs (Enterprise or Premium only) + - Must be within subgraph quota limits + - Subgraph name must be unique within the parent graph + + **Returns:** + - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -286,7 +199,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, HTTPValidationError, SubgraphResponse]] + Response[Union[HTTPValidationError, SubgraphResponse]] """ kwargs = _get_kwargs( @@ -308,47 +221,24 @@ async def asyncio( body: CreateSubgraphRequest, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]: - """Create New Subgraph +) -> Optional[Union[HTTPValidationError, SubgraphResponse]]: + """Create Subgraph - Create a new subgraph database under an Enterprise or Premium parent graph. + Create a new subgraph within a parent graph. **Requirements:** - - Parent graph must be Enterprise or Premium tier - - User must have admin access to parent graph - - Subgraph name must be unique within parent - - Subgraph name must be alphanumeric (1-20 chars) - - **Subgraph Benefits:** - - Shares parent's infrastructure (no additional cost) - - Inherits parent's credit pool - - Isolated database on same instance - - Full Kuzu database capabilities - - **Use Cases:** - - Separate environments (dev/staging/prod) - - Department-specific data isolation - - Multi-tenant applications - - Testing and experimentation - - **Schema Inheritance:** - - Subgraphs can use parent's schema or custom extensions - - Extensions are additive only - - Base schema always included - - **Limits:** - - Enterprise: Maximum 10 subgraphs - - Premium: Unlimited subgraphs - - Standard: Not supported - - **Response includes:** - - `graph_id`: Full subgraph identifier - - `parent_graph_id`: Parent graph ID - - `subgraph_name`: Short name within parent - - `status`: Creation status + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have 'admin' permission on the parent graph + - Parent graph tier must support subgraphs (Enterprise or Premium only) + - Must be within subgraph quota limits + - Subgraph name must be unique within the parent graph + + **Returns:** + - Created subgraph details including its unique ID Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (CreateSubgraphRequest): Request model for creating a subgraph. @@ -358,7 +248,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, HTTPValidationError, SubgraphResponse] + Union[HTTPValidationError, SubgraphResponse] """ return ( diff --git a/robosystems_client/api/subgraphs/delete_subgraph.py b/robosystems_client/api/subgraphs/delete_subgraph.py index 3cdcb52..99a1bf0 100644 --- a/robosystems_client/api/subgraphs/delete_subgraph.py +++ b/robosystems_client/api/subgraphs/delete_subgraph.py @@ -13,7 +13,7 @@ def _get_kwargs( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, body: DeleteSubgraphRequest, authorization: Union[None, Unset, str] = UNSET, @@ -29,7 +29,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/{graph_id}/subgraphs/{subgraph_name}", + "url": f"/v1/{graph_id}/subgraphs/{subgraph_id}", "cookies": cookies, } @@ -89,7 +89,7 @@ def _build_response( def sync_detailed( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, body: DeleteSubgraphRequest, @@ -119,7 +119,7 @@ def sync_detailed( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name to delete + subgraph_id (str): Subgraph identifier to delete authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -134,7 +134,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, body=body, authorization=authorization, auth_token=auth_token, @@ -149,7 +149,7 @@ def sync_detailed( def sync( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, body: DeleteSubgraphRequest, @@ -179,7 +179,7 @@ def sync( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name to delete + subgraph_id (str): Subgraph identifier to delete authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -194,7 +194,7 @@ def sync( return sync_detailed( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, client=client, body=body, authorization=authorization, @@ -204,7 +204,7 @@ def sync( async def asyncio_detailed( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, body: DeleteSubgraphRequest, @@ -234,7 +234,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name to delete + subgraph_id (str): Subgraph identifier to delete authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -249,7 +249,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, body=body, authorization=authorization, auth_token=auth_token, @@ -262,7 +262,7 @@ async def asyncio_detailed( async def asyncio( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, body: DeleteSubgraphRequest, @@ -292,7 +292,7 @@ async def asyncio( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name to delete + subgraph_id (str): Subgraph identifier to delete authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): body (DeleteSubgraphRequest): Request model for deleting a subgraph. @@ -308,7 +308,7 @@ async def asyncio( return ( await asyncio_detailed( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, client=client, body=body, authorization=authorization, diff --git a/robosystems_client/api/subgraphs/get_subgraph_info.py b/robosystems_client/api/subgraphs/get_subgraph_info.py index d51539d..8e23d33 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_info.py +++ b/robosystems_client/api/subgraphs/get_subgraph_info.py @@ -12,7 +12,7 @@ def _get_kwargs( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, @@ -27,7 +27,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/{graph_id}/subgraphs/{subgraph_name}/info", + "url": f"/v1/{graph_id}/subgraphs/{subgraph_id}/info", "cookies": cookies, } @@ -80,7 +80,7 @@ def _build_response( def sync_detailed( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -110,7 +110,7 @@ def sync_detailed( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name + subgraph_id (str): Subgraph identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -124,7 +124,7 @@ def sync_detailed( kwargs = _get_kwargs( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, authorization=authorization, auth_token=auth_token, ) @@ -138,7 +138,7 @@ def sync_detailed( def sync( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -168,7 +168,7 @@ def sync( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name + subgraph_id (str): Subgraph identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -182,7 +182,7 @@ def sync( return sync_detailed( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, client=client, authorization=authorization, auth_token=auth_token, @@ -191,7 +191,7 @@ def sync( async def asyncio_detailed( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -221,7 +221,7 @@ async def asyncio_detailed( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name + subgraph_id (str): Subgraph identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -235,7 +235,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, authorization=authorization, auth_token=auth_token, ) @@ -247,7 +247,7 @@ async def asyncio_detailed( async def asyncio( graph_id: str, - subgraph_name: str, + subgraph_id: str, *, client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, @@ -277,7 +277,7 @@ async def asyncio( Args: graph_id (str): Parent graph identifier - subgraph_name (str): Subgraph name + subgraph_id (str): Subgraph identifier authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -292,7 +292,7 @@ async def asyncio( return ( await asyncio_detailed( graph_id=graph_id, - subgraph_name=subgraph_name, + subgraph_id=subgraph_id, client=client, authorization=authorization, auth_token=auth_token, diff --git a/robosystems_client/api/subgraphs/get_subgraph_quota.py b/robosystems_client/api/subgraphs/get_subgraph_quota.py index 9b60806..1981a46 100644 --- a/robosystems_client/api/subgraphs/get_subgraph_quota.py +++ b/robosystems_client/api/subgraphs/get_subgraph_quota.py @@ -93,8 +93,9 @@ def sync_detailed( **Tier Limits:** - Standard: 0 subgraphs (not supported) - - Enterprise: 10 subgraphs maximum + - Enterprise: Configurable limit (default: 10 subgraphs) - Premium: Unlimited subgraphs + - Limits are defined in deployment configuration **Size Tracking:** Provides aggregate size metrics when available. @@ -145,8 +146,9 @@ def sync( **Tier Limits:** - Standard: 0 subgraphs (not supported) - - Enterprise: 10 subgraphs maximum + - Enterprise: Configurable limit (default: 10 subgraphs) - Premium: Unlimited subgraphs + - Limits are defined in deployment configuration **Size Tracking:** Provides aggregate size metrics when available. @@ -192,8 +194,9 @@ async def asyncio_detailed( **Tier Limits:** - Standard: 0 subgraphs (not supported) - - Enterprise: 10 subgraphs maximum + - Enterprise: Configurable limit (default: 10 subgraphs) - Premium: Unlimited subgraphs + - Limits are defined in deployment configuration **Size Tracking:** Provides aggregate size metrics when available. @@ -242,8 +245,9 @@ async def asyncio( **Tier Limits:** - Standard: 0 subgraphs (not supported) - - Enterprise: 10 subgraphs maximum + - Enterprise: Configurable limit (default: 10 subgraphs) - Premium: Unlimited subgraphs + - Limits are defined in deployment configuration **Size Tracking:** Provides aggregate size metrics when available. diff --git a/robosystems_client/api/subgraphs/list_subgraphs.py b/robosystems_client/api/subgraphs/list_subgraphs.py index 0aaf632..db48012 100644 --- a/robosystems_client/api/subgraphs/list_subgraphs.py +++ b/robosystems_client/api/subgraphs/list_subgraphs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, Optional, Union import httpx @@ -36,23 +36,11 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError, ListSubgraphsResponse]]: +) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: if response.status_code == 200: response_200 = ListSubgraphsResponse.from_dict(response.json()) return response_200 - if response.status_code == 401: - response_401 = cast(Any, None) - return response_401 - if response.status_code == 403: - response_403 = cast(Any, None) - return response_403 - if response.status_code == 404: - response_404 = cast(Any, None) - return response_404 - if response.status_code == 500: - response_500 = cast(Any, None) - return response_500 if response.status_code == 422: response_422 = HTTPValidationError.from_dict(response.json()) @@ -65,7 +53,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, HTTPValidationError, ListSubgraphsResponse]]: +) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,28 +68,22 @@ def sync_detailed( client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError, ListSubgraphsResponse]]: +) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs List all subgraphs for a parent graph. **Requirements:** - - User must have at least read access to parent graph + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have at least 'read' permission on the parent graph - **Response includes:** - - List of all subgraphs with metadata - - Current usage vs limits - - Size and statistics per subgraph - - Creation timestamps - - **Filtering:** - Currently returns all subgraphs. Future versions will support: - - Filtering by status - - Filtering by creation date - - Pagination for large lists + **Returns:** + - List of all subgraphs for the parent graph + - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -110,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, HTTPValidationError, ListSubgraphsResponse]] + Response[Union[HTTPValidationError, ListSubgraphsResponse]] """ kwargs = _get_kwargs( @@ -132,28 +114,22 @@ def sync( client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError, ListSubgraphsResponse]]: +) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs List all subgraphs for a parent graph. **Requirements:** - - User must have at least read access to parent graph - - **Response includes:** - - List of all subgraphs with metadata - - Current usage vs limits - - Size and statistics per subgraph - - Creation timestamps + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have at least 'read' permission on the parent graph - **Filtering:** - Currently returns all subgraphs. Future versions will support: - - Filtering by status - - Filtering by creation date - - Pagination for large lists + **Returns:** + - List of all subgraphs for the parent graph + - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -162,7 +138,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, HTTPValidationError, ListSubgraphsResponse] + Union[HTTPValidationError, ListSubgraphsResponse] """ return sync_detailed( @@ -179,28 +155,22 @@ async def asyncio_detailed( client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Response[Union[Any, HTTPValidationError, ListSubgraphsResponse]]: +) -> Response[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs List all subgraphs for a parent graph. **Requirements:** - - User must have at least read access to parent graph + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have at least 'read' permission on the parent graph - **Response includes:** - - List of all subgraphs with metadata - - Current usage vs limits - - Size and statistics per subgraph - - Creation timestamps - - **Filtering:** - Currently returns all subgraphs. Future versions will support: - - Filtering by status - - Filtering by creation date - - Pagination for large lists + **Returns:** + - List of all subgraphs for the parent graph + - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -209,7 +179,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, HTTPValidationError, ListSubgraphsResponse]] + Response[Union[HTTPValidationError, ListSubgraphsResponse]] """ kwargs = _get_kwargs( @@ -229,28 +199,22 @@ async def asyncio( client: AuthenticatedClient, authorization: Union[None, Unset, str] = UNSET, auth_token: Union[None, Unset, str] = UNSET, -) -> Optional[Union[Any, HTTPValidationError, ListSubgraphsResponse]]: +) -> Optional[Union[HTTPValidationError, ListSubgraphsResponse]]: """List Subgraphs List all subgraphs for a parent graph. **Requirements:** - - User must have at least read access to parent graph - - **Response includes:** - - List of all subgraphs with metadata - - Current usage vs limits - - Size and statistics per subgraph - - Creation timestamps + - Valid authentication + - Parent graph must exist and be accessible to the user + - User must have at least 'read' permission on the parent graph - **Filtering:** - Currently returns all subgraphs. Future versions will support: - - Filtering by status - - Filtering by creation date - - Pagination for large lists + **Returns:** + - List of all subgraphs for the parent graph + - Each subgraph includes its ID, name, description, type, status, and creation date Args: - graph_id (str): Parent graph identifier + graph_id (str): Parent graph ID (e.g., 'kg1a2b3c4d5') authorization (Union[None, Unset, str]): auth_token (Union[None, Unset, str]): @@ -259,7 +223,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, HTTPValidationError, ListSubgraphsResponse] + Union[HTTPValidationError, ListSubgraphsResponse] """ return ( diff --git a/robosystems_client/api/user/get_all_credit_summaries.py b/robosystems_client/api/user/get_all_credit_summaries.py index 0aded85..640f0f5 100644 --- a/robosystems_client/api/user/get_all_credit_summaries.py +++ b/robosystems_client/api/user/get_all_credit_summaries.py @@ -28,7 +28,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/user/credits/summary", + "url": "/v1/user/credits", "cookies": cookies, } diff --git a/robosystems_client/models/__init__.py b/robosystems_client/models/__init__.py index a4abca9..4e8fa64 100644 --- a/robosystems_client/models/__init__.py +++ b/robosystems_client/models/__init__.py @@ -14,7 +14,6 @@ from .available_extension import AvailableExtension from .available_extensions_response import AvailableExtensionsResponse from .backup_create_request import BackupCreateRequest -from .backup_export_request import BackupExportRequest from .backup_list_response import BackupListResponse from .backup_response import BackupResponse from .backup_restore_request import BackupRestoreRequest @@ -34,6 +33,9 @@ from .connection_response import ConnectionResponse from .connection_response_metadata import ConnectionResponseMetadata from .connection_response_provider import ConnectionResponseProvider +from .copy_response import CopyResponse +from .copy_response_error_details_type_0 import CopyResponseErrorDetailsType0 +from .copy_response_status import CopyResponseStatus from .create_api_key_request import CreateAPIKeyRequest from .create_api_key_response import CreateAPIKeyResponse from .create_connection_request import CreateConnectionRequest @@ -41,7 +43,6 @@ from .create_graph_request import CreateGraphRequest from .create_subgraph_request import CreateSubgraphRequest from .create_subgraph_request_metadata_type_0 import CreateSubgraphRequestMetadataType0 -from .credit_check_request import CreditCheckRequest from .credit_summary import CreditSummary from .credit_summary_response import CreditSummaryResponse from .credits_summary_response import CreditsSummaryResponse @@ -56,6 +57,8 @@ ) from .cypher_query_request import CypherQueryRequest from .cypher_query_request_parameters_type_0 import CypherQueryRequestParametersType0 +from .data_frame_copy_request import DataFrameCopyRequest +from .data_frame_copy_request_format import DataFrameCopyRequestFormat from .database_health_response import DatabaseHealthResponse from .database_info_response import DatabaseInfoResponse from .delete_subgraph_request import DeleteSubgraphRequest @@ -90,6 +93,9 @@ from .get_graph_billing_history_response_getgraphbillinghistory import ( GetGraphBillingHistoryResponseGetgraphbillinghistory, ) +from .get_graph_limits_response_getgraphlimits import ( + GetGraphLimitsResponseGetgraphlimits, +) from .get_graph_monthly_bill_response_getgraphmonthlybill import ( GetGraphMonthlyBillResponseGetgraphmonthlybill, ) @@ -125,9 +131,6 @@ from .health_status_details_type_0 import HealthStatusDetailsType0 from .http_validation_error import HTTPValidationError from .initial_entity_data import InitialEntityData -from .kuzu_backup_health_response_kuzubackuphealth import ( - KuzuBackupHealthResponseKuzubackuphealth, -) from .link_token_request import LinkTokenRequest from .link_token_request_options_type_0 import LinkTokenRequestOptionsType0 from .link_token_request_provider_type_0 import LinkTokenRequestProviderType0 @@ -166,6 +169,9 @@ from .repository_plan import RepositoryPlan from .repository_type import RepositoryType from .response_mode import ResponseMode +from .s3_copy_request import S3CopyRequest +from .s3_copy_request_file_format import S3CopyRequestFileFormat +from .s3_copy_request_s3_url_style_type_0 import S3CopyRequestS3UrlStyleType0 from .schema_export_response import SchemaExportResponse from .schema_export_response_data_stats_type_0 import SchemaExportResponseDataStatsType0 from .schema_export_response_schema_definition_type_0 import ( @@ -210,7 +216,9 @@ from .update_api_key_request import UpdateAPIKeyRequest from .update_password_request import UpdatePasswordRequest from .update_user_request import UpdateUserRequest -from .upgrade_subscription_request import UpgradeSubscriptionRequest +from .url_copy_request import URLCopyRequest +from .url_copy_request_file_format import URLCopyRequestFileFormat +from .url_copy_request_headers_type_0 import URLCopyRequestHeadersType0 from .user_analytics_response import UserAnalyticsResponse from .user_analytics_response_api_usage import UserAnalyticsResponseApiUsage from .user_analytics_response_graph_usage import UserAnalyticsResponseGraphUsage @@ -247,7 +255,6 @@ "AvailableExtension", "AvailableExtensionsResponse", "BackupCreateRequest", - "BackupExportRequest", "BackupListResponse", "BackupResponse", "BackupRestoreRequest", @@ -263,6 +270,9 @@ "ConnectionResponse", "ConnectionResponseMetadata", "ConnectionResponseProvider", + "CopyResponse", + "CopyResponseErrorDetailsType0", + "CopyResponseStatus", "CreateAPIKeyRequest", "CreateAPIKeyResponse", "CreateConnectionRequest", @@ -270,7 +280,6 @@ "CreateGraphRequest", "CreateSubgraphRequest", "CreateSubgraphRequestMetadataType0", - "CreditCheckRequest", "CreditsSummaryResponse", "CreditsSummaryResponseCreditsByAddonItem", "CreditSummary", @@ -283,6 +292,8 @@ "CypherQueryRequestParametersType0", "DatabaseHealthResponse", "DatabaseInfoResponse", + "DataFrameCopyRequest", + "DataFrameCopyRequestFormat", "DeleteSubgraphRequest", "DeleteSubgraphResponse", "DetailedTransactionsResponse", @@ -299,6 +310,7 @@ "GetCurrentAuthUserResponseGetcurrentauthuser", "GetCurrentGraphBillResponseGetcurrentgraphbill", "GetGraphBillingHistoryResponseGetgraphbillinghistory", + "GetGraphLimitsResponseGetgraphlimits", "GetGraphMonthlyBillResponseGetgraphmonthlybill", "GetGraphSchemaInfoResponseGetgraphschemainfo", "GetGraphUsageDetailsResponseGetgraphusagedetails", @@ -320,7 +332,6 @@ "HealthStatusDetailsType0", "HTTPValidationError", "InitialEntityData", - "KuzuBackupHealthResponseKuzubackuphealth", "LinkTokenRequest", "LinkTokenRequestOptionsType0", "LinkTokenRequestProviderType0", @@ -351,6 +362,9 @@ "RepositoryPlan", "RepositoryType", "ResponseMode", + "S3CopyRequest", + "S3CopyRequestFileFormat", + "S3CopyRequestS3UrlStyleType0", "SchemaExportResponse", "SchemaExportResponseDataStatsType0", "SchemaExportResponseSchemaDefinitionType0", @@ -385,7 +399,9 @@ "UpdateAPIKeyRequest", "UpdatePasswordRequest", "UpdateUserRequest", - "UpgradeSubscriptionRequest", + "URLCopyRequest", + "URLCopyRequestFileFormat", + "URLCopyRequestHeadersType0", "UserAnalyticsResponse", "UserAnalyticsResponseApiUsage", "UserAnalyticsResponseGraphUsage", diff --git a/robosystems_client/models/backup_export_request.py b/robosystems_client/models/backup_export_request.py deleted file mode 100644 index 073a09a..0000000 --- a/robosystems_client/models/backup_export_request.py +++ /dev/null @@ -1,72 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="BackupExportRequest") - - -@_attrs_define -class BackupExportRequest: - """Request model for exporting a backup. - - Attributes: - backup_id (str): ID of backup to export - export_format (Union[Unset, str]): Export format - only 'original' is supported (compressed .kuzu file) Default: - 'original'. - """ - - backup_id: str - export_format: Union[Unset, str] = "original" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - backup_id = self.backup_id - - export_format = self.export_format - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "backup_id": backup_id, - } - ) - if export_format is not UNSET: - field_dict["export_format"] = export_format - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - backup_id = d.pop("backup_id") - - export_format = d.pop("export_format", UNSET) - - backup_export_request = cls( - backup_id=backup_id, - export_format=export_format, - ) - - backup_export_request.additional_properties = d - return backup_export_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/copy_response.py b/robosystems_client/models/copy_response.py new file mode 100644 index 0000000..2929606 --- /dev/null +++ b/robosystems_client/models/copy_response.py @@ -0,0 +1,223 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.copy_response_status import CopyResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.copy_response_error_details_type_0 import CopyResponseErrorDetailsType0 + + +T = TypeVar("T", bound="CopyResponse") + + +@_attrs_define +class CopyResponse: + """Response model for copy operations. + + Attributes: + status (CopyResponseStatus): Operation status + source_type (str): Type of source that was copied from + execution_time_ms (float): Total execution time in milliseconds + message (str): Human-readable status message + rows_imported (Union[None, Unset, int]): Number of rows successfully imported + rows_skipped (Union[None, Unset, int]): Number of rows skipped due to errors (when ignore_errors=true) + warnings (Union[None, Unset, list[str]]): List of warnings encountered during import + error_details (Union['CopyResponseErrorDetailsType0', None, Unset]): Detailed error information if operation + failed + bytes_processed (Union[None, Unset, int]): Total bytes processed from source + """ + + status: CopyResponseStatus + source_type: str + execution_time_ms: float + message: str + rows_imported: Union[None, Unset, int] = UNSET + rows_skipped: Union[None, Unset, int] = UNSET + warnings: Union[None, Unset, list[str]] = UNSET + error_details: Union["CopyResponseErrorDetailsType0", None, Unset] = UNSET + bytes_processed: Union[None, Unset, int] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.copy_response_error_details_type_0 import ( + CopyResponseErrorDetailsType0, + ) + + status = self.status.value + + source_type = self.source_type + + execution_time_ms = self.execution_time_ms + + message = self.message + + rows_imported: Union[None, Unset, int] + if isinstance(self.rows_imported, Unset): + rows_imported = UNSET + else: + rows_imported = self.rows_imported + + rows_skipped: Union[None, Unset, int] + if isinstance(self.rows_skipped, Unset): + rows_skipped = UNSET + else: + rows_skipped = self.rows_skipped + + warnings: Union[None, Unset, list[str]] + if isinstance(self.warnings, Unset): + warnings = UNSET + elif isinstance(self.warnings, list): + warnings = self.warnings + + else: + warnings = self.warnings + + error_details: Union[None, Unset, dict[str, Any]] + if isinstance(self.error_details, Unset): + error_details = UNSET + elif isinstance(self.error_details, CopyResponseErrorDetailsType0): + error_details = self.error_details.to_dict() + else: + error_details = self.error_details + + bytes_processed: Union[None, Unset, int] + if isinstance(self.bytes_processed, Unset): + bytes_processed = UNSET + else: + bytes_processed = self.bytes_processed + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "source_type": source_type, + "execution_time_ms": execution_time_ms, + "message": message, + } + ) + if rows_imported is not UNSET: + field_dict["rows_imported"] = rows_imported + if rows_skipped is not UNSET: + field_dict["rows_skipped"] = rows_skipped + if warnings is not UNSET: + field_dict["warnings"] = warnings + if error_details is not UNSET: + field_dict["error_details"] = error_details + if bytes_processed is not UNSET: + field_dict["bytes_processed"] = bytes_processed + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.copy_response_error_details_type_0 import ( + CopyResponseErrorDetailsType0, + ) + + d = dict(src_dict) + status = CopyResponseStatus(d.pop("status")) + + source_type = d.pop("source_type") + + execution_time_ms = d.pop("execution_time_ms") + + message = d.pop("message") + + def _parse_rows_imported(data: object) -> Union[None, Unset, int]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, int], data) + + rows_imported = _parse_rows_imported(d.pop("rows_imported", UNSET)) + + def _parse_rows_skipped(data: object) -> Union[None, Unset, int]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, int], data) + + rows_skipped = _parse_rows_skipped(d.pop("rows_skipped", UNSET)) + + def _parse_warnings(data: object) -> Union[None, Unset, list[str]]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + warnings_type_0 = cast(list[str], data) + + return warnings_type_0 + except: # noqa: E722 + pass + return cast(Union[None, Unset, list[str]], data) + + warnings = _parse_warnings(d.pop("warnings", UNSET)) + + def _parse_error_details( + data: object, + ) -> Union["CopyResponseErrorDetailsType0", None, Unset]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + error_details_type_0 = CopyResponseErrorDetailsType0.from_dict(data) + + return error_details_type_0 + except: # noqa: E722 + pass + return cast(Union["CopyResponseErrorDetailsType0", None, Unset], data) + + error_details = _parse_error_details(d.pop("error_details", UNSET)) + + def _parse_bytes_processed(data: object) -> Union[None, Unset, int]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, int], data) + + bytes_processed = _parse_bytes_processed(d.pop("bytes_processed", UNSET)) + + copy_response = cls( + status=status, + source_type=source_type, + execution_time_ms=execution_time_ms, + message=message, + rows_imported=rows_imported, + rows_skipped=rows_skipped, + warnings=warnings, + error_details=error_details, + bytes_processed=bytes_processed, + ) + + copy_response.additional_properties = d + return copy_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/kuzu_backup_health_response_kuzubackuphealth.py b/robosystems_client/models/copy_response_error_details_type_0.py similarity index 76% rename from robosystems_client/models/kuzu_backup_health_response_kuzubackuphealth.py rename to robosystems_client/models/copy_response_error_details_type_0.py index 35aac87..374ead7 100644 --- a/robosystems_client/models/kuzu_backup_health_response_kuzubackuphealth.py +++ b/robosystems_client/models/copy_response_error_details_type_0.py @@ -4,11 +4,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="KuzuBackupHealthResponseKuzubackuphealth") +T = TypeVar("T", bound="CopyResponseErrorDetailsType0") @_attrs_define -class KuzuBackupHealthResponseKuzubackuphealth: +class CopyResponseErrorDetailsType0: """ """ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -22,10 +22,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - kuzu_backup_health_response_kuzubackuphealth = cls() + copy_response_error_details_type_0 = cls() - kuzu_backup_health_response_kuzubackuphealth.additional_properties = d - return kuzu_backup_health_response_kuzubackuphealth + copy_response_error_details_type_0.additional_properties = d + return copy_response_error_details_type_0 @property def additional_keys(self) -> list[str]: diff --git a/robosystems_client/models/copy_response_status.py b/robosystems_client/models/copy_response_status.py new file mode 100644 index 0000000..5fc6134 --- /dev/null +++ b/robosystems_client/models/copy_response_status.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CopyResponseStatus(str, Enum): + COMPLETED = "completed" + FAILED = "failed" + PARTIAL = "partial" + + def __str__(self) -> str: + return str(self.value) diff --git a/robosystems_client/models/credit_check_request.py b/robosystems_client/models/credit_check_request.py deleted file mode 100644 index 0e501d0..0000000 --- a/robosystems_client/models/credit_check_request.py +++ /dev/null @@ -1,82 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="CreditCheckRequest") - - -@_attrs_define -class CreditCheckRequest: - """Request to check credit balance. - - Attributes: - operation_type (str): Type of operation to check - base_cost (Union[None, Unset, float]): Custom base cost (uses default if not provided) - """ - - operation_type: str - base_cost: Union[None, Unset, float] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - operation_type = self.operation_type - - base_cost: Union[None, Unset, float] - if isinstance(self.base_cost, Unset): - base_cost = UNSET - else: - base_cost = self.base_cost - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "operation_type": operation_type, - } - ) - if base_cost is not UNSET: - field_dict["base_cost"] = base_cost - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - operation_type = d.pop("operation_type") - - def _parse_base_cost(data: object) -> Union[None, Unset, float]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, float], data) - - base_cost = _parse_base_cost(d.pop("base_cost", UNSET)) - - credit_check_request = cls( - operation_type=operation_type, - base_cost=base_cost, - ) - - credit_check_request.additional_properties = d - return credit_check_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/custom_schema_definition.py b/robosystems_client/models/custom_schema_definition.py index f19e067..f8b4f04 100644 --- a/robosystems_client/models/custom_schema_definition.py +++ b/robosystems_client/models/custom_schema_definition.py @@ -31,8 +31,8 @@ class CustomSchemaDefinition: nodes (Union[Unset, list['CustomSchemaDefinitionNodesItem']]): List of node definitions with properties Example: [{'name': 'Product', 'properties': [{'name': 'sku', 'type': 'STRING', 'is_primary_key': True}, {'name': 'name', 'type': 'STRING', 'is_required': True}, {'name': 'price', 'type': 'DOUBLE'}, {'name': 'quantity', 'type': - 'INT64'}]}, {'name': 'Warehouse', 'properties': [{'name': 'id', 'type': 'STRING', 'is_primary_key': True}, - {'name': 'location', 'type': 'STRING'}]}]. + 'INT64'}]}, {'name': 'Warehouse', 'properties': [{'name': 'identifier', 'type': 'STRING', 'is_primary_key': + True}, {'name': 'location', 'type': 'STRING'}]}]. relationships (Union[Unset, list['CustomSchemaDefinitionRelationshipsItem']]): List of relationship definitions Example: [{'from_node': 'Product', 'name': 'STORED_IN', 'properties': [{'name': 'since', 'type': 'DATE'}], 'to_node': 'Warehouse'}]. diff --git a/robosystems_client/models/data_frame_copy_request.py b/robosystems_client/models/data_frame_copy_request.py new file mode 100644 index 0000000..2fccaf6 --- /dev/null +++ b/robosystems_client/models/data_frame_copy_request.py @@ -0,0 +1,125 @@ +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.data_frame_copy_request_format import DataFrameCopyRequestFormat +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataFrameCopyRequest") + + +@_attrs_define +class DataFrameCopyRequest: + """Request model for DataFrame copy operations (future). + + Attributes: + table_name (str): Target Kuzu table name + data_reference (str): Reference to uploaded DataFrame data + ignore_errors (Union[Unset, bool]): Skip duplicate/invalid rows (enables upsert-like behavior) Default: True. + extended_timeout (Union[Unset, bool]): Use extended timeout for large datasets Default: False. + validate_schema (Union[Unset, bool]): Validate source schema against target table Default: True. + source_type (Union[Literal['dataframe'], Unset]): Source type identifier Default: 'dataframe'. + format_ (Union[Unset, DataFrameCopyRequestFormat]): DataFrame format Default: DataFrameCopyRequestFormat.PANDAS. + """ + + table_name: str + data_reference: str + ignore_errors: Union[Unset, bool] = True + extended_timeout: Union[Unset, bool] = False + validate_schema: Union[Unset, bool] = True + source_type: Union[Literal["dataframe"], Unset] = "dataframe" + format_: Union[Unset, DataFrameCopyRequestFormat] = DataFrameCopyRequestFormat.PANDAS + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + table_name = self.table_name + + data_reference = self.data_reference + + ignore_errors = self.ignore_errors + + extended_timeout = self.extended_timeout + + validate_schema = self.validate_schema + + source_type = self.source_type + + format_: Union[Unset, str] = UNSET + if not isinstance(self.format_, Unset): + format_ = self.format_.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table_name": table_name, + "data_reference": data_reference, + } + ) + if ignore_errors is not UNSET: + field_dict["ignore_errors"] = ignore_errors + if extended_timeout is not UNSET: + field_dict["extended_timeout"] = extended_timeout + if validate_schema is not UNSET: + field_dict["validate_schema"] = validate_schema + if source_type is not UNSET: + field_dict["source_type"] = source_type + if format_ is not UNSET: + field_dict["format"] = format_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + table_name = d.pop("table_name") + + data_reference = d.pop("data_reference") + + ignore_errors = d.pop("ignore_errors", UNSET) + + extended_timeout = d.pop("extended_timeout", UNSET) + + validate_schema = d.pop("validate_schema", UNSET) + + source_type = cast(Union[Literal["dataframe"], Unset], d.pop("source_type", UNSET)) + if source_type != "dataframe" and not isinstance(source_type, Unset): + raise ValueError(f"source_type must match const 'dataframe', got '{source_type}'") + + _format_ = d.pop("format", UNSET) + format_: Union[Unset, DataFrameCopyRequestFormat] + if isinstance(_format_, Unset): + format_ = UNSET + else: + format_ = DataFrameCopyRequestFormat(_format_) + + data_frame_copy_request = cls( + table_name=table_name, + data_reference=data_reference, + ignore_errors=ignore_errors, + extended_timeout=extended_timeout, + validate_schema=validate_schema, + source_type=source_type, + format_=format_, + ) + + data_frame_copy_request.additional_properties = d + return data_frame_copy_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/data_frame_copy_request_format.py b/robosystems_client/models/data_frame_copy_request_format.py new file mode 100644 index 0000000..b5345f8 --- /dev/null +++ b/robosystems_client/models/data_frame_copy_request_format.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class DataFrameCopyRequestFormat(str, Enum): + ARROW = "arrow" + PANDAS = "pandas" + POLARS = "polars" + + def __str__(self) -> str: + return str(self.value) diff --git a/robosystems_client/models/get_graph_limits_response_getgraphlimits.py b/robosystems_client/models/get_graph_limits_response_getgraphlimits.py new file mode 100644 index 0000000..bd80ebd --- /dev/null +++ b/robosystems_client/models/get_graph_limits_response_getgraphlimits.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetGraphLimitsResponseGetgraphlimits") + + +@_attrs_define +class GetGraphLimitsResponseGetgraphlimits: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_graph_limits_response_getgraphlimits = cls() + + get_graph_limits_response_getgraphlimits.additional_properties = d + return get_graph_limits_response_getgraphlimits + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/s3_copy_request.py b/robosystems_client/models/s3_copy_request.py new file mode 100644 index 0000000..f55ed1a --- /dev/null +++ b/robosystems_client/models/s3_copy_request.py @@ -0,0 +1,375 @@ +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.s3_copy_request_file_format import S3CopyRequestFileFormat +from ..models.s3_copy_request_s3_url_style_type_0 import S3CopyRequestS3UrlStyleType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="S3CopyRequest") + + +@_attrs_define +class S3CopyRequest: + r"""Request model for S3 copy operations. + + Attributes: + table_name (str): Target Kuzu table name + s3_path (str): Full S3 path (s3://bucket/key or s3://bucket/prefix/*.parquet) + s3_access_key_id (str): AWS access key ID for S3 access + s3_secret_access_key (str): AWS secret access key for S3 access + ignore_errors (Union[Unset, bool]): Skip duplicate/invalid rows (enables upsert-like behavior) Default: True. + extended_timeout (Union[Unset, bool]): Use extended timeout for large datasets Default: False. + validate_schema (Union[Unset, bool]): Validate source schema against target table Default: True. + source_type (Union[Literal['s3'], Unset]): Source type identifier Default: 's3'. + s3_session_token (Union[None, Unset, str]): AWS session token (for temporary credentials) + s3_region (Union[None, Unset, str]): S3 region Default: 'us-east-1'. + s3_endpoint (Union[None, Unset, str]): Custom S3 endpoint (for S3-compatible storage) + s3_url_style (Union[None, S3CopyRequestS3UrlStyleType0, Unset]): S3 URL style (vhost or path) + file_format (Union[Unset, S3CopyRequestFileFormat]): File format of the S3 data Default: + S3CopyRequestFileFormat.PARQUET. + csv_delimiter (Union[None, Unset, str]): CSV delimiter Default: ','. + csv_header (Union[None, Unset, bool]): CSV has header row Default: True. + csv_quote (Union[None, Unset, str]): CSV quote character Default: '\\"'. + csv_escape (Union[None, Unset, str]): CSV escape character Default: '\\'. + csv_skip (Union[None, Unset, int]): Number of rows to skip Default: 0. + allow_moved_paths (Union[None, Unset, bool]): Allow moved paths for Iceberg tables Default: False. + max_file_size_gb (Union[None, Unset, int]): Maximum total file size limit in GB Default: 10. + """ + + table_name: str + s3_path: str + s3_access_key_id: str + s3_secret_access_key: str + ignore_errors: Union[Unset, bool] = True + extended_timeout: Union[Unset, bool] = False + validate_schema: Union[Unset, bool] = True + source_type: Union[Literal["s3"], Unset] = "s3" + s3_session_token: Union[None, Unset, str] = UNSET + s3_region: Union[None, Unset, str] = "us-east-1" + s3_endpoint: Union[None, Unset, str] = UNSET + s3_url_style: Union[None, S3CopyRequestS3UrlStyleType0, Unset] = UNSET + file_format: Union[Unset, S3CopyRequestFileFormat] = S3CopyRequestFileFormat.PARQUET + csv_delimiter: Union[None, Unset, str] = "," + csv_header: Union[None, Unset, bool] = True + csv_quote: Union[None, Unset, str] = '\\"' + csv_escape: Union[None, Unset, str] = "\\" + csv_skip: Union[None, Unset, int] = 0 + allow_moved_paths: Union[None, Unset, bool] = False + max_file_size_gb: Union[None, Unset, int] = 10 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + table_name = self.table_name + + s3_path = self.s3_path + + s3_access_key_id = self.s3_access_key_id + + s3_secret_access_key = self.s3_secret_access_key + + ignore_errors = self.ignore_errors + + extended_timeout = self.extended_timeout + + validate_schema = self.validate_schema + + source_type = self.source_type + + s3_session_token: Union[None, Unset, str] + if isinstance(self.s3_session_token, Unset): + s3_session_token = UNSET + else: + s3_session_token = self.s3_session_token + + s3_region: Union[None, Unset, str] + if isinstance(self.s3_region, Unset): + s3_region = UNSET + else: + s3_region = self.s3_region + + s3_endpoint: Union[None, Unset, str] + if isinstance(self.s3_endpoint, Unset): + s3_endpoint = UNSET + else: + s3_endpoint = self.s3_endpoint + + s3_url_style: Union[None, Unset, str] + if isinstance(self.s3_url_style, Unset): + s3_url_style = UNSET + elif isinstance(self.s3_url_style, S3CopyRequestS3UrlStyleType0): + s3_url_style = self.s3_url_style.value + else: + s3_url_style = self.s3_url_style + + file_format: Union[Unset, str] = UNSET + if not isinstance(self.file_format, Unset): + file_format = self.file_format.value + + csv_delimiter: Union[None, Unset, str] + if isinstance(self.csv_delimiter, Unset): + csv_delimiter = UNSET + else: + csv_delimiter = self.csv_delimiter + + csv_header: Union[None, Unset, bool] + if isinstance(self.csv_header, Unset): + csv_header = UNSET + else: + csv_header = self.csv_header + + csv_quote: Union[None, Unset, str] + if isinstance(self.csv_quote, Unset): + csv_quote = UNSET + else: + csv_quote = self.csv_quote + + csv_escape: Union[None, Unset, str] + if isinstance(self.csv_escape, Unset): + csv_escape = UNSET + else: + csv_escape = self.csv_escape + + csv_skip: Union[None, Unset, int] + if isinstance(self.csv_skip, Unset): + csv_skip = UNSET + else: + csv_skip = self.csv_skip + + allow_moved_paths: Union[None, Unset, bool] + if isinstance(self.allow_moved_paths, Unset): + allow_moved_paths = UNSET + else: + allow_moved_paths = self.allow_moved_paths + + max_file_size_gb: Union[None, Unset, int] + if isinstance(self.max_file_size_gb, Unset): + max_file_size_gb = UNSET + else: + max_file_size_gb = self.max_file_size_gb + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table_name": table_name, + "s3_path": s3_path, + "s3_access_key_id": s3_access_key_id, + "s3_secret_access_key": s3_secret_access_key, + } + ) + if ignore_errors is not UNSET: + field_dict["ignore_errors"] = ignore_errors + if extended_timeout is not UNSET: + field_dict["extended_timeout"] = extended_timeout + if validate_schema is not UNSET: + field_dict["validate_schema"] = validate_schema + if source_type is not UNSET: + field_dict["source_type"] = source_type + if s3_session_token is not UNSET: + field_dict["s3_session_token"] = s3_session_token + if s3_region is not UNSET: + field_dict["s3_region"] = s3_region + if s3_endpoint is not UNSET: + field_dict["s3_endpoint"] = s3_endpoint + if s3_url_style is not UNSET: + field_dict["s3_url_style"] = s3_url_style + if file_format is not UNSET: + field_dict["file_format"] = file_format + if csv_delimiter is not UNSET: + field_dict["csv_delimiter"] = csv_delimiter + if csv_header is not UNSET: + field_dict["csv_header"] = csv_header + if csv_quote is not UNSET: + field_dict["csv_quote"] = csv_quote + if csv_escape is not UNSET: + field_dict["csv_escape"] = csv_escape + if csv_skip is not UNSET: + field_dict["csv_skip"] = csv_skip + if allow_moved_paths is not UNSET: + field_dict["allow_moved_paths"] = allow_moved_paths + if max_file_size_gb is not UNSET: + field_dict["max_file_size_gb"] = max_file_size_gb + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + table_name = d.pop("table_name") + + s3_path = d.pop("s3_path") + + s3_access_key_id = d.pop("s3_access_key_id") + + s3_secret_access_key = d.pop("s3_secret_access_key") + + ignore_errors = d.pop("ignore_errors", UNSET) + + extended_timeout = d.pop("extended_timeout", UNSET) + + validate_schema = d.pop("validate_schema", UNSET) + + source_type = cast(Union[Literal["s3"], Unset], d.pop("source_type", UNSET)) + if source_type != "s3" and not isinstance(source_type, Unset): + raise ValueError(f"source_type must match const 's3', got '{source_type}'") + + def _parse_s3_session_token(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + s3_session_token = _parse_s3_session_token(d.pop("s3_session_token", UNSET)) + + def _parse_s3_region(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + s3_region = _parse_s3_region(d.pop("s3_region", UNSET)) + + def _parse_s3_endpoint(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + s3_endpoint = _parse_s3_endpoint(d.pop("s3_endpoint", UNSET)) + + def _parse_s3_url_style( + data: object, + ) -> Union[None, S3CopyRequestS3UrlStyleType0, Unset]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + s3_url_style_type_0 = S3CopyRequestS3UrlStyleType0(data) + + return s3_url_style_type_0 + except: # noqa: E722 + pass + return cast(Union[None, S3CopyRequestS3UrlStyleType0, Unset], data) + + s3_url_style = _parse_s3_url_style(d.pop("s3_url_style", UNSET)) + + _file_format = d.pop("file_format", UNSET) + file_format: Union[Unset, S3CopyRequestFileFormat] + if isinstance(_file_format, Unset): + file_format = UNSET + else: + file_format = S3CopyRequestFileFormat(_file_format) + + def _parse_csv_delimiter(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + csv_delimiter = _parse_csv_delimiter(d.pop("csv_delimiter", UNSET)) + + def _parse_csv_header(data: object) -> Union[None, Unset, bool]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, bool], data) + + csv_header = _parse_csv_header(d.pop("csv_header", UNSET)) + + def _parse_csv_quote(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + csv_quote = _parse_csv_quote(d.pop("csv_quote", UNSET)) + + def _parse_csv_escape(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + csv_escape = _parse_csv_escape(d.pop("csv_escape", UNSET)) + + def _parse_csv_skip(data: object) -> Union[None, Unset, int]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, int], data) + + csv_skip = _parse_csv_skip(d.pop("csv_skip", UNSET)) + + def _parse_allow_moved_paths(data: object) -> Union[None, Unset, bool]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, bool], data) + + allow_moved_paths = _parse_allow_moved_paths(d.pop("allow_moved_paths", UNSET)) + + def _parse_max_file_size_gb(data: object) -> Union[None, Unset, int]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, int], data) + + max_file_size_gb = _parse_max_file_size_gb(d.pop("max_file_size_gb", UNSET)) + + s3_copy_request = cls( + table_name=table_name, + s3_path=s3_path, + s3_access_key_id=s3_access_key_id, + s3_secret_access_key=s3_secret_access_key, + ignore_errors=ignore_errors, + extended_timeout=extended_timeout, + validate_schema=validate_schema, + source_type=source_type, + s3_session_token=s3_session_token, + s3_region=s3_region, + s3_endpoint=s3_endpoint, + s3_url_style=s3_url_style, + file_format=file_format, + csv_delimiter=csv_delimiter, + csv_header=csv_header, + csv_quote=csv_quote, + csv_escape=csv_escape, + csv_skip=csv_skip, + allow_moved_paths=allow_moved_paths, + max_file_size_gb=max_file_size_gb, + ) + + s3_copy_request.additional_properties = d + return s3_copy_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/s3_copy_request_file_format.py b/robosystems_client/models/s3_copy_request_file_format.py new file mode 100644 index 0000000..02af78a --- /dev/null +++ b/robosystems_client/models/s3_copy_request_file_format.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class S3CopyRequestFileFormat(str, Enum): + CSV = "csv" + DELTA = "delta" + ICEBERG = "iceberg" + JSON = "json" + PARQUET = "parquet" + + def __str__(self) -> str: + return str(self.value) diff --git a/robosystems_client/models/s3_copy_request_s3_url_style_type_0.py b/robosystems_client/models/s3_copy_request_s3_url_style_type_0.py new file mode 100644 index 0000000..f4f4e5c --- /dev/null +++ b/robosystems_client/models/s3_copy_request_s3_url_style_type_0.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class S3CopyRequestS3UrlStyleType0(str, Enum): + PATH = "path" + VHOST = "vhost" + + def __str__(self) -> str: + return str(self.value) diff --git a/robosystems_client/models/upgrade_subscription_request.py b/robosystems_client/models/upgrade_subscription_request.py deleted file mode 100644 index 1fc768d..0000000 --- a/robosystems_client/models/upgrade_subscription_request.py +++ /dev/null @@ -1,82 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="UpgradeSubscriptionRequest") - - -@_attrs_define -class UpgradeSubscriptionRequest: - """Request to upgrade a graph database subscription. - - Attributes: - plan_name (str): - payment_method_id (Union[None, Unset, str]): - """ - - plan_name: str - payment_method_id: Union[None, Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - plan_name = self.plan_name - - payment_method_id: Union[None, Unset, str] - if isinstance(self.payment_method_id, Unset): - payment_method_id = UNSET - else: - payment_method_id = self.payment_method_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "plan_name": plan_name, - } - ) - if payment_method_id is not UNSET: - field_dict["payment_method_id"] = payment_method_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plan_name = d.pop("plan_name") - - def _parse_payment_method_id(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - payment_method_id = _parse_payment_method_id(d.pop("payment_method_id", UNSET)) - - upgrade_subscription_request = cls( - plan_name=plan_name, - payment_method_id=payment_method_id, - ) - - upgrade_subscription_request.additional_properties = d - return upgrade_subscription_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/url_copy_request.py b/robosystems_client/models/url_copy_request.py new file mode 100644 index 0000000..b1ea1f5 --- /dev/null +++ b/robosystems_client/models/url_copy_request.py @@ -0,0 +1,157 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.url_copy_request_file_format import URLCopyRequestFileFormat +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.url_copy_request_headers_type_0 import URLCopyRequestHeadersType0 + + +T = TypeVar("T", bound="URLCopyRequest") + + +@_attrs_define +class URLCopyRequest: + """Request model for URL copy operations (future). + + Attributes: + table_name (str): Target Kuzu table name + url (str): HTTP(S) URL to the data file + file_format (URLCopyRequestFileFormat): File format of the URL data + ignore_errors (Union[Unset, bool]): Skip duplicate/invalid rows (enables upsert-like behavior) Default: True. + extended_timeout (Union[Unset, bool]): Use extended timeout for large datasets Default: False. + validate_schema (Union[Unset, bool]): Validate source schema against target table Default: True. + source_type (Union[Literal['url'], Unset]): Source type identifier Default: 'url'. + headers (Union['URLCopyRequestHeadersType0', None, Unset]): Optional HTTP headers for authentication + """ + + table_name: str + url: str + file_format: URLCopyRequestFileFormat + ignore_errors: Union[Unset, bool] = True + extended_timeout: Union[Unset, bool] = False + validate_schema: Union[Unset, bool] = True + source_type: Union[Literal["url"], Unset] = "url" + headers: Union["URLCopyRequestHeadersType0", None, Unset] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.url_copy_request_headers_type_0 import URLCopyRequestHeadersType0 + + table_name = self.table_name + + url = self.url + + file_format = self.file_format.value + + ignore_errors = self.ignore_errors + + extended_timeout = self.extended_timeout + + validate_schema = self.validate_schema + + source_type = self.source_type + + headers: Union[None, Unset, dict[str, Any]] + if isinstance(self.headers, Unset): + headers = UNSET + elif isinstance(self.headers, URLCopyRequestHeadersType0): + headers = self.headers.to_dict() + else: + headers = self.headers + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table_name": table_name, + "url": url, + "file_format": file_format, + } + ) + if ignore_errors is not UNSET: + field_dict["ignore_errors"] = ignore_errors + if extended_timeout is not UNSET: + field_dict["extended_timeout"] = extended_timeout + if validate_schema is not UNSET: + field_dict["validate_schema"] = validate_schema + if source_type is not UNSET: + field_dict["source_type"] = source_type + if headers is not UNSET: + field_dict["headers"] = headers + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.url_copy_request_headers_type_0 import URLCopyRequestHeadersType0 + + d = dict(src_dict) + table_name = d.pop("table_name") + + url = d.pop("url") + + file_format = URLCopyRequestFileFormat(d.pop("file_format")) + + ignore_errors = d.pop("ignore_errors", UNSET) + + extended_timeout = d.pop("extended_timeout", UNSET) + + validate_schema = d.pop("validate_schema", UNSET) + + source_type = cast(Union[Literal["url"], Unset], d.pop("source_type", UNSET)) + if source_type != "url" and not isinstance(source_type, Unset): + raise ValueError(f"source_type must match const 'url', got '{source_type}'") + + def _parse_headers( + data: object, + ) -> Union["URLCopyRequestHeadersType0", None, Unset]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + headers_type_0 = URLCopyRequestHeadersType0.from_dict(data) + + return headers_type_0 + except: # noqa: E722 + pass + return cast(Union["URLCopyRequestHeadersType0", None, Unset], data) + + headers = _parse_headers(d.pop("headers", UNSET)) + + url_copy_request = cls( + table_name=table_name, + url=url, + file_format=file_format, + ignore_errors=ignore_errors, + extended_timeout=extended_timeout, + validate_schema=validate_schema, + source_type=source_type, + headers=headers, + ) + + url_copy_request.additional_properties = d + return url_copy_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/robosystems_client/models/url_copy_request_file_format.py b/robosystems_client/models/url_copy_request_file_format.py new file mode 100644 index 0000000..d22e295 --- /dev/null +++ b/robosystems_client/models/url_copy_request_file_format.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class URLCopyRequestFileFormat(str, Enum): + CSV = "csv" + JSON = "json" + PARQUET = "parquet" + + def __str__(self) -> str: + return str(self.value) diff --git a/robosystems_client/models/url_copy_request_headers_type_0.py b/robosystems_client/models/url_copy_request_headers_type_0.py new file mode 100644 index 0000000..18e6dc9 --- /dev/null +++ b/robosystems_client/models/url_copy_request_headers_type_0.py @@ -0,0 +1,44 @@ +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="URLCopyRequestHeadersType0") + + +@_attrs_define +class URLCopyRequestHeadersType0: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + url_copy_request_headers_type_0 = cls() + + url_copy_request_headers_type_0.additional_properties = d + return url_copy_request_headers_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties