import fs from "node:fs"; import { ResultAsync } from "neverthrow"; import { z } from "zod"; import type { DataStore } from "../utils/data-store.js"; export declare const mediaDownloaderConfigSchema: z.ZodObject<{ keys: z.ZodOptional>; mediaPattern: z.ZodDefault>; matchPath: z.ZodOptional]>>; maxConcurrent: z.ZodDefault; ignoreCache: z.ZodDefault; enableIfModifiedSinceCheck: z.ZodDefault; enableContentLengthCheck: z.ZodDefault; forceClearTempFiles: z.ZodDefault; transformLocalPath: z.ZodOptional, z.ZodString>>; maxTimeout: z.ZodDefault; abortOnError: z.ZodDefault; updatePaths: z.ZodDefault; }, z.core.$strip>; type MediaDownloaderConfigWithDefaults = z.infer; export declare function localFilePathFromUrl(url: string): string; export declare function checkCacheStatus(url: string, backupPath: string, abortSignal: AbortSignal, config: Pick): ResultAsync<{ shouldDownload: boolean; existingFile?: undefined; stats?: undefined; } | { shouldDownload: boolean; existingFile: string; stats: fs.Stats; } | { shouldDownload: boolean; existingFile: string; stats: fs.Stats; }, FileSystemError | NetworkError>; export declare function downloadFile(url: string, filePath: string, abortSignal: AbortSignal, config: MediaDownloaderConfigWithDefaults): ResultAsync; type MediaDownload = { url: string; sourceId: string; localPath: string; }; export declare function findMediaUrls(dataStore: DataStore, options: MediaDownloaderConfigWithDefaults, encodeChars: string, queryJsonPaths: string[]): Promise; export default function mediaDownloader(config?: z.input): import("../content-transform.js").ContentTransform; /** * Base error class for MediaDownloader errors */ declare class MediaDownloaderError extends Error { constructor(message: string, cause?: unknown); } declare class FileSystemError extends MediaDownloaderError { constructor(message: string, cause?: unknown); } declare class NetworkError extends MediaDownloaderError { constructor(message: string, cause?: unknown); } export {}; //# sourceMappingURL=media-downloader.d.ts.map