import type { ShareThumbnailConfig } from './share-types.js'; type ThumbnailScope = 'file' | 'site'; interface ThumbnailTaskInput { scope: ThumbnailScope; token: string; /** Stored record id (used to update status). */ recordId: string; } interface ThumbnailRenderContext { config: ShareThumbnailConfig; /** Loopback gateway base URL (e.g. http://127.0.0.1:18790) used by the renderer. */ internalBaseUrl: string; } export declare function getThumbnailPath(token: string): string; export declare function thumbnailExists(token: string): Promise; export declare function readThumbnail(token: string): Promise; /** Delete the cached thumbnail (called from share-store cleanup hook). */ export declare function deleteThumbnail(token: string): Promise; /** * Schedule generation. Returns the current effective status without waiting. * If a recent failure is within cooldown, returns 'failed' and skips work. */ export declare function scheduleThumbnail(task: ThumbnailTaskInput, ctx: ThumbnailRenderContext): 'pending' | 'ready' | 'failed' | 'disabled'; export declare function shutdownThumbnailBrowser(): Promise; type PlaceholderKind = 'file' | 'folder' | 'html' | 'image' | 'video' | 'audio' | 'pdf' | 'archive' | 'text' | 'doc' | 'sheet' | 'slides'; /** Generate a static placeholder card as an SVG-then-jpeg surrogate. Since we * have no native SVG-to-raster encoder available without extra deps, we emit a * tiny inline-SVG that browsers render directly. Callers store .jpg but the * route content-type is set to the actual returned mime. */ export declare function placeholderSvg(fileName: string, kind: PlaceholderKind): Buffer; /** Determine if the cached file is a real jpeg or a placeholder SVG by sniffing. */ export declare function thumbnailContentType(bytes: Buffer): string; /** Helper for tests + cleanup. */ export declare function resetThumbnailStateForTests(): void; export {};