CreateApprovalGateOptions
Defined in: src/mft/approvals.ts:227
Options accepted by createApprovalGate.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
approvalId | (input: { route: MftRoute; }) => string | Function that derives an approval id from each route invocation. | src/mft/approvals.ts:233 |
now? | () => Date | Optional clock used for requestedAt/resolvedAt. | src/mft/approvals.ts:235 |
onRequested? | (request: ApprovalRequest) => void | Observer fired when a new approval request is created. | src/mft/approvals.ts:237 |
registry | ApprovalRegistry | Registry that holds approval requests. | src/mft/approvals.ts:229 |
runner | ScheduleRouteRunner | Underlying runner that executes the route once approval is granted. | src/mft/approvals.ts:231 |
timeoutMs? | number | Maximum 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 |