feat(ledger): add list_journal_entries to the LedgerClient facade - #208
Merged
Conversation
Surfaces the backend's new `journalEntries` field — the entry-centric read. `list_transactions` walks transactions and hangs entries off them, so an entry with no parent transaction appears in no listing it returns; the schedule engine and the event handlers create exactly those, which means everything a period close posts is absent from that surface. `transaction_id` on each result is `None` for a standalone entry rather than absent data. Filters cover date range, status, type, provenance and parent transaction — `provenance="schedule_derived"` answers "what did the close post?" in one call. Also carries the rest of this regen: the `DocumentSection` part fields (`parent_document_id`, `part`, `part_count`, `next_document_id`) and the `SearchHit` / `SearchRequest` updates already merged on the API side. Generated tier throughout — additive, rides a client minor. Claude-Session: https://claude.ai/code/session_01UdMBS1zchAGU4JszgXtMXY
jfrench9
added a commit
to RoboFinSystems/robosystems-typescript-client
that referenced
this pull request
Sep 5, 2026
Surfaces the backend's new `journalEntries` field (RoboFinSystems/robosystems#1355) on the TypeScript facade. Sibling of RoboFinSystems/robosystems-python-client#208. ## Why `listTransactions` walks the `transactions` table and hangs entries off each row, so an entry with **no parent transaction** appears in nothing it returns. Those entries aren't an edge case — the schedule engine and the event handlers create them by design, which means everything a period close posts is absent from that surface. On a real set of books that's every depreciation and amortization entry in every closed month. ## What ```ts await client.ledger.listJournalEntries(graphId, { startDate: '2026-07-01', endDate: '2026-07-31', provenance: 'schedule_derived', // "what did the close post?" }) ``` - `transactionId` is `null` for a standalone entry — that's the answer, not absent data. - Filters: date range, `status`, `type`, `provenance`, parent `transactionId`, plus pagination. - Line items expanded with account code/name; `sourceStructureName` names the schedule that generated the entry. - New exported types: `LedgerJournalEntryList`, `LedgerJournalEntry`. ## Also in this regen The `DocumentSection` part fields (`parentDocumentId`, `part`, `partCount`, `nextDocumentId`) and the `SearchHit` / `SearchRequest` updates in `sdk/types.gen.ts`, both from API changes already merged — they came with the same codegen pass and are included so the repo isn't left mid-regen. ## Contract Generated tier throughout — additive, rides a client minor. The facade method and exported types are new symbols; nothing existing changed shape, so no deprecation cycle. ## Verification `npm run test:all` green: 333 tests across 11 files, prettier / eslint / tsc clean, build passes. New tests cover the standalone-entry round-trip (the shape the read exists for) and that every filter reaches the request body. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UdMBS1zchAGU4JszgXtMXY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaces the backend's new
journalEntriesfield (RoboFinSystems/robosystems#1355) on the Python facade.Why
list_transactionswalks thetransactionstable and hangs entries off each row, so an entry with no parent transaction appears in nothing it returns. Those entries aren't an edge case — the schedule engine and the event handlers create them by design, which means everything a period close posts is absent from that surface. On a real set of books that's every depreciation and amortization entry in every closed month.What
transaction_idisNonefor a standalone entry — that's the answer, not absent data.status,type,provenance, parenttransaction_id, plus pagination.source_structure_namenames the schedule that generated the entry.Also in this regen
The
DocumentSectionpart fields (parent_document_id,part,part_count,next_document_id) and theSearchHit/SearchRequestupdates, both from API changes already merged — they came with the samerefresh-schema+ codegen pass and are included so the drift gate stays clean.Contract
Generated tier throughout — additive, rides a client minor. No stable-tier symbol changes, no deprecation cycle.
Verification
just test-allgreen: 586 passed, 17 skipped; ruff, format and basedpyright clean. New tests cover the standalone-entry round-trip (the shape the read exists for) and that every filter binds.🤖 Generated with Claude Code
https://claude.ai/code/session_01UdMBS1zchAGU4JszgXtMXY