import type { GameSdk } from './GameSdk.js'; import type { RoomClient } from './RoomClient.js'; import { type ControlReadOptions } from './ControlRead.js'; import type { ControlReadState, ControlReadEvent } from './Lifecycle.js'; /** A code is scoped to the current game, never a complete Runtime instance id. */ export declare function normalizeRoomCode(value: string): string; export declare function roomIdFor(gameId: string, code: string): string; /** Reads a hint only: no connection, creation, or credential exchange. */ export declare function readRoomEntry(url?: string): { code: string; kind: 'invite' | 'debug'; } | null; /** Share room identity, never the creator's credentials. */ export declare function createRoomInviteUrl(baseUrl: string, code: string): string; export interface RoomSummary { roomId: string; code: string; raw: Record; } export interface CreateRoomOptions { code?: string; maxPlayers?: number; realtime?: boolean; signal?: AbortSignal; timeoutMs?: number; } export declare class GameRooms { private readonly sdk; private listId; private latestListIdValue; private listReads; private listHistories; private createId; private latestCreateIdValue; private creates; private createHistories; constructor(sdk: GameSdk); private supported; private gameId; get latestListQueryId(): number; listHistory(id?: number): { from: ControlReadState; event: ControlReadEvent; to: ControlReadState; }[]; list(options?: ControlReadOptions): Promise; /** Creates a room but does not connect. Attach listeners before connect(). */ create(options?: CreateRoomOptions): Promise; get latestCreateId(): number; createHistory(id?: number): { from: string; event: string; to: string; }[]; private ensure; /** Existing room only; a typo must not silently create another room. */ join(code: string, options?: ControlReadOptions): Promise; /** Shared room for this game. Calling this is an explicit game-mode choice. */ global(options?: Omit): Promise; /** Workbench peers may create the same empty test room. Never use for invitations. */ debug(code: string, options?: Omit): Promise; }