Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / CreateMatchRequest

Interface: CreateMatchRequest ​

Defined in: packages/ts-sdk/src/generated/types/common.ts:932

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

console.log(createMatchRequest)

Properties ​

aiOpponents ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { aiOpponents } = createMatchRequest

console.log(aiOpponents)

aiOpponents: AiOpponentConfig[]

Defined in: packages/ts-sdk/src/generated/types/common.ts:937

Explicit AI-driven seats. In a two-player match use seat Two; Twin Suns may list every non-host AI seat.


format ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { format } = createMatchRequest

console.log(format)

format: MatchFormat

Defined in: packages/ts-sdk/src/generated/types/common.ts:941

Requested match format.


formatSetup? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { formatSetup } = createMatchRequest

console.log(formatSetup)

optional formatSetup?: FormatSetupInput | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:945

Optional setup data for multi-game and limited event formats.


historyIdentities ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { historyIdentities } = createMatchRequest

console.log(historyIdentities)

historyIdentities: HistoryIdentityInput[]

Defined in: packages/ts-sdk/src/generated/types/common.ts:949

Personal identities that should own the host's history entry.


historySection? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { historySection } = createMatchRequest

console.log(historySection)

optional historySection?: HistorySection | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:953

Setup section this match should appear under in server-side history.


hostAuthenticated ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostAuthenticated } = createMatchRequest

console.log(hostAuthenticated)

hostAuthenticated: boolean

Defined in: packages/ts-sdk/src/generated/types/common.ts:957

Whether the host joined from an authenticated app session.


hostAvatarUrl? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostAvatarUrl } = createMatchRequest

console.log(hostAvatarUrl)

optional hostAvatarUrl?: string | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:961

Optional public avatar image URL for the host seat.


hostDeck ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostDeck } = createMatchRequest

console.log(hostDeck)

hostDeck: DeckInput

Defined in: packages/ts-sdk/src/generated/types/common.ts:965

Deck used by the host player.


hostDeckId? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostDeckId } = createMatchRequest

console.log(hostDeckId)

optional hostDeckId?: string | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:969

Freeform client deck id for the host deck.


hostDeckTitle? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostDeckTitle } = createMatchRequest

console.log(hostDeckTitle)

optional hostDeckTitle?: string | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:973

Display title for the host deck.


hostName ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostName } = createMatchRequest

console.log(hostName)

hostName: string

Defined in: packages/ts-sdk/src/generated/types/common.ts:979

Non-empty display name for the host seat. Surfaced in every viewer's snapshot via SeatState.name, including anonymous hosts that use a generated local handle.


hostProfileUrl? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { hostProfileUrl } = createMatchRequest

console.log(hostProfileUrl)

optional hostProfileUrl?: string | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:983

Optional public profile page URL for the host seat.


playerCount ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { playerCount } = createMatchRequest

console.log(playerCount)

playerCount: number

Defined in: packages/ts-sdk/src/generated/types/common.ts:988

Requested player count. Twin Suns supports 2-4 players; other formats currently support exactly 2 players.


playground? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { playground } = createMatchRequest

console.log(playground)

optional playground?: boolean

Defined in: packages/ts-sdk/src/generated/types/common.ts:993

Enables the server-owned scenario Playground runtime. Normal matches retain the default and never accept Playground mutations.


scenario? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { scenario } = createMatchRequest

console.log(scenario)

optional scenario?: MatchScenarioInput | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:997

Optional authored scenario selector for direct Learn match creation.


seed? ​

Example:

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

// Use card ids; the server validates deck legality.
const premierHostDeck = {
  leader: 46102, // Leia Organa - Someone Who Loves You
  leaders: [], // Twin Suns only; Premier uses the single `leader` above.
  base: 308, // Echo Base
  cards: Array.from({ length: 50 }, () => 45), // Alliance X-Wing
  sideboard: [],
}

const createMatchRequest: CreateMatchRequest = {
  seed: '7',
  format: 'premier',
  // Twin Suns supports 2-4 players; every other format is exactly 2.
  playerCount: 2,
  hostDeck: premierHostDeck,
  hostName: 'Host',
  hostAuthenticated: false,
  historyIdentities: [],
  // One entry per AI-controlled seat; empty means a human opponent joins.
  aiOpponents: [],
}

const { seed } = createMatchRequest

console.log(seed)

optional seed?: string | null

Defined in: packages/ts-sdk/src/generated/types/common.ts:1001

Optional deterministic match seed.

Released under the MIT License.