feat(ledger): add paginated transaction listing endpoint - #118
Merged
Conversation
add GET /v1/transactions returning a generic PageResponse<TransactionResponse>, mirroring GET /v1/accounts. read-only over the transactions table, ordered posted_at desc then id desc, page>=0 default 0, size 1..100 default 20. extend the shared TransactionResponse and PostedTransaction with status (read from the domain transaction, additive to the POST response). Closes #117
This was referenced Jun 14, 2026
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.
What
Adds
GET /v1/transactions?page=&size=returning a genericPageResponse<TransactionResponse>, the Sandbox Transaction Explorer (Screen 3) feed. Mirrors the mergedGET /v1/accounts(PR #110) one-to-one.How
ledger.transactionsonly (no entry join, no money on the wire).@Transactional(readOnly = true).TransactionSummary(id/reference/status/postedAt) +TransactionPage; the JPA entity does not cross the application boundary.statusadded to the sharedTransactionResponseand toPostedTransaction, read from the domainTransaction.status(not hardcoded). Additive: the POST response now also carriesstatus: "POSTED", otherwise unchanged.posted_atdesc,iddesc (ULID tiebreaker), deterministic across pages.page >= 0,size in 1..100, out-of-range -> 400 via the existing handler; JWT-secured. No schema change.Tests
TransactionControllerTest: list 200 (tx_-prefixed ids + status), empty page, 400 onsize=0|101andpage=-1(service not invoked), 401 unauthenticated, POST returnsstatus: "POSTED".TransactionServiceImplTest: list maps entity -> summary and requests sortpostedAt desc, id desc.TransactionListingIT(Testcontainers): newest-first ordering and disjoint successive pages.Closes #117