/* 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"; import { type Watchable } from "./watchable"; /** * Modify account data stored on the homeserver. * @public */ export interface AccountDataApi { /** * Returns a watchable with account data for this event type. */ get(eventType: string): Watchable; /** * Set account data on the homeserver. */ set(eventType: string, content: unknown): Promise; /** * Changes the content of this event to be empty. */ delete(eventType: string): Promise; } /** * Access some limited functionality from the SDK. * @public */ export interface ClientApi { /** * Use this to modify account data on the homeserver. */ accountData: AccountDataApi; /** * Fetch room by id from SDK. * @param id - Id of the room to get * @returns Room object from SDK */ getRoom: (id: string) => Room | null; }