@riverbankcms/sdk 0.167.0 → 0.169.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/_dts/{BlocksIslandsHydrator-Dgb-ptph.d.ts → BlocksIslandsHydrator-DpROiz12.d.ts} +1 -1
- package/dist/_dts/{Page-Bs3WxFgr.d.ts → Page-DHBBDRC_.d.ts} +7 -6
- package/dist/_dts/{SdkPreviewMode-DtUCsaHY.d.ts → SdkPreviewMode-CG7Qib7u.d.ts} +2 -2
- package/dist/_dts/{client-CwsI23pj.d.ts → client-MURxFla9.d.ts} +90 -418
- package/dist/_dts/{content-types-CAeP_-cV.d.ts → content-types-ClBGjxBV.d.ts} +2 -2
- package/dist/_dts/{contracts-BXHCiF-b.d.ts → contracts-CHNvzh0y.d.ts} +6 -4
- package/dist/_dts/{footerPageOutline-Bb2gbppW.d.ts → footerPageOutline-DQM934Fm.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-DaBBDx7M.d.ts → generatePageMetadata-ConZaEqB.d.ts} +2 -2
- package/dist/_dts/{index-CS6b1B-c.d.ts → index-BaDqRekr.d.ts} +4 -4
- package/dist/_dts/{index-bDln38Hm.d.ts → index-CVB5wgbz.d.ts} +2 -2
- package/dist/_dts/{index-D7EbliE3.d.ts → index-CiR_oPYT.d.ts} +3 -3
- package/dist/_dts/{index-5_jf52sZ.d.ts → index-CovKPftP.d.ts} +2 -2
- package/dist/_dts/{index-C20yUyob.d.ts → index-DCw8LO4M.d.ts} +1 -1
- package/dist/_dts/index-DDaX-K2D.d.ts +14 -0
- package/dist/_dts/{index-DeHDwMfu.d.ts → index-rfAssXq0.d.ts} +3 -3
- package/dist/_dts/{loadContent-CTqcL7CS.d.ts → loadContent-CRLKVVDP.d.ts} +7 -7
- package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +1 -0
- package/dist/_dts/{index-ChpjHK0U.d.ts → request-DeVetKBr.d.ts} +81273 -46979
- package/dist/_dts/{resolveBlockData-C3s9WMPs.d.ts → resolveBlockData-C5KYFeig.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-JPwgRxwh.d.ts → resolvePageContent-D8MZWyNO.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -5
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-BlaCuPLr.d.ts → types-B4MBlP_B.d.ts} +4 -2
- package/dist/_dts/{types-D-WElMCy.d.ts → types-Fj31kIi2.d.ts} +7 -7
- package/dist/_dts/{types-CwtTcaQP.d.ts → types-OwqfS8Gn.d.ts} +3 -3
- package/dist/_dts/{validation-Y5wD9fGK.d.ts → validation-B1Fa8o_b.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DFqkx158.mjs → BlocksIslandsHydrator-qq4Vhs7k.mjs} +21 -21
- package/dist/client/BookingMailingListNote-y3qWjnOo.mjs +957 -0
- package/dist/client/BookingQuestionFields-DjLjd0vc.mjs +359 -0
- package/dist/client/{CalendarNavigationChevron-DQwJ7BPx.mjs → CalendarNavigationChevron-VM7C2fdh.mjs} +8 -8
- package/dist/client/{CheckboxChoice-CZ-anOqV.mjs → CheckboxChoice-W_uiRgDK.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-DdkY86qI.mjs → DemoBookingPortalAccess-C2QCj_Ta.mjs} +68 -12
- package/dist/client/{EventCalendar.client-DAeQPV76.mjs → EventCalendar.client-DDjz7tuX.mjs} +10 -10
- package/dist/client/{EventCombined.client-Bus9R0bj.mjs → EventCombined.client-CeYbNsch.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-D_14yqAU.mjs → EventEmbeddedCheckoutStep-Cf-HRHtb.mjs} +1 -1
- package/dist/client/{EventItem-DPBLjGwj.mjs → EventItem-B5J0IeF4.mjs} +37 -15
- package/dist/client/{EventListWeekNavigation-D6cwU82_.mjs → EventListWeekNavigation-eH04D8-V.mjs} +1 -1
- package/dist/client/{EventListing.client-Bogi_SnJ.mjs → EventListing.client-slpvrTrM.mjs} +3 -3
- package/dist/client/{EventListing.view-CEumpN7i.mjs → EventListing.view-BYBaElec.mjs} +34 -16
- package/dist/client/{EventRegistrationPayment-CIQw6vNy.mjs → EventRegistrationPayment-Do7Q0wRG.mjs} +362 -90
- package/dist/client/{LocationMapActions-BVO-qx4q.mjs → LocationMapActions-BFp2uQQQ.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-CcGaFawl.mjs → MapDrawingSvg-DDWfmgpA.mjs} +1 -1
- package/dist/client/{Page-D4_H_u9V.mjs → Page-Dv9eIOGr.mjs} +4475 -1600
- package/dist/client/{ProtectedSubmitButton-8DuDw2ag.mjs → ProtectedSubmitButton-C3H26pN9.mjs} +1 -1
- package/dist/client/{StepIndicator-Dptantmg.mjs → StepIndicator-BZNUd0-v.mjs} +3 -3
- package/dist/client/{TabBarFragment-BxEGsKUx.mjs → TabBarFragment-DkVKtK5a.mjs} +1 -1
- package/dist/client/{ThemedButton-8jUc02mZ.mjs → ThemedButton-BdnEwA38.mjs} +2 -5
- package/dist/client/accessibleSurfaces-chpD4C2c.mjs +4278 -0
- package/dist/client/{accordion--EUHmEGa.mjs → accordion-BCtVxnDZ.mjs} +1 -1
- package/dist/client/{booking-form.client-BCXwOnhc.mjs → booking-form.client-Cr5G-HHO.mjs} +1323 -567
- package/dist/client/{bookingForm-sHHcdism.mjs → bookingForm-B1Fc62Sl.mjs} +9 -5
- package/dist/client/bookingQuestions-BHq83mzS.mjs +13 -0
- package/dist/client/{bookingRoute-Bqlyu5Vb.mjs → bookingRoute-D6DlxYx6.mjs} +6 -2
- package/dist/client/bookings.mjs +28 -20
- package/dist/client/{carousel-Cp9xPBFZ.mjs → carousel-DW-HgjvT.mjs} +3 -3
- package/dist/client/{carousel.client-BO7sCEpH.mjs → carousel.client-BD4DXMtI.mjs} +62 -16
- package/dist/client/{carousel.shared-DBnWEJzo.mjs → carousel.shared-BFQ3kBEw.mjs} +6 -3
- package/dist/client/{cart-CCZZC-Lq.mjs → cart-D1zWe4R7.mjs} +3 -3
- package/dist/client/{cart.client-B7JfA19I.mjs → cart.client-CIfbTLHS.mjs} +1 -1
- package/dist/client/{checkout-CipmYL4A.mjs → checkout-fDCNZ3IT.mjs} +3 -3
- package/dist/client/{checkout.client-DraalWdH.mjs → checkout.client-C4l2KjtV.mjs} +1 -1
- package/dist/client/{checkoutUrls-CYj06rX1.mjs → checkoutUrls-cWL6I-Vz.mjs} +3 -2
- package/dist/client/client.mjs +287 -63
- package/dist/client/{context-Cv3QHjAF.mjs → context-DQnTyApV.mjs} +320 -4
- package/dist/client/creditProducts-CMOmhWm2.mjs +364 -0
- package/dist/client/{cta-P2vJVTEn.mjs → cta-Bj5WHgcv.mjs} +2 -2
- package/dist/client/{dateFormatting-D8D47VT4.mjs → dateFormatting-Bv6kjUW3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CXWZoV-d.mjs → demoPortalMagicLink-3uVu3WgG.mjs} +1 -1
- package/dist/client/{site-styles-D56hT2u1.mjs → display-CT8KMSpH.mjs} +19832 -17912
- package/dist/client/{enhanceHeaderSection-BkAro1DJ.mjs → enhanceHeaderSection-B27KFGDv.mjs} +4 -3
- package/dist/client/{event-details.client-dLmyuPap.mjs → event-details.client-CL4Lqz2c.mjs} +1 -1
- package/dist/client/{event-registration.client-BEhC2_-Y.mjs → event-registration.client-Dj3Kyp5X.mjs} +118 -241
- package/dist/client/{eventCalendar-FBMS2Cpb.mjs → eventCalendar-DGsdSF8J.mjs} +4 -4
- package/dist/client/{eventCombined-BrBhUvGe.mjs → eventCombined-DFSVDJ3D.mjs} +4 -4
- package/dist/client/{eventDetails-C7WUrbZ2.mjs → eventDetails-DzMskXYA.mjs} +2 -2
- package/dist/client/{eventListing-Bih-BgQM.mjs → eventListing-CpFFcAUr.mjs} +4 -4
- package/dist/client/{eventRegistration-DfTlqGbl.mjs → eventRegistration-BipMUOCw.mjs} +8 -5
- package/dist/client/{form-Bw1uuiUs.mjs → form-57k2JQnm.mjs} +3 -3
- package/dist/client/{form.client-pZ-9gN33.mjs → form.client-CCl6CpRJ.mjs} +5 -5
- package/dist/client/{form.parts-PXlu6XQO.mjs → form.parts-BOJ1yDDf.mjs} +3 -3
- package/dist/client/{formatDate-DI3DP48e.mjs → formatDate-BGlhrmhF.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-BpJYUMd6.mjs → headerSection-q_bEzfhW.mjs} +2 -2
- package/dist/client/{mediaAssets-DpPauppt.mjs → mediaAssets-B99AP7ai.mjs} +1 -1
- package/dist/client/{mediaContext-BLo4NtjP.mjs → mediaContext-Fusweriw.mjs} +1 -1
- package/dist/client/{newsletter-form.client-CSoP0cGR.mjs → newsletter-form.client-CiqKAmPs.mjs} +6 -6
- package/dist/client/{newsletter-form.parts-DDbX_Sj0.mjs → newsletter-form.parts-x1RzAMNO.mjs} +2 -2
- package/dist/client/{newsletterForm-vCxYRar_.mjs → newsletterForm-Cn7h4zFe.mjs} +3 -3
- package/dist/client/{noop-ByVtIWf4.mjs → noop-B_f7RqLD.mjs} +544 -494
- package/dist/client/portal/client.mjs +86 -231
- package/dist/client/{product-detail.client-7Pi6avM-.mjs → product-detail.client-rWUvpVvZ.mjs} +1 -1
- package/dist/client/{product-list.client-DEad-Pma.mjs → product-list.client-J0wDOmKv.mjs} +1 -1
- package/dist/client/{productDetail-G1SMXG13.mjs → productDetail-LtCkMrJ0.mjs} +3 -3
- package/dist/client/{productList-B21TGdpT.mjs → productList-C0MLeh-v.mjs} +3 -3
- package/dist/client/{propsDecoder-B3vIBkex.mjs → propsDecoder-CAmEkJ6Y.mjs} +5 -4
- package/dist/client/{registry.server-B8aQhJpO.mjs → registry.server-Bf2YX_4v.mjs} +2218 -2435
- package/dist/client/{surfaceTransportMarker-BXepAVF6.mjs → renderableMediaAssetAdmission-BlfqYLJW.mjs} +1 -18
- package/dist/client/rendering/client.mjs +30 -30
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +10 -9
- package/dist/client/{richText-coerce-DHkBtO0G.mjs → richText-coerce-BTurYEao.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DbHX4JOS.mjs → routeIslandApiConfig-UdAlnZGQ.mjs} +1 -1
- package/dist/client/runtimeResponse-BP-L6exS.mjs +3 -0
- package/dist/client/runtimeResponse-Dg4XFsuM.mjs +9 -0
- package/dist/client/{shop-mqyoOvOK.mjs → shop-Dkn6EasY.mjs} +3 -3
- package/dist/client/{shop-commerce-B2UmrQg_.mjs → shop-commerce-bo0Z6kwf.mjs} +13 -13
- package/dist/client/{shop-commerce-store-B7n-Z7nY.mjs → shop-commerce-store-Ckxa4_jI.mjs} +1 -1
- package/dist/client/{shop.client-BH-BBnA9.mjs → shop.client-B_GqU6_U.mjs} +111 -32
- package/dist/client/{shop.interactive-mdM3UMWG.mjs → shop.interactive-C6L_Ig5F.mjs} +87 -528
- package/dist/client/{shopShared-CXF5wxdg.mjs → shopShared-CO1Y8lFd.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/src-BozhJ43Z.mjs +3 -0
- package/dist/client/{src-1PJxc8KO.mjs → src-xrjaKaCj.mjs} +6 -8
- package/dist/client/surfaceTransportMarker-BuwkYxsI.mjs +19 -0
- package/dist/client/{timetableModel-CrC80EOG.mjs → timetableModel-D62jfOxZ.mjs} +12 -12
- package/dist/client/{types-sF-IrGQr.mjs → types-5fOsPIpL.mjs} +248 -111
- package/dist/client/{useAvailableSlots-C4LOaI_Z.mjs → useAvailableSlots-CStfVmyY.mjs} +3 -3
- package/dist/client/{useDiscountApply-6Q0nToVA.mjs → useDiscountApply-Ca2pHUDu.mjs} +6 -4
- package/dist/client/{useDiscountCodeUi-CM-DTX5X.mjs → useDiscountCodeUi-AEifktGO.mjs} +1 -1
- package/dist/client/{useEventPagination-Bcs89BR5.mjs → useEventPagination-uxnUWI2v.mjs} +7 -7
- package/dist/client/{view-BN-fxyfq.mjs → view-B6KSxQMO.mjs} +11 -7
- package/dist/client/{view-Dh2tGoS0.mjs → view-SVnWic7i.mjs} +3 -4
- package/dist/preview-next/client/{ArrangementLookControls-D4VjPs-r.mjs → ArrangementLookControls-kbdqYkWM.mjs} +26 -17
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-C_h1cMYm.mjs → EventEmbeddedCheckoutStep-8-qtHjpb.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-D56RD3e_.mjs → LocationPickerEnvironment-CZQ4vkRe.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-DFnyCckr.mjs → MapLibreEditMap-CP4w7T_0.mjs} +2 -2
- package/dist/preview-next/client/{PreviewEditorSidebar-Ckr2zk_L.mjs → PreviewEditorSidebar-DI_LhsMQ.mjs} +212 -55
- package/dist/preview-next/client/{PreviewEditorUI-KOZgw_gS.mjs → PreviewEditorUI-yyD-ZREP.mjs} +6 -6
- package/dist/preview-next/client/{PreviewShell-CyO2V4kB.mjs → PreviewShell-YauP65Gi.mjs} +199 -155
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DW3uKvNF.mjs → SdkPreviewModeRuntime-Bl7jQMI1.mjs} +32 -32
- package/dist/preview-next/client/{SiteChromeCustomizeButton-CU9VD-7O.mjs → SiteChromeCustomizeButton-CQFRP9aM.mjs} +4772 -3687
- package/dist/preview-next/client/{ThemedButton-C0dgGJ5k.mjs → ThemedButton-BQU45t-E.mjs} +260 -121
- package/dist/preview-next/client/{lucide-react-CPBCf6QT.mjs → lucide-react-DkZ8fO-G.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-DBi-WybM.mjs → previewAssistantSlot-DSR0IdAw.mjs} +16547 -13046
- package/dist/preview-next/client/{previewChromeSurface-BhkUJst9.mjs → previewChromeSurface-uSnVzeNs.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-BjCb6lOn.mjs → sdk-runtime-6Q0RVJTQ.mjs} +2 -2
- package/dist/preview-next/client/{src-DY8JCJdE.mjs → src-DzXUmsyK.mjs} +6 -8
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +3 -0
- package/dist/preview-next/client/{useAutosaveStatus-CKxTaC3j.mjs → useAutosaveStatus-Cdx3kAGm.mjs} +2 -2
- package/dist/preview-next/client/{useBlockCustomizeControls-B7MLTjBX.mjs → useBlockCustomizeControls-ZrWdhcB6.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BTUc0g9X.mjs → useOpenBlockForSetup-CK-GWb9k.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-Bv3nkdpV.mjs → route-contract-BU1m9SV3.mjs} +212 -0
- package/dist/server/{Block.shared-4fMqzltx.mjs → Block.shared-4vx7wzxj.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-C72VC_lR.mjs → ThemeScopeCore-C3HLgqBF.mjs} +463 -127
- package/dist/server/{accessibleSurfaces-B_Y_dA20.mjs → accessibleSurfaces-108nxyGc.mjs} +319 -131
- package/dist/server/{bindings-ConMYJ2U.mjs → bindings-TAQbo2P5.mjs} +2 -2
- package/dist/server/{booking-form.reserved-fields-BWRF7509.mjs → booking-form.reserved-fields-Cqp13TKc.mjs} +1 -0
- package/dist/server/{client-Cot-H5fQ.mjs → client-DzCxEl3L.mjs} +308 -61
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +1 -1
- package/dist/server/{validation-CDd6m8Ry.mjs → customCss-QymcmOZ-.mjs} +12 -55
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/headerVariant-8O5MvxIU.mjs +464 -0
- package/dist/server/{identity-Bn9OQiT1.mjs → identity-20XHqyuO.mjs} +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BkaWYEwt.mjs → loadContent-BO1M9Hdf.mjs} +4 -5
- package/dist/server/{loadPage-kviUdH8c.mjs → loadPage-BvWzmZcD.mjs} +2 -2
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/{media-DnlczCMA.mjs → media-Brn9FW5s.mjs} +15 -1
- package/dist/server/{mode-Cv_TG9gP.mjs → mode-bkFS8glh.mjs} +4 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-BTnS09GS.mjs → opaqueSurface-BawlEAd_.mjs} +6 -6
- package/dist/server/{overrideResolution-itXZCXs7.mjs → overrideResolution-fxuB1zZg.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-CDyn7iLy.mjs → pageRenderPlan-DzduDSqY.mjs} +255 -158
- package/dist/server/{pageRuntimeSupport-DZ6cLxrM.mjs → pageRuntimeSupport-BU8pwTNx.mjs} +291 -5
- package/dist/server/{pageShared-Q_Vij87H.mjs → pageShared-CSOJ8p8E.mjs} +1303 -907
- package/dist/server/{schema-DEizlyi4.mjs → parseThemeForPersistence-BebSeE17.mjs} +593 -1592
- package/dist/server/{prebuild-DOG4MkOy.mjs → prebuild-C5ZYo7wA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-DlprLLsc.mjs → prefetchBlockData-BvbxqeKn.mjs} +5 -4
- package/dist/server/{registry-BPFcpn6k.mjs → registry-Fv-7D8o2.mjs} +4595 -4045
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-BHvfGD4y.mjs → resolveBlockData-xPgkvoWS.mjs} +1 -1
- package/dist/server/{resolveButtonColourStates-OXFRGn5M.mjs → resolveButtonColourStates-Cn6j8Ee0.mjs} +399 -518
- package/dist/server/{responseMedia-D8J3VAFs.mjs → responseMedia-t6gs0cB7.mjs} +2 -2
- package/dist/server/{richTextSchema-Euhuj-7V.mjs → richTextSchema-DQ2NBP0n.mjs} +5 -16
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -3
- package/dist/server/theme.mjs +1 -2
- package/dist/server/{three-pass-converter-_j2UE2tR.mjs → three-pass-converter-CQWdnfjV.mjs} +1 -1
- package/dist/server/{validation-bl6WcAi_.mjs → validation-DddhgNdb.mjs} +58 -9
- package/dist/server/{version-BLXZ31S-.mjs → version-D_W2mt8w.mjs} +1 -1
- package/dist/styles/index.css +342 -67
- package/package.json +4 -3
- package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
- package/dist/_dts/index-RugyUnqR.d.ts +0 -31535
- package/dist/client/BookingMailingListNote-CCVXX1LN.mjs +0 -331
- package/dist/client/DemoPortalSignInLink-B9YrzZt2.mjs +0 -19
- package/dist/client/creditProducts-BOWi1QLp.mjs +0 -62
- package/dist/client/site-styles-CMCUxsIM.mjs +0 -3
- package/dist/client/src-CdRISvQp.mjs +0 -3
- package/dist/client/src-DjnxOjXG.mjs +0 -217
- package/dist/client/useBookingNowIso-BDmWkYUW.mjs +0 -58
- package/dist/client/wizardSteps-DtkhwKXK.mjs +0 -6933
- package/dist/preview-next/client/src-BP8771hw.mjs +0 -3
- package/dist/server/parseThemeForPersistence-CDrF51tJ.mjs +0 -52
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as addMonths } from "./src-1PJxc8KO.mjs";
|
|
2
|
+
import { a as mediaIdentifierSchema, d as parseUuidBrand, f as err, n as renderableMediaAssetSchema, p as ok } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
|
|
3
|
+
import { c as addMonths } from "./src-xrjaKaCj.mjs";
|
|
5
4
|
import { z } from "zod";
|
|
6
5
|
//#region ../core/src/branded/customers.ts
|
|
7
6
|
const unsafeAsSiteTermsVersionId = (id) => id;
|
|
@@ -1005,25 +1004,355 @@ const SURFACE_EVENT_PRESET_VALUES = [
|
|
|
1005
1004
|
"performance"
|
|
1006
1005
|
];
|
|
1007
1006
|
//#endregion
|
|
1008
|
-
//#region ../
|
|
1009
|
-
/**
|
|
1010
|
-
* Strict record guard: excludes null, primitives, and arrays.
|
|
1011
|
-
*/
|
|
1007
|
+
//#region ../core/src/record-guards.ts
|
|
1012
1008
|
function isRecord(value) {
|
|
1013
1009
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1014
1010
|
}
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region ../site-contracts/src/siteData/eventQueries.ts
|
|
1013
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
1014
|
+
const eventSurfaceScopeValues = [
|
|
1015
|
+
"all",
|
|
1016
|
+
"regularClassSchedule",
|
|
1017
|
+
"specialDatedEvents",
|
|
1018
|
+
"custom"
|
|
1019
|
+
];
|
|
1020
|
+
const eventScheduleScopeValues = [
|
|
1021
|
+
"any",
|
|
1022
|
+
"recurring",
|
|
1023
|
+
"oneOff"
|
|
1024
|
+
];
|
|
1025
|
+
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
1026
|
+
function normalizeCalendarFilterId(value) {
|
|
1027
|
+
const id = value?.trim();
|
|
1028
|
+
return !id || id === "all" ? void 0 : id;
|
|
1029
|
+
}
|
|
1030
|
+
const calendarMonthSchema = z.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).refine((month) => Number(month.slice(0, 4)) > 0, "Invalid calendar year");
|
|
1031
|
+
function calendarMonthDate(month) {
|
|
1032
|
+
return {
|
|
1033
|
+
year: Number(month.slice(0, 4)),
|
|
1034
|
+
month: Number(month.slice(5, 7)),
|
|
1035
|
+
day: 1
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
const monthNumber = (month) => {
|
|
1039
|
+
const date = calendarMonthDate(month);
|
|
1040
|
+
return date.year * 12 + date.month - 1;
|
|
1041
|
+
};
|
|
1042
|
+
const calendarMonthWindowSchema = z.object({
|
|
1043
|
+
startMonth: calendarMonthSchema,
|
|
1044
|
+
endMonthExclusive: calendarMonthSchema
|
|
1045
|
+
}).refine((window) => {
|
|
1046
|
+
const width = monthNumber(window.endMonthExclusive) - monthNumber(window.startMonth);
|
|
1047
|
+
return width > 0 && width <= 3;
|
|
1048
|
+
}, "Calendar windows must cover one to three months");
|
|
1049
|
+
const calendarWindowQuerySchema = z.object({
|
|
1050
|
+
startMonth: calendarMonthSchema.optional(),
|
|
1051
|
+
endMonthExclusive: calendarMonthSchema.optional(),
|
|
1052
|
+
afterStartsAt: z.string().datetime({ offset: true }).optional(),
|
|
1053
|
+
afterId: z.string().uuid().optional(),
|
|
1054
|
+
limit: z.coerce.number().int().min(1).max(200).default(100),
|
|
1055
|
+
stage: z.enum(["published", "preview"]).default("published"),
|
|
1056
|
+
readProfile: z.enum(["listing-card", "timetable"]).optional(),
|
|
1057
|
+
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
1058
|
+
eventPresets: z.string().optional(),
|
|
1059
|
+
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
1060
|
+
seriesIds: z.string().optional(),
|
|
1061
|
+
categoryIds: z.string().optional(),
|
|
1062
|
+
venueId: z.string().transform(normalizeCalendarFilterId).optional(),
|
|
1063
|
+
staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
|
|
1064
|
+
}).superRefine((query, ctx) => {
|
|
1065
|
+
if (Boolean(query.startMonth) !== Boolean(query.endMonthExclusive)) ctx.addIssue({
|
|
1066
|
+
code: "custom",
|
|
1067
|
+
message: "Both month bounds are required"
|
|
1068
|
+
});
|
|
1069
|
+
if (query.startMonth && query.endMonthExclusive && !calendarMonthWindowSchema.safeParse(query).success) ctx.addIssue({
|
|
1070
|
+
code: "custom",
|
|
1071
|
+
message: "Invalid calendar window"
|
|
1072
|
+
});
|
|
1073
|
+
if (Boolean(query.afterStartsAt) !== Boolean(query.afterId)) ctx.addIssue({
|
|
1074
|
+
code: "custom",
|
|
1075
|
+
message: "Both cursor fields are required"
|
|
1076
|
+
});
|
|
1077
|
+
if (query.afterStartsAt && !query.startMonth) ctx.addIssue({
|
|
1078
|
+
code: "custom",
|
|
1079
|
+
message: "A continuation requires explicit month bounds"
|
|
1080
|
+
});
|
|
1081
|
+
});
|
|
1082
|
+
const calendarSourceCursorSchema = z.object({
|
|
1083
|
+
startsAt: z.string().datetime({ offset: true }),
|
|
1084
|
+
occurrenceId: z.string().uuid()
|
|
1085
|
+
});
|
|
1086
|
+
z.discriminatedUnion("kind", [z.object({ kind: z.literal("complete") }), z.object({
|
|
1087
|
+
kind: z.literal("partial"),
|
|
1088
|
+
nextCursor: calendarSourceCursorSchema
|
|
1089
|
+
})]);
|
|
1090
|
+
const publicEventLoaderQuerySchemaShape = {
|
|
1091
|
+
limit: z.string().optional(),
|
|
1092
|
+
from: z.string().optional(),
|
|
1093
|
+
to: z.string().optional(),
|
|
1094
|
+
afterStartsAt: z.string().optional(),
|
|
1095
|
+
afterId: z.string().optional(),
|
|
1096
|
+
categoryIds: z.string().optional(),
|
|
1097
|
+
venueId: z.string().optional(),
|
|
1098
|
+
staffMemberId: z.string().optional(),
|
|
1099
|
+
eventSurface: z.string().optional(),
|
|
1100
|
+
eventPresets: z.string().optional(),
|
|
1101
|
+
scheduleScope: z.string().optional(),
|
|
1102
|
+
seriesId: z.string().optional(),
|
|
1103
|
+
seriesIds: z.string().optional(),
|
|
1104
|
+
runSeriesId: z.string().optional(),
|
|
1105
|
+
seriesSlug: z.string().optional(),
|
|
1106
|
+
occurrenceIds: z.string().max(4e3).optional(),
|
|
1107
|
+
includeOccurrenceId: z.string().optional(),
|
|
1108
|
+
readIntent: z.string().optional(),
|
|
1109
|
+
detailAdmission: z.string().optional(),
|
|
1110
|
+
detailLevel: z.string().optional(),
|
|
1111
|
+
readProfile: z.string().optional()
|
|
1112
|
+
};
|
|
1113
|
+
z.object(publicEventLoaderQuerySchemaShape);
|
|
1114
|
+
//#endregion
|
|
1115
|
+
//#region ../site-contracts/src/siteData/products.ts
|
|
1116
|
+
const publicProductVariantSchema = z.object({
|
|
1117
|
+
id: z.string(),
|
|
1118
|
+
title: z.string(),
|
|
1119
|
+
sku: z.string().nullable(),
|
|
1120
|
+
priceCents: z.number(),
|
|
1121
|
+
stockQuantity: z.number().nullable(),
|
|
1122
|
+
soldOut: z.boolean()
|
|
1123
|
+
});
|
|
1124
|
+
const publicProductSchema = z.object({
|
|
1125
|
+
id: z.string(),
|
|
1126
|
+
contentEntryId: z.string().nullable(),
|
|
1127
|
+
title: z.string(),
|
|
1128
|
+
slug: z.string(),
|
|
1129
|
+
path: z.string().nullable(),
|
|
1130
|
+
status: z.enum(["draft", "active"]),
|
|
1131
|
+
priceCents: z.number(),
|
|
1132
|
+
currency: z.string(),
|
|
1133
|
+
productType: z.enum(["physical", "digital"]),
|
|
1134
|
+
requiresShipping: z.boolean(),
|
|
1135
|
+
hasVariants: z.boolean(),
|
|
1136
|
+
trackInventory: z.boolean(),
|
|
1137
|
+
soldOut: z.boolean(),
|
|
1138
|
+
category: z.object({
|
|
1139
|
+
id: z.string(),
|
|
1140
|
+
name: z.string(),
|
|
1141
|
+
slug: z.string()
|
|
1142
|
+
}).nullable(),
|
|
1143
|
+
summary: z.string().nullable(),
|
|
1144
|
+
body: z.unknown().nullable(),
|
|
1145
|
+
gallery: z.array(z.object({
|
|
1146
|
+
url: z.string(),
|
|
1147
|
+
alt: z.string().nullable()
|
|
1148
|
+
})),
|
|
1149
|
+
variants: z.array(publicProductVariantSchema)
|
|
1150
|
+
});
|
|
1015
1151
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
* NOTE: This intentionally narrows to UnknownRecord for compatibility with existing
|
|
1019
|
-
* callsites even though arrays pass at runtime. Follow-up cleanup should replace
|
|
1020
|
-
* this API with a more precise predicate type and migrate consumers.
|
|
1152
|
+
* Public pass product for shop display
|
|
1021
1153
|
*/
|
|
1022
|
-
|
|
1023
|
-
|
|
1154
|
+
const publicPassProductFields = {
|
|
1155
|
+
id: z.string(),
|
|
1156
|
+
productUseCase: z.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
1157
|
+
name: z.string(),
|
|
1158
|
+
description: z.string().nullable(),
|
|
1159
|
+
price: z.number(),
|
|
1160
|
+
currency: z.string(),
|
|
1161
|
+
creditsTotal: z.number(),
|
|
1162
|
+
pricePerCredit: z.number(),
|
|
1163
|
+
validDays: z.number().nullable(),
|
|
1164
|
+
eligibleCategoryIds: z.array(z.string()),
|
|
1165
|
+
eligibleCategoryNames: z.array(z.string()),
|
|
1166
|
+
heldWithTeamMember: z.object({
|
|
1167
|
+
id: z.string(),
|
|
1168
|
+
name: z.string()
|
|
1169
|
+
}).nullable().optional(),
|
|
1170
|
+
teamMemberSelection: z.discriminatedUnion("kind", [
|
|
1171
|
+
z.object({ kind: z.literal("any") }),
|
|
1172
|
+
z.object({
|
|
1173
|
+
kind: z.literal("owner"),
|
|
1174
|
+
teamMember: z.object({
|
|
1175
|
+
id: z.string(),
|
|
1176
|
+
name: z.string()
|
|
1177
|
+
})
|
|
1178
|
+
}),
|
|
1179
|
+
z.object({
|
|
1180
|
+
kind: z.literal("choose"),
|
|
1181
|
+
teamMembers: z.array(z.object({
|
|
1182
|
+
id: z.string(),
|
|
1183
|
+
name: z.string()
|
|
1184
|
+
}))
|
|
1185
|
+
})
|
|
1186
|
+
]).optional()
|
|
1187
|
+
};
|
|
1188
|
+
const purchasablePublicPassProductSchema = z.object({
|
|
1189
|
+
...publicPassProductFields,
|
|
1190
|
+
purchaseAvailability: z.literal("purchasable")
|
|
1191
|
+
});
|
|
1192
|
+
const publicPassProductSchema = z.discriminatedUnion("purchaseAvailability", [purchasablePublicPassProductSchema, z.object({
|
|
1193
|
+
...publicPassProductFields,
|
|
1194
|
+
purchaseAvailability: z.literal("display_only"),
|
|
1195
|
+
unavailabilityReason: z.literal("online_payments_unavailable")
|
|
1196
|
+
})]);
|
|
1197
|
+
/**
|
|
1198
|
+
* Public membership product for shop display
|
|
1199
|
+
*/
|
|
1200
|
+
const publicMembershipProductFields = {
|
|
1201
|
+
id: z.string(),
|
|
1202
|
+
name: z.string(),
|
|
1203
|
+
description: z.string().nullable(),
|
|
1204
|
+
price: z.number(),
|
|
1205
|
+
currency: z.string(),
|
|
1206
|
+
billingInterval: z.enum(["month", "year"]),
|
|
1207
|
+
eligibleCategoryIds: z.array(z.string()),
|
|
1208
|
+
eligibleCategoryNames: z.array(z.string())
|
|
1209
|
+
};
|
|
1210
|
+
const purchasablePublicMembershipProductSchema = z.object({
|
|
1211
|
+
...publicMembershipProductFields,
|
|
1212
|
+
purchaseAvailability: z.literal("purchasable")
|
|
1213
|
+
});
|
|
1214
|
+
const publicMembershipProductSchema = z.discriminatedUnion("purchaseAvailability", [purchasablePublicMembershipProductSchema, z.object({
|
|
1215
|
+
...publicMembershipProductFields,
|
|
1216
|
+
purchaseAvailability: z.literal("display_only"),
|
|
1217
|
+
unavailabilityReason: z.literal("online_payments_unavailable")
|
|
1218
|
+
})]);
|
|
1219
|
+
//#endregion
|
|
1220
|
+
//#region ../site-contracts/src/siteData/eventVocabulary.ts
|
|
1221
|
+
const eventCalendarDisplayModeValues = [
|
|
1222
|
+
"combined",
|
|
1223
|
+
"calendar",
|
|
1224
|
+
"list",
|
|
1225
|
+
"timetable",
|
|
1226
|
+
"week-board",
|
|
1227
|
+
"week"
|
|
1228
|
+
];
|
|
1229
|
+
const eventCalendarDefaultViewValues = ["month", "week"];
|
|
1230
|
+
const eventCalendarListLayoutValues = [
|
|
1231
|
+
"stack",
|
|
1232
|
+
"grid",
|
|
1233
|
+
"compact"
|
|
1234
|
+
];
|
|
1235
|
+
const eventCalendarListLayoutCompatibleDisplayModeValues = ["combined", "list"];
|
|
1236
|
+
//#endregion
|
|
1237
|
+
//#region ../commerce/src/purchase/settlement.ts
|
|
1238
|
+
function normalizeCurrencyCode(raw) {
|
|
1239
|
+
const normalized = raw.trim().toUpperCase();
|
|
1240
|
+
if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
|
|
1241
|
+
return normalized;
|
|
1024
1242
|
}
|
|
1025
1243
|
//#endregion
|
|
1026
|
-
//#region ../
|
|
1244
|
+
//#region ../media-core/src/mediaKinds.ts
|
|
1245
|
+
const mediaTypeDiscriminants = [
|
|
1246
|
+
"image",
|
|
1247
|
+
"video",
|
|
1248
|
+
"audio",
|
|
1249
|
+
"document",
|
|
1250
|
+
"spreadsheet",
|
|
1251
|
+
"archive"
|
|
1252
|
+
];
|
|
1253
|
+
const DISPLAY_MEDIA_KINDS = [
|
|
1254
|
+
"image",
|
|
1255
|
+
"video",
|
|
1256
|
+
"audio"
|
|
1257
|
+
];
|
|
1258
|
+
const PUBLIC_FILE_FIELD_KINDS = [
|
|
1259
|
+
"document",
|
|
1260
|
+
"spreadsheet",
|
|
1261
|
+
"archive",
|
|
1262
|
+
"audio"
|
|
1263
|
+
];
|
|
1264
|
+
function isDisplayMediaKind(kind) {
|
|
1265
|
+
return DISPLAY_MEDIA_KINDS.includes(kind);
|
|
1266
|
+
}
|
|
1267
|
+
//#endregion
|
|
1268
|
+
//#region ../media-core/src/media.ts
|
|
1269
|
+
const hotspotSchema = z.object({
|
|
1270
|
+
x: z.number().min(0).max(1),
|
|
1271
|
+
y: z.number().min(0).max(1),
|
|
1272
|
+
radius: z.number().optional()
|
|
1273
|
+
});
|
|
1274
|
+
const rotationSchema = z.union([
|
|
1275
|
+
z.literal(0),
|
|
1276
|
+
z.literal(90),
|
|
1277
|
+
z.literal(180),
|
|
1278
|
+
z.literal(270)
|
|
1279
|
+
]);
|
|
1280
|
+
const rectSchema = z.tuple([
|
|
1281
|
+
z.number(),
|
|
1282
|
+
z.number(),
|
|
1283
|
+
z.number(),
|
|
1284
|
+
z.number()
|
|
1285
|
+
]);
|
|
1286
|
+
const aspectCropSchema = z.object({
|
|
1287
|
+
aspect: z.preprocess((value) => value == null ? void 0 : value, z.string().optional()),
|
|
1288
|
+
rect: z.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
1289
|
+
hotspot: z.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
1290
|
+
rotation: z.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
1291
|
+
});
|
|
1292
|
+
const transformSchema = z.object({
|
|
1293
|
+
aspectCrops: z.preprocess((value) => {
|
|
1294
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
1295
|
+
return value;
|
|
1296
|
+
}, z.record(z.string(), aspectCropSchema.catch({}))).optional(),
|
|
1297
|
+
rect: rectSchema.optional(),
|
|
1298
|
+
hotspot: hotspotSchema.optional(),
|
|
1299
|
+
rotation: rotationSchema.optional()
|
|
1300
|
+
});
|
|
1301
|
+
const mediaPosterSchema = z.discriminatedUnion("tag", [z.object({
|
|
1302
|
+
tag: z.literal("media"),
|
|
1303
|
+
identifier: mediaIdentifierSchema
|
|
1304
|
+
}).strict(), z.object({
|
|
1305
|
+
tag: z.literal("external-src"),
|
|
1306
|
+
src: z.string().url()
|
|
1307
|
+
}).strict()]);
|
|
1308
|
+
const mediaUsageShape = {
|
|
1309
|
+
purpose: z.string().optional(),
|
|
1310
|
+
placeholder: z.boolean().default(true).optional(),
|
|
1311
|
+
alt: z.string().optional(),
|
|
1312
|
+
filename: z.string().optional(),
|
|
1313
|
+
width: z.number().optional(),
|
|
1314
|
+
height: z.number().optional(),
|
|
1315
|
+
poster: mediaPosterSchema.optional(),
|
|
1316
|
+
transform: transformSchema.optional()
|
|
1317
|
+
};
|
|
1318
|
+
const environmentExclusions = {
|
|
1319
|
+
assetId: z.never().optional(),
|
|
1320
|
+
id: z.never().optional(),
|
|
1321
|
+
src: z.never().optional(),
|
|
1322
|
+
storageBucket: z.never().optional(),
|
|
1323
|
+
storagePath: z.never().optional(),
|
|
1324
|
+
mimeType: z.never().optional()
|
|
1325
|
+
};
|
|
1326
|
+
const mediaBaseSchema = z.object({
|
|
1327
|
+
...mediaUsageShape,
|
|
1328
|
+
...environmentExclusions,
|
|
1329
|
+
identifier: mediaIdentifierSchema
|
|
1330
|
+
}).strict();
|
|
1331
|
+
const imageMediaSchema = mediaBaseSchema.extend({ type: z.literal("image") });
|
|
1332
|
+
const videoMediaSchema = mediaBaseSchema.extend({ type: z.literal("video") });
|
|
1333
|
+
const mediaSchema = mediaBaseSchema.extend({ type: z.enum(mediaTypeDiscriminants) });
|
|
1334
|
+
const persistableMediaSchema = mediaSchema;
|
|
1335
|
+
const externalMediaSchema = z.object({
|
|
1336
|
+
...mediaUsageShape,
|
|
1337
|
+
...environmentExclusions,
|
|
1338
|
+
type: z.enum(mediaTypeDiscriminants),
|
|
1339
|
+
src: z.string().min(1),
|
|
1340
|
+
identifier: z.never().optional()
|
|
1341
|
+
}).strict();
|
|
1342
|
+
const assetMediaSchema = z.object({
|
|
1343
|
+
...mediaUsageShape,
|
|
1344
|
+
...environmentExclusions,
|
|
1345
|
+
type: z.enum(mediaTypeDiscriminants),
|
|
1346
|
+
asset: renderableMediaAssetSchema,
|
|
1347
|
+
identifier: z.never().optional()
|
|
1348
|
+
}).strict();
|
|
1349
|
+
const runtimeMediaSchema = z.union([
|
|
1350
|
+
mediaSchema,
|
|
1351
|
+
externalMediaSchema,
|
|
1352
|
+
assetMediaSchema
|
|
1353
|
+
]);
|
|
1354
|
+
//#endregion
|
|
1355
|
+
//#region ../core/src/rich-text-schema.ts
|
|
1027
1356
|
/**
|
|
1028
1357
|
* Shared Rich Text Schema
|
|
1029
1358
|
*
|
|
@@ -1102,6 +1431,144 @@ function isRichTextDoc(value) {
|
|
|
1102
1431
|
return RichTextDocSchema.safeParse(value).success;
|
|
1103
1432
|
}
|
|
1104
1433
|
//#endregion
|
|
1434
|
+
//#region ../blocks/src/system/runtime/api/schemas/bookingQuestions.ts
|
|
1435
|
+
const optionSchema = z.object({
|
|
1436
|
+
value: z.string(),
|
|
1437
|
+
label: z.string()
|
|
1438
|
+
});
|
|
1439
|
+
/** Everything a scalar question may carry besides its identity; all of it is optional. */
|
|
1440
|
+
const scalarFieldDetails = z.object({
|
|
1441
|
+
required: z.boolean(),
|
|
1442
|
+
placeholder: z.string(),
|
|
1443
|
+
helpText: z.string(),
|
|
1444
|
+
options: z.array(optionSchema),
|
|
1445
|
+
multiple: z.boolean(),
|
|
1446
|
+
minLength: z.number(),
|
|
1447
|
+
maxLength: z.number(),
|
|
1448
|
+
pattern: z.string(),
|
|
1449
|
+
min: z.number(),
|
|
1450
|
+
max: z.number()
|
|
1451
|
+
}).partial();
|
|
1452
|
+
const scalarFieldSchema = z.object({
|
|
1453
|
+
id: z.string().min(1),
|
|
1454
|
+
label: z.string(),
|
|
1455
|
+
type: z.enum([
|
|
1456
|
+
"text",
|
|
1457
|
+
"email",
|
|
1458
|
+
"textarea",
|
|
1459
|
+
"select",
|
|
1460
|
+
"radio",
|
|
1461
|
+
"checkbox",
|
|
1462
|
+
"tel",
|
|
1463
|
+
"url",
|
|
1464
|
+
"number",
|
|
1465
|
+
"date",
|
|
1466
|
+
"time"
|
|
1467
|
+
]),
|
|
1468
|
+
...scalarFieldDetails.shape
|
|
1469
|
+
});
|
|
1470
|
+
const documentFieldSchema = z.object({
|
|
1471
|
+
id: z.string().min(1),
|
|
1472
|
+
label: z.string(),
|
|
1473
|
+
type: z.literal("document_upload"),
|
|
1474
|
+
required: z.boolean().optional(),
|
|
1475
|
+
placeholder: z.string().optional(),
|
|
1476
|
+
helpText: z.string().optional(),
|
|
1477
|
+
allowedFileTypes: z.array(z.enum([
|
|
1478
|
+
"pdf",
|
|
1479
|
+
"image",
|
|
1480
|
+
"docx"
|
|
1481
|
+
])),
|
|
1482
|
+
maxBytes: z.number()
|
|
1483
|
+
});
|
|
1484
|
+
const fieldSchema = z.union([scalarFieldSchema, documentFieldSchema]);
|
|
1485
|
+
const sectionSchema = z.object({
|
|
1486
|
+
id: z.string(),
|
|
1487
|
+
title: z.string(),
|
|
1488
|
+
description: z.string().optional(),
|
|
1489
|
+
items: z.array(fieldSchema)
|
|
1490
|
+
});
|
|
1491
|
+
/** One answer as a booking flow holds it; also what drafts kept across a sign-in or payment return parse. */
|
|
1492
|
+
const bookingQuestionsAnswerValueSchema = z.union([
|
|
1493
|
+
z.string(),
|
|
1494
|
+
z.number(),
|
|
1495
|
+
z.boolean(),
|
|
1496
|
+
z.null(),
|
|
1497
|
+
z.array(z.string()),
|
|
1498
|
+
z.object({
|
|
1499
|
+
kind: z.literal("document_upload"),
|
|
1500
|
+
fileName: z.string(),
|
|
1501
|
+
mimeType: z.string(),
|
|
1502
|
+
bytes: z.number(),
|
|
1503
|
+
uploadId: z.string().optional()
|
|
1504
|
+
})
|
|
1505
|
+
]);
|
|
1506
|
+
const setSchema = z.object({
|
|
1507
|
+
requirementId: z.string().min(1),
|
|
1508
|
+
title: z.string(),
|
|
1509
|
+
sections: z.array(sectionSchema)
|
|
1510
|
+
});
|
|
1511
|
+
z.array(sectionSchema);
|
|
1512
|
+
const bookingQuestionAnswersSchema = z.record(z.string(), bookingQuestionsAnswerValueSchema);
|
|
1513
|
+
/** The presentation a public catalogue or the authenticated read hands the booking flows. */
|
|
1514
|
+
const beforeBookingQuestionsPresentationSchema = z.discriminatedUnion("kind", [
|
|
1515
|
+
z.object({ kind: z.literal("none") }),
|
|
1516
|
+
z.object({
|
|
1517
|
+
kind: z.literal("unavailable"),
|
|
1518
|
+
message: z.string()
|
|
1519
|
+
}),
|
|
1520
|
+
z.object({
|
|
1521
|
+
kind: z.literal("ask"),
|
|
1522
|
+
set: setSchema,
|
|
1523
|
+
signIn: z.enum(["offered", "not_offered"])
|
|
1524
|
+
}),
|
|
1525
|
+
z.object({
|
|
1526
|
+
kind: z.literal("prefill"),
|
|
1527
|
+
set: setSchema,
|
|
1528
|
+
answers: bookingQuestionAnswersSchema
|
|
1529
|
+
}),
|
|
1530
|
+
z.object({
|
|
1531
|
+
kind: z.literal("already_answered"),
|
|
1532
|
+
set: setSchema,
|
|
1533
|
+
answers: bookingQuestionAnswersSchema
|
|
1534
|
+
})
|
|
1535
|
+
]);
|
|
1536
|
+
//#endregion
|
|
1537
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
1538
|
+
const BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX = "booking_requirement_consent_";
|
|
1539
|
+
function toBookingRequirementConsentFieldId(requirementId) {
|
|
1540
|
+
return `${BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX}${requirementId}`;
|
|
1541
|
+
}
|
|
1542
|
+
function isBookingRequirementConsentFieldId(value) {
|
|
1543
|
+
return value.startsWith(BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX);
|
|
1544
|
+
}
|
|
1545
|
+
function toBookingRequirementConsentField(consent) {
|
|
1546
|
+
return {
|
|
1547
|
+
id: toBookingRequirementConsentFieldId(consent.requirementId),
|
|
1548
|
+
label: consent.title,
|
|
1549
|
+
type: "booking_requirement_consent",
|
|
1550
|
+
required: true,
|
|
1551
|
+
agreement: consent.agreement,
|
|
1552
|
+
checkboxLabel: consent.checkboxLabel
|
|
1553
|
+
};
|
|
1554
|
+
}
|
|
1555
|
+
const blockBookingConsentSchema = z.object({
|
|
1556
|
+
requirementId: z.string(),
|
|
1557
|
+
title: z.string(),
|
|
1558
|
+
agreement: RichTextDocSchema,
|
|
1559
|
+
checkboxLabel: z.string()
|
|
1560
|
+
});
|
|
1561
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
1562
|
+
id: z.string(),
|
|
1563
|
+
label: z.string(),
|
|
1564
|
+
type: z.literal("booking_requirement_consent"),
|
|
1565
|
+
required: z.literal(true),
|
|
1566
|
+
agreement: RichTextDocSchema,
|
|
1567
|
+
checkboxLabel: z.string().min(1)
|
|
1568
|
+
});
|
|
1569
|
+
/** The two live public carriers for consent copy: Event data and appointment fields. */
|
|
1570
|
+
const bookingConsentCarrierSchema = z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
1571
|
+
//#endregion
|
|
1105
1572
|
//#region ../core/src/booking-payment-schemas.ts
|
|
1106
1573
|
const bookingCourseInstalmentDeadlineSchema = z.enum(BOOKING_COURSE_INSTALMENT_DEADLINES);
|
|
1107
1574
|
const stripObject = (shape) => z.object(shape);
|
|
@@ -1222,66 +1689,7 @@ z.strictObject({
|
|
|
1222
1689
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
1223
1690
|
const blockBookingPaymentTermsSchema = bookingPaymentTermsSchema;
|
|
1224
1691
|
//#endregion
|
|
1225
|
-
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
1226
|
-
const BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX = "booking_requirement_consent_";
|
|
1227
|
-
function toBookingRequirementConsentFieldId(requirementId) {
|
|
1228
|
-
return `${BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX}${requirementId}`;
|
|
1229
|
-
}
|
|
1230
|
-
function isBookingRequirementConsentFieldId(value) {
|
|
1231
|
-
return value.startsWith(BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX);
|
|
1232
|
-
}
|
|
1233
|
-
function toBookingRequirementConsentField(consent) {
|
|
1234
|
-
return {
|
|
1235
|
-
id: toBookingRequirementConsentFieldId(consent.requirementId),
|
|
1236
|
-
label: consent.title,
|
|
1237
|
-
type: "booking_requirement_consent",
|
|
1238
|
-
required: true,
|
|
1239
|
-
agreement: consent.agreement,
|
|
1240
|
-
checkboxLabel: consent.checkboxLabel
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
const blockBookingConsentSchema = z.object({
|
|
1244
|
-
requirementId: z.string(),
|
|
1245
|
-
title: z.string(),
|
|
1246
|
-
agreement: RichTextDocSchema,
|
|
1247
|
-
checkboxLabel: z.string()
|
|
1248
|
-
});
|
|
1249
|
-
const bookingRequirementConsentFieldSchema = z.object({
|
|
1250
|
-
id: z.string(),
|
|
1251
|
-
label: z.string(),
|
|
1252
|
-
type: z.literal("booking_requirement_consent"),
|
|
1253
|
-
required: z.literal(true),
|
|
1254
|
-
agreement: RichTextDocSchema,
|
|
1255
|
-
checkboxLabel: z.string().min(1)
|
|
1256
|
-
});
|
|
1257
|
-
/** The two live public carriers for consent copy: Event data and appointment fields. */
|
|
1258
|
-
const bookingConsentCarrierSchema = z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
1259
|
-
//#endregion
|
|
1260
1692
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
1261
|
-
const publicEventLoaderQuerySchemaShape = {
|
|
1262
|
-
limit: z.string().optional(),
|
|
1263
|
-
from: z.string().optional(),
|
|
1264
|
-
to: z.string().optional(),
|
|
1265
|
-
afterStartsAt: z.string().optional(),
|
|
1266
|
-
afterId: z.string().optional(),
|
|
1267
|
-
categoryIds: z.string().optional(),
|
|
1268
|
-
venueId: z.string().optional(),
|
|
1269
|
-
staffMemberId: z.string().optional(),
|
|
1270
|
-
eventSurface: z.string().optional(),
|
|
1271
|
-
eventPresets: z.string().optional(),
|
|
1272
|
-
scheduleScope: z.string().optional(),
|
|
1273
|
-
seriesId: z.string().optional(),
|
|
1274
|
-
seriesIds: z.string().optional(),
|
|
1275
|
-
runSeriesId: z.string().optional(),
|
|
1276
|
-
seriesSlug: z.string().optional(),
|
|
1277
|
-
occurrenceIds: z.string().max(4e3).optional(),
|
|
1278
|
-
includeOccurrenceId: z.string().optional(),
|
|
1279
|
-
readIntent: z.string().optional(),
|
|
1280
|
-
detailAdmission: z.string().optional(),
|
|
1281
|
-
detailLevel: z.string().optional(),
|
|
1282
|
-
readProfile: z.string().optional()
|
|
1283
|
-
};
|
|
1284
|
-
z.object(publicEventLoaderQuerySchemaShape);
|
|
1285
1693
|
const eventPresetSchema = z.enum([
|
|
1286
1694
|
"event",
|
|
1287
1695
|
"class",
|
|
@@ -1545,6 +1953,7 @@ const publicEventBaseSchema = z.object({
|
|
|
1545
1953
|
}) }),
|
|
1546
1954
|
asksSiteTerms: z.boolean(),
|
|
1547
1955
|
consent: blockBookingConsentSchema.nullable(),
|
|
1956
|
+
bookingQuestions: beforeBookingQuestionsPresentationSchema,
|
|
1548
1957
|
accessRestriction: accessRestrictionSchema,
|
|
1549
1958
|
allowedCategoryIds: z.array(z.string()),
|
|
1550
1959
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -1569,70 +1978,65 @@ const publicEventSchema = z.union([publicEventBaseSchema.extend({
|
|
|
1569
1978
|
*/
|
|
1570
1979
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
1571
1980
|
//#endregion
|
|
1572
|
-
//#region ../
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
}
|
|
1582
|
-
return normalized.sort();
|
|
1981
|
+
//#region ../site-contracts/src/identity/presentationVocabulary.ts
|
|
1982
|
+
const arrangementModes = [
|
|
1983
|
+
"list",
|
|
1984
|
+
"calendar",
|
|
1985
|
+
"week",
|
|
1986
|
+
"combined"
|
|
1987
|
+
];
|
|
1988
|
+
function isArrangementMode(value) {
|
|
1989
|
+
return value === "list" || value === "calendar" || value === "week" || value === "combined";
|
|
1583
1990
|
}
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
"all",
|
|
1589
|
-
"regularClassSchedule",
|
|
1590
|
-
"specialDatedEvents",
|
|
1591
|
-
"custom"
|
|
1991
|
+
const tileTreatmentValues = [
|
|
1992
|
+
"default",
|
|
1993
|
+
"quiet",
|
|
1994
|
+
"brand-depth"
|
|
1592
1995
|
];
|
|
1593
|
-
const
|
|
1594
|
-
"
|
|
1595
|
-
"
|
|
1596
|
-
"
|
|
1996
|
+
const eventListTreatmentValues = [
|
|
1997
|
+
"plain",
|
|
1998
|
+
"lined-panel",
|
|
1999
|
+
"ruled-register",
|
|
2000
|
+
"editorial-register",
|
|
2001
|
+
"dense-index"
|
|
2002
|
+
];
|
|
2003
|
+
const eyebrowTreatmentValues = [
|
|
2004
|
+
"plain",
|
|
2005
|
+
"accent",
|
|
2006
|
+
"pill",
|
|
2007
|
+
"accent-pill",
|
|
2008
|
+
"pill-bounce",
|
|
2009
|
+
"accent-pill-bounce"
|
|
2010
|
+
];
|
|
2011
|
+
const visibleHeadingDecorationFamilyValues = ["organic-squiggle", "short-center-rule"];
|
|
2012
|
+
const headingDecorationOverrideValues = ["site-default", "off"];
|
|
2013
|
+
const headingDecorationColorTokenValues = [
|
|
2014
|
+
"text",
|
|
2015
|
+
"primary",
|
|
2016
|
+
"secondary",
|
|
2017
|
+
"accent",
|
|
2018
|
+
"border",
|
|
2019
|
+
"muted"
|
|
2020
|
+
];
|
|
2021
|
+
const accordionIconSetValues = [
|
|
2022
|
+
"plus",
|
|
2023
|
+
"chevron",
|
|
2024
|
+
"caret",
|
|
2025
|
+
"minimal-cross"
|
|
2026
|
+
];
|
|
2027
|
+
const accordionIconColorTokenValues = [
|
|
2028
|
+
"text",
|
|
2029
|
+
"muted",
|
|
2030
|
+
"primary",
|
|
2031
|
+
"secondary",
|
|
2032
|
+
"accent",
|
|
2033
|
+
"current"
|
|
2034
|
+
];
|
|
2035
|
+
const accordionIconMotionValues = [
|
|
2036
|
+
"none",
|
|
2037
|
+
"rotate",
|
|
2038
|
+
"swap"
|
|
1597
2039
|
];
|
|
1598
|
-
const unsafeAsEventCategoryId = (value) => value;
|
|
1599
|
-
const unsafeAsVenueId = (value) => value;
|
|
1600
|
-
function normalizeEventSurfaceScope(value) {
|
|
1601
|
-
return value === "regularClassSchedule" || value === "specialDatedEvents" || value === "custom" ? value : "all";
|
|
1602
|
-
}
|
|
1603
|
-
function normalizeEventScheduleScope(value) {
|
|
1604
|
-
return value === "recurring" || value === "oneOff" ? value : "any";
|
|
1605
|
-
}
|
|
1606
|
-
function isEventSurfacePreset(value) {
|
|
1607
|
-
return eventSurfacePresetValues.some((preset) => preset === value);
|
|
1608
|
-
}
|
|
1609
|
-
function normalizeEventSurfacePresets(value) {
|
|
1610
|
-
const normalized = (Array.isArray(value) ? value : typeof value === "string" ? value.split(",") : []).filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter(isEventSurfacePreset);
|
|
1611
|
-
return Array.from(new Set(normalized));
|
|
1612
|
-
}
|
|
1613
|
-
function normalizeEventSurfacePresetsCsv(value) {
|
|
1614
|
-
const normalized = normalizeEventSurfacePresets(value);
|
|
1615
|
-
return normalized.length > 0 ? normalized.join(",") : null;
|
|
1616
|
-
}
|
|
1617
|
-
function normalizeEventCategoryIds(value) {
|
|
1618
|
-
if (Array.isArray(value)) return normalizeIdList(value.filter((entry) => typeof entry === "string")).map(unsafeAsEventCategoryId);
|
|
1619
|
-
if (typeof value === "string") return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
|
|
1620
|
-
return [];
|
|
1621
|
-
}
|
|
1622
|
-
function normalizeEventCategoryIdsCsv(value) {
|
|
1623
|
-
const normalized = normalizeEventCategoryIds(value);
|
|
1624
|
-
return normalized.length > 0 ? normalized.join(",") : null;
|
|
1625
|
-
}
|
|
1626
|
-
function normalizeEventVenueId(value) {
|
|
1627
|
-
if (typeof value !== "string") return null;
|
|
1628
|
-
const trimmed = value.trim();
|
|
1629
|
-
return trimmed ? unsafeAsVenueId(trimmed) : null;
|
|
1630
|
-
}
|
|
1631
|
-
function normalizeEventStaffMemberId(value) {
|
|
1632
|
-
if (typeof value !== "string") return null;
|
|
1633
|
-
const trimmed = value.trim();
|
|
1634
|
-
return trimmed ? trimmed : null;
|
|
1635
|
-
}
|
|
1636
2040
|
//#endregion
|
|
1637
2041
|
//#region ../blocks/src/system/constants/events.ts
|
|
1638
2042
|
/**
|
|
@@ -1640,22 +2044,9 @@ function normalizeEventStaffMemberId(value) {
|
|
|
1640
2044
|
*
|
|
1641
2045
|
* Shared constants for event content types and booking system integration.
|
|
1642
2046
|
*/
|
|
1643
|
-
const eventCalendarDisplayModeValues = [
|
|
1644
|
-
"combined",
|
|
1645
|
-
"calendar",
|
|
1646
|
-
"list",
|
|
1647
|
-
"timetable",
|
|
1648
|
-
"week-board",
|
|
1649
|
-
"week"
|
|
1650
|
-
];
|
|
1651
|
-
const eventCalendarDefaultViewValues = ["month", "week"];
|
|
1652
|
-
const eventCalendarListLayoutValues = [
|
|
1653
|
-
"stack",
|
|
1654
|
-
"grid",
|
|
1655
|
-
"compact"
|
|
1656
|
-
];
|
|
1657
2047
|
const arrangementOnlyListLayouts = [
|
|
1658
2048
|
"ledger",
|
|
2049
|
+
"timetable-rows",
|
|
1659
2050
|
"day-groups",
|
|
1660
2051
|
"week-columns"
|
|
1661
2052
|
];
|
|
@@ -1674,7 +2065,6 @@ const eventCalendarListLayoutOptions = [
|
|
|
1674
2065
|
label: "Compact"
|
|
1675
2066
|
}
|
|
1676
2067
|
];
|
|
1677
|
-
const eventCalendarListLayoutCompatibleDisplayModeValues = ["combined", "list"];
|
|
1678
2068
|
function isEventCalendarDisplayMode(value) {
|
|
1679
2069
|
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
1680
2070
|
}
|
|
@@ -1755,66 +2145,9 @@ function eventCalendarListGroupingDecision(input) {
|
|
|
1755
2145
|
function resolveCalendarReadProfile(content) {
|
|
1756
2146
|
return resolveEventCalendarReadPlan(content).readProfile;
|
|
1757
2147
|
}
|
|
1758
|
-
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
1759
|
-
function normalizeCalendarFilterId(value) {
|
|
1760
|
-
const id = value?.trim();
|
|
1761
|
-
return !id || id === "all" ? void 0 : id;
|
|
1762
|
-
}
|
|
1763
|
-
const calendarMonthSchema = z.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).refine((month) => Number(month.slice(0, 4)) > 0, "Invalid calendar year");
|
|
1764
|
-
function calendarMonthDate(month) {
|
|
1765
|
-
return {
|
|
1766
|
-
year: Number(month.slice(0, 4)),
|
|
1767
|
-
month: Number(month.slice(5, 7)),
|
|
1768
|
-
day: 1
|
|
1769
|
-
};
|
|
1770
|
-
}
|
|
1771
2148
|
function calendarMonthKey(date) {
|
|
1772
2149
|
return `${String(date.year).padStart(4, "0")}-${String(date.month).padStart(2, "0")}`;
|
|
1773
2150
|
}
|
|
1774
|
-
const monthNumber = (month) => {
|
|
1775
|
-
const date = calendarMonthDate(month);
|
|
1776
|
-
return date.year * 12 + date.month - 1;
|
|
1777
|
-
};
|
|
1778
|
-
const calendarMonthWindowSchema = z.object({
|
|
1779
|
-
startMonth: calendarMonthSchema,
|
|
1780
|
-
endMonthExclusive: calendarMonthSchema
|
|
1781
|
-
}).refine((window) => {
|
|
1782
|
-
const width = monthNumber(window.endMonthExclusive) - monthNumber(window.startMonth);
|
|
1783
|
-
return width > 0 && width <= 3;
|
|
1784
|
-
}, "Calendar windows must cover one to three months");
|
|
1785
|
-
const calendarWindowQuerySchema = z.object({
|
|
1786
|
-
startMonth: calendarMonthSchema.optional(),
|
|
1787
|
-
endMonthExclusive: calendarMonthSchema.optional(),
|
|
1788
|
-
afterStartsAt: z.string().datetime({ offset: true }).optional(),
|
|
1789
|
-
afterId: z.string().uuid().optional(),
|
|
1790
|
-
limit: z.coerce.number().int().min(1).max(200).default(100),
|
|
1791
|
-
stage: z.enum(["published", "preview"]).default("published"),
|
|
1792
|
-
readProfile: z.enum(["listing-card", "timetable"]).optional(),
|
|
1793
|
-
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
1794
|
-
eventPresets: z.string().optional(),
|
|
1795
|
-
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
1796
|
-
seriesIds: z.string().optional(),
|
|
1797
|
-
categoryIds: z.string().optional(),
|
|
1798
|
-
venueId: z.string().transform(normalizeCalendarFilterId).optional(),
|
|
1799
|
-
staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
|
|
1800
|
-
}).superRefine((query, ctx) => {
|
|
1801
|
-
if (Boolean(query.startMonth) !== Boolean(query.endMonthExclusive)) ctx.addIssue({
|
|
1802
|
-
code: "custom",
|
|
1803
|
-
message: "Both month bounds are required"
|
|
1804
|
-
});
|
|
1805
|
-
if (query.startMonth && query.endMonthExclusive && !calendarMonthWindowSchema.safeParse(query).success) ctx.addIssue({
|
|
1806
|
-
code: "custom",
|
|
1807
|
-
message: "Invalid calendar window"
|
|
1808
|
-
});
|
|
1809
|
-
if (Boolean(query.afterStartsAt) !== Boolean(query.afterId)) ctx.addIssue({
|
|
1810
|
-
code: "custom",
|
|
1811
|
-
message: "Both cursor fields are required"
|
|
1812
|
-
});
|
|
1813
|
-
if (query.afterStartsAt && !query.startMonth) ctx.addIssue({
|
|
1814
|
-
code: "custom",
|
|
1815
|
-
message: "A continuation requires explicit month bounds"
|
|
1816
|
-
});
|
|
1817
|
-
});
|
|
1818
2151
|
function normalizedCsv(value) {
|
|
1819
2152
|
return [...new Set((value ?? "").split(",").map((part) => part.trim()).filter(Boolean))].sort().join(",");
|
|
1820
2153
|
}
|
|
@@ -1853,14 +2186,6 @@ function calendarWindowBounds(window, timeZone) {
|
|
|
1853
2186
|
endExclusive: end.startAt.toISOString()
|
|
1854
2187
|
};
|
|
1855
2188
|
}
|
|
1856
|
-
const calendarSourceCursorSchema = z.object({
|
|
1857
|
-
startsAt: z.string().datetime({ offset: true }),
|
|
1858
|
-
occurrenceId: z.string().uuid()
|
|
1859
|
-
});
|
|
1860
|
-
z.discriminatedUnion("kind", [z.object({ kind: z.literal("complete") }), z.object({
|
|
1861
|
-
kind: z.literal("partial"),
|
|
1862
|
-
nextCursor: calendarSourceCursorSchema
|
|
1863
|
-
})]);
|
|
1864
2189
|
const pageFields = {
|
|
1865
2190
|
scope: z.object({
|
|
1866
2191
|
key: z.string(),
|
|
@@ -1904,284 +2229,9 @@ function planCalendarMonthRanges(months) {
|
|
|
1904
2229
|
return ranges;
|
|
1905
2230
|
}
|
|
1906
2231
|
//#endregion
|
|
1907
|
-
//#region ../
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
|
|
1911
|
-
return normalized;
|
|
1912
|
-
}
|
|
1913
|
-
//#endregion
|
|
1914
|
-
//#region ../commerce/src/purchase/confirmationPaymentSchema.ts
|
|
1915
|
-
const settledBalanceSchema = z.strictObject({ kind: z.literal("settled") });
|
|
1916
|
-
const dueBalanceSchema = z.strictObject({
|
|
1917
|
-
kind: z.literal("due"),
|
|
1918
|
-
amountCents: z.number().int().positive().transform((value, ctx) => {
|
|
1919
|
-
const cents = parsePositiveCents(value);
|
|
1920
|
-
if (cents.ok) return cents.value;
|
|
1921
|
-
ctx.addIssue({
|
|
1922
|
-
code: "custom",
|
|
1923
|
-
message: "Expected positive whole cents"
|
|
1924
|
-
});
|
|
1925
|
-
return z.NEVER;
|
|
1926
|
-
}),
|
|
1927
|
-
dueAt: z.string().nullable()
|
|
1928
|
-
});
|
|
1929
|
-
const paymentBalanceSchema = z.discriminatedUnion("kind", [settledBalanceSchema, dueBalanceSchema]);
|
|
1930
|
-
const currencySchema = z.string().regex(/^[A-Z]{3}$/).transform(normalizeCurrencyCode);
|
|
1931
|
-
const moneyFields = {
|
|
1932
|
-
amountPaidCents: z.number().int().nonnegative().transform(toNonNegativeCents),
|
|
1933
|
-
currency: currencySchema
|
|
1934
|
-
};
|
|
1935
|
-
const confirmationPaymentSchema = z.discriminatedUnion("kind", [
|
|
1936
|
-
z.strictObject({
|
|
1937
|
-
kind: z.literal("free"),
|
|
1938
|
-
balance: settledBalanceSchema
|
|
1939
|
-
}),
|
|
1940
|
-
z.strictObject({
|
|
1941
|
-
kind: z.literal("waived"),
|
|
1942
|
-
balance: settledBalanceSchema
|
|
1943
|
-
}),
|
|
1944
|
-
z.strictObject({
|
|
1945
|
-
kind: z.literal("pass"),
|
|
1946
|
-
passName: z.string().nullable(),
|
|
1947
|
-
passCreditsUsed: z.number().int().positive().nullable(),
|
|
1948
|
-
balance: settledBalanceSchema
|
|
1949
|
-
}),
|
|
1950
|
-
z.strictObject({
|
|
1951
|
-
kind: z.literal("membership"),
|
|
1952
|
-
membershipName: z.string().nullable(),
|
|
1953
|
-
balance: settledBalanceSchema
|
|
1954
|
-
}),
|
|
1955
|
-
z.strictObject({
|
|
1956
|
-
kind: z.literal("manual_due"),
|
|
1957
|
-
currency: currencySchema,
|
|
1958
|
-
balance: dueBalanceSchema
|
|
1959
|
-
}),
|
|
1960
|
-
z.strictObject({
|
|
1961
|
-
kind: z.literal("managed_balance_due"),
|
|
1962
|
-
...moneyFields,
|
|
1963
|
-
balance: dueBalanceSchema
|
|
1964
|
-
}),
|
|
1965
|
-
z.strictObject({
|
|
1966
|
-
kind: z.literal("monetary"),
|
|
1967
|
-
...moneyFields,
|
|
1968
|
-
paymentMethod: z.enum([
|
|
1969
|
-
"stripe",
|
|
1970
|
-
"store_credit",
|
|
1971
|
-
"mixed",
|
|
1972
|
-
"manual"
|
|
1973
|
-
]),
|
|
1974
|
-
balance: paymentBalanceSchema
|
|
1975
|
-
})
|
|
1976
|
-
]);
|
|
1977
|
-
//#endregion
|
|
1978
|
-
//#region ../blocks/src/system/runtime/api/schemas/events.ts
|
|
1979
|
-
const uuid = z.string().uuid();
|
|
1980
|
-
const eventRegistrationStatusReferenceSchema = z.discriminatedUnion("scope", [z.object({
|
|
1981
|
-
scope: z.literal("occurrence"),
|
|
1982
|
-
attendeeId: uuid
|
|
1983
|
-
}).strict(), z.object({
|
|
1984
|
-
scope: z.literal("wholeSeries"),
|
|
1985
|
-
registrationId: uuid
|
|
1986
|
-
}).strict()]);
|
|
1987
|
-
const eventRegistrationPaymentSubjectSchema = z.discriminatedUnion("scope", [z.object({
|
|
1988
|
-
scope: z.literal("occurrence"),
|
|
1989
|
-
submissionId: uuid,
|
|
1990
|
-
attendeeId: uuid
|
|
1991
|
-
}).strict(), z.object({
|
|
1992
|
-
scope: z.literal("wholeSeries"),
|
|
1993
|
-
submissionId: uuid
|
|
1994
|
-
}).strict()]);
|
|
1995
|
-
const identityFields = {
|
|
1996
|
-
submissionId: uuid,
|
|
1997
|
-
seriesId: uuid,
|
|
1998
|
-
attendanceMode: z.enum(["in_person", "online"])
|
|
1999
|
-
};
|
|
2000
|
-
const confirmedBookingIdentitySchema = z.discriminatedUnion("scope", [z.object({
|
|
2001
|
-
scope: z.literal("occurrence"),
|
|
2002
|
-
attendeeId: uuid,
|
|
2003
|
-
occurrenceId: uuid,
|
|
2004
|
-
...identityFields
|
|
2005
|
-
}).strict(), z.object({
|
|
2006
|
-
scope: z.literal("wholeSeries"),
|
|
2007
|
-
registrationId: uuid,
|
|
2008
|
-
...identityFields
|
|
2009
|
-
}).strict()]);
|
|
2010
|
-
const bookedTicketLineSchema = z.object({
|
|
2011
|
-
label: z.string().min(1),
|
|
2012
|
-
quantity: z.number().int().positive()
|
|
2013
|
-
}).strict();
|
|
2014
|
-
const arrivalFields = { arrivalVenues: z.record(uuid, z.string()).optional() };
|
|
2015
|
-
const eventBookingOutcomeSchema = z.discriminatedUnion("kind", [z.object({
|
|
2016
|
-
kind: z.literal("detailsAvailable"),
|
|
2017
|
-
identity: confirmedBookingIdentitySchema,
|
|
2018
|
-
ticketLines: z.tuple([bookedTicketLineSchema]).rest(bookedTicketLineSchema).readonly(),
|
|
2019
|
-
payment: confirmationPaymentSchema,
|
|
2020
|
-
...arrivalFields
|
|
2021
|
-
}).strict(), z.object({
|
|
2022
|
-
kind: z.literal("detailsUnavailable"),
|
|
2023
|
-
identity: confirmedBookingIdentitySchema,
|
|
2024
|
-
...arrivalFields
|
|
2025
|
-
}).strict()]);
|
|
2026
|
-
const eventEmbeddedCheckoutSchema = z.object({
|
|
2027
|
-
kind: z.literal("embedded"),
|
|
2028
|
-
sessionId: z.string().min(1),
|
|
2029
|
-
clientSecret: z.string().min(1),
|
|
2030
|
-
livemode: z.boolean(),
|
|
2031
|
-
expiresAt: z.string().datetime({ offset: true }),
|
|
2032
|
-
browser: z.discriminatedUnion("kind", [z.object({
|
|
2033
|
-
kind: z.literal("connect"),
|
|
2034
|
-
publishableKey: z.string().min(1),
|
|
2035
|
-
accountId: z.string().min(1)
|
|
2036
|
-
}).strict(), z.object({
|
|
2037
|
-
kind: z.literal("direct"),
|
|
2038
|
-
publishableKey: z.string().min(1)
|
|
2039
|
-
}).strict()])
|
|
2040
|
-
}).strict();
|
|
2041
|
-
const decorations = {
|
|
2042
|
-
mailingListSignupNote: z.enum(["confirmation_required", "not_confirmed"]).optional(),
|
|
2043
|
-
demoBookingPass: z.string().optional()
|
|
2044
|
-
};
|
|
2045
|
-
const eventRegistrationSummarySchema = z.object({
|
|
2046
|
-
message: z.string(),
|
|
2047
|
-
passCreditsRemaining: z.number().int().nonnegative().optional()
|
|
2048
|
-
}).strict();
|
|
2049
|
-
const eventRegisterResponseSchema = z.discriminatedUnion("kind", [
|
|
2050
|
-
z.object({
|
|
2051
|
-
kind: z.literal("bookingComplete"),
|
|
2052
|
-
outcome: eventBookingOutcomeSchema,
|
|
2053
|
-
summary: eventRegistrationSummarySchema,
|
|
2054
|
-
...decorations
|
|
2055
|
-
}).strict(),
|
|
2056
|
-
z.object({
|
|
2057
|
-
kind: z.literal("checkoutRequired"),
|
|
2058
|
-
reference: eventRegistrationStatusReferenceSchema,
|
|
2059
|
-
checkout: eventEmbeddedCheckoutSchema,
|
|
2060
|
-
submissionId: uuid,
|
|
2061
|
-
...decorations
|
|
2062
|
-
}).strict(),
|
|
2063
|
-
z.object({
|
|
2064
|
-
kind: z.literal("paymentStatusRequired"),
|
|
2065
|
-
subject: eventRegistrationPaymentSubjectSchema,
|
|
2066
|
-
...decorations
|
|
2067
|
-
}).strict(),
|
|
2068
|
-
z.object({
|
|
2069
|
-
kind: z.literal("waitlisted"),
|
|
2070
|
-
waitlist: z.object({
|
|
2071
|
-
reference: z.union([z.object({
|
|
2072
|
-
scope: z.literal("occurrence"),
|
|
2073
|
-
attendeeId: uuid
|
|
2074
|
-
}).strict(), z.object({
|
|
2075
|
-
scope: z.enum(["occurrence", "wholeSeries"]),
|
|
2076
|
-
waitlistEntryId: uuid
|
|
2077
|
-
}).strict()]),
|
|
2078
|
-
position: z.number().int().nonnegative().nullable(),
|
|
2079
|
-
message: z.string(),
|
|
2080
|
-
emailFollowupMessage: z.string().optional()
|
|
2081
|
-
}).strict(),
|
|
2082
|
-
...decorations
|
|
2083
|
-
}).strict()
|
|
2084
|
-
]);
|
|
2085
|
-
const checkoutStatusArms = [
|
|
2086
|
-
z.object({
|
|
2087
|
-
kind: z.literal("resolved"),
|
|
2088
|
-
outcome: eventBookingOutcomeSchema
|
|
2089
|
-
}).strict(),
|
|
2090
|
-
z.object({ kind: z.literal("abandoned") }).strict(),
|
|
2091
|
-
z.object({ kind: z.literal("reconciliationRequired") }).strict(),
|
|
2092
|
-
z.object({
|
|
2093
|
-
kind: z.literal("paymentProcessing"),
|
|
2094
|
-
recoverableUntil: z.string().optional()
|
|
2095
|
-
}).strict(),
|
|
2096
|
-
z.object({
|
|
2097
|
-
kind: z.literal("paymentAvailable"),
|
|
2098
|
-
checkout: eventEmbeddedCheckoutSchema,
|
|
2099
|
-
recoverableUntil: z.string().optional()
|
|
2100
|
-
}).strict(),
|
|
2101
|
-
z.object({
|
|
2102
|
-
kind: z.literal("paymentRetryAvailable"),
|
|
2103
|
-
place: z.enum(["held", "released"])
|
|
2104
|
-
}).strict(),
|
|
2105
|
-
z.object({
|
|
2106
|
-
kind: z.literal("paymentCheckUnavailable"),
|
|
2107
|
-
recoverableUntil: z.string().optional()
|
|
2108
|
-
}).strict(),
|
|
2109
|
-
z.object({ kind: z.literal("paymentAssistanceRequired") }).strict()
|
|
2110
|
-
];
|
|
2111
|
-
z.discriminatedUnion("kind", [...checkoutStatusArms, z.object({ kind: z.literal("notFound") }).strict()]);
|
|
2112
|
-
const eventCheckoutReturnResponseSchema = z.discriminatedUnion("kind", [
|
|
2113
|
-
z.object({
|
|
2114
|
-
kind: z.literal("checkout"),
|
|
2115
|
-
subject: eventRegistrationPaymentSubjectSchema,
|
|
2116
|
-
outcome: z.discriminatedUnion("kind", checkoutStatusArms)
|
|
2117
|
-
}).strict(),
|
|
2118
|
-
z.object({ kind: z.literal("notFound") }).strict(),
|
|
2119
|
-
z.object({ kind: z.literal("reconciliationRequired") }).strict()
|
|
2120
|
-
]).superRefine((response, ctx) => {
|
|
2121
|
-
if (response.kind !== "checkout" || response.outcome.kind !== "resolved") return;
|
|
2122
|
-
const identity = response.outcome.outcome.identity;
|
|
2123
|
-
if (identity.scope !== response.subject.scope || identity.submissionId !== response.subject.submissionId || identity.scope === "occurrence" && response.subject.scope === "occurrence" && identity.attendeeId !== response.subject.attendeeId) ctx.addIssue({
|
|
2124
|
-
code: "custom",
|
|
2125
|
-
message: "Confirmed booking does not match checkout subject",
|
|
2126
|
-
path: ["outcome"]
|
|
2127
|
-
});
|
|
2128
|
-
});
|
|
2129
|
-
const checkoutDecorations = { mailingListSignupNote: decorations.mailingListSignupNote };
|
|
2130
|
-
const eventCheckoutResponseSchema = z.union([
|
|
2131
|
-
z.object({
|
|
2132
|
-
kind: z.literal("completed"),
|
|
2133
|
-
scope: z.literal("occurrence"),
|
|
2134
|
-
outcome: eventBookingOutcomeSchema,
|
|
2135
|
-
...checkoutDecorations
|
|
2136
|
-
}).strict(),
|
|
2137
|
-
z.object({
|
|
2138
|
-
kind: z.literal("completed"),
|
|
2139
|
-
scope: z.literal("wholeSeries"),
|
|
2140
|
-
outcome: eventBookingOutcomeSchema,
|
|
2141
|
-
...checkoutDecorations
|
|
2142
|
-
}).strict(),
|
|
2143
|
-
z.object({
|
|
2144
|
-
kind: z.literal("checkoutRequired"),
|
|
2145
|
-
scope: z.literal("occurrence"),
|
|
2146
|
-
attendeeId: uuid,
|
|
2147
|
-
checkout: eventEmbeddedCheckoutSchema,
|
|
2148
|
-
...checkoutDecorations
|
|
2149
|
-
}).strict(),
|
|
2150
|
-
z.object({
|
|
2151
|
-
kind: z.literal("checkoutRequired"),
|
|
2152
|
-
scope: z.literal("wholeSeries"),
|
|
2153
|
-
registrationId: uuid,
|
|
2154
|
-
checkoutAttemptId: uuid,
|
|
2155
|
-
checkout: eventEmbeddedCheckoutSchema,
|
|
2156
|
-
recoverableUntil: z.string().optional(),
|
|
2157
|
-
...checkoutDecorations
|
|
2158
|
-
}).strict(),
|
|
2159
|
-
z.object({
|
|
2160
|
-
scope: z.literal("wholeSeries"),
|
|
2161
|
-
status: z.literal("paymentStatusRequired"),
|
|
2162
|
-
checkoutAttemptId: uuid,
|
|
2163
|
-
recoverableUntil: z.string().optional(),
|
|
2164
|
-
...checkoutDecorations
|
|
2165
|
-
}).strict(),
|
|
2166
|
-
z.object({
|
|
2167
|
-
scope: z.literal("wholeSeries"),
|
|
2168
|
-
status: z.literal("waitlist"),
|
|
2169
|
-
waitlistEntryId: uuid,
|
|
2170
|
-
waitlistPosition: z.number().int().nonnegative().nullable(),
|
|
2171
|
-
alreadyRegistered: z.boolean().optional(),
|
|
2172
|
-
...checkoutDecorations
|
|
2173
|
-
}).strict()
|
|
2174
|
-
]).superRefine((response, ctx) => {
|
|
2175
|
-
if ("kind" in response && response.kind === "completed" && response.scope !== response.outcome.identity.scope) ctx.addIssue({
|
|
2176
|
-
code: "custom",
|
|
2177
|
-
message: "Confirmed booking scope mismatch",
|
|
2178
|
-
path: [
|
|
2179
|
-
"outcome",
|
|
2180
|
-
"identity",
|
|
2181
|
-
"scope"
|
|
2182
|
-
]
|
|
2183
|
-
});
|
|
2184
|
-
});
|
|
2232
|
+
//#region ../blocks/src/system/blocks/shop.shared.ts
|
|
2233
|
+
const publicPassProductCollectionSchema = z.object({ passes: z.array(publicPassProductSchema) });
|
|
2234
|
+
const publicMembershipProductCollectionSchema = z.object({ memberships: z.array(publicMembershipProductSchema) });
|
|
2185
2235
|
//#endregion
|
|
2186
2236
|
//#region ../blocks/src/contracts/events.ts
|
|
2187
2237
|
/** Release 1: older SDKs reject additional confirmed-outcome fields. */
|
|
@@ -2237,4 +2287,4 @@ const logger = {
|
|
|
2237
2287
|
withFields: (_) => logger
|
|
2238
2288
|
};
|
|
2239
2289
|
//#endregion
|
|
2240
|
-
export {
|
|
2290
|
+
export { persistableMediaSchema as $, toBookingTimeZone as $t, eyebrowTreatmentValues as A, trimmedStringOrNull as At, blockBookingPaymentTermsSchema as B, resolveBookingDisplayContext as Bt, normalizeEventCalendarDisplayMode as C, decideLocationSourcePermission as Ct, accordionIconSetValues as D, projectPublicLocation as Dt, accordionIconMotionValues as E, parseLocationValue as Et, visibleHeadingDecorationFamilyValues as F, formatDateTimeRange as Ft, beforeBookingQuestionsPresentationSchema as G, compareLocalScheduleDates as Gt, bookingConsentCarrierSchema as H, toScheduledBookingDateTime as Ht, eventVenueDrawingSchema as I, formatTime as It, isRichTextDoc as J, getLocalScheduleDate as Jt, bookingQuestionsAnswerValueSchema as K, formatLocalScheduleDate as Kt, publicEventDestinationSchema as L, formatTimeRange as Lt, headingDecorationOverrideValues as M, formatDate as Mt, isArrangementMode as N, formatDateRange as Nt, arrangementModes as O, publicLocationSchema as Ot, tileTreatmentValues as P, formatDateTime as Pt, mediaSchema as Q, resolveBookingTimeZoneId as Qt, publicEventSchema as R, formatTimeZoneCityLabel as Rt, isEventCalendarListLayout as S, WHOLE_SERIES_EVENT_PRESET_VALUES as St, accordionIconColorTokenValues as T, normalizeLocationAddressText as Tt, isBookingRequirementConsentFieldId as U, buildBookingUtcDateWindow as Ut, blockBookingConsentSchema as V, formatBookingCompactEnglishTime as Vt, toBookingRequirementConsentField as W, addLocalScheduleDays as Wt, externalMediaSchema as X, parseLocalScheduleTime as Xt, assetMediaSchema as Y, parseBookingLocalDate as Yt, imageMediaSchema as Z, resolveBookingBusinessTimeZone as Zt, eventCalendarListLayoutOptions as _, eventScheduleScopeValues as _t, eventAutoApplyDiscountPreviewSchema as a, toNonNegativeCents as an, normalizeCurrencyCode as at, isEventCalendarDefaultView as b, publicEventLoaderQuerySchemaShape as bt, calendarMonthKey as c, eventCalendarListLayoutCompatibleDisplayModeValues as ct, calendarWindowBounds as d, publicPassProductSchema as dt, parseUtcIsoDateTimeString as en, runtimeMediaSchema as et, calendarWindowMonths as f, publicProductSchema as ft, eventCalendarListGroupingDecision as g, calendarWindowQuerySchema as gt, resolveCalendarReadProfile as h, calendarMonthDate as ht, EVENT_BOOKING_ARRIVAL_QUERY as i, parsePositiveMoneyInputToCents as in, mediaTypeDiscriminants as it, headingDecorationColorTokenValues as j, mapDrawingSchema as jt, eventListTreatmentValues as k, toLocationCoordinates as kt, calendarPageResponseError as l, eventCalendarListLayoutValues as lt, planCalendarMonthRanges as m, purchasablePublicPassProductSchema as mt, blockSiteTermsSchema as n, validateBookingPaymentOptionKinds as nn, PUBLIC_FILE_FIELD_KINDS as nt, publicMembershipProductCollectionSchema as o, formatCurrencyAmount as on, eventCalendarDefaultViewValues as ot, calendarWindowPageSchema as p, purchasablePublicMembershipProductSchema as pt, RichTextDocSchema as q, getBookingLocalDateKey as qt, verifiedSiteTermsAcceptanceSchema as r, parsePositiveCents as rn, isDisplayMediaKind as rt, publicPassProductCollectionSchema as s, formatGiftCardAmountLabel as sn, eventCalendarDisplayModeValues as st, logger as t, toUtcIsoDateTimeString as tn, videoMediaSchema as tt, calendarQueryKey as u, publicMembershipProductSchema as ut, eventCalendarVariantMeaning as v, eventSurfacePresetValues as vt, resolveEventCalendarReadPlan as w, locationValueSchema as wt, isEventCalendarDisplayMode as x, isRecord as xt, eventListArrangementValues as y, eventSurfaceScopeValues as yt, publicEventsArraySchema as z, inferSiteDateLocale as zt };
|