Overview
Approval gates are configured directly onwrap() via the
requiresApproval (Python: requires_approval) option — no separate method needed.
The session is automatically rolled back when a reviewer rejects an action — no manual cleanup required.
Flow
1
wrap() detects the method path is in requiresApproval / requires_approval
2
Logs the action as PENDING_APPROVAL to the backend (awaited in TS, synchronous in Python)
3
SDK polls GET /approvals/:id at the configured poll interval
4
A reviewer approves or rejects from the dashboard
5
Approved → method executes → action updated to SUCCESS
6
Rejected → ApprovalRejectedError thrown/raised → session auto-rolled back
Path matching
The strings inrequiresApproval/requires_approval match the method path
after the connector prefix. For wrap(stripe, session, { connector: 'stripe' }):
Method names differ slightly between the Stripe Node SDK (
del) and the Stripe Python SDK (delete) — match the string to whatever your connector’s actual method is named.