Skip to content
mercury framework
GitHub

ConfirmOutcome

ConfirmOutcome = { status: "not-a-token"; } | { status: "not-found"; } | { data: unknown; status: "ok"; } | { error: string; status: "failed"; } | { status: "resume"; }

Defined in: types/channel-types/index.ts:299

Structured outcome of resolving a confirmation token, distinguishing cases the string-returning confirm collapses together. not-a-token = the input isn’t token-shaped (run the normal flow); not-found = token-shaped but no matching pending confirmation; ok/failed = the staged action was consumed and run. Returned by ctx.resolveConfirmation — the value the core’s resolveConfirmation produces. A channel that needs to branch on acceptance (the HTTP /confirm endpoint’s resolved flag) uses it; one that only needs a reply string uses confirm.