/** * Hathora Cloud API * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { ConnectionInfoV2, CreateRoomParams, PickRoomExcludeKeyofRoomAllocations, Room, RoomConnectionData, UpdateRoomConfigParams } from '../models'; export interface CreateRoomRequest { appId: string; createRoomParams: CreateRoomParams; roomId?: string; } export interface DestroyRoomRequest { appId: string; roomId: string; } export interface GetActiveRoomsForProcessRequest { appId: string; processId: string; } export interface GetConnectionInfoRequest { appId: string; roomId: string; } export interface GetInactiveRoomsForProcessRequest { appId: string; processId: string; } export interface GetRoomInfoRequest { appId: string; roomId: string; } export interface SuspendRoomV2DeprecatedRequest { appId: string; roomId: string; } export interface UpdateRoomConfigRequest { appId: string; roomId: string; updateRoomConfigParams: UpdateRoomConfigParams; } /** * RoomV2Api - interface * * @export * @interface RoomV2ApiInterface */ export interface RoomV2ApiInterface { /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. * @param {string} appId * @param {CreateRoomParams} createRoomParams * @param {string} [roomId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ createRoomRaw(requestParameters: CreateRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. */ createRoom(appId: string, createRoomParams: CreateRoomParams, roomId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted. * @param {string} appId * @param {string} roomId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ destroyRoomRaw(requestParameters: DestroyRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted. */ destroyRoom(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Get all active [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). * @param {string} appId * @param {string} processId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ getActiveRoomsForProcessRaw(requestParameters: GetActiveRoomsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Get all active [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). */ getActiveRoomsForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Poll this endpoint to get connection details to a [room](https://hathora.dev/docs/concepts/hathora-entities#room). Clients can call this endpoint without authentication. * @param {string} appId * @param {string} roomId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ getConnectionInfoRaw(requestParameters: GetConnectionInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Poll this endpoint to get connection details to a [room](https://hathora.dev/docs/concepts/hathora-entities#room). Clients can call this endpoint without authentication. */ getConnectionInfo(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Get all inactive [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). * @param {string} appId * @param {string} processId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ getInactiveRoomsForProcessRaw(requestParameters: GetInactiveRoomsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Get all inactive [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). */ getInactiveRoomsForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Retreive current and historical allocation data for a [room](https://hathora.dev/docs/concepts/hathora-entities#room). * @param {string} appId * @param {string} roomId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ getRoomInfoRaw(requestParameters: GetRoomInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Retreive current and historical allocation data for a [room](https://hathora.dev/docs/concepts/hathora-entities#room). */ getRoomInfo(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. * @param {string} appId * @param {string} roomId * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} * @memberof RoomV2ApiInterface */ suspendRoomV2DeprecatedRaw(requestParameters: SuspendRoomV2DeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. */ suspendRoomV2Deprecated(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * * @param {string} appId * @param {string} roomId * @param {UpdateRoomConfigParams} updateRoomConfigParams * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoomV2ApiInterface */ updateRoomConfigRaw(requestParameters: UpdateRoomConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** */ updateRoomConfig(appId: string, roomId: string, updateRoomConfigParams: UpdateRoomConfigParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * */ export declare class RoomV2Api extends runtime.BaseAPI implements RoomV2ApiInterface { /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. */ createRoomRaw(requestParameters: CreateRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. */ createRoom(appId: string, createRoomParams: CreateRoomParams, roomId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted. */ destroyRoomRaw(requestParameters: DestroyRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted. */ destroyRoom(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Get all active [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). */ getActiveRoomsForProcessRaw(requestParameters: GetActiveRoomsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Get all active [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). */ getActiveRoomsForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Poll this endpoint to get connection details to a [room](https://hathora.dev/docs/concepts/hathora-entities#room). Clients can call this endpoint without authentication. */ getConnectionInfoRaw(requestParameters: GetConnectionInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Poll this endpoint to get connection details to a [room](https://hathora.dev/docs/concepts/hathora-entities#room). Clients can call this endpoint without authentication. */ getConnectionInfo(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Get all inactive [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). */ getInactiveRoomsForProcessRaw(requestParameters: GetInactiveRoomsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Get all inactive [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process). */ getInactiveRoomsForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Retreive current and historical allocation data for a [room](https://hathora.dev/docs/concepts/hathora-entities#room). */ getRoomInfoRaw(requestParameters: GetRoomInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Retreive current and historical allocation data for a [room](https://hathora.dev/docs/concepts/hathora-entities#room). */ getRoomInfo(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. */ suspendRoomV2DeprecatedRaw(requestParameters: SuspendRoomV2DeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. */ suspendRoomV2Deprecated(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** */ updateRoomConfigRaw(requestParameters: UpdateRoomConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** */ updateRoomConfig(appId: string, roomId: string, updateRoomConfigParams: UpdateRoomConfigParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; }