import { IncomingMessage, ServerResponse } from 'http'; interface SourceData { mtime?: Date; maxAge?: number; getData: () => Promise; } declare type Source = (src: string, reqOptions?: any) => Promise; declare type SourceFactory = (options?: any) => Source; interface ImageMeta { width: number; height: number; type: string; mimeType: string; } interface IPXCTX { sources: Record; } declare type IPX = (id: string, modifiers?: Record, reqOptions?: any) => { src: () => Promise; data: () => Promise<{ data: Buffer; meta: ImageMeta; format: string; }>; }; interface IPXOptions { dir?: false | string; domains?: false | string[]; alias: Record; sharp?: { [key: string]: any; }; } declare function createIPX(userOptions: Partial): IPX; interface IPXHRequest { url: string; headers?: Record; options?: any; } interface IPXHResponse { statusCode: number; statusMessage: string; headers: Record; body: any; } declare function handleRequest(req: IPXHRequest, ipx: IPX): Promise; declare function createIPXMiddleware(ipx: IPX): (req: IncomingMessage, res: ServerResponse) => void; export { IPX, IPXCTX, IPXHRequest, IPXHResponse, IPXOptions, ImageMeta, Source, SourceData, SourceFactory, createIPX, createIPXMiddleware, handleRequest };