Skip to content

refactor(cards): name the card update, dispute, and environment enums - #1153

Merged
shreyav merged 1 commit into
mainfrom
named-enums-cards
Oct 9, 2026
Merged

shreyav merged 1 commit into
mainfrom
named-enums-cards

Conversation

@shreyav

@shreyav shreyav commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Independent of the quote and transaction enum PRs; this one targets main directly. It gives inline enums on the cards surface a named schema so generated clients emit enum types instead of plain strings.

What changed

  • CardUpdateRequest.status and CardUpdateRequest.substatus now reference CardUpdateStatus and CardUpdateSubstatus. The update status is a three-value subset of CardStatus, so it keeps its own schema rather than widening the request to every card status.
  • SandboxCardDisputeResponse.status now references SandboxCardDisputeStatus.
  • SandboxCardDisputeCloseRequest.disposition now references CardDisputeDisposition. The response's disposition stays inline because it is nullable and expresses that with a null enum member, which does not fit a shared string enum without restructuring the field.
  • CardPinUrlResponse.environment now references GridEnvironment.
  • Rebuilt openapi.yaml and mintlify/openapi.yaml with make build.

SDK impact

The wire format is unchanged. In statically typed SDKs these fields change from string to enum, which can require source changes for callers that construct the request or read the field as a string.

Test plan

  • make lint-openapi: Redocly reports the description valid, Spectral exits 0.
  • oasdiff breaking against main: no breaking changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MYijrrgsrFLJZ5fkmC5XwJ

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Oct 9, 2026 5:22pm UTC
grid-flow-builder Ignored Ignored Preview Oct 9, 2026 5:22pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 9, 2026 5:22pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical impact] This PR appears safe to merge; the named enums preserve the existing API contracts.

Summary

This PR moves five inline card enums into named schemas so generated clients can use named enum types.

  • Preserves existing values, descriptions, examples, and required fields.
  • Keeps CardUpdateStatus limited to the three statuses callers can request.
  • Leaves the nullable response disposition unchanged.
  • Updates both generated OpenAPI bundles.
    No actionable issues found.

Reviews (1) · Last reviewed commit: "refactor(cards): name the card update, d..." · Reviewed by Greptile

@shreyav
shreyav force-pushed the named-enums-cards branch from 3908f26 to 32dd409 Compare October 9, 2026 17:01
@shreyav
shreyav changed the base branch from named-enums-customers to main October 9, 2026 17:01
@mintlify

mintlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Oct 9, 2026, 5:23 PM

CardUpdateRequest.status and .substatus, SandboxCardDisputeResponse.status,
SandboxCardDisputeCloseRequest.disposition, and CardPinUrlResponse.environment
declared their enums inline. Each is now a component schema. The wire format
is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYijrrgsrFLJZ5fkmC5XwJ
@shreyav
shreyav force-pushed the named-enums-cards branch from 32dd409 to 977f4b4 Compare October 9, 2026 17:22
@shreyav
shreyav merged commit 2758529 into main Oct 9, 2026
8 checks passed
@shreyav
shreyav deleted the named-enums-cards branch October 9, 2026 17:27

This branch was successfully deployed

1 active deployment
staging - mintlify — 977f4b4e Deployed Oct 9, 2026 by mintlify[bot]
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