feat: add OAuth grants management (list + revoke)#233
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Confidence score: 5/5
- Safe to merge after the addressed issues were fixed.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Requires human review: Adds new OAuth grants feature (list+revoke), new module, types, and version bump. Requires human review to validate API design and production readiness.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Auto-approved: Adds OAuth grants list and revoke functionality with sync/async support and tests. No changes to existing core logic.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Auto-approved: Adds new OAuth grants list/revoke endpoints with types, examples, and tests. No changes to core logic or infrastructure; low risk addition to API wrappers.
Re-trigger cubic
Summary
Adds OAuth grant management to the Python SDK, mirroring resend-node#998.
resend.OAuthGrants.list(params?)→GET /oauth/grants(paginated vialimit/before/after)resend.OAuthGrants.revoke(oauth_grant_id)→DELETE /oauth/grants/{oauth_grant_id}list_async/revoke_asyncOAuthGrant,OAuthGrantClientUsage
Notes
resourcefield omitted. The Node PR still carries it, but per the launch thread it's a dead field being removed from the API everywhere ("assume it doesn't exist"), so it's intentionally not modeled here.revoke(notremove) to match the Node SDK and the API semantics — a grant is revoked (it stays in the list withrevoked_atset), not deleted.Docs
Testing
mypy --strictcleanSummary by cubic
Adds OAuth grant management to the Python SDK. List grants with pagination and revoke them, sync and async, via
resend.OAuthGrants. Includes sync/async usage examples.resend.OAuthGrants.list(params?)→ GET/oauth/grantswithlimit,before,after.resend.OAuthGrants.revoke(oauth_grant_id)→ DELETE/oauth/grants/{oauth_grant_id}; revoked grants showrevoked_at.list_async,revoke_async.resendandresend.oauth_grants:OAuthGrants,OAuthGrant,OAuthGrantClient; deprecatedresourcefield omitted. Test names updated to drop “should” per project convention.examples/oauth_grants.pyandexamples/async/oauth_grants_async.py.Written for commit 0cbe1c6. Summary will update on new commits.