Skip to content

Commit 4d9c933

Browse files
committed
chore(sdk): regenerate; report downloads default to the Tavi
The backend retired the flat JSON-LD download and the JSONLD value of ReportDownloadFormat; a published report's anchor is now the Tavi model. LedgerClient.download_report_bundle defaults to "tavi" and no longer accepts "jsonld", the GetLedgerReportDownloadUrl operation defaults to TAVI, and the SDK and typed GraphQL models are regenerated against the current API.
1 parent fbdfd11 commit 4d9c933

64 files changed

Lines changed: 226 additions & 148 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.

‎robosystems_client/api/auth_mfa/regenerate_mfa_recovery_codes.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def _build_response(
8383

8484
def sync_detailed(
8585
*,
86-
client: AuthenticatedClient,
86+
client: AuthenticatedClient | Client,
8787
body: RecoveryCodesRequest,
8888
) -> Response[ErrorResponse | HTTPValidationError | RecoveryCodesResponse]:
8989
"""Regenerate Recovery Codes
@@ -114,7 +114,7 @@ def sync_detailed(
114114

115115
def sync(
116116
*,
117-
client: AuthenticatedClient,
117+
client: AuthenticatedClient | Client,
118118
body: RecoveryCodesRequest,
119119
) -> ErrorResponse | HTTPValidationError | RecoveryCodesResponse | None:
120120
"""Regenerate Recovery Codes
@@ -140,7 +140,7 @@ def sync(
140140

141141
async def asyncio_detailed(
142142
*,
143-
client: AuthenticatedClient,
143+
client: AuthenticatedClient | Client,
144144
body: RecoveryCodesRequest,
145145
) -> Response[ErrorResponse | HTTPValidationError | RecoveryCodesResponse]:
146146
"""Regenerate Recovery Codes
@@ -169,7 +169,7 @@ async def asyncio_detailed(
169169

170170
async def asyncio(
171171
*,
172-
client: AuthenticatedClient,
172+
client: AuthenticatedClient | Client,
173173
body: RecoveryCodesRequest,
174174
) -> ErrorResponse | HTTPValidationError | RecoveryCodesResponse | None:
175175
"""Regenerate Recovery Codes

‎robosystems_client/api/auth_passkeys/delete_user_passkey.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _build_response(
9393
def sync_detailed(
9494
passkey_id: str,
9595
*,
96-
client: AuthenticatedClient,
96+
client: AuthenticatedClient | Client,
9797
body: PasskeyDeleteRequest,
9898
) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]:
9999
"""Remove Passkey
@@ -128,7 +128,7 @@ def sync_detailed(
128128
def sync(
129129
passkey_id: str,
130130
*,
131-
client: AuthenticatedClient,
131+
client: AuthenticatedClient | Client,
132132
body: PasskeyDeleteRequest,
133133
) -> ErrorResponse | HTTPValidationError | SuccessResponse | None:
134134
"""Remove Passkey
@@ -158,7 +158,7 @@ def sync(
158158
async def asyncio_detailed(
159159
passkey_id: str,
160160
*,
161-
client: AuthenticatedClient,
161+
client: AuthenticatedClient | Client,
162162
body: PasskeyDeleteRequest,
163163
) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]:
164164
"""Remove Passkey
@@ -191,7 +191,7 @@ async def asyncio_detailed(
191191
async def asyncio(
192192
passkey_id: str,
193193
*,
194-
client: AuthenticatedClient,
194+
client: AuthenticatedClient | Client,
195195
body: PasskeyDeleteRequest,
196196
) -> ErrorResponse | HTTPValidationError | SuccessResponse | None:
197197
"""Remove Passkey

‎robosystems_client/api/auth_passkeys/get_passkey_reauth_options.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _build_response(
6262

6363
def sync_detailed(
6464
*,
65-
client: AuthenticatedClient,
65+
client: AuthenticatedClient | Client,
6666
) -> Response[CeremonyOptionsResponse | ErrorResponse]:
6767
"""Re-authentication Options
6868
@@ -87,7 +87,7 @@ def sync_detailed(
8787

8888
def sync(
8989
*,
90-
client: AuthenticatedClient,
90+
client: AuthenticatedClient | Client,
9191
) -> CeremonyOptionsResponse | ErrorResponse | None:
9292
"""Re-authentication Options
9393
@@ -108,7 +108,7 @@ def sync(
108108

109109
async def asyncio_detailed(
110110
*,
111-
client: AuthenticatedClient,
111+
client: AuthenticatedClient | Client,
112112
) -> Response[CeremonyOptionsResponse | ErrorResponse]:
113113
"""Re-authentication Options
114114
@@ -131,7 +131,7 @@ async def asyncio_detailed(
131131

132132
async def asyncio(
133133
*,
134-
client: AuthenticatedClient,
134+
client: AuthenticatedClient | Client,
135135
) -> CeremonyOptionsResponse | ErrorResponse | None:
136136
"""Re-authentication Options
137137

‎robosystems_client/api/backup/get_backup_download_url.py‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ def sync_detailed(
9090
Generate a temporary download URL for a backup. The filename carries the extension listed as
9191
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
9292
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
93-
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
94-
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
93+
file; decompress it with `zstd -d`.
9594
9695
Args:
9796
graph_id (str):
@@ -131,8 +130,7 @@ def sync(
131130
Generate a temporary download URL for a backup. The filename carries the extension listed as
132131
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
133132
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
134-
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
135-
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
133+
file; decompress it with `zstd -d`.
136134
137135
Args:
138136
graph_id (str):
@@ -167,8 +165,7 @@ async def asyncio_detailed(
167165
Generate a temporary download URL for a backup. The filename carries the extension listed as
168166
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
169167
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
170-
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
171-
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
168+
file; decompress it with `zstd -d`.
172169
173170
Args:
174171
graph_id (str):
@@ -206,8 +203,7 @@ async def asyncio(
206203
Generate a temporary download URL for a backup. The filename carries the extension listed as
207204
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
208205
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
209-
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
210-
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
206+
file; decompress it with `zstd -d`.
211207
212208
Args:
213209
graph_id (str):

‎robosystems_client/clients/ledger_client.py‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@
556556
# Map the wire flavor strings the facade accepts to the GraphQL
557557
# ``ReportDownloadFormat`` enum names used as query variables.
558558
_DOWNLOAD_FORMAT_ALIASES = {
559-
"jsonld": "JSONLD",
560559
"holon-jsonld": "HOLON_JSONLD",
561560
"xbrl-2.1": "XBRL_2_1",
562561
"tavi": "TAVI",
@@ -2271,7 +2270,7 @@ def download_report_bundle(
22712270
graph_id: str,
22722271
report_id: str,
22732272
*,
2274-
format: str = "jsonld",
2273+
format: str = "tavi",
22752274
to: str | Path | None = None,
22762275
expires_in: int = 300,
22772276
) -> ReportBundleDownload:
@@ -2280,19 +2279,18 @@ def download_report_bundle(
22802279
A download is a read, so the presigned URL is resolved through the
22812280
GraphQL ``reportDownloadUrl`` field (the REST download route was
22822281
retired). Every flavor resolves to a short-lived presigned S3 URL —
2283-
JSON-LD is stamped at publish time; XBRL, the holon and the Tavi
2284-
model are materialized + cached on first request. The client follows
2285-
the URL and pulls the bytes.
2282+
the Tavi model is stamped at publish time; the holon and XBRL are
2283+
materialized + cached on first request. The client follows the URL
2284+
and pulls the bytes.
22862285
22872286
Args:
22882287
graph_id: Graph identifier owning the Report.
22892288
report_id: Report identifier (``rpt_``-prefixed ULID).
2290-
format: Serialization flavor — ``"jsonld"`` (default, the flat
2291-
canonical bundle), ``"holon-jsonld"`` (the dataset-form
2292-
scene/boundary/projection holon), ``"xbrl-2.1"``, or
2293-
``"tavi"`` (the Project Tavi compiled model, compact JSON).
2294-
The enum names ``"JSONLD"`` / ``"HOLON_JSONLD"`` /
2295-
``"XBRL_2_1"`` / ``"TAVI"`` are also accepted.
2289+
format: Serialization flavor — ``"tavi"`` (default, the Project
2290+
Tavi compiled model stamped at publish), ``"holon-jsonld"``
2291+
(the dataset-form scene/boundary/projection holon), or
2292+
``"xbrl-2.1"``. The enum names ``"TAVI"`` /
2293+
``"HOLON_JSONLD"`` / ``"XBRL_2_1"`` are also accepted.
22962294
to: Optional file path to write the bytes to. When set, the
22972295
returned ``ReportBundleDownload.path`` points at the
22982296
written file.
@@ -2339,8 +2337,7 @@ def download_report_bundle(
23392337
default_ext = {
23402338
"XBRL_2_1": "zip",
23412339
"HOLON_JSONLD": "holon.jsonld",
2342-
"TAVI": "tavi.json",
2343-
}.get(gql_format, "jsonld")
2340+
}.get(gql_format, "tavi.json")
23442341
filename = (
23452342
_parse_filename(artifact.headers.get("content-disposition", ""))
23462343
or f"{report_id}-g{generation_count or 1}.{default_ext}"

‎robosystems_client/graphql/generated/enums.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
class ReportDownloadFormat(str, Enum):
5-
JSONLD = "JSONLD"
65
HOLON_JSONLD = "HOLON_JSONLD"
76
XBRL_2_1 = "XBRL_2_1"
87
TAVI = "TAVI"

‎robosystems_client/graphql/generated/operations.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@
855855
"""
856856

857857
GET_LEDGER_REPORT_DOWNLOAD_URL_GQL = """
858-
query GetLedgerReportDownloadUrl($reportId: String!, $format: ReportDownloadFormat = JSONLD, $expiresIn: Int = 300) {
858+
query GetLedgerReportDownloadUrl($reportId: String!, $format: ReportDownloadFormat = TAVI, $expiresIn: Int = 300) {
859859
reportDownloadUrl(reportId: $reportId, format: $format, expiresIn: $expiresIn) {
860860
downloadUrl
861861
expiresAt

‎robosystems_client/graphql/operations/ledger/GetLedgerReportDownloadUrl.graphql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
query GetLedgerReportDownloadUrl(
22
$reportId: String!
3-
$format: ReportDownloadFormat = JSONLD
3+
$format: ReportDownloadFormat = TAVI
44
$expiresIn: Int = 300
55
) {
66
reportDownloadUrl(reportId: $reportId, format: $format, expiresIn: $expiresIn) {

‎robosystems_client/graphql/schema.graphql‎

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,9 @@ type Query {
489489
490490
The only way to download a report's bundle. Every format resolves to a
491491
short-lived presigned S3 URL which the client follows directly — the
492-
field returns the URL, never the bytes. JSON-LD is stamped at publish
493-
time; XBRL is materialized and cached on first request. `expiresIn`
492+
field returns the URL, never the bytes. The Tavi model is stamped at
493+
publish time; the holon and XBRL are materialized and cached on first
494+
request. `expiresIn`
494495
is the URL's lifetime in seconds, bounded 60-3600.
495496
496497
Returns null when the report doesn't exist; raises
@@ -501,7 +502,7 @@ type Query {
501502
"""The published report whose bundle to link."""
502503
reportId: String!
503504

504-
"""Serialization flavor. Defaults to JSON-LD."""
505+
"""Serialization flavor. Defaults to the Tavi model."""
505506
format: ReportDownloadFormat = null
506507

507508
"""
@@ -2691,7 +2692,7 @@ type InformationBlockRule {
26912692
ruleSeverity: String!
26922693

26932694
"""
2694-
Provenance — 'forked' (from an upstream artifact, e.g. Seattle Method) or 'native' (authored in this seed or by a tenant). Enum closure enforced by the `public.rules` CHECK constraint.
2695+
Provenance — 'forked' (from an upstream artifact, e.g. an external XBRL taxonomy) or 'native' (authored in this seed or by a tenant). Enum closure enforced by the `public.rules` CHECK constraint.
26952696
"""
26962697
ruleOrigin: String!
26972698
}
@@ -2820,22 +2821,20 @@ type InformationBlockVerificationCategorySummary {
28202821
}
28212822

28222823
"""
2823-
Charlie's six `type-of View` arms, surfaced at the envelope boundary.
2824+
The six `type-of` View projections of an Information Block (Rendering,
2825+
FactTable, ModelStructure, VerificationResults, ReportElements,
2826+
BusinessRules), surfaced at the envelope boundary.
28242827
28252828
Each projection is computed server-side at envelope-build time when
28262829
its source data is available. The frontend's `BlockView` dispatcher
28272830
routes to the projection component matching the user's selected view
2828-
mode; missing projections (those still in backlog) render as empty
2829-
states without breaking the dispatcher.
2831+
mode; missing projections render as empty states without breaking the
2832+
dispatcher.
28302833
28312834
Today: `rendering` is computed for the statement family, and
2832-
`chart` (the 7th arm — panel/series config over the rendering's
2833-
rows and periods) for metric blocks.
2834-
Other arms (`fact_table`, `model_structure`, `verification_results`,
2835-
`report_elements`, `business_rules`) come online as their backend
2836-
support lands; `fact_table` is trivially derivable from
2837-
`InformationBlockEnvelope.facts` and may stay as a frontend-only
2838-
projection.
2835+
`chart` (panel/series config over the rendering's rows and periods)
2836+
for metric blocks. Projections without backend support yet are empty;
2837+
`fact_table` is derivable from `InformationBlockEnvelope.facts`.
28392838
"""
28402839
type InformationBlockViewProjections {
28412840
rendering: InformationBlockRendering
@@ -2975,8 +2974,9 @@ type InformationBlockChartSeries {
29752974
Presigned-URL response for a published Report's serialization bundle.
29762975
29772976
Every flavor resolves to a short-lived presigned URL pointing at the
2978-
bundle in S3 — JSON-LD is stamped at publish time, XBRL is
2979-
materialized on first download and cached by `generationCount`.
2977+
bundle in S3 — the Tavi model is stamped at publish time; the holon and
2978+
XBRL 2.1 are materialized on first download and cached by
2979+
`generationCount`.
29802980
The client follows `downloadUrl` to fetch the artifact directly
29812981
from S3 (the API never streams the bytes). Mirrors the
29822982
backup-download shape the frontend already consumes.
@@ -2992,21 +2992,20 @@ type ReportBundleDownload {
29922992
contentType: String!
29932993

29942994
"""
2995-
Serialization flavor delivered by this URL — one of the `RdfFlavor` / `XbrlFlavor` values (e.g. `jsonld`, `xbrl-2.1`).
2995+
Serialization flavor delivered by this URL — one of the `RdfFlavor` / `XbrlFlavor` values (e.g. `tavi`, `xbrl-2.1`).
29962996
"""
29972997
format: String!
29982998

29992999
"""Bundle generation number stamped on the Report."""
30003000
generationCount: Int!
30013001

30023002
"""
3003-
Content the Report carries that this flavor does not. `disclosure_notes`: the XBRL 2.1 zip ships statements only — tenant-authored disclosure notes render on screen and ride the JSON-LD and holon flavors, but are excluded from this file. The Tavi compiled model carries the statements and notes but has no home for `ib_envelopes` (the per-Network Information Block payloads), `definition_links` (equivalence, general-special, essence-alias and mapping arcs), `reporting_style`, `framework_pins`, `fact_sets` (the FactSet partition and each fact's structure pin) or `filing_lifecycle` (filing status, supersession, share provenance); all of it rides the JSON-LD and holon flavors.
3003+
Content the Report carries that this flavor does not. `disclosure_notes`: the XBRL 2.1 zip ships statements only — tenant-authored disclosure notes render on screen and ride the Tavi and holon flavors, but are excluded from this file. The Tavi compiled model carries the statements and notes but has no home for `ib_envelopes` (the per-Network Information Block payloads), `definition_links` (equivalence, general-special, essence-alias and mapping arcs), `reporting_style`, `framework_pins`, `fact_sets` (the FactSet partition and each fact's structure pin) or `filing_lifecycle` (filing status, supersession, share provenance); all of it rides the holon flavor.
30043004
"""
30053005
omittedContent: [String!]!
30063006
}
30073007

30083008
enum ReportDownloadFormat {
3009-
JSONLD
30103009
HOLON_JSONLD
30113010
XBRL_2_1
30123011
TAVI

‎robosystems_client/models/__init__.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@
234234
)
235235
from .execute_event_block_request import ExecuteEventBlockRequest
236236
from .execute_event_block_response import ExecuteEventBlockResponse
237+
from .execute_event_block_response_qb_entry_ids_type_0 import (
238+
ExecuteEventBlockResponseQbEntryIdsType0,
239+
)
237240
from .execute_event_block_response_qb_error_type_0 import (
238241
ExecuteEventBlockResponseQbErrorType0,
239242
)
@@ -1205,6 +1208,7 @@
12051208
"EventHandlerResponseTransactionTemplate",
12061209
"ExecuteEventBlockRequest",
12071210
"ExecuteEventBlockResponse",
1211+
"ExecuteEventBlockResponseQbEntryIdsType0",
12081212
"ExecuteEventBlockResponseQbErrorType0",
12091213
"ExternalConnectionConfig",
12101214
"FactLite",

0 commit comments

Comments
 (0)