Skip to content

Commit dc12d30

Browse files
authored
Merge pull request #5 from RoboFinSystems/release/0.1.13
Release v0.1.13: API restructure, new copy functionality, and enhanced billing models
2 parents 6825686 + 90508c2 commit dc12d30

55 files changed

Lines changed: 1867 additions & 1803 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "robosystems-client"
3-
version = "0.1.12"
3+
version = "0.1.13"
44
description = "Python Client for RoboSystems financial graph database API"
55
readme = "README.md"
66
requires-python = ">=3.10"

robosystems_client/api/backup/create_backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _get_kwargs(
2828

2929
_kwargs: dict[str, Any] = {
3030
"method": "post",
31-
"url": f"/v1/{graph_id}/backup/create",
31+
"url": f"/v1/{graph_id}/backups",
3232
"cookies": cookies,
3333
}
3434

robosystems_client/api/backup/export_backup.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55

66
from ... import errors
77
from ...client import AuthenticatedClient, Client
8-
from ...models.backup_export_request import BackupExportRequest
98
from ...models.http_validation_error import HTTPValidationError
109
from ...types import UNSET, Response, Unset
1110

1211

1312
def _get_kwargs(
1413
graph_id: str,
14+
backup_id: str,
1515
*,
16-
body: BackupExportRequest,
1716
authorization: Union[None, Unset, str] = UNSET,
1817
auth_token: Union[None, Unset, str] = UNSET,
1918
) -> dict[str, Any]:
@@ -27,14 +26,10 @@ def _get_kwargs(
2726

2827
_kwargs: dict[str, Any] = {
2928
"method": "post",
30-
"url": f"/v1/{graph_id}/backup/export",
29+
"url": f"/v1/{graph_id}/backups/{backup_id}/export",
3130
"cookies": cookies,
3231
}
3332

34-
_kwargs["json"] = body.to_dict()
35-
36-
headers["Content-Type"] = "application/json"
37-
3833
_kwargs["headers"] = headers
3934
return _kwargs
4035

@@ -74,9 +69,9 @@ def _build_response(
7469

7570
def sync_detailed(
7671
graph_id: str,
72+
backup_id: str,
7773
*,
7874
client: AuthenticatedClient,
79-
body: BackupExportRequest,
8075
authorization: Union[None, Unset, str] = UNSET,
8176
auth_token: Union[None, Unset, str] = UNSET,
8277
) -> Response[Union[Any, HTTPValidationError]]:
@@ -86,9 +81,9 @@ def sync_detailed(
8681
8782
Args:
8883
graph_id (str): Graph database identifier
84+
backup_id (str): Backup identifier
8985
authorization (Union[None, Unset, str]):
9086
auth_token (Union[None, Unset, str]):
91-
body (BackupExportRequest): Request model for exporting a backup.
9287
9388
Raises:
9489
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(
10095

10196
kwargs = _get_kwargs(
10297
graph_id=graph_id,
103-
body=body,
98+
backup_id=backup_id,
10499
authorization=authorization,
105100
auth_token=auth_token,
106101
)
@@ -114,9 +109,9 @@ def sync_detailed(
114109

115110
def sync(
116111
graph_id: str,
112+
backup_id: str,
117113
*,
118114
client: AuthenticatedClient,
119-
body: BackupExportRequest,
120115
authorization: Union[None, Unset, str] = UNSET,
121116
auth_token: Union[None, Unset, str] = UNSET,
122117
) -> Optional[Union[Any, HTTPValidationError]]:
@@ -126,9 +121,9 @@ def sync(
126121
127122
Args:
128123
graph_id (str): Graph database identifier
124+
backup_id (str): Backup identifier
129125
authorization (Union[None, Unset, str]):
130126
auth_token (Union[None, Unset, str]):
131-
body (BackupExportRequest): Request model for exporting a backup.
132127
133128
Raises:
134129
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -140,18 +135,18 @@ def sync(
140135

141136
return sync_detailed(
142137
graph_id=graph_id,
138+
backup_id=backup_id,
143139
client=client,
144-
body=body,
145140
authorization=authorization,
146141
auth_token=auth_token,
147142
).parsed
148143

149144

150145
async def asyncio_detailed(
151146
graph_id: str,
147+
backup_id: str,
152148
*,
153149
client: AuthenticatedClient,
154-
body: BackupExportRequest,
155150
authorization: Union[None, Unset, str] = UNSET,
156151
auth_token: Union[None, Unset, str] = UNSET,
157152
) -> Response[Union[Any, HTTPValidationError]]:
@@ -161,9 +156,9 @@ async def asyncio_detailed(
161156
162157
Args:
163158
graph_id (str): Graph database identifier
159+
backup_id (str): Backup identifier
164160
authorization (Union[None, Unset, str]):
165161
auth_token (Union[None, Unset, str]):
166-
body (BackupExportRequest): Request model for exporting a backup.
167162
168163
Raises:
169164
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(
175170

176171
kwargs = _get_kwargs(
177172
graph_id=graph_id,
178-
body=body,
173+
backup_id=backup_id,
179174
authorization=authorization,
180175
auth_token=auth_token,
181176
)
@@ -187,9 +182,9 @@ async def asyncio_detailed(
187182

188183
async def asyncio(
189184
graph_id: str,
185+
backup_id: str,
190186
*,
191187
client: AuthenticatedClient,
192-
body: BackupExportRequest,
193188
authorization: Union[None, Unset, str] = UNSET,
194189
auth_token: Union[None, Unset, str] = UNSET,
195190
) -> Optional[Union[Any, HTTPValidationError]]:
@@ -199,9 +194,9 @@ async def asyncio(
199194
200195
Args:
201196
graph_id (str): Graph database identifier
197+
backup_id (str): Backup identifier
202198
authorization (Union[None, Unset, str]):
203199
auth_token (Union[None, Unset, str]):
204-
body (BackupExportRequest): Request model for exporting a backup.
205200
206201
Raises:
207202
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(
214209
return (
215210
await asyncio_detailed(
216211
graph_id=graph_id,
212+
backup_id=backup_id,
217213
client=client,
218-
body=body,
219214
authorization=authorization,
220215
auth_token=auth_token,
221216
)

robosystems_client/api/backup/get_backup_download_url.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _get_kwargs(
3636

3737
_kwargs: dict[str, Any] = {
3838
"method": "get",
39-
"url": f"/v1/{graph_id}/backup/{backup_id}/download",
39+
"url": f"/v1/{graph_id}/backups/{backup_id}/download",
4040
"params": params,
4141
"cookies": cookies,
4242
}

robosystems_client/api/backup/get_backup_stats.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@
1313
def _get_kwargs(
1414
graph_id: str,
1515
*,
16+
authorization: Union[None, Unset, str] = UNSET,
1617
auth_token: Union[None, Unset, str] = UNSET,
1718
) -> dict[str, Any]:
19+
headers: dict[str, Any] = {}
20+
if not isinstance(authorization, Unset):
21+
headers["authorization"] = authorization
22+
1823
cookies = {}
1924
if auth_token is not UNSET:
2025
cookies["auth-token"] = auth_token
2126

2227
_kwargs: dict[str, Any] = {
2328
"method": "get",
24-
"url": f"/v1/{graph_id}/backup/stats",
29+
"url": f"/v1/{graph_id}/backups/stats",
2530
"cookies": cookies,
2631
}
2732

33+
_kwargs["headers"] = headers
2834
return _kwargs
2935

3036

@@ -60,6 +66,7 @@ def sync_detailed(
6066
graph_id: str,
6167
*,
6268
client: AuthenticatedClient,
69+
authorization: Union[None, Unset, str] = UNSET,
6370
auth_token: Union[None, Unset, str] = UNSET,
6471
) -> Response[Union[BackupStatsResponse, HTTPValidationError]]:
6572
"""Get backup statistics
@@ -68,6 +75,7 @@ def sync_detailed(
6875
6976
Args:
7077
graph_id (str): Graph database identifier
78+
authorization (Union[None, Unset, str]):
7179
auth_token (Union[None, Unset, str]):
7280
7381
Raises:
@@ -80,6 +88,7 @@ def sync_detailed(
8088

8189
kwargs = _get_kwargs(
8290
graph_id=graph_id,
91+
authorization=authorization,
8392
auth_token=auth_token,
8493
)
8594

@@ -94,6 +103,7 @@ def sync(
94103
graph_id: str,
95104
*,
96105
client: AuthenticatedClient,
106+
authorization: Union[None, Unset, str] = UNSET,
97107
auth_token: Union[None, Unset, str] = UNSET,
98108
) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]:
99109
"""Get backup statistics
@@ -102,6 +112,7 @@ def sync(
102112
103113
Args:
104114
graph_id (str): Graph database identifier
115+
authorization (Union[None, Unset, str]):
105116
auth_token (Union[None, Unset, str]):
106117
107118
Raises:
@@ -115,6 +126,7 @@ def sync(
115126
return sync_detailed(
116127
graph_id=graph_id,
117128
client=client,
129+
authorization=authorization,
118130
auth_token=auth_token,
119131
).parsed
120132

@@ -123,6 +135,7 @@ async def asyncio_detailed(
123135
graph_id: str,
124136
*,
125137
client: AuthenticatedClient,
138+
authorization: Union[None, Unset, str] = UNSET,
126139
auth_token: Union[None, Unset, str] = UNSET,
127140
) -> Response[Union[BackupStatsResponse, HTTPValidationError]]:
128141
"""Get backup statistics
@@ -131,6 +144,7 @@ async def asyncio_detailed(
131144
132145
Args:
133146
graph_id (str): Graph database identifier
147+
authorization (Union[None, Unset, str]):
134148
auth_token (Union[None, Unset, str]):
135149
136150
Raises:
@@ -143,6 +157,7 @@ async def asyncio_detailed(
143157

144158
kwargs = _get_kwargs(
145159
graph_id=graph_id,
160+
authorization=authorization,
146161
auth_token=auth_token,
147162
)
148163

@@ -155,6 +170,7 @@ async def asyncio(
155170
graph_id: str,
156171
*,
157172
client: AuthenticatedClient,
173+
authorization: Union[None, Unset, str] = UNSET,
158174
auth_token: Union[None, Unset, str] = UNSET,
159175
) -> Optional[Union[BackupStatsResponse, HTTPValidationError]]:
160176
"""Get backup statistics
@@ -163,6 +179,7 @@ async def asyncio(
163179
164180
Args:
165181
graph_id (str): Graph database identifier
182+
authorization (Union[None, Unset, str]):
166183
auth_token (Union[None, Unset, str]):
167184
168185
Raises:
@@ -177,6 +194,7 @@ async def asyncio(
177194
await asyncio_detailed(
178195
graph_id=graph_id,
179196
client=client,
197+
authorization=authorization,
180198
auth_token=auth_token,
181199
)
182200
).parsed

0 commit comments

Comments
 (0)