## API Report File for "@element-hq/element-web-module-api" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { ComponentType } from 'react'; import { JSX } from 'react'; import { ModuleApi } from '@matrix-org/react-sdk-module-api'; import { Root } from 'react-dom/client'; import { RuntimeModule } from '@matrix-org/react-sdk-module-api'; // @public export interface AccountAuthApiExtension { overwriteAccountAuth(accountInfo: AccountAuthInfo): Promise; } // @public export interface AccountAuthInfo { accessToken: string; deviceId: string; homeserverUrl: string; refreshToken?: string; userId: string; } // @alpha @deprecated (undocumented) export interface AliasCustomisations { // (undocumented) getDisplayAliasForAliasSet?(canonicalAlias: string | null, altAliases: string[]): string | null; } // Warning: (ae-incompatible-release-tags) The symbol "Api" is marked as @public, but its signature references "LegacyModuleApiExtension" which is marked as @alpha // Warning: (ae-incompatible-release-tags) The symbol "Api" is marked as @public, but its signature references "LegacyCustomisationsApiExtension" which is marked as @alpha // // @public export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiExtension, DialogApiExtension, AccountAuthApiExtension, ProfileApiExtension { readonly config: ConfigApi; createRoot(element: Element): Root; // @alpha readonly customComponents: CustomComponentsApi; readonly i18n: I18nApi; readonly navigation: NavigationApi; readonly rootNode: HTMLElement; } // @alpha @deprecated (undocumented) export interface ChatExportCustomisations { getForceChatExportParameters(): { format?: ExportFormat; range?: ExportType; numberOfMessages?: number; includeAttachments?: boolean; sizeMb?: number; }; } // @alpha @deprecated (undocumented) export interface ComponentVisibilityCustomisations { shouldShowComponent?(component: "UIComponent.sendInvites" | "UIComponent.roomCreation" | "UIComponent.spaceCreation" | "UIComponent.exploreRooms" | "UIComponent.addIntegrations" | "UIComponent.filterContainer" | "UIComponent.roomOptionsMenu"): boolean; } // @public export interface Config { // (undocumented) brand: string; } // @public export interface ConfigApi { // (undocumented) get(): Config; // (undocumented) get(key: K): Config[K]; // (undocumented) get(key?: K): Config | Config[K]; } // @alpha export interface CustomComponentsApi { registerMessageRenderer(eventTypeOrFilter: string | ((mxEvent: MatrixEvent) => boolean), renderer: CustomMessageRenderFunction, hints?: CustomMessageRenderHints): void; registerRoomPreviewBar(renderer: CustomRoomPreviewBarRenderFunction): void; } // @alpha export type CustomMessageComponentProps = { mxEvent: MatrixEvent; }; // @alpha export type CustomMessageRenderFunction = ( props: CustomMessageComponentProps, originalComponent?: (props?: OriginalMessageComponentProps) => React.JSX.Element) => JSX.Element; // @alpha export type CustomMessageRenderHints = { allowEditingEvent?: boolean; allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise; }; // @alpha export type CustomRoomPreviewBarComponentProps = { roomId?: string; roomAlias?: string; }; // @alpha export type CustomRoomPreviewBarRenderFunction = ( props: CustomRoomPreviewBarComponentProps, originalComponent: (props: CustomRoomPreviewBarComponentProps) => JSX.Element) => JSX.Element; // @public export interface DialogApiExtension { openDialog(initialOptions: DialogOptions, dialog: ComponentType

>, props: P): DialogHandle; } // @public export type DialogHandle = { finished: Promise<{ ok: boolean; model: M | null; }>; close(): void; }; // @public export interface DialogOptions { title: string; } // @public export type DialogProps = { onSubmit(model: M): void; onCancel(): void; }; // @alpha @deprecated (undocumented) export interface DirectoryCustomisations { // (undocumented) requireCanonicalAliasAccessToPublish?(): boolean; } // @public export interface I18nApi { get language(): string; register(translations: Partial): void; translate(key: keyof Translations, variables?: Variables): string; } // @alpha @deprecated (undocumented) export type LegacyCustomisations = (customisations: T) => void; // @alpha @deprecated (undocumented) export interface LegacyCustomisationsApiExtension { // @deprecated (undocumented) readonly _registerLegacyAliasCustomisations: LegacyCustomisations; // @deprecated (undocumented) readonly _registerLegacyChatExportCustomisations: LegacyCustomisations>; // @deprecated (undocumented) readonly _registerLegacyComponentVisibilityCustomisations: LegacyCustomisations; // @deprecated (undocumented) readonly _registerLegacyDirectoryCustomisations: LegacyCustomisations; // @deprecated (undocumented) readonly _registerLegacyLifecycleCustomisations: LegacyCustomisations; // @deprecated (undocumented) readonly _registerLegacyMediaCustomisations: LegacyCustomisations>; // @deprecated (undocumented) readonly _registerLegacyRoomListCustomisations: LegacyCustomisations>; // @deprecated (undocumented) readonly _registerLegacyUserIdentifierCustomisations: LegacyCustomisations; // @deprecated (undocumented) readonly _registerLegacyWidgetPermissionsCustomisations: LegacyCustomisations>; // @deprecated (undocumented) readonly _registerLegacyWidgetVariablesCustomisations: LegacyCustomisations; } // @alpha @deprecated (undocumented) export interface LegacyModuleApiExtension { // @deprecated _registerLegacyModule(LegacyModule: RuntimeModuleConstructor): Promise; } // @alpha @deprecated (undocumented) export interface LifecycleCustomisations { // (undocumented) onLoggedOutAndStorageCleared?(): void; } // @alpha export interface MatrixEvent { content: Record; eventId: string; originServerTs: number; roomId: string; sender: string; stateKey?: string; type: string; unsigned: Record; } // @alpha @deprecated (undocumented) export interface Media { // (undocumented) downloadSource(): Promise; // (undocumented) getSquareThumbnailHttp(dim: number): string | null; // (undocumented) getThumbnailHttp(width: number, height: number, mode?: "scale" | "crop"): string | null; // (undocumented) getThumbnailOfSourceHttp(width: number, height: number, mode?: "scale" | "crop"): string | null; // (undocumented) readonly hasThumbnail: boolean; // (undocumented) readonly isEncrypted: boolean; // (undocumented) readonly srcHttp: string | null; // (undocumented) readonly srcMxc: string; // (undocumented) readonly thumbnailHttp: string | null; // (undocumented) readonly thumbnailMxc: string | null | undefined; } // @alpha @deprecated (undocumented) export interface MediaContructable { // (undocumented) new (prepared: PreparedMedia): Media; } // @alpha @deprecated (undocumented) export interface MediaCustomisations { // (undocumented) readonly Media: MediaContructable; // (undocumented) mediaFromContent(content: Content, client?: Client): Media; // (undocumented) mediaFromMxc(mxc?: string, client?: Client): Media; } // @public export interface Module { // (undocumented) load(): Promise; } // @public export interface ModuleFactory { // (undocumented) new (api: Api): Module; // (undocumented) readonly moduleApiVersion: string; // (undocumented) readonly prototype: Module; } // @public export class ModuleIncompatibleError extends Error { constructor(pluginVersion: string); } // @public export class ModuleLoader { constructor(api: Api); // Warning: (ae-forgotten-export) The symbol "ModuleExport" needs to be exported by the entry point index.d.ts // // (undocumented) load(moduleExport: ModuleExport): Promise; // (undocumented) start(): Promise; } // @public export interface NavigationApi { toMatrixToLink(link: string, join?: boolean): Promise; } // @alpha export type OriginalMessageComponentProps = { showUrlPreview?: boolean; }; // @public export interface Profile { displayName?: string; userId?: string; } // @public export interface ProfileApiExtension { readonly profile: Watchable; } // @alpha @deprecated (undocumented) export interface RoomListCustomisations { isRoomVisible?(room: Room): boolean; } // @alpha @deprecated (undocumented) export type RuntimeModuleConstructor = new (api: ModuleApi) => RuntimeModule; // @public export type Translations = Record; // @alpha @deprecated (undocumented) export interface UserIdentifierCustomisations { getDisplayUserIdentifier(userId: string, opts: { roomId?: string; withDisplayName?: boolean; }): string | null; } // @public export type Variables = { count?: number; [key: string]: number | string | undefined; }; // @public export class Watchable { constructor(currentValue: T); // (undocumented) unwatch(listener: (value: T) => void): void; // (undocumented) get value(): T; set value(value: T); // (undocumented) watch(listener: (value: T) => void): void; } // @alpha @deprecated (undocumented) export interface WidgetPermissionsCustomisations { preapproveCapabilities?(widget: Widget, requestedCapabilities: Set): Promise>; } // @alpha @deprecated (undocumented) export interface WidgetVariablesCustomisations { isReady?(): Promise; provideVariables?(): { currentUserId: string; userDisplayName?: string; userHttpAvatarUrl?: string; clientId?: string; clientTheme?: string; clientLanguage?: string; deviceId?: string; baseUrl?: string; }; } // (No @packageDocumentation comment for this package) ```