import { AuditDb } from "./audit-db.js"; import { AuthAuditEvent } from "../auth/audit-emitter.js"; //#region src/audit/auth-bridge.d.ts /** Options for {@link bridgeAuthToAudit}. @stable */ interface BridgeAuthToAuditOptions { readonly db: AuditDb; readonly onWriteError?: (event: AuthAuditEvent, error: unknown) => void; } /** Teardown returned by `bridgeAuthToAudit(...)`. @stable */ interface AuthBridgeTeardown { (): void; readonly drain: () => Promise; } /** * Subscribe the audit-log subsystem to the auth-layer audit emitter. * Token mint / revoke / rotate / rekey and every verification * outcome (granted, unauth, scope-denied, lockout) land in the chain. * Writes serialise through `appendAudit` so concurrent events * never race on `seq`; a failed write is isolated from the auth path * and logged (never swallowed) when no `onWriteError` is supplied. * * @stable */ declare function bridgeAuthToAudit(options: BridgeAuthToAuditOptions): AuthBridgeTeardown; //#endregion export { AuthBridgeTeardown, BridgeAuthToAuditOptions, bridgeAuthToAudit }; //# sourceMappingURL=auth-bridge.d.ts.map