/** * Tables for the core search index. Fixed names, scoped by `app` and * `resource_type`, so several apps can share one database. */ import type { DbExec } from "../db/client.js"; export declare const SEARCH_RESOURCES_TABLE = "search_resources"; export declare const SEARCH_INDEX_STATE_TABLE = "search_index_state"; export declare const searchIndexStore: import("../db/store-registry.js").Store; export declare function ensureSearchIndexTables(injectedClient?: DbExec): Promise; /** * Raises an index's target version, leaving the rebuild for the first drain * at that version to claim. A process on a lower version reads the index as * outdated from then on and serves its previous search. Returns the target * now in force, which is higher than `version` when a newer build raised it. */ export declare function raiseSearchIndexTarget(exec: DbExec, target: { app: string; type: string; version: number; }): Promise; /** * Marks the index as needing a rebuild at its current version, including a * rebuild still queueing rows: its queue may predate the writes this * invalidation is for. Nothing to do before the search tables exist: there * is no index yet. */ export declare function invalidateSearchIndex(exec: DbExec, target: { app: string; type: string; }): Promise;