@getmicdrop/venue-calendar 4.3.120 → 4.3.121
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/{AddOnCard-BGFpF6uw.js → AddOnCard-jj59e855.js} +5 -5
- package/dist/{ArrowLeftIcon-pPaJkbnp.js → ArrowLeftIcon-t-CY0sbi.js} +1 -1
- package/dist/{BlockPlaceholder-BgLtwJnm.js → BlockPlaceholder-BmEZ68_q.js} +1 -1
- package/dist/{Calendar-DFPyzgRC.js → Calendar-hxcQBkTF.js} +3 -3
- package/dist/{CalendarFoundryView-BI_LlpB6.js → CalendarFoundryView-CSAKDe-F.js} +19 -19
- package/dist/{CalendarIcon-C_6MSRyE.js → CalendarIcon-B5JWs0gm.js} +1 -1
- package/dist/{CartView-9YSoRvTw.js → CartView-CF2y1JDa.js} +719 -716
- package/dist/{CheckIcon-sr8D0z-b.js → CheckIcon-BSwoGox7.js} +1 -1
- package/dist/{Checkout-BLkYIKoR.js → Checkout-2h2K3-bE.js} +378 -378
- package/dist/{Checkout-BS3r4Qii.js → Checkout-BFu5dTw_.js} +328 -328
- package/dist/{CheckoutTimer-DY1NKJXP.js → CheckoutTimer-Bpt5gPyA.js} +2 -2
- package/dist/{ChevronDownIcon-Co6rRQp-.js → ChevronDownIcon-CVZ0usBx.js} +1 -1
- package/dist/{CloseIcon-DpRE5O8y.js → CloseIcon-DUnvWXUY.js} +1 -1
- package/dist/CollectionView-XdNMvMtn.js +141 -0
- package/dist/{Event-DUq4tYBE.js → Event-B_9T21du.js} +684 -680
- package/dist/EventPage-BMnKpciU.js +1201 -0
- package/dist/{Input-CsHb9Z8e.js → Input-BXZmvQ0p.js} +1 -1
- package/dist/{LocationIcon-Dxk7snUC.js → LocationIcon-E-7CQh4E.js} +1 -1
- package/dist/{PasswordInput-BlL0w_yr.js → PasswordInput-DzXNIwRc.js} +1 -1
- package/dist/{RecommendationsRail-Dq9t0T02.js → RecommendationsRail-DrzM8h2r.js} +124 -124
- package/dist/{ScarcityBadge-Bj_YMxz4.js → ScarcityBadge-DjzrzvId.js} +4 -4
- package/dist/{SeriesPage-CaPTQRSo.js → SeriesPage-Ds_FEEZW.js} +2 -2
- package/dist/{Spinner-BgdjQygI.js → Spinner-B2rdbspc.js} +1 -1
- package/dist/{Success-tXgS0BXp.js → Success-Dkak0iM9.js} +201 -201
- package/dist/{TagIcon-Kq7_bapx.js → TagIcon-BY8tK_qA.js} +1 -1
- package/dist/ViewTicketsEmbed-B_fqalQh.js +660 -0
- package/dist/{WarningCircleIcon-BdbAYYi4.js → WarningCircleIcon-C5Lc7qkF.js} +1 -1
- package/dist/{WarningTriIcon-D8otatZe.js → WarningTriIcon-BM8qc9xx.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +258 -252
- package/dist/api/cart-addons.d.ts +2 -1
- package/dist/api/checkout-availability.d.ts +2 -25
- package/dist/api/client.d.ts +4 -7
- package/dist/api/events.d.ts +23 -22
- package/dist/api/gift-cards.d.ts +7 -6
- package/dist/api/orders.d.ts +13 -12
- package/dist/api/promo.d.ts +5 -4
- package/dist/api/surge-queue.d.ts +5 -34
- package/dist/api/venues.d.ts +5 -4
- package/dist/api/waitlist.d.ts +5 -9
- package/dist/{api-DG7ztpYi.js → api-BEYkGabB.js} +174 -169
- package/dist/{copyToClipboard-DSangJpP.js → copyToClipboard-F-akSgaF.js} +1 -1
- package/dist/{createErrorGate.svelte-CEBpRAmr.js → createErrorGate.svelte-CEGaIQeI.js} +1 -1
- package/dist/{datetime-YTw6PkGP.js → datetime-BnKG6Hjm.js} +1 -1
- package/dist/{de-CbwqVvg6.js → de-BHcAXwnM.js} +0 -1
- package/dist/{defaultLabels-CsRGNP7f.js → defaultLabels-BbNEEsF7.js} +0 -1
- package/dist/{defaults-UDvnrGu0.js → defaults-CgsFJvJ2.js} +2 -2
- package/dist/{es-Dxqulvec.js → es-DZ3yceh-.js} +0 -1
- package/dist/{event-CW18bU9h.js → event-DfqUhl5j.js} +1 -1
- package/dist/{event-transform-CyRMeKW_.js → event-transform-Bk1IoYh5.js} +4 -4
- package/dist/{eventStatusStream-Cf7PaLka.js → eventStatusStream-CE0PwO0c.js} +9 -9
- package/dist/{fr-0aCE52FE.js → fr-Dyi163Vk.js} +0 -1
- package/dist/{href-yqxAPbkW.js → href-CfWGAmkP.js} +3 -3
- package/dist/i18n-B705OXZp.js +28 -0
- package/dist/{i18n-MF3q-UBI.js → i18n-BoMUWcCq.js} +4 -4
- package/dist/{id-7ClY2Dwb.js → id-DvFRZVAm.js} +0 -1
- package/dist/{it-z-heX6Hy.js → it-Bh05tcLv.js} +0 -1
- package/dist/{ja-ecBzr5l9.js → ja-CU4PQS4j.js} +0 -1
- package/dist/{ko-Blnq1Wc_.js → ko-DDk6EdWm.js} +0 -1
- package/dist/locales/4.3.121/main/de.js +1 -0
- package/dist/locales/4.3.121/main/es.js +1 -0
- package/dist/locales/4.3.121/main/fr.js +1 -0
- package/dist/locales/4.3.121/main/id.js +1 -0
- package/dist/locales/4.3.121/main/it.js +1 -0
- package/dist/locales/4.3.121/main/ja.js +1 -0
- package/dist/locales/4.3.121/main/ko.js +1 -0
- package/dist/locales/4.3.121/main/nl.js +1 -0
- package/dist/locales/4.3.121/main/pl.js +1 -0
- package/dist/locales/4.3.121/main/pt-br.js +1 -0
- package/dist/locales/4.3.121/main/tr.js +1 -0
- package/dist/locales/4.3.121/main/zh.js +1 -0
- package/dist/{nl-Bm2Lee3j.js → nl-DOSKYHSx.js} +0 -1
- package/dist/{pixels-BAPQbj_Y.js → pixels-Bu5-BISs.js} +8 -8
- package/dist/{pl-DIp-gYhF.js → pl-CkLEymA2.js} +0 -1
- package/dist/{pt-br-BmcVsgbQ.js → pt-br-BHuCQSM-.js} +0 -1
- package/dist/{serverTotals-D57U4Nju.js → serverTotals-B8SJCzxE.js} +1 -1
- package/dist/{showcase-state-options-zfQoPg37.js → showcase-state-options-KO_TYk3I.js} +1 -1
- package/dist/{to-event-card-props-Dn1eDOiJ.js → to-event-card-props-DYIfPN8e.js} +9 -13
- package/dist/{tr-BshxS2DN.js → tr-Bvc34ODh.js} +0 -1
- package/dist/{utils-CdNe7KGe.js → utils-NMx3aPDk.js} +82 -78
- package/dist/venue-calendar.es.js +1444 -1444
- package/dist/venue-calendar.iife.js +30 -30
- package/dist/venue-calendar.umd.js +39 -39
- package/dist/{orders-BWVwv3P0.js → widget-key-context-D2zj4sp5.js} +221 -213
- package/dist/{zh-B06ZsUNX.js → zh-K0hOzZ3G.js} +0 -1
- package/package.json +1 -1
- package/dist/CollectionView-DyFDlCmo.js +0 -138
- package/dist/EventPage-m5SlifRu.js +0 -1200
- package/dist/ViewTicketsEmbed-BnuypZ1H.js +0 -660
- package/dist/i18n-B-AwhAMH.js +0 -28
- package/dist/locales/4.3.120/main/de.js +0 -1
- package/dist/locales/4.3.120/main/es.js +0 -1
- package/dist/locales/4.3.120/main/fr.js +0 -1
- package/dist/locales/4.3.120/main/id.js +0 -1
- package/dist/locales/4.3.120/main/it.js +0 -1
- package/dist/locales/4.3.120/main/ja.js +0 -1
- package/dist/locales/4.3.120/main/ko.js +0 -1
- package/dist/locales/4.3.120/main/nl.js +0 -1
- package/dist/locales/4.3.120/main/pl.js +0 -1
- package/dist/locales/4.3.120/main/pt-br.js +0 -1
- package/dist/locales/4.3.120/main/tr.js +0 -1
- package/dist/locales/4.3.120/main/zh.js +0 -1
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/de.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/es.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/id.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/it.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.120 → 4.3.121}/flow/zh.js +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
1
2
|
/**
|
|
2
3
|
* ADD-ONS ON A CART THAT IS ALREADY BEING PAID FOR (MIC-4326).
|
|
3
4
|
*
|
|
@@ -58,4 +59,4 @@ export interface CartAddOnsResult {
|
|
|
58
59
|
*
|
|
59
60
|
* An EMPTY map removes every add-on; there is no separate delete call.
|
|
60
61
|
*/
|
|
61
|
-
export declare function updateCartAddOns(cartId: string, quantities: Record<string | number, number>): Promise<CartAddOnsResult>;
|
|
62
|
+
export declare function updateCartAddOns(cartId: string, quantities: Record<string | number, number>, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CartAddOnsResult>;
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Can this page complete a purchase?
|
|
3
|
-
*
|
|
4
|
-
* WHY THIS EXISTS (embed audit 2026-08-22, blocker B1)
|
|
5
|
-
*
|
|
6
|
-
* The buy path is gated on the `cors_allowed_domains` allowlist: a venue that
|
|
7
|
-
* embeds the calendar on its own website must have that domain registered, or
|
|
8
|
-
* every cart/promo/gift-card/payment call is refused. Before this module the
|
|
9
|
-
* failure was invisible until a buyer had already chosen a ticket — the
|
|
10
|
-
* calendar rendered perfectly, and the dead end was a disabled CTA three
|
|
11
|
-
* screens in. This asks the question up front so the calendar can say so.
|
|
12
|
-
*
|
|
13
|
-
* The probe is deliberately conservative in three ways:
|
|
14
|
-
*
|
|
15
|
-
* 1. It only runs CROSS-ORIGIN. On get-micdrop.com's own pages — the large
|
|
16
|
-
* majority of traffic — the allowlist is not in play and no request is made.
|
|
17
|
-
* 2. It runs ONCE per browser session per origin, memoized in-module (so N
|
|
18
|
-
* widgets on one page share one request) and in sessionStorage (so it
|
|
19
|
-
* survives navigation around the venue's site).
|
|
20
|
-
* 3. Only an explicit `ORIGIN_NOT_REGISTERED` counts as unavailable. A 429, a
|
|
21
|
-
* 5xx, a timeout, an offline browser — anything that merely failed to
|
|
22
|
-
* answer — resolves to `unknown`, which renders nothing. An alert that
|
|
23
|
-
* appears during an unrelated outage would be worse than no alert.
|
|
24
|
-
*/
|
|
1
|
+
import { ApiRequestOptions } from './client';
|
|
25
2
|
/** The backend code that means "this domain is not registered for checkout". */
|
|
26
3
|
export declare const ORIGIN_NOT_REGISTERED = "ORIGIN_NOT_REGISTERED";
|
|
27
4
|
export type CheckoutAvailabilityReason =
|
|
@@ -66,7 +43,7 @@ export declare function noteCheckoutOriginRejected(): void;
|
|
|
66
43
|
* Safe to call from every widget instance on the page: the first call owns the
|
|
67
44
|
* request and the rest await it.
|
|
68
45
|
*/
|
|
69
|
-
export declare function probeCheckoutAvailability(): Promise<CheckoutAvailability>;
|
|
46
|
+
export declare function probeCheckoutAvailability(req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CheckoutAvailability>;
|
|
70
47
|
/**
|
|
71
48
|
* Test seam: forget the memo, the cache and the subscribers.
|
|
72
49
|
* @internal test-only reset of the module cache.
|
package/dist/api/client.d.ts
CHANGED
|
@@ -15,13 +15,9 @@ export interface ApiRequestOptions extends RequestInit {
|
|
|
15
15
|
* here so each instance authorizes with its own. The option name is FROZEN
|
|
16
16
|
* as `widgetKey` — VenueCalendar.js passes it under that name.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* it back down as `apiGet(url, { widgetKey })`, the module global is still
|
|
22
|
-
* what authorizes them and two differently-keyed embeds on one page still
|
|
23
|
-
* collapse into one key. The TODO in VenueCalendar.js that points HERE is
|
|
24
|
-
* discharged; the one pointing outward is not.
|
|
18
|
+
* Components read their mount's key with getInstanceWidgetKey()
|
|
19
|
+
* (widget-key-context.ts) at init and pass it down as `{ widgetKey }`; on
|
|
20
|
+
* the hosted routes there is no mount key and the module global applies.
|
|
25
21
|
*/
|
|
26
22
|
widgetKey?: string;
|
|
27
23
|
/**
|
|
@@ -171,6 +167,7 @@ export interface TaxPreviewResponse {
|
|
|
171
167
|
export declare function taxPreview(req: TaxPreviewRequest, options?: {
|
|
172
168
|
signal?: AbortSignal;
|
|
173
169
|
suppressOnError?: boolean;
|
|
170
|
+
widgetKey?: string;
|
|
174
171
|
}): Promise<ApiResult<TaxPreviewResponse>>;
|
|
175
172
|
/**
|
|
176
173
|
* Simple fetch wrapper that returns parsed JSON or null on error.
|
package/dist/api/events.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
1
2
|
import { Result } from './result.js';
|
|
2
3
|
import { Event, AvailableTicket, EventPerformersResponse, SeriesOccurrencesResponse, PublicCollectionData, ResolvedEntity } from './types.js';
|
|
3
4
|
/**
|
|
@@ -13,7 +14,7 @@ import { Event, AvailableTicket, EventPerformersResponse, SeriesOccurrencesRespo
|
|
|
13
14
|
* @param password - Optional password for gated events
|
|
14
15
|
* @returns `ok(event)`, `errNotFound(...)` for a real 404, or `err(...)` transient
|
|
15
16
|
*/
|
|
16
|
-
export declare function fetchEventDetailsResult(eventId: string | number, customFetch?: typeof fetch, password?: string): Promise<Result<Event>>;
|
|
17
|
+
export declare function fetchEventDetailsResult(eventId: string | number, customFetch?: typeof fetch, password?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<Event>>;
|
|
17
18
|
/**
|
|
18
19
|
* Fetch event details
|
|
19
20
|
*
|
|
@@ -27,7 +28,7 @@ export declare function fetchEventDetailsResult(eventId: string | number, custom
|
|
|
27
28
|
* @param customFetch - Optional custom fetch function (for SSR)
|
|
28
29
|
* @returns Event details or null on error
|
|
29
30
|
*/
|
|
30
|
-
export declare function fetchEventDetails(eventId: string | number, customFetch?: typeof fetch, password?: string): Promise<Event | null>;
|
|
31
|
+
export declare function fetchEventDetails(eventId: string | number, customFetch?: typeof fetch, password?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Event | null>;
|
|
31
32
|
/**
|
|
32
33
|
* Fetch available tickets for an event
|
|
33
34
|
*
|
|
@@ -36,8 +37,8 @@ export declare function fetchEventDetails(eventId: string | number, customFetch?
|
|
|
36
37
|
* @param eventId - The event ID
|
|
37
38
|
* @returns Array of available tickets
|
|
38
39
|
*/
|
|
39
|
-
export declare function fetchEventTicketsResult(eventId: string | number, promoCode?: string): Promise<Result<AvailableTicket[]>>;
|
|
40
|
-
export declare function fetchEventTickets(eventId: string | number, promoCode?: string): Promise<AvailableTicket[]>;
|
|
40
|
+
export declare function fetchEventTicketsResult(eventId: string | number, promoCode?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<AvailableTicket[]>>;
|
|
41
|
+
export declare function fetchEventTickets(eventId: string | number, promoCode?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<AvailableTicket[]>;
|
|
41
42
|
/**
|
|
42
43
|
* Fetch performers for an event
|
|
43
44
|
*
|
|
@@ -46,24 +47,24 @@ export declare function fetchEventTickets(eventId: string | number, promoCode?:
|
|
|
46
47
|
* @param eventId - The event ID
|
|
47
48
|
* @returns Performers list and visibility flag
|
|
48
49
|
*/
|
|
49
|
-
export declare function fetchEventPerformersResult(eventId: string | number): Promise<Result<EventPerformersResponse>>;
|
|
50
|
-
export declare function fetchEventPerformers(eventId: string | number): Promise<EventPerformersResponse>;
|
|
50
|
+
export declare function fetchEventPerformersResult(eventId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<EventPerformersResponse>>;
|
|
51
|
+
export declare function fetchEventPerformers(eventId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<EventPerformersResponse>;
|
|
51
52
|
/**
|
|
52
53
|
* Fetch all venues for an organization
|
|
53
54
|
*
|
|
54
55
|
* @param orgId - The organization ID
|
|
55
56
|
* @returns Array of venues
|
|
56
57
|
*/
|
|
57
|
-
export declare function fetchAllVenuesResult(orgId: string | number): Promise<Result<any[]>>;
|
|
58
|
-
export declare function fetchAllVenues(orgId: string | number): Promise<any[]>;
|
|
58
|
+
export declare function fetchAllVenuesResult(orgId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<any[]>>;
|
|
59
|
+
export declare function fetchAllVenues(orgId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<any[]>;
|
|
59
60
|
/**
|
|
60
61
|
* Fetch events for a venue
|
|
61
62
|
*
|
|
62
63
|
* @param venueId - The venue ID
|
|
63
64
|
* @returns Array of events
|
|
64
65
|
*/
|
|
65
|
-
export declare function fetchVenueEventsResult(venueId: string | number): Promise<Result<Event[]>>;
|
|
66
|
-
export declare function fetchVenueEvents(venueId: string | number): Promise<Event[]>;
|
|
66
|
+
export declare function fetchVenueEventsResult(venueId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<Event[]>>;
|
|
67
|
+
export declare function fetchVenueEvents(venueId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Event[]>;
|
|
67
68
|
/**
|
|
68
69
|
* Options for a month read.
|
|
69
70
|
*
|
|
@@ -83,8 +84,8 @@ export declare function fetchVenueEvents(venueId: string | number): Promise<Even
|
|
|
83
84
|
export interface MonthReadOptions {
|
|
84
85
|
fresh?: boolean;
|
|
85
86
|
}
|
|
86
|
-
export declare function getMonthEventsResult(venueId: string | number, year: number, month: number, options?: MonthReadOptions): Promise<Result<Event[]>>;
|
|
87
|
-
export declare function getMonthEvents(venueId: string | number, year: number, month: number): Promise<Event[]>;
|
|
87
|
+
export declare function getMonthEventsResult(venueId: string | number, year: number, month: number, options?: MonthReadOptions, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<Event[]>>;
|
|
88
|
+
export declare function getMonthEvents(venueId: string | number, year: number, month: number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Event[]>;
|
|
88
89
|
/**
|
|
89
90
|
* Get events for an organization for a specific month
|
|
90
91
|
*
|
|
@@ -93,8 +94,8 @@ export declare function getMonthEvents(venueId: string | number, year: number, m
|
|
|
93
94
|
* @param month - The month (1-12)
|
|
94
95
|
* @returns Array of events for the month
|
|
95
96
|
*/
|
|
96
|
-
export declare function getOrgMonthEventsResult(orgId: string | number, year: number, month: number, options?: MonthReadOptions): Promise<Result<Event[]>>;
|
|
97
|
-
export declare function getOrgMonthEvents(orgId: string | number, year: number, month: number): Promise<Event[]>;
|
|
97
|
+
export declare function getOrgMonthEventsResult(orgId: string | number, year: number, month: number, options?: MonthReadOptions, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<Event[]>>;
|
|
98
|
+
export declare function getOrgMonthEvents(orgId: string | number, year: number, month: number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Event[]>;
|
|
98
99
|
/**
|
|
99
100
|
* Get series occurrences for date selector
|
|
100
101
|
*
|
|
@@ -103,8 +104,8 @@ export declare function getOrgMonthEvents(orgId: string | number, year: number,
|
|
|
103
104
|
* @param eventSeriesId - The series ID
|
|
104
105
|
* @returns Series occurrences
|
|
105
106
|
*/
|
|
106
|
-
export declare function getSeriesOccurrencesResult(eventSeriesId: number): Promise<Result<SeriesOccurrencesResponse>>;
|
|
107
|
-
export declare function getSeriesOccurrences(eventSeriesId: number): Promise<SeriesOccurrencesResponse | null>;
|
|
107
|
+
export declare function getSeriesOccurrencesResult(eventSeriesId: number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<SeriesOccurrencesResponse>>;
|
|
108
|
+
export declare function getSeriesOccurrences(eventSeriesId: number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<SeriesOccurrencesResponse | null>;
|
|
108
109
|
/**
|
|
109
110
|
* Fetch series occurrences with CTA state
|
|
110
111
|
*
|
|
@@ -114,8 +115,8 @@ export declare function getSeriesOccurrences(eventSeriesId: number): Promise<Ser
|
|
|
114
115
|
* @param venueId - The venue ID
|
|
115
116
|
* @returns Series occurrences with CTA state
|
|
116
117
|
*/
|
|
117
|
-
export declare function fetchSeriesOccurrencesResult(eventSeriesId: number, venueId: string | number): Promise<Result<SeriesOccurrencesResponse>>;
|
|
118
|
-
export declare function fetchSeriesOccurrences(eventSeriesId: number, venueId: string | number): Promise<SeriesOccurrencesResponse | null>;
|
|
118
|
+
export declare function fetchSeriesOccurrencesResult(eventSeriesId: number, venueId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<SeriesOccurrencesResponse>>;
|
|
119
|
+
export declare function fetchSeriesOccurrences(eventSeriesId: number, venueId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<SeriesOccurrencesResponse | null>;
|
|
119
120
|
/**
|
|
120
121
|
* Resolve an entity-agnostic public id to its concrete type + data.
|
|
121
122
|
*
|
|
@@ -131,7 +132,7 @@ export declare function fetchSeriesOccurrences(eventSeriesId: number, venueId: s
|
|
|
131
132
|
* @param slug - Optional slug hint (lets the backend canonicalize)
|
|
132
133
|
* @returns `{ type, id, title, data }` or null on failure
|
|
133
134
|
*/
|
|
134
|
-
export declare function resolvePublicEntity(id: string | number, slug?: string): Promise<ResolvedEntity | null>;
|
|
135
|
+
export declare function resolvePublicEntity(id: string | number, slug?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<ResolvedEntity | null>;
|
|
135
136
|
/**
|
|
136
137
|
* Fetch public collection data
|
|
137
138
|
*
|
|
@@ -142,7 +143,7 @@ export declare function resolvePublicEntity(id: string | number, slug?: string):
|
|
|
142
143
|
* @param password - Optional password for protected collections
|
|
143
144
|
* @returns Collection data or null on error
|
|
144
145
|
*/
|
|
145
|
-
export declare function fetchPublicCollection(collectionId: string | number, password?: string): Promise<PublicCollectionData | null>;
|
|
146
|
+
export declare function fetchPublicCollection(collectionId: string | number, password?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<PublicCollectionData | null>;
|
|
146
147
|
/**
|
|
147
148
|
* Check collection password
|
|
148
149
|
*
|
|
@@ -152,7 +153,7 @@ export declare function fetchPublicCollection(collectionId: string | number, pas
|
|
|
152
153
|
* @param password - The password to check
|
|
153
154
|
* @returns Whether the password is valid
|
|
154
155
|
*/
|
|
155
|
-
export declare function checkCollectionPassword(collectionId: string | number, password: string): Promise<boolean>;
|
|
156
|
+
export declare function checkCollectionPassword(collectionId: string | number, password: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<boolean>;
|
|
156
157
|
/**
|
|
157
158
|
* Check event password
|
|
158
159
|
*
|
|
@@ -162,7 +163,7 @@ export declare function checkCollectionPassword(collectionId: string | number, p
|
|
|
162
163
|
* @param password - The password to check
|
|
163
164
|
* @returns Whether the password is valid
|
|
164
165
|
*/
|
|
165
|
-
export declare function checkEventPassword(eventId: string | number, password: string): Promise<{
|
|
166
|
+
export declare function checkEventPassword(eventId: string | number, password: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<{
|
|
166
167
|
valid: boolean;
|
|
167
168
|
}>;
|
|
168
169
|
/**
|
package/dist/api/gift-cards.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IANATimezone, VenueId } from '@getmicdrop/svelte-components';
|
|
2
|
+
import { ApiRequestOptions } from './client.js';
|
|
2
3
|
import { Result } from './result.js';
|
|
3
4
|
/**
|
|
4
5
|
* Request payload for creating a gift card purchase
|
|
@@ -54,7 +55,7 @@ export interface VenueInfo {
|
|
|
54
55
|
* @param req - Gift card purchase request details
|
|
55
56
|
* @returns Gift card UUID and Stripe client secret, or null on failure
|
|
56
57
|
*/
|
|
57
|
-
export declare function createGiftCardPurchase(req: GiftCardPurchaseRequest): Promise<GiftCardPurchaseResponse | null>;
|
|
58
|
+
export declare function createGiftCardPurchase(req: GiftCardPurchaseRequest, options?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<GiftCardPurchaseResponse | null>;
|
|
58
59
|
/**
|
|
59
60
|
* Result shape consumed by the Checkout component / GiftCardInput.
|
|
60
61
|
* Monetary fields here are in DOLLARS (formatCurrency-ready).
|
|
@@ -73,7 +74,7 @@ export interface ApplyGiftCardResult {
|
|
|
73
74
|
/**
|
|
74
75
|
* Apply a gift card to a cart.
|
|
75
76
|
*/
|
|
76
|
-
export declare function applyGiftCard(cartId: string, code: string): Promise<ApplyGiftCardResult>;
|
|
77
|
+
export declare function applyGiftCard(cartId: string, code: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<ApplyGiftCardResult>;
|
|
77
78
|
export interface RemoveGiftCardResult {
|
|
78
79
|
success: boolean;
|
|
79
80
|
error?: string;
|
|
@@ -92,7 +93,7 @@ export interface RemoveGiftCardResult {
|
|
|
92
93
|
export declare function removeGiftCard(cartId: string, target?: {
|
|
93
94
|
giftCardId?: number;
|
|
94
95
|
code?: string;
|
|
95
|
-
}): Promise<RemoveGiftCardResult>;
|
|
96
|
+
}, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<RemoveGiftCardResult>;
|
|
96
97
|
export interface CompleteGiftCardPaymentInput {
|
|
97
98
|
firstName: string;
|
|
98
99
|
lastName: string;
|
|
@@ -110,7 +111,7 @@ export interface CompleteGiftCardPaymentResult {
|
|
|
110
111
|
/**
|
|
111
112
|
* Complete a gift-card-only payment (no Stripe required when balance >= total).
|
|
112
113
|
*/
|
|
113
|
-
export declare function completeGiftCardPayment(cartId: string, customerDetails: CompleteGiftCardPaymentInput, uiLocale?: string): Promise<CompleteGiftCardPaymentResult>;
|
|
114
|
+
export declare function completeGiftCardPayment(cartId: string, customerDetails: CompleteGiftCardPaymentInput, uiLocale?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CompleteGiftCardPaymentResult>;
|
|
114
115
|
/**
|
|
115
116
|
* Fetch venue information by slug, discriminating a real 404 from a transient
|
|
116
117
|
* failure.
|
|
@@ -124,7 +125,7 @@ export declare function completeGiftCardPayment(cartId: string, customerDetails:
|
|
|
124
125
|
* @param customFetch - Optional custom fetch function (for SSR)
|
|
125
126
|
* @returns `ok(venue)`, `errNotFound(...)` for a real 404, or `err(...)` transient
|
|
126
127
|
*/
|
|
127
|
-
export declare function getVenueBySlugResult(slug: string, customFetch?: typeof fetch): Promise<Result<VenueInfo>>;
|
|
128
|
+
export declare function getVenueBySlugResult(slug: string, customFetch?: typeof fetch, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<VenueInfo>>;
|
|
128
129
|
/**
|
|
129
130
|
* Fetch venue information by slug
|
|
130
131
|
*
|
|
@@ -135,4 +136,4 @@ export declare function getVenueBySlugResult(slug: string, customFetch?: typeof
|
|
|
135
136
|
* @returns Venue info or null on failure
|
|
136
137
|
* @internal no shipped caller left; gift-cards.test.ts is what exercises it.
|
|
137
138
|
*/
|
|
138
|
-
export declare function getVenueBySlug(slug: string, customFetch?: typeof fetch): Promise<VenueInfo | null>;
|
|
139
|
+
export declare function getVenueBySlug(slug: string, customFetch?: typeof fetch, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<VenueInfo | null>;
|
package/dist/api/orders.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
1
2
|
import { PaymentIntentResponse, CompleteReservationResponse, CancelReservationResponse, CreateOrderResponse, ValidatePaymentRequest, ValidatePaymentResponse, ExtendSessionResponse, SessionStatus, Order } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Create a payment intent for the cart
|
|
@@ -25,7 +26,7 @@ export interface FreeOrderBuyer {
|
|
|
25
26
|
questionAnswer?: string;
|
|
26
27
|
mailingList?: boolean;
|
|
27
28
|
}
|
|
28
|
-
export declare function createPaymentIntent(cartId: string, quantities: Record<string | number, number>, donationAmounts?: Record<string | number, number>, buyer?: FreeOrderBuyer, uiLocale?: string): Promise<PaymentIntentResponse | null>;
|
|
29
|
+
export declare function createPaymentIntent(cartId: string, quantities: Record<string | number, number>, donationAmounts?: Record<string | number, number>, buyer?: FreeOrderBuyer, uiLocale?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<PaymentIntentResponse | null>;
|
|
29
30
|
/** What the server said about a submission's checkout answers. */
|
|
30
31
|
export interface CheckoutAnswersResult {
|
|
31
32
|
/**
|
|
@@ -73,7 +74,7 @@ export interface CheckoutAnswersResult {
|
|
|
73
74
|
* not block a checkout that would otherwise have gone through, the same way the
|
|
74
75
|
* server's own guard lets an unreadable venue pass.
|
|
75
76
|
*/
|
|
76
|
-
export declare function submitCheckoutAnswers(cartId: string, quantities: Record<string | number, number>, donationAmounts: Record<string | number, number> | undefined, buyer: FreeOrderBuyer, uiLocale?: string): Promise<CheckoutAnswersResult>;
|
|
77
|
+
export declare function submitCheckoutAnswers(cartId: string, quantities: Record<string | number, number>, donationAmounts: Record<string | number, number> | undefined, buyer: FreeOrderBuyer, uiLocale?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CheckoutAnswersResult>;
|
|
77
78
|
/**
|
|
78
79
|
* Fetch an existing cart by UUID (cross-device pre-fill — §1.3).
|
|
79
80
|
*
|
|
@@ -115,7 +116,7 @@ export interface CartView {
|
|
|
115
116
|
reservations: CartReservationView[];
|
|
116
117
|
giftCards: CartGiftCardView[];
|
|
117
118
|
}
|
|
118
|
-
export declare function getCartByUUID(cartUUID: string, expectedEventID?: string | number): Promise<CartView | null>;
|
|
119
|
+
export declare function getCartByUUID(cartUUID: string, expectedEventID?: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CartView | null>;
|
|
119
120
|
/**
|
|
120
121
|
* Update cart quantities after the cart already exists.
|
|
121
122
|
*
|
|
@@ -139,7 +140,7 @@ export declare function updateCartQuantities(cartId: string, quantities: Record<
|
|
|
139
140
|
* @param orderUuid - The order UUID
|
|
140
141
|
* @returns Success status and message
|
|
141
142
|
*/
|
|
142
|
-
export declare function completeReservation(orderUuid: string): Promise<CompleteReservationResponse>;
|
|
143
|
+
export declare function completeReservation(orderUuid: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CompleteReservationResponse>;
|
|
143
144
|
/**
|
|
144
145
|
* Cancel reservation and release tickets back to inventory
|
|
145
146
|
*
|
|
@@ -148,7 +149,7 @@ export declare function completeReservation(orderUuid: string): Promise<Complete
|
|
|
148
149
|
* @param orderUuid - The order UUID
|
|
149
150
|
* @returns Success status and message
|
|
150
151
|
*/
|
|
151
|
-
export declare function cancelReservation(orderUuid: string): Promise<CancelReservationResponse>;
|
|
152
|
+
export declare function cancelReservation(orderUuid: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CancelReservationResponse>;
|
|
152
153
|
/**
|
|
153
154
|
* Request a refund for a completed order (buyer self-service).
|
|
154
155
|
*
|
|
@@ -163,7 +164,7 @@ export declare function cancelReservation(orderUuid: string): Promise<CancelRese
|
|
|
163
164
|
* @param message - Optional note to the venue (why they want a refund)
|
|
164
165
|
* @returns Success status, with an error message on failure
|
|
165
166
|
*/
|
|
166
|
-
export declare function requestOrderRefund(orderUUID: string, message?: string): Promise<{
|
|
167
|
+
export declare function requestOrderRefund(orderUUID: string, message?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<{
|
|
167
168
|
success: boolean;
|
|
168
169
|
error?: string;
|
|
169
170
|
}>;
|
|
@@ -177,7 +178,7 @@ export declare function requestOrderRefund(orderUUID: string, message?: string):
|
|
|
177
178
|
* @param promoCode - Optional promo code to apply
|
|
178
179
|
* @returns The order UUID, or null on error
|
|
179
180
|
*/
|
|
180
|
-
export declare function createOrder(eventId: string | number, promoCode?: string): Promise<CreateOrderResponse | null>;
|
|
181
|
+
export declare function createOrder(eventId: string | number, promoCode?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<CreateOrderResponse | null>;
|
|
181
182
|
/**
|
|
182
183
|
* Get order details (public, no auth required)
|
|
183
184
|
*
|
|
@@ -186,7 +187,7 @@ export declare function createOrder(eventId: string | number, promoCode?: string
|
|
|
186
187
|
* @param orderId - The order UUID or ID
|
|
187
188
|
* @returns The order details, or null on error
|
|
188
189
|
*/
|
|
189
|
-
export declare function getOrder(orderId: string): Promise<Order | null>;
|
|
190
|
+
export declare function getOrder(orderId: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Order | null>;
|
|
190
191
|
/**
|
|
191
192
|
* Validate payment intent and complete the order
|
|
192
193
|
*
|
|
@@ -197,7 +198,7 @@ export declare function getOrder(orderId: string): Promise<Order | null>;
|
|
|
197
198
|
* @param payload - Payment validation payload
|
|
198
199
|
* @returns Validation result
|
|
199
200
|
*/
|
|
200
|
-
export declare function validatePaymentIntent(cartId: string, payload: ValidatePaymentRequest, uiLocale?: string): Promise<ValidatePaymentResponse | null>;
|
|
201
|
+
export declare function validatePaymentIntent(cartId: string, payload: ValidatePaymentRequest, uiLocale?: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<ValidatePaymentResponse | null>;
|
|
201
202
|
/**
|
|
202
203
|
* Extend the checkout session by 15 minutes
|
|
203
204
|
*
|
|
@@ -206,7 +207,7 @@ export declare function validatePaymentIntent(cartId: string, payload: ValidateP
|
|
|
206
207
|
* @param orderUuid - The order UUID
|
|
207
208
|
* @returns Extension result with new expiry time
|
|
208
209
|
*/
|
|
209
|
-
export declare function extendCheckoutSession(orderUuid: string): Promise<ExtendSessionResponse>;
|
|
210
|
+
export declare function extendCheckoutSession(orderUuid: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<ExtendSessionResponse>;
|
|
210
211
|
/**
|
|
211
212
|
* Get current session status including expiry time
|
|
212
213
|
*
|
|
@@ -215,7 +216,7 @@ export declare function extendCheckoutSession(orderUuid: string): Promise<Extend
|
|
|
215
216
|
* @param orderUuid - The order UUID
|
|
216
217
|
* @returns Session status including expiry time
|
|
217
218
|
*/
|
|
218
|
-
export declare function getSessionStatus(orderUuid: string): Promise<SessionStatus>;
|
|
219
|
+
export declare function getSessionStatus(orderUuid: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<SessionStatus>;
|
|
219
220
|
/**
|
|
220
221
|
* Initiate a new order (alias for createOrder)
|
|
221
222
|
*
|
|
@@ -229,7 +230,7 @@ export declare function initiateOrder(cartData?: {
|
|
|
229
230
|
eventID: string | number;
|
|
230
231
|
promoCode?: string;
|
|
231
232
|
quantities?: Record<string | number, number>;
|
|
232
|
-
}): Promise<string | null>;
|
|
233
|
+
}, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<string | null>;
|
|
233
234
|
/**
|
|
234
235
|
* Track UTM source for analytics
|
|
235
236
|
*
|
package/dist/api/promo.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
1
2
|
import { PromoValidationResponse } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Validate a promo code for an event
|
|
@@ -10,7 +11,7 @@ import { PromoValidationResponse } from './types.js';
|
|
|
10
11
|
* @param code - The promo code to validate
|
|
11
12
|
* @returns Validation result with discount info
|
|
12
13
|
*/
|
|
13
|
-
export declare function validatePromoCode(eventId: string | number, code: string): Promise<PromoValidationResponse>;
|
|
14
|
+
export declare function validatePromoCode(eventId: string | number, code: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<PromoValidationResponse>;
|
|
14
15
|
/**
|
|
15
16
|
* Check if promo codes are available for an event
|
|
16
17
|
*
|
|
@@ -19,7 +20,7 @@ export declare function validatePromoCode(eventId: string | number, code: string
|
|
|
19
20
|
* @param eventId - The event ID
|
|
20
21
|
* @returns Whether promo codes exist for this event
|
|
21
22
|
*/
|
|
22
|
-
export declare function hasPromoCodes(eventId: string | number): Promise<boolean>;
|
|
23
|
+
export declare function hasPromoCodes(eventId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<boolean>;
|
|
23
24
|
/**
|
|
24
25
|
* Apply a promo code to a cart
|
|
25
26
|
*
|
|
@@ -29,7 +30,7 @@ export declare function hasPromoCodes(eventId: string | number): Promise<boolean
|
|
|
29
30
|
* @param code - The promo code to apply
|
|
30
31
|
* @returns Success status
|
|
31
32
|
*/
|
|
32
|
-
export declare function applyPromoCode(cartId: string, code: string, productQuantities?: Record<string | number, number>): Promise<{
|
|
33
|
+
export declare function applyPromoCode(cartId: string, code: string, productQuantities?: Record<string | number, number>, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<{
|
|
33
34
|
success: boolean;
|
|
34
35
|
error?: string;
|
|
35
36
|
}>;
|
|
@@ -39,7 +40,7 @@ export declare function applyPromoCode(cartId: string, code: string, productQuan
|
|
|
39
40
|
* @param cartId - The cart UUID
|
|
40
41
|
* @returns Success status
|
|
41
42
|
*/
|
|
42
|
-
export declare function removePromoCode(cartId: string): Promise<{
|
|
43
|
+
export declare function removePromoCode(cartId: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<{
|
|
43
44
|
success: boolean;
|
|
44
45
|
error?: string;
|
|
45
46
|
}>;
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Surge queue — the virtual waiting room's half of the wire.
|
|
3
|
-
*
|
|
4
|
-
* On a viral on-sale every buyer races for the same inventory decrement on
|
|
5
|
-
* `POST /orders/create`. The backend puts a line in front of that door: a
|
|
6
|
-
* bounded number of buyers hold a checkout pass at any moment and everyone else
|
|
7
|
-
* waits with a position and an estimate. These four calls are how the widget
|
|
8
|
-
* asks about the line, takes a place in it, watches it move, and gives the place
|
|
9
|
-
* back.
|
|
10
|
-
*
|
|
11
|
-
* FAIL OPEN, EVERY TIME. The queue is a protection mechanism, not a money
|
|
12
|
-
* control — the backend itself reports `armed:false` when it cannot reach Redis,
|
|
13
|
-
* because refusing every sale on the platform is a worse outcome than a surge.
|
|
14
|
-
* So every function here degrades to "there is no line": a read that fails must
|
|
15
|
-
* never leave an overlay across a checkout that would have worked. The only
|
|
16
|
-
* thing that actually gates a purchase is the server's `QUEUE_REQUIRED` refusal
|
|
17
|
-
* on `/orders/create`, which `initiateOrder` in src/lib/utils/orderApi.ts
|
|
18
|
-
* surfaces as its own error type — that refusal cannot be lost by a client-side
|
|
19
|
-
* failure, which is what makes failing open here safe.
|
|
20
|
-
*
|
|
21
|
-
* @auth-token-url-escape: the status poll carries its token in the query string
|
|
22
|
-
* because that is the only shape the endpoint answers —
|
|
23
|
-
* `GET /events/:id/queue/status?token=…`. A request header would move it out of
|
|
24
|
-
* nginx logs and browser history, and would also add a CORS preflight to every
|
|
25
|
-
* poll of a line that can be tens of thousands deep, on the one endpoint whose
|
|
26
|
-
* whole purpose is to survive that load. What the token actually grants is one
|
|
27
|
-
* place in one line: it expires with the pass, `leaveQueue` revokes it, and it
|
|
28
|
-
* authorises no order, no payment and no session. The marker is FILE-LEVEL —
|
|
29
|
-
* the only scope the rule offers — so it covers anything added here later.
|
|
30
|
-
*/
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
31
2
|
/**
|
|
32
3
|
* The refusal code the gate answers on `POST /orders/create` (HTTP 429) when
|
|
33
4
|
* the event is armed and the caller holds no admitted token.
|
|
@@ -104,7 +75,7 @@ export interface LeaveQueueResult {
|
|
|
104
75
|
* today's behaviour: the buyer goes straight at the buy button, and the gate
|
|
105
76
|
* decides.
|
|
106
77
|
*/
|
|
107
|
-
export declare function getQueueState(eventId: string | number): Promise<QueueSnapshot>;
|
|
78
|
+
export declare function getQueueState(eventId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<QueueSnapshot>;
|
|
108
79
|
/**
|
|
109
80
|
* Take a place in line, or a checkout pass when there is spare capacity.
|
|
110
81
|
*
|
|
@@ -113,14 +84,14 @@ export declare function getQueueState(eventId: string | number): Promise<QueueSn
|
|
|
113
84
|
* the buyer their spot. It does NOT need to be called before every purchase —
|
|
114
85
|
* the reactive entry into the line is the gate's `QUEUE_REQUIRED` refusal.
|
|
115
86
|
*/
|
|
116
|
-
export declare function joinQueue(eventId: string | number): Promise<QueueEntryResult>;
|
|
87
|
+
export declare function joinQueue(eventId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<QueueEntryResult>;
|
|
117
88
|
/**
|
|
118
89
|
* The poll. Answers the same shape as the join that started it, and draining the
|
|
119
90
|
* line is its server-side side effect — so stopping the poll stops the line
|
|
120
91
|
* moving for everybody, and polling faster than `pollAfterMs` is what the server
|
|
121
92
|
* widens that number to prevent.
|
|
122
93
|
*/
|
|
123
|
-
export declare function getQueueStatus(eventId: string | number, token: string): Promise<QueueEntryResult>;
|
|
94
|
+
export declare function getQueueStatus(eventId: string | number, token: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<QueueEntryResult>;
|
|
124
95
|
/**
|
|
125
96
|
* Give the place in line, or the checkout pass, back.
|
|
126
97
|
*
|
|
@@ -130,4 +101,4 @@ export declare function getQueueStatus(eventId: string | number, token: string):
|
|
|
130
101
|
* fifteen minutes for a tab that closed. And a beacon fired at unload has nobody
|
|
131
102
|
* left to tell, so its failure is not routed to the global error handler.
|
|
132
103
|
*/
|
|
133
|
-
export declare function leaveQueue(eventId: string | number, token: string): Promise<LeaveQueueResult>;
|
|
104
|
+
export declare function leaveQueue(eventId: string | number, token: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<LeaveQueueResult>;
|
package/dist/api/venues.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
1
2
|
import { Venue } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Get venue details (public, no auth required)
|
|
@@ -8,7 +9,7 @@ import { Venue } from './types.js';
|
|
|
8
9
|
* @param venueId - The venue ID
|
|
9
10
|
* @returns Venue details or null on error
|
|
10
11
|
*/
|
|
11
|
-
export declare function getVenue(venueId: string | number): Promise<Venue | null>;
|
|
12
|
+
export declare function getVenue(venueId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Venue | null>;
|
|
12
13
|
/**
|
|
13
14
|
* Get venue service fee configuration
|
|
14
15
|
*
|
|
@@ -17,7 +18,7 @@ export declare function getVenue(venueId: string | number): Promise<Venue | null
|
|
|
17
18
|
* @param venueId - The venue ID
|
|
18
19
|
* @returns Fee configuration or null on error
|
|
19
20
|
*/
|
|
20
|
-
export declare function getVenueFees(venueId: string | number): Promise<{
|
|
21
|
+
export declare function getVenueFees(venueId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<{
|
|
21
22
|
serviceFeePercentage: number;
|
|
22
23
|
serviceFeeCents: number;
|
|
23
24
|
taxPercentage: number;
|
|
@@ -30,11 +31,11 @@ export declare function getVenueFees(venueId: string | number): Promise<{
|
|
|
30
31
|
* @param slug - The venue slug
|
|
31
32
|
* @returns Venue details or null on error
|
|
32
33
|
*/
|
|
33
|
-
export declare function getVenueBySlug(slug: string): Promise<Venue | null>;
|
|
34
|
+
export declare function getVenueBySlug(slug: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Venue | null>;
|
|
34
35
|
/**
|
|
35
36
|
* Whether the venue has a published site — the test for drawing the calendar's
|
|
36
37
|
* gift-card link, whose destination lives on that site. Reads the public
|
|
37
38
|
* published-site read for the venue's own host. Any failure answers false: the
|
|
38
39
|
* link is optional chrome, same as `getVenue`'s swallow.
|
|
39
40
|
*/
|
|
40
|
-
export declare function hasPublishedSite(venueSlug: string | null | undefined): Promise<boolean>;
|
|
41
|
+
export declare function hasPublishedSite(venueSlug: string | null | undefined, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<boolean>;
|
package/dist/api/waitlist.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Waitlist API
|
|
3
|
-
*
|
|
4
|
-
* Endpoints for the sold-out-event waitlist flow.
|
|
5
|
-
*/
|
|
1
|
+
import { ApiRequestOptions } from './client.js';
|
|
6
2
|
export interface JoinWaitlistResult {
|
|
7
3
|
success: boolean;
|
|
8
4
|
updated?: boolean;
|
|
@@ -20,7 +16,7 @@ export interface JoinWaitlistResult {
|
|
|
20
16
|
/**
|
|
21
17
|
* Join the waitlist for a sold-out event.
|
|
22
18
|
*/
|
|
23
|
-
export declare function joinWaitlist(eventId: string | number, email: string, phone?: string | null, smsOptIn?: boolean): Promise<JoinWaitlistResult>;
|
|
19
|
+
export declare function joinWaitlist(eventId: string | number, email: string, phone?: string | null, smsOptIn?: boolean, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<JoinWaitlistResult>;
|
|
24
20
|
export interface ValidateWaitlistTokenResult {
|
|
25
21
|
valid: boolean;
|
|
26
22
|
eventId: number;
|
|
@@ -46,7 +42,7 @@ export interface ValidateWaitlistTokenResult {
|
|
|
46
42
|
* notified buyer. Failures are surfaced (not thrown) so the page can show a
|
|
47
43
|
* non-blocking notice while keeping the event in its gated waitlist state.
|
|
48
44
|
*/
|
|
49
|
-
export declare function validateWaitlistToken(token: string, email: string): Promise<ValidateWaitlistTokenResult>;
|
|
45
|
+
export declare function validateWaitlistToken(token: string, email: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<ValidateWaitlistTokenResult>;
|
|
50
46
|
export interface RequeueWaitlistResult {
|
|
51
47
|
success: boolean;
|
|
52
48
|
/** One of: invalid_token | email_mismatch | token_used | entry_not_found |
|
|
@@ -59,7 +55,7 @@ export interface RequeueWaitlistResult {
|
|
|
59
55
|
* token + email is the identity proof — the same binding the unlock link
|
|
60
56
|
* carries — so the offer needs no login.
|
|
61
57
|
*/
|
|
62
|
-
export declare function requeueWaitlistToFront(token: string, email: string): Promise<RequeueWaitlistResult>;
|
|
58
|
+
export declare function requeueWaitlistToFront(token: string, email: string, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<RequeueWaitlistResult>;
|
|
63
59
|
export interface WaitlistStatusResult {
|
|
64
60
|
waitlistEnabled: boolean;
|
|
65
61
|
soldOut: boolean;
|
|
@@ -74,6 +70,6 @@ export interface WaitlistStatusResult {
|
|
|
74
70
|
* Fetch an event's waitlist gating status. Returns a non-gated default if the
|
|
75
71
|
* request fails so the page degrades to normal behavior.
|
|
76
72
|
*/
|
|
77
|
-
export declare function getWaitlistStatus(eventId: string | number): Promise<WaitlistStatusResult>;
|
|
73
|
+
export declare function getWaitlistStatus(eventId: string | number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<WaitlistStatusResult>;
|
|
78
74
|
/** Clock shape for the offer window: h:mm:ss from an hour up, m:ss below. */
|
|
79
75
|
export declare function formatWaitlistWindow(totalSec: number): string;
|