import type { H3Event } from 'h3'; export interface BuildMeta { buildId: string; pageCount: number; createdAt: string; } export interface StaleCheckResult { action: 'none' | 'restored' | 'marked_pending'; buildId?: string; dbCount: number; dumpCount?: number; reason?: string; /** Number of pages marked pending due to hash change */ changedCount?: number; /** Number of new pages added from dump */ addedCount?: number; /** Number of sitemaps with errors reset */ sitemapsReset?: number; } export declare const STALE_CHECK_INTERVAL_MS: number; /** * Check if data is stale and handle restore/mark-pending * Called at start of cron - handles: * 1. Empty DB → restore from dump * 2. Build ID changed → compare hashes, only mark changed pages pending, add new pages from dump * Skips HTTP fetch if checked within 5 minutes and DB is populated */ export declare function checkAndHandleStale(event?: H3Event): Promise;