From 633201ce569d7ae06dc9771addc094d152782fe0 Mon Sep 17 00:00:00 2001 From: "Joseph T. French" Date: Sat, 24 Oct 2026 20:36:34 -0500 Subject: [PATCH] Regenerate the client for the API's new request fields --- .../api/connections/create_connection.py | 16 +++-- .../api/connections/list_connections.py | 8 +-- .../api/graph_operations/delete_graph.py | 60 ++++++++++++++----- robosystems_client/graphql/schema.graphql | 2 +- .../models/accept_suggestions_request.py | 21 +------ .../models/backup_create_request.py | 21 +------ .../models/cancel_subscription_request.py | 21 +------ .../models/connection_response.py | 4 +- .../models/create_connection_request.py | 3 +- robosystems_client/models/delete_graph_op.py | 6 +- .../models/index_document_op.py | 21 +------ .../models/initialize_ledger_request.py | 21 +------ .../learn_classification_defaults_request.py | 21 +------ robosystems_client/models/materialize_op.py | 21 +------ .../models/operation_resume_request.py | 21 +------ .../models/promote_obligations_request.py | 21 +------ .../models/sso_complete_request.py | 25 +++++++- .../models/sso_exchange_request.py | 21 +++++++ .../models/sync_connection_request.py | 21 +------ .../models/update_event_handler_request.py | 37 +++++++++++- 20 files changed, 162 insertions(+), 230 deletions(-) diff --git a/robosystems_client/api/connections/create_connection.py b/robosystems_client/api/connections/create_connection.py index 209a7b24..3a07a186 100644 --- a/robosystems_client/api/connections/create_connection.py +++ b/robosystems_client/api/connections/create_connection.py @@ -115,7 +115,9 @@ def sync_detailed( Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks - keeps; QuickBooks is refused (409) when the group parent's books are already native. + keeps. QuickBooks keeps the group parent's books only: `entity_id` may be omitted, and naming a + subsidiary is refused (409 PARENT_ONLY); it is refused (409) too when the group parent's books are + already native. Every connection's `entity_id` is the entity whose books it keeps. Args: graph_id (str): @@ -157,7 +159,9 @@ def sync( Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks - keeps; QuickBooks is refused (409) when the group parent's books are already native. + keeps. QuickBooks keeps the group parent's books only: `entity_id` may be omitted, and naming a + subsidiary is refused (409 PARENT_ONLY); it is refused (409) too when the group parent's books are + already native. Every connection's `entity_id` is the entity whose books it keeps. Args: graph_id (str): @@ -194,7 +198,9 @@ async def asyncio_detailed( Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks - keeps; QuickBooks is refused (409) when the group parent's books are already native. + keeps. QuickBooks keeps the group parent's books only: `entity_id` may be omitted, and naming a + subsidiary is refused (409 PARENT_ONLY); it is refused (409) too when the group parent's books are + already native. Every connection's `entity_id` is the entity whose books it keeps. Args: graph_id (str): @@ -234,7 +240,9 @@ async def asyncio( Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks - keeps; QuickBooks is refused (409) when the group parent's books are already native. + keeps. QuickBooks keeps the group parent's books only: `entity_id` may be omitted, and naming a + subsidiary is refused (409 PARENT_ONLY); it is refused (409) too when the group parent's books are + already native. Every connection's `entity_id` is the entity whose books it keeps. Args: graph_id (str): diff --git a/robosystems_client/api/connections/list_connections.py b/robosystems_client/api/connections/list_connections.py index 55ce99f7..130f4942 100644 --- a/robosystems_client/api/connections/list_connections.py +++ b/robosystems_client/api/connections/list_connections.py @@ -127,7 +127,7 @@ def sync_detailed( Args: graph_id (str): - entity_id (None | str | Unset): Filter by entity ID + entity_id (None | str | Unset): Only the connections that keep this entity's books provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type Raises: @@ -162,7 +162,7 @@ def sync( Args: graph_id (str): - entity_id (None | str | Unset): Filter by entity ID + entity_id (None | str | Unset): Only the connections that keep this entity's books provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type Raises: @@ -192,7 +192,7 @@ async def asyncio_detailed( Args: graph_id (str): - entity_id (None | str | Unset): Filter by entity ID + entity_id (None | str | Unset): Only the connections that keep this entity's books provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type Raises: @@ -225,7 +225,7 @@ async def asyncio( Args: graph_id (str): - entity_id (None | str | Unset): Filter by entity ID + entity_id (None | str | Unset): Only the connections that keep this entity's books provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type Raises: diff --git a/robosystems_client/api/graph_operations/delete_graph.py b/robosystems_client/api/graph_operations/delete_graph.py index c16cc405..7695f314 100644 --- a/robosystems_client/api/graph_operations/delete_graph.py +++ b/robosystems_client/api/graph_operations/delete_graph.py @@ -114,9 +114,12 @@ def sync_detailed( Permanently destroys a user graph and cancels its subscription. Two modes via the `at_period_end` body flag: omit it (or pass `false`) to tear down immediately (~10 min); pass `true` to keep the graph usable through the current billing period and tear it down at the period boundary via the - existing suspend → deprovision pipeline. Requires `confirm` to equal the URL `graph_id`. Caller must - be both org owner (billing authority) and admin on the graph (operational authority). Not allowed on - shared repositories. + existing suspend → deprovision pipeline. An immediate delete credits the unused part of the billed + period; it is not refunded. On a card-billed plan the credit goes to the organization's account + balance and is applied to its next invoice; on an invoiced plan it is a credit line on that period's + invoice, or a separate credit invoice if that one is already paid. Requires `confirm` to equal the + URL `graph_id`. Caller must be both org owner (billing authority) and admin on the graph + (operational authority). Not allowed on shared repositories. **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. @@ -130,7 +133,11 @@ def sync_detailed( - **Immediate** (default): subscription canceled now (`ends_at = now`) and fast-path deprovisioning fires within ~10 minutes. Use when you want - the data gone and the slot freed right away. + the data gone and the slot freed right away. The unused part of the + billed period is credited, not refunded: on a card-billed plan to the + organization's account balance, applied to its next invoice; on an + invoiced plan as a credit on that period's invoice, or a separate credit + invoice if it is already paid. - **At period end** (`at_period_end=true`): subscription canceled but `ends_at = current_period_end` so the graph stays usable through the paid period. The existing suspend → deprovision sensor pipeline tears @@ -172,9 +179,12 @@ def sync( Permanently destroys a user graph and cancels its subscription. Two modes via the `at_period_end` body flag: omit it (or pass `false`) to tear down immediately (~10 min); pass `true` to keep the graph usable through the current billing period and tear it down at the period boundary via the - existing suspend → deprovision pipeline. Requires `confirm` to equal the URL `graph_id`. Caller must - be both org owner (billing authority) and admin on the graph (operational authority). Not allowed on - shared repositories. + existing suspend → deprovision pipeline. An immediate delete credits the unused part of the billed + period; it is not refunded. On a card-billed plan the credit goes to the organization's account + balance and is applied to its next invoice; on an invoiced plan it is a credit line on that period's + invoice, or a separate credit invoice if that one is already paid. Requires `confirm` to equal the + URL `graph_id`. Caller must be both org owner (billing authority) and admin on the graph + (operational authority). Not allowed on shared repositories. **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. @@ -188,7 +198,11 @@ def sync( - **Immediate** (default): subscription canceled now (`ends_at = now`) and fast-path deprovisioning fires within ~10 minutes. Use when you want - the data gone and the slot freed right away. + the data gone and the slot freed right away. The unused part of the + billed period is credited, not refunded: on a card-billed plan to the + organization's account balance, applied to its next invoice; on an + invoiced plan as a credit on that period's invoice, or a separate credit + invoice if it is already paid. - **At period end** (`at_period_end=true`): subscription canceled but `ends_at = current_period_end` so the graph stays usable through the paid period. The existing suspend → deprovision sensor pipeline tears @@ -225,9 +239,12 @@ async def asyncio_detailed( Permanently destroys a user graph and cancels its subscription. Two modes via the `at_period_end` body flag: omit it (or pass `false`) to tear down immediately (~10 min); pass `true` to keep the graph usable through the current billing period and tear it down at the period boundary via the - existing suspend → deprovision pipeline. Requires `confirm` to equal the URL `graph_id`. Caller must - be both org owner (billing authority) and admin on the graph (operational authority). Not allowed on - shared repositories. + existing suspend → deprovision pipeline. An immediate delete credits the unused part of the billed + period; it is not refunded. On a card-billed plan the credit goes to the organization's account + balance and is applied to its next invoice; on an invoiced plan it is a credit line on that period's + invoice, or a separate credit invoice if that one is already paid. Requires `confirm` to equal the + URL `graph_id`. Caller must be both org owner (billing authority) and admin on the graph + (operational authority). Not allowed on shared repositories. **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. @@ -241,7 +258,11 @@ async def asyncio_detailed( - **Immediate** (default): subscription canceled now (`ends_at = now`) and fast-path deprovisioning fires within ~10 minutes. Use when you want - the data gone and the slot freed right away. + the data gone and the slot freed right away. The unused part of the + billed period is credited, not refunded: on a card-billed plan to the + organization's account balance, applied to its next invoice; on an + invoiced plan as a credit on that period's invoice, or a separate credit + invoice if it is already paid. - **At period end** (`at_period_end=true`): subscription canceled but `ends_at = current_period_end` so the graph stays usable through the paid period. The existing suspend → deprovision sensor pipeline tears @@ -281,9 +302,12 @@ async def asyncio( Permanently destroys a user graph and cancels its subscription. Two modes via the `at_period_end` body flag: omit it (or pass `false`) to tear down immediately (~10 min); pass `true` to keep the graph usable through the current billing period and tear it down at the period boundary via the - existing suspend → deprovision pipeline. Requires `confirm` to equal the URL `graph_id`. Caller must - be both org owner (billing authority) and admin on the graph (operational authority). Not allowed on - shared repositories. + existing suspend → deprovision pipeline. An immediate delete credits the unused part of the billed + period; it is not refunded. On a card-billed plan the credit goes to the organization's account + balance and is applied to its next invoice; on an invoiced plan it is a credit line on that period's + invoice, or a separate credit invoice if that one is already paid. Requires `confirm` to equal the + URL `graph_id`. Caller must be both org owner (billing authority) and admin on the graph + (operational authority). Not allowed on shared repositories. **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. @@ -297,7 +321,11 @@ async def asyncio( - **Immediate** (default): subscription canceled now (`ends_at = now`) and fast-path deprovisioning fires within ~10 minutes. Use when you want - the data gone and the slot freed right away. + the data gone and the slot freed right away. The unused part of the + billed period is credited, not refunded: on a card-billed plan to the + organization's account balance, applied to its next invoice; on an + invoiced plan as a credit on that period's invoice, or a separate credit + invoice if it is already paid. - **At period end** (`at_period_end=true`): subscription canceled but `ends_at = current_period_end` so the graph stays usable through the paid period. The existing suspend → deprovision sensor pipeline tears diff --git a/robosystems_client/graphql/schema.graphql b/robosystems_client/graphql/schema.graphql index b74f4dc1..47610f48 100644 --- a/robosystems_client/graphql/schema.graphql +++ b/robosystems_client/graphql/schema.graphql @@ -1848,7 +1848,6 @@ type Agent { agentType: String! name: String! legalName: String - taxId: String registrationNumber: String duns: String lei: String @@ -1864,6 +1863,7 @@ type Agent { createdAt: DateTime updatedAt: DateTime createdBy: String + taxId: String openReceivable: OpenBalanceByAgent openPayable: OpenBalanceByAgent } diff --git a/robosystems_client/models/accept_suggestions_request.py b/robosystems_client/models/accept_suggestions_request.py index 3dbd5e19..ec6646d3 100644 --- a/robosystems_client/models/accept_suggestions_request.py +++ b/robosystems_client/models/accept_suggestions_request.py @@ -5,7 +5,6 @@ from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -44,7 +43,6 @@ class AcceptSuggestionsRequest: commit: bool | Unset = False limit: int | Unset = 200 dry_run: bool | Unset = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: entity_id: None | str | Unset @@ -103,7 +101,7 @@ def to_dict(self) -> dict[str, Any]: dry_run = self.dry_run field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if entity_id is not UNSET: field_dict["entity_id"] = entity_id @@ -238,21 +236,4 @@ def _parse_occurred_to(data: object) -> datetime.date | None | Unset: dry_run=dry_run, ) - accept_suggestions_request.additional_properties = d return accept_suggestions_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/backup_create_request.py b/robosystems_client/models/backup_create_request.py index 9b6391b4..7135c710 100644 --- a/robosystems_client/models/backup_create_request.py +++ b/robosystems_client/models/backup_create_request.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -31,7 +30,6 @@ class BackupCreateRequest: retention_days: int | Unset = 30 compression: bool | Unset = True schedule: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: backup_format = self.backup_format @@ -49,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: schedule = self.schedule field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if backup_format is not UNSET: field_dict["backup_format"] = backup_format @@ -92,21 +90,4 @@ def _parse_schedule(data: object) -> None | str | Unset: schedule=schedule, ) - backup_create_request.additional_properties = d return backup_create_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/cancel_subscription_request.py b/robosystems_client/models/cancel_subscription_request.py index e43468f0..d26ce718 100644 --- a/robosystems_client/models/cancel_subscription_request.py +++ b/robosystems_client/models/cancel_subscription_request.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -33,7 +32,6 @@ class CancelSubscriptionRequest: immediate: bool | Unset = False confirm: None | str | Unset = UNSET user_id: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: immediate = self.immediate @@ -51,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: user_id = self.user_id field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if immediate is not UNSET: field_dict["immediate"] = immediate @@ -91,21 +89,4 @@ def _parse_user_id(data: object) -> None | str | Unset: user_id=user_id, ) - cancel_subscription_request.additional_properties = d return cancel_subscription_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/connection_response.py b/robosystems_client/models/connection_response.py index c08f1c1b..1507314e 100644 --- a/robosystems_client/models/connection_response.py +++ b/robosystems_client/models/connection_response.py @@ -26,7 +26,9 @@ class ConnectionResponse: status (str): Connection status created_at (datetime.datetime | str): Creation timestamp metadata (ConnectionResponseMetadata): Provider-specific metadata - entity_id (None | str | Unset): Entity identifier + entity_id (None | str | Unset): The entity whose books the connection keeps: the group parent for QuickBooks, + the entity a bank feed was connected for (each of its accounts can move to another entity later), none for an + external source, whose events name their own. updated_at (datetime.datetime | None | str | Unset): Last update timestamp last_sync (datetime.datetime | None | str | Unset): Last sync timestamp write_policy (None | str | Unset): Source-of-truth write policy: 'native' (RoboSystems is authoritative; no diff --git a/robosystems_client/models/create_connection_request.py b/robosystems_client/models/create_connection_request.py index 550400a0..061164f3 100644 --- a/robosystems_client/models/create_connection_request.py +++ b/robosystems_client/models/create_connection_request.py @@ -25,7 +25,8 @@ class CreateConnectionRequest: Attributes: provider (CreateConnectionRequestProvider): Connection provider type - entity_id (None | str | Unset): Entity identifier. Required for QuickBooks. + entity_id (None | str | Unset): QuickBooks: the entity whose books it keeps, which can only be the group parent; + omit it. A bank feed names its entity on its own config. quickbooks_config (None | QuickBooksConnectionConfig | Unset): external_config (ExternalConnectionConfig | None | Unset): mercury_config (MercuryConnectionConfig | None | Unset): diff --git a/robosystems_client/models/delete_graph_op.py b/robosystems_client/models/delete_graph_op.py index 58d5780f..5b3e625c 100644 --- a/robosystems_client/models/delete_graph_op.py +++ b/robosystems_client/models/delete_graph_op.py @@ -19,7 +19,11 @@ class DeleteGraphOp: - **Immediate** (default): subscription canceled now (`ends_at = now`) and fast-path deprovisioning fires within ~10 minutes. Use when you want - the data gone and the slot freed right away. + the data gone and the slot freed right away. The unused part of the + billed period is credited, not refunded: on a card-billed plan to the + organization's account balance, applied to its next invoice; on an + invoiced plan as a credit on that period's invoice, or a separate credit + invoice if it is already paid. - **At period end** (`at_period_end=true`): subscription canceled but `ends_at = current_period_end` so the graph stays usable through the paid period. The existing suspend → deprovision sensor pipeline tears diff --git a/robosystems_client/models/index_document_op.py b/robosystems_client/models/index_document_op.py index 82415013..89463f3e 100644 --- a/robosystems_client/models/index_document_op.py +++ b/robosystems_client/models/index_document_op.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -33,7 +32,6 @@ class IndexDocumentOp: tags: list[str] | None | Unset = UNSET folder: None | str | Unset = UNSET external_id: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: document_id: None | str | Unset @@ -76,7 +74,7 @@ def to_dict(self) -> dict[str, Any]: external_id = self.external_id field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if document_id is not UNSET: field_dict["document_id"] = document_id @@ -168,21 +166,4 @@ def _parse_external_id(data: object) -> None | str | Unset: external_id=external_id, ) - index_document_op.additional_properties = d return index_document_op - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/initialize_ledger_request.py b/robosystems_client/models/initialize_ledger_request.py index 9ff26ae7..d25f074b 100644 --- a/robosystems_client/models/initialize_ledger_request.py +++ b/robosystems_client/models/initialize_ledger_request.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -47,7 +46,6 @@ class InitializeLedgerRequest: auto_seed_schedules: bool | Unset = False earliest_data_period: None | str | Unset = UNSET note: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: entity_id: None | str | Unset @@ -79,7 +77,7 @@ def to_dict(self) -> dict[str, Any]: note = self.note field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if entity_id is not UNSET: field_dict["entity_id"] = entity_id @@ -151,21 +149,4 @@ def _parse_note(data: object) -> None | str | Unset: note=note, ) - initialize_ledger_request.additional_properties = d return initialize_ledger_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/learn_classification_defaults_request.py b/robosystems_client/models/learn_classification_defaults_request.py index 7f0815f3..c45f907d 100644 --- a/robosystems_client/models/learn_classification_defaults_request.py +++ b/robosystems_client/models/learn_classification_defaults_request.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -20,13 +19,12 @@ class LearnClassificationDefaultsRequest: """ dry_run: bool | Unset = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: dry_run = self.dry_run field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if dry_run is not UNSET: field_dict["dry_run"] = dry_run @@ -42,21 +40,4 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dry_run=dry_run, ) - learn_classification_defaults_request.additional_properties = d return learn_classification_defaults_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/materialize_op.py b/robosystems_client/models/materialize_op.py index 14cbe89d..4d10661b 100644 --- a/robosystems_client/models/materialize_op.py +++ b/robosystems_client/models/materialize_op.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -31,7 +30,6 @@ class MaterializeOp: dry_run: bool | Unset = False source: None | str | Unset = UNSET materialize_embeddings: bool | Unset = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: force = self.force @@ -49,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: materialize_embeddings = self.materialize_embeddings field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if force is not UNSET: field_dict["force"] = force @@ -92,21 +90,4 @@ def _parse_source(data: object) -> None | str | Unset: materialize_embeddings=materialize_embeddings, ) - materialize_op.additional_properties = d return materialize_op - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/operation_resume_request.py b/robosystems_client/models/operation_resume_request.py index 76064d9c..b97e194f 100644 --- a/robosystems_client/models/operation_resume_request.py +++ b/robosystems_client/models/operation_resume_request.py @@ -4,7 +4,6 @@ from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -25,7 +24,6 @@ class OperationResumeRequest: """ input_: OperationResumeRequestInput | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: input_: dict[str, Any] | Unset = UNSET @@ -33,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: input_ = self.input_.to_dict() field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if input_ is not UNSET: field_dict["input"] = input_ @@ -56,21 +54,4 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: input_=input_, ) - operation_resume_request.additional_properties = d return operation_resume_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/promote_obligations_request.py b/robosystems_client/models/promote_obligations_request.py index f97a3379..6a1266d6 100644 --- a/robosystems_client/models/promote_obligations_request.py +++ b/robosystems_client/models/promote_obligations_request.py @@ -4,7 +4,6 @@ from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -33,13 +32,12 @@ class PromoteObligationsRequest: """ dispatch_handlers: bool | Unset = True - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: dispatch_handlers = self.dispatch_handlers field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if dispatch_handlers is not UNSET: field_dict["dispatch_handlers"] = dispatch_handlers @@ -55,21 +53,4 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dispatch_handlers=dispatch_handlers, ) - promote_obligations_request.additional_properties = d return promote_obligations_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/sso_complete_request.py b/robosystems_client/models/sso_complete_request.py index eaab89fe..ea827402 100644 --- a/robosystems_client/models/sso_complete_request.py +++ b/robosystems_client/models/sso_complete_request.py @@ -1,11 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SSOCompleteRequest") @@ -15,14 +17,23 @@ class SSOCompleteRequest: Attributes: session_id (str): Temporary session ID from secure handoff + browser_nonce (None | str | Unset): The nonce this browser minted when it started the bridge; its SHA-256 was + passed through the exchange as browser_nonce_hash. """ session_id: str + browser_nonce: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: session_id = self.session_id + browser_nonce: None | str | Unset + if isinstance(self.browser_nonce, Unset): + browser_nonce = UNSET + else: + browser_nonce = self.browser_nonce + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -30,6 +41,8 @@ def to_dict(self) -> dict[str, Any]: "session_id": session_id, } ) + if browser_nonce is not UNSET: + field_dict["browser_nonce"] = browser_nonce return field_dict @@ -38,8 +51,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) session_id = d.pop("session_id") + def _parse_browser_nonce(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + browser_nonce = _parse_browser_nonce(d.pop("browser_nonce", UNSET)) + sso_complete_request = cls( session_id=session_id, + browser_nonce=browser_nonce, ) sso_complete_request.additional_properties = d diff --git a/robosystems_client/models/sso_exchange_request.py b/robosystems_client/models/sso_exchange_request.py index ecd87986..0faef824 100644 --- a/robosystems_client/models/sso_exchange_request.py +++ b/robosystems_client/models/sso_exchange_request.py @@ -19,11 +19,14 @@ class SSOExchangeRequest: token (str): Temporary SSO token target_app (str): Target application identifier return_url (None | str | Unset): Optional return URL after authentication + browser_nonce_hash (None | str | Unset): SHA-256 (hex) of a nonce the target app minted in the browser that is + signing in. Completion must present the nonce, so the handoff cannot be redeemed by any other browser. """ token: str target_app: str return_url: None | str | Unset = UNSET + browser_nonce_hash: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -37,6 +40,12 @@ def to_dict(self) -> dict[str, Any]: else: return_url = self.return_url + browser_nonce_hash: None | str | Unset + if isinstance(self.browser_nonce_hash, Unset): + browser_nonce_hash = UNSET + else: + browser_nonce_hash = self.browser_nonce_hash + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -47,6 +56,8 @@ def to_dict(self) -> dict[str, Any]: ) if return_url is not UNSET: field_dict["return_url"] = return_url + if browser_nonce_hash is not UNSET: + field_dict["browser_nonce_hash"] = browser_nonce_hash return field_dict @@ -66,10 +77,20 @@ def _parse_return_url(data: object) -> None | str | Unset: return_url = _parse_return_url(d.pop("return_url", UNSET)) + def _parse_browser_nonce_hash(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + browser_nonce_hash = _parse_browser_nonce_hash(d.pop("browser_nonce_hash", UNSET)) + sso_exchange_request = cls( token=token, target_app=target_app, return_url=return_url, + browser_nonce_hash=browser_nonce_hash, ) sso_exchange_request.additional_properties = d diff --git a/robosystems_client/models/sync_connection_request.py b/robosystems_client/models/sync_connection_request.py index e3f2a0f5..ce8ca337 100644 --- a/robosystems_client/models/sync_connection_request.py +++ b/robosystems_client/models/sync_connection_request.py @@ -5,7 +5,6 @@ from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset @@ -34,7 +33,6 @@ class SyncConnectionRequest: full_rebuild: bool | Unset = False since_date: datetime.date | None | Unset = UNSET sync_options: None | SyncConnectionRequestSyncOptionsType0 | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.sync_connection_request_sync_options_type_0 import ( @@ -60,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: sync_options = self.sync_options field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) + field_dict.update({}) if full_rebuild is not UNSET: field_dict["full_rebuild"] = full_rebuild @@ -122,21 +120,4 @@ def _parse_sync_options( sync_options=sync_options, ) - sync_connection_request.additional_properties = d return sync_connection_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/update_event_handler_request.py b/robosystems_client/models/update_event_handler_request.py index 850c1a45..29df707d 100644 --- a/robosystems_client/models/update_event_handler_request.py +++ b/robosystems_client/models/update_event_handler_request.py @@ -1,5 +1,6 @@ from __future__ import annotations +import datetime from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -46,7 +47,10 @@ class UpdateEventHandlerRequest: is_active (bool | None | Unset): Toggle activation. False removes the handler from match-time consideration without deleting it. approve (bool | None | Unset): Approval shortcut: True stamps approved_by/approved_at to the current user; False - clears both. + clears both. Approving an AI-suggested handler also needs `expected_updated_at`. + expected_updated_at (datetime.datetime | None | Unset): The handler's `updated_at` as shown when it was + reviewed. Required with `approve=true` on an AI-suggested handler, so the approval covers exactly that version; + a mismatch is refused with 409. metadata_patch (UpdateEventHandlerRequestMetadataPatch | Unset): Deep-merged into the existing handler.metadata. Pass `{}` to leave metadata unchanged. """ @@ -65,6 +69,7 @@ class UpdateEventHandlerRequest: priority: int | None | Unset = UNSET is_active: bool | None | Unset = UNSET approve: bool | None | Unset = UNSET + expected_updated_at: datetime.datetime | None | Unset = UNSET metadata_patch: UpdateEventHandlerRequestMetadataPatch | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -149,6 +154,14 @@ def to_dict(self) -> dict[str, Any]: else: approve = self.approve + expected_updated_at: None | str | Unset + if isinstance(self.expected_updated_at, Unset): + expected_updated_at = UNSET + elif isinstance(self.expected_updated_at, datetime.datetime): + expected_updated_at = self.expected_updated_at.isoformat() + else: + expected_updated_at = self.expected_updated_at + metadata_patch: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata_patch, Unset): metadata_patch = self.metadata_patch.to_dict() @@ -182,6 +195,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["is_active"] = is_active if approve is not UNSET: field_dict["approve"] = approve + if expected_updated_at is not UNSET: + field_dict["expected_updated_at"] = expected_updated_at if metadata_patch is not UNSET: field_dict["metadata_patch"] = metadata_patch @@ -327,6 +342,25 @@ def _parse_approve(data: object) -> bool | None | Unset: approve = _parse_approve(d.pop("approve", UNSET)) + def _parse_expected_updated_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + expected_updated_at_type_0 = datetime.datetime.fromisoformat(data) + + return expected_updated_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + expected_updated_at = _parse_expected_updated_at( + d.pop("expected_updated_at", UNSET) + ) + _metadata_patch = d.pop("metadata_patch", UNSET) metadata_patch: UpdateEventHandlerRequestMetadataPatch | Unset if isinstance(_metadata_patch, Unset): @@ -347,6 +381,7 @@ def _parse_approve(data: object) -> bool | None | Unset: priority=priority, is_active=is_active, approve=approve, + expected_updated_at=expected_updated_at, metadata_patch=metadata_patch, )