import { request as httpRequest } from "node:http"; import { resolvePinnedHostname } from "../infra/net/ssrf.js"; export declare const MEDIA_MAX_BYTES: number; type RequestImpl = typeof httpRequest; type ResolvePinnedHostnameImpl = typeof resolvePinnedHostname; export declare function setMediaStoreNetworkDepsForTest(deps?: { httpRequest?: RequestImpl; httpsRequest?: RequestImpl; resolvePinnedHostname?: ResolvePinnedHostnameImpl; }): void; /** * Extract original filename from path if it matches the embedded format. * Pattern: {original}---{uuid}.{ext} → returns "{original}.{ext}" * Falls back to basename if no pattern match, or "file.bin" if empty. */ export declare function extractOriginalFilename(filePath: string): string; export declare function getMediaDir(): string; export declare function ensureMediaDir(): Promise; export declare function cleanOldMedia(ttlMs?: number): Promise; export type SavedMedia = { id: string; path: string; size: number; contentType?: string; }; export type SaveMediaSourceErrorCode = "invalid-path" | "not-found" | "not-file" | "path-mismatch" | "too-large"; export declare class SaveMediaSourceError extends Error { code: SaveMediaSourceErrorCode; constructor(code: SaveMediaSourceErrorCode, message: string, options?: ErrorOptions); } export declare function saveMediaSource(source: string, headers?: Record, subdir?: string): Promise; export declare function saveMediaBuffer(buffer: Buffer, contentType?: string, subdir?: string, maxBytes?: number, originalFilename?: string): Promise; export {};