@my-swu/simulator-client / RematchMatchResponse
Type Alias: RematchMatchResponse
RematchMatchResponse = {
snapshot:GameState;status:"waiting"; } | {snapshot:GameState;status:"declined"; } | {access:MatchAccessResponse;status:"ready"; }
Defined in: packages/ts-sdk/src/generated/types/common.ts:5299
HTTP response after answering a rematch offer.
The new match's private access is only ever handed to the seat that asked for it, so each player claims its own by calling the route again once the snapshot reports the offer as ready.
Example:
import type { RematchMatchResponse } from '@my-swu/simulator-client'
const rematchMatchResponse: RematchMatchResponse = {
"status": "waiting",
"snapshot": {
"matchId": 'example',
"format": "premier",
"playerCount": 2,
"series": {
"format": "premier",
"bestOfGames": 1,
"currentGameNumber": 0,
"games": [],
"seats": [],
},
"status": "lobby",
"phase": "lobby",
"prompt": "lobbyReady",
"roundNumber": 0,
"turnPlayer": "one",
"initiative": {
"available": false,
},
"availableCounters": [],
"consecutivePasses": 0,
"winners": [],
"eventsApplied": 0,
"activeEffects": [],
"delayedEffects": [],
"currentAttack": {
"attackerId": 0,
"target": {
"playerBase": {
"seat": "one",
},
},
},
"pendingAbilities": [],
"availableLeaderDeploys": [],
"availableAttacks": [],
"playActions": [],
"rejectedPlayReasons": [],
"actionAbilities": [],
"groundArena": [],
"spaceArena": [],
"players": [],
},
}
console.log(rematchMatchResponse)Union Members
Type Literal
Example:
import type { RematchMatchResponse } from '@my-swu/simulator-client'
const rematchMatchResponse: RematchMatchResponse = {
"status": "waiting",
"snapshot": {
"matchId": 'example',
"format": "premier",
"playerCount": 2,
"series": {
"format": "premier",
"bestOfGames": 1,
"currentGameNumber": 0,
"games": [],
"seats": [],
},
"status": "lobby",
"phase": "lobby",
"prompt": "lobbyReady",
"roundNumber": 0,
"turnPlayer": "one",
"initiative": {
"available": false,
},
"availableCounters": [],
"consecutivePasses": 0,
"winners": [],
"eventsApplied": 0,
"activeEffects": [],
"delayedEffects": [],
"currentAttack": {
"attackerId": 0,
"target": {
"playerBase": {
"seat": "one",
},
},
},
"pendingAbilities": [],
"availableLeaderDeploys": [],
"availableAttacks": [],
"playActions": [],
"rejectedPlayReasons": [],
"actionAbilities": [],
"groundArena": [],
"spaceArena": [],
"players": [],
},
}
console.log(rematchMatchResponse){ snapshot: GameState; status: "waiting"; }
snapshot
snapshot:
GameState
Updated snapshot carrying every seat's answer.
status
status:
"waiting"
Type Literal
Example:
import type { RematchMatchResponse } from '@my-swu/simulator-client'
const rematchMatchResponse: RematchMatchResponse = {
"status": "waiting",
"snapshot": {
"matchId": 'example',
"format": "premier",
"playerCount": 2,
"series": {
"format": "premier",
"bestOfGames": 1,
"currentGameNumber": 0,
"games": [],
"seats": [],
},
"status": "lobby",
"phase": "lobby",
"prompt": "lobbyReady",
"roundNumber": 0,
"turnPlayer": "one",
"initiative": {
"available": false,
},
"availableCounters": [],
"consecutivePasses": 0,
"winners": [],
"eventsApplied": 0,
"activeEffects": [],
"delayedEffects": [],
"currentAttack": {
"attackerId": 0,
"target": {
"playerBase": {
"seat": "one",
},
},
},
"pendingAbilities": [],
"availableLeaderDeploys": [],
"availableAttacks": [],
"playActions": [],
"rejectedPlayReasons": [],
"actionAbilities": [],
"groundArena": [],
"spaceArena": [],
"players": [],
},
}
console.log(rematchMatchResponse){ snapshot: GameState; status: "declined"; }
snapshot
snapshot:
GameState
Updated snapshot carrying every seat's answer.
status
status:
"declined"
Type Literal
Example:
import type { RematchMatchResponse } from '@my-swu/simulator-client'
const rematchMatchResponse: RematchMatchResponse = {
"status": "waiting",
"snapshot": {
"matchId": 'example',
"format": "premier",
"playerCount": 2,
"series": {
"format": "premier",
"bestOfGames": 1,
"currentGameNumber": 0,
"games": [],
"seats": [],
},
"status": "lobby",
"phase": "lobby",
"prompt": "lobbyReady",
"roundNumber": 0,
"turnPlayer": "one",
"initiative": {
"available": false,
},
"availableCounters": [],
"consecutivePasses": 0,
"winners": [],
"eventsApplied": 0,
"activeEffects": [],
"delayedEffects": [],
"currentAttack": {
"attackerId": 0,
"target": {
"playerBase": {
"seat": "one",
},
},
},
"pendingAbilities": [],
"availableLeaderDeploys": [],
"availableAttacks": [],
"playActions": [],
"rejectedPlayReasons": [],
"actionAbilities": [],
"groundArena": [],
"spaceArena": [],
"players": [],
},
}
console.log(rematchMatchResponse){ access: MatchAccessResponse; status: "ready"; }
access
access:
MatchAccessResponse
Private access to the rematch for the calling seat.
status
status:
"ready"
