@my-swu/simulator-client / FormatEventCommand
Type Alias: FormatEventCommand
FormatEventCommand = {[
k:string]:unknown;deck:DeckInput;type:"sideboard"; } | {[k:string]:unknown;type:"readyNextGame"; } | {[k:string]:unknown;deckIndex:number;type:"banTrilogyDeck"; } | {[k:string]:unknown;deckIndex:number;type:"selectTrilogyDeck"; } | {[k:string]:unknown;cardId:number;packIndex:number;type:"draftPick"; }
Defined in: packages/ts-sdk/src/generated/types/format-event-request.ts:9
Out-of-game command for format and event workflows.
This interface was referenced by FormatEventRequest's JSON-Schema via the definition "FormatEventCommand".
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const readyNextGameCommand = { type: 'readyNextGame' } satisfies FormatEventCommand
console.log(readyNextGameCommand)Union Members
Type Literal
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
// Use card ids; the server validates deck legality.
const premierHostDeck = {
leader: 46102, // Leia Organa - Someone Who Loves You
base: 308, // Echo Base
cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
}
const sideboardCommand = { type: 'sideboard', deck: premierHostDeck } satisfies FormatEventCommand
console.log(sideboardCommand.deck.cards.length){[k: string]: unknown; deck: DeckInput; type: "sideboard"; }
Type Literal
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const readyNextGameCommand = { type: 'readyNextGame' } satisfies FormatEventCommand
console.log(readyNextGameCommand.type){[k: string]: unknown; type: "readyNextGame"; }
Type Literal
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const banTrilogyDeckCommand = { type: 'banTrilogyDeck', deckIndex: 0 } satisfies FormatEventCommand
console.log(banTrilogyDeckCommand.deckIndex){[k: string]: unknown; deckIndex: number; type: "banTrilogyDeck"; }
Index Signature
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const banTrilogyDeckCommand = { type: 'banTrilogyDeck', deckIndex: 0 } satisfies FormatEventCommand
console.log(banTrilogyDeckCommand.deckIndex)[k: string]: unknown
deckIndex
deckIndex:
number
Zero-based index into the opponent's registered deck set.
type
type:
"banTrilogyDeck"
Type Literal
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const selectTrilogyDeckCommand = { type: 'selectTrilogyDeck', deckIndex: 1 } satisfies FormatEventCommand
console.log(selectTrilogyDeckCommand.deckIndex){[k: string]: unknown; deckIndex: number; type: "selectTrilogyDeck"; }
Index Signature
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const selectTrilogyDeckCommand = { type: 'selectTrilogyDeck', deckIndex: 1 } satisfies FormatEventCommand
console.log(selectTrilogyDeckCommand.deckIndex)[k: string]: unknown
deckIndex
deckIndex:
number
Zero-based index into this seat's registered deck set.
type
type:
"selectTrilogyDeck"
Type Literal
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const draftPickCommand = {
type: 'draftPick',
packIndex: 0,
cardId: 45, // Alliance X-Wing card id
} satisfies FormatEventCommand
console.log(draftPickCommand.cardId){[k: string]: unknown; cardId: number; packIndex: number; type: "draftPick"; }
Index Signature
Example:
import type { FormatEventCommand } from '@my-swu/simulator-client'
const draftPickCommand = {
type: 'draftPick',
packIndex: 0,
cardId: 45, // Alliance X-Wing card id
} satisfies FormatEventCommand
console.log(draftPickCommand.cardId)[k: string]: unknown
cardId
cardId:
number
Card id to pick from the selected pack.
packIndex
packIndex:
number
Zero-based index into this seat's active draft packs.
type
type:
"draftPick"
