Skip to content

feat: add approval_requests public API endpoints to V2 CLI commands#1542

Merged
aditigoyal-stripe merged 5 commits intomasterfrom
aditigoyal-addmycommands
Apr 13, 2026
Merged

feat: add approval_requests public API endpoints to V2 CLI commands#1542
aditigoyal-stripe merged 5 commits intomasterfrom
aditigoyal-addmycommands

Conversation

@aditigoyal-stripe
Copy link
Copy Markdown
Contributor

Adds CLI commands for the 5 publicly documented endpoints from approval_requests_service.proto: list, retrieve, submit, cancel, execute. Skips approve/reject which are documented: INTERNAL.

Committed-By-Agent: claude

Reviewers

r? @
cc @stripe/developer-products

Summary

Adds CLI commands for the 5 publicly documented endpoints from
approval_requests_service.proto: list, retrieve, submit, cancel, execute.
Skips approve/reject which are documented: INTERNAL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
@aditigoyal-stripe aditigoyal-stripe requested a review from a team as a code owner April 10, 2026 01:05
@aditigoyal-stripe
Copy link
Copy Markdown
Contributor Author

r? @vcheung-stripe

Copy link
Copy Markdown
Collaborator

@vcheung-stripe vcheung-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think this is failing CI because these two files (resources_gen.go and specs_gen.go) are expected to be autogenerated from the OpenAPI spec. I'd recommend moving these lines into a different file (somewhere in pkg/cmd/resource/ is probably good), and then updating PostProcessResourceCommands to "patch in" these new commands into the command tree.

aditigoyal-stripe and others added 2 commits April 9, 2026 19:16
Move approval_requests CLI commands out of auto-generated files into a
hand-maintained file (pkg/cmd/resource/approval_requests.go) and patch
them into the command tree via PostProcessResourceCommands, following
the same pattern as events and terminal commands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Some test contexts call PostProcessResourceCommands without V2 resources
registered, so the core namespace doesn't exist. Match RemoveAppsCmd's
pattern of silently returning nil instead of erroring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
@aditigoyal-stripe
Copy link
Copy Markdown
Contributor Author

Nice! I think this is failing CI because these two files (resources_gen.go and specs_gen.go) are expected to be autogenerated from the OpenAPI spec. I'd recommend moving these lines into a different file (somewhere in pkg/cmd/resource/ is probably good), and then updating PostProcessResourceCommands to "patch in" these new commands into the command tree.

Okay fixed it.

SubmitApprovalRequestRequest now includes an optional reason field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Co-authored-by: Vincent Cheung <71457708+vcheung-stripe@users.noreply.github.com>
@aditigoyal-stripe aditigoyal-stripe merged commit 7597fe5 into master Apr 13, 2026
13 checks passed
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