@loczer/storefront-sdk 0.185.0 → 0.187.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/index.js CHANGED
@@ -11,70 +11,70 @@ import { DEFAULT_BOOKING_DELIVERY_OPTION as q, bookingCustomerInputSchema as J,
11
11
  import { baseAssetSchema as ne, baseAssetStatusSchema as re } from "./chunks/booking-engine/dist/schemas/base-asset-B_Dm8_Vk.js";
12
12
  import { baseBookingItemSchema as ie, baseBookingSchema as ae, baseBookingStateSchema as oe } from "./chunks/booking-engine/dist/schemas/base-booking-DW8AEPKo.js";
13
13
  import "./chunks/booking-engine/dist/schemas-DftrSnTE.js";
14
- import { storefrontCheckoutModeSchema as se, storefrontConfigurationSchema as ce, storefrontContentSchema as le, storefrontFaqItemSchema as ue, storefrontFaqSchema as de, storefrontFulfillmentModeSchema as fe, storefrontLocalizedRichTextSchema as pe, storefrontModalMessageSchema as me, storefrontModulesSchema as he, storefrontReviewsModuleSchema as ge, storefrontRichTextSchema as _e, storefrontSettingsSchema as ve, storefrontShopSchema as ye, storefrontStatusSchema as be, storefrontWorkspaceSchema as xe } from "./storefrontSchemas.js";
15
- import { BOOKING_SEARCH_KEYS as Se, TIME_OPTIONS as Ce, applyBookingParamsToSearch as we, createBookingPeriodConfigFromBookingEngineConfiguration as Te, createBookingPeriodConfigFromShopConfiguration as Ee, createBookingPeriodConfigFromStorefrontConfiguration as De, getBookingDurationLabel as Oe, getBookingDurationMinutes as ke, getBookingParamsFromSearch as Ae, getBookingSessionStorageKey as je, getDefaultBookingParams as Me, getDefaultBookingParamsForStorefrontConfiguration as Ne, pickBookingSearchParams as Pe, readBookingSearchParamsFromSessionStorage as Fe, readBookingSearchParamsFromStorage as Ie, resolveBookingSearchParams as Le, resolveBookingSearchParamsFromSessionStorage as Re, writeBookingSearchParamsToSessionStorage as ze, writeBookingSearchParamsToStorage as Be } from "./lib/booking.js";
16
- import { CATALOG_PRODUCT_BASE_RATE_UNSET as Ve, buildStorefrontProductSlug as He, buildVariantStorefrontProductId as Ue, compareCatalogProducts as We, compareStorefrontAccessoryProducts as Ge, compareStorefrontBikeProducts as Ke, findStorefrontProduct as qe, findStorefrontProductBySlug as Je, getCatalogProductBaseRateMinor as Ye, getCatalogProductPaginationSort as Xe, getCatalogProductSortFieldForPriceUnit as Ze, getStorefrontBaseDailyRateMinor as Qe, getStorefrontCheckoutProductId as $e, getStorefrontRepresentedVariantId as et, toStorefrontAccessoryProducts as tt, toStorefrontBikeProducts as nt, toStorefrontBookingProducts as rt, toStorefrontBookingProductsCollections as it } from "./lib/products.js";
17
- import { StorefrontCartProvider as at, resolveStorefrontCartItemProduct as ot, useStorefrontCart as st } from "./lib/cart.js";
18
- import { cn as ct, formatPriceMinor as lt, getAvailabilityVariant as ut, getMinDayPriceMinor as dt } from "./lib/utils.js";
19
- import { buildDailyPriceRows as ft, buildPriceTierLabels as pt, calculateDailyPriceForQuantity as mt, formatStorefrontPriceMinor as ht } from "./lib/pricing.js";
20
- import { getLocalizedEntry as gt, getLocalizedValue as _t } from "./localization.js";
21
- import { buildStorefrontCartSummary as vt } from "./lib/cartSummary.js";
22
- import { ROUTE as yt, requestSchema as bt, responseSchema as xt } from "./lib/contactForm.js";
23
- import { formatStorefrontPhoneDisplay as St, resolveStorefrontMapsHref as Ct, resolveStorefrontPhoneContact as wt } from "./lib/storefrontContact.js";
24
- import { buildWhatsAppHref as Tt, resolveStorefrontWhatsAppContact as Et, resolveStorefrontWhatsAppHref as Dt } from "./lib/whatsapp.js";
25
- import { ROUTE as Ot, requestBaseSchema as kt, requestCheckoutItemSchema as At, requestDeliveryRefinement as jt, requestSchema as Mt, responseSchema as Nt } from "./lib/checkoutSubmit.js";
26
- import { ROUTE as Pt, requestSchema as Ft, responseSchema as It, storefrontPublicAccessoryProductSchema as Lt, storefrontPublicBikeAvailabilityStatusSchema as Rt, storefrontPublicBikeProductSchema as zt, storefrontPublicProductDisplayModeSchema as Bt, storefrontPublicProductPriceSchema as Vt, storefrontPublicProductVariantAttributeSchema as Ht, storefrontPublicProductVariantIdentifierSchema as Ut, storefrontPublicProductVariantSchema as Wt } from "./lib/storefrontProducts.js";
27
- import { ROUTE as Gt, buildStorefrontAvailabilityKey as Kt, doesStorefrontAvailabilityDisplaySoldOut as qt, getStorefrontAvailabilityIssue as Jt, getStorefrontAvailabilityStatus as Yt, isStorefrontAvailabilityInsufficient as Xt, publicAvailabilityDisplayModeSchema as Zt, requestSchema as Qt, responseSchema as $t, shouldBlockStorefrontUnavailableItem as en, storefrontAvailabilityProductSchema as tn, storefrontAvailabilityScheduleSchema as nn, storefrontPublicAvailabilityRecordSchema as rn } from "./lib/storefrontAvailability.js";
28
- import { ROUTE as an, buildStorefrontImageUrl as on, requestSchema as sn } from "./lib/storefrontImage.js";
29
- import { ROUTE as cn, requestSchema as ln, responseSchema as un, storefrontTimeSlotSchema as dn, timeSlotJourneySchema as fn } from "./lib/storefrontTimeSlots.js";
30
- import { Footer as pn } from "./components/Footer/index.js";
31
- import { Badge as mn, badgeVariants as hn } from "./ui/badge.js";
32
- import { Button as gn, buttonVariants as _n } from "./ui/button.js";
33
- import { Header as vn } from "./components/Header/index.js";
34
- import { storefront as yn } from "./i18n/en.js";
35
- import { storefront as bn } from "./i18n/fr.js";
36
- import { PoweredByLoczerBadge as xn } from "./components/PoweredByLoczerBadge/index.js";
37
- import { PlatformFooter as Sn } from "./components/PlatformFooter/index.js";
38
- import { useWhatsAppFloatingButton as Cn } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
39
- import { WhatsAppFloatingButton as wn } from "./components/WhatsAppFloatingButton/WhatsAppFloatingButton.js";
14
+ import { STOREFRONT_HERO_MODES as se, storefrontCheckoutModeSchema as ce, storefrontConfigurationSchema as le, storefrontContentSchema as ue, storefrontFaqItemSchema as de, storefrontFaqSchema as fe, storefrontFulfillmentModeSchema as pe, storefrontHeroModeSchema as me, storefrontLocalizedRichTextSchema as he, storefrontModalMessageSchema as ge, storefrontModulesSchema as _e, storefrontReviewsModuleSchema as ve, storefrontRichTextSchema as ye, storefrontSettingsSchema as be, storefrontShopSchema as xe, storefrontStatusSchema as Se, storefrontWorkspaceSchema as Ce } from "./storefrontSchemas.js";
15
+ import { BOOKING_SEARCH_KEYS as we, TIME_OPTIONS as Te, applyBookingParamsToSearch as Ee, createBookingPeriodConfigFromBookingEngineConfiguration as De, createBookingPeriodConfigFromShopConfiguration as Oe, createBookingPeriodConfigFromStorefrontConfiguration as ke, getBookingDurationLabel as Ae, getBookingDurationMinutes as je, getBookingParamsFromSearch as Me, getBookingSessionStorageKey as Ne, getDefaultBookingParams as Pe, getDefaultBookingParamsForStorefrontConfiguration as Fe, pickBookingSearchParams as Ie, readBookingSearchParamsFromSessionStorage as Le, readBookingSearchParamsFromStorage as Re, resolveBookingSearchParams as ze, resolveBookingSearchParamsFromSessionStorage as Be, writeBookingSearchParamsToSessionStorage as Ve, writeBookingSearchParamsToStorage as He } from "./lib/booking.js";
16
+ import { CATALOG_PRODUCT_BASE_RATE_UNSET as Ue, buildStorefrontProductSlug as We, buildVariantStorefrontProductId as Ge, compareCatalogProducts as Ke, compareStorefrontAccessoryProducts as qe, compareStorefrontBikeProducts as Je, findStorefrontProduct as Ye, findStorefrontProductBySlug as Xe, getCatalogProductBaseRateMinor as Ze, getCatalogProductPaginationSort as Qe, getCatalogProductSortFieldForPriceUnit as $e, getStorefrontBaseDailyRateMinor as et, getStorefrontCheckoutProductId as tt, getStorefrontRepresentedVariantId as nt, toStorefrontAccessoryProducts as rt, toStorefrontBikeProducts as it, toStorefrontBookingProducts as at, toStorefrontBookingProductsCollections as ot } from "./lib/products.js";
17
+ import { StorefrontCartProvider as st, resolveStorefrontCartItemProduct as ct, useStorefrontCart as lt } from "./lib/cart.js";
18
+ import { cn as ut, formatPriceMinor as dt, getAvailabilityVariant as ft, getMinDayPriceMinor as pt } from "./lib/utils.js";
19
+ import { buildDailyPriceRows as mt, buildPriceTierLabels as ht, calculateDailyPriceForQuantity as gt, formatStorefrontPriceMinor as _t } from "./lib/pricing.js";
20
+ import { getLocalizedEntry as vt, getLocalizedValue as yt } from "./localization.js";
21
+ import { buildStorefrontCartSummary as bt } from "./lib/cartSummary.js";
22
+ import { ROUTE as xt, requestSchema as St, responseSchema as Ct } from "./lib/contactForm.js";
23
+ import { formatStorefrontPhoneDisplay as wt, resolveStorefrontMapsHref as Tt, resolveStorefrontPhoneContact as Et } from "./lib/storefrontContact.js";
24
+ import { buildWhatsAppHref as Dt, resolveStorefrontWhatsAppContact as Ot, resolveStorefrontWhatsAppHref as kt } from "./lib/whatsapp.js";
25
+ import { ROUTE as At, requestBaseSchema as jt, requestCheckoutItemSchema as Mt, requestDeliveryRefinement as Nt, requestSchema as Pt, responseSchema as Ft } from "./lib/checkoutSubmit.js";
26
+ import { ROUTE as It, requestSchema as Lt, responseSchema as Rt, storefrontPublicAccessoryProductSchema as zt, storefrontPublicBikeAvailabilityStatusSchema as Bt, storefrontPublicBikeProductSchema as Vt, storefrontPublicProductDisplayModeSchema as Ht, storefrontPublicProductPriceSchema as Ut, storefrontPublicProductVariantAttributeSchema as Wt, storefrontPublicProductVariantIdentifierSchema as Gt, storefrontPublicProductVariantSchema as Kt } from "./lib/storefrontProducts.js";
27
+ import { ROUTE as qt, buildStorefrontAvailabilityKey as Jt, doesStorefrontAvailabilityDisplaySoldOut as Yt, getStorefrontAvailabilityIssue as Xt, getStorefrontAvailabilityStatus as Zt, isStorefrontAvailabilityInsufficient as Qt, publicAvailabilityDisplayModeSchema as $t, requestSchema as en, responseSchema as tn, shouldBlockStorefrontUnavailableItem as nn, storefrontAvailabilityProductSchema as rn, storefrontAvailabilityScheduleSchema as an, storefrontPublicAvailabilityRecordSchema as on } from "./lib/storefrontAvailability.js";
28
+ import { ROUTE as sn, buildStorefrontImageUrl as cn, requestSchema as ln } from "./lib/storefrontImage.js";
29
+ import { ROUTE as un, requestSchema as dn, responseSchema as fn, storefrontTimeSlotSchema as pn, timeSlotJourneySchema as mn } from "./lib/storefrontTimeSlots.js";
30
+ import { Footer as hn } from "./components/Footer/index.js";
31
+ import { Badge as gn, badgeVariants as _n } from "./ui/badge.js";
32
+ import { Button as vn, buttonVariants as yn } from "./ui/button.js";
33
+ import { Header as bn } from "./components/Header/index.js";
34
+ import { storefront as xn } from "./i18n/en.js";
35
+ import { storefront as Sn } from "./i18n/fr.js";
36
+ import { PoweredByLoczerBadge as Cn } from "./components/PoweredByLoczerBadge/index.js";
37
+ import { PlatformFooter as wn } from "./components/PlatformFooter/index.js";
38
+ import { useWhatsAppFloatingButton as Tn } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
39
+ import { WhatsAppFloatingButton as En } from "./components/WhatsAppFloatingButton/WhatsAppFloatingButton.js";
40
40
  import "./components/WhatsAppFloatingButton/index.js";
41
- import { Layout as Tn } from "./components/Layout/index.js";
42
- import { DelayedPlaceholder as En, DelayedReveal as Dn } from "./components/DelayedReveal/index.js";
43
- import { BookingPeriodProvider as On, useBookingPeriod as kn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
44
- import { Label as An } from "./ui/label.js";
45
- import { BookingStartDateField as jn } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
46
- import { BookingStartTimeField as Mn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
47
- import { BookingEndDateField as Nn } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
48
- import { BookingEndTimeField as Pn } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
49
- import { BookingMobileDateDrawer as Fn } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
50
- import { BookingPeriodSelector as In } from "./components/BookingPeriodSelector/index.js";
51
- import { BookingFlowSteps as Ln } from "./components/BookingFlowSteps/index.js";
52
- import { Input as Rn } from "./ui/input.js";
53
- import { DeliveryAddressSelector as zn } from "./components/DeliveryAddressSelector/index.js";
54
- import { loader as Bn, useOptionalStorefront as Vn, useStorefront as Hn, useStorefrontBookingProducts as Un, useStorefrontConfig as Wn, useStorefrontProducts as Gn, useStorefrontWorkspaceLanguage as Kn } from "./StorefrontProvider.js";
55
- import { Form as qn, FormControl as Jn, FormDescription as Yn, FormField as Xn, FormItem as Zn, FormLabel as Qn, FormMessage as $n, useFormField as er } from "./ui/form.js";
56
- import { Textarea as tr } from "./ui/textarea.js";
57
- import { ContactSection as nr } from "./components/ContactSection/index.js";
58
- import { TestimonialsSection as rr } from "./components/TestimonialsSection/index.js";
59
- import { AboutSection as ir } from "./components/AboutSection/index.js";
60
- import { StepSectionTitle as ar } from "./components/StepSectionTitle/index.js";
61
- import { Card as or, CardAction as sr, CardContent as cr, CardDescription as lr, CardFooter as ur, CardHeader as dr, CardTitle as fr } from "./ui/card.js";
62
- import { ProductWarningNotice as pr } from "./components/ProductWarningNotice/index.js";
63
- import { StorefrontCartPanel as mr } from "./components/StorefrontCartPanel/index.js";
64
- import { ProductPriceBadge as hr } from "./components/ProductPriceBadge/index.js";
65
- import { ContractSaleDocument as gr } from "./components/ContractSaleDocument/Invoice.js";
41
+ import { Layout as Dn } from "./components/Layout/index.js";
42
+ import { DelayedPlaceholder as On, DelayedReveal as kn } from "./components/DelayedReveal/index.js";
43
+ import { BookingPeriodProvider as An, useBookingPeriod as jn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
44
+ import { Label as Mn } from "./ui/label.js";
45
+ import { BookingStartDateField as Nn } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
46
+ import { BookingStartTimeField as Pn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
47
+ import { BookingEndDateField as Fn } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
48
+ import { BookingEndTimeField as In } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
49
+ import { BookingMobileDateDrawer as Ln } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
50
+ import { BookingPeriodSelector as Rn } from "./components/BookingPeriodSelector/index.js";
51
+ import { BookingFlowSteps as zn } from "./components/BookingFlowSteps/index.js";
52
+ import { Input as Bn } from "./ui/input.js";
53
+ import { DeliveryAddressSelector as Vn } from "./components/DeliveryAddressSelector/index.js";
54
+ import { loader as Hn, useOptionalStorefront as Un, useStorefront as Wn, useStorefrontBookingProducts as Gn, useStorefrontConfig as Kn, useStorefrontProducts as qn, useStorefrontWorkspaceLanguage as Jn } from "./StorefrontProvider.js";
55
+ import { Form as Yn, FormControl as Xn, FormDescription as Zn, FormField as Qn, FormItem as $n, FormLabel as er, FormMessage as tr, useFormField as nr } from "./ui/form.js";
56
+ import { Textarea as rr } from "./ui/textarea.js";
57
+ import { ContactSection as ir } from "./components/ContactSection/index.js";
58
+ import { TestimonialsSection as ar } from "./components/TestimonialsSection/index.js";
59
+ import { AboutSection as or } from "./components/AboutSection/index.js";
60
+ import { StepSectionTitle as sr } from "./components/StepSectionTitle/index.js";
61
+ import { Card as cr, CardAction as lr, CardContent as ur, CardDescription as dr, CardFooter as fr, CardHeader as pr, CardTitle as mr } from "./ui/card.js";
62
+ import { ProductWarningNotice as hr } from "./components/ProductWarningNotice/index.js";
63
+ import { StorefrontCartPanel as gr } from "./components/StorefrontCartPanel/index.js";
64
+ import { ProductPriceBadge as _r } from "./components/ProductPriceBadge/index.js";
65
+ import { ContractSaleDocument as vr } from "./components/ContractSaleDocument/Invoice.js";
66
66
  import "./components/ContractSaleDocument/index.js";
67
- import { RadioGroup as _r, RadioGroupItem as vr } from "./ui/radio-group.js";
67
+ import { RadioGroup as yr, RadioGroupItem as br } from "./ui/radio-group.js";
68
68
  import "./pages/HomePage.js";
69
69
  import "./pages/BookingPage.js";
70
70
  import "./pages/ProductPage.js";
71
71
  import "./pages/CheckoutPage.js";
72
72
  import "./pages/CheckoutSuccessPage.js";
73
73
  import "./pages/NotFoundPage.js";
74
- import { accessories as yr } from "./data/accessories.js";
75
- import br from "./data/bikes.js";
76
- import { contractSaleDocumentAcceptanceLevelSchema as xr, contractSaleDocumentAcceptanceRecordSchema as Sr, contractSaleDocumentAcceptanceSchema as Cr, contractSaleDocumentAddressSchema as wr, contractSaleDocumentContactSchema as Tr, contractSaleDocumentKindSchema as Er, contractSaleDocumentLanguageCodeSchema as Dr, contractSaleDocumentLanguageSchema as Or, contractSaleDocumentLineItemSchema as kr, contractSaleDocumentSchema as Ar, contractSaleDocumentSignatureSchema as jr } from "./lib/contractSaleDocument.js";
77
- import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Mr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Nr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Pr, acceptContractSaleDocumentRequestSchema as Fr, acceptContractSaleDocumentResponseSchema as Ir, contractSaleDocumentAcceptanceInputSchema as Lr, contractSaleDocumentAcceptanceRecordInputSchema as Rr, contractSaleDocumentApiAcceptanceRecordSchema as zr, contractSaleDocumentApiAcceptanceSchema as Br, contractSaleDocumentApiSchema as Vr, contractSaleDocumentApiSignatureSchema as Hr, contractSaleDocumentReferenceSchema as Ur, contractSaleDocumentReferenceTypeSchema as Wr, contractSaleDocumentSignatureInputSchema as Gr, downloadContractSaleDocumentPdfRequestSchema as Kr, getContractSaleDocumentRequestSchema as qr, getContractSaleDocumentResponseSchema as Jr } from "./lib/contractSaleDocumentApi.js";
78
- import Yr from "./routes.js";
79
- import { Select as Xr, SelectContent as Zr, SelectGroup as Qr, SelectIcon as $r, SelectItem as ei, SelectItemIndicator as ti, SelectItemText as ni, SelectLabel as ri, SelectScrollDownButton as ii, SelectScrollUpButton as ai, SelectSeparator as oi, SelectTrigger as si, SelectValue as ci } from "./ui/select.js";
80
- export { Mr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, ir as AboutSection, Se as BOOKING_SEARCH_KEYS, mn as Badge, Nn as BookingEndDateField, Pn as BookingEndTimeField, Ln as BookingFlowSteps, Fn as BookingMobileDateDrawer, On as BookingPeriodProvider, In as BookingPeriodSelector, jn as BookingStartDateField, Mn as BookingStartTimeField, gn as Button, Ve as CATALOG_PRODUCT_BASE_RATE_UNSET, or as Card, sr as CardAction, cr as CardContent, lr as CardDescription, ur as CardFooter, dr as CardHeader, fr as CardTitle, nr as ContactSection, gr as ContractSaleDocument, q as DEFAULT_BOOKING_DELIVERY_OPTION, R as DEFAULT_CANCELLATION_POLICY, z as DEFAULT_PAYMENT_POLICIES, Nr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, En as DelayedPlaceholder, Dn as DelayedReveal, zn as DeliveryAddressSelector, pn as Footer, qn as Form, Jn as FormControl, Yn as FormDescription, Xn as FormField, Zn as FormItem, Qn as FormLabel, $n as FormMessage, Pr as GET_CONTRACT_SALE_DOCUMENT_ROUTE, vn as Header, Rn as Input, An as Label, Tn as Layout, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, Sn as PlatformFooter, xn as PoweredByLoczerBadge, hr as ProductPriceBadge, pr as ProductWarningNotice, yt as ROUTE, _r as RadioGroup, vr as RadioGroupItem, Gt as STOREFRONT_AVAILABILITY_ROUTE, Ot as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, an as STOREFRONT_IMAGE_ROUTE, Pt as STOREFRONT_PRODUCTS_ROUTE, cn as STOREFRONT_TIME_SLOTS_ROUTE, Xr as Select, Zr as SelectContent, Qr as SelectGroup, $r as SelectIcon, ei as SelectItem, ti as SelectItemIndicator, ni as SelectItemText, ri as SelectLabel, ii as SelectScrollDownButton, ai as SelectScrollUpButton, oi as SelectSeparator, si as SelectTrigger, ci as SelectValue, ar as StepSectionTitle, mr as StorefrontCartPanel, at as StorefrontCartProvider, Ce as TIME_OPTIONS, rr as TestimonialsSection, tr as Textarea, wn as WhatsAppFloatingButton, Fr as acceptContractSaleDocumentRequestSchema, Ir as acceptContractSaleDocumentResponseSchema, yr as accessories, h as accessoryProductSchema, we as applyBookingParamsToSearch, hn as badgeVariants, ne as baseAssetSchema, re as baseAssetStatusSchema, ie as baseBookingItemSchema, ae as baseBookingSchema, oe as baseBookingStateSchema, g as bikeProductSchema, br as bikes, J as bookingCustomerInputSchema, Y as bookingDeliveryOptionSchema, X as bookingScheduleInputSchema, ft as buildDailyPriceRows, pt as buildPriceTierLabels, Kt as buildStorefrontAvailabilityKey, vt as buildStorefrontCartSummary, on as buildStorefrontImageUrl, He as buildStorefrontProductSlug, Ue as buildVariantStorefrontProductId, Tt as buildWhatsAppHref, _n as buttonVariants, mt as calculateDailyPriceForQuantity, B as cancellationPolicySchema, V as cancellationPolicyTierSchema, Z as cartItemInputSchema, ct as cn, We as compareCatalogProducts, Ge as compareStorefrontAccessoryProducts, Ke as compareStorefrontBikeProducts, Lr as contractSaleDocumentAcceptanceInputSchema, xr as contractSaleDocumentAcceptanceLevelSchema, Rr as contractSaleDocumentAcceptanceRecordInputSchema, Sr as contractSaleDocumentAcceptanceRecordSchema, Cr as contractSaleDocumentAcceptanceSchema, wr as contractSaleDocumentAddressSchema, zr as contractSaleDocumentApiAcceptanceRecordSchema, Br as contractSaleDocumentApiAcceptanceSchema, Vr as contractSaleDocumentApiSchema, Hr as contractSaleDocumentApiSignatureSchema, Tr as contractSaleDocumentContactSchema, Er as contractSaleDocumentKindSchema, Dr as contractSaleDocumentLanguageCodeSchema, Or as contractSaleDocumentLanguageSchema, kr as contractSaleDocumentLineItemSchema, Ur as contractSaleDocumentReferenceSchema, Wr as contractSaleDocumentReferenceTypeSchema, Ar as contractSaleDocumentSchema, Gr as contractSaleDocumentSignatureInputSchema, jr as contractSaleDocumentSignatureSchema, Q as createBookingInputBaseSchema, $ as createBookingInputSchema, Te as createBookingPeriodConfigFromBookingEngineConfiguration, Ee as createBookingPeriodConfigFromShopConfiguration, De as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, qt as doesStorefrontAvailabilityDisplaySoldOut, Kr as downloadContractSaleDocumentPdfRequestSchema, _ as eBikeProductSchema, qe as findStorefrontProduct, Je as findStorefrontProductBySlug, lt as formatPriceMinor, St as formatStorefrontPhoneDisplay, ht as formatStorefrontPriceMinor, U as fulfillmentModeSchema, ut as getAvailabilityVariant, Oe as getBookingDurationLabel, ke as getBookingDurationMinutes, Ae as getBookingParamsFromSearch, je as getBookingSessionStorageKey, Ye as getCatalogProductBaseRateMinor, Xe as getCatalogProductPaginationSort, Ze as getCatalogProductSortFieldForPriceUnit, qr as getContractSaleDocumentRequestSchema, Jr as getContractSaleDocumentResponseSchema, Me as getDefaultBookingParams, Ne as getDefaultBookingParamsForStorefrontConfiguration, gt as getLocalizedEntry, t as getLocalizedStringValue, _t as getLocalizedValue, dt as getMinDayPriceMinor, Jt as getStorefrontAvailabilityIssue, Yt as getStorefrontAvailabilityStatus, Qe as getStorefrontBaseDailyRateMinor, $e as getStorefrontCheckoutProductId, et as getStorefrontRepresentedVariantId, v as isProductVariantCodeIdentifierKind, Xt as isStorefrontAvailabilityInsufficient, k as isoDateSchema, Bn as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, H as paymentPoliciesSchema, Pe as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, y as productKindSchema, b as productSchema, x as productStorefrontDisplayModeSchema, S as productVariantAttributeSchema, C as productVariantCodeSchema, w as productVariantIdentifierSchema, T as productVariantSchema, Zt as publicAvailabilityDisplayModeSchema, W as publicBookingEngineConfigurationSchema, G as publicCheckoutConfigurationSchema, K as publicCheckoutDynamicOptionsSchema, Fe as readBookingSearchParamsFromSessionStorage, Ie as readBookingSearchParamsFromStorage, bt as requestSchema, ee as resolveBookingDeliveryOption, Le as resolveBookingSearchParams, Re as resolveBookingSearchParamsFromSessionStorage, ot as resolveStorefrontCartItemProduct, Ct as resolveStorefrontMapsHref, wt as resolveStorefrontPhoneContact, Et as resolveStorefrontWhatsAppContact, Dt as resolveStorefrontWhatsAppHref, xt as responseSchema, E as richTextJsonDocSchema, D as richTextSchema, O as richTextVersionSchema, A as shopConfigurationSchema, j as shopExtraTimeSlotRuleSchema, M as shopOpeningDayIndexSchema, N as shopOpeningDaySchema, P as shopOpeningHoursOverrideSchema, F as shopOpeningHoursPeriodSchema, I as shopOpeningSlotSchema, en as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, tn as storefrontAvailabilityProductSchema, Qt as storefrontAvailabilityRequestSchema, $t as storefrontAvailabilityResponseSchema, nn as storefrontAvailabilityScheduleSchema, se as storefrontCheckoutModeSchema, jt as storefrontCheckoutSubmitDeliveryRefinement, At as storefrontCheckoutSubmitItemSchema, kt as storefrontCheckoutSubmitRequestBaseSchema, Mt as storefrontCheckoutSubmitRequestSchema, Nt as storefrontCheckoutSubmitResponseSchema, ce as storefrontConfigurationSchema, le as storefrontContentSchema, yn as storefrontEn, ue as storefrontFaqItemSchema, de as storefrontFaqSchema, bn as storefrontFr, fe as storefrontFulfillmentModeSchema, sn as storefrontImageRequestSchema, pe as storefrontLocalizedRichTextSchema, me as storefrontModalMessageSchema, he as storefrontModulesSchema, Ft as storefrontProductsRequestSchema, It as storefrontProductsResponseSchema, Lt as storefrontPublicAccessoryProductSchema, rn as storefrontPublicAvailabilityRecordSchema, Rt as storefrontPublicBikeAvailabilityStatusSchema, zt as storefrontPublicBikeProductSchema, Bt as storefrontPublicProductDisplayModeSchema, Vt as storefrontPublicProductPriceSchema, Ht as storefrontPublicProductVariantAttributeSchema, Ut as storefrontPublicProductVariantIdentifierSchema, Wt as storefrontPublicProductVariantSchema, ge as storefrontReviewsModuleSchema, _e as storefrontRichTextSchema, Yr as storefrontRoutes, ve as storefrontSettingsSchema, ye as storefrontShopSchema, be as storefrontStatusSchema, fn as storefrontTimeSlotJourneySchema, dn as storefrontTimeSlotSchema, ln as storefrontTimeSlotsRequestSchema, un as storefrontTimeSlotsResponseSchema, xe as storefrontWorkspaceSchema, L as timeOfDaySchema, tt as toStorefrontAccessoryProducts, nt as toStorefrontBikeProducts, rt as toStorefrontBookingProducts, it as toStorefrontBookingProductsCollections, kn as useBookingPeriod, er as useFormField, Vn as useOptionalStorefront, Hn as useStorefront, Un as useStorefrontBookingProducts, st as useStorefrontCart, Wn as useStorefrontConfig, Gn as useStorefrontProducts, Kn as useStorefrontWorkspaceLanguage, Cn as useWhatsAppFloatingButton, te as validateBookingDeliveryAddress, ze as writeBookingSearchParamsToSessionStorage, Be as writeBookingSearchParamsToStorage };
74
+ import { accessories as xr } from "./data/accessories.js";
75
+ import Sr from "./data/bikes.js";
76
+ import { contractSaleDocumentAcceptanceLevelSchema as Cr, contractSaleDocumentAcceptanceRecordSchema as wr, contractSaleDocumentAcceptanceSchema as Tr, contractSaleDocumentAddressSchema as Er, contractSaleDocumentContactSchema as Dr, contractSaleDocumentKindSchema as Or, contractSaleDocumentLanguageCodeSchema as kr, contractSaleDocumentLanguageSchema as Ar, contractSaleDocumentLineItemSchema as jr, contractSaleDocumentSchema as Mr, contractSaleDocumentSignatureSchema as Nr } from "./lib/contractSaleDocument.js";
77
+ import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Pr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Fr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Ir, acceptContractSaleDocumentRequestSchema as Lr, acceptContractSaleDocumentResponseSchema as Rr, contractSaleDocumentAcceptanceInputSchema as zr, contractSaleDocumentAcceptanceRecordInputSchema as Br, contractSaleDocumentApiAcceptanceRecordSchema as Vr, contractSaleDocumentApiAcceptanceSchema as Hr, contractSaleDocumentApiSchema as Ur, contractSaleDocumentApiSignatureSchema as Wr, contractSaleDocumentReferenceSchema as Gr, contractSaleDocumentReferenceTypeSchema as Kr, contractSaleDocumentSignatureInputSchema as qr, downloadContractSaleDocumentPdfRequestSchema as Jr, getContractSaleDocumentRequestSchema as Yr, getContractSaleDocumentResponseSchema as Xr } from "./lib/contractSaleDocumentApi.js";
78
+ import Zr from "./routes.js";
79
+ import { Select as Qr, SelectContent as $r, SelectGroup as ei, SelectIcon as ti, SelectItem as ni, SelectItemIndicator as ri, SelectItemText as ii, SelectLabel as ai, SelectScrollDownButton as oi, SelectScrollUpButton as si, SelectSeparator as ci, SelectTrigger as li, SelectValue as ui } from "./ui/select.js";
80
+ export { Pr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, or as AboutSection, we as BOOKING_SEARCH_KEYS, gn as Badge, Fn as BookingEndDateField, In as BookingEndTimeField, zn as BookingFlowSteps, Ln as BookingMobileDateDrawer, An as BookingPeriodProvider, Rn as BookingPeriodSelector, Nn as BookingStartDateField, Pn as BookingStartTimeField, vn as Button, Ue as CATALOG_PRODUCT_BASE_RATE_UNSET, cr as Card, lr as CardAction, ur as CardContent, dr as CardDescription, fr as CardFooter, pr as CardHeader, mr as CardTitle, ir as ContactSection, vr as ContractSaleDocument, q as DEFAULT_BOOKING_DELIVERY_OPTION, R as DEFAULT_CANCELLATION_POLICY, z as DEFAULT_PAYMENT_POLICIES, Fr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, On as DelayedPlaceholder, kn as DelayedReveal, Vn as DeliveryAddressSelector, hn as Footer, Yn as Form, Xn as FormControl, Zn as FormDescription, Qn as FormField, $n as FormItem, er as FormLabel, tr as FormMessage, Ir as GET_CONTRACT_SALE_DOCUMENT_ROUTE, bn as Header, Bn as Input, Mn as Label, Dn as Layout, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, wn as PlatformFooter, Cn as PoweredByLoczerBadge, _r as ProductPriceBadge, hr as ProductWarningNotice, xt as ROUTE, yr as RadioGroup, br as RadioGroupItem, qt as STOREFRONT_AVAILABILITY_ROUTE, At as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, se as STOREFRONT_HERO_MODES, sn as STOREFRONT_IMAGE_ROUTE, It as STOREFRONT_PRODUCTS_ROUTE, un as STOREFRONT_TIME_SLOTS_ROUTE, Qr as Select, $r as SelectContent, ei as SelectGroup, ti as SelectIcon, ni as SelectItem, ri as SelectItemIndicator, ii as SelectItemText, ai as SelectLabel, oi as SelectScrollDownButton, si as SelectScrollUpButton, ci as SelectSeparator, li as SelectTrigger, ui as SelectValue, sr as StepSectionTitle, gr as StorefrontCartPanel, st as StorefrontCartProvider, Te as TIME_OPTIONS, ar as TestimonialsSection, rr as Textarea, En as WhatsAppFloatingButton, Lr as acceptContractSaleDocumentRequestSchema, Rr as acceptContractSaleDocumentResponseSchema, xr as accessories, h as accessoryProductSchema, Ee as applyBookingParamsToSearch, _n as badgeVariants, ne as baseAssetSchema, re as baseAssetStatusSchema, ie as baseBookingItemSchema, ae as baseBookingSchema, oe as baseBookingStateSchema, g as bikeProductSchema, Sr as bikes, J as bookingCustomerInputSchema, Y as bookingDeliveryOptionSchema, X as bookingScheduleInputSchema, mt as buildDailyPriceRows, ht as buildPriceTierLabels, Jt as buildStorefrontAvailabilityKey, bt as buildStorefrontCartSummary, cn as buildStorefrontImageUrl, We as buildStorefrontProductSlug, Ge as buildVariantStorefrontProductId, Dt as buildWhatsAppHref, yn as buttonVariants, gt as calculateDailyPriceForQuantity, B as cancellationPolicySchema, V as cancellationPolicyTierSchema, Z as cartItemInputSchema, ut as cn, Ke as compareCatalogProducts, qe as compareStorefrontAccessoryProducts, Je as compareStorefrontBikeProducts, zr as contractSaleDocumentAcceptanceInputSchema, Cr as contractSaleDocumentAcceptanceLevelSchema, Br as contractSaleDocumentAcceptanceRecordInputSchema, wr as contractSaleDocumentAcceptanceRecordSchema, Tr as contractSaleDocumentAcceptanceSchema, Er as contractSaleDocumentAddressSchema, Vr as contractSaleDocumentApiAcceptanceRecordSchema, Hr as contractSaleDocumentApiAcceptanceSchema, Ur as contractSaleDocumentApiSchema, Wr as contractSaleDocumentApiSignatureSchema, Dr as contractSaleDocumentContactSchema, Or as contractSaleDocumentKindSchema, kr as contractSaleDocumentLanguageCodeSchema, Ar as contractSaleDocumentLanguageSchema, jr as contractSaleDocumentLineItemSchema, Gr as contractSaleDocumentReferenceSchema, Kr as contractSaleDocumentReferenceTypeSchema, Mr as contractSaleDocumentSchema, qr as contractSaleDocumentSignatureInputSchema, Nr as contractSaleDocumentSignatureSchema, Q as createBookingInputBaseSchema, $ as createBookingInputSchema, De as createBookingPeriodConfigFromBookingEngineConfiguration, Oe as createBookingPeriodConfigFromShopConfiguration, ke as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, Yt as doesStorefrontAvailabilityDisplaySoldOut, Jr as downloadContractSaleDocumentPdfRequestSchema, _ as eBikeProductSchema, Ye as findStorefrontProduct, Xe as findStorefrontProductBySlug, dt as formatPriceMinor, wt as formatStorefrontPhoneDisplay, _t as formatStorefrontPriceMinor, U as fulfillmentModeSchema, ft as getAvailabilityVariant, Ae as getBookingDurationLabel, je as getBookingDurationMinutes, Me as getBookingParamsFromSearch, Ne as getBookingSessionStorageKey, Ze as getCatalogProductBaseRateMinor, Qe as getCatalogProductPaginationSort, $e as getCatalogProductSortFieldForPriceUnit, Yr as getContractSaleDocumentRequestSchema, Xr as getContractSaleDocumentResponseSchema, Pe as getDefaultBookingParams, Fe as getDefaultBookingParamsForStorefrontConfiguration, vt as getLocalizedEntry, t as getLocalizedStringValue, yt as getLocalizedValue, pt as getMinDayPriceMinor, Xt as getStorefrontAvailabilityIssue, Zt as getStorefrontAvailabilityStatus, et as getStorefrontBaseDailyRateMinor, tt as getStorefrontCheckoutProductId, nt as getStorefrontRepresentedVariantId, v as isProductVariantCodeIdentifierKind, Qt as isStorefrontAvailabilityInsufficient, k as isoDateSchema, Hn as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, H as paymentPoliciesSchema, Ie as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, y as productKindSchema, b as productSchema, x as productStorefrontDisplayModeSchema, S as productVariantAttributeSchema, C as productVariantCodeSchema, w as productVariantIdentifierSchema, T as productVariantSchema, $t as publicAvailabilityDisplayModeSchema, W as publicBookingEngineConfigurationSchema, G as publicCheckoutConfigurationSchema, K as publicCheckoutDynamicOptionsSchema, Le as readBookingSearchParamsFromSessionStorage, Re as readBookingSearchParamsFromStorage, St as requestSchema, ee as resolveBookingDeliveryOption, ze as resolveBookingSearchParams, Be as resolveBookingSearchParamsFromSessionStorage, ct as resolveStorefrontCartItemProduct, Tt as resolveStorefrontMapsHref, Et as resolveStorefrontPhoneContact, Ot as resolveStorefrontWhatsAppContact, kt as resolveStorefrontWhatsAppHref, Ct as responseSchema, E as richTextJsonDocSchema, D as richTextSchema, O as richTextVersionSchema, A as shopConfigurationSchema, j as shopExtraTimeSlotRuleSchema, M as shopOpeningDayIndexSchema, N as shopOpeningDaySchema, P as shopOpeningHoursOverrideSchema, F as shopOpeningHoursPeriodSchema, I as shopOpeningSlotSchema, nn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, rn as storefrontAvailabilityProductSchema, en as storefrontAvailabilityRequestSchema, tn as storefrontAvailabilityResponseSchema, an as storefrontAvailabilityScheduleSchema, ce as storefrontCheckoutModeSchema, Nt as storefrontCheckoutSubmitDeliveryRefinement, Mt as storefrontCheckoutSubmitItemSchema, jt as storefrontCheckoutSubmitRequestBaseSchema, Pt as storefrontCheckoutSubmitRequestSchema, Ft as storefrontCheckoutSubmitResponseSchema, le as storefrontConfigurationSchema, ue as storefrontContentSchema, xn as storefrontEn, de as storefrontFaqItemSchema, fe as storefrontFaqSchema, Sn as storefrontFr, pe as storefrontFulfillmentModeSchema, me as storefrontHeroModeSchema, ln as storefrontImageRequestSchema, he as storefrontLocalizedRichTextSchema, ge as storefrontModalMessageSchema, _e as storefrontModulesSchema, Lt as storefrontProductsRequestSchema, Rt as storefrontProductsResponseSchema, zt as storefrontPublicAccessoryProductSchema, on as storefrontPublicAvailabilityRecordSchema, Bt as storefrontPublicBikeAvailabilityStatusSchema, Vt as storefrontPublicBikeProductSchema, Ht as storefrontPublicProductDisplayModeSchema, Ut as storefrontPublicProductPriceSchema, Wt as storefrontPublicProductVariantAttributeSchema, Gt as storefrontPublicProductVariantIdentifierSchema, Kt as storefrontPublicProductVariantSchema, ve as storefrontReviewsModuleSchema, ye as storefrontRichTextSchema, Zr as storefrontRoutes, be as storefrontSettingsSchema, xe as storefrontShopSchema, Se as storefrontStatusSchema, mn as storefrontTimeSlotJourneySchema, pn as storefrontTimeSlotSchema, dn as storefrontTimeSlotsRequestSchema, fn as storefrontTimeSlotsResponseSchema, Ce as storefrontWorkspaceSchema, L as timeOfDaySchema, rt as toStorefrontAccessoryProducts, it as toStorefrontBikeProducts, at as toStorefrontBookingProducts, ot as toStorefrontBookingProductsCollections, jn as useBookingPeriod, nr as useFormField, Un as useOptionalStorefront, Wn as useStorefront, Gn as useStorefrontBookingProducts, lt as useStorefrontCart, Kn as useStorefrontConfig, qn as useStorefrontProducts, Jn as useStorefrontWorkspaceLanguage, Tn as useWhatsAppFloatingButton, te as validateBookingDeliveryAddress, Ve as writeBookingSearchParamsToSessionStorage, He as writeBookingSearchParamsToStorage };
@@ -6,6 +6,9 @@ export declare const paymentDecisionModeSchema: z.ZodEnum<{
6
6
  full: "full";
7
7
  }>;
8
8
  export type PaymentDecisionMode = z.infer<typeof paymentDecisionModeSchema>;
9
+ export declare const MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE = "online_payment_provider_missing";
10
+ export declare const checkoutPaymentErrorCodeSchema: z.ZodLiteral<"online_payment_provider_missing">;
11
+ export type CheckoutPaymentErrorCode = z.infer<typeof checkoutPaymentErrorCodeSchema>;
9
12
  export declare const requestSchema: z.ZodObject<{
10
13
  storeSlug: z.ZodString;
11
14
  schedule: z.ZodObject<{
@@ -21,6 +24,7 @@ export type RequestPayload = z.infer<typeof requestSchema>;
21
24
  export declare const responseSchema: z.ZodObject<{
22
25
  success: z.ZodBoolean;
23
26
  message: z.ZodOptional<z.ZodString>;
27
+ errorCode: z.ZodOptional<z.ZodLiteral<"online_payment_provider_missing">>;
24
28
  decision: z.ZodOptional<z.ZodObject<{
25
29
  shouldCollectOnlinePayment: z.ZodBoolean;
26
30
  paymentMode: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"checkoutPaymentDecision.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutPaymentDecision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,qDAAqD,CAAA;AAEvE,eAAO,MAAM,yBAAyB;;;;EAAsC,CAAA;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,aAAa;;;;;;;;;;iBAYxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"checkoutPaymentDecision.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutPaymentDecision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,qDAAqD,CAAA;AAEvE,eAAO,MAAM,yBAAyB;;;;EAAsC,CAAA;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC3E,eAAO,MAAM,0CAA0C,oCAAoC,CAAA;AAC3F,eAAO,MAAM,8BAA8B,iDAAwD,CAAA;AACnG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAErF,eAAO,MAAM,aAAa;;;;;;;;;;iBAYxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -4,7 +4,7 @@ var t = "/api/public/storefront/checkout/payment-decision", n = e.enum([
4
4
  "none",
5
5
  "deposit",
6
6
  "full"
7
- ]), r = e.object({
7
+ ]), r = "online_payment_provider_missing", i = e.literal(r), a = e.object({
8
8
  storeSlug: e.string().trim().min(1).toLowerCase(),
9
9
  schedule: e.object({
10
10
  startDate: e.string().regex(/^\d{4}-\d{2}-\d{2}$/),
@@ -14,9 +14,10 @@ var t = "/api/public/storefront/checkout/payment-decision", n = e.enum([
14
14
  }),
15
15
  estimatedTotalMinor: e.number().int().min(0),
16
16
  nowIso: e.string().datetime({ offset: !0 }).optional()
17
- }), i = e.object({
17
+ }), o = e.object({
18
18
  success: e.boolean(),
19
19
  message: e.string().optional(),
20
+ errorCode: i.optional(),
20
21
  decision: e.object({
21
22
  shouldCollectOnlinePayment: e.boolean(),
22
23
  paymentMode: n,
@@ -37,4 +38,4 @@ var t = "/api/public/storefront/checkout/payment-decision", n = e.enum([
37
38
  }).optional()
38
39
  });
39
40
  //#endregion
40
- export { t as ROUTE, n as paymentDecisionModeSchema, r as requestSchema, i as responseSchema };
41
+ export { r as MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE, t as ROUTE, i as checkoutPaymentErrorCodeSchema, n as paymentDecisionModeSchema, a as requestSchema, o as responseSchema };
@@ -1,4 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE } from './checkoutPaymentDecision';
3
+ export { MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE };
2
4
  export declare const ROUTE = "/api/public/storefront/checkout/submit";
3
5
  export declare const requestCheckoutItemSchema: z.ZodObject<{
4
6
  kind: any;
@@ -75,6 +77,7 @@ export type RequestPayload = z.infer<typeof requestSchema>;
75
77
  export declare const responseSchema: z.ZodObject<{
76
78
  success: z.ZodBoolean;
77
79
  message: z.ZodOptional<z.ZodString>;
80
+ errorCode: z.ZodOptional<z.ZodLiteral<"online_payment_provider_missing">>;
78
81
  checkout: z.ZodOptional<z.ZodObject<{
79
82
  bookingExternalId: z.ZodString;
80
83
  saleId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"checkoutSubmit.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,eAAO,MAAM,KAAK,2CAA2C,CAAA;AAE7D,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAI3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB5B,CAAA;AAEF,eAAO,MAAM,yBAAyB,GACpC,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EACxD,KAAK,CAAC,CAAC,aAAa,SAWrB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2D,CAAA;AACrF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;iBAYzB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"checkoutSubmit.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,OAAO,EAEL,0CAA0C,EAC3C,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,0CAA0C,EAAE,CAAA;AAGrD,eAAO,MAAM,KAAK,2CAA2C,CAAA;AAE7D,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAI3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB5B,CAAA;AAEF,eAAO,MAAM,yBAAyB,GACpC,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EACxD,KAAK,CAAC,CAAC,aAAa,SAWrB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2D,CAAA;AACrF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;iBAazB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -2,45 +2,47 @@ import { productKindSchema as e } from "../chunks/booking-engine/dist/models/Pro
2
2
  import { DEFAULT_BOOKING_DELIVERY_OPTION as t, bookingScheduleInputSchema as n } from "../chunks/booking-engine/dist/schemas/cart-inputs-j1yWfJxO.js";
3
3
  import "../chunks/booking-engine/dist/schemas-DftrSnTE.js";
4
4
  import { storefrontFulfillmentModeSchema as r } from "../storefrontSchemas.js";
5
- import { z as i } from "zod";
5
+ import { MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE as i, checkoutPaymentErrorCodeSchema as a } from "./checkoutPaymentDecision.js";
6
+ import { z as o } from "zod";
6
7
  //#region src/lib/checkoutSubmit.ts
7
- var a = "/api/public/storefront/checkout/submit", o = i.object({
8
+ var s = "/api/public/storefront/checkout/submit", c = o.object({
8
9
  kind: e,
9
- productId: i.string().trim().min(1),
10
- productVariantId: i.string().trim().min(1).optional(),
11
- quantity: i.number().int().positive()
12
- }), s = i.object({
13
- storeSlug: i.string().trim().min(1).toLowerCase(),
10
+ productId: o.string().trim().min(1),
11
+ productVariantId: o.string().trim().min(1).optional(),
12
+ quantity: o.number().int().positive()
13
+ }), l = o.object({
14
+ storeSlug: o.string().trim().min(1).toLowerCase(),
14
15
  schedule: n,
15
16
  fulfillment: r.default(t),
16
- startAddress: i.string().trim().max(500).optional(),
17
- endAddress: i.string().trim().max(500).optional(),
18
- couponCode: i.string().trim().max(64).optional().or(i.literal("")),
19
- couponAutoApplied: i.boolean().optional(),
20
- customer: i.object({
21
- fullName: i.string().trim().min(2),
22
- email: i.string().trim().email(),
23
- phone: i.string().trim().min(6),
24
- notes: i.string().trim().max(2e3).optional().or(i.literal(""))
17
+ startAddress: o.string().trim().max(500).optional(),
18
+ endAddress: o.string().trim().max(500).optional(),
19
+ couponCode: o.string().trim().max(64).optional().or(o.literal("")),
20
+ couponAutoApplied: o.boolean().optional(),
21
+ customer: o.object({
22
+ fullName: o.string().trim().min(2),
23
+ email: o.string().trim().email(),
24
+ phone: o.string().trim().min(6),
25
+ notes: o.string().trim().max(2e3).optional().or(o.literal(""))
25
26
  }),
26
- items: i.array(o).min(1),
27
- nowIso: i.string().datetime({ offset: !0 }).optional()
28
- }), c = (e, t) => {
27
+ items: o.array(c).min(1),
28
+ nowIso: o.string().datetime({ offset: !0 }).optional()
29
+ }), u = (e, t) => {
29
30
  e.fulfillment === "delivery" && (e.startAddress?.trim() || t.addIssue({
30
- code: i.ZodIssueCode.custom,
31
+ code: o.ZodIssueCode.custom,
31
32
  message: "Delivery start address is required.",
32
33
  path: ["startAddress"]
33
34
  }));
34
- }, l = s.superRefine(c), u = i.object({
35
- success: i.boolean(),
36
- message: i.string().optional(),
37
- checkout: i.object({
38
- bookingExternalId: i.string().trim().min(1),
39
- saleId: i.string().trim().min(1),
40
- nextPath: i.string().trim().min(1),
41
- successPath: i.string().trim().min(1),
42
- requiresPayment: i.boolean()
35
+ }, d = l.superRefine(u), f = o.object({
36
+ success: o.boolean(),
37
+ message: o.string().optional(),
38
+ errorCode: a.optional(),
39
+ checkout: o.object({
40
+ bookingExternalId: o.string().trim().min(1),
41
+ saleId: o.string().trim().min(1),
42
+ nextPath: o.string().trim().min(1),
43
+ successPath: o.string().trim().min(1),
44
+ requiresPayment: o.boolean()
43
45
  }).optional()
44
46
  });
45
47
  //#endregion
46
- export { a as ROUTE, s as requestBaseSchema, o as requestCheckoutItemSchema, c as requestDeliveryRefinement, l as requestSchema, u as responseSchema };
48
+ export { i as MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE, s as ROUTE, l as requestBaseSchema, c as requestCheckoutItemSchema, u as requestDeliveryRefinement, d as requestSchema, f as responseSchema };
@@ -1,6 +1,7 @@
1
- export type PlaygroundHeroMode = "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
1
+ import { StorefrontHeroMode } from '../storefrontSchemas';
2
+ export type PlaygroundHeroMode = StorefrontHeroMode;
2
3
  export type PlaygroundDevSettings = {
3
- heroMode: PlaygroundHeroMode;
4
+ heroMode: PlaygroundHeroMode | null;
4
5
  };
5
6
  export declare const DEFAULT_PLAYGROUND_DEV_SETTINGS: PlaygroundDevSettings;
6
7
  export declare const isStorefrontPlaygroundRuntime: () => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"playgroundDevSettings.d.ts","sourceRoot":"","sources":["../../src/lib/playgroundDevSettings.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,kBAAkB,GAC1B,sBAAsB,GACtB,0BAA0B,GAC1B,uBAAuB,CAAA;AAE3B,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,qBAE7C,CAAA;AAgBD,eAAO,MAAM,6BAA6B,eAOzC,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,qBAc5C,CAAA;AAMD,eAAO,MAAM,0BAA0B,GAAI,cAAc,qBAAqB,SAsB7E,CAAA;AAED,eAAO,MAAM,0BAA0B,YAEtC,CAAA;AAED,eAAO,MAAM,wBAAwB,6BAkCpC,CAAA"}
1
+ {"version":3,"file":"playgroundDevSettings.d.ts","sourceRoot":"","sources":["../../src/lib/playgroundDevSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAA;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,qBAE7C,CAAA;AAgBD,eAAO,MAAM,6BAA6B,eAOzC,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,qBAc5C,CAAA;AAMD,eAAO,MAAM,0BAA0B,GAAI,cAAc,qBAAqB,SAsB7E,CAAA;AAED,eAAO,MAAM,0BAA0B,YAEtC,CAAA;AAED,eAAO,MAAM,wBAAwB,6BAkCpC,CAAA"}
@@ -1,46 +1,47 @@
1
- import { useEffect as e, useState as t } from "react";
1
+ import { STOREFRONT_HERO_MODES as e } from "../storefrontSchemas.js";
2
+ import { useEffect as t, useState as n } from "react";
2
3
  //#region src/lib/playgroundDevSettings.ts
3
- var n = "__LOCZER_STOREFRONT_PLAYGROUND__", r = "loczer-storefront-playground-dev-settings", i = "loczer:storefront-playground-dev-settings", a = { heroMode: "current_booking_hero" }, o = (e) => {
4
- if (!e || typeof e != "object") return a;
4
+ var r = "__LOCZER_STOREFRONT_PLAYGROUND__", i = "loczer-storefront-playground-dev-settings", a = "loczer:storefront-playground-dev-settings", o = { heroMode: null }, s = (t) => e.some((e) => e === t), c = (e) => {
5
+ if (!e || typeof e != "object") return o;
5
6
  let t = e;
6
- return { heroMode: t.heroMode === "booking_bar_overlay_hero" || t.heroMode === "vertical_marquee_hero" ? t.heroMode : "current_booking_hero" };
7
- }, s = () => typeof window > "u" ? !1 : window[n] === !0, c = () => {
8
- if (typeof window > "u" || !s()) return a;
7
+ return { heroMode: s(t.heroMode) ? t.heroMode : null };
8
+ }, l = () => typeof window > "u" ? !1 : window[r] === !0, u = () => {
9
+ if (typeof window > "u" || !l()) return o;
9
10
  try {
10
- let e = window.localStorage.getItem(r);
11
- return e ? o(JSON.parse(e)) : a;
11
+ let e = window.localStorage.getItem(i);
12
+ return e ? c(JSON.parse(e)) : o;
12
13
  } catch {
13
- return a;
14
+ return o;
14
15
  }
15
- }, l = (e) => e.heroMode === a.heroMode, u = (e) => {
16
- if (typeof window > "u" || !s()) return;
17
- let t = o(e);
16
+ }, d = (e) => e.heroMode === o.heroMode, f = (e) => {
17
+ if (typeof window > "u" || !l()) return;
18
+ let t = c(e);
18
19
  try {
19
- l(t) ? window.localStorage.removeItem(r) : window.localStorage.setItem(r, JSON.stringify(t));
20
+ d(t) ? window.localStorage.removeItem(i) : window.localStorage.setItem(i, JSON.stringify(t));
20
21
  } catch {}
21
22
  try {
22
- window.dispatchEvent(new CustomEvent(i, { detail: t }));
23
+ window.dispatchEvent(new CustomEvent(a, { detail: t }));
23
24
  } catch {}
24
- }, d = () => {
25
- u(a);
26
- }, f = () => {
27
- let [n, a] = t(() => c());
28
- return e(() => {
29
- if (!s()) return;
25
+ }, p = () => {
26
+ f(o);
27
+ }, m = () => {
28
+ let [e, r] = n(() => u());
29
+ return t(() => {
30
+ if (!l()) return;
30
31
  let e = (e) => {
31
- e.key === r && a(c());
32
+ e.key === i && r(u());
32
33
  }, t = (e) => {
33
34
  let t = e;
34
35
  if (t.detail) {
35
- a(o(t.detail));
36
+ r(c(t.detail));
36
37
  return;
37
38
  }
38
- a(c());
39
+ r(u());
39
40
  };
40
- return window.addEventListener("storage", e), window.addEventListener(i, t), () => {
41
- window.removeEventListener("storage", e), window.removeEventListener(i, t);
41
+ return window.addEventListener("storage", e), window.addEventListener(a, t), () => {
42
+ window.removeEventListener("storage", e), window.removeEventListener(a, t);
42
43
  };
43
- }, []), n;
44
+ }, []), e;
44
45
  };
45
46
  //#endregion
46
- export { a as DEFAULT_PLAYGROUND_DEV_SETTINGS, s as isStorefrontPlaygroundRuntime, c as readPlaygroundDevSettings, d as resetPlaygroundDevSettings, f as usePlaygroundDevSettings, u as writePlaygroundDevSettings };
47
+ export { o as DEFAULT_PLAYGROUND_DEV_SETTINGS, l as isStorefrontPlaygroundRuntime, u as readPlaygroundDevSettings, p as resetPlaygroundDevSettings, m as usePlaygroundDevSettings, f as writePlaygroundDevSettings };
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAuGA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA0lBnC"}
1
+ {"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAwGA,MAAM,CAAC,OAAO,UAAU,YAAY,4CAkmBnC"}