Skip to content

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list - #621

Closed
ls-bolt[bot] wants to merge 1 commit into
mainfrom
06-25-grid-card-txn-in-transaction-oneof
Closed

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list#621
ls-bolt[bot] wants to merge 1 commit into
mainfrom
06-25-grid-card-txn-in-transaction-oneof

Conversation

@ls-bolt

@ls-boltls-boltBot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #622.

Summary (draft / PoC — PR 2 of 2 spec change)

Adds CardTransaction as a third TransactionOneOf member with a CARD discriminator so card transactions appear in GET /transactions and deserialize cleanly via the discriminator. This is the canonical spec change behind the Lightspark webdev SDK regen + sparkcore handler change (the companion PR) that unblocks the documented Grid sandbox card loop (simulate auth → list → simulate clearing → simulate return): integrators discover the cardTransactionId from the public transaction list instead of needing the internal dashboard.

Changes

  • TransactionOneOf: add CardTransaction + CARD discriminator mapping.
  • CardTransaction: add a type: CARD discriminator property; relax cardId, pullSummary, refundSummary, settlementSummary to optional so the served card-transaction shape (the GET /transactions/{id} projection) validates and the list deserializes cleanly even for card transactions without a resolved card.
  • GET /transactions: document that card transactions are identified by type: CARD and that this is how integrators discover a CardTransaction id in Sandbox.

The bundled openapi.yaml / mintlify/openapi.yaml carry only this change (the redocly rebundle reorders unrelated schemas, so the diff is scoped to the actual change; run make build on merge to fully re-normalize).

Known limitations (PoC)

  • The served card payload uses processorTransactionToken; the schema exposes issuerTransactionToken. SDK deserialization still succeeds (the loop works via id), but the token isn't surfaced under the typed field — flagged for a follow-up rename.
  • GET /transactions?type=CARD is not yet a valid filter (TransactionType is INCOMING/OUTGOING); clients filter client-side on type: CARD. Follow-up.

🤖 arcing-fulcrum(#1) | Feedback

@vercel

vercelBot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderIgnoredIgnoredPreviewJun 25, 2026 10:07pm
grid-wallet-demoIgnoredIgnoredPreviewJun 25, 2026 10:07pm

Request Review

@ls-boltls-boltBot added the bolt label Jun 25, 2026
@github-actionsgithub-actionsBot added the breaking-change Introduces a breaking change to the OpenAPI spec label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

This PR introduces breaking changes to openapi.yaml:

API Changelog 2025-10-13 vs. 2025-10-13

API Changes

GET /agents/approvals

  • ⚠️ added #/components/schemas/CardTransaction to the data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 200

GET /agents/me/actions

  • ⚠️ added #/components/schemas/CardTransaction to the data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 200

GET /agents/me/actions/{actionId}

  • ⚠️ added #/components/schemas/CardTransaction to the transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 200

POST /agents/me/quotes/{quoteId}/execute

  • ⚠️ added #/components/schemas/CardTransaction to the transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 200

GET /agents/me/transactions

  • ⚠️ added #/components/schemas/CardTransaction to the data/items/ response property oneOf list for the response status 200

GET /agents/me/transactions/{transactionId}

  • ⚠️ added #/components/schemas/CardTransaction to the response body oneOf list for the response status 200

POST /agents/me/transfer-in

  • ⚠️ added #/components/schemas/CardTransaction to the transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 201

POST /agents/me/transfer-out

  • ⚠️ added #/components/schemas/CardTransaction to the transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 201

POST /agents/{agentId}/actions/{actionId}/approve

  • ⚠️ added #/components/schemas/CardTransaction to the transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 200

POST /agents/{agentId}/actions/{actionId}/reject

  • ⚠️ added #/components/schemas/CardTransaction to the transaction/allOf[#/components/schemas/TransactionOneOf]/ response property oneOf list for the response status 200

POST /sandbox/cards/{id}/simulate/authorization

  • ⚠️ the response property cardId became optional for the status 200
  • ⚠️ the response property pullSummary became optional for the status 200
  • ⚠️ the response property refundSummary became optional for the status 200
  • ⚠️ the response property settlementSummary became optional for the status 200

POST /sandbox/cards/{id}/simulate/clearing

  • ⚠️ the response property cardId became optional for the status 200
  • ⚠️ the response property pullSummary became optional for the status 200
  • ⚠️ the response property refundSummary became optional for the status 200
  • ⚠️ the response property settlementSummary became optional for the status 200

POST /sandbox/cards/{id}/simulate/return

  • ⚠️ the response property cardId became optional for the status 200
  • ⚠️ the response property pullSummary became optional for the status 200
  • ⚠️ the response property refundSummary became optional for the status 200
  • ⚠️ the response property settlementSummary became optional for the status 200

GET /transactions

  • ⚠️ added #/components/schemas/CardTransaction to the data/items/ response property oneOf list for the response status 200

GET /transactions/{transactionId}

  • ⚠️ added #/components/schemas/CardTransaction to the response body oneOf list for the response status 200

POST /transactions/{transactionId}/confirm

  • ⚠️ added #/components/schemas/CardTransaction to the response body oneOf list for the response status 200

POST /transfer-in

  • ⚠️ added #/components/schemas/CardTransaction to the response body oneOf list for the response status 201

POST /transfer-out

  • ⚠️ added #/components/schemas/CardTransaction to the response body oneOf list for the response status 201

Detected by oasdiff. This PR will need approval from an API reviewer before merge.

@akanterGraphite App

Copy link
Copy Markdown
Contributor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actionsBot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list

csharp

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list

go

feat(api): add type discriminator to card transactions, include in transaction union

kotlin

feat(api): add card to Transaction union, type field to CardTransaction, make fields optional

openapi

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list

php

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list

python

feat(api): add CardTransaction to union, make fields optional in CardTransaction

ruby

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list

typescript

feat(openapi): add CardTransaction to TransactionOneOf for the transaction list

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-clistudio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗

grid-pythonstudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/9209b9c2e6c90caa33a7a6d5b1faabc94679979b/grid-0.0.1-py3-none-any.whl
grid-kotlinstudio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ✅test ✅

New diagnostics (1 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
grid-gostudio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@cf324088f0da687cf086f7029ffed6ffe9e4cb56
New diagnostics (1 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
grid-csharpstudio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ❗lint ✅test ❗

New diagnostics (1 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
grid-phpstudio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅lint ✅test ✅

New diagnostics (1 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
grid-rubystudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-openapistudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅

grid-typescriptstudio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/a80969f6322cc1b3710019effec2f88a25a5ccf5/dist.tar.gz

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-06-25 22:12:58 UTC

…ction list
Add CardTransaction as a third TransactionOneOf member with a CARD discriminator
so card transactions appear in GET /transactions and deserialize cleanly via the
discriminator. Add a type: CARD discriminator property to CardTransaction and
relax cardId / pullSummary / refundSummary / settlementSummary to optional so the
served card-transaction shape (the GET /transactions/{id} projection) validates.
Document on the list endpoint that card transactions are identified by type: CARD
and that this is how integrators discover a CardTransaction id in Sandbox.
@ls-bolt
ls-boltBotforce-pushed the 06-25-grid-card-txn-in-transaction-oneof branch from 3edcf11 to 4db282dCompareJune 25, 2026 22:07
benwgold added a commit that referenced this pull request Jun 27, 2026
…ction list (#622)
## Summary (draft / PoC — PR 2 of 2 spec change)
Adds `CardTransaction` as a third `TransactionOneOf` member with a
`CARD` discriminator so card transactions appear in `GET /transactions`
and deserialize cleanly via the discriminator. This is the canonical
spec change behind the Lightspark webdev SDK regen + sparkcore handler
change (the companion PR) that unblocks the documented Grid sandbox card
loop (simulate auth → list → simulate clearing → simulate return):
integrators discover the `cardTransactionId` from the public transaction
list instead of needing the internal dashboard.
### Changes
- `TransactionOneOf`: add `CardTransaction` + `CARD` discriminator
mapping.
- `CardTransaction`: add a `type: CARD` discriminator property; relax
`cardId`, `pullSummary`, `refundSummary`, `settlementSummary` to
optional so the served card-transaction shape (the `GET
/transactions/{id}` projection) validates and the list deserializes
cleanly even for card transactions without a resolved card.
- `GET /transactions`: document that card transactions are identified by
`type: CARD` and that this is how integrators discover a
`CardTransaction` id in Sandbox.
The bundled `openapi.yaml` / `mintlify/openapi.yaml` carry only this
change (the redocly rebundle reorders unrelated schemas, so the diff is
scoped to the actual change; run `make build` on merge to fully
re-normalize).
### Known limitations (PoC)
- The served card payload uses `processorTransactionToken`; the schema
exposes `issuerTransactionToken`. SDK deserialization still succeeds
(the loop works via `id`), but the token isn't surfaced under the typed
field — flagged for a follow-up rename.
- `GET /transactions?type=CARD` is not yet a valid filter
(`TransactionType` is `INCOMING`/`OUTGOING`); clients filter client-side
on `type: CARD`. Follow-up.
---
🤖
[arcing-fulcrum](https://zeus.dev.dev.sparkinfra.net/#/arc?id=arcing-fulcrum)[(#1)](https://zeus.dev.dev.sparkinfra.net/#/instance?id=arcing-fulcrum)
| [Feedback](https://zeus.dev.dev.sparkinfra.net/feedback)
Original PR: #621
---------
Co-authored-by: Bolt Agent <bolt@lightspark.com>
Co-authored-by: greptile-apps[bot] <greptile-apps[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

boltbreaking-changeIntroduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@akanter@benwgold