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

    Interface BookingFlowProps

    Host routing, session, availability and copy needed by the multi-step booking flow.

    interface BookingFlowProps {
        accountClient?: {
            confirmEmailChange: (
                body: EmailChangeConfirmRequest,
            ) => Promise<Record<string, string>>;
            getProfile: (signal?: AbortSignal) => Promise<ShopUserProfile>;
            getSettings: (signal?: AbortSignal) => Promise<PublicShopSettings>;
            login: (body: UserLoginRequest) => Promise<AccountLoginResponse>;
            logout: () => Promise<Record<string, string>>;
            register: (
                body: ShopUserProfileCreateRequest,
            ) => Promise<Record<string, string>>;
            requestPasswordReset: (
                body: PasswordResetRequest,
            ) => Promise<Record<string, string>>;
            setPassword: (
                body: PasswordResetConfirmRequest,
            ) => Promise<Record<string, string>>;
            verifyEmail: (
                body: EmailVerificationRequest,
            ) => Promise<Record<string, string>>;
        };
        accountReturnPath?: string;
        calendarUrl: 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>;
        };
        colors?: EventColors;
        countryCodes?: readonly string[];
        data: CalendarInput;
        draftKey: string;
        format?: BookingFormat;
        image?: string;
        initialVoucherCode?: string;
        labels?: Partial<BookingLabels>;
        loginUrl: string;
        onAuthenticated?: () => void;
        onRedirect?: (url: string) => void;
        onReloadAvailability?: () => void;
        onSignOut?: () => void | Promise<void>;
        onStep: (step: number) => void;
        privacyUrl: string;
        profile?: ShopUserProfile | null;
        sessionLoading?: boolean;
        siteKey?: string;
        step: number;
        successUrl: string;
        termsUrl: string;
        texts: BookingTexts;
    }
    Index
    accountClient?: {
        confirmEmailChange: (
            body: EmailChangeConfirmRequest,
        ) => Promise<Record<string, string>>;
        getProfile: (signal?: AbortSignal) => Promise<ShopUserProfile>;
        getSettings: (signal?: AbortSignal) => Promise<PublicShopSettings>;
        login: (body: UserLoginRequest) => Promise<AccountLoginResponse>;
        logout: () => Promise<Record<string, string>>;
        register: (
            body: ShopUserProfileCreateRequest,
        ) => Promise<Record<string, string>>;
        requestPasswordReset: (
            body: PasswordResetRequest,
        ) => Promise<Record<string, string>>;
        setPassword: (
            body: PasswordResetConfirmRequest,
        ) => Promise<Record<string, string>>;
        verifyEmail: (
            body: EmailVerificationRequest,
        ) => Promise<Record<string, string>>;
    }

    Account client in the booking flow props contract. Optional; omitted unless supplied by the host or backend.

    Type Declaration

    • confirmEmailChange: (body: EmailChangeConfirmRequest) => Promise<Record<string, string>>

      Confirm a one-time email change token.

    • getProfile: (signal?: AbortSignal) => Promise<ShopUserProfile>

      Load the authoritative authenticated profile. Optional signal cancels the read.

    • getSettings: (signal?: AbortSignal) => Promise<PublicShopSettings>

      Read public installation settings. Optional signal cancels the request.

    • login: (body: UserLoginRequest) => Promise<AccountLoginResponse>

      Sign in through the host proxy; browser JSON must omit upstream access tokens.

    • logout: () => Promise<Record<string, string>>

      Invalidate the current host session.

    • register: (body: ShopUserProfileCreateRequest) => Promise<Record<string, string>>

      Request registration without revealing account existence.

    • requestPasswordReset: (body: PasswordResetRequest) => Promise<Record<string, string>>

      Request a reset email without revealing account existence.

    • setPassword: (body: PasswordResetConfirmRequest) => Promise<Record<string, string>>

      Set the account password from a one-time token.

    • verifyEmail: (body: EmailVerificationRequest) => Promise<Record<string, string>>

      Confirm a one-time email verification token.

    accountReturnPath?: string

    Safe host account return path.

    "/konto"
    
    calendarUrl: string

    Host calendar route.

    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.

    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.

    colors?: EventColors

    Optional CSS colors keyed by event identifier.

    {}
    
    countryCodes?: readonly string[]

    Allowed international dialing prefixes.

    []
    

    Fresh events, windows, settings and locations supplied by the host.

    draftKey: string

    Installation- and location-scoped sessionStorage key.

    format?: BookingFormat

    Optional locale and currency formatting settings.

    {}
    
    image?: string

    Host image URL. Optional; omitted unless supplied by the host or backend.

    initialVoucherCode?: string

    Optional prefilled voucher code; still checked by the backend. 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.

    loginUrl: string

    Host sign-in route.

    onAuthenticated?: () => void

    Refresh the host session after successful authentication. Optional; omitted unless supplied by the host or backend.

    onRedirect?: (url: string) => void

    Navigate to a validated checkout URL; defaults to window.location.assign.

    Host browser navigation.
    
    onReloadAvailability?: () => void

    Reload authoritative availability after a seat conflict. Optional; omitted unless supplied by the host or backend.

    onSignOut?: () => void | Promise<void>

    Perform the host sign-out action. Optional; omitted unless supplied by the host or backend.

    onStep: (step: number) => void

    Navigate to the requested host-owned booking step.

    privacyUrl: string

    Host privacy policy URL.

    profile?: ShopUserProfile | null

    Authoritative authenticated profile; null represents a guest. Optional; omitted unless supplied by the host or backend.

    sessionLoading?: boolean

    Session loading in the booking flow props contract. Optional; omitted unless supplied by the host or backend.

    siteKey?: string

    Public Turnstile site key; never pass the private secret. Optional; omitted unless supplied by the host or backend.

    step: number

    Current host-owned booking step.

    successUrl: string

    Host route for accepted booking results.

    termsUrl: string

    Host terms and conditions URL.

    Host-owned legal and editorial booking copy.