Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion robosystems_client/api/backup/create_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
33 changes: 14 additions & 19 deletions robosystems_client/api/backup/export_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand All @@ -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

Expand Down Expand Up @@ -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]]:
Expand All @@ -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.
Expand All @@ -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,
)
Expand All @@ -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]]:
Expand All @@ -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.
Expand All @@ -140,18 +135,18 @@ def sync(

return sync_detailed(
graph_id=graph_id,
backup_id=backup_id,
client=client,
body=body,
authorization=authorization,
auth_token=auth_token,
).parsed


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]]:
Expand All @@ -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.
Expand All @@ -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,
)
Expand All @@ -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]]:
Expand All @@ -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.
Expand All @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion robosystems_client/api/backup/get_backup_download_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
20 changes: 19 additions & 1 deletion robosystems_client/api/backup/get_backup_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -80,6 +88,7 @@ def sync_detailed(

kwargs = _get_kwargs(
graph_id=graph_id,
authorization=authorization,
auth_token=auth_token,
)

Expand All @@ -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
Expand All @@ -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:
Expand All @@ -115,6 +126,7 @@ def sync(
return sync_detailed(
graph_id=graph_id,
client=client,
authorization=authorization,
auth_token=auth_token,
).parsed

Expand All @@ -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
Expand All @@ -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:
Expand All @@ -143,6 +157,7 @@ async def asyncio_detailed(

kwargs = _get_kwargs(
graph_id=graph_id,
authorization=authorization,
auth_token=auth_token,
)

Expand All @@ -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
Expand All @@ -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:
Expand All @@ -177,6 +194,7 @@ async def asyncio(
await asyncio_detailed(
graph_id=graph_id,
client=client,
authorization=authorization,
auth_token=auth_token,
)
).parsed
Loading