Skip to main content

LiveEvent

@ticketlayer/live


@ticketlayer/live / index / LiveEvent

Type Alias: LiveEvent

type LiveEvent = 
| "session:changed"
| "cart:updated"
| "auth:changed"
| "checkout:completed"
| "error"
| "ui:event-modal-requested"
| "ui:checkout-requested"
| "ui:cart-requested"
| "ui:login-requested"
| "ui:modal-close-requested";

Defined in: state/emitter.ts:11

Bidirectional event bus shared by the SDK, Elements, and the host app.

Two directions:

  • STATE events the SDK pushes OUT so Elements re-render (cart:updated, …).
  • UI INTENTS Elements/host push IN for someone else to act on (ui:checkout-requested, ui:event-modal-requested, …) - e.g. a tl-buy-tickets-button emits ui:event-modal-requested and HBO opens the modal. The SDK itself doesn't render UI; it just relays.