Files
ThreadNet-Web/packages/element-web-module-api/src/api/stores.ts
T

37 lines
863 B
TypeScript
Raw Normal View History

2025-10-23 12:32:01 +05:30
/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import type { Room } from "../models/Room";
2025-11-12 12:16:31 +00:00
import { type Watchable } from "./watchable";
2025-10-23 12:32:01 +05:30
/**
* Provides some basic functionality of the Room List Store from element-web.
* @public
*/
export interface RoomListStoreApi {
/**
2025-10-24 00:29:18 +05:30
* Returns a watchable holding a flat list of sorted room.
2025-10-23 12:32:01 +05:30
*/
2025-10-24 00:29:18 +05:30
getRooms(): Watchable<Room[]>;
2025-10-23 12:32:01 +05:30
/**
* Returns a promise that resolves when RLS is ready.
*/
waitForReady(): Promise<void>;
}
/**
* Provides access to certain stores from element-web.
* @public
*/
export interface StoresApi {
/**
* Use this to access limited functionality of the RLS from element-web.
*/
2025-10-24 00:28:54 +05:30
roomListStore: RoomListStoreApi;
2025-10-23 12:32:01 +05:30
}