@seatlayer/js 0.80.3 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -0
- package/dist/index.cjs +472 -398
- package/dist/index.d.cts +297 -45
- package/dist/index.d.ts +297 -45
- package/dist/index.js +471 -397
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PickerSeat, PickerGAArea, PickerMapTheme, PickerTransport, PickerSelectionValidator, RendererViewMode, PickerSelectionValidity, ChartTheme, AccessibilityType, FloorLabelStyle, LodRung, SectionSummary, PickerAccessNeed, SeatHoverDetails, AccessibleSectionStep, AvailabilityRefreshOutcome, PickerController, ExpandedSeat, TableSelectionDetails
|
|
1
|
+
import { PickerSeat, PickerGAArea, PickerMapTheme, PickerTransport, PickerSelectionValidator, RendererViewMode, PickerSelectionValidity, ChartTheme, AccessibilityType, FloorLabelStyle, LodRung, SectionSummary, PickerAccessNeed, SeatHoverDetails, AccessibleSectionStep, AvailabilityRefreshOutcome, PickerController, ExpandedSeat, TableSelectionDetails } from '@seatlayer/core';
|
|
2
2
|
export { ExpandedSeat, PickerMapTheme, PickerSelectionValidator, PickerSelectionValidity, PickerSelectionViolation, RendererViewMode, SeatHoverDetails } from '@seatlayer/core';
|
|
3
3
|
import { T as ThemeMode } from './channelsMode-goczEzyt.js';
|
|
4
4
|
export { A as AccessIntentForbidsDetails, a as AccessLinkRecord, b as AccessLinkReveal, c as AccessLinkState, d as AccessLinkStatus, e as AccessLinkStatusRecord, f as ArchiveBlockedDetails, g as AssignmentBuckets, h as AssignmentDropDetails, i as AssignmentResult, B as BucketRow, C as ChannelAccessIntent, j as ChannelAccessSummary, k as ChannelAllocationPage, l as ChannelAttribution, m as ChannelAuditEntry, n as ChannelAuditPage, o as ChannelCounts, p as ChannelListResult, q as ChannelPreviewProjection, r as ChannelRecord, s as ChannelReport, t as ChannelReportLinkRecord, u as ChannelReportLinkReveal, v as ChannelReportResult, w as ChannelReportRow, x as ChannelSeatStatus, y as ChannelState, z as ChannelsCapabilities, D as ChannelsClient, E as ChannelsMode, F as ChannelsModeHost, G as ChannelsRowView, H as ChannelsSeatView, I as ControlRoomActivityEntry, J as ControlRoomSectionMetric, K as ControlRoomSnapshot, L as EventCategoryAssignmentResult, M as EventScopedManageToken, N as EventTableBookingMode, O as EventTableBookingResult, P as IntentSwitchBlockedDetails, Q as InventoryBooking, R as InventoryBookingActivity, S as InventoryBookingDetail, U as InventoryBookingObject, V as InventoryBookingState, W as InventoryBookingsPage, X as InventoryBookingsQuery, Y as LogEntry, Z as LogPage, _ as ManageApi, $ as ManageApiError, a0 as ReportByStatus, a1 as ReportCategoryMeta, a2 as ReportCategoryRow, a3 as ReportResult, a4 as SeatManager, a5 as SeatManagerActionResult, a6 as SeatManagerActivity, a7 as SeatManagerCapability, a8 as SeatManagerConnection, a9 as SeatManagerFilteredSection, aa as SeatManagerMode, ab as SeatManagerOptions, ac as SeatManagerSelectionValidity, ad as SeatManagerTallies, ae as SelectionSourceRow } from './channelsMode-goczEzyt.js';
|
|
@@ -89,7 +89,24 @@ type BuyerAccessUnavailableReason =
|
|
|
89
89
|
/** The host's token provider threw or returned nothing usable. */
|
|
90
90
|
| 'provider_failed'
|
|
91
91
|
/** A one-shot `buyerAccessToken` lapsed and no provider was configured. */
|
|
92
|
-
| 'no_token'
|
|
92
|
+
| 'no_token'
|
|
93
|
+
/**
|
|
94
|
+
* 403 `audience_not_public`: this Season is embed-only, so an anonymous
|
|
95
|
+
* browser session cannot be minted for it. The organizer has to open the
|
|
96
|
+
* Season to the public before a tokenless embed can sell it.
|
|
97
|
+
*/
|
|
98
|
+
| 'audience_not_public'
|
|
99
|
+
/**
|
|
100
|
+
* 403 `sales_not_open`: the Season exists and is public, but its sales state
|
|
101
|
+
* is not open yet (or is paused, or has ended). Nothing is misconfigured and
|
|
102
|
+
* the same request may succeed later, so this one is retryable.
|
|
103
|
+
*/
|
|
104
|
+
| 'sales_not_open'
|
|
105
|
+
/**
|
|
106
|
+
* 403 `origin_not_allowed`: the browser's Origin is not among the embed
|
|
107
|
+
* domains the organizer declared for this Season's account.
|
|
108
|
+
*/
|
|
109
|
+
| 'origin_not_allowed';
|
|
93
110
|
/** The access session expired. Carries whether the refresh recovered it. */
|
|
94
111
|
interface BuyerAccessExpiredEvent {
|
|
95
112
|
reason: BuyerAccessRefreshReason;
|
|
@@ -1108,9 +1125,9 @@ interface SeatPickerOptions {
|
|
|
1108
1125
|
*/
|
|
1109
1126
|
referral?: string;
|
|
1110
1127
|
/**
|
|
1111
|
-
*
|
|
1112
|
-
*
|
|
1113
|
-
*
|
|
1128
|
+
* @deprecated No effect since 0.81: the badge follows the account's
|
|
1129
|
+
* white-label entitlement, which the server applies to the served chart.
|
|
1130
|
+
* Accepted and ignored so existing embeds keep type-checking.
|
|
1114
1131
|
*/
|
|
1115
1132
|
hideBadge?: boolean;
|
|
1116
1133
|
/**
|
|
@@ -1509,6 +1526,15 @@ interface SeatingChartPickerState {
|
|
|
1509
1526
|
rung: LodRung;
|
|
1510
1527
|
/** True only when one semantic zoom-out step can reveal more of the venue. */
|
|
1511
1528
|
canZoomOut: boolean;
|
|
1529
|
+
/**
|
|
1530
|
+
* Is the camera exactly at the whole-venue fit? Present only when the
|
|
1531
|
+
* renderer can answer; a host that reads `canZoomOut` alone re-creates the
|
|
1532
|
+
* dead "−" between the fit and the seats rung (web fix, 2026-09-05), so a
|
|
1533
|
+
* native host should dim its "−"/"fit" controls on THIS, when present.
|
|
1534
|
+
*/
|
|
1535
|
+
atVenueFit?: boolean;
|
|
1536
|
+
/** False only at the zoom ceiling. Present only when the renderer can answer. */
|
|
1537
|
+
canZoomIn?: boolean;
|
|
1512
1538
|
focusedSectionId: string | null;
|
|
1513
1539
|
focusedSection: SectionSummary | null;
|
|
1514
1540
|
viewMode: RendererViewMode;
|
|
@@ -1747,7 +1773,11 @@ interface SeatingChartOptions {
|
|
|
1747
1773
|
seatTooltip?: boolean;
|
|
1748
1774
|
/** Internal hosted-runtime control. Defaults true for direct web embeds. */
|
|
1749
1775
|
showTestModeIndicator?: boolean;
|
|
1750
|
-
/**
|
|
1776
|
+
/**
|
|
1777
|
+
* @deprecated No effect since 0.81: the badge follows the account's
|
|
1778
|
+
* white-label entitlement, which the server applies to the served chart.
|
|
1779
|
+
* Accepted and ignored.
|
|
1780
|
+
*/
|
|
1751
1781
|
showAttribution?: boolean;
|
|
1752
1782
|
/**
|
|
1753
1783
|
* Seat hover with everything a popover needs (category label/color, resolved
|
|
@@ -2690,9 +2720,11 @@ declare class EmbeddedDesigner {
|
|
|
2690
2720
|
/**
|
|
2691
2721
|
* pickerLegend — the two places the picker explains its colours.
|
|
2692
2722
|
*
|
|
2693
|
-
* The price LIST (`.sl-price-row`) is the detail view: colour, name,
|
|
2694
|
-
*
|
|
2695
|
-
*
|
|
2723
|
+
* The price LIST (`.sl-price-row`) is the detail view: colour, name, the offer
|
|
2724
|
+
* name, the exact price or spread. (It no longer prints how many are left —
|
|
2725
|
+
* owner call 2026-09-05 — though it still reads the count to dim a sold-out
|
|
2726
|
+
* row.) It lives in the side panel on desktop and behind a disclosure inside
|
|
2727
|
+
* the bottom sheet on a phone.
|
|
2696
2728
|
*
|
|
2697
2729
|
* The price RAIL (`.sl-rc`) is the phone's always-visible legend: colour and
|
|
2698
2730
|
* price, nothing else, pinned above the map. It exists because on a narrow
|
|
@@ -3222,6 +3254,26 @@ interface WebMcpRegistration {
|
|
|
3222
3254
|
/** What `PickerController.render()` reports back about the loaded event. */
|
|
3223
3255
|
type PickerRenderInfo = NonNullable<Awaited<ReturnType<PickerController['render']>>>;
|
|
3224
3256
|
|
|
3257
|
+
/** What `GET /pub/orders/:id/status` returns while the webhook is in flight. */
|
|
3258
|
+
interface CheckoutOrderStatus {
|
|
3259
|
+
orderId: string;
|
|
3260
|
+
status: string;
|
|
3261
|
+
totalMinor: number;
|
|
3262
|
+
currency: string;
|
|
3263
|
+
amountFormatted: string;
|
|
3264
|
+
seatCount: number;
|
|
3265
|
+
tickets?: Array<{
|
|
3266
|
+
label: string;
|
|
3267
|
+
token: string;
|
|
3268
|
+
status: 'issued' | 'checked_in' | 'void';
|
|
3269
|
+
checkedInAt: number | null;
|
|
3270
|
+
}>;
|
|
3271
|
+
/** Hosted ticket page — the durable re-entry point after the card closes. */
|
|
3272
|
+
ticketUrl?: string;
|
|
3273
|
+
/** Printable A4 PDF, up to three ticket cards per page. */
|
|
3274
|
+
pdfUrl?: string;
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3225
3277
|
declare class SeatPicker implements GaPromptPicker {
|
|
3226
3278
|
/** @internal Read by pickerGaPrompt for the `onGAPrompt` host hook. */
|
|
3227
3279
|
readonly opts: SeatPickerOptions;
|
|
@@ -3370,15 +3422,6 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3370
3422
|
private baZone;
|
|
3371
3423
|
/** "★ Best seats" premium quick-pick toggle — biases best-available to premium seats. */
|
|
3372
3424
|
private baPremium;
|
|
3373
|
-
/**
|
|
3374
|
-
* The buyer re-opened the best-seats form with seats already in the cart
|
|
3375
|
-
* ("I picked one, actually find us three together"). The card normally
|
|
3376
|
-
* yields this space to the ticket chips the moment anything is selected —
|
|
3377
|
-
* which removed the accelerator at exactly the moment a one-handed phone
|
|
3378
|
-
* buyer wants it. Cleared when the cart empties, a hold lands, or the
|
|
3379
|
-
* buyer backs out.
|
|
3380
|
-
*/
|
|
3381
|
-
private baReopen;
|
|
3382
3425
|
private bestAvailableConfirm;
|
|
3383
3426
|
/** Event sales window is closed (read-only load state / live close). */
|
|
3384
3427
|
/** @internal */ salesClosed: boolean;
|
|
@@ -3562,6 +3605,24 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3562
3605
|
/** @internal */ webMcpHost(holds: boolean): WebMcpHost;
|
|
3563
3606
|
/** Wire host chrome after the skeleton exists and before the renderer owns its map host. */
|
|
3564
3607
|
private wireBuyerShell;
|
|
3608
|
+
/**
|
|
3609
|
+
* Open or collapse the phone sheet, and say so.
|
|
3610
|
+
*
|
|
3611
|
+
* The one place `data-sheet` is written together with the chevron's
|
|
3612
|
+
* `aria-expanded` and its label: the two used to drift, and a chevron that
|
|
3613
|
+
* says "Open ticket panel" over an open panel is worse than no label at all.
|
|
3614
|
+
*
|
|
3615
|
+
* @internal
|
|
3616
|
+
*/
|
|
3617
|
+
setSheetOpen(open: boolean): void;
|
|
3618
|
+
/**
|
|
3619
|
+
* The empty phone cart's way in to the best-seats form.
|
|
3620
|
+
*
|
|
3621
|
+
* Still a FORM, not a verb: it reveals quantity/type/zone and picks nothing
|
|
3622
|
+
* for anyone. Opening the sheet is not the same as arriving at the card
|
|
3623
|
+
* either — on a short phone the tray can open scrolled past it.
|
|
3624
|
+
*/
|
|
3625
|
+
private openBestSeatsForm;
|
|
3565
3626
|
/**
|
|
3566
3627
|
* Put the phone sheet back to its peek.
|
|
3567
3628
|
*
|
|
@@ -3603,8 +3664,13 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3603
3664
|
setPanelCollapsed(collapsed: boolean): void;
|
|
3604
3665
|
/** Idempotent DOM apply, also run on every layout flip (inert must lift on narrow). */
|
|
3605
3666
|
private applyPanelCollapsed;
|
|
3606
|
-
/**
|
|
3607
|
-
*
|
|
3667
|
+
/**
|
|
3668
|
+
* Build the ♿ menu (filter + limited view + palette) as the TOP DISC of the
|
|
3669
|
+
* right-hand control column (owner call 2026-09-06). It used to stand alone
|
|
3670
|
+
* in the map's bottom-left corner, which is the minimap's corner, and read
|
|
3671
|
+
* as a stray control facing a stack of them. The menu owns its own state
|
|
3672
|
+
* machine and docks itself first in the column; see the module.
|
|
3673
|
+
*/
|
|
3608
3674
|
private buildAccessibilityMenu;
|
|
3609
3675
|
/**
|
|
3610
3676
|
* Jump to the seats rung when a dimming filter turns on — the dimming only
|
|
@@ -3688,7 +3754,15 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3688
3754
|
*/
|
|
3689
3755
|
private setSalesClosed;
|
|
3690
3756
|
private applySalesClosed;
|
|
3691
|
-
/**
|
|
3757
|
+
/**
|
|
3758
|
+
* The badge follows the SERVED chart theme, and nothing else.
|
|
3759
|
+
*
|
|
3760
|
+
* The API writes `theme.hideBadge` from the owning account's white-label
|
|
3761
|
+
* entitlement on every buyer-facing document, so this one flag is the whole
|
|
3762
|
+
* answer. The host's own `hideBadge` option is deliberately NOT consulted:
|
|
3763
|
+
* an un-entitled embed could otherwise strip the attribution by passing a
|
|
3764
|
+
* boolean. It stays in the option type for compatibility, inert.
|
|
3765
|
+
*/
|
|
3692
3766
|
private badgeHidden;
|
|
3693
3767
|
/** Attribution badge in the side-panel foot (Gap 7). Hidden per host/theme. */
|
|
3694
3768
|
private buildBadge;
|
|
@@ -3769,18 +3843,20 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3769
3843
|
/** Reflect the engine's current LOD rung onto the pill group. */
|
|
3770
3844
|
/** @internal */ syncRung(): void;
|
|
3771
3845
|
/**
|
|
3772
|
-
* The phone's
|
|
3846
|
+
* The phone's back-out controls, and whether they still have anywhere to go.
|
|
3773
3847
|
*
|
|
3774
|
-
* On narrow the
|
|
3775
|
-
*
|
|
3776
|
-
* the whole venue
|
|
3777
|
-
*
|
|
3778
|
-
*
|
|
3848
|
+
* On narrow the corner carries "+", "−" and the fit disc (owner call
|
|
3849
|
+
* 2026-09-05). "−" is the ladder — one tap to the section the buyer drilled
|
|
3850
|
+
* into, one more to the whole venue — and the fit disc is that last step on
|
|
3851
|
+
* its own. The ladder itself is `mapZoomOutStep`; this only dresses it, and
|
|
3852
|
+
* only on narrow: wide keeps "+" and "−" undimmed and never shows the disc.
|
|
3779
3853
|
*
|
|
3780
|
-
* DIMMED, NOT GONE. The
|
|
3854
|
+
* DIMMED, NOT GONE. The controls used to appear only once the buyer was deep
|
|
3781
3855
|
* enough to be lost, so the corner grew and shrank a button underneath their
|
|
3782
3856
|
* thumb. A control that stays put and plainly cannot be pressed says "you
|
|
3783
|
-
* are already looking at everything" without moving the target
|
|
3857
|
+
* are already looking at everything" without moving the target — as long as
|
|
3858
|
+
* it dims only when that is TRUE, which is why the reading is the engine's
|
|
3859
|
+
* fit pose and not a guess from whether seats happen to be on screen.
|
|
3784
3860
|
*/
|
|
3785
3861
|
private syncMapStepBack;
|
|
3786
3862
|
/** @internal */ syncProjection(): void;
|
|
@@ -3949,8 +4025,6 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3949
4025
|
/** @internal */ scheduleFit(): void;
|
|
3950
4026
|
private fitTranslatedRows;
|
|
3951
4027
|
private emitSelectionValidity;
|
|
3952
|
-
/** Paint the bottom-sheet's collapsed one-liner (pickerTray.ts builds it). */
|
|
3953
|
-
/** @internal */ renderPeek(count: number, total: number, pendingCount: number, bump?: boolean): void;
|
|
3954
4028
|
/**
|
|
3955
4029
|
* Release one buyer-visible held LINE. That is one label for a seat, and every
|
|
3956
4030
|
* unit label behind a grouped GA line — a buyer who presses × on
|
|
@@ -3986,6 +4060,29 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
3986
4060
|
private showBooked;
|
|
3987
4061
|
/** Take the confirmation down and give the map back. The booking stands. */
|
|
3988
4062
|
private dismissBooked;
|
|
4063
|
+
/**
|
|
4064
|
+
* The seats are BOUGHT. Put the picker back to the state a buyer who has
|
|
4065
|
+
* just arrived would find.
|
|
4066
|
+
*
|
|
4067
|
+
* "Back to map" used to take down the overlay and nothing else, and what it
|
|
4068
|
+
* uncovered was the cart that had paid for the booking: the same tickets
|
|
4069
|
+
* still listed (with padlocks, because the labels now read `booked`), the
|
|
4070
|
+
* same total in the footer, and a CTA frozen on "Opening secure checkout…"
|
|
4071
|
+
* with its spinner — a control that could never finish, over a hold that no
|
|
4072
|
+
* longer existed. The seats still painted as the buyer's own selection, ✕ on
|
|
4073
|
+
* a row did nothing (there is no hold left to release from), and any seat
|
|
4074
|
+
* added next was totalled together with tickets that were already paid for.
|
|
4075
|
+
*
|
|
4076
|
+
* A settled hold is not a hold, so everything that was showing one goes: the
|
|
4077
|
+
* hold and its handoff, the session's remembered hold id, the timer, the
|
|
4078
|
+
* selection behind the cart (which is what repaints those seats as inert
|
|
4079
|
+
* `booked` rather than as picks), the GA quantities, and the CTA phase.
|
|
4080
|
+
* `showBooked` has already fired `onBooked` and stopped the timer — this is
|
|
4081
|
+
* about the surface it left standing, and it runs on the way OUT of the
|
|
4082
|
+
* overlay, so a host that navigates away on `onBooked` (DesiPass) never
|
|
4083
|
+
* reaches it.
|
|
4084
|
+
*/
|
|
4085
|
+
private resetAfterBooking;
|
|
3989
4086
|
/**
|
|
3990
4087
|
* A Performance Group hold settled, told to us by the WRAPPER rather than by
|
|
3991
4088
|
* a socket (§8: this surface has no realtime feed). `detectBooked` waits for
|
|
@@ -4065,18 +4162,10 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
4065
4162
|
* group whose wrapper did not supply the nights.
|
|
4066
4163
|
*/
|
|
4067
4164
|
private nightStripFor;
|
|
4068
|
-
/**
|
|
4069
|
-
* Why a tapped seat cannot be taken, or '' when it can.
|
|
4070
|
-
*
|
|
4071
|
-
* Only the PRESS path asks for this — a mouse already has the status tag and
|
|
4072
|
-
* a card that follows the pointer, so a sentence under every hover would be
|
|
4073
|
-
* noise. A partly-available group seat is excluded: its night strip already
|
|
4074
|
-
* names the exact nights that block it, and "already booked" would flatly
|
|
4075
|
-
* contradict the row underneath saying it is free on Friday.
|
|
4076
|
-
*/
|
|
4077
|
-
private unavailableReason;
|
|
4078
4165
|
private unpinTooltip;
|
|
4079
4166
|
private handleMapPointerDown;
|
|
4167
|
+
/** Close every open ⓘ popover, except `keep`. */
|
|
4168
|
+
private closeInfoPops;
|
|
4080
4169
|
private updateTooltip;
|
|
4081
4170
|
/**
|
|
4082
4171
|
* Push the wrapper's current seat marks at the renderer.
|
|
@@ -4265,8 +4354,6 @@ declare class SeatPicker implements GaPromptPicker {
|
|
|
4265
4354
|
/** @internal */ seatViewFor3d(seatId: string): Promise<SeatView | null>;
|
|
4266
4355
|
/** @internal */ onView3dSeatPick(seatId: string): void;
|
|
4267
4356
|
/** @internal */ seatViewCaption(seatId: string): string;
|
|
4268
|
-
/** @internal */ showUnavailable3dSeat(seat: ExpandedSeat, visualState: SeatState3D, status: Exclude<SeatStatus, 'free'>): void;
|
|
4269
|
-
/** @internal */ dismissUnavailable3dSeat(): void;
|
|
4270
4357
|
private saveView3dComparisonSeat;
|
|
4271
4358
|
/** @internal */ clearView3dComparison(): void;
|
|
4272
4359
|
/** @internal */ view3dComparisonSnapshot(seatId: string): {
|
|
@@ -4798,6 +4885,24 @@ declare class PerformanceGroupPicker {
|
|
|
4798
4885
|
}
|
|
4799
4886
|
|
|
4800
4887
|
type SeasonOperationState = 'preparing' | 'commit_pending' | 'committed' | 'expire_pending' | 'booking_pending' | 'abort_pending' | 'aborted' | 'partial_terminal' | 'expired' | 'booked';
|
|
4888
|
+
/**
|
|
4889
|
+
* Who may open this Season in a browser.
|
|
4890
|
+
*
|
|
4891
|
+
* `public` is the only value an anonymous, tokenless embed can mint a session
|
|
4892
|
+
* for; every other value needs a bearer minted by the organizer's own backend.
|
|
4893
|
+
*/
|
|
4894
|
+
type SeasonAudience = 'private' | 'embed_only' | 'discoverable' | 'public';
|
|
4895
|
+
/**
|
|
4896
|
+
* Who takes the buyer's money.
|
|
4897
|
+
*
|
|
4898
|
+
* 'seatlayer' the Season is sold through SeatLayer's hosted checkout, so the
|
|
4899
|
+
* widget may run `checkout: 'hosted'` end to end.
|
|
4900
|
+
* 'server' the organizer's own backend prices and charges the package;
|
|
4901
|
+
* the widget hands off and never asks for money.
|
|
4902
|
+
* null the organizer has not chosen yet (or the worker predates the
|
|
4903
|
+
* field), which reads exactly like `'server'`.
|
|
4904
|
+
*/
|
|
4905
|
+
type SeasonCheckoutMode = 'seatlayer' | 'server';
|
|
4801
4906
|
interface SeasonDescriptor {
|
|
4802
4907
|
key: string;
|
|
4803
4908
|
name: string;
|
|
@@ -4806,7 +4911,9 @@ interface SeasonDescriptor {
|
|
|
4806
4911
|
currency: string;
|
|
4807
4912
|
venue: string;
|
|
4808
4913
|
timezone: string | null;
|
|
4809
|
-
audience:
|
|
4914
|
+
audience: SeasonAudience;
|
|
4915
|
+
/** Absent on a worker that predates hosted Season checkout; read as `null`. */
|
|
4916
|
+
checkoutMode?: SeasonCheckoutMode | null;
|
|
4810
4917
|
planActivationId: string;
|
|
4811
4918
|
occurrenceCount: number;
|
|
4812
4919
|
occurrences: Array<{
|
|
@@ -4857,6 +4964,56 @@ interface SeasonCheckoutHandoff {
|
|
|
4857
4964
|
state: string;
|
|
4858
4965
|
}>;
|
|
4859
4966
|
}
|
|
4967
|
+
/**
|
|
4968
|
+
* One category's package price, for one package.
|
|
4969
|
+
*
|
|
4970
|
+
* `unitPrice` is an integer in the currency's MINOR unit, like every other
|
|
4971
|
+
* money field the API returns, and it is the price of the whole package for one
|
|
4972
|
+
* seat — not a per-performance price. Rendering divides by the currency's own
|
|
4973
|
+
* exponent (`fromMinorUnits`), never by a hardcoded 100.
|
|
4974
|
+
*/
|
|
4975
|
+
interface SeasonCategoryPrice {
|
|
4976
|
+
categoryKey: string;
|
|
4977
|
+
unitPrice: number;
|
|
4978
|
+
}
|
|
4979
|
+
interface SeasonPackagePrices {
|
|
4980
|
+
planKey: string;
|
|
4981
|
+
name: string;
|
|
4982
|
+
prices: SeasonCategoryPrice[];
|
|
4983
|
+
}
|
|
4984
|
+
/**
|
|
4985
|
+
* Server-authored package prices for this Season.
|
|
4986
|
+
*
|
|
4987
|
+
* When this is present it OUTRANKS the host-authored `offer` copy: the server
|
|
4988
|
+
* is the only party that can price what the buyer will actually be charged, so
|
|
4989
|
+
* a display-only `priceLabel` must never sit in front of it.
|
|
4990
|
+
*/
|
|
4991
|
+
interface SeasonPrices {
|
|
4992
|
+
currency: string;
|
|
4993
|
+
packages: SeasonPackagePrices[];
|
|
4994
|
+
}
|
|
4995
|
+
/**
|
|
4996
|
+
* A started Season payment. Identical in shape to the Event hosted checkout's
|
|
4997
|
+
* response (`POST /pub/events/:key/checkout`) so the same card, the same
|
|
4998
|
+
* gateway handoff and the same order polling serve both.
|
|
4999
|
+
*/
|
|
5000
|
+
interface SeasonCheckoutSession {
|
|
5001
|
+
orderId: string;
|
|
5002
|
+
totalMinor: number;
|
|
5003
|
+
currency: string;
|
|
5004
|
+
expiresAt: number;
|
|
5005
|
+
/** Hosted gateway page — navigate to it. */
|
|
5006
|
+
redirectUrl?: string;
|
|
5007
|
+
/** In-page modal gateway — open it without leaving the page. */
|
|
5008
|
+
clientPayload?: Record<string, unknown>;
|
|
5009
|
+
}
|
|
5010
|
+
interface SeasonCheckoutRequest {
|
|
5011
|
+
operationId: string;
|
|
5012
|
+
buyerEmail: string;
|
|
5013
|
+
buyerName?: string;
|
|
5014
|
+
provider?: string;
|
|
5015
|
+
returnUrl?: string;
|
|
5016
|
+
}
|
|
4860
5017
|
interface SeasonRenewalIntent {
|
|
4861
5018
|
offerId: string;
|
|
4862
5019
|
state: 'intent_received';
|
|
@@ -4900,6 +5057,43 @@ interface SeasonPickerOptions {
|
|
|
4900
5057
|
container: string | HTMLElement;
|
|
4901
5058
|
season: string;
|
|
4902
5059
|
apiBase?: string;
|
|
5060
|
+
/**
|
|
5061
|
+
* Publishable account key (`pk_live_…` / `pk_test_…`), accepted for parity
|
|
5062
|
+
* with `SeatPicker`'s `publicKey` so one embed snippet shape covers
|
|
5063
|
+
* Events and Seasons.
|
|
5064
|
+
*
|
|
5065
|
+
* It is NOT sent to the server and is not a credential: a public Season
|
|
5066
|
+
* session is authorized by the Season key plus the browser's registered
|
|
5067
|
+
* Origin. Supply it to name the account in your own source; omit it and a
|
|
5068
|
+
* tokenless picker behaves identically.
|
|
5069
|
+
*/
|
|
5070
|
+
publicKey?: string;
|
|
5071
|
+
/**
|
|
5072
|
+
* WHO TAKES THE MONEY once the package is held. Default `'handoff'`.
|
|
5073
|
+
*
|
|
5074
|
+
* 'handoff' (default, and every Season integration that has ever existed)
|
|
5075
|
+
* {@link onContinue} fires with the opaque, price-free handoff
|
|
5076
|
+
* and YOUR server prices, charges and books it. Nothing about
|
|
5077
|
+
* this path changes and no payment code is downloaded.
|
|
5078
|
+
* 'hosted' the widget collects an email and takes the money through the
|
|
5079
|
+
* gateway the ORGANIZER connected, on their account, against
|
|
5080
|
+
* `POST /pub/seasons/:key/checkout`. One order, one ticket per
|
|
5081
|
+
* performance. {@link onContinue} still fires, so a host that
|
|
5082
|
+
* only wants to observe the moment keeps working.
|
|
5083
|
+
*
|
|
5084
|
+
* A Season the organizer priced on their own backend reports
|
|
5085
|
+
* `checkoutMode: 'server'`; asking for `'hosted'` there stays on `'handoff'`
|
|
5086
|
+
* rather than starting a payment SeatLayer cannot complete.
|
|
5087
|
+
*/
|
|
5088
|
+
checkout?: 'handoff' | 'hosted';
|
|
5089
|
+
/**
|
|
5090
|
+
* Where a redirecting gateway sends the buyer back to, for
|
|
5091
|
+
* `checkout: 'hosted'`. Same rules as the Event picker's `returnUrl`: the
|
|
5092
|
+
* server keeps the path and query, adds only `seatlayer_checkout=…`, and
|
|
5093
|
+
* ignores an origin the organizer has not declared — so supplying a URL
|
|
5094
|
+
* cannot authorize it.
|
|
5095
|
+
*/
|
|
5096
|
+
returnUrl?: string;
|
|
4903
5097
|
buyerAccessTokenProvider?: BuyerAccessTokenProvider;
|
|
4904
5098
|
buyerAccessToken?: string | BuyerAccessToken;
|
|
4905
5099
|
initialOperationId?: string;
|
|
@@ -4936,7 +5130,21 @@ interface SeasonPickerOptions {
|
|
|
4936
5130
|
onHoldExpired?: () => void;
|
|
4937
5131
|
onRenewalIntent?: (intent: SeasonRenewalIntent) => void;
|
|
4938
5132
|
onAccessExpired?: (event: BuyerAccessExpiredEvent) => void;
|
|
5133
|
+
/**
|
|
5134
|
+
* Private inventory is unavailable, and refreshing will not fix it.
|
|
5135
|
+
*
|
|
5136
|
+
* A tokenless public embed reports the server's three Season refusals here
|
|
5137
|
+
* with their own reasons — `audience_not_public`, `sales_not_open`,
|
|
5138
|
+
* `origin_not_allowed` — rather than collapsing them into `provider_failed`,
|
|
5139
|
+
* because the three call for three different answers from the organizer.
|
|
5140
|
+
*/
|
|
4939
5141
|
onAccessUnavailable?: (event: BuyerAccessUnavailableEvent) => void;
|
|
5142
|
+
/**
|
|
5143
|
+
* `checkout: 'hosted'` only — the gateway's webhook landed and the Season
|
|
5144
|
+
* order is PAID. The one signal a host with no backend of its own can build
|
|
5145
|
+
* a receipt from.
|
|
5146
|
+
*/
|
|
5147
|
+
onOrderConfirmed?: (order: CheckoutOrderStatus) => void;
|
|
4940
5148
|
onStatusChange?: (event: SeasonStatusEvent) => void;
|
|
4941
5149
|
onError?: (error: unknown) => void;
|
|
4942
5150
|
}
|
|
@@ -4955,6 +5163,50 @@ declare class SeasonPicker {
|
|
|
4955
5163
|
destroy(): void;
|
|
4956
5164
|
}
|
|
4957
5165
|
|
|
5166
|
+
/**
|
|
5167
|
+
* The anonymous Season buyer session — how a page with no backend at all can
|
|
5168
|
+
* put a Season on sale.
|
|
5169
|
+
*
|
|
5170
|
+
* Until now every `SeasonPicker` needed a `bss_` bearer minted by the
|
|
5171
|
+
* organizer's own server with their secret key, which meant only a developer
|
|
5172
|
+
* could embed a Season. `POST /pub/seasons/:key/sessions` removes that step: it
|
|
5173
|
+
* takes no credential, checks the Season is public, its sales are open and the
|
|
5174
|
+
* browser's Origin is one the organizer declared, and hands back an ordinary
|
|
5175
|
+
* Season buyer bearer. Every existing `/pub/seasons/:key/*` call then works
|
|
5176
|
+
* unchanged — this module mints and renews the bearer and does nothing else.
|
|
5177
|
+
*
|
|
5178
|
+
* A publishable `pk_…` key is NOT sent here. It is accepted by the picker for
|
|
5179
|
+
* parity with `SeatPicker` (one snippet shape across surfaces) and to name the
|
|
5180
|
+
* account in a host's own source, but the Season key plus the registered Origin
|
|
5181
|
+
* are what the server actually verifies, so putting a key on the wire would add
|
|
5182
|
+
* a value to leak without adding a check.
|
|
5183
|
+
*
|
|
5184
|
+
* WHAT MAKES THIS SAFE TO BE ANONYMOUS: the session it mints is Public-sale
|
|
5185
|
+
* only. It can never select a private channel or a renewal allocation — that
|
|
5186
|
+
* still needs `buyerAccessTokenProvider` with the organizer's own scope — and
|
|
5187
|
+
* an explicit host token always takes precedence over this path.
|
|
5188
|
+
*/
|
|
5189
|
+
|
|
5190
|
+
/** The three ways the server refuses to mint an anonymous Season session. */
|
|
5191
|
+
type SeasonPublicRefusalReason = 'audience_not_public' | 'sales_not_open' | 'origin_not_allowed';
|
|
5192
|
+
/** What `POST /pub/seasons/:key/sessions` returns. */
|
|
5193
|
+
interface SeasonPublicSession {
|
|
5194
|
+
token: string;
|
|
5195
|
+
expiresAt: number;
|
|
5196
|
+
seasonKey: string;
|
|
5197
|
+
planActivationIds: string[];
|
|
5198
|
+
}
|
|
5199
|
+
/**
|
|
5200
|
+
* Thrown when the server refuses to mint. Carries the machine reason and
|
|
5201
|
+
* nothing else — no origin, no account, no audience detail — because the
|
|
5202
|
+
* refusal is reported to an anonymous browser.
|
|
5203
|
+
*/
|
|
5204
|
+
declare class SeasonPublicSessionRefused extends Error {
|
|
5205
|
+
readonly reason: SeasonPublicRefusalReason;
|
|
5206
|
+
readonly status: number;
|
|
5207
|
+
constructor(reason: SeasonPublicRefusalReason, status: number);
|
|
5208
|
+
}
|
|
5209
|
+
|
|
4958
5210
|
/**
|
|
4959
5211
|
* Host-side helper for embedding the SeatLayer picker as an iframe.
|
|
4960
5212
|
*
|
|
@@ -4995,4 +5247,4 @@ interface AttachPickerFrameOptions {
|
|
|
4995
5247
|
*/
|
|
4996
5248
|
declare function attachPickerFrame(iframe: HTMLIFrameElement, opts?: AttachPickerFrameOptions): () => void;
|
|
4997
5249
|
|
|
4998
|
-
export { ApiError, type AttachPickerFrameOptions, type BestAvailableResult, BuyerAccessContext, type BuyerAccessExpiredEvent, type BuyerAccessRefreshReason, type BuyerAccessToken, type BuyerAccessTokenProvider, BuyerAccessUnavailableError, type BuyerAccessUnavailableEvent, type BuyerAccessUnavailableReason, BuyerRealtimeClient, type BuyerRealtimeOptions, type CheckoutHandoff, type CheckoutLineItem, type CheckoutSessionResult, EmbeddedDesigner, type EmbeddedDesignerEventType, type EmbeddedDesignerMessage, type EmbeddedDesignerOptions, type GAAreaAvailability, type GAPromptRequest, type GaPromptTier, type HoldConflict, type HoldLineItem, type HoldResult, type OrderStatusResult, type PaymentOptionsReason, type PaymentOptionsResult, type PaymentProviderName, type PerformanceGroupAvailability, type PerformanceGroupCheckoutHandoff, type PerformanceGroupDescriptor, PerformanceGroupDestroyedError, type PerformanceGroupHold, type PerformanceGroupHoldAllocation, type PerformanceGroupOperationEvent, type PerformanceGroupOperationState, PerformanceGroupPicker, type PerformanceGroupPickerOptions, type PerformanceGroupRecoveryState, type PerformanceGroupSeatAllocation, type PerformanceGroupSelectionMode, type PerformanceGroupStatusEvent, type Projection, type PubApiOptions, type RealtimeSink, type ResumedHoldResult, SEATING_CHART_CALLBACK_PROPS, SEATING_CHART_HANDLE_METHODS, SEATING_CHART_IDENTITY_PROPS, SEATING_CHART_VALUE_PROPS, type SaleState, SeasonApiError, type SeasonAvailability, type SeasonBestAvailableOptions, type SeasonCheckoutHandoff, type SeasonDescriptor, type SeasonOfferPresentation, type SeasonOperation, type SeasonOperationState, SeasonPicker, type SeasonPickerOptions, SeasonRecoveryTimeoutError, type SeasonRenewalIntent, type SeasonStatusEvent, SeatPicker, type SeatPickerBestAvailableOptions, type SeatPickerBuyerView, type SeatPickerBuyerViewOptions, type SeatPickerOptions, type SeatPickerPricing, type SeatPickerTheme, type SeatPickerWebMcpOptions, SeatingChart, type SeatingChartCallbackProp, type SeatingChartCallbacks, type SeatingChartHandle, type SeatingChartHandleMethod, type SeatingChartIdentityProp, type SeatingChartOptions, type SeatingChartSeatViewInfo, type SeatingChartValueProp, type SeatingChartValues, type SelectedObjectUnavailableEvent, type SelectedSeat, type StatusChange, type SubscribeTicket, ThemeMode, type TicketOfferAvailability, type TicketOfferPrice, type TicketOfferSummary, attachPickerFrame, bindSeatingChartHandle, buildSeatingChartOptions, createBuyerAccessContext, createControllerSink, parseTicketOfferAvailability, shortOperationReference, ticketOfferPrices };
|
|
5250
|
+
export { ApiError, type AttachPickerFrameOptions, type BestAvailableResult, BuyerAccessContext, type BuyerAccessExpiredEvent, type BuyerAccessRefreshReason, type BuyerAccessToken, type BuyerAccessTokenProvider, BuyerAccessUnavailableError, type BuyerAccessUnavailableEvent, type BuyerAccessUnavailableReason, BuyerRealtimeClient, type BuyerRealtimeOptions, type CheckoutHandoff, type CheckoutLineItem, type CheckoutSessionResult, EmbeddedDesigner, type EmbeddedDesignerEventType, type EmbeddedDesignerMessage, type EmbeddedDesignerOptions, type GAAreaAvailability, type GAPromptRequest, type GaPromptTier, type HoldConflict, type HoldLineItem, type HoldResult, type OrderStatusResult, type PaymentOptionsReason, type PaymentOptionsResult, type PaymentProviderName, type PerformanceGroupAvailability, type PerformanceGroupCheckoutHandoff, type PerformanceGroupDescriptor, PerformanceGroupDestroyedError, type PerformanceGroupHold, type PerformanceGroupHoldAllocation, type PerformanceGroupOperationEvent, type PerformanceGroupOperationState, PerformanceGroupPicker, type PerformanceGroupPickerOptions, type PerformanceGroupRecoveryState, type PerformanceGroupSeatAllocation, type PerformanceGroupSelectionMode, type PerformanceGroupStatusEvent, type Projection, type PubApiOptions, type RealtimeSink, type ResumedHoldResult, SEATING_CHART_CALLBACK_PROPS, SEATING_CHART_HANDLE_METHODS, SEATING_CHART_IDENTITY_PROPS, SEATING_CHART_VALUE_PROPS, type SaleState, SeasonApiError, type SeasonAudience, type SeasonAvailability, type SeasonBestAvailableOptions, type SeasonCategoryPrice, type SeasonCheckoutHandoff, type SeasonCheckoutMode, type SeasonCheckoutRequest, type SeasonCheckoutSession, type SeasonDescriptor, type SeasonOfferPresentation, type SeasonOperation, type SeasonOperationState, type SeasonPackagePrices, SeasonPicker, type SeasonPickerOptions, type SeasonPrices, type SeasonPublicRefusalReason, type SeasonPublicSession, SeasonPublicSessionRefused, SeasonRecoveryTimeoutError, type SeasonRenewalIntent, type SeasonStatusEvent, SeatPicker, type SeatPickerBestAvailableOptions, type SeatPickerBuyerView, type SeatPickerBuyerViewOptions, type SeatPickerOptions, type SeatPickerPricing, type SeatPickerTheme, type SeatPickerWebMcpOptions, SeatingChart, type SeatingChartCallbackProp, type SeatingChartCallbacks, type SeatingChartHandle, type SeatingChartHandleMethod, type SeatingChartIdentityProp, type SeatingChartOptions, type SeatingChartSeatViewInfo, type SeatingChartValueProp, type SeatingChartValues, type SelectedObjectUnavailableEvent, type SelectedSeat, type StatusChange, type SubscribeTicket, ThemeMode, type TicketOfferAvailability, type TicketOfferPrice, type TicketOfferSummary, attachPickerFrame, bindSeatingChartHandle, buildSeatingChartOptions, createBuyerAccessContext, createControllerSink, parseTicketOfferAvailability, shortOperationReference, ticketOfferPrices };
|