Skip to content

Commit 168b133

Browse files
authored
chore: regenerate SDK (graph limits trimmed to what is enforced, consolidation fields) (#266)
## Summary A regeneration from the current API. It picks up three efforts: - the graph-limits response now publishes only the limits the platform enforces; - consolidation's opening entries and the worksheet's omitted columns; - the consolidated-report wording on `create-report` (RoboFinSystems/robosystems#1878). No hand-written facade needed a change: every affected facade returns the generated models as they are, and none reads a removed field. ## Changes All generated (`api/`, `models/`), no hand-written changes: - **Graph limits:** - `GraphLimitsResponse.storage`, `.copy_operations` and `.backups` are now optional, because they are user graphs only. - Removed fields: `BackupLimits.max_backup_size_gb`, `GraphTierBackup.max_backup_size_gb`, `QueryLimits.concurrent_queries`, and `CopyOperationLimits` / `GraphTierCopyOperations` `.timeout_seconds`, `.concurrent_operations`, `.max_files_per_operation`, `.daily_copy_operations`. - Added `BackupLimits.max_downloads_per_month`. - Descriptions reworded across the limit models. - **Consolidation:** `ConsolidationProposal.opening` and `ConsolidationWorksheetResponse.omitted_periods`, both optional; reworded `posting_date`, `joined_on` / `left_on` and `omitted_periods` descriptions. - **Reports:** `create_report` and `CreateReportRequest.entity_id` describe the consolidation entity's report. ## Compatibility Generated tier, so a client minor; the removals must be named in its release notes. - **Additive:** the two consolidation fields and `max_downloads_per_month`. - **Removed and loosened (generated tier):** - The fields listed above are gone. Nothing in the stable tier or the integration template's emit path uses them. - The three limit sections are now `None` for a shared repository. - **Consumers checked:** robosystems-app, roboledger-app and roboinvestor-app read none of the removed fields. The usage page's `max_timeout_seconds` stays. ## Testing `just test-all` passes: 699 passed, 17 skipped; ruff, format, basedpyright clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
2 parents ee22858 + 2416aab commit 168b133

17 files changed

Lines changed: 189 additions & 132 deletions

‎robosystems_client/api/robo_ledger_reports/create_report.py‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ def sync_detailed(
111111
) -> Response[ErrorResponse | OperationEnvelopeReportResponse]:
112112
"""Create Report
113113
114-
Generates report facts from the ledger and marks the report as published.
114+
Generates report facts from the ledger and marks the report as published. The report is the entity's
115+
whose chart `mapping_id` maps from; made from the consolidation entity's mapping it is the group's
116+
consolidated statements: every member summed in full with the consolidating entries, under the group
117+
parent's Reporting Style. A consolidated column cannot span a member joining or leaving the group.
115118
116119
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
117120
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -165,7 +168,10 @@ def sync(
165168
) -> ErrorResponse | OperationEnvelopeReportResponse | None:
166169
"""Create Report
167170
168-
Generates report facts from the ledger and marks the report as published.
171+
Generates report facts from the ledger and marks the report as published. The report is the entity's
172+
whose chart `mapping_id` maps from; made from the consolidation entity's mapping it is the group's
173+
consolidated statements: every member summed in full with the consolidating entries, under the group
174+
parent's Reporting Style. A consolidated column cannot span a member joining or leaving the group.
169175
170176
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
171177
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -214,7 +220,10 @@ async def asyncio_detailed(
214220
) -> Response[ErrorResponse | OperationEnvelopeReportResponse]:
215221
"""Create Report
216222
217-
Generates report facts from the ledger and marks the report as published.
223+
Generates report facts from the ledger and marks the report as published. The report is the entity's
224+
whose chart `mapping_id` maps from; made from the consolidation entity's mapping it is the group's
225+
consolidated statements: every member summed in full with the consolidating entries, under the group
226+
parent's Reporting Style. A consolidated column cannot span a member joining or leaving the group.
218227
219228
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
220229
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -266,7 +275,10 @@ async def asyncio(
266275
) -> ErrorResponse | OperationEnvelopeReportResponse | None:
267276
"""Create Report
268277
269-
Generates report facts from the ledger and marks the report as published.
278+
Generates report facts from the ledger and marks the report as published. The report is the entity's
279+
whose chart `mapping_id` maps from; made from the consolidation entity's mapping it is the group's
280+
consolidated statements: every member summed in full with the consolidating entries, under the group
281+
parent's Reporting Style. A consolidated column cannot span a member joining or leaving the group.
270282
271283
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
272284
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

‎robosystems_client/models/backup_limits.py‎

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from __future__ import annotations
22

33
from collections.abc import Mapping
4-
from typing import Any, TypeVar
4+
from typing import Any, TypeVar, cast
55

66
from attrs import define as _attrs_define
77
from attrs import field as _attrs_field
88

9+
from ..types import UNSET, Unset
10+
911
T = TypeVar("T", bound="BackupLimits")
1012

1113

@@ -14,48 +16,62 @@ class BackupLimits:
1416
"""Backup operation limits.
1517
1618
Attributes:
17-
max_backup_size_gb (float): Maximum backup size in GB
1819
backup_retention_days (int): Backup retention period in days
19-
max_backups_per_day (int): Maximum backups per day
20+
max_backups_per_day (int): Maximum user-initiated backups per day (-1 for unlimited)
21+
max_downloads_per_month (int | None | Unset): Backup downloads allowed per user per calendar month (UTC)
2022
"""
2123

22-
max_backup_size_gb: float
2324
backup_retention_days: int
2425
max_backups_per_day: int
26+
max_downloads_per_month: int | None | Unset = UNSET
2527
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
2628

2729
def to_dict(self) -> dict[str, Any]:
28-
max_backup_size_gb = self.max_backup_size_gb
29-
3030
backup_retention_days = self.backup_retention_days
3131

3232
max_backups_per_day = self.max_backups_per_day
3333

34+
max_downloads_per_month: int | None | Unset
35+
if isinstance(self.max_downloads_per_month, Unset):
36+
max_downloads_per_month = UNSET
37+
else:
38+
max_downloads_per_month = self.max_downloads_per_month
39+
3440
field_dict: dict[str, Any] = {}
3541
field_dict.update(self.additional_properties)
3642
field_dict.update(
3743
{
38-
"max_backup_size_gb": max_backup_size_gb,
3944
"backup_retention_days": backup_retention_days,
4045
"max_backups_per_day": max_backups_per_day,
4146
}
4247
)
48+
if max_downloads_per_month is not UNSET:
49+
field_dict["max_downloads_per_month"] = max_downloads_per_month
4350

4451
return field_dict
4552

4653
@classmethod
4754
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
4855
d = dict(src_dict)
49-
max_backup_size_gb = d.pop("max_backup_size_gb")
50-
5156
backup_retention_days = d.pop("backup_retention_days")
5257

5358
max_backups_per_day = d.pop("max_backups_per_day")
5459

60+
def _parse_max_downloads_per_month(data: object) -> int | None | Unset:
61+
if data is None:
62+
return data
63+
if isinstance(data, Unset):
64+
return data
65+
return cast(int | None | Unset, data)
66+
67+
max_downloads_per_month = _parse_max_downloads_per_month(
68+
d.pop("max_downloads_per_month", UNSET)
69+
)
70+
5571
backup_limits = cls(
56-
max_backup_size_gb=max_backup_size_gb,
5772
backup_retention_days=backup_retention_days,
5873
max_backups_per_day=max_backups_per_day,
74+
max_downloads_per_month=max_downloads_per_month,
5975
)
6076

6177
backup_limits.additional_properties = d

‎robosystems_client/models/consolidation_proposal.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from ..models.consolidation_proposal_adjustment_kind import (
1111
ConsolidationProposalAdjustmentKind,
1212
)
13+
from ..types import UNSET, Unset
1314

1415
if TYPE_CHECKING:
1516
from ..models.consolidation_proposal_line import ConsolidationProposalLine
@@ -28,10 +29,14 @@ class ConsolidationProposal:
2829
adjustment_kind (ConsolidationProposalAdjustmentKind): What the entry adjusts.
2930
adjusts_entity_id (str): The entity whose figures the entry adjusts.
3031
adjusts_entity_name (str): That entity's name.
31-
posting_date (datetime.date): The month's last day.
32+
posting_date (datetime.date): The month's last day; for an opening, the eve of the consolidation entity's first
33+
month.
3234
memo (str): The entry's memo.
3335
basis (str): How the amounts were computed.
3436
lines (list[ConsolidationProposalLine]): The entry's lines; they balance.
37+
opening (bool | Unset): Part of the consolidation entity's opening balance: what the members' history before the
38+
group's first month already needed eliminated, so the consolidated statements open on it rather than move by it.
39+
Proposing records it, posted, replacing the earlier one until the first close. Default: False.
3540
"""
3641

3742
adjustment_kind: ConsolidationProposalAdjustmentKind
@@ -41,6 +46,7 @@ class ConsolidationProposal:
4146
memo: str
4247
basis: str
4348
lines: list[ConsolidationProposalLine]
49+
opening: bool | Unset = False
4450
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
4551

4652
def to_dict(self) -> dict[str, Any]:
@@ -61,6 +67,8 @@ def to_dict(self) -> dict[str, Any]:
6167
lines_item = lines_item_data.to_dict()
6268
lines.append(lines_item)
6369

70+
opening = self.opening
71+
6472
field_dict: dict[str, Any] = {}
6573
field_dict.update(self.additional_properties)
6674
field_dict.update(
@@ -74,6 +82,8 @@ def to_dict(self) -> dict[str, Any]:
7482
"lines": lines,
7583
}
7684
)
85+
if opening is not UNSET:
86+
field_dict["opening"] = opening
7787

7888
return field_dict
7989

@@ -101,6 +111,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
101111

102112
lines.append(lines_item)
103113

114+
opening = d.pop("opening", UNSET)
115+
104116
consolidation_proposal = cls(
105117
adjustment_kind=adjustment_kind,
106118
adjusts_entity_id=adjusts_entity_id,
@@ -109,6 +121,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
109121
memo=memo,
110122
basis=basis,
111123
lines=lines,
124+
opening=opening,
112125
)
113126

114127
consolidation_proposal.additional_properties = d

‎robosystems_client/models/consolidation_worksheet_response.py‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class ConsolidationWorksheetResponse:
3838
the sum. A member outside its membership interval for the period has no column.
3939
rows (list[WorksheetRow]): The union of every column's lines in the parent's Style order; a line zero in every
4040
column is left out.
41+
omitted_periods (list[PeriodSpec] | Unset): Windows the worksheet does not total, as live-financial-statement
42+
leaves them out: before a summed entity's books begin, or, on a cash flow or equity statement, one a member
43+
joined or left the group within. When it names `period`, `rows` is empty.
4144
validation (None | Unset | ValidationCheckResponse): The guard-rail outcome for the consolidated column, the
4245
same checks live-financial-statement runs.
4346
unmapped_entity_ids (list[str] | Unset): Entities with no CoA mapping yet, so with no column.
@@ -51,6 +54,7 @@ class ConsolidationWorksheetResponse:
5154
period: PeriodSpec
5255
columns: list[WorksheetColumn]
5356
rows: list[WorksheetRow]
57+
omitted_periods: list[PeriodSpec] | Unset = UNSET
5458
validation: None | Unset | ValidationCheckResponse = UNSET
5559
unmapped_entity_ids: list[str] | Unset = UNSET
5660
unmapped_count: int | Unset = 0
@@ -78,6 +82,13 @@ def to_dict(self) -> dict[str, Any]:
7882
rows_item = rows_item_data.to_dict()
7983
rows.append(rows_item)
8084

85+
omitted_periods: list[dict[str, Any]] | Unset = UNSET
86+
if not isinstance(self.omitted_periods, Unset):
87+
omitted_periods = []
88+
for omitted_periods_item_data in self.omitted_periods:
89+
omitted_periods_item = omitted_periods_item_data.to_dict()
90+
omitted_periods.append(omitted_periods_item)
91+
8192
validation: dict[str, Any] | None | Unset
8293
if isinstance(self.validation, Unset):
8394
validation = UNSET
@@ -106,6 +117,8 @@ def to_dict(self) -> dict[str, Any]:
106117
"rows": rows,
107118
}
108119
)
120+
if omitted_periods is not UNSET:
121+
field_dict["omitted_periods"] = omitted_periods
109122
if validation is not UNSET:
110123
field_dict["validation"] = validation
111124
if unmapped_entity_ids is not UNSET:
@@ -147,6 +160,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
147160

148161
rows.append(rows_item)
149162

163+
_omitted_periods = d.pop("omitted_periods", UNSET)
164+
omitted_periods: list[PeriodSpec] | Unset = UNSET
165+
if _omitted_periods is not UNSET:
166+
omitted_periods = []
167+
for omitted_periods_item_data in _omitted_periods:
168+
omitted_periods_item = PeriodSpec.from_dict(omitted_periods_item_data)
169+
170+
omitted_periods.append(omitted_periods_item)
171+
150172
def _parse_validation(data: object) -> None | Unset | ValidationCheckResponse:
151173
if data is None:
152174
return data
@@ -177,6 +199,7 @@ def _parse_validation(data: object) -> None | Unset | ValidationCheckResponse:
177199
period=period,
178200
columns=columns,
179201
rows=rows,
202+
omitted_periods=omitted_periods,
180203
validation=validation,
181204
unmapped_entity_ids=unmapped_entity_ids,
182205
unmapped_count=unmapped_count,

‎robosystems_client/models/copy_operation_limits.py‎

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,27 @@
1111

1212
@_attrs_define
1313
class CopyOperationLimits:
14-
"""Copy/ingestion operation limits.
14+
"""File upload limits.
1515
1616
Attributes:
17-
max_file_size_gb (float): Maximum file size in GB
18-
timeout_seconds (int): Operation timeout in seconds
19-
concurrent_operations (int): Maximum concurrent operations
20-
max_files_per_operation (int): Maximum files per operation
21-
daily_copy_operations (int): Daily operation limit
17+
max_file_size_gb (float): Maximum upload file size in GB
2218
supported_formats (list[str]): Supported file formats
2319
"""
2420

2521
max_file_size_gb: float
26-
timeout_seconds: int
27-
concurrent_operations: int
28-
max_files_per_operation: int
29-
daily_copy_operations: int
3022
supported_formats: list[str]
3123
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
3224

3325
def to_dict(self) -> dict[str, Any]:
3426
max_file_size_gb = self.max_file_size_gb
3527

36-
timeout_seconds = self.timeout_seconds
37-
38-
concurrent_operations = self.concurrent_operations
39-
40-
max_files_per_operation = self.max_files_per_operation
41-
42-
daily_copy_operations = self.daily_copy_operations
43-
4428
supported_formats = self.supported_formats
4529

4630
field_dict: dict[str, Any] = {}
4731
field_dict.update(self.additional_properties)
4832
field_dict.update(
4933
{
5034
"max_file_size_gb": max_file_size_gb,
51-
"timeout_seconds": timeout_seconds,
52-
"concurrent_operations": concurrent_operations,
53-
"max_files_per_operation": max_files_per_operation,
54-
"daily_copy_operations": daily_copy_operations,
5535
"supported_formats": supported_formats,
5636
}
5737
)
@@ -63,22 +43,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
6343
d = dict(src_dict)
6444
max_file_size_gb = d.pop("max_file_size_gb")
6545

66-
timeout_seconds = d.pop("timeout_seconds")
67-
68-
concurrent_operations = d.pop("concurrent_operations")
69-
70-
max_files_per_operation = d.pop("max_files_per_operation")
71-
72-
daily_copy_operations = d.pop("daily_copy_operations")
73-
7446
supported_formats = cast(list[str], d.pop("supported_formats"))
7547

7648
copy_operation_limits = cls(
7749
max_file_size_gb=max_file_size_gb,
78-
timeout_seconds=timeout_seconds,
79-
concurrent_operations=concurrent_operations,
80-
max_files_per_operation=max_files_per_operation,
81-
daily_copy_operations=daily_copy_operations,
8250
supported_formats=supported_formats,
8351
)
8452

‎robosystems_client/models/create_entity_request.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class CreateEntityRequest:
5959
null is a member since the beginning. The consolidated statements include it from that month. Membership is by
6060
month: a period column wider than a month that overlaps the interval is summed whole, so a member's books in
6161
this graph should hold only the months it belonged. Omit for a subsidiary formed by the parent; give the
62-
acquisition month for one acquired, whose books in this graph then hold only what follows it.
62+
acquisition month for one acquired, whose books in this graph then hold only what follows it. Refused on the
63+
consolidation entity.
6364
ticker (None | str | Unset): Short symbol, unique in the graph; it prefixes the entity's account names
6465
(`coa-<ticker>:1000`). Derived from the name's initials when omitted.
6566
uri (None | str | Unset): Canonical URL / external identifier.

‎robosystems_client/models/create_report_request.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CreateReportRequest:
4242
supplied.
4343
entity_id (None | str | Unset): The entity the report is for, by id. Omit for the entity whose chart
4444
`mapping_id` maps from (the group parent on a one-entity graph). Named alongside a mapping of another entity's
45-
chart, it is refused.
45+
chart, it is refused. The consolidation entity's report is the group's consolidated statements.
4646
taxonomy_id (str | Unset): Taxonomy that defines the structures (BS / IS / CF / Equity / Schedules) this report
4747
can render. Accepts either an exact tenant-specific taxonomy UUID or a standard name (e.g. 'rs-gaap'). Standard
4848
names resolve to the latest reporting_standard taxonomy with that name. Defaults to 'rs-gaap', the canonical

0 commit comments

Comments
 (0)