Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / CreateMatchRequest

Interface: CreateMatchRequest

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:97

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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
}
console
.
log
(
createMatchRequest
)

Indexable

[k: string]: unknown

Properties

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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
} const {
format
} =
createMatchRequest
console
.
log
(
format
)

optional format?: "trilogy" | "sealed" | "draft" | "premier" | "eternal" | "twinSuns"

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:101

Requested match format. Defaults to Premier.


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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
} const {
formatSetup
} =
createMatchRequest
console
.
log
(
formatSetup
)

optional formatSetup?: FormatSetupInput | null

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:105

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


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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
} const {
hostDeck
} =
createMatchRequest
console
.
log
(
hostDeck
)

hostDeck: DeckInput1

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:106


opponent?

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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
} const {
opponent
} =
createMatchRequest
console
.
log
(
opponent
)

optional opponent?: OpponentConfig | null

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:112

When present, seat Two is auto-filled with an AI-driven opponent. Omit for the classic human-vs-human flow (seat Two waits for POST /api/matches/{id}/join).


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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
} const {
playerCount
} =
createMatchRequest
console
.
log
(
playerCount
)

optional playerCount?: number

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:117

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


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
base
: 308, // Echo Base
cards
:
Array
.
from
({
length
: 50 }, () => 45), // Alliance X-Wing
} const
createMatchRequest
: CreateMatchRequest = {
seed
: 7,
format
: 'premier',
hostDeck
:
premierHostDeck
,
} const {
seed
} =
createMatchRequest
console
.
log
(
seed
)

optional seed?: number | null

Defined in: packages/ts-sdk/src/generated/types/create-match-request.ts:121

Optional deterministic match seed.

Released under the MIT License.