Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / LobbySnapshot

Interface: LobbySnapshot ​

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:308

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

console.log(lobbySnapshot)

Properties ​

activity ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { activity } = lobbySnapshot

console.log(activity)

activity: RoomPlayerPresenceEvent[]

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:334

Server-owned room activity. Empty when no player transition occurred.


autoStartDeadlineAtMs? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { autoStartDeadlineAtMs } = lobbySnapshot

console.log(autoStartDeadlineAtMs)

optional autoStartDeadlineAtMs?: number | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:326

Absolute server deadline for the lobby auto-start countdown. Armed once every seat holds a selected (non-placeholder) deck or every player is ready, and shortened when every player is ready.


autoStartWindowMs? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { autoStartWindowMs } = lobbySnapshot

console.log(autoStartWindowMs)

optional autoStartWindowMs?: number | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:328

Length of the countdown phase autoStartDeadlineAtMs belongs to.


chat ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { chat } = lobbySnapshot

console.log(chat)

chat: LobbyChatMessage[]

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:332


closedReason? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { closedReason } = lobbySnapshot

console.log(closedReason)

optional closedReason?: LobbyClosedReason | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:349

Why the lobby closed, when status is closed.


config ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { config } = lobbySnapshot

console.log(config)

config: LobbyConfig

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:312


hostPlayerId ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { hostPlayerId } = lobbySnapshot

console.log(hostPlayerId)

hostPlayerId: string

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:319


lobbyId ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { lobbyId } = lobbySnapshot

console.log(lobbyId)

lobbyId: string

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:309


matchmaking? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { matchmaking } = lobbySnapshot

console.log(matchmaking)

optional matchmaking?: LobbyMatchmakingView | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:329


matchSeed? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { matchSeed } = lobbySnapshot

console.log(matchSeed)

optional matchSeed?: string | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:318

Fixed match seed when configured.


packSeed? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { packSeed } = lobbySnapshot

console.log(packSeed)

optional packSeed?: string | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:316

Fixed limited pack/leader seed when configured.


players ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { players } = lobbySnapshot

console.log(players)

players: LobbyPlayerView[]

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:330


requiredPlayerCount ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { requiredPlayerCount } = lobbySnapshot

console.log(requiredPlayerCount)

requiredPlayerCount: number

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:320


revision? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { revision } = lobbySnapshot

console.log(revision)

optional revision?: number

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:342

Monotonic revision of the durable lobby record. Keep the highest seen and drop older snapshots (socket or HTTP-embedded); see isStaleLobbySnapshot. Missing from servers that predate revisions.


serverNowMs? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { serverNowMs } = lobbySnapshot

console.log(serverNowMs)

optional serverNowMs?: number | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:347

Server clock (Unix ms) when the snapshot was built. Present whenever the snapshot carries an absolute deadline; see lobbyServerClockOffsetMs.


spectators ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { spectators } = lobbySnapshot

console.log(spectators)

spectators: LobbySpectatorView[]

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:331


status ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { status: healthStatus } = lobbySnapshot

console.log(healthStatus)

status: LobbyStatus

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:310


timerSettings? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { timerSettings } = lobbySnapshot

console.log(timerSettings)

optional timerSettings?: LobbyTimerSettings | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:314

Host-selected timer schedule. Missing for legacy lobby records.


tournament? ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { tournament } = lobbySnapshot

console.log(tournament)

optional tournament?: LimitedTournamentView | null

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:336

Rounds, pairings and standings of a limited tournament lobby.


visibility ​

Example:

ts
import type { LobbySnapshot } from '@my-swu/simulator-client'

const lobbySnapshot: LobbySnapshot = {
  "lobbyId": 'example',
  "status": "waiting",
  "visibility": "private",
  "config": {
    "type": "match",
    "format": "premier",
    "playerCount": 2,
    "bestOfMatches": 1,
    "gameTimerEnabled": false,
  },
  "hostPlayerId": 'example',
  "requiredPlayerCount": 0,
  "players": [],
  "chat": [],
  "activity": [],
  "spectators": [],
}

const { visibility } = lobbySnapshot

console.log(visibility)

visibility: LobbyVisibility

Defined in: packages/ts-sdk/src/resources/lobby-types.ts:311

Released under the MIT License.