auth/audit_log_routes.ts view source
AuditLogRouteOptions Options for audit log route specs.
required_role
Role required to access audit routes. Default 'admin'.
type
stringstream
When provided, includes an SSE route at /audit-log/stream for realtime audit events.
The subscribe function receives the stream, channels, and the subscriber's account_id
as an identity key — enabling close_by_identity() for auth revocation.
type
{
subscribe: (
stream: SseStream<SseNotification>,
channels?: Array<string>,
identity?: string,
) => () => void;
log: Logger;
}