Interface EventBookingOptions
baseUrl: string;
checkoutHosts?: readonly string[];
client?: {
checkVoucher: (
code: string,
signal?: AbortSignal,
) => Promise<VoucherCheck>;
getEvent: (id: number, signal?: AbortSignal) => Promise<ShopTasting[]>;
getSettings: (signal?: AbortSignal) => Promise<ShopSettings>;
getTasting: (id: number, signal?: AbortSignal) => Promise<ShopTasting[]>;
listEvents: (signal?: AbortSignal) => Promise<ShopTasting[]>;
listLocations: (
signal?: AbortSignal,
) => Promise<
{ locations: ShopFranchiseLocationResponse[]; total: number },
>;
listLocationTimewindows: (
locationId: number,
__namedParameters?: {
endDate?: string;
signal?: AbortSignal;
startDate?: string;
},
) => Promise<{ timewindows: Timewindow[]; total: number }>;
listTastings: (signal?: AbortSignal) => Promise<ShopTasting[]>;
listTimewindows: (
id: number,
signal?: AbortSignal,
locationId?: number,
) => Promise<{ timewindows: Timewindow[]; total: number }>;
submit: (body: ShopBookingRequest) => Promise<ShopBookingResponse>;
submitGuest: (
body: ShopGuestBookingRequest,
) => Promise<ShopBookingResponse>;
};
credentials?: RequestCredentials;
fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
getAccessToken?: () => string | Promise<string | undefined> | undefined;
guestDisabledMessage?: string;
labels?: Partial<BookingLabels>;
locationId?: number;
mode?: "account" | "guest";
onRedirect?: (url: string) => void;
privacyUrl: string;
termsUrl: string;
turnstileSiteKey?: string;
}
Hierarchy (View Summary)
- ClientOptions
- EventBookingOptions
Properties
base Url
Installation origin without /api/shop. Use an empty string for same-origin shop calls.
Optionalcheckout Hosts
Allowed HTTPS checkout hostnames. Defaults to checkout.stripe.com. Optional; omitted unless supplied by the host or backend.
Optionalclient
checkVoucher: (
code: string,
signal?: AbortSignal,
) => Promise<VoucherCheck>;
getEvent: (id: number, signal?: AbortSignal) => Promise<ShopTasting[]>;
getSettings: (signal?: AbortSignal) => Promise<ShopSettings>;
getTasting: (id: number, signal?: AbortSignal) => Promise<ShopTasting[]>;
listEvents: (signal?: AbortSignal) => Promise<ShopTasting[]>;
listLocations: (
signal?: AbortSignal,
) => Promise<{ locations: ShopFranchiseLocationResponse[]; total: number }>;
listLocationTimewindows: (
locationId: number,
__namedParameters?: {
endDate?: string;
signal?: AbortSignal;
startDate?: string;
},
) => Promise<{ timewindows: Timewindow[]; total: number }>;
listTastings: (signal?: AbortSignal) => Promise<ShopTasting[]>;
listTimewindows: (
id: number,
signal?: AbortSignal,
locationId?: number,
) => Promise<{ timewindows: Timewindow[]; total: number }>;
submit: (body: ShopBookingRequest) => Promise<ShopBookingResponse>;
submitGuest: (
body: ShopGuestBookingRequest,
) => Promise<ShopBookingResponse>;
}
Stable client instance used for API requests. Optional; omitted unless supplied by the host or backend.
Type Declaration
-
checkVoucher: (code: string, signal?: AbortSignal) => Promise<VoucherCheck>
Check a public voucher code; final redemption happens atomically at booking.
-
getEvent: (id: number, signal?: AbortSignal) => Promise<ShopTasting[]>
Filter the public list by event identifier; there is no public detail endpoint.
-
getSettings: (signal?: AbortSignal) => Promise<ShopSettings>
Read public installation settings. Optional signal cancels the request.
-
getTasting: (id: number, signal?: AbortSignal) => Promise<ShopTasting[]>
-
listEvents: (signal?: AbortSignal) => Promise<ShopTasting[]>
List public event variants. Optional signal cancels the request.
-
listLocations: (
signal?: AbortSignal,
) => Promise<{ locations: ShopFranchiseLocationResponse[]; total: number }>List public event locations. Optional signal cancels the request.
-
listLocationTimewindows: (
locationId: number,
__namedParameters?: {
endDate?: string;
signal?: AbortSignal;
startDate?: string;
},
) => Promise<{ timewindows: Timewindow[]; total: number }>Discover timewindows across all events at one location.
-
listTastings: (signal?: AbortSignal) => Promise<ShopTasting[]>
-
listTimewindows: (
id: number,
signal?: AbortSignal,
locationId?: number,
) => Promise<{ timewindows: Timewindow[]; total: number }>List slots for one event. Date defaults to today in Europe/Berlin; optional location filters availability.
-
submit: (body: ShopBookingRequest) => Promise<ShopBookingResponse>
Submit an authenticated booking request. In useSubmitBooking, pass guest, challenge token and consent explicitly for guest submissions; consent defaults to false.
-
submitGuest: (body: ShopGuestBookingRequest) => Promise<ShopBookingResponse>
Submit guest contact, seats, live challenge token and current consent.
Optionalcredentials
Cookie policy for direct booking fetches; public calls default to omit. Optional; omitted unless supplied by the host or backend.
Optionalfetch
Optional host fetch implementation. Optional; omitted unless supplied by the host or backend.
Optionalget Access Token
Authenticated consumers can supply a Bearer token without coupling to a router.
Optionalguest Disabled Message
Override the disabled guest booking notice; takes precedence over labels. Optional; omitted unless supplied by the host or backend.
Optionallabels
Host-owned copy overrides or account terminology. Optional; omitted unless supplied by the host or backend.
Optionallocation Id
Positive installation location identifier used to filter availability. Optional; omitted unless supplied by the host or backend.
Optionalmode
Guest is the default. Account consumers supply authentication through ClientOptions.
Optionalon Redirect
Navigate to a validated checkout URL; defaults to window.location.assign. Optional; omitted unless supplied by the host or backend.
privacy Url
Host privacy policy URL.
terms Url
Host terms and conditions URL.
Optionalturnstile Site Key
Public Turnstile site key required for guest submission. Optional; omitted unless supplied by the host or backend.
Host configuration for the compact booking form.