//#region src/index.d.ts
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>;
//#endregion
export { Hit, SearchGroup, SearchParams, SearchProvider, SearchProviderResult, SearchRegistry, SearchResult, SearchWindow, searchEntities };