import type { components } from "../lib/openapi.js"; import type { SyncedImage } from "./state.js"; import { type Configuration, type OperationResult, type Resource, type ResourceGroup } from "./types.js"; type Image = components["schemas"]["Image"]; export declare function uploadImage(configuration: Configuration, imagePath: string): Promise<{ id: string; url: string; filename: string; }>; /** * A safe local filename for a remote image: derived from the URL's pathname * (never the query string) and sanitized so a hostile URL can't escape the * media directory. */ export declare function remoteImageFilename(image: Image): string; /** * Downloads remote images into `media/`, returning sync-state entries for * the successful ones only — a failed download must stay unrecorded so it is * retried on the next pull rather than referenced as a file that doesn't * exist. Filename collisions between distinct images get an id prefix so one * image can never silently overwrite (or masquerade as) another. */ export declare function downloadImages(images: Image[], configuration: Configuration, takenFilenames?: Iterable): Promise<{ synced: SyncedImage[]; result: OperationResult; }>; export declare const REMOTE_IMAGES_RESOURCE: Resource; export declare const LOCAL_IMAGES_RESOURCE: Resource; export declare const IMAGES_RESOURCE: ResourceGroup; export {};