diff --git a/robosystems_client/api/extensions_robo_ledger/op_evaluate_rules.py b/robosystems_client/api/extensions_robo_ledger/op_evaluate_rules.py index b8e375a..93715f4 100644 --- a/robosystems_client/api/extensions_robo_ledger/op_evaluate_rules.py +++ b/robosystems_client/api/extensions_robo_ledger/op_evaluate_rules.py @@ -119,8 +119,7 @@ def sync_detailed( Args: graph_id (str): idempotency_key (None | str | Unset): - body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation (Phase - delta.3). + body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation. Runs every rule scoped to ``structure_id`` (plus element/association- scoped rules for the structure's atoms), binds ``$Variable`` references @@ -172,8 +171,7 @@ def sync( Args: graph_id (str): idempotency_key (None | str | Unset): - body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation (Phase - delta.3). + body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation. Runs every rule scoped to ``structure_id`` (plus element/association- scoped rules for the structure's atoms), binds ``$Variable`` references @@ -220,8 +218,7 @@ async def asyncio_detailed( Args: graph_id (str): idempotency_key (None | str | Unset): - body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation (Phase - delta.3). + body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation. Runs every rule scoped to ``structure_id`` (plus element/association- scoped rules for the structure's atoms), binds ``$Variable`` references @@ -271,8 +268,7 @@ async def asyncio( Args: graph_id (str): idempotency_key (None | str | Unset): - body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation (Phase - delta.3). + body (EvaluateRulesRequest): Request body for the ``evaluate-rules`` operation. Runs every rule scoped to ``structure_id`` (plus element/association- scoped rules for the structure's atoms), binds ``$Variable`` references diff --git a/robosystems_client/api/extensions_robo_ledger/op_update_taxonomy_block.py b/robosystems_client/api/extensions_robo_ledger/op_update_taxonomy_block.py index 9ed379b..8f10522 100644 --- a/robosystems_client/api/extensions_robo_ledger/op_update_taxonomy_block.py +++ b/robosystems_client/api/extensions_robo_ledger/op_update_taxonomy_block.py @@ -123,8 +123,8 @@ def sync_detailed( Top-level fields (name / description / version) apply to the taxonomy row itself. The delta lists mutate atoms incrementally — the validator - (Phase 2.3) re-runs the seven-phase check across the projected post- - update state before anything commits. + re-runs every create-time check across the projected post-update + state before anything commits. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,8 +171,8 @@ def sync( Top-level fields (name / description / version) apply to the taxonomy row itself. The delta lists mutate atoms incrementally — the validator - (Phase 2.3) re-runs the seven-phase check across the projected post- - update state before anything commits. + re-runs every create-time check across the projected post-update + state before anything commits. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,8 +214,8 @@ async def asyncio_detailed( Top-level fields (name / description / version) apply to the taxonomy row itself. The delta lists mutate atoms incrementally — the validator - (Phase 2.3) re-runs the seven-phase check across the projected post- - update state before anything commits. + re-runs every create-time check across the projected post-update + state before anything commits. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -260,8 +260,8 @@ async def asyncio( Top-level fields (name / description / version) apply to the taxonomy row itself. The delta lists mutate atoms incrementally — the validator - (Phase 2.3) re-runs the seven-phase check across the projected post- - update state before anything commits. + re-runs every create-time check across the projected post-update + state before anything commits. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/robosystems_client/clients/ledger_client.py b/robosystems_client/clients/ledger_client.py index da301c9..b1cd9d8 100644 --- a/robosystems_client/clients/ledger_client.py +++ b/robosystems_client/clients/ledger_client.py @@ -208,6 +208,9 @@ from ..models.create_event_block_request_event_category import ( CreateEventBlockRequestEventCategory, ) +from ..models.create_event_block_request_event_class import ( + CreateEventBlockRequestEventClass, +) from ..models.create_event_block_request_metadata import ( CreateEventBlockRequestMetadata, ) @@ -360,6 +363,9 @@ def _build_event_block_request( occurred_at: str, metadata: dict[str, Any], source: str = "native", + event_class: str = "economic", + obligated_by_event_id: str | None = None, + discharges_event_id: str | None = None, ) -> CreateEventBlockRequest: """Build a ``CreateEventBlockRequest`` for one of the registered handlers. @@ -377,6 +383,13 @@ def _build_event_block_request( occurred_at=occurred_dt, apply_handlers=True, metadata=CreateEventBlockRequestMetadata.from_dict(metadata), + event_class=CreateEventBlockRequestEventClass(event_class), + obligated_by_event_id=obligated_by_event_id + if obligated_by_event_id is not None + else UNSET, + discharges_event_id=discharges_event_id + if discharges_event_id is not None + else UNSET, ) # ── Entity ────────────────────────────────────────────────────────── @@ -1069,6 +1082,30 @@ def reverse_journal_entry( # ── Event blocks (generic preview + status transitions) ────────────── + def create_event_block( + self, + graph_id: str, + body: dict[str, Any], + idempotency_key: str | None = None, + ) -> dict[str, Any]: + """Create an event block directly from a dict. + + Use for support-class events (``event_class='support'``) with categories + ``approval``, ``control``, ``reconciliation``, or ``inquiry``, which + are not covered by the specialized helpers. Economic events should + generally go through ``create_journal_entry``, ``create_closing_entry``, + etc., but this method works for those too. + """ + request = CreateEventBlockRequest.from_dict(body) + response = op_create_event_block( + graph_id=graph_id, + body=request, + client=self._get_client(), + idempotency_key=idempotency_key if idempotency_key is not None else UNSET, + ) + envelope = self._call_op("Create event block", response) + return envelope.result or {} + def preview_event_block( self, graph_id: str, @@ -1098,7 +1135,8 @@ def update_event_block( Use for posting drafts (``classified`` → ``committed`` → ``fulfilled``), voiding, superseding (correction chains), or patching ``description``, - ``effective_at``, or ``metadata``. + ``effective_at``, ``metadata``, ``obligated_by_event_id``, or + ``discharges_event_id``. """ request = UpdateEventBlockRequest.from_dict(body) response = op_update_event_block( diff --git a/robosystems_client/models/__init__.py b/robosystems_client/models/__init__.py index 6ccf497..902f0ef 100644 --- a/robosystems_client/models/__init__.py +++ b/robosystems_client/models/__init__.py @@ -70,6 +70,7 @@ from .create_event_block_request_event_category import ( CreateEventBlockRequestEventCategory, ) +from .create_event_block_request_event_class import CreateEventBlockRequestEventClass from .create_event_block_request_metadata import CreateEventBlockRequestMetadata from .create_event_block_request_resource_type_type_0 import ( CreateEventBlockRequestResourceTypeType0, @@ -473,6 +474,7 @@ "CreateConnectionRequestProvider", "CreateEventBlockRequest", "CreateEventBlockRequestEventCategory", + "CreateEventBlockRequestEventClass", "CreateEventBlockRequestMetadata", "CreateEventBlockRequestResourceTypeType0", "CreateEventHandlerRequest", diff --git a/robosystems_client/models/create_event_block_request.py b/robosystems_client/models/create_event_block_request.py index 501e0ff..315264b 100644 --- a/robosystems_client/models/create_event_block_request.py +++ b/robosystems_client/models/create_event_block_request.py @@ -11,6 +11,9 @@ from ..models.create_event_block_request_event_category import ( CreateEventBlockRequestEventCategory, ) +from ..models.create_event_block_request_event_class import ( + CreateEventBlockRequestEventClass, +) from ..models.create_event_block_request_resource_type_type_0 import ( CreateEventBlockRequestResourceTypeType0, ) @@ -31,10 +34,15 @@ class CreateEventBlockRequest: Attributes: event_type (str): Open vocabulary: 'invoice_issued' | 'contract_signed' | 'bank_transaction' | ... - event_category (CreateEventBlockRequestEventCategory): REA economic classification. One of: sales, purchase, - financing, payroll, treasury, adjustment, recognition, other. + event_category (CreateEventBlockRequestEventCategory): REA classification. Economic categories (sales, purchase, + financing, payroll, treasury, adjustment, recognition, other) require event_class='economic'. Support categories + (control, approval, reconciliation, inquiry) require event_class='support'. The DB CHECK rejects mismatched + pairings. occurred_at (datetime.datetime): When the event happened in the real world source (str): 'quickbooks' | 'xero' | 'plaid' | 'native' | 'scheduled' | ... + event_class (CreateEventBlockRequestEventClass | Unset): REA event class. 'economic' events change resources and + drive GL postings; 'support' events are audit-trail / value-chain primitives (typically captured with + apply_handlers=False). Default: CreateEventBlockRequestEventClass.ECONOMIC. agent_id (None | str | Unset): Counterparty agent id resource_type (CreateEventBlockRequestResourceTypeType0 | None | Unset): REA resource kind. One of: goods, services, money, right, obligation, information, labor. @@ -48,6 +56,10 @@ class CreateEventBlockRequest: description (None | str | Unset): metadata (CreateEventBlockRequestMetadata | Unset): Event-type-specific payload dimension_ids (list[str] | Unset): + obligated_by_event_id (None | str | Unset): Forward-materialization link: the event that scheduled or obligated + this one (e.g. depreciation entries point at the asset_acquired event). + discharges_event_id (None | str | Unset): Settlement link: the obligation this event discharges (e.g. + cash_received pointing at the originating sale_invoiced). apply_handlers (bool | Unset): When True, resolves the event_type to a handler (Python registry first, then DSL) and fires it atomically with event creation. Default: False. """ @@ -56,6 +68,9 @@ class CreateEventBlockRequest: event_category: CreateEventBlockRequestEventCategory occurred_at: datetime.datetime source: str + event_class: CreateEventBlockRequestEventClass | Unset = ( + CreateEventBlockRequestEventClass.ECONOMIC + ) agent_id: None | str | Unset = UNSET resource_type: CreateEventBlockRequestResourceTypeType0 | None | Unset = UNSET resource_element_id: None | str | Unset = UNSET @@ -67,6 +82,8 @@ class CreateEventBlockRequest: description: None | str | Unset = UNSET metadata: CreateEventBlockRequestMetadata | Unset = UNSET dimension_ids: list[str] | Unset = UNSET + obligated_by_event_id: None | str | Unset = UNSET + discharges_event_id: None | str | Unset = UNSET apply_handlers: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -79,6 +96,10 @@ def to_dict(self) -> dict[str, Any]: source = self.source + event_class: str | Unset = UNSET + if not isinstance(self.event_class, Unset): + event_class = self.event_class.value + agent_id: None | str | Unset if isinstance(self.agent_id, Unset): agent_id = UNSET @@ -141,6 +162,18 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.dimension_ids, Unset): dimension_ids = self.dimension_ids + obligated_by_event_id: None | str | Unset + if isinstance(self.obligated_by_event_id, Unset): + obligated_by_event_id = UNSET + else: + obligated_by_event_id = self.obligated_by_event_id + + discharges_event_id: None | str | Unset + if isinstance(self.discharges_event_id, Unset): + discharges_event_id = UNSET + else: + discharges_event_id = self.discharges_event_id + apply_handlers = self.apply_handlers field_dict: dict[str, Any] = {} @@ -153,6 +186,8 @@ def to_dict(self) -> dict[str, Any]: "source": source, } ) + if event_class is not UNSET: + field_dict["event_class"] = event_class if agent_id is not UNSET: field_dict["agent_id"] = agent_id if resource_type is not UNSET: @@ -175,6 +210,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["metadata"] = metadata if dimension_ids is not UNSET: field_dict["dimension_ids"] = dimension_ids + if obligated_by_event_id is not UNSET: + field_dict["obligated_by_event_id"] = obligated_by_event_id + if discharges_event_id is not UNSET: + field_dict["discharges_event_id"] = discharges_event_id if apply_handlers is not UNSET: field_dict["apply_handlers"] = apply_handlers @@ -195,6 +234,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: source = d.pop("source") + _event_class = d.pop("event_class", UNSET) + event_class: CreateEventBlockRequestEventClass | Unset + if isinstance(_event_class, Unset): + event_class = UNSET + else: + event_class = CreateEventBlockRequestEventClass(_event_class) + def _parse_agent_id(data: object) -> None | str | Unset: if data is None: return data @@ -298,6 +344,28 @@ def _parse_description(data: object) -> None | str | Unset: dimension_ids = cast(list[str], d.pop("dimension_ids", UNSET)) + def _parse_obligated_by_event_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + obligated_by_event_id = _parse_obligated_by_event_id( + d.pop("obligated_by_event_id", UNSET) + ) + + def _parse_discharges_event_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + discharges_event_id = _parse_discharges_event_id( + d.pop("discharges_event_id", UNSET) + ) + apply_handlers = d.pop("apply_handlers", UNSET) create_event_block_request = cls( @@ -305,6 +373,7 @@ def _parse_description(data: object) -> None | str | Unset: event_category=event_category, occurred_at=occurred_at, source=source, + event_class=event_class, agent_id=agent_id, resource_type=resource_type, resource_element_id=resource_element_id, @@ -316,6 +385,8 @@ def _parse_description(data: object) -> None | str | Unset: description=description, metadata=metadata, dimension_ids=dimension_ids, + obligated_by_event_id=obligated_by_event_id, + discharges_event_id=discharges_event_id, apply_handlers=apply_handlers, ) diff --git a/robosystems_client/models/create_event_block_request_event_category.py b/robosystems_client/models/create_event_block_request_event_category.py index ee3b04d..adde24a 100644 --- a/robosystems_client/models/create_event_block_request_event_category.py +++ b/robosystems_client/models/create_event_block_request_event_category.py @@ -3,11 +3,15 @@ class CreateEventBlockRequestEventCategory(str, Enum): ADJUSTMENT = "adjustment" + APPROVAL = "approval" + CONTROL = "control" FINANCING = "financing" + INQUIRY = "inquiry" OTHER = "other" PAYROLL = "payroll" PURCHASE = "purchase" RECOGNITION = "recognition" + RECONCILIATION = "reconciliation" SALES = "sales" TREASURY = "treasury" diff --git a/robosystems_client/models/create_event_block_request_event_class.py b/robosystems_client/models/create_event_block_request_event_class.py new file mode 100644 index 0000000..4adf44d --- /dev/null +++ b/robosystems_client/models/create_event_block_request_event_class.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CreateEventBlockRequestEventClass(str, Enum): + ECONOMIC = "economic" + SUPPORT = "support" + + def __str__(self) -> str: + return str(self.value) diff --git a/robosystems_client/models/element_update_patch.py b/robosystems_client/models/element_update_patch.py index d8638e7..f09db6a 100644 --- a/robosystems_client/models/element_update_patch.py +++ b/robosystems_client/models/element_update_patch.py @@ -25,7 +25,7 @@ class ElementUpdatePatch: qname (str): qname identifier of the element to update. name (None | str | Unset): description (None | str | Unset): - classification (None | str | Unset): + trait (None | str | Unset): balance_type (None | str | Unset): period_type (None | str | Unset): is_monetary (bool | None | Unset): @@ -37,7 +37,7 @@ class ElementUpdatePatch: qname: str name: None | str | Unset = UNSET description: None | str | Unset = UNSET - classification: None | str | Unset = UNSET + trait: None | str | Unset = UNSET balance_type: None | str | Unset = UNSET period_type: None | str | Unset = UNSET is_monetary: bool | None | Unset = UNSET @@ -65,11 +65,11 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description - classification: None | str | Unset - if isinstance(self.classification, Unset): - classification = UNSET + trait: None | str | Unset + if isinstance(self.trait, Unset): + trait = UNSET else: - classification = self.classification + trait = self.trait balance_type: None | str | Unset if isinstance(self.balance_type, Unset): @@ -120,8 +120,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["name"] = name if description is not UNSET: field_dict["description"] = description - if classification is not UNSET: - field_dict["classification"] = classification + if trait is not UNSET: + field_dict["trait"] = trait if balance_type is not UNSET: field_dict["balance_type"] = balance_type if period_type is not UNSET: @@ -164,14 +164,14 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) - def _parse_classification(data: object) -> None | str | Unset: + def _parse_trait(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data return cast(None | str | Unset, data) - classification = _parse_classification(d.pop("classification", UNSET)) + trait = _parse_trait(d.pop("trait", UNSET)) def _parse_balance_type(data: object) -> None | str | Unset: if data is None: @@ -239,7 +239,7 @@ def _parse_metadata(data: object) -> ElementUpdatePatchMetadataType0 | None | Un qname=qname, name=name, description=description, - classification=classification, + trait=trait, balance_type=balance_type, period_type=period_type, is_monetary=is_monetary, diff --git a/robosystems_client/models/evaluate_rules_request.py b/robosystems_client/models/evaluate_rules_request.py index 158f716..c8badc2 100644 --- a/robosystems_client/models/evaluate_rules_request.py +++ b/robosystems_client/models/evaluate_rules_request.py @@ -15,7 +15,7 @@ @_attrs_define class EvaluateRulesRequest: - """Request body for the ``evaluate-rules`` operation (Phase delta.3). + """Request body for the ``evaluate-rules`` operation. Runs every rule scoped to ``structure_id`` (plus element/association- scoped rules for the structure's atoms), binds ``$Variable`` references @@ -29,7 +29,7 @@ class EvaluateRulesRequest: Attributes: structure_id (str): fact_set_id (None | str | Unset): Optional FactSet id to stamp on each VerificationResult row. Allows results to - be scoped to a specific period run when the FactSet table is populated (Phase zeta expand pass). + be scoped to a specific period run once write paths populate the FactSet table on every run. period_start (datetime.date | None | Unset): Lower bound on the fact period window (inclusive). period_end (datetime.date | None | Unset): Upper bound on the fact period window (inclusive). """ diff --git a/robosystems_client/models/taxonomy_block_element_request.py b/robosystems_client/models/taxonomy_block_element_request.py index 621f963..2adccec 100644 --- a/robosystems_client/models/taxonomy_block_element_request.py +++ b/robosystems_client/models/taxonomy_block_element_request.py @@ -31,8 +31,8 @@ class TaxonomyBlockElementRequest: qname (str): Envelope-local element identifier. Must be unique within the envelope's ``elements`` list. Used as the reference token for associations, rules, and update patches. name (str): Human-readable element name (e.g. 'Total Assets'). - classification (None | str | Unset): FASB metamodel trait for the element. Required for ``chart_of_accounts`` - blocks; optional for ``custom_ontology``. + trait (None | str | Unset): FASB metamodel trait for the element. Required for ``chart_of_accounts`` blocks; + optional for ``custom_ontology``. balance_type (None | str | Unset): 'debit' | 'credit' | null for non-monetary concepts. element_type (str | Unset): 'concept' | 'abstract' | 'axis' | 'member' | 'hypercube'. Default: 'concept'. period_type (None | str | Unset): 'instant' | 'duration' | null (null = derive from classification during @@ -49,7 +49,7 @@ class TaxonomyBlockElementRequest: qname: str name: str - classification: None | str | Unset = UNSET + trait: None | str | Unset = UNSET balance_type: None | str | Unset = UNSET element_type: str | Unset = "concept" period_type: None | str | Unset = UNSET @@ -66,11 +66,11 @@ def to_dict(self) -> dict[str, Any]: name = self.name - classification: None | str | Unset - if isinstance(self.classification, Unset): - classification = UNSET + trait: None | str | Unset + if isinstance(self.trait, Unset): + trait = UNSET else: - classification = self.classification + trait = self.trait balance_type: None | str | Unset if isinstance(self.balance_type, Unset): @@ -124,8 +124,8 @@ def to_dict(self) -> dict[str, Any]: "name": name, } ) - if classification is not UNSET: - field_dict["classification"] = classification + if trait is not UNSET: + field_dict["trait"] = trait if balance_type is not UNSET: field_dict["balance_type"] = balance_type if element_type is not UNSET: @@ -158,14 +158,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") - def _parse_classification(data: object) -> None | str | Unset: + def _parse_trait(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data return cast(None | str | Unset, data) - classification = _parse_classification(d.pop("classification", UNSET)) + trait = _parse_trait(d.pop("trait", UNSET)) def _parse_balance_type(data: object) -> None | str | Unset: if data is None: @@ -235,7 +235,7 @@ def _parse_parent_ref(data: object) -> None | str | Unset: taxonomy_block_element_request = cls( qname=qname, name=name, - classification=classification, + trait=trait, balance_type=balance_type, element_type=element_type, period_type=period_type, diff --git a/robosystems_client/models/update_event_block_request.py b/robosystems_client/models/update_event_block_request.py index 7708ad6..a55b8f2 100644 --- a/robosystems_client/models/update_event_block_request.py +++ b/robosystems_client/models/update_event_block_request.py @@ -31,16 +31,18 @@ class UpdateEventBlockRequest: Attributes: event_id (str): transition_to (None | Unset | UpdateEventBlockRequestTransitionToType0): Status transition. Valid moves depend - on current status: captured → committed | voided; classified → committed | pending | fulfilled | voided; - committed → pending | fulfilled | voided; pending → fulfilled | voided. Terminal states (fulfilled, voided, - superseded) accept no further transitions. Note: classified and fulfilled are usually set by handlers, not by - callers, but the transition is allowed for corrections. + on current status: captured → committed | voided | superseded; classified → committed | pending | fulfilled | + voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | + superseded. Terminal states (fulfilled, voided, superseded) accept no further transitions. Note: classified and + fulfilled are usually set by handlers, not by callers, but the transition is allowed for corrections. superseded_by_id (None | str | Unset): New event id that replaces this one. Required when transition_to='superseded'. description (None | str | Unset): effective_at (datetime.datetime | None | Unset): metadata_patch (UpdateEventBlockRequestMetadataPatch | Unset): Key-value pairs merged into existing metadata (additive patch, not replace). + obligated_by_event_id (None | str | Unset): Set/update the forward-materialization link. + discharges_event_id (None | str | Unset): Set/update the settlement link. """ event_id: str @@ -49,6 +51,8 @@ class UpdateEventBlockRequest: description: None | str | Unset = UNSET effective_at: datetime.datetime | None | Unset = UNSET metadata_patch: UpdateEventBlockRequestMetadataPatch | Unset = UNSET + obligated_by_event_id: None | str | Unset = UNSET + discharges_event_id: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -86,6 +90,18 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.metadata_patch, Unset): metadata_patch = self.metadata_patch.to_dict() + obligated_by_event_id: None | str | Unset + if isinstance(self.obligated_by_event_id, Unset): + obligated_by_event_id = UNSET + else: + obligated_by_event_id = self.obligated_by_event_id + + discharges_event_id: None | str | Unset + if isinstance(self.discharges_event_id, Unset): + discharges_event_id = UNSET + else: + discharges_event_id = self.discharges_event_id + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -103,6 +119,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["effective_at"] = effective_at if metadata_patch is not UNSET: field_dict["metadata_patch"] = metadata_patch + if obligated_by_event_id is not UNSET: + field_dict["obligated_by_event_id"] = obligated_by_event_id + if discharges_event_id is not UNSET: + field_dict["discharges_event_id"] = discharges_event_id return field_dict @@ -176,6 +196,28 @@ def _parse_effective_at(data: object) -> datetime.datetime | None | Unset: else: metadata_patch = UpdateEventBlockRequestMetadataPatch.from_dict(_metadata_patch) + def _parse_obligated_by_event_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + obligated_by_event_id = _parse_obligated_by_event_id( + d.pop("obligated_by_event_id", UNSET) + ) + + def _parse_discharges_event_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + discharges_event_id = _parse_discharges_event_id( + d.pop("discharges_event_id", UNSET) + ) + update_event_block_request = cls( event_id=event_id, transition_to=transition_to, @@ -183,6 +225,8 @@ def _parse_effective_at(data: object) -> datetime.datetime | None | Unset: description=description, effective_at=effective_at, metadata_patch=metadata_patch, + obligated_by_event_id=obligated_by_event_id, + discharges_event_id=discharges_event_id, ) update_event_block_request.additional_properties = d diff --git a/robosystems_client/models/update_taxonomy_block_request.py b/robosystems_client/models/update_taxonomy_block_request.py index f6710e3..51906e2 100644 --- a/robosystems_client/models/update_taxonomy_block_request.py +++ b/robosystems_client/models/update_taxonomy_block_request.py @@ -28,8 +28,8 @@ class UpdateTaxonomyBlockRequest: Top-level fields (name / description / version) apply to the taxonomy row itself. The delta lists mutate atoms incrementally — the validator - (Phase 2.3) re-runs the seven-phase check across the projected post- - update state before anything commits. + re-runs every create-time check across the projected post-update + state before anything commits. Attributes: taxonomy_id (str):