@seatlayer/js 0.100.0 → 0.102.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/dist/index.d.cts CHANGED
@@ -633,9 +633,22 @@ declare class ApiError extends Error {
633
633
  * contention. Absent when the server said nothing; never inferred here.
634
634
  */
635
635
  retryable?: boolean;
636
+ /**
637
+ * Why a 404 happened when the key itself shows it (`api_key_as_event_key`,
638
+ * `secret_key_as_event_key`, `example_event_key`): an API key or the docs'
639
+ * example pasted where the event key goes. Absent otherwise.
640
+ */
641
+ hint?: string;
642
+ /**
643
+ * The API's plain-language explanation for the developer, when it sent one.
644
+ * Not buyer copy: `message` stays the machine code callers already compare.
645
+ */
646
+ serverMessage?: string;
636
647
  constructor(status: number, message: string, code?: string, conflicts?: HoldConflict[], reason?: string, retryAfterS?: number, notice?: string, details?: {
637
648
  fields?: BookingFormFieldError[];
638
649
  retryable?: boolean;
650
+ hint?: string;
651
+ serverMessage?: string;
639
652
  });
640
653
  }
641
654
  interface HoldResult {
@@ -822,6 +835,13 @@ interface GaPromptTier {
822
835
  */
823
836
  interface GAPromptRequest {
824
837
  area: PickerGAArea;
838
+ /**
839
+ * How the area sells: absent = per person; 'whole' = one party takes the
840
+ * whole area (min = max = its guests); 'variable' = one party picks a size in
841
+ * min–max. A box is ONE booking at ONE ticket type: confirm with a number, or
842
+ * a record naming a single tier.
843
+ */
844
+ bookingMode?: 'whole' | 'variable';
825
845
  /** Quantities already chosen here, per tier id (`''` for an untiered area). */
826
846
  selected: Record<string, number>;
827
847
  min: number;
@@ -857,10 +877,21 @@ interface GaPromptPicker {
857
877
  /** Tickets in the order right now, held + selected seats + every GA quantity. */
858
878
  totalTicketCount(): number;
859
879
  onGAPromptHook?: ((prompt: GAPromptRequest) => boolean | void) | undefined;
880
+ /** The buyer's access filter: with wheelchair on, an area offers only its wheelchair places. */
881
+ controller?: {
882
+ getAccessibilityFilter?(): readonly string[] | null;
883
+ };
860
884
  }
861
885
 
862
886
  type SeatingChartBuyerView = 'map' | 'venue3d';
887
+ /** The pinned drag action a host can read back (native state decoders know these two). */
863
888
  type SeatingChartNavigationMode = 'orbit' | 'pan';
889
+ /**
890
+ * What a host may ask a plain drag to do in 3D. `auto`, the default, turns the
891
+ * venue at the overview and moves the camera once the buyer has zoomed in;
892
+ * `orbit` and `pan` pin one action (a host's own Rotate / Move buttons).
893
+ */
894
+ type SeatingChartNavigationRequest = SeatingChartNavigationMode | 'auto';
864
895
  /** What the 2D seat-view panorama is showing, and what it would say about it. */
865
896
  interface SeatingChartSeatViewInfo {
866
897
  seatId: string;
@@ -2454,6 +2485,12 @@ declare class SeatingChart {
2454
2485
  setPricing(pricing: {
2455
2486
  prices?: HostPrices;
2456
2487
  } | undefined): void;
2488
+ /**
2489
+ * The host's prices in the map's shape, so the seat hover card and the
2490
+ * canvas labels print what the host charges, not the chart's own price.
2491
+ * Undefined without host prices: the map then uses the chart's.
2492
+ */
2493
+ private hostPriceRanges;
2457
2494
  /** Toggle colorblind-safe rendering at runtime (see options.colorblindSafe). */
2458
2495
  setColorblindSafe(on: boolean): void;
2459
2496
  /** Switch the 2D canvas projection.
@@ -2509,8 +2546,9 @@ declare class SeatingChart {
2509
2546
  getBuyerView(): SeatingChartBuyerView;
2510
2547
  /** Open an authored or chart-derived 360° view for one physical seat. */
2511
2548
  openSeatView(seatId: string): Promise<void>;
2512
- /** Explicit Rotate / Move control for native and custom picker chrome. */
2513
- setVenue3DNavigationMode(mode: SeatingChartNavigationMode): void;
2549
+ /** Explicit Rotate / Move control for native and custom picker chrome;
2550
+ * `auto` (the default) turns at the overview and moves once zoomed in. */
2551
+ setVenue3DNavigationMode(mode: SeatingChartNavigationRequest): void;
2514
2552
  /**
2515
2553
  * Enable or suppress all buyer input inside this chart without unmounting it.
2516
2554
  *
@@ -4583,7 +4621,15 @@ declare class SeatPicker implements GaPromptPicker {
4583
4621
  /** The read itself. Never rejects — see the catch. */
4584
4622
  private readOfferAvailability;
4585
4623
  /** @internal */ offerPrice(categoryKey: string | undefined, tierId?: string | null): TicketOfferPrice | null;
4586
- /** Keep authored regular prices out of canvas labels during matrix offers. */
4624
+ /**
4625
+ * Keep authored regular prices out of canvas labels during matrix offers,
4626
+ * and out of them whenever the host prices the event itself.
4627
+ *
4628
+ * Left undefined, the map prints the chart's own category prices. A host
4629
+ * that charges from its own catalogue (`pricing.prices`) then saw one price
4630
+ * in the list and another on the seat's hover card: DKK 411 against DKK 55 on
4631
+ * a DesiPass event (2026-09-25). The map now takes the list's answer.
4632
+ */
4587
4633
  private mapPriceRanges;
4588
4634
  private syncMapPriceRanges;
4589
4635
  private applyChannelPricing;
@@ -5210,7 +5256,8 @@ interface PerformanceGroupCheckoutHandoff {
5210
5256
  }
5211
5257
  /** What the wrapper is showing the buyer right now, for host telemetry. */
5212
5258
  interface PerformanceGroupStatusEvent {
5213
- kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed';
5259
+ /** `checkout`: the hosted checkout could not start; the seats stay held. */
5260
+ kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout';
5214
5261
  message: string;
5215
5262
  /** The short operation reference from §12, when one applies. */
5216
5263
  reference?: string;
@@ -5235,6 +5282,20 @@ interface PerformanceGroupPickerOptions {
5235
5282
  */
5236
5283
  allowSelectionModeSwitch?: boolean;
5237
5284
  apiBase?: string;
5285
+ /**
5286
+ * `'hosted'`: SeatLayer takes the money through the organizer's gateway (a
5287
+ * same-seat run only) and {@link onCheckout} still fires. Default
5288
+ * `'handoff'`. A run whose checkout the organizer's backend owns stays on
5289
+ * the handoff. With no buyer token, the picker mints an anonymous
5290
+ * public-sale session itself.
5291
+ */
5292
+ checkout?: 'handoff' | 'hosted';
5293
+ /** Where a redirecting gateway returns to. Only a declared origin is kept. */
5294
+ returnUrl?: string;
5295
+ /** Default true. False hides the run's name, summary and dates, for a host page that shows them. */
5296
+ header?: boolean;
5297
+ /** `checkout: 'hosted'` only: the order is paid and the tickets are issued. */
5298
+ onOrderConfirmed?: (order: CheckoutOrderStatus) => void;
5238
5299
  buyerAccessTokenProvider?: BuyerAccessTokenProvider;
5239
5300
  buyerAccessToken?: string | BuyerAccessToken;
5240
5301
  maxSelection?: number;
@@ -5329,7 +5390,12 @@ declare class PerformanceGroupPicker {
5329
5390
  private switchingMode;
5330
5391
  /** Latched at the first `booked`, so the callback and the copy fire once. */
5331
5392
  private booked;
5393
+ private readonly hosted;
5394
+ /** The anonymous session's real refusal, carried past `provider_failed`. */
5395
+ private refusal;
5332
5396
  constructor(options: PerformanceGroupPickerOptions);
5397
+ /** Who takes the money: `'hosted'` only once render() confirmed SeatLayer does. */
5398
+ get checkoutMode(): 'handoff' | 'hosted';
5333
5399
  /**
5334
5400
  * The mode the buyer is ACTUALLY in.
5335
5401
  *
@@ -5720,6 +5786,14 @@ interface SeasonPickerOptions {
5720
5786
  realtimePollMs?: number;
5721
5787
  fetch?: typeof fetch;
5722
5788
  offer?: SeasonOfferPresentation;
5789
+ /**
5790
+ * Show the picker's own season header: name, venue chips, package prices
5791
+ * and dates. Defaults to true. Set it to false when the host page already
5792
+ * shows those facts, so the buyer does not read them twice; the picker then
5793
+ * starts at its step bar. The offer and benefits live in that header, so
5794
+ * `offer` has no visible effect while it is hidden.
5795
+ */
5796
+ header?: boolean;
5723
5797
  maxSelection?: number;
5724
5798
  selectedObjects?: string[];
5725
5799
  selectableObjects?: string[] | null;
package/dist/index.d.ts CHANGED
@@ -633,9 +633,22 @@ declare class ApiError extends Error {
633
633
  * contention. Absent when the server said nothing; never inferred here.
634
634
  */
635
635
  retryable?: boolean;
636
+ /**
637
+ * Why a 404 happened when the key itself shows it (`api_key_as_event_key`,
638
+ * `secret_key_as_event_key`, `example_event_key`): an API key or the docs'
639
+ * example pasted where the event key goes. Absent otherwise.
640
+ */
641
+ hint?: string;
642
+ /**
643
+ * The API's plain-language explanation for the developer, when it sent one.
644
+ * Not buyer copy: `message` stays the machine code callers already compare.
645
+ */
646
+ serverMessage?: string;
636
647
  constructor(status: number, message: string, code?: string, conflicts?: HoldConflict[], reason?: string, retryAfterS?: number, notice?: string, details?: {
637
648
  fields?: BookingFormFieldError[];
638
649
  retryable?: boolean;
650
+ hint?: string;
651
+ serverMessage?: string;
639
652
  });
640
653
  }
641
654
  interface HoldResult {
@@ -822,6 +835,13 @@ interface GaPromptTier {
822
835
  */
823
836
  interface GAPromptRequest {
824
837
  area: PickerGAArea;
838
+ /**
839
+ * How the area sells: absent = per person; 'whole' = one party takes the
840
+ * whole area (min = max = its guests); 'variable' = one party picks a size in
841
+ * min–max. A box is ONE booking at ONE ticket type: confirm with a number, or
842
+ * a record naming a single tier.
843
+ */
844
+ bookingMode?: 'whole' | 'variable';
825
845
  /** Quantities already chosen here, per tier id (`''` for an untiered area). */
826
846
  selected: Record<string, number>;
827
847
  min: number;
@@ -857,10 +877,21 @@ interface GaPromptPicker {
857
877
  /** Tickets in the order right now, held + selected seats + every GA quantity. */
858
878
  totalTicketCount(): number;
859
879
  onGAPromptHook?: ((prompt: GAPromptRequest) => boolean | void) | undefined;
880
+ /** The buyer's access filter: with wheelchair on, an area offers only its wheelchair places. */
881
+ controller?: {
882
+ getAccessibilityFilter?(): readonly string[] | null;
883
+ };
860
884
  }
861
885
 
862
886
  type SeatingChartBuyerView = 'map' | 'venue3d';
887
+ /** The pinned drag action a host can read back (native state decoders know these two). */
863
888
  type SeatingChartNavigationMode = 'orbit' | 'pan';
889
+ /**
890
+ * What a host may ask a plain drag to do in 3D. `auto`, the default, turns the
891
+ * venue at the overview and moves the camera once the buyer has zoomed in;
892
+ * `orbit` and `pan` pin one action (a host's own Rotate / Move buttons).
893
+ */
894
+ type SeatingChartNavigationRequest = SeatingChartNavigationMode | 'auto';
864
895
  /** What the 2D seat-view panorama is showing, and what it would say about it. */
865
896
  interface SeatingChartSeatViewInfo {
866
897
  seatId: string;
@@ -2454,6 +2485,12 @@ declare class SeatingChart {
2454
2485
  setPricing(pricing: {
2455
2486
  prices?: HostPrices;
2456
2487
  } | undefined): void;
2488
+ /**
2489
+ * The host's prices in the map's shape, so the seat hover card and the
2490
+ * canvas labels print what the host charges, not the chart's own price.
2491
+ * Undefined without host prices: the map then uses the chart's.
2492
+ */
2493
+ private hostPriceRanges;
2457
2494
  /** Toggle colorblind-safe rendering at runtime (see options.colorblindSafe). */
2458
2495
  setColorblindSafe(on: boolean): void;
2459
2496
  /** Switch the 2D canvas projection.
@@ -2509,8 +2546,9 @@ declare class SeatingChart {
2509
2546
  getBuyerView(): SeatingChartBuyerView;
2510
2547
  /** Open an authored or chart-derived 360° view for one physical seat. */
2511
2548
  openSeatView(seatId: string): Promise<void>;
2512
- /** Explicit Rotate / Move control for native and custom picker chrome. */
2513
- setVenue3DNavigationMode(mode: SeatingChartNavigationMode): void;
2549
+ /** Explicit Rotate / Move control for native and custom picker chrome;
2550
+ * `auto` (the default) turns at the overview and moves once zoomed in. */
2551
+ setVenue3DNavigationMode(mode: SeatingChartNavigationRequest): void;
2514
2552
  /**
2515
2553
  * Enable or suppress all buyer input inside this chart without unmounting it.
2516
2554
  *
@@ -4583,7 +4621,15 @@ declare class SeatPicker implements GaPromptPicker {
4583
4621
  /** The read itself. Never rejects — see the catch. */
4584
4622
  private readOfferAvailability;
4585
4623
  /** @internal */ offerPrice(categoryKey: string | undefined, tierId?: string | null): TicketOfferPrice | null;
4586
- /** Keep authored regular prices out of canvas labels during matrix offers. */
4624
+ /**
4625
+ * Keep authored regular prices out of canvas labels during matrix offers,
4626
+ * and out of them whenever the host prices the event itself.
4627
+ *
4628
+ * Left undefined, the map prints the chart's own category prices. A host
4629
+ * that charges from its own catalogue (`pricing.prices`) then saw one price
4630
+ * in the list and another on the seat's hover card: DKK 411 against DKK 55 on
4631
+ * a DesiPass event (2026-09-25). The map now takes the list's answer.
4632
+ */
4587
4633
  private mapPriceRanges;
4588
4634
  private syncMapPriceRanges;
4589
4635
  private applyChannelPricing;
@@ -5210,7 +5256,8 @@ interface PerformanceGroupCheckoutHandoff {
5210
5256
  }
5211
5257
  /** What the wrapper is showing the buyer right now, for host telemetry. */
5212
5258
  interface PerformanceGroupStatusEvent {
5213
- kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed';
5259
+ /** `checkout`: the hosted checkout could not start; the seats stay held. */
5260
+ kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout';
5214
5261
  message: string;
5215
5262
  /** The short operation reference from §12, when one applies. */
5216
5263
  reference?: string;
@@ -5235,6 +5282,20 @@ interface PerformanceGroupPickerOptions {
5235
5282
  */
5236
5283
  allowSelectionModeSwitch?: boolean;
5237
5284
  apiBase?: string;
5285
+ /**
5286
+ * `'hosted'`: SeatLayer takes the money through the organizer's gateway (a
5287
+ * same-seat run only) and {@link onCheckout} still fires. Default
5288
+ * `'handoff'`. A run whose checkout the organizer's backend owns stays on
5289
+ * the handoff. With no buyer token, the picker mints an anonymous
5290
+ * public-sale session itself.
5291
+ */
5292
+ checkout?: 'handoff' | 'hosted';
5293
+ /** Where a redirecting gateway returns to. Only a declared origin is kept. */
5294
+ returnUrl?: string;
5295
+ /** Default true. False hides the run's name, summary and dates, for a host page that shows them. */
5296
+ header?: boolean;
5297
+ /** `checkout: 'hosted'` only: the order is paid and the tickets are issued. */
5298
+ onOrderConfirmed?: (order: CheckoutOrderStatus) => void;
5238
5299
  buyerAccessTokenProvider?: BuyerAccessTokenProvider;
5239
5300
  buyerAccessToken?: string | BuyerAccessToken;
5240
5301
  maxSelection?: number;
@@ -5329,7 +5390,12 @@ declare class PerformanceGroupPicker {
5329
5390
  private switchingMode;
5330
5391
  /** Latched at the first `booked`, so the callback and the copy fire once. */
5331
5392
  private booked;
5393
+ private readonly hosted;
5394
+ /** The anonymous session's real refusal, carried past `provider_failed`. */
5395
+ private refusal;
5332
5396
  constructor(options: PerformanceGroupPickerOptions);
5397
+ /** Who takes the money: `'hosted'` only once render() confirmed SeatLayer does. */
5398
+ get checkoutMode(): 'handoff' | 'hosted';
5333
5399
  /**
5334
5400
  * The mode the buyer is ACTUALLY in.
5335
5401
  *
@@ -5720,6 +5786,14 @@ interface SeasonPickerOptions {
5720
5786
  realtimePollMs?: number;
5721
5787
  fetch?: typeof fetch;
5722
5788
  offer?: SeasonOfferPresentation;
5789
+ /**
5790
+ * Show the picker's own season header: name, venue chips, package prices
5791
+ * and dates. Defaults to true. Set it to false when the host page already
5792
+ * shows those facts, so the buyer does not read them twice; the picker then
5793
+ * starts at its step bar. The offer and benefits live in that header, so
5794
+ * `offer` has no visible effect while it is hidden.
5795
+ */
5796
+ header?: boolean;
5723
5797
  maxSelection?: number;
5724
5798
  selectedObjects?: string[];
5725
5799
  selectableObjects?: string[] | null;