@my-swu/simulator-client / LobbySnapshot
Interface: LobbySnapshot
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:308
Example:
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:
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:
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)
optionalautoStartDeadlineAtMs?: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:
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)
optionalautoStartWindowMs?:number|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:328
Length of the countdown phase autoStartDeadlineAtMs belongs to.
chat
Example:
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:
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)
optionalclosedReason?:LobbyClosedReason|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:349
Why the lobby closed, when status is closed.
config
Example:
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:
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:
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:
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)
optionalmatchmaking?:LobbyMatchmakingView|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:329
matchSeed?
Example:
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)
optionalmatchSeed?:string|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:318
Fixed match seed when configured.
packSeed?
Example:
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)
optionalpackSeed?:string|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:316
Fixed limited pack/leader seed when configured.
players
Example:
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:
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:
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)
optionalrevision?: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:
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)
optionalserverNowMs?: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:
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:
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:
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)
optionaltimerSettings?:LobbyTimerSettings|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:314
Host-selected timer schedule. Missing for legacy lobby records.
tournament?
Example:
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)
optionaltournament?:LimitedTournamentView|null
Defined in: packages/ts-sdk/src/resources/lobby-types.ts:336
Rounds, pairings and standings of a limited tournament lobby.
visibility
Example:
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
