Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / LimitedEventAccessResponse

Interface: LimitedEventAccessResponse ​

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

Response returned when a seat creates or joins one event.

Example:

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

// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
  baseUrl: 'http://127.0.0.1:4000',
})

// Creation returns the first seat's private Limited Event access.
const limitedEventAccessResponse = await simulatorClient.limitedEvents.create({
  kind: 'draft',
  draftRounds: [],
  pickTimerEnabled: false,
  setCode: 'SOR',
  playerCount: 4,
})

console.log(limitedEventAccessResponse)

Properties ​

eventId ​

Example:

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

// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
  baseUrl: 'http://127.0.0.1:4000',
})

// Creation returns the first seat's private Limited Event access.
const limitedEventAccessResponse = await simulatorClient.limitedEvents.create({
  kind: 'draft',
  draftRounds: [],
  pickTimerEnabled: false,
  setCode: 'SOR',
  playerCount: 4,
})

const { eventId: limitedEventId } = limitedEventAccessResponse

console.log(limitedEventId)

eventId: string

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

Limited event id.


seatIndex ​

Example:

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

// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
  baseUrl: 'http://127.0.0.1:4000',
})

// Creation returns the first seat's private Limited Event access.
const limitedEventAccessResponse = await simulatorClient.limitedEvents.create({
  kind: 'draft',
  draftRounds: [],
  pickTimerEnabled: false,
  setCode: 'SOR',
  playerCount: 4,
})

const { seatIndex: limitedEventSeatIndex } = limitedEventAccessResponse

console.log(limitedEventSeatIndex)

seatIndex: number

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

Zero-based seat index inside the pod.


seatToken ​

Example:

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

// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
  baseUrl: 'http://127.0.0.1:4000',
})

// Creation returns the first seat's private Limited Event access.
const limitedEventAccessResponse = await simulatorClient.limitedEvents.create({
  kind: 'draft',
  draftRounds: [],
  pickTimerEnabled: false,
  setCode: 'SOR',
  playerCount: 4,
})

const { seatToken } = limitedEventAccessResponse

console.log(seatToken)

seatToken: string

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

Secret token used by this seat.


snapshot ​

Example:

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

// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
  baseUrl: 'http://127.0.0.1:4000',
})

// Creation returns the first seat's private Limited Event access.
const limitedEventAccessResponse = await simulatorClient.limitedEvents.create({
  kind: 'draft',
  draftRounds: [],
  pickTimerEnabled: false,
  setCode: 'SOR',
  playerCount: 4,
})

const { snapshot: initialLimitedEventSnapshot } = limitedEventAccessResponse

console.log(initialLimitedEventSnapshot)

snapshot: LimitedEventSnapshot

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

Snapshot visible to this seat.

Released under the MIT License.