Skip to content

CreateApprovalGateOptions

Defined in: src/mft/approvals.ts:227

Options accepted by createApprovalGate.

PropertyTypeDescriptionDefined in
approvalId(input: { route: MftRoute; }) => stringFunction that derives an approval id from each route invocation.src/mft/approvals.ts:233
now?() => DateOptional clock used for requestedAt/resolvedAt.src/mft/approvals.ts:235
onRequested?(request: ApprovalRequest) => voidObserver fired when a new approval request is created.src/mft/approvals.ts:237
registryApprovalRegistryRegistry that holds approval requests.src/mft/approvals.ts:229
runnerScheduleRouteRunnerUnderlying runner that executes the route once approval is granted.src/mft/approvals.ts:231
timeoutMs?numberMaximum time in milliseconds an approval may stay pending. When the window elapses the request is rejected with reason "timeout" and the gated run fails with a typed ApprovalTimeoutError. Unset means wait forever.src/mft/approvals.ts:243