import type { HttpRequest } from './request';
export type FileUploadAllowedTypes = readonly string[] | string;
export interface FileUploadOptions {
    maxSize?: number | `${number}${'B' | 'KB' | 'MB' | 'GB' | 'KiB' | 'MiB' | 'GiB'}`;
    allowedTypes?: FileUploadAllowedTypes;
}
export interface FileUploadPolicy {
    maxSizeBytes?: number;
    allowedTypes?: string[];
}
export interface MultipartRequestPolicy {
    files?: Record<string, FileUploadPolicy>;
    rejectUndeclaredFiles?: boolean;
}
export declare class FileUpload<Options extends FileUploadOptions = {}> {
    path: string;
    size: number;
    type: string;
    declaredType: string;
    detectedType?: string;
    detectedExtension?: string;
    originalName: string;
    get name(): string;
}
export type UploadedFiles = Record<string, FileUpload | FileUpload[]>;
export interface ParsedMultipartBody {
    body: Record<string, unknown>;
    uploadedFiles: UploadedFiles;
}
export declare function isMultipartRequest(request: HttpRequest): boolean;
export declare function parseMultipartRequest(request: HttpRequest, policy?: MultipartRequestPolicy): Promise<ParsedMultipartBody>;
export declare function parseByteSize(value: unknown): number | undefined;
export declare function normalizeAllowedTypes(value: unknown): string[] | undefined;
export declare function mimeMatchesAllowedTypes(mimeType: string, allowedTypes: readonly string[] | undefined): boolean;
export declare function cleanupUploadedFiles(request: HttpRequest): Promise<void>;
//# sourceMappingURL=uploads.d.ts.map