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
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _build_response(

def sync_detailed(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: RecoveryCodesRequest,
) -> Response[ErrorResponse | HTTPValidationError | RecoveryCodesResponse]:
"""Regenerate Recovery Codes
Expand Down Expand Up @@ -114,7 +114,7 @@ def sync_detailed(

def sync(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: RecoveryCodesRequest,
) -> ErrorResponse | HTTPValidationError | RecoveryCodesResponse | None:
"""Regenerate Recovery Codes
Expand All @@ -140,7 +140,7 @@ def sync(

async def asyncio_detailed(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: RecoveryCodesRequest,
) -> Response[ErrorResponse | HTTPValidationError | RecoveryCodesResponse]:
"""Regenerate Recovery Codes
Expand Down Expand Up @@ -169,7 +169,7 @@ async def asyncio_detailed(

async def asyncio(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: RecoveryCodesRequest,
) -> ErrorResponse | HTTPValidationError | RecoveryCodesResponse | None:
"""Regenerate Recovery Codes
Expand Down
8 changes: 4 additions & 4 deletions robosystems_client/api/auth_passkeys/delete_user_passkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _build_response(
def sync_detailed(
passkey_id: str,
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: PasskeyDeleteRequest,
) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]:
"""Remove Passkey
Expand Down Expand Up @@ -128,7 +128,7 @@ def sync_detailed(
def sync(
passkey_id: str,
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: PasskeyDeleteRequest,
) -> ErrorResponse | HTTPValidationError | SuccessResponse | None:
"""Remove Passkey
Expand Down Expand Up @@ -158,7 +158,7 @@ def sync(
async def asyncio_detailed(
passkey_id: str,
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: PasskeyDeleteRequest,
) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]:
"""Remove Passkey
Expand Down Expand Up @@ -191,7 +191,7 @@ async def asyncio_detailed(
async def asyncio(
passkey_id: str,
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
body: PasskeyDeleteRequest,
) -> ErrorResponse | HTTPValidationError | SuccessResponse | None:
"""Remove Passkey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _build_response(

def sync_detailed(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
) -> Response[CeremonyOptionsResponse | ErrorResponse]:
"""Re-authentication Options

Expand All @@ -87,7 +87,7 @@ def sync_detailed(

def sync(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
) -> CeremonyOptionsResponse | ErrorResponse | None:
"""Re-authentication Options

Expand All @@ -108,7 +108,7 @@ def sync(

async def asyncio_detailed(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
) -> Response[CeremonyOptionsResponse | ErrorResponse]:
"""Re-authentication Options

Expand All @@ -131,7 +131,7 @@ async def asyncio_detailed(

async def asyncio(
*,
client: AuthenticatedClient,
client: AuthenticatedClient | Client,
) -> CeremonyOptionsResponse | ErrorResponse | None:
"""Re-authentication Options

Expand Down
12 changes: 4 additions & 8 deletions robosystems_client/api/backup/get_backup_download_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def sync_detailed(
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
file; decompress it with `zstd -d`.

Args:
graph_id (str):
Expand Down Expand Up @@ -131,8 +130,7 @@ def sync(
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
file; decompress it with `zstd -d`.

Args:
graph_id (str):
Expand Down Expand Up @@ -167,8 +165,7 @@ async def asyncio_detailed(
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
file; decompress it with `zstd -d`.

Args:
graph_id (str):
Expand Down Expand Up @@ -206,8 +203,7 @@ async def asyncio(
Generate a temporary download URL for a backup. The filename carries the extension listed as
`download_extension` on the backup: `.lbug.zip` is a ZIP holding the LadybugDB database file
`{graph_id}.lbug`; `.lbug.zst` (shared repository snapshots) is a single zstd-compressed database
file. Decompress the latter with `zstd -d <file>.lbug.zst` (install zstd first: `brew install zstd`,
`apt-get install zstd`, or `dnf install zstd`) — no `--long` flag is needed.
file; decompress it with `zstd -d`.

Args:
graph_id (str):
Expand Down
23 changes: 10 additions & 13 deletions robosystems_client/clients/ledger_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@
# Map the wire flavor strings the facade accepts to the GraphQL
# ``ReportDownloadFormat`` enum names used as query variables.
_DOWNLOAD_FORMAT_ALIASES = {
"jsonld": "JSONLD",
"holon-jsonld": "HOLON_JSONLD",
"xbrl-2.1": "XBRL_2_1",
"tavi": "TAVI",
Expand Down Expand Up @@ -2271,7 +2270,7 @@ def download_report_bundle(
graph_id: str,
report_id: str,
*,
format: str = "jsonld",
format: str = "tavi",
to: str | Path | None = None,
expires_in: int = 300,
) -> ReportBundleDownload:
Expand All @@ -2280,19 +2279,18 @@ def download_report_bundle(
A download is a read, so the presigned URL is resolved through the
GraphQL ``reportDownloadUrl`` field (the REST download route was
retired). Every flavor resolves to a short-lived presigned S3 URL —
JSON-LD is stamped at publish time; XBRL, the holon and the Tavi
model are materialized + cached on first request. The client follows
the URL and pulls the bytes.
the Tavi model is stamped at publish time; the holon and XBRL are
materialized + cached on first request. The client follows the URL
and pulls the bytes.

Args:
graph_id: Graph identifier owning the Report.
report_id: Report identifier (``rpt_``-prefixed ULID).
format: Serialization flavor — ``"jsonld"`` (default, the flat
canonical bundle), ``"holon-jsonld"`` (the dataset-form
scene/boundary/projection holon), ``"xbrl-2.1"``, or
``"tavi"`` (the Project Tavi compiled model, compact JSON).
The enum names ``"JSONLD"`` / ``"HOLON_JSONLD"`` /
``"XBRL_2_1"`` / ``"TAVI"`` are also accepted.
format: Serialization flavor — ``"tavi"`` (default, the Project
Tavi compiled model stamped at publish), ``"holon-jsonld"``
(the dataset-form scene/boundary/projection holon), or
``"xbrl-2.1"``. The enum names ``"TAVI"`` /
``"HOLON_JSONLD"`` / ``"XBRL_2_1"`` are also accepted.
to: Optional file path to write the bytes to. When set, the
returned ``ReportBundleDownload.path`` points at the
written file.
Expand Down Expand Up @@ -2339,8 +2337,7 @@ def download_report_bundle(
default_ext = {
"XBRL_2_1": "zip",
"HOLON_JSONLD": "holon.jsonld",
"TAVI": "tavi.json",
}.get(gql_format, "jsonld")
}.get(gql_format, "tavi.json")
filename = (
_parse_filename(artifact.headers.get("content-disposition", ""))
or f"{report_id}-g{generation_count or 1}.{default_ext}"
Expand Down
1 change: 0 additions & 1 deletion robosystems_client/graphql/generated/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class ReportDownloadFormat(str, Enum):
JSONLD = "JSONLD"
HOLON_JSONLD = "HOLON_JSONLD"
XBRL_2_1 = "XBRL_2_1"
TAVI = "TAVI"
2 changes: 1 addition & 1 deletion robosystems_client/graphql/generated/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@
"""

GET_LEDGER_REPORT_DOWNLOAD_URL_GQL = """
query GetLedgerReportDownloadUrl($reportId: String!, $format: ReportDownloadFormat = JSONLD, $expiresIn: Int = 300) {
query GetLedgerReportDownloadUrl($reportId: String!, $format: ReportDownloadFormat = TAVI, $expiresIn: Int = 300) {
reportDownloadUrl(reportId: $reportId, format: $format, expiresIn: $expiresIn) {
downloadUrl
expiresAt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
query GetLedgerReportDownloadUrl(
$reportId: String!
$format: ReportDownloadFormat = JSONLD
$format: ReportDownloadFormat = TAVI
$expiresIn: Int = 300
) {
reportDownloadUrl(reportId: $reportId, format: $format, expiresIn: $expiresIn) {
Expand Down
37 changes: 18 additions & 19 deletions robosystems_client/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,9 @@ type Query {

The only way to download a report's bundle. Every format resolves to a
short-lived presigned S3 URL which the client follows directly — the
field returns the URL, never the bytes. JSON-LD is stamped at publish
time; XBRL is materialized and cached on first request. `expiresIn`
field returns the URL, never the bytes. The Tavi model is stamped at
publish time; the holon and XBRL are materialized and cached on first
request. `expiresIn`
is the URL's lifetime in seconds, bounded 60-3600.

Returns null when the report doesn't exist; raises
Expand All @@ -501,7 +502,7 @@ type Query {
"""The published report whose bundle to link."""
reportId: String!

"""Serialization flavor. Defaults to JSON-LD."""
"""Serialization flavor. Defaults to the Tavi model."""
format: ReportDownloadFormat = null

"""
Expand Down Expand Up @@ -2691,7 +2692,7 @@ type InformationBlockRule {
ruleSeverity: String!

"""
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.
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.
"""
ruleOrigin: String!
}
Expand Down Expand Up @@ -2820,22 +2821,20 @@ type InformationBlockVerificationCategorySummary {
}

"""
Charlie's six `type-of View` arms, surfaced at the envelope boundary.
The six `type-of` View projections of an Information Block (Rendering,
FactTable, ModelStructure, VerificationResults, ReportElements,
BusinessRules), surfaced at the envelope boundary.

Each projection is computed server-side at envelope-build time when
its source data is available. The frontend's `BlockView` dispatcher
routes to the projection component matching the user's selected view
mode; missing projections (those still in backlog) render as empty
states without breaking the dispatcher.
mode; missing projections render as empty states without breaking the
dispatcher.

Today: `rendering` is computed for the statement family, and
`chart` (the 7th arm — panel/series config over the rendering's
rows and periods) for metric blocks.
Other arms (`fact_table`, `model_structure`, `verification_results`,
`report_elements`, `business_rules`) come online as their backend
support lands; `fact_table` is trivially derivable from
`InformationBlockEnvelope.facts` and may stay as a frontend-only
projection.
`chart` (panel/series config over the rendering's rows and periods)
for metric blocks. Projections without backend support yet are empty;
`fact_table` is derivable from `InformationBlockEnvelope.facts`.
"""
type InformationBlockViewProjections {
rendering: InformationBlockRendering
Expand Down Expand Up @@ -2975,8 +2974,9 @@ type InformationBlockChartSeries {
Presigned-URL response for a published Report's serialization bundle.

Every flavor resolves to a short-lived presigned URL pointing at the
bundle in S3 — JSON-LD is stamped at publish time, XBRL is
materialized on first download and cached by `generationCount`.
bundle in S3 — the Tavi model is stamped at publish time; the holon and
XBRL 2.1 are materialized on first download and cached by
`generationCount`.
The client follows `downloadUrl` to fetch the artifact directly
from S3 (the API never streams the bytes). Mirrors the
backup-download shape the frontend already consumes.
Expand All @@ -2992,21 +2992,20 @@ type ReportBundleDownload {
contentType: String!

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

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

"""
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.
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.
"""
omittedContent: [String!]!
}

enum ReportDownloadFormat {
JSONLD
HOLON_JSONLD
XBRL_2_1
TAVI
Expand Down
4 changes: 4 additions & 0 deletions robosystems_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@
)
from .execute_event_block_request import ExecuteEventBlockRequest
from .execute_event_block_response import ExecuteEventBlockResponse
from .execute_event_block_response_qb_entry_ids_type_0 import (
ExecuteEventBlockResponseQbEntryIdsType0,
)
from .execute_event_block_response_qb_error_type_0 import (
ExecuteEventBlockResponseQbErrorType0,
)
Expand Down Expand Up @@ -1205,6 +1208,7 @@
"EventHandlerResponseTransactionTemplate",
"ExecuteEventBlockRequest",
"ExecuteEventBlockResponse",
"ExecuteEventBlockResponseQbEntryIdsType0",
"ExecuteEventBlockResponseQbErrorType0",
"ExternalConnectionConfig",
"FactLite",
Expand Down
Loading
Loading