import { AuthChallenge } from '../types/challenges.js'; import { AuthErrorView } from '../types/errors.js'; import { AuthSessionView } from '../types/session.js'; /** * Runtime-validate a session payload for UI consumption. * Returns null for missing or malformed payloads (never throws). */ export declare function parseAuthSessionView(input: unknown): AuthSessionView | null; /** * Runtime-validate / normalize an error envelope. */ export declare function parseAuthErrorView(input: unknown): AuthErrorView; /** * Runtime-validate a challenge object (OTP, passkey, OAuth, magic link). */ export declare function parseAuthChallenge(input: unknown): AuthChallenge | null; /** * Validate OAuth callback-shaped results. * Returns a success redirect challenge, an error view, or null if unrecognized. */ export declare function parseOAuthCallbackResult(input: unknown): { ok: true; challenge: Extract; } | { ok: false; error: AuthErrorView; } | null;