/** * The room summary endpoint, which describes a room the user may not be in. * https://spec.matrix.org/latest/client-server-api/#room-summaries * * Not to be confused with {@link RoomSummary} in `./models/room-summary.ts`, which holds the * heroes and member counts that `/sync` sends for rooms we are in. */ import { type IPublicRoomsChunkRoom, type IServerVersions } from "./client.ts"; import { type IHttpOpts, type MatrixHttpApi } from "./http-api/index.ts"; import { type JoinRule } from "./@types/partials.ts"; import { type Membership } from "./@types/membership.ts"; /** * The summary of a room, as returned by the room summary endpoint. * https://spec.matrix.org/latest/client-server-api/#get_matrixclientv1room_summaryroomidoralias * * Also covers the initial version of MSC3266 implemented in older versions of Synapse, which * prefixed some of the fields. See {@link MatrixClient.getRoomSummary}. */ export interface RoomSummary extends Omit { /** * The current membership of this user in the room. */ "membership"?: Membership; /** * The join rule of the room. Unlike the join rule of a public rooms chunk, this may be any * join rule, since the room does not have to be published to the room directory. */ "join_rule"?: JoinRule; /** * The canonical alias of the room, if any. */ "canonical_alias"?: string; /** * Version of the room. */ "room_version"?: string; /** * The encryption algorithm used for this room, if the room is encrypted. */ "encryption"?: string; /** * For restricted rooms, the room IDs which are specified by the join rule. */ "allowed_room_ids"?: string[]; /** * Version of the room. * @deprecated Only returned by the unstable endpoint; use {@link RoomSummary.room_version}. */ "im.nheko.summary.room_version"?: string; /** * The encryption algorithm used for this room, if the room is encrypted. * @deprecated Only returned by the unstable endpoint; use {@link RoomSummary.encryption}. */ "im.nheko.summary.encryption"?: string; } /** * Fetch the summary of a room. * * Uses the path from the initial version of MSC3266, as implemented in older versions of Synapse, * unless the server advertises support for the spec version which stabilised it. * * @param http - The HTTP API to make the request with. * @param versions - The server's `/versions` response, used to pick the endpoint. * @param roomIdOrAlias - The ID or alias of the room to get the summary of. * @param via - The servers to attempt to request the summary from, when the local server cannot * generate it (for instance, because it has no local user in the room). */ export declare function fetchRoomSummary(http: MatrixHttpApi, versions: IServerVersions, roomIdOrAlias: string, via?: string[]): Promise; //# sourceMappingURL=room-summary-api.d.ts.map