Skip to content
Docs
Reference

Interface: CreateLiveClientOptions

Interface: CreateLiveClientOptions in @ticketlayer/live.

@ticketlayer/live


@ticketlayer/live / index / CreateLiveClientOptions

Defined in: createLiveClient.ts:33

@ticketlayer/live - the buyer-facing client for the Ticketlayer Live surface.

The client surface (sales operations + session/queue) is GENERATED from the backstage sales-surface projection + the live-api spec (see client.ts). The only hand-written part is createLiveClient (browser/native ergonomics).

Runs in the browser and React Native (publishable key + X-Live-Session header

  • pluggable token storage). Web builds may additionally bundle @ticketlayer/elements; native apps use the headless client + webview checkout.

Extends#

Properties#

apiVersion?#

optional apiVersion?: string;

Defined in: client.ts:165

Override the dated API version sent as TL-Version.

Inherited from#

LiveClientConfig.apiVersion


applyTheme?#

optional applyTheme?: boolean;

Defined in: createLiveClient.ts:39

Fetch + apply the channel theme on start (default true in the browser).


autoStart?#

optional autoStart?: boolean;

Defined in: createLiveClient.ts:37

Bootstrap the session immediately (default true).


baseUrl#

baseUrl: string;

Defined in: client.ts:151

Base URL of a Live deployment (or the sales surface directly).

Inherited from#

LiveClientConfig.baseUrl


buyModal?#

optional buyModal?: boolean;

Defined in: createLiveClient.ts:69

Mount the in-page buy-tickets modal (occurrence → ticket selection) on ui:event-modal-requested. Native Elements overlay, no iframe - works on HBO and embeds alike. Defaults to true in the browser for the published client; set false to opt out.


checkout?#

optional checkout?: {
  mode: "modal" | "page";
} & CheckoutModalOptions;

Defined in: createLiveClient.ts:62

Checkout rendering.

  • 'modal' (third-party embeds) auto-opens the hosted checkout in an iframe overlay on ui:checkout-requested, and lets an element (the buy modal) show the same checkout inside itself.
  • 'page' (HBO) leaves ui:checkout-requested to the host, which has a checkout page of its own, but still lets an element show the hosted checkout inside itself, so the buy modal pays in place.
  • Omitted: the host handles checkout entirely; an element hands over.

Type Declaration#

mode
mode: "modal" | "page";

domain?#

optional domain?: string;

Defined in: createLiveClient.ts:35

Storefront host to resolve the channel from (hosted mode). Defaults to the page host.


elements?#

optional elements?: boolean;

Defined in: state/loadElements.ts:69

Enable runtime injection (default false - most hosts import Elements directly).

Inherited from#

LoadElementsOptions.elements


elementsIntegrity?#

optional elementsIntegrity?: string;

Defined in: state/loadElements.ts:79

Subresource integrity for elementsUrl, as /versions.json publishes it (sha384-...). Required for an exact-version URL, refused without one.

Inherited from#

LoadElementsOptions.elementsIntegrity


elementsUrl?#

optional elementsUrl?: string;

Defined in: state/loadElements.ts:74

Override the Elements ESM bundle URL: a pinned CDN build, or a local dist in dev. An exact-version URL must come with elementsIntegrity.

Inherited from#

LoadElementsOptions.elementsUrl


headers?#

optional headers?: Record<string, string>;

Defined in: client.ts:167

Extra headers sent on every request (merged under per-call headers).

Inherited from#

LiveClientConfig.headers


publish?#

optional publish?: boolean;

Defined in: createLiveClient.ts:44

Publish this client on window.Ticketlayer so Elements can find + bind to it (default true in the browser). Set false to keep the client private.


publishableKey?#

optional publishableKey?: string;

Defined in: client.ts:161

For embeds/native: the channel's publishable key (tlpk_…).

Inherited from#

LiveClientConfig.publishableKey


sessionMode?#

optional sessionMode?: "cookie" | "token";

Defined in: client.ts:159

Session transport:

  • 'cookie' (hosted web): the live_session httpOnly cookie travels automatically with credentials: 'include'; no token is held client-side.
  • 'token' (embeds / React Native / native): the session id is held by the SDK and sent as the X-Live-Session header.

Inherited from#

LiveClientConfig.sessionMode


sessionToken?#

optional sessionToken?: string;

Defined in: createLiveClient.ts:50

Resume an existing session by token (token transport) instead of bootstrapping a new one. Used by the embedded checkout iframe to inherit the parent page's cart/session. Forces sessionMode 'token'.


tokenStorage?#

optional tokenStorage?: LiveTokenStorage;

Defined in: client.ts:163

Token storage for 'token' session mode (defaults to in-memory).

Inherited from#

LiveClientConfig.tokenStorage