/** Maximum stored image size (~5 MB of raw PNG bytes). */ export declare const RECAP_IMAGE_MAX_BYTES: number; /** Only `image/png` is ever stored or served. */ export declare const RECAP_IMAGE_CONTENT_TYPE = "image/png"; /** * Stored recap images older than this are pruned on the next write (30 days). * Each PR push uploads a fresh screenshot under a new token; without expiry the * table — and the set of anonymously-fetchable image URLs — would grow without * bound. 30 days comfortably outlives any PR's review window. */ export declare const RECAP_IMAGE_TTL_MS: number; export declare function ensureRecapImageTable(): Promise; /** * Delete recap images older than {@link RECAP_IMAGE_TTL_MS}. Called best-effort * after each write so the table stays bounded. Returns the number of rows * removed. Dialect-agnostic (a plain `DELETE ... WHERE created_at < ?`). */ export declare function pruneExpiredRecapImages(now?: number): Promise; /** Generate a long, unguessable lowercase-hex token (default 32 bytes → 64 hex chars). */ export declare function generateRecapImageToken(byteLength?: number): string; /** True when `token` matches the strict hex token format (no traversal characters). */ export declare function isValidRecapImageToken(token: string | undefined | null): boolean; export interface StoredRecapImage { bytes: Buffer; contentType: string; } /** * Store PNG bytes and return the freshly minted token. Caller is responsible * for enforcing the size cap before calling (we re-check defensively here too). */ export declare function saveRecapImage(png: Buffer, options?: { ownerEmail?: string | null; }): Promise<{ token: string; }>; /** * Load a stored image by token. Returns `null` for an unknown or malformed * token. Never returns anything but the opaque image bytes — no plan data. */ export declare function getRecapImage(token: string): Promise; //# sourceMappingURL=recap-image-store.d.ts.map