@seatlayer/js 0.101.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/{chunk-URLBBOTJ.js → chunk-WFAVFYCD.js} +1 -1
- package/dist/{hostedCheckout-4BFFNCCU.js → hostedCheckout-XSQ7ISQC.js} +56 -17
- package/dist/index.cjs +196 -74
- package/dist/index.d.cts +53 -1
- package/dist/index.d.ts +53 -1
- package/dist/index.js +141 -58
- package/dist/manager.js +1 -1
- package/package.json +2 -2
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,6 +877,10 @@ 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';
|
|
@@ -5232,7 +5256,8 @@ interface PerformanceGroupCheckoutHandoff {
|
|
|
5232
5256
|
}
|
|
5233
5257
|
/** What the wrapper is showing the buyer right now, for host telemetry. */
|
|
5234
5258
|
interface PerformanceGroupStatusEvent {
|
|
5235
|
-
|
|
5259
|
+
/** `checkout`: the hosted checkout could not start; the seats stay held. */
|
|
5260
|
+
kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout';
|
|
5236
5261
|
message: string;
|
|
5237
5262
|
/** The short operation reference from §12, when one applies. */
|
|
5238
5263
|
reference?: string;
|
|
@@ -5257,6 +5282,20 @@ interface PerformanceGroupPickerOptions {
|
|
|
5257
5282
|
*/
|
|
5258
5283
|
allowSelectionModeSwitch?: boolean;
|
|
5259
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;
|
|
5260
5299
|
buyerAccessTokenProvider?: BuyerAccessTokenProvider;
|
|
5261
5300
|
buyerAccessToken?: string | BuyerAccessToken;
|
|
5262
5301
|
maxSelection?: number;
|
|
@@ -5351,7 +5390,12 @@ declare class PerformanceGroupPicker {
|
|
|
5351
5390
|
private switchingMode;
|
|
5352
5391
|
/** Latched at the first `booked`, so the callback and the copy fire once. */
|
|
5353
5392
|
private booked;
|
|
5393
|
+
private readonly hosted;
|
|
5394
|
+
/** The anonymous session's real refusal, carried past `provider_failed`. */
|
|
5395
|
+
private refusal;
|
|
5354
5396
|
constructor(options: PerformanceGroupPickerOptions);
|
|
5397
|
+
/** Who takes the money: `'hosted'` only once render() confirmed SeatLayer does. */
|
|
5398
|
+
get checkoutMode(): 'handoff' | 'hosted';
|
|
5355
5399
|
/**
|
|
5356
5400
|
* The mode the buyer is ACTUALLY in.
|
|
5357
5401
|
*
|
|
@@ -5742,6 +5786,14 @@ interface SeasonPickerOptions {
|
|
|
5742
5786
|
realtimePollMs?: number;
|
|
5743
5787
|
fetch?: typeof fetch;
|
|
5744
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;
|
|
5745
5797
|
maxSelection?: number;
|
|
5746
5798
|
selectedObjects?: string[];
|
|
5747
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,6 +877,10 @@ 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';
|
|
@@ -5232,7 +5256,8 @@ interface PerformanceGroupCheckoutHandoff {
|
|
|
5232
5256
|
}
|
|
5233
5257
|
/** What the wrapper is showing the buyer right now, for host telemetry. */
|
|
5234
5258
|
interface PerformanceGroupStatusEvent {
|
|
5235
|
-
|
|
5259
|
+
/** `checkout`: the hosted checkout could not start; the seats stay held. */
|
|
5260
|
+
kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout';
|
|
5236
5261
|
message: string;
|
|
5237
5262
|
/** The short operation reference from §12, when one applies. */
|
|
5238
5263
|
reference?: string;
|
|
@@ -5257,6 +5282,20 @@ interface PerformanceGroupPickerOptions {
|
|
|
5257
5282
|
*/
|
|
5258
5283
|
allowSelectionModeSwitch?: boolean;
|
|
5259
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;
|
|
5260
5299
|
buyerAccessTokenProvider?: BuyerAccessTokenProvider;
|
|
5261
5300
|
buyerAccessToken?: string | BuyerAccessToken;
|
|
5262
5301
|
maxSelection?: number;
|
|
@@ -5351,7 +5390,12 @@ declare class PerformanceGroupPicker {
|
|
|
5351
5390
|
private switchingMode;
|
|
5352
5391
|
/** Latched at the first `booked`, so the callback and the copy fire once. */
|
|
5353
5392
|
private booked;
|
|
5393
|
+
private readonly hosted;
|
|
5394
|
+
/** The anonymous session's real refusal, carried past `provider_failed`. */
|
|
5395
|
+
private refusal;
|
|
5354
5396
|
constructor(options: PerformanceGroupPickerOptions);
|
|
5397
|
+
/** Who takes the money: `'hosted'` only once render() confirmed SeatLayer does. */
|
|
5398
|
+
get checkoutMode(): 'handoff' | 'hosted';
|
|
5355
5399
|
/**
|
|
5356
5400
|
* The mode the buyer is ACTUALLY in.
|
|
5357
5401
|
*
|
|
@@ -5742,6 +5786,14 @@ interface SeasonPickerOptions {
|
|
|
5742
5786
|
realtimePollMs?: number;
|
|
5743
5787
|
fetch?: typeof fetch;
|
|
5744
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;
|
|
5745
5797
|
maxSelection?: number;
|
|
5746
5798
|
selectedObjects?: string[];
|
|
5747
5799
|
selectableObjects?: string[] | null;
|