Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ def sync_detailed(
Link a chart-of-accounts element to a US GAAP reporting concept. One mapping edge per call — use
`auto-map-elements` for bulk AI-assisted mapping. Duplicate (from, to, type) tuples return 409. The
target must be a leaf concept: a subtotal the statement sums from its children is refused (422). Map
before you close: an account with landed history in a closed month cannot be re-mapped (422) — the
closed month's stamped statements were computed through the old arcs. Reopen latest-first down to
the earliest month named, map, then close forward.
before you close: a new arc for an account with landed history in a closed month is refused (422),
since the month's stamped statements were computed through the arcs as they stood. To move such an
account, pass `replaces_association_id` (its current arc, removed in the same write). A move within
the same primary statement is a reclassification and goes through: the stamped statements keep the
answer as closed, live renders follow the new arc, and `reclassified_periods` names the months. A
move across statements restates net income and is refused, naming the months to reopen latest-first.

**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.
Expand Down Expand Up @@ -168,9 +171,12 @@ def sync(
Link a chart-of-accounts element to a US GAAP reporting concept. One mapping edge per call — use
`auto-map-elements` for bulk AI-assisted mapping. Duplicate (from, to, type) tuples return 409. The
target must be a leaf concept: a subtotal the statement sums from its children is refused (422). Map
before you close: an account with landed history in a closed month cannot be re-mapped (422) — the
closed month's stamped statements were computed through the old arcs. Reopen latest-first down to
the earliest month named, map, then close forward.
before you close: a new arc for an account with landed history in a closed month is refused (422),
since the month's stamped statements were computed through the arcs as they stood. To move such an
account, pass `replaces_association_id` (its current arc, removed in the same write). A move within
the same primary statement is a reclassification and goes through: the stamped statements keep the
answer as closed, live renders follow the new arc, and `reclassified_periods` names the months. A
move across statements restates net income and is refused, naming the months to reopen latest-first.

**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.
Expand Down Expand Up @@ -213,9 +219,12 @@ async def asyncio_detailed(
Link a chart-of-accounts element to a US GAAP reporting concept. One mapping edge per call — use
`auto-map-elements` for bulk AI-assisted mapping. Duplicate (from, to, type) tuples return 409. The
target must be a leaf concept: a subtotal the statement sums from its children is refused (422). Map
before you close: an account with landed history in a closed month cannot be re-mapped (422) — the
closed month's stamped statements were computed through the old arcs. Reopen latest-first down to
the earliest month named, map, then close forward.
before you close: a new arc for an account with landed history in a closed month is refused (422),
since the month's stamped statements were computed through the arcs as they stood. To move such an
account, pass `replaces_association_id` (its current arc, removed in the same write). A move within
the same primary statement is a reclassification and goes through: the stamped statements keep the
answer as closed, live renders follow the new arc, and `reclassified_periods` names the months. A
move across statements restates net income and is refused, naming the months to reopen latest-first.

**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.
Expand Down Expand Up @@ -261,9 +270,12 @@ async def asyncio(
Link a chart-of-accounts element to a US GAAP reporting concept. One mapping edge per call — use
`auto-map-elements` for bulk AI-assisted mapping. Duplicate (from, to, type) tuples return 409. The
target must be a leaf concept: a subtotal the statement sums from its children is refused (422). Map
before you close: an account with landed history in a closed month cannot be re-mapped (422) — the
closed month's stamped statements were computed through the old arcs. Reopen latest-first down to
the earliest month named, map, then close forward.
before you close: a new arc for an account with landed history in a closed month is refused (422),
since the month's stamped statements were computed through the arcs as they stood. To move such an
account, pass `replaces_association_id` (its current arc, removed in the same write). A move within
the same primary statement is a reclassification and goes through: the stamped statements keep the
answer as closed, live renders follow the new arc, and `reclassified_periods` names the months. A
move across statements restates net income and is refused, naming the months to reopen latest-first.

**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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def sync_detailed(
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 (422) until those months are reopened, latest-first.
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.
Expand Down Expand Up @@ -162,7 +163,8 @@ def sync(
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 (422) until those months are reopened, latest-first.
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.
Expand Down Expand Up @@ -202,7 +204,8 @@ async def asyncio_detailed(
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 (422) until those months are reopened, latest-first.
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.
Expand Down Expand Up @@ -245,7 +248,8 @@ async def asyncio(
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 (422) until those months are reopened, latest-first.
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def sync_detailed(
`custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled
surfaces 403. Closed months are immutable against curation: a mapping arc added or removed for an
account with landed history in a closed month, or a `balance_type` / `period_type` / `trait` change
on such an account, is refused (422, `protected_facts`) naming the months to reopen first.
on such an account, is refused (422, `protected_facts`) naming the months to reopen first. An
envelope that removes an account's arc and adds one on the same primary statement moves it: a
reclassification, allowed.

**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.
Expand Down Expand Up @@ -176,7 +178,9 @@ def sync(
`custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled
surfaces 403. Closed months are immutable against curation: a mapping arc added or removed for an
account with landed history in a closed month, or a `balance_type` / `period_type` / `trait` change
on such an account, is refused (422, `protected_facts`) naming the months to reopen first.
on such an account, is refused (422, `protected_facts`) naming the months to reopen first. An
envelope that removes an account's arc and adds one on the same primary statement moves it: a
reclassification, allowed.

**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.
Expand Down Expand Up @@ -225,7 +229,9 @@ async def asyncio_detailed(
`custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled
surfaces 403. Closed months are immutable against curation: a mapping arc added or removed for an
account with landed history in a closed month, or a `balance_type` / `period_type` / `trait` change
on such an account, is refused (422, `protected_facts`) naming the months to reopen first.
on such an account, is refused (422, `protected_facts`) naming the months to reopen first. An
envelope that removes an account's arc and adds one on the same primary statement moves it: a
reclassification, allowed.

**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.
Expand Down Expand Up @@ -277,7 +283,9 @@ async def asyncio(
`custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled
surfaces 403. Closed months are immutable against curation: a mapping arc added or removed for an
account with landed history in a closed month, or a `balance_type` / `period_type` / `trait` change
on such an account, is refused (422, `protected_facts`) naming the months to reopen first.
on such an account, is refused (422, `protected_facts`) naming the months to reopen first. An
envelope that removes an account's arc and adds one on the same primary statement moves it: a
reclassification, allowed.

**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.
Expand Down
20 changes: 18 additions & 2 deletions robosystems_client/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,9 @@ type Query {
): MappingDetail

"""
How one month's bank lines were classified, per suggestion source:
taken as suggested, overridden, split, or chosen with no suggestion to
How one month's bank lines were classified, per suggestion source.

Taken as suggested, overridden, split, or chosen with no suggestion to
take, and the share that needed a person's choice. Counted from the
lines committed in the month; lines posted before outcomes were recorded
are `unstamped` and outside the share.
Expand Down Expand Up @@ -2491,6 +2492,16 @@ type Association {
confidence: Float
suggestedBy: String
approvedBy: String

"""
The arc this write removed in the same transaction, when the call named one in `replaces_association_id`.
"""
replacedAssociationId: String

"""
Closed months whose live statements now read through this arc while their stamped sets keep the answer as closed. Empty unless the write replaced an arc on an account with landed history in a closed month.
"""
reclassifiedPeriods: [String!]!
}

"""How a month's bank lines were classified, counted from the lines."""
Expand Down Expand Up @@ -3469,6 +3480,11 @@ type InformationBlockFactSet {
Typed `FactProvenance` descriptor (discriminated on `origin`: pivot | schedule | derived | asserted | document | forecast | filed) recording how this FactSet was constructed. It describes the set, not each fact: a `pivot` set's mapped leaves aggregate posted line items, while its subtotals and derivations are computed from those leaves. Surfaced as JSON, mirroring how mechanics is exposed. Null when the FactSet carries no descriptor.
"""
provenance: JSON

"""
When the set was computed. For a close-stamped canonical set (`reportId` null, type `report`) this is the month as closed on this date: its facts keep that answer while a live render reads through the mapping arcs as they stand now.
"""
createdAt: DateTime
}

"""
Expand Down
36 changes: 36 additions & 0 deletions robosystems_client/models/association_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class AssociationResponse:
confidence (float | None | Unset):
suggested_by (None | str | Unset):
approved_by (None | str | Unset):
replaced_association_id (None | str | Unset): The arc this write removed in the same transaction, when the call
named one in `replaces_association_id`.
reclassified_periods (list[str] | Unset): Closed months whose live statements now read through this arc while
their stamped sets keep the answer as closed. Empty unless the write replaced an arc on an account with landed
history in a closed month.
"""

id: str
Expand All @@ -53,6 +58,8 @@ class AssociationResponse:
confidence: float | None | Unset = UNSET
suggested_by: None | str | Unset = UNSET
approved_by: None | str | Unset = UNSET
replaced_association_id: None | str | Unset = UNSET
reclassified_periods: list[str] | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand Down Expand Up @@ -120,6 +127,16 @@ def to_dict(self) -> dict[str, Any]:
else:
approved_by = self.approved_by

replaced_association_id: None | str | Unset
if isinstance(self.replaced_association_id, Unset):
replaced_association_id = UNSET
else:
replaced_association_id = self.replaced_association_id

reclassified_periods: list[str] | Unset = UNSET
if not isinstance(self.reclassified_periods, Unset):
reclassified_periods = self.reclassified_periods

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
Expand Down Expand Up @@ -149,6 +166,10 @@ def to_dict(self) -> dict[str, Any]:
field_dict["suggested_by"] = suggested_by
if approved_by is not UNSET:
field_dict["approved_by"] = approved_by
if replaced_association_id is not UNSET:
field_dict["replaced_association_id"] = replaced_association_id
if reclassified_periods is not UNSET:
field_dict["reclassified_periods"] = reclassified_periods

return field_dict

Expand Down Expand Up @@ -246,6 +267,19 @@ def _parse_approved_by(data: object) -> None | str | Unset:

approved_by = _parse_approved_by(d.pop("approved_by", UNSET))

def _parse_replaced_association_id(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)

replaced_association_id = _parse_replaced_association_id(
d.pop("replaced_association_id", UNSET)
)

reclassified_periods = cast(list[str], d.pop("reclassified_periods", UNSET))

association_response = cls(
id=id,
structure_id=structure_id,
Expand All @@ -261,6 +295,8 @@ def _parse_approved_by(data: object) -> None | str | Unset:
confidence=confidence,
suggested_by=suggested_by,
approved_by=approved_by,
replaced_association_id=replaced_association_id,
reclassified_periods=reclassified_periods,
)

association_response.additional_properties = d
Expand Down
Loading
Loading