/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { roomCreate } from "../funcs/roomCreate.js"; import { roomCreateUser } from "../funcs/roomCreateUser.js"; import { roomDelete } from "../funcs/roomDelete.js"; import { roomDeleteUser } from "../funcs/roomDeleteUser.js"; import { roomGet } from "../funcs/roomGet.js"; import { roomGetUser } from "../funcs/roomGetUser.js"; import { roomStartEgress } from "../funcs/roomStartEgress.js"; import { roomStopEgress } from "../funcs/roomStopEgress.js"; import { roomUpdateUser } from "../funcs/roomUpdateUser.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Room extends ClientSDK { /** * Create a room * * @remarks * Create a multiparticipant livestreaming room. * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async create( options?: RequestOptions, ): Promise { return unwrapAsync(roomCreate( this, options, )); } /** * Retrieve a room * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async get( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomGet( this, id, options, )); } /** * Delete a room * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async delete( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomDelete( this, id, options, )); } /** * Start room RTMP egress * * @remarks * Create a livestream for your room. * This allows you to leverage livestreaming features like recording and HLS output. * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async startEgress( roomEgressPayload: components.RoomEgressPayload, id: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomStartEgress( this, roomEgressPayload, id, options, )); } /** * Stop room RTMP egress * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async stopEgress( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomStopEgress( this, id, options, )); } /** * Create a room user * * @remarks * Call this endpoint to add a user to a room, specifying a display name at a minimum. * The response will contain a joining URL for Livepeer's default meeting app. * Alternatively the joining token can be used with a custom app. * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async createUser( roomUserPayload: components.RoomUserPayload, id: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomCreateUser( this, roomUserPayload, id, options, )); } /** * Get user details * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async getUser( id: string, userId: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomGetUser( this, id, userId, options, )); } /** * Update a room user * * @remarks * Update properties for a user. * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async updateUser( roomUserUpdatePayload: components.RoomUserUpdatePayload, id: string, userId: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomUpdateUser( this, roomUserUpdatePayload, id, userId, options, )); } /** * Remove a user from the room * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async deleteUser( id: string, userId: string, options?: RequestOptions, ): Promise { return unwrapAsync(roomDeleteUser( this, id, userId, options, )); } }