export declare const PREVIEWS_DIR: string; /** A generous ceiling for a 256px-ish thumbnail; a body past this is not one. */ export declare const MAX_PREVIEW_BYTES: number; export declare function previewsDirPath(root: string): string; /** * An asset id is model- and forger-generated, and it arrives here inside a URL path. Anything that * is not a plain id is refused rather than sanitised: a caller asking for `../../etc/passwd` is not * a caller whose intent should be guessed at, and this server can write to the creator's project. */ export declare function isSafeAssetId(assetId: string): boolean; export declare function previewPath(root: string, assetId: string): string | null; /** Asset ids that already have a thumbnail, so the panel only asks for the ones that do not. */ export declare function listPreviews(root: string): string[]; export declare function readPreview(root: string, assetId: string): Buffer | null; /** * Store one rendered thumbnail. `data` is what the engine returned — either a bare base64 payload * or a full `data:image/png;base64,…` URL, since the two preview renderers differ on that and the * caller should not have to care. * * Returns false for anything that is not storable, so the route can answer honestly rather than * reporting a write that did not happen. */ export declare function writePreview(root: string, assetId: string, data: string): boolean; /** * Drop an asset's thumbnail — what `bitmagic assets remove` does so the next asset minted under a * reused id is not drawn with the old one's picture (previews are keyed by id and never otherwise * invalidated). Best-effort: a missing or unremovable file is not a failed removal. */ export declare function removePreview(root: string, assetId: string): void;