import { MatrixClient } from "../MatrixClient"; /** * Unstable creation options for an MSC1772 Space. * * Caution: implementation of this class may change without notice or warning, including * removal of the class. * * @deprecated Not intended for use until MSC1772 is ready, at which point the class is replaced. * @category Unstable APIs */ export interface MSC1772SpaceCreateOptions { name: string; topic?: string; isPublic: boolean; localpart: string; } /** * Unstable implementation of MSC1772 Spaces. * * Caution: implementation of this class may change without notice or warning, including * removal of the class. * * @deprecated Not intended for use until MSC1772 is ready, at which point the class is replaced. * @category Unstable APIs */ export declare class MSC1772Space { readonly roomId: string; readonly client: MatrixClient; constructor(roomId: string, client: MatrixClient); /** * Creates a new child space. * @param {MSC1772SpaceCreateOptions} opts The options for the new space. * @returns {Promise} Resolves to the created space. */ createChildSpace(opts: MSC1772SpaceCreateOptions): Promise; /** * Adds a child space to the space. Must be joined to both spaces. * @param {MSC1772Space} space The space to add. * @returns {Promise} Resolves when complete. */ addChildSpace(space: MSC1772Space): Promise; /** * Removes a child space from the space. Must be joined to the current space (not needed for child space). * @param {MSC1772Space} space The space to remove. * @returns {Promise} Resolves when complete. */ removeChildSpace(space: MSC1772Space): Promise; /** * Adds a child room to the space. Must be joined to both the room and the space. * @param {string} roomId The room ID to add. * @returns {Promise} Resolves when complete. */ addChildRoom(roomId: string): Promise; /** * Removes a child room from the space. Must be joined to the current space (not needed for child room). * @param {string} roomId The room ID to remove. * @returns {Promise} Resolves when complete. */ removeChildRoom(roomId: string): Promise; /** * Gets all the child rooms on the space. These may be spaces or other rooms. * @returns {Promise} Resolves to the room IDs of the children. */ getChildEntities(): Promise; }