/** * Content Handlers Module * * Central routing for content-type specific sanitization handlers. * Detects MIME type from Content-Type header and routes to appropriate handler. * * Supported content types: * - application/pdf -> PDF handler * - application/json -> JSON handler * - image/svg+xml -> SVG handler * * Unsupported types return structured rejection (no throw). */ import type { HandlerResult } from './types.js'; /** * Normalize Content-Type header to base MIME type * * Examples: * - "application/pdf; charset=utf-8" -> "application/pdf" * - "application/json" -> "application/json" * - "IMAGE/SVG+XML" -> "image/svg+xml" * * @param contentType - Raw Content-Type header value * @returns Normalized MIME type (lowercase, parameters stripped) */ export declare function normalizeMimeType(contentType: string): string; /** * Route content to appropriate handler based on MIME type * * @param content - Raw content (string or Buffer) * @param contentType - Content-Type header value * @returns Handler result (success or error/rejected) */ export declare function routeContentHandler(content: string | Buffer, contentType: string): Promise; export type { HandlerResult, HandlerSuccessResult, HandlerErrorResult } from './types.js'; //# sourceMappingURL=index.d.ts.map