Shopvento UI - v0.2.0
    Preparing search index...

    Interface EventBookingOptions

    Host configuration for the compact booking form.

    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)

    Index
    baseUrl: string

    Installation origin without /api/shop. Use an empty string for same-origin shop calls.

    checkoutHosts?: readonly string[]

    Allowed HTTPS checkout hostnames. Defaults to checkout.stripe.com. Optional; omitted unless supplied by the host or backend.

    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>;
    }

    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[]>

      Use getEvent. Removed in 1.0.

    • 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[]>

      Use listEvents. Removed in 1.0.

    • 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.

    credentials?: RequestCredentials

    Cookie policy for direct booking fetches; public calls default to omit. Optional; omitted unless supplied by the host or backend.

    fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

    Optional host fetch implementation. Optional; omitted unless supplied by the host or backend.

    getAccessToken?: () => string | Promise<string | undefined> | undefined

    Authenticated consumers can supply a Bearer token without coupling to a router.

    guestDisabledMessage?: string

    Override the disabled guest booking notice; takes precedence over labels. Optional; omitted unless supplied by the host or backend.

    labels?: Partial<BookingLabels>

    Host-owned copy overrides or account terminology. Optional; omitted unless supplied by the host or backend.

    locationId?: number

    Positive installation location identifier used to filter availability. Optional; omitted unless supplied by the host or backend.

    mode?: "account" | "guest"

    Guest is the default. Account consumers supply authentication through ClientOptions.

    onRedirect?: (url: string) => void

    Navigate to a validated checkout URL; defaults to window.location.assign. Optional; omitted unless supplied by the host or backend.

    privacyUrl: string

    Host privacy policy URL.

    termsUrl: string

    Host terms and conditions URL.

    turnstileSiteKey?: string

    Public Turnstile site key required for guest submission. Optional; omitted unless supplied by the host or backend.