Skip to content

feat(ledger): add list_journal_entries to the LedgerClient facade - #208

Merged
jfrench9 merged 1 commit into
mainfrom
feature/journal-entries-facade
Sep 5, 2026
Merged

feat(ledger): add list_journal_entries to the LedgerClient facade#208
jfrench9 merged 1 commit into
mainfrom
feature/journal-entries-facade

Conversation

@jfrench9

@jfrench9 jfrench9 commented Sep 5, 2026

Copy link
Copy Markdown
Member

Surfaces the backend's new journalEntries field (RoboFinSystems/robosystems#1355) on the Python facade.

Why

list_transactions 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

client.ledger.list_journal_entries(
    graph_id,
    start_date="2026-07-01",
    end_date="2026-07-31",
    provenance="schedule_derived",   # "what did the close post?"
)
  • transaction_id is None for a standalone entry — that's the answer, not absent data.
  • Filters: date range, status, type, provenance, parent transaction_id, plus pagination.
  • Line items expanded with account code/name; source_structure_name names the schedule that generated the entry.

Also in this regen

The DocumentSection part fields (parent_document_id, part, part_count, next_document_id) and the SearchHit / SearchRequest updates, both from API changes already merged — they came with the same refresh-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-all green: 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

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
jfrench9 merged commit 3f36e47 into main Sep 5, 2026
4 checks passed
@jfrench9
jfrench9 deleted the feature/journal-entries-facade branch September 5, 2026 17:42
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant