import APIService from "../services/APIService"; import { Room } from "../types"; import { QueryObjectIterator } from "../utils/QueryObjectIterator"; /** * The wrapper class that implements all * {@link https://www.100ms.live/docs/server-side/v2/api-reference/Rooms/object Room API} calls. */ export default class RoomWrapper { private apiService; private basePath; constructor(apiService: APIService); /** * Get a list of room objects that satisfy the `filter` params. If you want * to get all the rooms related to your account, don't pass in any param. A * `HMS.Room.Object` iterable is returned that can be iterated with a `for await` loop. * @param filters Room filters like enabled status and time range * @returns a `HMS.QueryObjectIterator` object */ list(filters?: Room.FilterParams): QueryObjectIterator; /** * Get the details of a room by room id. * @param roomId Room ID * @returns a `HMS.Room.Object` object */ retrieveById(roomId: string): Promise; /** * Get the details of a room by room name. Throws an error if there's no room with that name, * so use this with a `try-catch` block. * @param name Room name * @returns a `HMS.Room.Object` object */ retrieveByName(name: string): Promise; /** * Create a new room with a specific configuration. If the room already exists, * the object of that existing room will be returned. * @param config Config of the Room to be created * @returns a `HMS.Room.Object` object */ create(config?: Room.CreateParams): Promise; /** * Update an existing room's configuration like `name`, `description`, * `recording_info` and `region` by specifying the room id. * @param roomId Room ID * @param params Options of the Room to be updated * @returns a `HMS.Room.Object` object */ update(roomId: string, params: Room.UpdateParams): Promise; /** * Enable or disable a room. Disabling a room would block the peers from * any future attempts of joining that room until it is enabled again. * @param roomId Room ID * @param enabled Enabled status of Room * @returns a `HMS.Room.Object` object */ enableOrDisable(roomId: string, enabled: boolean): Promise; }