import APIService from "../services/APIService"; import { Session } from "../types"; import { QueryObjectIterator } from "../utils/QueryObjectIterator"; /** * The wrapper class that implements all * {@link https://www.100ms.live/docs/server-side/v2/api-reference/Sessions/object Session API} calls. */ export default class SessionWrapper { private apiService; private basePath; constructor(apiService: APIService); /** * Get a list of session objects that satisfy the `filter` params. To get * all the sessions related to your account, don't pass in any param. And similarly, * specify the `room_id` in filters to get the sessions of a specific room. A * `HMS.Session.Object` iterable is returned that can be iterated with a `for await` loop. * @param filters Session filters like room id, active status and time range * @returns a `HMS.QueryObjectIterator` object */ list(filters?: Session.FilterParams): QueryObjectIterator; /** * Get the session object by it's session id. * @param sessionId Session ID * @returns a `HMS.Session.Object` object */ retrieveById(sessionId: string): Promise; /** * Get the active session in a room. Throws an error if there's no active session in the * specified room, so use this with a `try-catch` block. * @param roomId Room ID * @returns */ retrieveActiveByRoom(roomId: string): Promise; }