Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / LimitedEventResponse

Interface: LimitedEventResponse

Defined in: packages/ts-sdk/src/generated/types/limited-event-response.ts:28

Response body for limited event fetches and commands.

Example:

ts
import type { LimitedEventResponse } from '@my-swu/simulator-client'
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',
}) // Limited Event responses wrap the current event snapshot. const
limitedEventSnapshot
= await
simulatorClient
.
limitedEvents
.
get
({
eventId
: 'event_123',
seatToken
: 'limited_token_123',
}) const
limitedEventResponse
= {
snapshot
:
limitedEventSnapshot
} satisfies LimitedEventResponse
console
.
log
(
limitedEventResponse
)

Indexable

[k: string]: unknown

Properties

snapshot

Example:

ts
import type { LimitedEventResponse } from '@my-swu/simulator-client'
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',
}) // Limited Event responses wrap the current event snapshot. const
limitedEventSnapshot
= await
simulatorClient
.
limitedEvents
.
get
({
eventId
: 'event_123',
seatToken
: 'limited_token_123',
}) const
limitedEventResponse
= {
snapshot
:
limitedEventSnapshot
} satisfies LimitedEventResponse
const {
snapshot
:
fetchedLimitedEventSnapshot
} =
limitedEventResponse
console
.
log
(
fetchedLimitedEventSnapshot
)

snapshot: LimitedEventSnapshot

Defined in: packages/ts-sdk/src/generated/types/limited-event-response.ts:29

Released under the MIT License.