Skip to content

feat: add Transactions findOne/findMany [AMB-2992] - #49

Merged
wthrajat merged 1 commit into
mainfrom
jesseva/amb-2992-payments-sdk-transactions-exposes-no-findonefindmany-forcing
Aug 25, 2026
Merged

feat: add Transactions findOne/findMany [AMB-2992]#49
wthrajat merged 1 commit into
mainfrom
jesseva/amb-2992-payments-sdk-transactions-exposes-no-findonefindmany-forcing

Conversation

@bufo24

@bufo24 bufo24 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Transactions (packages/payments/src/resources/transactions.ts) only exposed createReceive and send, even though the GraphQL schema already has find_one/find_many on the transaction namespace (TransactionQueries in packages/payments/src/generated/sdk.ts). The gap was purely client-side: packages/payments/src/operations/transactions.graphql never declared operations for them.
  • Added GetTransaction (find_one) and ListTransactions (find_many) queries to transactions.graphql, plus a SimplePaymentsTransactionFields fragment and a FindManyTransactionsFields fragment (list + pagination + total_count), and regenerated src/generated/sdk.ts via pnpm --filter @ambosstech/payments run codegen.
  • Added Transactions.findOne(id) and Transactions.findMany(input), mirroring the existing Wallets.get/Wallets.list pattern. findMany returns the find_many result as-is ({ list, pagination, total_count }) rather than unwrapping to a bare array, since FindManyTransactions (unlike FindManyWallets) carries pagination and a total count that callers need.
  • Updated packages/payments/README.md, docs/INTEGRATION.md, and sdk/AGENTS.md's resource table per the repo's "Docs to keep in sync" section.

Linear: AMB-2992

Test plan

  • pnpm build passes (core, then payments)
  • pnpm test passes — 56/56 tests, including new Transactions.findOne / Transactions.findMany tests in packages/payments/src/resources/transactions.find.test.ts
  • pnpm typecheck passes
  • pnpm format:check passes
  • Regenerated sdk.ts via codegen (not hand-edited)

The schema already exposes find_one/find_many on the transaction
namespace, but transactions.graphql never declared operations for
them, so the typed client never got the methods. Add GetTransaction
and ListTransactions operations, regenerate the SDK, and wrap them on
Transactions, mirroring the existing Wallets.get/list pattern.
@bufo24
bufo24 force-pushed the jesseva/amb-2992-payments-sdk-transactions-exposes-no-findonefindmany-forcing branch from 49b8357 to 1772207 Compare August 25, 2026 09:03
@bufo24
bufo24 marked this pull request as ready for review August 25, 2026 09:03
@wthrajat
wthrajat merged commit 8947588 into main Aug 25, 2026
2 checks passed
@apotdevin apotdevin mentioned this pull request Aug 25, 2026
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.

2 participants