type Hit = {
    entityType: string;
    id: string;
    rank: number;
    title?: string;
    snippetHtml?: string;
};
type SearchWindow = {
    limit: number;
    offset: number;
};
type SearchProviderResult = {
    hits: Hit[];
    total: number;
};
type SearchProvider<Ctx> = (query: string, ctx: Ctx, window: SearchWindow) => Promise<SearchProviderResult>;
type SearchRegistry<Ctx> = Record<string, SearchProvider<Ctx>>;
type SearchParams<Ctx> = {
    query: string;
    ctx: Ctx;
    entityTypes?: string[];
    limit: number;
    cursor?: string | null;
};
type SearchGroup = {
    entityType: string;
    hits: Hit[];
    total: number;
};
type SearchResult = {
    groups: SearchGroup[];
    nextCursor: string | null;
};
declare function searchEntities<Ctx>(registry: SearchRegistry<Ctx>, params: SearchParams<Ctx>): Promise<SearchResult>;

export { type Hit, type SearchGroup, type SearchParams, type SearchProvider, type SearchProviderResult, type SearchRegistry, type SearchResult, type SearchWindow, searchEntities };
