import type { ImageKeyDeps } from '../services/images/imageKey.js'; import type { ImageFetcher } from '../services/images/types.js'; import type { ImageDownloaderOptions } from './imageDownloader.js'; export interface StoredFile { /** `catalog//`. */ directory: string; fileName: string; buffer: Buffer; contentType: string; } export interface HttpImageFetcherOptions extends ImageDownloaderOptions { keyDeps: ImageKeyDeps; /** Writes the file to the store's file storage (`uploadFile`). */ store: (file: StoredFile) => Promise<{ url: string; }>; /** The addresses of this store's own file storage (IMG-06). */ ownStorage?: () => readonly string[]; } /** * The real `ImageFetcher`: downloads through the SSRF guard and stores the file. * A URL that points into the store's own storage is kept as it is. */ export declare function createHttpImageFetcher(options: HttpImageFetcherOptions): ImageFetcher & { close(): Promise; };