import type { IncomingMessage } from 'node:http'; export interface FormPart { name: string; fileName?: string; contentType?: string; data: Buffer; } export declare class BodyTooLarge extends Error { constructor(maxBytes: number); } export declare const declaredTooLarge: (req: IncomingMessage, maxBytes: number) => boolean; export declare function readBody(req: IncomingMessage, maxBytes?: number): Promise; export declare function boundaryOf(contentType: string | undefined): string | undefined; export declare function parseMultipart(body: Buffer, boundary: string): FormPart[];