From 9f6ceb41a9c02ef513facfa2b41378079ea10cca Mon Sep 17 00:00:00 2001 From: "Joseph T. French" Date: Tue, 17 Nov 2026 02:02:51 -0600 Subject: [PATCH] fix(operator): leave unset flags out of the request; regenerate and align docs OperatorClient sent enable_rag and force_extended_analysis as null when the caller left them unset (the default), and the server types both as true/false, so a default query was refused with a 422. Unset flags are now omitted, as thread_id already was; tests pin both cases. Regenerated from the API's current descriptions, and the hand-written README and facade docstrings corrected against the server: statements take scope (consolidated is the older spelling), the chart templates include consolidation, document search is keyword-only, portfolio reads return active positions, and the graphs example uploads to a custom graph. Claude-Session: https://claude.ai/code/session_01AGZDQc4cAvYy1J8HDGLNEL --- README.md | 2 +- .../api/operator/auto_select_operator.py | 48 +++--- .../api/operator/execute_specific_operator.py | 44 +++-- .../api/operator/get_operator_metadata.py | 8 +- .../api/robo_investor/create_security.py | 28 ++-- .../preview_schedule.py | 16 +- .../compute_forecast.py | 152 +++++++++++------- .../create_information_block.py | 56 ++++--- .../delete_information_block.py | 32 ++-- .../update_information_block.py | 44 ++--- .../execute_event_block.py | 60 +++---- .../add_publish_list_members.py | 16 +- .../initialize_chart_of_accounts.py | 56 +++---- .../robo_ledger_setup/link_bank_account.py | 16 +- .../delete_mapping_association.py | 32 ++-- robosystems_client/clients/README.md | 16 +- robosystems_client/clients/document_client.py | 9 +- robosystems_client/clients/graph_client.py | 19 ++- robosystems_client/clients/investor_client.py | 12 +- robosystems_client/clients/ledger_client.py | 110 ++++++++----- robosystems_client/clients/operator_client.py | 19 ++- robosystems_client/clients/query_client.py | 8 +- robosystems_client/graphql/schema.graphql | 79 +++++---- .../add_publish_list_members_operation.py | 4 +- .../models/compute_forecast_request.py | 20 ++- .../models/create_forecast_request.py | 2 +- .../models/create_legacy_arm.py | 18 ++- .../models/delete_legacy_arm.py | 11 +- .../models/execute_event_block_request.py | 8 +- .../models/execute_event_block_response.py | 4 +- .../models/information_block_envelope.py | 25 ++- .../models/information_model_response.py | 6 +- .../models/journal_entry_line_item_input.py | 22 +-- .../models/operator_run_detail.py | 5 +- .../models/portfolio_block_envelope.py | 9 +- robosystems_client/models/position_block.py | 3 +- .../models/rendering_row_lite.py | 8 +- .../models/update_event_block_request.py | 4 +- .../models/update_legacy_arm.py | 16 +- .../models/update_security_operation.py | 4 +- robosystems_client/models/view_projections.py | 25 ++- tests/test_operator_client_ops.py | 36 +++++ 42 files changed, 645 insertions(+), 467 deletions(-) diff --git a/README.md b/README.md index e74a8b1d..67d875d8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Part of RoboSystems, the open-source knowledge graph for finance. The official P - **Type-safe API client** with full type hints and typed models - **Async client** for queries and operations -- **Parquet file uploads** for table ingestion +- **Parquet file uploads** for table ingestion into custom graphs - **Row iteration** over query results with `stream_query`, which collects the full result before yielding rows - **AI Operator** integration for natural language financial analysis - **Typed errors** for GraphQL reads and queued work diff --git a/robosystems_client/api/operator/auto_select_operator.py b/robosystems_client/api/operator/auto_select_operator.py index 2403960e..48a05eea 100644 --- a/robosystems_client/api/operator/auto_select_operator.py +++ b/robosystems_client/api/operator/auto_select_operator.py @@ -130,12 +130,12 @@ def sync_detailed( Routes to the best operator for your query. Operators: `analyst` (answers natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; supports `quick`, - `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (autonomous Chart of - Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `GET - /v1/graphs/{graph_id}/operator` lists what is registered. Credits are consumed by actual token - usage, not a fixed price per mode. The run executes on the background worker: the default answer is - 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits up to 50s and answers - 200 with the result. + `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (automatic Chart of + Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `author` makes writes, so it + is never chosen here: call it by name. `GET /v1/graphs/{graph_id}/operator` lists what is + registered. Credits are consumed by actual token usage, not a fixed price per mode. The run executes + on the background worker: the default answer is 202 with the operation's `_links` (stream, status, + cancel); `?mode=sync` waits up to 50s and answers 200 with the result. Args: graph_id (str): @@ -177,12 +177,12 @@ def sync( Routes to the best operator for your query. Operators: `analyst` (answers natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; supports `quick`, - `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (autonomous Chart of - Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `GET - /v1/graphs/{graph_id}/operator` lists what is registered. Credits are consumed by actual token - usage, not a fixed price per mode. The run executes on the background worker: the default answer is - 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits up to 50s and answers - 200 with the result. + `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (automatic Chart of + Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `author` makes writes, so it + is never chosen here: call it by name. `GET /v1/graphs/{graph_id}/operator` lists what is + registered. Credits are consumed by actual token usage, not a fixed price per mode. The run executes + on the background worker: the default answer is 202 with the operation's `_links` (stream, status, + cancel); `?mode=sync` waits up to 50s and answers 200 with the result. Args: graph_id (str): @@ -219,12 +219,12 @@ async def asyncio_detailed( Routes to the best operator for your query. Operators: `analyst` (answers natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; supports `quick`, - `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (autonomous Chart of - Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `GET - /v1/graphs/{graph_id}/operator` lists what is registered. Credits are consumed by actual token - usage, not a fixed price per mode. The run executes on the background worker: the default answer is - 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits up to 50s and answers - 200 with the result. + `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (automatic Chart of + Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `author` makes writes, so it + is never chosen here: call it by name. `GET /v1/graphs/{graph_id}/operator` lists what is + registered. Credits are consumed by actual token usage, not a fixed price per mode. The run executes + on the background worker: the default answer is 202 with the operation's `_links` (stream, status, + cancel); `?mode=sync` waits up to 50s and answers 200 with the result. Args: graph_id (str): @@ -264,12 +264,12 @@ async def asyncio( Routes to the best operator for your query. Operators: `analyst` (answers natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; supports `quick`, - `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (autonomous Chart of - Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `GET - /v1/graphs/{graph_id}/operator` lists what is registered. Credits are consumed by actual token - usage, not a fixed price per mode. The run executes on the background worker: the default answer is - 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits up to 50s and answers - 200 with the result. + `standard`, `extended`; `cypher` is accepted as its former name) and `mapping` (automatic Chart of + Accounts → rs-gaap mapping; roboledger graphs only, `extended` only). `author` makes writes, so it + is never chosen here: call it by name. `GET /v1/graphs/{graph_id}/operator` lists what is + registered. Credits are consumed by actual token usage, not a fixed price per mode. The run executes + on the background worker: the default answer is 202 with the operation's `_links` (stream, status, + cancel); `?mode=sync` waits up to 50s and answers 200 with the result. Args: graph_id (str): diff --git a/robosystems_client/api/operator/execute_specific_operator.py b/robosystems_client/api/operator/execute_specific_operator.py index 227a9138..97e104bc 100644 --- a/robosystems_client/api/operator/execute_specific_operator.py +++ b/robosystems_client/api/operator/execute_specific_operator.py @@ -133,10 +133,13 @@ def sync_detailed( Available: `analyst` (natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; RAG retrieval is one of its capabilities, not a separate - operator; `cypher` is accepted as its former name) and `mapping` (Chart of Accounts → rs-gaap - mapping, roboledger graphs only). `GET /v1/graphs/{graph_id}/operator` lists what is registered. The - run executes on the background worker: the default answer is 202 with the operation's `_links` - (stream, status, cancel); `?mode=sync` waits up to 50s and answers 200 with the result. + operator; `cypher` is accepted as its former name), `mapping` (Chart of Accounts → rs-gaap mapping, + roboledger graphs only) and `author` (makes the change a request asks for, such as metric and + forecast blocks, counterparties, memories, draft reports and inbox classifications, through writes + that are reversible or wait on a person's step; needs write access to the graph). `GET + /v1/graphs/{graph_id}/operator` lists what is registered. The run executes on the background worker: + the default answer is 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits + up to 50s and answers 200 with the result. Args: graph_id (str): @@ -181,10 +184,13 @@ def sync( Available: `analyst` (natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; RAG retrieval is one of its capabilities, not a separate - operator; `cypher` is accepted as its former name) and `mapping` (Chart of Accounts → rs-gaap - mapping, roboledger graphs only). `GET /v1/graphs/{graph_id}/operator` lists what is registered. The - run executes on the background worker: the default answer is 202 with the operation's `_links` - (stream, status, cancel); `?mode=sync` waits up to 50s and answers 200 with the result. + operator; `cypher` is accepted as its former name), `mapping` (Chart of Accounts → rs-gaap mapping, + roboledger graphs only) and `author` (makes the change a request asks for, such as metric and + forecast blocks, counterparties, memories, draft reports and inbox classifications, through writes + that are reversible or wait on a person's step; needs write access to the graph). `GET + /v1/graphs/{graph_id}/operator` lists what is registered. The run executes on the background worker: + the default answer is 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits + up to 50s and answers 200 with the result. Args: graph_id (str): @@ -224,10 +230,13 @@ async def asyncio_detailed( Available: `analyst` (natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; RAG retrieval is one of its capabilities, not a separate - operator; `cypher` is accepted as its former name) and `mapping` (Chart of Accounts → rs-gaap - mapping, roboledger graphs only). `GET /v1/graphs/{graph_id}/operator` lists what is registered. The - run executes on the background worker: the default answer is 202 with the operation's `_links` - (stream, status, cancel); `?mode=sync` waits up to 50s and answers 200 with the result. + operator; `cypher` is accepted as its former name), `mapping` (Chart of Accounts → rs-gaap mapping, + roboledger graphs only) and `author` (makes the change a request asks for, such as metric and + forecast blocks, counterparties, memories, draft reports and inbox classifications, through writes + that are reversible or wait on a person's step; needs write access to the graph). `GET + /v1/graphs/{graph_id}/operator` lists what is registered. The run executes on the background worker: + the default answer is 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits + up to 50s and answers 200 with the result. Args: graph_id (str): @@ -270,10 +279,13 @@ async def asyncio( Available: `analyst` (natural-language questions over the graph — curated financial reads, documents, memory, and read-only Cypher; RAG retrieval is one of its capabilities, not a separate - operator; `cypher` is accepted as its former name) and `mapping` (Chart of Accounts → rs-gaap - mapping, roboledger graphs only). `GET /v1/graphs/{graph_id}/operator` lists what is registered. The - run executes on the background worker: the default answer is 202 with the operation's `_links` - (stream, status, cancel); `?mode=sync` waits up to 50s and answers 200 with the result. + operator; `cypher` is accepted as its former name), `mapping` (Chart of Accounts → rs-gaap mapping, + roboledger graphs only) and `author` (makes the change a request asks for, such as metric and + forecast blocks, counterparties, memories, draft reports and inbox classifications, through writes + that are reversible or wait on a person's step; needs write access to the graph). `GET + /v1/graphs/{graph_id}/operator` lists what is registered. The run executes on the background worker: + the default answer is 202 with the operation's `_links` (stream, status, cancel); `?mode=sync` waits + up to 50s and answers 200 with the result. Args: graph_id (str): diff --git a/robosystems_client/api/operator/get_operator_metadata.py b/robosystems_client/api/operator/get_operator_metadata.py index d1f82570..089066b0 100644 --- a/robosystems_client/api/operator/get_operator_metadata.py +++ b/robosystems_client/api/operator/get_operator_metadata.py @@ -98,7 +98,7 @@ def sync_detailed( Args: graph_id (str): - operator_type (str): Operator type identifier (e.g., 'analyst', 'mapping') + operator_type (str): Operator type identifier: 'analyst', 'mapping' or 'author' Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -130,7 +130,7 @@ def sync( Args: graph_id (str): - operator_type (str): Operator type identifier (e.g., 'analyst', 'mapping') + operator_type (str): Operator type identifier: 'analyst', 'mapping' or 'author' Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -157,7 +157,7 @@ async def asyncio_detailed( Args: graph_id (str): - operator_type (str): Operator type identifier (e.g., 'analyst', 'mapping') + operator_type (str): Operator type identifier: 'analyst', 'mapping' or 'author' Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,7 +187,7 @@ async def asyncio( Args: graph_id (str): - operator_type (str): Operator type identifier (e.g., 'analyst', 'mapping') + operator_type (str): Operator type identifier: 'analyst', 'mapping' or 'author' Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/api/robo_investor/create_security.py b/robosystems_client/api/robo_investor/create_security.py index 086aa1e8..9c05c7f1 100644 --- a/robosystems_client/api/robo_investor/create_security.py +++ b/robosystems_client/api/robo_investor/create_security.py @@ -113,9 +113,10 @@ def sync_detailed( ) -> Response[ErrorResponse | OperationEnvelopeSecurityResponse]: """Create Security - Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this - graph's entity. Optionally cross-links to an issuing entity in another graph via `source_graph_id` - for mutual-handshake attribution. + Register a security (common stock, preferred stock, warrant, convertible note, etc.) in this graph's + registry. Its `entity_id` is the issuer, not the holder; a portfolio's `entity_id` is the owner. + Optionally cross-links to the issuer's own graph via `source_graph_id` for mutual-handshake + attribution. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -160,9 +161,10 @@ def sync( ) -> ErrorResponse | OperationEnvelopeSecurityResponse | None: """Create Security - Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this - graph's entity. Optionally cross-links to an issuing entity in another graph via `source_graph_id` - for mutual-handshake attribution. + Register a security (common stock, preferred stock, warrant, convertible note, etc.) in this graph's + registry. Its `entity_id` is the issuer, not the holder; a portfolio's `entity_id` is the owner. + Optionally cross-links to the issuer's own graph via `source_graph_id` for mutual-handshake + attribution. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -202,9 +204,10 @@ async def asyncio_detailed( ) -> Response[ErrorResponse | OperationEnvelopeSecurityResponse]: """Create Security - Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this - graph's entity. Optionally cross-links to an issuing entity in another graph via `source_graph_id` - for mutual-handshake attribution. + Register a security (common stock, preferred stock, warrant, convertible note, etc.) in this graph's + registry. Its `entity_id` is the issuer, not the holder; a portfolio's `entity_id` is the owner. + Optionally cross-links to the issuer's own graph via `source_graph_id` for mutual-handshake + attribution. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -247,9 +250,10 @@ async def asyncio( ) -> ErrorResponse | OperationEnvelopeSecurityResponse | None: """Create Security - Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this - graph's entity. Optionally cross-links to an issuing entity in another graph via `source_graph_id` - for mutual-handshake attribution. + Register a security (common stock, preferred stock, warrant, convertible note, etc.) in this graph's + registry. Its `entity_id` is the issuer, not the holder; a portfolio's `entity_id` is the owner. + Optionally cross-links to the issuer's own graph via `source_graph_id` for mutual-handshake + attribution. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. diff --git a/robosystems_client/api/robo_ledger_fiscal_close/preview_schedule.py b/robosystems_client/api/robo_ledger_fiscal_close/preview_schedule.py index c0645c3a..f7a737bb 100644 --- a/robosystems_client/api/robo_ledger_fiscal_close/preview_schedule.py +++ b/robosystems_client/api/robo_ledger_fiscal_close/preview_schedule.py @@ -122,8 +122,8 @@ def sync_detailed( should fall, legs that do not balance) is refused here with the period that breaks. `warnings` names any active schedule already posting the same accounts in the same months. With `replaces_structure_id`, `replaces` says what the schedule being edited or recreated has posted, by - month, and the path the change takes: `rebuild` (rebuild-schedule with the new definition) while - nothing has posted, `terminate_and_succeed` after. + month, and the path the change takes: `rebuild` (the schedule regenerated in place from the new + definition) while nothing has posted, `terminate_and_succeed` after. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -172,8 +172,8 @@ def sync( should fall, legs that do not balance) is refused here with the period that breaks. `warnings` names any active schedule already posting the same accounts in the same months. With `replaces_structure_id`, `replaces` says what the schedule being edited or recreated has posted, by - month, and the path the change takes: `rebuild` (rebuild-schedule with the new definition) while - nothing has posted, `terminate_and_succeed` after. + month, and the path the change takes: `rebuild` (the schedule regenerated in place from the new + definition) while nothing has posted, `terminate_and_succeed` after. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -217,8 +217,8 @@ async def asyncio_detailed( should fall, legs that do not balance) is refused here with the period that breaks. `warnings` names any active schedule already posting the same accounts in the same months. With `replaces_structure_id`, `replaces` says what the schedule being edited or recreated has posted, by - month, and the path the change takes: `rebuild` (rebuild-schedule with the new definition) while - nothing has posted, `terminate_and_succeed` after. + month, and the path the change takes: `rebuild` (the schedule regenerated in place from the new + definition) while nothing has posted, `terminate_and_succeed` after. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -265,8 +265,8 @@ async def asyncio( should fall, legs that do not balance) is refused here with the period that breaks. `warnings` names any active schedule already posting the same accounts in the same months. With `replaces_structure_id`, `replaces` says what the schedule being edited or recreated has posted, by - month, and the path the change takes: `rebuild` (rebuild-schedule with the new definition) while - nothing has posted, `terminate_and_succeed` after. + month, and the path the change takes: `rebuild` (the schedule regenerated in place from the new + definition) while nothing has posted, `terminate_and_succeed` after. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. diff --git a/robosystems_client/api/robo_ledger_information_blocks/compute_forecast.py b/robosystems_client/api/robo_ledger_information_blocks/compute_forecast.py index 117a1d49..02538b85 100644 --- a/robosystems_client/api/robo_ledger_information_blocks/compute_forecast.py +++ b/robosystems_client/api/robo_ledger_information_blocks/compute_forecast.py @@ -113,13 +113,17 @@ def sync_detailed( ) -> Response[ErrorResponse | OperationEnvelopeComputeForecastResponse]: """Compute Forecast for a Forecast Block - Walks a forecast block's driver cascade month-by-month forward from its base period: lever-driven - rs-driver Derive rules in dependency order, carry-forward for unmodeled income-statement lines, - calc-DAG subtotals — upserting one scenario income-statement FactSet (plus a working-capital - balance-sheet set) per forward month, all keyed by the block's scenario_id (NULL = actuals; scenario - reads pass it as a filter). Re-running replaces each month's values. Rules with missing lever months - or unbound operands are skipped with a reason (their targets fall back to carry-forward), never - errored. Deterministic and non-AI — no credits consumed. + Walks a forecast block's driver cascade month-by-month forward from its anchor (with + base_anchor='seam', the default, the newest closed month inside the horizon; with 'fixed', the + block's base_period): lever-driven rs-driver Derive rules in dependency order, carry-forward for + unmodeled income-statement lines, calc-DAG subtotals — upserting per forward month a scenario + income-statement FactSet, a balance-sheet set (the full roll when the anchor month has an actual + balance sheet, else only the rule-driven working-capital instants) and a derived cash-flow set when + an actual one exists, all keyed by the block's scenario_id (NULL = actuals; scenario reads pass it + as a filter). Re-running replaces each month's values. Rules with missing lever months or unbound + operands are skipped with a reason (their targets fall back to carry-forward). Each month's sets are + verified; a month that fails halts the walk there (halted_at), since every later month would be + derived from it. Deterministic and non-AI — no credits consumed. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -129,14 +133,18 @@ def sync_detailed( idempotency_key (None | str | Unset): body (ComputeForecastRequest): Request body for the `compute-forecast` operation. - Walks the scenario's driver cascade month-by-month forward from the - forecast block's `base_period`: lever-driven Derive rules in - dependency order, carry-forward for unmodeled IS lines, calc-DAG - subtotals — upserting one scenario IS FactSet (+ a working-capital BS - set) per forward month, all keyed by the forecast block's - `scenario_id`. Re-running replaces each month's values (the - compute-metrics drift semantics). Deterministic and non-AI — no - credits consumed. + Walks the scenario's driver cascade month-by-month forward from its + anchor — the newest closed month inside the horizon under + `base_anchor='seam'` (the default), the block's `base_period` under + `'fixed'`: lever-driven Derive rules in dependency order, carry-forward + for unmodeled IS lines, calc-DAG subtotals — upserting per forward + month a scenario IS FactSet, a BS set (the full roll when the anchor + month has an actual balance sheet, else the rule-driven working-capital + instants) and a derived CF set when an actual one exists, all keyed by + the forecast block's `scenario_id`. Re-running replaces each month's + values (the compute-metrics drift semantics). A month that fails + verification halts the walk (`halted_at`). Deterministic and non-AI — + no credits consumed. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,13 +176,17 @@ def sync( ) -> ErrorResponse | OperationEnvelopeComputeForecastResponse | None: """Compute Forecast for a Forecast Block - Walks a forecast block's driver cascade month-by-month forward from its base period: lever-driven - rs-driver Derive rules in dependency order, carry-forward for unmodeled income-statement lines, - calc-DAG subtotals — upserting one scenario income-statement FactSet (plus a working-capital - balance-sheet set) per forward month, all keyed by the block's scenario_id (NULL = actuals; scenario - reads pass it as a filter). Re-running replaces each month's values. Rules with missing lever months - or unbound operands are skipped with a reason (their targets fall back to carry-forward), never - errored. Deterministic and non-AI — no credits consumed. + Walks a forecast block's driver cascade month-by-month forward from its anchor (with + base_anchor='seam', the default, the newest closed month inside the horizon; with 'fixed', the + block's base_period): lever-driven rs-driver Derive rules in dependency order, carry-forward for + unmodeled income-statement lines, calc-DAG subtotals — upserting per forward month a scenario + income-statement FactSet, a balance-sheet set (the full roll when the anchor month has an actual + balance sheet, else only the rule-driven working-capital instants) and a derived cash-flow set when + an actual one exists, all keyed by the block's scenario_id (NULL = actuals; scenario reads pass it + as a filter). Re-running replaces each month's values. Rules with missing lever months or unbound + operands are skipped with a reason (their targets fall back to carry-forward). Each month's sets are + verified; a month that fails halts the walk there (halted_at), since every later month would be + derived from it. Deterministic and non-AI — no credits consumed. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -184,14 +196,18 @@ def sync( idempotency_key (None | str | Unset): body (ComputeForecastRequest): Request body for the `compute-forecast` operation. - Walks the scenario's driver cascade month-by-month forward from the - forecast block's `base_period`: lever-driven Derive rules in - dependency order, carry-forward for unmodeled IS lines, calc-DAG - subtotals — upserting one scenario IS FactSet (+ a working-capital BS - set) per forward month, all keyed by the forecast block's - `scenario_id`. Re-running replaces each month's values (the - compute-metrics drift semantics). Deterministic and non-AI — no - credits consumed. + Walks the scenario's driver cascade month-by-month forward from its + anchor — the newest closed month inside the horizon under + `base_anchor='seam'` (the default), the block's `base_period` under + `'fixed'`: lever-driven Derive rules in dependency order, carry-forward + for unmodeled IS lines, calc-DAG subtotals — upserting per forward + month a scenario IS FactSet, a BS set (the full roll when the anchor + month has an actual balance sheet, else the rule-driven working-capital + instants) and a derived CF set when an actual one exists, all keyed by + the forecast block's `scenario_id`. Re-running replaces each month's + values (the compute-metrics drift semantics). A month that fails + verification halts the walk (`halted_at`). Deterministic and non-AI — + no credits consumed. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -218,13 +234,17 @@ async def asyncio_detailed( ) -> Response[ErrorResponse | OperationEnvelopeComputeForecastResponse]: """Compute Forecast for a Forecast Block - Walks a forecast block's driver cascade month-by-month forward from its base period: lever-driven - rs-driver Derive rules in dependency order, carry-forward for unmodeled income-statement lines, - calc-DAG subtotals — upserting one scenario income-statement FactSet (plus a working-capital - balance-sheet set) per forward month, all keyed by the block's scenario_id (NULL = actuals; scenario - reads pass it as a filter). Re-running replaces each month's values. Rules with missing lever months - or unbound operands are skipped with a reason (their targets fall back to carry-forward), never - errored. Deterministic and non-AI — no credits consumed. + Walks a forecast block's driver cascade month-by-month forward from its anchor (with + base_anchor='seam', the default, the newest closed month inside the horizon; with 'fixed', the + block's base_period): lever-driven rs-driver Derive rules in dependency order, carry-forward for + unmodeled income-statement lines, calc-DAG subtotals — upserting per forward month a scenario + income-statement FactSet, a balance-sheet set (the full roll when the anchor month has an actual + balance sheet, else only the rule-driven working-capital instants) and a derived cash-flow set when + an actual one exists, all keyed by the block's scenario_id (NULL = actuals; scenario reads pass it + as a filter). Re-running replaces each month's values. Rules with missing lever months or unbound + operands are skipped with a reason (their targets fall back to carry-forward). Each month's sets are + verified; a month that fails halts the walk there (halted_at), since every later month would be + derived from it. Deterministic and non-AI — no credits consumed. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -234,14 +254,18 @@ async def asyncio_detailed( idempotency_key (None | str | Unset): body (ComputeForecastRequest): Request body for the `compute-forecast` operation. - Walks the scenario's driver cascade month-by-month forward from the - forecast block's `base_period`: lever-driven Derive rules in - dependency order, carry-forward for unmodeled IS lines, calc-DAG - subtotals — upserting one scenario IS FactSet (+ a working-capital BS - set) per forward month, all keyed by the forecast block's - `scenario_id`. Re-running replaces each month's values (the - compute-metrics drift semantics). Deterministic and non-AI — no - credits consumed. + Walks the scenario's driver cascade month-by-month forward from its + anchor — the newest closed month inside the horizon under + `base_anchor='seam'` (the default), the block's `base_period` under + `'fixed'`: lever-driven Derive rules in dependency order, carry-forward + for unmodeled IS lines, calc-DAG subtotals — upserting per forward + month a scenario IS FactSet, a BS set (the full roll when the anchor + month has an actual balance sheet, else the rule-driven working-capital + instants) and a derived CF set when an actual one exists, all keyed by + the forecast block's `scenario_id`. Re-running replaces each month's + values (the compute-metrics drift semantics). A month that fails + verification halts the walk (`halted_at`). Deterministic and non-AI — + no credits consumed. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -271,13 +295,17 @@ async def asyncio( ) -> ErrorResponse | OperationEnvelopeComputeForecastResponse | None: """Compute Forecast for a Forecast Block - Walks a forecast block's driver cascade month-by-month forward from its base period: lever-driven - rs-driver Derive rules in dependency order, carry-forward for unmodeled income-statement lines, - calc-DAG subtotals — upserting one scenario income-statement FactSet (plus a working-capital - balance-sheet set) per forward month, all keyed by the block's scenario_id (NULL = actuals; scenario - reads pass it as a filter). Re-running replaces each month's values. Rules with missing lever months - or unbound operands are skipped with a reason (their targets fall back to carry-forward), never - errored. Deterministic and non-AI — no credits consumed. + Walks a forecast block's driver cascade month-by-month forward from its anchor (with + base_anchor='seam', the default, the newest closed month inside the horizon; with 'fixed', the + block's base_period): lever-driven rs-driver Derive rules in dependency order, carry-forward for + unmodeled income-statement lines, calc-DAG subtotals — upserting per forward month a scenario + income-statement FactSet, a balance-sheet set (the full roll when the anchor month has an actual + balance sheet, else only the rule-driven working-capital instants) and a derived cash-flow set when + an actual one exists, all keyed by the block's scenario_id (NULL = actuals; scenario reads pass it + as a filter). Re-running replaces each month's values. Rules with missing lever months or unbound + operands are skipped with a reason (their targets fall back to carry-forward). Each month's sets are + verified; a month that fails halts the walk there (halted_at), since every later month would be + derived from it. Deterministic and non-AI — no credits consumed. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -287,14 +315,18 @@ async def asyncio( idempotency_key (None | str | Unset): body (ComputeForecastRequest): Request body for the `compute-forecast` operation. - Walks the scenario's driver cascade month-by-month forward from the - forecast block's `base_period`: lever-driven Derive rules in - dependency order, carry-forward for unmodeled IS lines, calc-DAG - subtotals — upserting one scenario IS FactSet (+ a working-capital BS - set) per forward month, all keyed by the forecast block's - `scenario_id`. Re-running replaces each month's values (the - compute-metrics drift semantics). Deterministic and non-AI — no - credits consumed. + Walks the scenario's driver cascade month-by-month forward from its + anchor — the newest closed month inside the horizon under + `base_anchor='seam'` (the default), the block's `base_period` under + `'fixed'`: lever-driven Derive rules in dependency order, carry-forward + for unmodeled IS lines, calc-DAG subtotals — upserting per forward + month a scenario IS FactSet, a BS set (the full roll when the anchor + month has an actual balance sheet, else the rule-driven working-capital + instants) and a derived CF set when an actual one exists, all keyed by + the forecast block's `scenario_id`. Re-running replaces each month's + values (the compute-metrics drift semantics). A month that fails + verification halts the walk (`halted_at`). Deterministic and non-AI — + no credits consumed. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/api/robo_ledger_information_blocks/create_information_block.py b/robosystems_client/api/robo_ledger_information_blocks/create_information_block.py index a9fe6f6b..649c8b28 100644 --- a/robosystems_client/api/robo_ledger_information_blocks/create_information_block.py +++ b/robosystems_client/api/robo_ledger_information_blocks/create_information_block.py @@ -121,8 +121,9 @@ def sync_detailed( """Create Information Block Generic Information Block construction entry. `block_type` selects the registered block type; - `payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the - existing Schedule machinery; statement block types raise 501 (use create-report instead). Authoring + `payload` is validated against that type's creation schema at dispatch. Only schedule and forecast + are constructed here; the other block types raise 501 with a hint naming their own operation + (statements: create-report; disclosure and metric structures: create-taxonomy-block). Authoring schedules for a close? Call `get-close-playbook` (mode='initiate') first — one schedule is a single debit/credit element pair, so multi-line entries become multiple schedules, and element ids must be real (discover via get-graph-schema / get-unmapped-elements / suggest-mapping). @@ -136,10 +137,11 @@ def sync_detailed( body (CreateForecastArm | CreateLegacyArm | CreateScheduleArm): Create an Information Block. The body is a discriminated union on `block_type`: pick the arm matching the block type you want to - create. The schedule arm carries a fully typed payload; statement - and metric arms accept an untyped payload but currently return HTTP - 501 (statements are constructed via `create-report`; metric - construction is pending). + create. The schedule and forecast arms carry fully typed payloads; + the remaining arms accept an untyped payload and return HTTP 501 + with a hint naming the operation that constructs them (statements + via `create-report`, disclosure and metric structures via + `create-taxonomy-block`). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,8 +174,9 @@ def sync( """Create Information Block Generic Information Block construction entry. `block_type` selects the registered block type; - `payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the - existing Schedule machinery; statement block types raise 501 (use create-report instead). Authoring + `payload` is validated against that type's creation schema at dispatch. Only schedule and forecast + are constructed here; the other block types raise 501 with a hint naming their own operation + (statements: create-report; disclosure and metric structures: create-taxonomy-block). Authoring schedules for a close? Call `get-close-playbook` (mode='initiate') first — one schedule is a single debit/credit element pair, so multi-line entries become multiple schedules, and element ids must be real (discover via get-graph-schema / get-unmapped-elements / suggest-mapping). @@ -187,10 +190,11 @@ def sync( body (CreateForecastArm | CreateLegacyArm | CreateScheduleArm): Create an Information Block. The body is a discriminated union on `block_type`: pick the arm matching the block type you want to - create. The schedule arm carries a fully typed payload; statement - and metric arms accept an untyped payload but currently return HTTP - 501 (statements are constructed via `create-report`; metric - construction is pending). + create. The schedule and forecast arms carry fully typed payloads; + the remaining arms accept an untyped payload and return HTTP 501 + with a hint naming the operation that constructs them (statements + via `create-report`, disclosure and metric structures via + `create-taxonomy-block`). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -218,8 +222,9 @@ async def asyncio_detailed( """Create Information Block Generic Information Block construction entry. `block_type` selects the registered block type; - `payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the - existing Schedule machinery; statement block types raise 501 (use create-report instead). Authoring + `payload` is validated against that type's creation schema at dispatch. Only schedule and forecast + are constructed here; the other block types raise 501 with a hint naming their own operation + (statements: create-report; disclosure and metric structures: create-taxonomy-block). Authoring schedules for a close? Call `get-close-playbook` (mode='initiate') first — one schedule is a single debit/credit element pair, so multi-line entries become multiple schedules, and element ids must be real (discover via get-graph-schema / get-unmapped-elements / suggest-mapping). @@ -233,10 +238,11 @@ async def asyncio_detailed( body (CreateForecastArm | CreateLegacyArm | CreateScheduleArm): Create an Information Block. The body is a discriminated union on `block_type`: pick the arm matching the block type you want to - create. The schedule arm carries a fully typed payload; statement - and metric arms accept an untyped payload but currently return HTTP - 501 (statements are constructed via `create-report`; metric - construction is pending). + create. The schedule and forecast arms carry fully typed payloads; + the remaining arms accept an untyped payload and return HTTP 501 + with a hint naming the operation that constructs them (statements + via `create-report`, disclosure and metric structures via + `create-taxonomy-block`). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -267,8 +273,9 @@ async def asyncio( """Create Information Block Generic Information Block construction entry. `block_type` selects the registered block type; - `payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the - existing Schedule machinery; statement block types raise 501 (use create-report instead). Authoring + `payload` is validated against that type's creation schema at dispatch. Only schedule and forecast + are constructed here; the other block types raise 501 with a hint naming their own operation + (statements: create-report; disclosure and metric structures: create-taxonomy-block). Authoring schedules for a close? Call `get-close-playbook` (mode='initiate') first — one schedule is a single debit/credit element pair, so multi-line entries become multiple schedules, and element ids must be real (discover via get-graph-schema / get-unmapped-elements / suggest-mapping). @@ -282,10 +289,11 @@ async def asyncio( body (CreateForecastArm | CreateLegacyArm | CreateScheduleArm): Create an Information Block. The body is a discriminated union on `block_type`: pick the arm matching the block type you want to - create. The schedule arm carries a fully typed payload; statement - and metric arms accept an untyped payload but currently return HTTP - 501 (statements are constructed via `create-report`; metric - construction is pending). + create. The schedule and forecast arms carry fully typed payloads; + the remaining arms accept an untyped payload and return HTTP 501 + with a hint naming the operation that constructs them (statements + via `create-report`, disclosure and metric structures via + `create-taxonomy-block`). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/api/robo_ledger_information_blocks/delete_information_block.py b/robosystems_client/api/robo_ledger_information_blocks/delete_information_block.py index 42d08aeb..bf12b09d 100644 --- a/robosystems_client/api/robo_ledger_information_blocks/delete_information_block.py +++ b/robosystems_client/api/robo_ledger_information_blocks/delete_information_block.py @@ -123,8 +123,8 @@ def sync_detailed( """Delete Information Block Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id / - block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and - surface 501. + block_type / name). Only schedule and forecast blocks delete here; statement, disclosure, metric and + reconciliation blocks surface 501 with a hint naming the operation that manages them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -135,8 +135,8 @@ def sync_detailed( body (DeleteForecastArm | DeleteLegacyArm | DeleteScheduleArm): Delete an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed delete payload; statement and metric arms - return HTTP 501. + and forecast arms carry fully typed delete payloads; the remaining + arms return HTTP 501. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,8 +169,8 @@ def sync( """Delete Information Block Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id / - block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and - surface 501. + block_type / name). Only schedule and forecast blocks delete here; statement, disclosure, metric and + reconciliation blocks surface 501 with a hint naming the operation that manages them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -181,8 +181,8 @@ def sync( body (DeleteForecastArm | DeleteLegacyArm | DeleteScheduleArm): Delete an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed delete payload; statement and metric arms - return HTTP 501. + and forecast arms carry fully typed delete payloads; the remaining + arms return HTTP 501. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -210,8 +210,8 @@ async def asyncio_detailed( """Delete Information Block Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id / - block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and - surface 501. + block_type / name). Only schedule and forecast blocks delete here; statement, disclosure, metric and + reconciliation blocks surface 501 with a hint naming the operation that manages them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -222,8 +222,8 @@ async def asyncio_detailed( body (DeleteForecastArm | DeleteLegacyArm | DeleteScheduleArm): Delete an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed delete payload; statement and metric arms - return HTTP 501. + and forecast arms carry fully typed delete payloads; the remaining + arms return HTTP 501. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -254,8 +254,8 @@ async def asyncio( """Delete Information Block Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id / - block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and - surface 501. + block_type / name). Only schedule and forecast blocks delete here; statement, disclosure, metric and + reconciliation blocks surface 501 with a hint naming the operation that manages them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -266,8 +266,8 @@ async def asyncio( body (DeleteForecastArm | DeleteLegacyArm | DeleteScheduleArm): Delete an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed delete payload; statement and metric arms - return HTTP 501. + and forecast arms carry fully typed delete payloads; the remaining + arms return HTTP 501. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/api/robo_ledger_information_blocks/update_information_block.py b/robosystems_client/api/robo_ledger_information_blocks/update_information_block.py index 5f22f5a4..8efd7588 100644 --- a/robosystems_client/api/robo_ledger_information_blocks/update_information_block.py +++ b/robosystems_client/api/robo_ledger_information_blocks/update_information_block.py @@ -121,8 +121,9 @@ def sync_detailed( """Update Information Block Generic Information Block update entry. Dispatches by `block_type` to the registered mutation - handler. Block types whose Structures are library-seeded and immutable (statement family) surface - 501. + handler. Only schedule and forecast blocks update here; the statement family (library-seeded and + immutable), disclosure, metric and reconciliation blocks surface 501 with a hint naming the + operation that changes them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -133,9 +134,9 @@ def sync_detailed( body (UpdateForecastArm | UpdateLegacyArm | UpdateScheduleArm): Update an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed update payload; statement and metric arms - return HTTP 501 (statements are library-seeded; metric updates are - pending). + and forecast arms carry fully typed update payloads; the remaining + arms return HTTP 501 (statements are library-seeded; the others + change through their own operations). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,8 +169,9 @@ def sync( """Update Information Block Generic Information Block update entry. Dispatches by `block_type` to the registered mutation - handler. Block types whose Structures are library-seeded and immutable (statement family) surface - 501. + handler. Only schedule and forecast blocks update here; the statement family (library-seeded and + immutable), disclosure, metric and reconciliation blocks surface 501 with a hint naming the + operation that changes them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -180,9 +182,9 @@ def sync( body (UpdateForecastArm | UpdateLegacyArm | UpdateScheduleArm): Update an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed update payload; statement and metric arms - return HTTP 501 (statements are library-seeded; metric updates are - pending). + and forecast arms carry fully typed update payloads; the remaining + arms return HTTP 501 (statements are library-seeded; the others + change through their own operations). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -210,8 +212,9 @@ async def asyncio_detailed( """Update Information Block Generic Information Block update entry. Dispatches by `block_type` to the registered mutation - handler. Block types whose Structures are library-seeded and immutable (statement family) surface - 501. + handler. Only schedule and forecast blocks update here; the statement family (library-seeded and + immutable), disclosure, metric and reconciliation blocks surface 501 with a hint naming the + operation that changes them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -222,9 +225,9 @@ async def asyncio_detailed( body (UpdateForecastArm | UpdateLegacyArm | UpdateScheduleArm): Update an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed update payload; statement and metric arms - return HTTP 501 (statements are library-seeded; metric updates are - pending). + and forecast arms carry fully typed update payloads; the remaining + arms return HTTP 501 (statements are library-seeded; the others + change through their own operations). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,8 +258,9 @@ async def asyncio( """Update Information Block Generic Information Block update entry. Dispatches by `block_type` to the registered mutation - handler. Block types whose Structures are library-seeded and immutable (statement family) surface - 501. + handler. Only schedule and forecast blocks update here; the statement family (library-seeded and + immutable), disclosure, metric and reconciliation blocks surface 501 with a hint naming the + operation that changes them. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -267,9 +271,9 @@ async def asyncio( body (UpdateForecastArm | UpdateLegacyArm | UpdateScheduleArm): Update an Information Block. The body is a discriminated union on `block_type` mirroring `CreateInformationBlockRequest`. The schedule - arm carries a fully typed update payload; statement and metric arms - return HTTP 501 (statements are library-seeded; metric updates are - pending). + and forecast arms carry fully typed update payloads; the remaining + arms return HTTP 501 (statements are library-seeded; the others + change through their own operations). Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/api/robo_ledger_ledger_events/execute_event_block.py b/robosystems_client/api/robo_ledger_ledger_events/execute_event_block.py index 3dca4e47..9276a597 100644 --- a/robosystems_client/api/robo_ledger_ledger_events/execute_event_block.py +++ b/robosystems_client/api/robo_ledger_ledger_events/execute_event_block.py @@ -116,9 +116,10 @@ def sync_detailed( For events on a connection with write_policy='qb_authoritative' or 'hybrid', publish the event's draft GL entries to the source-of-truth system (QuickBooks), each as its own JournalEntry. Records the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to - 'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed - is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of - record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused. + 'posted'; the event goes 'fulfilled' once no draft remains. On rejection what landed is kept, the + status is unchanged and the error is stamped on event.metadata.last_outbound_error (and returned as + qb_error). Events on 'native' or 'shadow' books pass through with no QB write. Only the group + parent's books are QuickBooks': an event on a subsidiary's books is refused. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -134,11 +135,11 @@ def sync_detailed( each draft entry posts as its own JournalEntry, with the entry id as the RequestId, and its QuickBooks id is recorded per entry on `event.metadata.qb_entry_ids`. The event goes `fulfilled` once no - draft remains, or `pending` when QuickBooks rejects an entry (what - landed is kept). + draft remains. When QuickBooks rejects an entry, what landed is kept, + the status is unchanged, and the error is stamped on + `event.metadata.last_outbound_error` and returned as `qb_error`. - `'native'`-policy events fast-path through with no QB write — - RoboSystems IS the source of truth, no outbound publish needed. + Events on `'native'` or `'shadow'` books pass through with no QB write. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,9 +174,10 @@ def sync( For events on a connection with write_policy='qb_authoritative' or 'hybrid', publish the event's draft GL entries to the source-of-truth system (QuickBooks), each as its own JournalEntry. Records the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to - 'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed - is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of - record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused. + 'posted'; the event goes 'fulfilled' once no draft remains. On rejection what landed is kept, the + status is unchanged and the error is stamped on event.metadata.last_outbound_error (and returned as + qb_error). Events on 'native' or 'shadow' books pass through with no QB write. Only the group + parent's books are QuickBooks': an event on a subsidiary's books is refused. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -191,11 +193,11 @@ def sync( each draft entry posts as its own JournalEntry, with the entry id as the RequestId, and its QuickBooks id is recorded per entry on `event.metadata.qb_entry_ids`. The event goes `fulfilled` once no - draft remains, or `pending` when QuickBooks rejects an entry (what - landed is kept). + draft remains. When QuickBooks rejects an entry, what landed is kept, + the status is unchanged, and the error is stamped on + `event.metadata.last_outbound_error` and returned as `qb_error`. - `'native'`-policy events fast-path through with no QB write — - RoboSystems IS the source of truth, no outbound publish needed. + Events on `'native'` or `'shadow'` books pass through with no QB write. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -225,9 +227,10 @@ async def asyncio_detailed( For events on a connection with write_policy='qb_authoritative' or 'hybrid', publish the event's draft GL entries to the source-of-truth system (QuickBooks), each as its own JournalEntry. Records the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to - 'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed - is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of - record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused. + 'posted'; the event goes 'fulfilled' once no draft remains. On rejection what landed is kept, the + status is unchanged and the error is stamped on event.metadata.last_outbound_error (and returned as + qb_error). Events on 'native' or 'shadow' books pass through with no QB write. Only the group + parent's books are QuickBooks': an event on a subsidiary's books is refused. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -243,11 +246,11 @@ async def asyncio_detailed( each draft entry posts as its own JournalEntry, with the entry id as the RequestId, and its QuickBooks id is recorded per entry on `event.metadata.qb_entry_ids`. The event goes `fulfilled` once no - draft remains, or `pending` when QuickBooks rejects an entry (what - landed is kept). + draft remains. When QuickBooks rejects an entry, what landed is kept, + the status is unchanged, and the error is stamped on + `event.metadata.last_outbound_error` and returned as `qb_error`. - `'native'`-policy events fast-path through with no QB write — - RoboSystems IS the source of truth, no outbound publish needed. + Events on `'native'` or `'shadow'` books pass through with no QB write. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -280,9 +283,10 @@ async def asyncio( For events on a connection with write_policy='qb_authoritative' or 'hybrid', publish the event's draft GL entries to the source-of-truth system (QuickBooks), each as its own JournalEntry. Records the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to - 'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed - is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of - record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused. + 'posted'; the event goes 'fulfilled' once no draft remains. On rejection what landed is kept, the + status is unchanged and the error is stamped on event.metadata.last_outbound_error (and returned as + qb_error). Events on 'native' or 'shadow' books pass through with no QB write. Only the group + parent's books are QuickBooks': an event on a subsidiary's books is refused. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -298,11 +302,11 @@ async def asyncio( each draft entry posts as its own JournalEntry, with the entry id as the RequestId, and its QuickBooks id is recorded per entry on `event.metadata.qb_entry_ids`. The event goes `fulfilled` once no - draft remains, or `pending` when QuickBooks rejects an entry (what - landed is kept). + draft remains. When QuickBooks rejects an entry, what landed is kept, + the status is unchanged, and the error is stamped on + `event.metadata.last_outbound_error` and returned as `qb_error`. - `'native'`-policy events fast-path through with no QB write — - RoboSystems IS the source of truth, no outbound publish needed. + Events on `'native'` or `'shadow'` books pass through with no QB write. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/api/robo_ledger_report_distribution/add_publish_list_members.py b/robosystems_client/api/robo_ledger_report_distribution/add_publish_list_members.py index face829b..aae10b57 100644 --- a/robosystems_client/api/robo_ledger_report_distribution/add_publish_list_members.py +++ b/robosystems_client/api/robo_ledger_report_distribution/add_publish_list_members.py @@ -115,8 +115,8 @@ def sync_detailed( ) -> Response[ErrorResponse | OperationEnvelopelistPublishListMemberResponse]: """Add Members to Publish List - Add one or more recipient graphs to a publish list. Targets must exist and have the same extension - enabled (e.g. roboledger). Self-graph rejected (422); already-member rejected (409). + Add one or more recipient graphs to a publish list. Targets must exist and carry the roboledger or + roboinvestor extension. Self-graph rejected (422); already-member rejected (409). **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -156,8 +156,8 @@ def sync( ) -> ErrorResponse | OperationEnvelopelistPublishListMemberResponse | None: """Add Members to Publish List - Add one or more recipient graphs to a publish list. Targets must exist and have the same extension - enabled (e.g. roboledger). Self-graph rejected (422); already-member rejected (409). + Add one or more recipient graphs to a publish list. Targets must exist and carry the roboledger or + roboinvestor extension. Self-graph rejected (422); already-member rejected (409). **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -192,8 +192,8 @@ async def asyncio_detailed( ) -> Response[ErrorResponse | OperationEnvelopelistPublishListMemberResponse]: """Add Members to Publish List - Add one or more recipient graphs to a publish list. Targets must exist and have the same extension - enabled (e.g. roboledger). Self-graph rejected (422); already-member rejected (409). + Add one or more recipient graphs to a publish list. Targets must exist and carry the roboledger or + roboinvestor extension. Self-graph rejected (422); already-member rejected (409). **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -231,8 +231,8 @@ async def asyncio( ) -> ErrorResponse | OperationEnvelopelistPublishListMemberResponse | None: """Add Members to Publish List - Add one or more recipient graphs to a publish list. Targets must exist and have the same extension - enabled (e.g. roboledger). Self-graph rejected (422); already-member rejected (409). + Add one or more recipient graphs to a publish list. Targets must exist and carry the roboledger or + roboinvestor extension. Self-graph rejected (422); already-member rejected (409). **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. diff --git a/robosystems_client/api/robo_ledger_setup/initialize_chart_of_accounts.py b/robosystems_client/api/robo_ledger_setup/initialize_chart_of_accounts.py index db0136fd..c60710bf 100644 --- a/robosystems_client/api/robo_ledger_setup/initialize_chart_of_accounts.py +++ b/robosystems_client/api/robo_ledger_setup/initialize_chart_of_accounts.py @@ -121,13 +121,13 @@ def sync_detailed( books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional - services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names - and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap - mapping associations in one transaction, with the equity rows mapped by the entity's legal form - (`entity_type`, defaulting to the entity's). Each entity of the group keeps its own chart: - `entity_id` names a subsidiary, omitted means the group parent. One-time per entity: 409 once that - entity has a chart — a chart is never replaced. Customize afterwards with update-taxonomy-block; - accounts that carry activity are never deleted. + services), `product` (inventory and COGS), `consolidation` (a group's consolidation entity — the + adjustments column, never an operating company's chart). Creates the chart, its `coa_mapping` + structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity + rows mapped by the entity's legal form (`entity_type`, defaulting to the entity's). Each entity of + the group keeps its own chart: `entity_id` names a subsidiary, omitted means the group parent. One- + time per entity: 409 once that entity has a chart — a chart is never replaced. Customize afterwards + with update-taxonomy-block; accounts that carry activity are never deleted. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -179,13 +179,13 @@ def sync( books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional - services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names - and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap - mapping associations in one transaction, with the equity rows mapped by the entity's legal form - (`entity_type`, defaulting to the entity's). Each entity of the group keeps its own chart: - `entity_id` names a subsidiary, omitted means the group parent. One-time per entity: 409 once that - entity has a chart — a chart is never replaced. Customize afterwards with update-taxonomy-block; - accounts that carry activity are never deleted. + services), `product` (inventory and COGS), `consolidation` (a group's consolidation entity — the + adjustments column, never an operating company's chart). Creates the chart, its `coa_mapping` + structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity + rows mapped by the entity's legal form (`entity_type`, defaulting to the entity's). Each entity of + the group keeps its own chart: `entity_id` names a subsidiary, omitted means the group parent. One- + time per entity: 409 once that entity has a chart — a chart is never replaced. Customize afterwards + with update-taxonomy-block; accounts that carry activity are never deleted. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -232,13 +232,13 @@ async def asyncio_detailed( books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional - services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names - and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap - mapping associations in one transaction, with the equity rows mapped by the entity's legal form - (`entity_type`, defaulting to the entity's). Each entity of the group keeps its own chart: - `entity_id` names a subsidiary, omitted means the group parent. One-time per entity: 409 once that - entity has a chart — a chart is never replaced. Customize afterwards with update-taxonomy-block; - accounts that carry activity are never deleted. + services), `product` (inventory and COGS), `consolidation` (a group's consolidation entity — the + adjustments column, never an operating company's chart). Creates the chart, its `coa_mapping` + structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity + rows mapped by the entity's legal form (`entity_type`, defaulting to the entity's). Each entity of + the group keeps its own chart: `entity_id` names a subsidiary, omitted means the group parent. One- + time per entity: 409 once that entity has a chart — a chart is never replaced. Customize afterwards + with update-taxonomy-block; accounts that carry activity are never deleted. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -288,13 +288,13 @@ async def asyncio( books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional - services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names - and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap - mapping associations in one transaction, with the equity rows mapped by the entity's legal form - (`entity_type`, defaulting to the entity's). Each entity of the group keeps its own chart: - `entity_id` names a subsidiary, omitted means the group parent. One-time per entity: 409 once that - entity has a chart — a chart is never replaced. Customize afterwards with update-taxonomy-block; - accounts that carry activity are never deleted. + services), `product` (inventory and COGS), `consolidation` (a group's consolidation entity — the + adjustments column, never an operating company's chart). Creates the chart, its `coa_mapping` + structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity + rows mapped by the entity's legal form (`entity_type`, defaulting to the entity's). Each entity of + the group keeps its own chart: `entity_id` names a subsidiary, omitted means the group parent. One- + time per entity: 409 once that entity has a chart — a chart is never replaced. Customize afterwards + with update-taxonomy-block; accounts that carry activity are never deleted. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. diff --git a/robosystems_client/api/robo_ledger_setup/link_bank_account.py b/robosystems_client/api/robo_ledger_setup/link_bank_account.py index 25cd91c4..6a31c907 100644 --- a/robosystems_client/api/robo_ledger_setup/link_bank_account.py +++ b/robosystems_client/api/robo_ledger_setup/link_bank_account.py @@ -121,8 +121,8 @@ def sync_detailed( where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the - link moves can still land a line or two on the old account; running this again moves them. Read the - group's accounts with the `bankAccounts` GraphQL field. + link moves can still land a line or two on the old account; running this again moves them. The + group's accounts are `list-bank-accounts` over MCP and the `bankAccounts` GraphQL field. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -176,8 +176,8 @@ def sync( where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the - link moves can still land a line or two on the old account; running this again moves them. Read the - group's accounts with the `bankAccounts` GraphQL field. + link moves can still land a line or two on the old account; running this again moves them. The + group's accounts are `list-bank-accounts` over MCP and the `bankAccounts` GraphQL field. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -226,8 +226,8 @@ async def asyncio_detailed( where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the - link moves can still land a line or two on the old account; running this again moves them. Read the - group's accounts with the `bankAccounts` GraphQL field. + link moves can still land a line or two on the old account; running this again moves them. The + group's accounts are `list-bank-accounts` over MCP and the `bankAccounts` GraphQL field. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -279,8 +279,8 @@ async def asyncio( where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the - link moves can still land a line or two on the old account; running this again moves them. Read the - group's accounts with the `bankAccounts` GraphQL field. + link moves can still land a line or two on the old account; running this again moves them. The + group's accounts are `list-bank-accounts` over MCP and the `bankAccounts` GraphQL field. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. diff --git a/robosystems_client/api/robo_ledger_taxonomy_mapping/delete_mapping_association.py b/robosystems_client/api/robo_ledger_taxonomy_mapping/delete_mapping_association.py index fdfda328..6758add3 100644 --- a/robosystems_client/api/robo_ledger_taxonomy_mapping/delete_mapping_association.py +++ b/robosystems_client/api/robo_ledger_taxonomy_mapping/delete_mapping_association.py @@ -115,10 +115,10 @@ def sync_detailed( Remove a single CoA → reporting-concept mapping edge by id. The mapping structure itself remains; only the association row is dropped. Use this to correct a wrong mapping — delete the bad edge, then - `create-mapping-association` the right one. Find the association id via the `library_element_arcs` - GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an account with landed - history in a closed month cannot be removed on its own (422): move the account with `create-mapping- - association` and `replaces_association_id` instead. + `create-mapping-association` the right one. The association id is `list-element-arcs` over MCP and + the `libraryElementArcs` GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an + account with landed history in a closed month cannot be removed on its own (422): move the account + with `create-mapping-association` and `replaces_association_id` instead. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -161,10 +161,10 @@ def sync( Remove a single CoA → reporting-concept mapping edge by id. The mapping structure itself remains; only the association row is dropped. Use this to correct a wrong mapping — delete the bad edge, then - `create-mapping-association` the right one. Find the association id via the `library_element_arcs` - GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an account with landed - history in a closed month cannot be removed on its own (422): move the account with `create-mapping- - association` and `replaces_association_id` instead. + `create-mapping-association` the right one. The association id is `list-element-arcs` over MCP and + the `libraryElementArcs` GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an + account with landed history in a closed month cannot be removed on its own (422): move the account + with `create-mapping-association` and `replaces_association_id` instead. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -202,10 +202,10 @@ async def asyncio_detailed( Remove a single CoA → reporting-concept mapping edge by id. The mapping structure itself remains; only the association row is dropped. Use this to correct a wrong mapping — delete the bad edge, then - `create-mapping-association` the right one. Find the association id via the `library_element_arcs` - GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an account with landed - history in a closed month cannot be removed on its own (422): move the account with `create-mapping- - association` and `replaces_association_id` instead. + `create-mapping-association` the right one. The association id is `list-element-arcs` over MCP and + the `libraryElementArcs` GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an + account with landed history in a closed month cannot be removed on its own (422): move the account + with `create-mapping-association` and `replaces_association_id` instead. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. @@ -246,10 +246,10 @@ async def asyncio( Remove a single CoA → reporting-concept mapping edge by id. The mapping structure itself remains; only the association row is dropped. Use this to correct a wrong mapping — delete the bad edge, then - `create-mapping-association` the right one. Find the association id via the `library_element_arcs` - GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an account with landed - history in a closed month cannot be removed on its own (422): move the account with `create-mapping- - association` and `replaces_association_id` instead. + `create-mapping-association` the right one. The association id is `list-element-arcs` over MCP and + the `libraryElementArcs` GraphQL field. Library-seeded rows cannot be deleted (403). An edge for an + account with landed history in a closed month cannot be removed on its own (422): move the account + with `create-mapping-association` and `replaces_association_id` instead. **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict. diff --git a/robosystems_client/clients/README.md b/robosystems_client/clients/README.md index 8cf3745b..6dac3f2c 100644 --- a/robosystems_client/clients/README.md +++ b/robosystems_client/clients/README.md @@ -221,16 +221,20 @@ metadata = GraphMetadata(graph_name="Example Holdings") entity = InitialEntityData(name="Example Holdings LLC", uri="https://example.com") graph_id = clients.graphs.create_graph_and_wait(metadata, entity, timeout=120) -uploaded = clients.files.upload(graph_id, "Entity", "entity.parquet") -staged = clients.tables.query(graph_id, "SELECT * FROM Entity", limit=5) -done = clients.graphs.materialize(graph_id) -print(uploaded.success, staged.rows, done.total_rows) - clients.documents.upload(graph_id, title="Close memo", content="# March\n\nNotes.") hits = clients.documents.search(graph_id, "close memo", size=5).hits ``` -`upload`, `tables.query` and `materialize` report failure through `success` and `error` on their results. `MaterializationOptions` sets `rebuild`, `force`, `on_progress` and `timeout`. `files.upload` reads the whole file into memory and sends it as Parquet. Its `row_count` is 0 when a large file stages asynchronously. `change_tier` takes `ladybug-standard`, `ladybug-large` or `ladybug-xlarge`. `delete_graph` cancels the subscription and starts deprovisioning, which `at_period_end=True` defers. +`create_graph_and_wait` always creates an entity graph. Its data comes from the extensions pipeline, and `materialize` rebuilds it from there. File uploads are refused on it. Files and staging tables are for a custom graph, which you create with a `custom_schema` through `robosystems_client.api.graphs.create_graph`: + +```python +uploaded = clients.files.upload(custom_graph_id, "Customer", "customer.parquet") +staged = clients.tables.query(custom_graph_id, "SELECT * FROM Customer", limit=5) +done = clients.graphs.materialize(custom_graph_id) +print(uploaded.success, staged.rows, done.total_rows) +``` + +`upload`, `tables.query` and `materialize` report failure through `success` and `error` on their results. `MaterializationOptions` sets `rebuild`, `force`, `materialize_embeddings`, `on_progress` and `timeout`. `files.upload` reads the whole file into memory and sends it as Parquet. Its `row_count` is 0 when a large file stages asynchronously. `change_tier` takes `ladybug-standard`, `ladybug-large` or `ladybug-xlarge`. `delete_graph` cancels the subscription and starts deprovisioning, which `at_period_end=True` defers; it needs the organization's owner who is also an admin on the graph. `documents.search` is keyword (BM25) search, since it does not set the request's `semantic` flag. Subgraphs and backups have no facade method. `AuthenticatedClients` and `TokenClients` expose `authenticated_client` for the generated functions in `robosystems_client.api`, such as `sync_detailed(graph_id, client=clients.authenticated_client, body=body)` from `robosystems_client.api.graph_operations.create_subgraph`. Calls through it do not replay `429` responses. diff --git a/robosystems_client/clients/document_client.py b/robosystems_client/clients/document_client.py index ced72395..1aca221e 100644 --- a/robosystems_client/clients/document_client.py +++ b/robosystems_client/clients/document_client.py @@ -244,13 +244,18 @@ def search( date_to: Optional[str] = None, size: int = 10, ) -> SearchResponse: - """Search documents with hybrid (BM25 + KNN) search. + """Search documents by keyword (BM25). + + The facade does not set the request's ``semantic`` flag, so the + server's BM25-only default applies; for hybrid (BM25 + KNN) search, + call ``robosystems_client.api.search.search_documents`` with + ``SearchRequest(semantic=True)``. Args: graph_id: Target graph ID. query: Search query string. source_type: Filter by source type (xbrl_textblock, narrative_section, - ixbrl_disclosure, uploaded_doc, memory). + ixbrl_disclosure, uploaded_doc, connection_doc). entity: Filter by entity ticker/CIK/name. form_type: Filter by SEC form type (10-K, 10-Q). section: Filter by section ID (item_1, item_1a, item_7, etc.). diff --git a/robosystems_client/clients/graph_client.py b/robosystems_client/clients/graph_client.py index 4d85dd85..b33ccdf2 100644 --- a/robosystems_client/clients/graph_client.py +++ b/robosystems_client/clients/graph_client.py @@ -148,7 +148,12 @@ def create_graph_and_wait( use_sse: bool = True, ) -> str: """ - Create a graph and wait for completion. + Create an entity graph and wait for completion. + + This method always creates an entity graph, whose data comes from the + extensions pipeline (connectors and the ledger operations) and which + refuses file uploads. A custom graph for file ingestion is created with + a ``custom_schema`` through ``robosystems_client.api.graphs.create_graph``. Uses SSE (Server-Sent Events) for real-time progress updates with automatic fallback to polling if SSE connection fails. @@ -156,8 +161,8 @@ def create_graph_and_wait( Args: metadata: Graph metadata initial_entity: Initial entity data (required — entity graphs must have an entity) - create_entity: Whether to populate entity data on creation (default True). - Set False to defer population for file-based ingestion workflows. + create_entity: Whether to create the entity node and its initial data + on creation (default True). timeout: Maximum time to wait in seconds poll_interval: Time between status checks in seconds (for polling fallback) on_progress: Callback for progress updates @@ -322,6 +327,8 @@ def materialize( """ Materialize graph from staging tables or extensions OLTP. + The source follows the graph's type: an entity graph rebuilds from the + extensions OLTP database, a custom graph from its staged files. Submits a materialization job and monitors progress via SSE. The operation runs asynchronously on the server but this method waits for completion and returns the final result. @@ -697,7 +704,8 @@ def delete_graph( ) -> Dict[str, Any]: """ Permanently delete a graph by canceling its subscription and triggering - deprovisioning. + deprovisioning. The caller must be the organization's owner and an + admin on the graph. Two modes: @@ -717,7 +725,8 @@ def delete_graph( Returns: The ``result`` field of the operation envelope. For immediate: ``{"graph_id", "subscription_id", "status": "deprovisioning_queued", - "message"}``. For period-end: includes ``ends_at`` instead. + "message"}``. For period-end, ``status`` is + ``"scheduled_for_deprovision"`` and ``ends_at`` is included. Raises: RuntimeError: If the deletion request fails. diff --git a/robosystems_client/clients/investor_client.py b/robosystems_client/clients/investor_client.py index 3042dd7e..2beb76dc 100644 --- a/robosystems_client/clients/investor_client.py +++ b/robosystems_client/clients/investor_client.py @@ -230,7 +230,10 @@ def list_portfolios( def get_portfolio_block( self, graph_id: str, portfolio_id: str ) -> PortfolioBlock | None: - """Get the full portfolio block (portfolio + positions + securities). Returns None if not found.""" + """Get the portfolio block: the portfolio with its active positions, their + securities and issuing entities (disposed positions are left out; list + them with ``list_positions(status="disposed")``). Returns None if not + found.""" data = self._query( graph_id, GET_INVESTOR_PORTFOLIO_BLOCK_GQL, {"portfolioId": portfolio_id} ) @@ -319,7 +322,10 @@ def get_security(self, graph_id: str, security_id: str) -> InvestorSecurity | No return GetInvestorSecurity.model_validate(data).security def create_security(self, graph_id: str, body: dict[str, Any]) -> SecurityResponse: - """Create a new security. Auto-links to an entity when `source_graph_id` is set.""" + """Create a new security in this graph's registry. Its ``entity_id`` is + the issuer, not the holder. Without ``entity_id``, ``source_graph_id`` + links it to the entity already linked from the issuer's graph, or, when + there is none yet, once a report from that graph arrives.""" request = CreateSecurityRequest.from_dict(body) response = op_create_security( graph_id=graph_id, body=request, client=self._get_client() @@ -386,7 +392,7 @@ def get_position(self, graph_id: str, position_id: str) -> InvestorPosition | No # ── Holdings (aggregation) ───────────────────────────────────────── def get_holdings(self, graph_id: str, portfolio_id: str) -> InvestorHoldings | None: - """Get portfolio holdings grouped by entity.""" + """One portfolio's active positions, grouped by issuing entity.""" data = self._query( graph_id, GET_INVESTOR_HOLDINGS_GQL, {"portfolioId": portfolio_id} ) diff --git a/robosystems_client/clients/ledger_client.py b/robosystems_client/clients/ledger_client.py index 55ab1c41..89cad8d1 100644 --- a/robosystems_client/clients/ledger_client.py +++ b/robosystems_client/clients/ledger_client.py @@ -15,8 +15,10 @@ the ledger: setup, taxonomy, information blocks, ledger events, fiscal close, reports, distribution, analytical views). Each command returns an `OperationEnvelope`; the facade unwraps - `envelope.result` and returns either a dict or, for async dispatches - (e.g. auto-map, create-report), a small ack dict. + `envelope.result` and returns the operation's result. The one async + dispatch, `auto_map_elements`, returns a small ack dict with the + operation id instead; every other write, `create_report` included, + completes before it returns. Reports, statements, and publish lists are included on this client — same backend surface as the ledger operations. @@ -996,11 +998,11 @@ def _build_event_block_request( ``occurred_at`` accepts either a date string (``YYYY-MM-DD``) — which is normalized to midnight UTC — or a full ISO-8601 timestamp. - ``source`` describes who fired the event — must match the server's - CHECK constraint set: ``manual`` (user-initiated, the default), - ``schedule`` (recurring schedule fired), ``system`` (internal - automation), or one of the adapter-driven values - (``quickbooks`` / ``xero`` / ``plaid``) for sync ingestion. + ``source`` describes who fired the event: ``manual`` (user-initiated, + the default), ``schedule`` (recurring schedule fired), ``system`` + (internal automation), or the provider of a connection registered on + the graph (``quickbooks``, ``plaid``, ...) or the ``source_name`` of an + ``external`` one. The server refuses any other value. """ if "T" not in occurred_at: occurred_dt = datetime.datetime.fromisoformat(f"{occurred_at}T00:00:00+00:00") @@ -1075,7 +1077,8 @@ def create_entity(self, graph_id: str, body: dict[str, Any]) -> LedgerEntityResp def get_summary( self, graph_id: str, entity_id: str | None = None ) -> LedgerSummary | None: - """Ledger rollup counts + QB sync metadata. + """One entity's ledger counts and date range, with the graph's + connection count and last sync time. Returns the codegen-typed ``LedgerSummary`` model (attribute access, snake_case) rather than a dict. @@ -1678,7 +1681,8 @@ def get_flow_candidates( account's default flow on the cash flow and equity statements — and this is the set the write path accepts, so a picker built from it never offers a row the statement cannot present. The ``qname`` is what a bank - line's ``classified_flow_qname`` takes. + line's ``classified_flow_qname`` and a journal-entry line's + ``flow_qname`` take. """ data = self._query(graph_id, FLOW_CANDIDATES_GQL, {"entityId": entity_id}) return FlowCandidates.model_validate(data).flow_candidates @@ -1722,7 +1726,9 @@ def delete_mapping_association( ) def auto_map_elements(self, graph_id: str, mapping_id: str) -> dict[str, Any]: - """Trigger the AI MappingAgent (async). Returns an operation ack.""" + """Start the AI mapping operator on a mapping (async, on the background + worker). Returns an operation ack: ``operation_id`` and ``status``; + follow it with ``monitor_operation``.""" body = AutoMapElementsOperation(mapping_id=mapping_id) response = op_auto_map_elements( graph_id=graph_id, body=body, client=self._get_client() @@ -1746,7 +1752,7 @@ def get_information_block( """Fetch an Information Block envelope by id — the cross-block-type read. Returns ``None`` when the block doesn't exist or its type isn't - registered. See ``information-block.md`` for the envelope contract. + registered. ``scenario_id`` selects the FactSet slice: ``None`` = actuals; a forecast block's structure id = that scenario's parallel universe @@ -2808,10 +2814,14 @@ def update_event_block( ) -> EventBlockEnvelope: """Apply a status transition and/or field corrections to an event block. - Use for posting drafts (``classified`` → ``committed`` → ``fulfilled``), - voiding, superseding (correction chains), or patching ``description``, - ``effective_at``, ``metadata``, ``obligated_by_event_id``, or - ``discharges_event_id``. + Use for moving an event along its lifecycle (``transition_to``: a bank + line goes ``captured`` → ``classified`` → ``committed``, and the commit + fires its handler), voiding, superseding (correction chains), or + patching ``description``, ``effective_at``, ``due_date``, + ``metadata_patch`` (merged into the existing metadata), + ``obligated_by_event_id``, ``discharges_event_id``, + ``discharge_allocations`` or ``document_id``. A retraction is refused + once the event's ledger rows have posted; reverse the entries instead. """ request = UpdateEventBlockRequest.from_dict(body) response = op_update_event_block( @@ -3041,17 +3051,27 @@ def update_event_handler( envelope = self._call_op("Update event handler", response) return self._typed_result("Update event handler", envelope, EventHandlerResponse) - # ── Financial statements (graph-backed) ────────────────────────────── + # ── Financial statements ───────────────────────────────────────────── def live_financial_statement( self, graph_id: str, body: dict[str, Any], ) -> LiveFinancialStatementResponse: - """Live financial statement — pulls facts directly from the graph for - an explicit period window (or fiscal year) and returns the statement - shape without a persisted Report row. Useful for ad-hoc previews and - dashboards. + """Live financial statement — read from the ledger itself (the + extensions database, not the graph) for an explicit period window or a + fiscal year, without a persisted Report row. Useful for ad-hoc previews + and dashboards. + + ``body`` takes the fields of + :class:`~robosystems_client.models.live_financial_statement_request.LiveFinancialStatementRequest`. + ``scope`` is ``entity`` (the default: one entity's books), ``combined`` + or ``consolidated`` (both read on the group parent: every member + consolidated in full summed, and ``consolidated`` adds the consolidation + entity's adjustments). ``consolidated: True`` is the older spelling of + ``scope: "consolidated"``; ``scope`` wins when both are given. + ``dimension`` slices an income statement by a management dimension, and + ``include_sources`` adds the accounts behind each figure. """ request = LiveFinancialStatementRequest.from_dict(body) response = op_live_financial_statement( @@ -3067,7 +3087,8 @@ def consolidation_worksheet( graph_id: str, body: dict[str, Any], ) -> ConsolidationWorksheetResponse: - """The group's statement for one window with the entity as the column: + """The group's statement for one window, read from the ledger, with the + entity as the column: each member consolidated in full, their combined sum, the consolidation entity's adjustments, the consolidated total, and each equity-method or cost member beside the sum. Read on the group parent. @@ -3104,7 +3125,9 @@ def financial_statement_analysis( graph_id: str, body: dict[str, Any], ) -> FinancialStatementAnalysisResponse: - """Run a financial statement analysis against an existing report. + """Run a financial statement analysis against an existing report. A + graph read (LadybugDB), so a tenant's figures are as of its last + materialization. On shared-repo graphs (e.g. SEC), ``ticker`` is required; on tenant graphs it's ignored. Either pass an explicit ``report_id`` or let the @@ -3134,8 +3157,8 @@ def build_fact_grid(self, graph_id: str, request: dict[str, Any]) -> ViewRespons ``request`` accepts any fields of ``robosystems_client.models.create_view_request.CreateViewRequest``: ``elements`` (qnames), ``canonical_concepts``, ``periods``, - ``entities``, ``form``, ``fiscal_year``, ``fiscal_period``, - ``period_type``, ``include_summary``, ``view_config``. The legacy + ``entity``, ``entities``, ``form``, ``fiscal_year``, ``fiscal_period``, + ``period_type``, ``include_summary``, ``limit``, ``view_config``. The legacy model name ``CreateViewRequest`` is a holdover from when fact grids were exposed under a ``/views`` route; the shape is unchanged. """ @@ -3178,7 +3201,11 @@ def initialize_ledger( auto_seed_schedules: bool | None = None, note: str | None = None, ) -> InitializeLedgerResponse: - """One-time ledger initialization — seed fiscal calendar + periods.""" + """One-time setup of an entity's fiscal calendar: creates it, seeds its + months from ``earliest_data_period`` (default 24 months back) through + the current month, and marks those on or before ``closed_through`` as + closed. A second call is refused (409). ``entity_id`` omitted means the + group parent.""" body = InitializeLedgerRequest( entity_id=entity_id if entity_id is not None else UNSET, closed_through=closed_through if closed_through is not None else UNSET, @@ -3218,11 +3245,15 @@ def initialize_chart_of_accounts( """One-time chart of accounts from a shipped template — the fresh-company path to native books. - ``template`` is one of `list_chart_templates` (``saas`` / ``services`` / - ``product``). Refused (409) once the graph has any chart of accounts — a - QuickBooks-synced tenant never needs this. ``entity_type`` (corporation / - llc / partnership) picks the equity mapping; it defaults to the graph's - primary entity, then corporation. + ``template`` is one of `list_chart_templates`: ``saas``, ``services``, + ``product``, or ``consolidation`` (a group's consolidation entity: the + eliminations and noncontrolling-interest rows, never an operating + company's chart). Each entity keeps its own chart; ``entity_id`` names + the one to give a chart to, omitted the group parent. Refused (409) + when that entity already has one — a QuickBooks-synced tenant never + needs this. ``entity_type`` (corporation / llc / partnership) picks the + equity mapping; it defaults to the graph's primary entity, then + corporation. """ body = InitializeChartOfAccountsRequest( template=InitializeChartOfAccountsRequestTemplate(template), @@ -3300,8 +3331,11 @@ def close_period( or on the entity ``entity_id`` names. Each entity closes on its own. Each ``allow_*`` flag closes despite one blocker and is recorded in the - close audit note; prefer clearing the blocker. + close audit note; prefer clearing the blocker. ``period`` must be the + month after ``closed_through``: periods close in order. + - ``allow_stale_sync``: the source system's data for the period is not + known to be current (sync the connection first). - ``allow_unreconciled_accounts``: a reconciliation the close waits on is not reconciled for the period (`refresh_reconciliations`). - ``allow_stranded_obligations``: matured obligations that were never @@ -3346,7 +3380,10 @@ def reopen_period( *, entity_id: str | None = None, ) -> FiscalCalendarResponse: - """Reopen a closed fiscal period. Requires a reason for the audit log.""" + """Reopen a closed fiscal period. Requires a reason for the audit log. + Only the latest closed period can be reopened, which moves + ``closed_through`` back one month; reach an earlier one by reopening + the later ones first.""" body = ReopenPeriodOperation( period=period, reason=reason, @@ -3775,8 +3812,8 @@ 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 — - the holon is stamped at publish time; the Tavi model and XBRL are - materialized + cached on first request. The client follows the URL + the holon is stamped at publish time; the Tavi model, the XBRL and the + holon with lineage are materialized + cached on first request. The client follows the URL and pulls the bytes. Args: @@ -3860,8 +3897,9 @@ def download_report_bundle( def file_report(self, graph_id: str, report_id: str) -> ReportResponse: """Transition a Report's filing_status to 'filed' — locks the package. - Allowed from 'draft' or 'under_review'. Stamps filed_at + filed_by from - the auth context + server clock. + Allowed from 'draft' or 'under_review', and only once the books are + closed through every period the Report states. Stamps filed_at + + filed_by from the auth context + server clock. """ body = FileReportRequest(report_id=report_id) response = op_file_report(graph_id=graph_id, body=body, client=self._get_client()) diff --git a/robosystems_client/clients/operator_client.py b/robosystems_client/clients/operator_client.py index f6e8f43c..b575ad70 100644 --- a/robosystems_client/clients/operator_client.py +++ b/robosystems_client/clients/operator_client.py @@ -81,7 +81,8 @@ class OperatorResult: # then carries the explanation rather than an answer. error_details: Optional[Dict[str, Any]] = None # The run's operation id: the key of its record under the graph's audit - # (`get_operator_run`) and of every mutation it made. + # (`robosystems_client.api.graph_audit.get_operator_run`) and of every + # mutation it made. operation_id: Optional[str] = None @@ -273,8 +274,12 @@ def execute_query( ], context=request.context, mode=request.mode, - enable_rag=request.enable_rag, - force_extended_analysis=request.force_extended_analysis, + enable_rag=request.enable_rag if request.enable_rag is not None else UNSET, + force_extended_analysis=( + request.force_extended_analysis + if request.force_extended_analysis is not None + else UNSET + ), thread_id=request.thread_id if request.thread_id is not None else UNSET, ) @@ -313,8 +318,12 @@ def execute_operator( ], context=request.context, mode=request.mode, - enable_rag=request.enable_rag, - force_extended_analysis=request.force_extended_analysis, + enable_rag=request.enable_rag if request.enable_rag is not None else UNSET, + force_extended_analysis=( + request.force_extended_analysis + if request.force_extended_analysis is not None + else UNSET + ), thread_id=request.thread_id if request.thread_id is not None else UNSET, ) diff --git a/robosystems_client/clients/query_client.py b/robosystems_client/clients/query_client.py index 8a9c061d..2f4e52d9 100644 --- a/robosystems_client/clients/query_client.py +++ b/robosystems_client/clients/query_client.py @@ -552,13 +552,17 @@ def stream_query( chunk_size: int = 1000, on_progress: Optional[Callable[[int, int], None]] = None, ) -> Generator[Any, None, None]: - """Stream query results for large datasets with progress tracking + """Iterate a query's rows, with progress tracking. + + Not incremental: the whole result is collected first, from the NDJSON + response or a queued query's SSE stream, and then yielded row by row, + so memory use is the size of the full result. Args: graph_id: Graph ID to query cypher: Cypher query string parameters: Query parameters - chunk_size: Number of records per chunk + chunk_size: Rows per chunk the server sends, and how often on_progress fires on_progress: Callback for progress updates (current, total) Yields: diff --git a/robosystems_client/graphql/schema.graphql b/robosystems_client/graphql/schema.graphql index 223f90d5..de821433 100644 --- a/robosystems_client/graphql/schema.graphql +++ b/robosystems_client/graphql/schema.graphql @@ -599,9 +599,9 @@ type Query { A flow is a second classification beside the account: it overrides the account's default flow on the cash flow and equity statements (a bank - line's `classified_flow_qname`, a journal-entry line's - `transaction_description_code`). These are the leaf investing and - financing rows of the entity's cash flow statement under its Reporting + line's `classified_flow_qname`, a journal-entry line's `flow_qname`). + These are the leaf investing and financing rows of the entity's cash + flow statement under its Reporting Style - the set the write path accepts - so a picker built from them never offers a row the statement cannot present. By section, investing then financing, and by name within each. @@ -1487,7 +1487,7 @@ type Position { dispositionDate: Date """ - Lifecycle state. One of: `active` (currently held), `disposed` (soft-deleted via `update-portfolio-block` dispose), `archived` (historical record only). + Lifecycle state. One of: `active` (currently held), `disposed` (soft-deleted via `update-portfolio-block` dispose). """ status: String! @@ -1501,7 +1501,7 @@ type Position { updatedAt: DateTime! } -"""Aggregated holdings across all of the caller's portfolios.""" +"""One portfolio's active positions, grouped by issuing entity.""" type HoldingsList { """One row per issuing entity.""" holdings: [Holding!]! @@ -1513,10 +1513,7 @@ type HoldingsList { totalPositions: Int! } -""" -All securities held in a single entity, rolled up across the -caller's portfolios. -""" +"""All securities one portfolio holds in a single issuing entity.""" type Holding { """Issuing entity ID.""" entityId: String! @@ -1524,7 +1521,9 @@ type Holding { """Display name of the entity.""" entityName: String! - """Pre-association tenant graph, when set on the securities.""" + """ + The issuer's tenant graph as recorded on the issuing entity, when set. Null for the unlinked group. + """ sourceGraphId: String """One row per security held in this entity.""" @@ -1534,7 +1533,7 @@ type Holding { totalCostBasisDollars: Float! """ - Sum of current value across all securities, in dollars. `null` if any security lacks a mark. + Sum of current value across the marked securities, in dollars; an unmarked one adds nothing. `null` only when none has a mark. """ totalCurrentValueDollars: Float @@ -1542,7 +1541,7 @@ type Holding { positionCount: Int! } -"""One security held by an entity, rolled up across portfolios.""" +"""One security held in the portfolio, issued by the holding's entity.""" type HoldingSecuritySummary { """Security ID.""" securityId: String! @@ -1553,18 +1552,16 @@ type HoldingSecuritySummary { """Instrument family (e.g. `common_stock`, `warrant`).""" securityType: String! - """Total quantity held in `quantityType` units.""" + """Quantity held in `quantityType` units.""" quantity: Float! """Unit basis (`shares`, `units`, `principal`).""" quantityType: String! - """Aggregate cost basis in dollars, summed across all positions.""" + """Cost basis in dollars.""" costBasisDollars: Float! - """ - Aggregate current value in dollars, or `null` if any underlying position lacks a mark. - """ + """Current value in dollars, or `null` if the position has no mark.""" currentValueDollars: Float } @@ -1599,16 +1596,14 @@ type PortfolioBlock { """Embedded owning entity, when set. `null` for unattributed portfolios.""" owner: EntityLite - """ - All positions in this portfolio, including disposed ones (filter by `status` for active-only display). - """ + """The portfolio's active positions; disposed ones are not included.""" positions: [PositionBlock!]! - """Sum of `cost_basis_dollars` across every position.""" + """Sum of `cost_basis_dollars` across the active positions.""" totalCostBasisDollars: Float! """ - Sum of `current_value_dollars` across every position. `null` when any active position lacks a mark. + Sum of `current_value_dollars` across the marked active positions; an unmarked one adds nothing. `null` only when no active position has a mark. """ totalCurrentValueDollars: Float @@ -1676,7 +1671,7 @@ type PositionBlock { acquisitionDate: Date """ - Lifecycle state (`active`, `disposed`, `archived`). See `PositionResponse.status` for the full vocabulary. + Lifecycle state (`active`, `disposed`). See `PositionResponse.status` for the full vocabulary. """ status: String! @@ -3144,7 +3139,7 @@ type FlowCandidate { elementId: String! """ - The flow's qname, the value a bank line's `classified_flow_qname` and a journal-entry line's `transaction_description_code` take. + The flow's qname, the value a bank line's `classified_flow_qname` and a journal-entry line's `flow_qname` take. """ qname: String! @@ -3188,7 +3183,8 @@ One structure header — a renderable section within a taxonomy `blockType` drives presentation: 'balance_sheet', 'income_statement', 'cash_flow_statement', 'equity_statement', -'schedule', 'chart_of_accounts', 'coa_mapping', 'rollforward', etc. +'schedule', 'forecast', 'metric', 'reconciliation', 'chart_of_accounts', +'coa_mapping', etc. """ type Structure { id: String! @@ -4024,7 +4020,7 @@ type InformationBlock { """The block's intrinsic shape — concept + member arrangement patterns.""" type InformationModel { """ - roll_up | roll_forward | variance | adjustment | set | arithmetic | textblock. Null for block types where the concept arrangement is implicit in their mechanics. + A Concept Arrangement Pattern: set | roll_up | roll_forward | roll_forward_info | adjustment | variance | arithmetic | text_block, a text-block or detail level (level1_textblock … level4_detail, table_equivalent_textblock), or grid | compound_fact. Null for block types where the concept arrangement is implicit in their mechanics. """ conceptArrangement: String @@ -4350,20 +4346,17 @@ type InformationBlockVerificationCategorySummary { } """ -The six `type-of` View projections of an Information Block (Rendering, -FactTable, ModelStructure, VerificationResults, ReportElements, -BusinessRules), surfaced at the envelope boundary. +The server-computed View projections of an Information Block, +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 render as empty states without breaking the -dispatcher. - -Today: `rendering` is computed for the statement family, and -`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`. +Two are computed at envelope-build time when their source data is +available: `rendering` (the rendered rows and periods) for the +statement family, disclosures, metrics, forecasts and reconciliations, +and `chart` (panel/series config over the rendering's rows and +periods) for metric blocks. The other views a client shows are +derived from the envelope itself — a fact table from +`InformationBlockEnvelope.facts`, rule outcomes from its rules and +verification results. """ type InformationBlockViewProjections { rendering: InformationBlockRendering @@ -4389,10 +4382,12 @@ type InformationBlockRendering { """ One row of a server-side rendered statement. -Mirrors :class:`FactRow` in +Drawn from :class:`FactRow` in :mod:`robosystems.operations.roboledger.reports.fact_grid`, restated at the -API boundary so envelope consumers don't depend on that module. `values` -holds one entry per period column in :class:`RenderingLite.periods`. +API boundary so envelope consumers don't depend on that module. It does not +carry FactRow's `is_abstract`, `position` or `period_role` (the start/end +role that tells a roll-forward's two balance rows apart). +`values` holds one entry per period column in :class:`RenderingLite.periods`. """ type InformationBlockRenderingRow { elementId: String! diff --git a/robosystems_client/models/add_publish_list_members_operation.py b/robosystems_client/models/add_publish_list_members_operation.py index ff9046fe..f24f89b4 100644 --- a/robosystems_client/models/add_publish_list_members_operation.py +++ b/robosystems_client/models/add_publish_list_members_operation.py @@ -14,8 +14,8 @@ class AddPublishListMembersOperation: """Add recipient graphs to a publish list. Attributes: - target_graph_ids (list[str]): Graph IDs to add. Each must exist and have the same extension (roboledger / - roboinvestor) enabled. Self-graph rejected. + target_graph_ids (list[str]): Graph IDs to add. Each must exist and carry the roboledger or roboinvestor + extension. Self-graph rejected. list_id (str): The publish list to add members to. """ diff --git a/robosystems_client/models/compute_forecast_request.py b/robosystems_client/models/compute_forecast_request.py index 9282ddef..04d269b9 100644 --- a/robosystems_client/models/compute_forecast_request.py +++ b/robosystems_client/models/compute_forecast_request.py @@ -15,14 +15,18 @@ class ComputeForecastRequest: """Request body for the `compute-forecast` operation. - Walks the scenario's driver cascade month-by-month forward from the - forecast block's `base_period`: lever-driven Derive rules in - dependency order, carry-forward for unmodeled IS lines, calc-DAG - subtotals — upserting one scenario IS FactSet (+ a working-capital BS - set) per forward month, all keyed by the forecast block's - `scenario_id`. Re-running replaces each month's values (the - compute-metrics drift semantics). Deterministic and non-AI — no - credits consumed. + Walks the scenario's driver cascade month-by-month forward from its + anchor — the newest closed month inside the horizon under + `base_anchor='seam'` (the default), the block's `base_period` under + `'fixed'`: lever-driven Derive rules in dependency order, carry-forward + for unmodeled IS lines, calc-DAG subtotals — upserting per forward + month a scenario IS FactSet, a BS set (the full roll when the anchor + month has an actual balance sheet, else the rule-driven working-capital + instants) and a derived CF set when an actual one exists, all keyed by + the forecast block's `scenario_id`. Re-running replaces each month's + values (the compute-metrics drift semantics). A month that fails + verification halts the walk (`halted_at`). Deterministic and non-AI — + no credits consumed. Attributes: structure_id (str): Forecast block structure (block_type='forecast') to compute. diff --git a/robosystems_client/models/create_forecast_request.py b/robosystems_client/models/create_forecast_request.py index fdf87b8e..b10c0f07 100644 --- a/robosystems_client/models/create_forecast_request.py +++ b/robosystems_client/models/create_forecast_request.py @@ -37,7 +37,7 @@ class CreateForecastRequest: display/filtering, not machinery. All kinds compute identically. Default: CreateForecastRequestScenarioKind.FORECAST. horizon_months (int | Unset): Forward months to project past the base period. Default: 12. - base_period (None | str | Unset): Seed month (`YYYY-MM`) the walk projects forward from. Defaults to the fiscal + base_period (None | str | Unset): Origin month (`YYYY-MM`) of the authored window. Defaults to the fiscal calendar's closed-through period, else the newest actual report month. Resolved and stored at create time, and it never moves afterwards — every lever is keyed to a month inside `base_period + 1 … + horizon_months`, so moving it would mean restating all of them. `base_anchor` decides whether the walk still *seeds* here once diff --git a/robosystems_client/models/create_legacy_arm.py b/robosystems_client/models/create_legacy_arm.py index 2861b40c..158c3e31 100644 --- a/robosystems_client/models/create_legacy_arm.py +++ b/robosystems_client/models/create_legacy_arm.py @@ -18,22 +18,24 @@ @_attrs_define class CreateLegacyArm: - """Create-information-block body for block types that don't yet have - a typed construction path at the API boundary. + """Create-information-block body for block types constructed through + another operation. Statement-family blocks (balance_sheet, income_statement, cash_flow_statement, equity_statement, comprehensive_income) are constructed via `create-report`, not this endpoint. Disclosure structures (regulatory_disclosure) are vocabulary, authored via `create-taxonomy-block`; their facts land when `create-report` - picks them. Metric blocks are recognized but their evaluator has - not shipped. Calling this endpoint with one of these block types - returns HTTP 501 with a hint pointing to the correct construction - path. + picks them. Metric structures are authored via + `create-taxonomy-block` and their facts written by `compute-metrics` + or `assert-metrics`. Reconciliation blocks are created by + `refresh-reconciliations`. Calling this endpoint with one of these + block types returns HTTP 501 with a hint pointing to the correct + construction path. Attributes: - block_type (CreateLegacyArmBlockType): Statement-family or metric block type. The endpoint returns 501 for these - values — statements are constructed via `create-report`; metric construction is pending. + block_type (CreateLegacyArmBlockType): Statement-family, disclosure, metric or reconciliation block type. The + endpoint returns 501 for these values with a hint naming the operation that constructs each. payload (CreateLegacyArmPayload | Unset): Untyped payload — typed-arm validation is skipped because the dispatch handler raises 501 before the payload is consumed. """ diff --git a/robosystems_client/models/delete_legacy_arm.py b/robosystems_client/models/delete_legacy_arm.py index 44de0d9c..f4fcb9c5 100644 --- a/robosystems_client/models/delete_legacy_arm.py +++ b/robosystems_client/models/delete_legacy_arm.py @@ -22,12 +22,15 @@ class DeleteLegacyArm: a typed delete path at the API boundary. Statement-family blocks cannot be deleted per tenant (the underlying - Report should be archived via the report APIs instead). Metric - deletion is not yet implemented. Calls return HTTP 501. + Report should be archived via the report APIs instead). Disclosure + and metric structures are removed through the taxonomy-block + operations; a reconciliation stops holding the close through + `set-reconciliation-policy`. Calls return HTTP 501. Attributes: - block_type (DeleteLegacyArmBlockType): Statement-family or metric block type. Deletion returns 501 — statements - are library-seeded (archive the underlying Report instead); metric deletion is pending. + block_type (DeleteLegacyArmBlockType): Statement-family, disclosure, metric or reconciliation block type. + Deletion returns 501 — statements are library-seeded (archive the underlying Report instead); the others are + managed through their own operations, named in the 501's hint. payload (DeleteLegacyArmPayload | Unset): Untyped payload — typed-arm validation is skipped because the dispatch handler raises 501 before the payload is consumed. """ diff --git a/robosystems_client/models/execute_event_block_request.py b/robosystems_client/models/execute_event_block_request.py index be59c16f..c99cb21c 100644 --- a/robosystems_client/models/execute_event_block_request.py +++ b/robosystems_client/models/execute_event_block_request.py @@ -20,11 +20,11 @@ class ExecuteEventBlockRequest: each draft entry posts as its own JournalEntry, with the entry id as the RequestId, and its QuickBooks id is recorded per entry on `event.metadata.qb_entry_ids`. The event goes `fulfilled` once no - draft remains, or `pending` when QuickBooks rejects an entry (what - landed is kept). + draft remains. When QuickBooks rejects an entry, what landed is kept, + the status is unchanged, and the error is stamped on + `event.metadata.last_outbound_error` and returned as `qb_error`. - `'native'`-policy events fast-path through with no QB write — - RoboSystems IS the source of truth, no outbound publish needed. + Events on `'native'` or `'shadow'` books pass through with no QB write. Attributes: event_id (str): Event ID (`evt_*` ULID) to publish. The event's `metadata.connection_id` determines which QB diff --git a/robosystems_client/models/execute_event_block_response.py b/robosystems_client/models/execute_event_block_response.py index 5c428cbf..b918a472 100644 --- a/robosystems_client/models/execute_event_block_response.py +++ b/robosystems_client/models/execute_event_block_response.py @@ -28,8 +28,8 @@ class ExecuteEventBlockResponse: event_id (str): Echo of the event ID. status (str): The event's status after the call. Unchanged when no write fired (native policy, a source that does not publish) or when drafts in a later period are still unpublished. `'fulfilled'` once every draft entry - of the event is in QuickBooks and posted. `'pending'` when QuickBooks rejected an entry — see `qb_error`; retry - after fixing the underlying issue. + of the event is in QuickBooks and posted. Also unchanged when QuickBooks rejected an entry — see `qb_error`; + retry after fixing the underlying issue. qb_external_id (None | str | Unset): QuickBooks JournalEntry ID of the first entry this call published. Null when nothing was published. When a call publishes several entries, `qb_entry_ids` holds them all. qb_entry_ids (ExecuteEventBlockResponseQbEntryIdsType0 | None | Unset): Every entry of the event now in diff --git a/robosystems_client/models/information_block_envelope.py b/robosystems_client/models/information_block_envelope.py index 8c77efa0..4f28d38d 100644 --- a/robosystems_client/models/information_block_envelope.py +++ b/robosystems_client/models/information_block_envelope.py @@ -69,20 +69,17 @@ class InformationBlockEnvelope: verification_summary (None | Unset | VerificationSummary): Server-computed aggregate over `verification_results` — overall pass/fail/error/skip counts plus a per-rule_category breakdown for the grouped Verification Results panel. Null when the block has no verification results. - view (ViewProjections | Unset): 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 render as empty states without breaking the - dispatcher. - - Today: `rendering` is computed for the statement family, and - `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`. + view (ViewProjections | Unset): The server-computed View projections of an Information Block, + surfaced at the envelope boundary. + + Two are computed at envelope-build time when their source data is + available: `rendering` (the rendered rows and periods) for the + statement family, disclosures, metrics, forecasts and reconciliations, + and `chart` (panel/series config over the rendering's rows and + periods) for metric blocks. The other views a client shows are + derived from the envelope itself — a fact table from + `InformationBlockEnvelope.facts`, rule outcomes from its rules and + verification results. """ id: str diff --git a/robosystems_client/models/information_model_response.py b/robosystems_client/models/information_model_response.py index d78040ce..8aaa346e 100644 --- a/robosystems_client/models/information_model_response.py +++ b/robosystems_client/models/information_model_response.py @@ -16,8 +16,10 @@ class InformationModelResponse: """The block's intrinsic shape — concept + member arrangement patterns. Attributes: - concept_arrangement (None | str | Unset): roll_up | roll_forward | variance | adjustment | set | arithmetic | - textblock. Null for block types where the concept arrangement is implicit in their mechanics. + concept_arrangement (None | str | Unset): A Concept Arrangement Pattern: set | roll_up | roll_forward | + roll_forward_info | adjustment | variance | arithmetic | text_block, a text-block or detail level + (level1_textblock … level4_detail, table_equivalent_textblock), or grid | compound_fact. Null for block types + where the concept arrangement is implicit in their mechanics. member_arrangement (None | str | Unset): is_a | whole_part | nested_whole_part | two_dimension_aggregation | complex_aggregating_whole_part, or null if non-hypercube. """ diff --git a/robosystems_client/models/journal_entry_line_item_input.py b/robosystems_client/models/journal_entry_line_item_input.py index dfeb8d49..9ed2835a 100644 --- a/robosystems_client/models/journal_entry_line_item_input.py +++ b/robosystems_client/models/journal_entry_line_item_input.py @@ -29,22 +29,22 @@ class JournalEntryLineItemInput: debit_amount (int | Unset): Debit amount in cents. Must be 0 if `credit_amount` > 0. Default: 0. credit_amount (int | Unset): Credit amount in cents. Must be 0 if `debit_amount` > 0. Default: 0. description (None | str | Unset): Per-line memo (overrides the entry-level memo on this line). - flow_qname (None | str | Unset): The cash flow row this line's cash belongs to, an rs-gaap flow qname - (`flowCandidates(entityId)` lists the rows this company's statement offers). Only for a loan drawn or repaid, - capital put in or taken out, an asset bought or sold; omitted, the account's default flow applies. A flow set on - one side of the entry tags the untagged lines on the other: the cash flow statement reads the cash line and the - roll-forwards read the account line. On the group's consolidation entity, which moves no cash, every tagged line - counts on its own, cash-effect signed (a credit is an inflow), so an elimination offsets the flow a member's - line produced, and a tag does not spread to the other side. Refused when it is not a row of the entity's cash - flow statement. + flow_qname (None | str | Unset): The cash flow row this line's cash belongs to, an rs-gaap flow qname (`list- + flow-candidates` over MCP and `flowCandidates` over GraphQL list the rows this company's statement offers). Only + for a loan drawn or repaid, capital put in or taken out, an asset bought or sold; omitted, the account's default + flow applies. A flow set on one side of the entry tags the untagged lines on the other: the cash flow statement + reads the cash line and the roll-forwards read the account line. On the group's consolidation entity, which + moves no cash, every tagged line counts on its own, cash-effect signed (a credit is an inflow), so an + elimination offsets the flow a member's line produced, and a tag does not spread to the other side. Refused when + it is not a row of the entity's cash flow statement. dimension_ids (list[str] | None | Unset): The management dimension members this line carries (department, class, location, project), by id from `dimensions`; at most one per axis. An untagged line is read as the axis's Unallocated. metadata (JournalEntryLineItemInputMetadataType0 | None | Unset): Optional per-line metadata stamped on `LineItem.metadata_`. Used to carry source-system fields the standard columns don't cover — e.g. an external - flow-tag code that drives rollforward attribution (`transaction_description_code`), an external memo, or a cost- - center hint. Pass-through is non-validating; the renderer / filter engine reads keys it knows about and ignores - the rest. `None` is normalized to `{}` at persist time. + memo or a cost-center hint. A flow tag goes in `flow_qname`, not here. Pass-through is non-validating; the + renderer / filter engine reads keys it knows about and ignores the rest. `None` is normalized to `{}` at persist + time. """ element_id: str diff --git a/robosystems_client/models/operator_run_detail.py b/robosystems_client/models/operator_run_detail.py index ab170008..d6b29031 100644 --- a/robosystems_client/models/operator_run_detail.py +++ b/robosystems_client/models/operator_run_detail.py @@ -47,8 +47,9 @@ class OperatorRunDetail: history (list[OperatorRunDetailHistoryItem] | Unset): The prior turns the run was given, as role/content pairs transcript (list[OperatorRunDetailTranscriptItem] | Unset): One entry per model call, in order: the input added since the previous call (the question, then each turn's tool results), the model's output blocks (text and tool - calls), stop reason, token usage and credits. The first entry also carries the system prompt's SHA-256 and size - and the tool names offered; later entries repeat them only when they change + calls), stop reason, token usage, credits and sampling settings. The first entry also carries the SHA-256 and + size of the system prompt and the SHA-256 and names of the tools offered; later entries repeat them only when + they change result (OperatorRunDetailResult | Unset): The response envelope's metadata without its result rows: tokens, credits, the Cypher run, the writes made, confidence and loop flags """ diff --git a/robosystems_client/models/portfolio_block_envelope.py b/robosystems_client/models/portfolio_block_envelope.py index 3470d123..b5a0d557 100644 --- a/robosystems_client/models/portfolio_block_envelope.py +++ b/robosystems_client/models/portfolio_block_envelope.py @@ -31,9 +31,8 @@ class PortfolioBlockEnvelope: id (str): Portfolio ID (`port_*` ULID). name (str): Display name. base_currency (str): ISO 4217 currency code for portfolio aggregates. - positions (list[PositionBlock]): All positions in this portfolio, including disposed ones (filter by `status` - for active-only display). - total_cost_basis_dollars (float): Sum of `cost_basis_dollars` across every position. + positions (list[PositionBlock]): The portfolio's active positions; disposed ones are not included. + total_cost_basis_dollars (float): Sum of `cost_basis_dollars` across the active positions. active_position_count (int): Count of positions with `status='active'`. created_at (datetime.datetime): Row creation timestamp (UTC). updated_at (datetime.datetime): Last-modified timestamp (UTC). @@ -41,8 +40,8 @@ class PortfolioBlockEnvelope: strategy (None | str | Unset): Free-text strategy classification. inception_date (datetime.date | None | Unset): Date the portfolio was established. owner (EntityLite | None | Unset): Embedded owning entity, when set. `null` for unattributed portfolios. - total_current_value_dollars (float | None | Unset): Sum of `current_value_dollars` across every position. `null` - when any active position lacks a mark. + total_current_value_dollars (float | None | Unset): Sum of `current_value_dollars` across the marked active + positions; an unmarked one adds nothing. `null` only when no active position has a mark. """ id: str diff --git a/robosystems_client/models/position_block.py b/robosystems_client/models/position_block.py index 171f0d86..a3a989d2 100644 --- a/robosystems_client/models/position_block.py +++ b/robosystems_client/models/position_block.py @@ -30,8 +30,7 @@ class PositionBlock: quantity (float): Quantity held in `quantity_type` units. quantity_type (str): Unit basis (`shares`, `units`, `principal`). cost_basis_dollars (float): Cost basis in dollars (pre-converted from cents). - status (str): Lifecycle state (`active`, `disposed`, `archived`). See `PositionResponse.status` for the full - vocabulary. + status (str): Lifecycle state (`active`, `disposed`). See `PositionResponse.status` for the full vocabulary. security (SecurityLite): Lightweight security projection for embedding in position envelopes. Skips `terms`, `outstanding_shares`, etc. — fetch the full `SecurityResponse` when those are needed. diff --git a/robosystems_client/models/rendering_row_lite.py b/robosystems_client/models/rendering_row_lite.py index 2aef0549..7aa0f41d 100644 --- a/robosystems_client/models/rendering_row_lite.py +++ b/robosystems_client/models/rendering_row_lite.py @@ -15,10 +15,12 @@ class RenderingRowLite: """One row of a server-side rendered statement. - Mirrors :class:`FactRow` in + Drawn from :class:`FactRow` in :mod:`robosystems.operations.roboledger.reports.fact_grid`, restated at the - API boundary so envelope consumers don't depend on that module. `values` - holds one entry per period column in :class:`RenderingLite.periods`. + API boundary so envelope consumers don't depend on that module. It does not + carry FactRow's `is_abstract`, `position` or `period_role` (the start/end + role that tells a roll-forward's two balance rows apart). + `values` holds one entry per period column in :class:`RenderingLite.periods`. Attributes: element_id (str): diff --git a/robosystems_client/models/update_event_block_request.py b/robosystems_client/models/update_event_block_request.py index 5a0e667a..8a38de54 100644 --- a/robosystems_client/models/update_event_block_request.py +++ b/robosystems_client/models/update_event_block_request.py @@ -63,8 +63,8 @@ class UpdateEventBlockRequest: document: one row per invoice or bill with the positive cents applied to it, together at most the payment's amount (the rest is unapplied). Replaces any held; an empty list clears them, and the settlement link becomes the first row's. Each must be an obligation of this event's entity, not voided: an invoice for money in, a bill - for money out. A person chooses them; the open items a bank line may settle are `dischargeCandidates` over - GraphQL. + for money out. A person chooses them; the open items a bank line may settle are `list-discharge-candidates` over + MCP and `dischargeCandidates` over GraphQL. document_id (None | str | Unset): Set or replace the stored document the event rests on; an empty string detaches it. Must be a document on this graph. Unset = unchanged. """ diff --git a/robosystems_client/models/update_legacy_arm.py b/robosystems_client/models/update_legacy_arm.py index 405e5681..8dcac977 100644 --- a/robosystems_client/models/update_legacy_arm.py +++ b/robosystems_client/models/update_legacy_arm.py @@ -18,16 +18,18 @@ @_attrs_define class UpdateLegacyArm: - """Update-information-block body for block types that don't yet have - a typed update path at the API boundary. + """Update-information-block body for block types updated through + another operation. - Statement-family blocks are library-seeded and immutable. Metric - block updates are not yet implemented. Calling this endpoint with - one of these block types returns HTTP 501. + Statement-family blocks are library-seeded and immutable. Disclosure + and metric structures change through the taxonomy-block operations; + a reconciliation's policy through `set-reconciliation-policy`. + Calling this endpoint with one of these block types returns HTTP 501. Attributes: - block_type (UpdateLegacyArmBlockType): Statement-family or metric block type. Updates return 501 — statement - Structures are library-seeded; metric updates are pending. + block_type (UpdateLegacyArmBlockType): Statement-family, disclosure, metric or reconciliation block type. + Updates return 501 — statement Structures are library-seeded; the others change through their own operations, + named in the 501's hint. payload (UpdateLegacyArmPayload | Unset): Untyped payload — typed-arm validation is skipped because the dispatch handler raises 501 before the payload is consumed. """ diff --git a/robosystems_client/models/update_security_operation.py b/robosystems_client/models/update_security_operation.py index c7623efb..f73b4569 100644 --- a/robosystems_client/models/update_security_operation.py +++ b/robosystems_client/models/update_security_operation.py @@ -29,8 +29,8 @@ class UpdateSecurityOperation: security_type (None | str | Unset): New instrument family. Unset = unchanged. Reclassifying a security may invalidate existing `terms` shape; the operation does not validate the cross-field consistency. security_subtype (None | str | Unset): New subtype refinement. Unset = unchanged. - terms (None | Unset | UpdateSecurityOperationTermsType0): Replacement terms blob. Pass `null`/omit to leave - existing terms unchanged; pass `{}` to clear them. + terms (None | Unset | UpdateSecurityOperationTermsType0): Replacement terms blob. Omit to leave existing terms + unchanged; pass `{}` to clear them. is_active (bool | None | Unset): Active flag. Set `false` to soft-deactivate (positions remain addressable but the security is hidden from active lookups). authorized_shares (int | None | Unset): New authorized share count. Unset = unchanged. diff --git a/robosystems_client/models/view_projections.py b/robosystems_client/models/view_projections.py index f921e3d2..6299cf0d 100644 --- a/robosystems_client/models/view_projections.py +++ b/robosystems_client/models/view_projections.py @@ -18,20 +18,17 @@ @_attrs_define class ViewProjections: - """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 render as empty states without breaking the - dispatcher. - - Today: `rendering` is computed for the statement family, and - `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`. + """The server-computed View projections of an Information Block, + surfaced at the envelope boundary. + + Two are computed at envelope-build time when their source data is + available: `rendering` (the rendered rows and periods) for the + statement family, disclosures, metrics, forecasts and reconciliations, + and `chart` (panel/series config over the rendering's rows and + periods) for metric blocks. The other views a client shows are + derived from the envelope itself — a fact table from + `InformationBlockEnvelope.facts`, rule outcomes from its rules and + verification results. Attributes: rendering (None | RenderingLite | Unset): diff --git a/tests/test_operator_client_ops.py b/tests/test_operator_client_ops.py index 9bdc2189..ef605bee 100644 --- a/tests/test_operator_client_ops.py +++ b/tests/test_operator_client_ops.py @@ -291,3 +291,39 @@ def test_rest_client_uses_provider_credential(self, mock_auto, mock_config, grap rest_client = mock_auto.call_args.kwargs["client"] assert rest_client._headers == {"X-API-Key": "rfs_fresh"} + + +@pytest.mark.unit +class TestOperatorRequestBody: + """Unset booleans are left out of the body: the server types them as + true/false with their own defaults, and a JSON null is a 422.""" + + @patch("robosystems_client.clients.operator_client.auto_select_operator") + def test_default_request_omits_unset_flags(self, mock_auto, mock_config, graph_id): + resp = Mock() + resp.parsed = {"content": "ok", "operator_used": "analyst", "mode_used": "quick"} + mock_auto.return_value = resp + + _run(OperatorClient(mock_config), graph_id) + + body = mock_auto.call_args.kwargs["body"].to_dict() + assert "enable_rag" not in body + assert "force_extended_analysis" not in body + + @patch("robosystems_client.clients.operator_client.execute_specific_operator") + def test_set_flags_are_sent(self, mock_exec, mock_config, graph_id): + resp = Mock() + resp.parsed = {"content": "ok", "operator_used": "analyst", "mode_used": "quick"} + mock_exec.return_value = resp + + OperatorClient(mock_config).execute_operator( + graph_id, + "analyst", + OperatorQueryRequest( + message="burn?", enable_rag=False, force_extended_analysis=True + ), + ) + + body = mock_exec.call_args.kwargs["body"].to_dict() + assert body["enable_rag"] is False + assert body["force_extended_analysis"] is True