Skip to content

Commit 9e76617

Browse files
authored
chore: regenerate SDK (due dates, aged receivables and payables, discharge allocations) (#267)
## Summary Regenerates the SDK and the checked-in GraphQL schema snapshot against the robosystems branch that carries AR/AP aging, so the client covers it end to end: - due dates on invoices and bills (robosystems #1884); - the aged receivables and payables reads (#1886); - discharge allocations and settlement candidates (#1887). None of this is in a robosystems release yet: v1.19.2 predates all three. #1884 and #1886 are merged; #1887 is open. The new request fields are inert against a server that predates them, and the new GraphQL fields only resolve once that release deploys. ## Changes Regenerated, no hand-written code: - **`models/`** - `CreateEventBlockRequest` gains `due_date` and `terms_days`. - `EventBlockEnvelope` gains `due_date`. - `UpdateEventBlockRequest` gains `due_date` and `discharge_allocations`. - New `DischargeAllocation` (`obligation_event_id`, `amount`). - **`api/`:** the `create_event_block` / `update_event_block` docstrings follow the operation descriptions. - **`graphql/schema.graphql`:** - new fields `agedReceivables`, `agedPayables`, `openItemsForAgent`, `dischargeCandidates`; - their types (`AgedBalances`, `AgingBuckets`, `AgedAgentRow`, `ControlTieOut`, `ControlAccount`, `OpenItem`, `IntercompanyPair`, `DischargeCandidates`); - `dueDate` on `EventBlock`; - the corrected `openReceivables` description. - No `operations/*.graphql` document or `LedgerClient` method selects the new fields yet, so `just generate-graphql` produces no change. Facade methods come with the app work, in the TypeScript and Python clients together. ## Compatibility ADDITIVE. - Every new model field is optional (`| None | Unset = UNSET`), including `due_date` on the response envelope, so parsing a response from a server without it is unchanged. - No export, signature or existing field changed. ## Testing - The regen was run by Joey against the local stack on the server branch. - `just generate-graphql`: no change. - `just test-all`: 699 passed, 17 skipped; ruff check and format clean; basedpyright 0 errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013UXnatpnbiixt1ZVHfdZAP
2 parents 189f15f + cac8487 commit 9e76617

8 files changed

Lines changed: 569 additions & 12 deletions

File tree

‎robosystems_client/api/robo_ledger_ledger_events/create_event_block.py‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ def sync_detailed(
119119
journal_entry_recorded, whether the entry writes back to a connected source system follows `source`
120120
(schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it
121121
false for an alignment entry mirroring a change already made upstream, which would otherwise be
122-
applied twice.
122+
applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from
123+
occurred_at); with neither it is due on receipt. A later due date is a field correction on update-
124+
event-block.
123125
124126
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
125127
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -165,7 +167,9 @@ def sync(
165167
journal_entry_recorded, whether the entry writes back to a connected source system follows `source`
166168
(schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it
167169
false for an alignment entry mirroring a change already made upstream, which would otherwise be
168-
applied twice.
170+
applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from
171+
occurred_at); with neither it is due on receipt. A later due date is a field correction on update-
172+
event-block.
169173
170174
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
171175
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -206,7 +210,9 @@ async def asyncio_detailed(
206210
journal_entry_recorded, whether the entry writes back to a connected source system follows `source`
207211
(schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it
208212
false for an alignment entry mirroring a change already made upstream, which would otherwise be
209-
applied twice.
213+
applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from
214+
occurred_at); with neither it is due on receipt. A later due date is a field correction on update-
215+
event-block.
210216
211217
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
212218
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -250,7 +256,9 @@ async def asyncio(
250256
journal_entry_recorded, whether the entry writes back to a connected source system follows `source`
251257
(schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it
252258
false for an alignment entry mirroring a change already made upstream, which would otherwise be
253-
applied twice.
259+
applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from
260+
occurred_at); with neither it is due on receipt. A later due date is a field correction on update-
261+
event-block.
254262
255263
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
256264
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

‎robosystems_client/api/robo_ledger_ledger_events/update_event_block.py‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ def sync_detailed(
126126
patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-
127127
gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already
128128
posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty
129-
string clears it.
129+
string clears it. A payment or bank line records the invoices or bills it settles with
130+
`discharge_allocations` (positive cents per document, together at most its amount) or one
131+
`discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own
132+
entity, not voided.
130133
131134
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
132135
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -182,7 +185,10 @@ def sync(
182185
patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-
183186
gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already
184187
posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty
185-
string clears it.
188+
string clears it. A payment or bank line records the invoices or bills it settles with
189+
`discharge_allocations` (positive cents per document, together at most its amount) or one
190+
`discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own
191+
entity, not voided.
186192
187193
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
188194
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -233,7 +239,10 @@ async def asyncio_detailed(
233239
patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-
234240
gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already
235241
posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty
236-
string clears it.
242+
string clears it. A payment or bank line records the invoices or bills it settles with
243+
`discharge_allocations` (positive cents per document, together at most its amount) or one
244+
`discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own
245+
entity, not voided.
237246
238247
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
239248
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
@@ -287,7 +296,10 @@ async def asyncio(
287296
patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-
288297
gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already
289298
posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty
290-
string clears it.
299+
string clears it. A payment or bank line records the invoices or bills it settles with
300+
`discharge_allocations` (positive cents per document, together at most its amount) or one
301+
`discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own
302+
entity, not voided.
291303
292304
**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
293305
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

0 commit comments

Comments
 (0)