/** Matches HandleFormMessage in crates/functions/src/protocol.rs. */ export interface HandleFormMessage { type: "handle_form"; call_id: string; component: string; route_path: string; method: string; url: string; params: Record; search_params: Record; form: Record; /** The raw request body, as sent. Empty for GET. */ body: string; headers: Record; cookies: Record; auth: { user_id: string | null; is_admin: boolean; tenant_id: string | null; roles: string[]; }; } type Send = (msg: Record) => void; /** Parsed form fields. Mirrors URLSearchParams get/getAll/has semantics. */ export interface FormFields { /** First value for `name`, or null. */ get(name: string): string | null; /** All values for `name` (empty array if none). */ getAll(name: string): string[]; has(name: string): boolean; /** Raw map: name → value | values. */ readonly fields: Record; } export declare function handleForm(msg: HandleFormMessage, send: Send): Promise; export {};