File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
packages/element-web-module-api/src Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { AccountAuthApiExtension } from "./auth.ts";
1717import { ProfileApiExtension } from "./profile.ts" ;
1818import { ExtrasApi } from "./extras.ts" ;
1919import { BuiltinsApi } from "./builtins.ts" ;
20+ import { StoresApi } from "./stores.ts" ;
2021import { ClientApi } from "./client.ts" ;
2122
2223/**
@@ -124,6 +125,11 @@ export interface Api
124125 */
125126 readonly extras : ExtrasApi ;
126127
128+ /**
129+ * Allows modules to access a limited functionality of certain stores from Element Web.
130+ */
131+ readonly stores : StoresApi ;
132+
127133 /**
128134 * Access some very specific functionality from the client.
129135 */
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2025 New Vector Ltd.
3+
4+ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5+ Please see LICENSE files in the repository root for full details.
6+ */
7+
8+ import type { Room } from "../models/Room" ;
9+
10+ /**
11+ * Provides some basic functionality of the Room List Store from element-web.
12+ * @public
13+ */
14+ export interface RoomListStoreApi {
15+ /**
16+ * Get a flat list of sorted room from the RLS.
17+ */
18+ getRooms ( ) : Room [ ] ;
19+
20+ /**
21+ * Returns a promise that resolves when RLS is ready.
22+ */
23+ waitForReady ( ) : Promise < void > ;
24+ }
25+
26+ /**
27+ * Provides access to certain stores from element-web.
28+ * @public
29+ */
30+ export interface StoresApi {
31+ /**
32+ * Use this to access limited functionality of the RLS from element-web.
33+ */
34+ getRoomListStore ( ) : RoomListStoreApi ;
35+ }
Original file line number Diff line number Diff line change @@ -20,5 +20,6 @@ export type * from "./api/dialog";
2020export type * from "./api/profile" ;
2121export type * from "./api/navigation" ;
2222export type * from "./api/builtins" ;
23+ export type * from "./api/stores" ;
2324export type * from "./api/client" ;
2425export * from "./api/watchable" ;
You can’t perform that action at this time.
0 commit comments