Skip to content

Make PaymentSparkWalletInfo.assetType a free-form currency code#685

Merged
kphurley7 merged 1 commit into
mainfrom
kph/spark-token-asset-type-string
Jul 14, 2026
Merged

Make PaymentSparkWalletInfo.assetType a free-form currency code#685
kphurley7 merged 1 commit into
mainfrom
kph/spark-token-asset-type-string

Conversation

@kphurley7

Copy link
Copy Markdown
Contributor

Why

PaymentSparkWalletInfo.assetType was a closed enum (BTC / USDB). Grid now supports arbitrary Spark tokens, so the valid set is per-environment runtime config (the Spark token registry) and can't be expressed as a static schema enum. The generated client already stamps/reads any configured token's currency code here.

This is the missing source-repo half of a change whose generated output already merged in webdev: lightsparkdev/webdev#28745 removed the same assetType enum validator + description from the vendored grid-api/ copy, but the corresponding grid-api source change was never made. This brings the source back in sync so the next webdev update_schema.sh sync is a no-op instead of re-adding the enum.

What Changed

  • openapi/components/schemas/common/PaymentSparkWalletInfo.yaml: drop enum: [BTC, USDB] on assetType; description "Type of asset" -> "Type of asset or configured Spark token currency code".
  • Rebuilt openapi.yaml and mintlify/openapi.yaml via npm run build:openapi (Redocly bundle). Diff is exactly the three-line change in each file, no reformat churn.

Validation

  • npm run lint:openapi — valid, 0 errors (pre-existing warnings/infos only; none touch PaymentSparkWalletInfo).
  • mintlify/openapi.yaml is byte-identical to openapi.yaml (as the build enforces).

🤖 Generated with Claude Code

Drop the closed BTC/USDB enum on assetType so it can carry any
configured Spark token currency code, and update the description to
match. The valid set is now per-environment runtime config (the Spark
token registry), which a static schema enum can't express.

The generated side of this change already landed in webdev
(lightsparkdev/webdev#28745); this brings the grid-api source spec
(and the bundled openapi.yaml / mintlify/openapi.yaml) into sync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PuNSpq8PKF6p1NK6z2gqBU
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Jul 14, 2026 1:09am
grid-wallet-demo Ignored Ignored Jul 14, 2026 1:09am

Request Review

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Jul 14, 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

POST webhook:agent-action

  • ⚠️ removed the enum value BTC of the request property allOf[subschema #2]/data/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType
  • ⚠️ removed the enum value BTC of the request property allOf[subschema #2]/data/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType
  • ⚠️ removed the enum value USDB of the request property allOf[subschema #2]/data/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType
  • ⚠️ removed the enum value USDB of the request property allOf[subschema #2]/data/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType

POST webhook:internal-account-status

  • ⚠️ removed the enum value BTC of the request property allOf[subschema #2]/data/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType
  • ⚠️ removed the enum value USDB of the request property allOf[subschema #2]/data/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType

POST webhook:outgoing-payment

  • ⚠️ removed the enum value BTC of the request property allOf[subschema #2]/data/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType
  • ⚠️ removed the enum value USDB of the request property allOf[subschema #2]/data/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #40: Spark Wallet]/allOf[subschema #3]/assetType

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

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

cli

chore(internal): regenerate SDK with no functional changes

go

chore(internal): regenerate SDK with no functional changes

kotlin

chore(internal): regenerate SDK with no functional changes

openapi

feat(api): support custom Spark token currencies in assetType field

php

chore(internal): regenerate SDK with no functional changes

python

chore(internal): regenerate SDK with no functional changes

ruby

chore(internal): regenerate SDK with no functional changes

typescript

chore(internal): regenerate SDK with no functional changes
⚠️ grid-openapi studio · code

Your SDK build had at least one "warning" diagnostic.
generate ⚠️

grid-ruby studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ⏭️lint ✅test ✅

⚠️ grid-go studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ⏭️lint ❗test ❗

go get github.com/stainless-sdks/grid-go@413527780042c3317676858078beaf490572b779
⚠️ grid-kotlin studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ⚠️build ⏭️lint ⏭️test ❗

grid-typescript studio · conflict

Your SDK build had at least one note diagnostic.

⚠️ grid-python studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ✅build ⏭️lint ⏭️test ❗

grid-php studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅lint ✅test ✅

⚠️ grid-cli studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ⚠️build ⏭️lint ⏭️test ❗


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-07-14 01:28:51 UTC

@kphurley7
kphurley7 requested a review from jklein24 July 14, 2026 01:10
@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR allows configured Spark token codes in payment wallet information. The main changes are:

  • Removes the static BTC and USDB enum from PaymentSparkWalletInfo.assetType.
  • Updates the field description to cover configured Spark token currency codes.
  • Synchronizes both generated OpenAPI bundles with the source schema.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The field remains a required string and does not control schema discrimination.
  • Both generated bundles match the source change.

Important Files Changed

Filename Overview
openapi/components/schemas/common/PaymentSparkWalletInfo.yaml Widens the required assetType field to support currency codes supplied by the runtime Spark token registry.
openapi.yaml Updates the generated root bundle to match the source schema.
mintlify/openapi.yaml Updates the generated Mintlify bundle to match the source schema.

Reviews (1): Last reviewed commit: "Make PaymentSparkWalletInfo.assetType a ..." | Re-trigger Greptile

@kphurley7
kphurley7 merged commit 5869994 into main Jul 14, 2026
10 checks passed
@kphurley7
kphurley7 deleted the kph/spark-token-asset-type-string branch July 14, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants