@my-swu/simulator-client / LimitedEventSession
Interface: LimitedEventSession
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:167
Live presence session for one directly-created Limited Event seat.
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
console.log(limitedEventSession)Properties
__v_skip
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { __v_skip } = limitedEventSession
console.log(__v_skip)
readonly__v_skip:true
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:168
close
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { close } = limitedEventSession
console.log(close)close: () =>
void
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:173
Returns
void
connect
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { connect } = limitedEventSession
console.log(connect)connect: () =>
Promise<LimitedEventSession>
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:174
Returns
Promise<LimitedEventSession>
connectionState
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { connectionState } = limitedEventSession
console.log(connectionState)
readonlyconnectionState:ConnectionState
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:169
errorMessages
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { errorMessages } = limitedEventSession
console.log(errorMessages)
readonlyerrorMessages: readonlystring[]
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:170
errors
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { errors } = limitedEventSession
console.log(errors)
readonlyerrors: readonlyErrorPayload[]
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:171
on
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { on } = limitedEventSession
console.log(on)on: <
TKey>(event,listener) => () =>void
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:175
Type Parameters
TKey
TKey extends keyof LimitedEventSessionEvents
Parameters
event
TKey
listener
(value) => void
Returns
() => void
ping
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { ping } = limitedEventSession
console.log(ping)ping: (
nonce?) =>void
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:179
Parameters
nonce?
string
Returns
void
snapshot
Example:
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',
})
// Keep seatToken private; it authenticates this Limited Event seat.
const limitedEventSession = simulatorClient.limitedEvents.createSession({
eventId: 'event_123',
seatToken: 'limited_token_123',
})
const { snapshot: limitedEventSnapshot } = limitedEventSession
console.log(limitedEventSnapshot)
readonlysnapshot:LimitedEventSnapshot|undefined
Defined in: packages/ts-sdk/src/resources/limited-event-types.ts:172
