Skip to content

Commit 29dea8d

Browse files
committed
Update api doc
1 parent dc29052 commit 29dea8d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

packages/element-web-module-api/element-web-module-api.api.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ export interface AccountAuthInfo {
2424
userId: string;
2525
}
2626

27+
// @public
28+
export interface AccountDataApi {
29+
delete(eventType: string): Promise<void>;
30+
get(eventType: string): unknown;
31+
set(eventType: string, content: unknown): Promise<void>;
32+
}
33+
2734
// @alpha @deprecated (undocumented)
2835
export interface AliasCustomisations {
2936
// (undocumented)
@@ -37,6 +44,7 @@ export interface AliasCustomisations {
3744
export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiExtension, DialogApiExtension, AccountAuthApiExtension, ProfileApiExtension {
3845
// @alpha
3946
readonly builtins: BuiltinsApi;
47+
readonly client: ClientApi;
4048
readonly config: ConfigApi;
4149
createRoot(element: Element): Root;
4250
// @alpha
@@ -64,6 +72,12 @@ export interface ChatExportCustomisations<ExportFormat, ExportType> {
6472
};
6573
}
6674

75+
// @public
76+
export interface ClientApi {
77+
getAccountDataApi: () => AccountDataApi;
78+
getRoom: (id: string) => Room | null;
79+
}
80+
6781
// @alpha @deprecated (undocumented)
6882
export interface ComponentVisibilityCustomisations {
6983
shouldShowComponent?(component: "UIComponent.sendInvites" | "UIComponent.roomCreation" | "UIComponent.spaceCreation" | "UIComponent.exploreRooms" | "UIComponent.addIntegrations" | "UIComponent.filterContainer" | "UIComponent.roomOptionsMenu"): boolean;
@@ -311,6 +325,13 @@ export interface ProfileApiExtension {
311325
readonly profile: Watchable<Profile>;
312326
}
313327

328+
// @public
329+
export interface Room {
330+
getLastActiveTimestamp: () => number;
331+
id: string;
332+
name: Watchable<string>;
333+
}
334+
314335
// @alpha @deprecated (undocumented)
315336
export interface RoomListCustomisations<Room> {
316337
isRoomVisible?(room: Room): boolean;
@@ -359,6 +380,10 @@ export type Variables = {
359380
// @public
360381
export class Watchable<T> {
361382
constructor(currentValue: T);
383+
// Warning: (ae-forgotten-export) The symbol "WatchFn" needs to be exported by the entry point index.d.ts
384+
//
385+
// (undocumented)
386+
protected readonly listeners: Set<WatchFn<T>>;
362387
// (undocumented)
363388
unwatch(listener: (value: T) => void): void;
364389
// (undocumented)

0 commit comments

Comments
 (0)