matrix-react-sdk
Version:
SDK for matrix.org using React
67 lines (66 loc) • 2.08 kB
TypeScript
import EventIndex from "../indexing/EventIndex";
export declare class EventIndexPeg {
index: EventIndex;
error: Error;
private _supportIsInstalled;
/**
* Initialize the EventIndexPeg and if event indexing is enabled initialize
* the event index.
*
* @return {Promise<boolean>} A promise that will resolve to true if an
* EventIndex was successfully initialized, false otherwise.
*/
init(): Promise<boolean>;
/**
* Initialize the event index.
*
* @returns {boolean} True if the event index was succesfully initialized,
* false otherwise.
*/
initEventIndex(): Promise<boolean>;
/**
* Check if the current platform has support for event indexing.
*
* @return {boolean} True if it has support, false otherwise. Note that this
* does not mean that support is installed.
*/
platformHasSupport(): boolean;
/**
* Check if event indexing support is installed for the platfrom.
*
* Event indexing might require additional optional modules to be installed,
* this tells us if those are installed. Note that this should only be
* called after the init() method was called.
*
* @return {boolean} True if support is installed, false otherwise.
*/
supportIsInstalled(): boolean;
/**
* Get the current event index.
*
* @return {EventIndex} The current event index.
*/
get(): any;
start(): void;
stop(): void;
/**
* Unset our event store
*
* After a call to this the init() method will need to be called again.
*
* @return {Promise} A promise that will resolve once the event index is
* closed.
*/
unset(): Promise<void>;
/**
* Delete our event indexer.
*
* After a call to this the init() method will need to be called again.
*
* @return {Promise} A promise that will resolve once the event index is
* deleted.
*/
deleteEventIndex(): Promise<void>;
}
declare const _default: EventIndexPeg;
export default _default;