export type DoorRequest = { method: string; path: string; body: Record; }; export type Refusal = { status: number; message: string; }; export type Prepared = { body: Record; } | { refusal: Refusal; }; export type AllowedRoute = { method: string; path: string; }; export type PartCheck = (part: Record) => string | null; export type FieldMove = { from: string; to: string; }; export type RequestRules = { routes: AllowedRoute[]; parts: Record; moved: FieldMove[]; refused: string[]; }; export declare function anyPart(): null; export declare function dataImagePart(part: Record): string | null; /** Validate the route and message parts, move fields, then reject unsupported fields. */ export declare function applyRequestRules(rules: RequestRules, request: DoorRequest): Prepared;