import type { H3Event } from 'h3'; export declare const INDEXING_HEADER = "x-ai-ready-indexing"; export interface IndexPageOptions { /** Skip if page was indexed within TTL (uses config ttl if not specified) */ ttl?: number; /** Force re-index even if fresh */ force?: boolean; /** Skip calling the ai-ready:page:indexed hook */ skipHook?: boolean; /** Mark failed fetches as errors in DB to prevent retry loops */ markFailedAsError?: boolean; } export interface IndexPageResult { success: boolean; /** True if page was already fresh and skipped */ skipped?: boolean; /** True if this was an update vs new index */ isUpdate?: boolean; /** True if content actually changed (hash differs from previous) */ contentChanged?: boolean; /** Page data if successful */ data?: { route: string; title: string; description: string; headings: string; keywords: string[]; markdown: string; contentHash: string; updatedAt: string; }; /** Error message if failed */ error?: string; } /** * Manually index a page's HTML content into database * Use this from custom plugins or API routes to trigger indexing */ export declare function indexPage(route: string, html: string, options?: IndexPageOptions, event?: H3Event): Promise; /** * Index a page by fetching its HTML first * Convenience wrapper around indexPage that handles fetching */ export declare function indexPageByRoute(route: string, event: H3Event | undefined, options?: IndexPageOptions): Promise;