UNPKG

matrix-react-sdk

Version:
55 lines (54 loc) 1.6 kB
import { ISearchResult, ISearchResults, MatrixClient } from "matrix-js-sdk/src/matrix"; import { ISearchArgs } from "./indexing/BaseEventIndexManager"; export interface ISeshatSearchResults extends ISearchResults { seshatQuery?: ISearchArgs; cachedEvents?: ISearchResult[]; oldestEventFrom?: "local" | "server"; serverSideNextBatch?: string; } export declare function searchPagination(client: MatrixClient, searchResult: ISearchResults): Promise<ISearchResults>; export default function eventSearch(client: MatrixClient, term: string, roomId?: string, abortSignal?: AbortSignal): Promise<ISearchResults>; /** * The scope for a message search, either in the current room or across all rooms. */ export declare enum SearchScope { Room = "Room", All = "All" } /** * Information about a message search in progress. */ export interface SearchInfo { /** * Opaque ID for this search. */ searchId: number; /** * The room ID being searched, or undefined if searching all rooms. */ roomId?: string; /** * The search term. */ term: string; /** * The scope of the search. */ scope: SearchScope; /** * The promise for the search results. */ promise: Promise<ISearchResults>; /** * Controller for aborting the search. */ abortController?: AbortController; /** * Whether the search is currently awaiting data from the backend. */ inProgress?: boolean; /** * The total count of matching results as returned by the backend. */ count?: number; }