@riverbankcms/sdk 0.163.0 → 0.165.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/README.md +12 -1
- package/dist/_dts/{BlocksIslandsHydrator-DYPGA_qh.d.ts → BlocksIslandsHydrator-CdsSMQEv.d.ts} +1 -1
- package/dist/_dts/{Page-zwnvFBPu.d.ts → Page-D6gp2Ipb.d.ts} +15 -12
- package/dist/_dts/{SdkPreviewMode-DukuJzGr.d.ts → SdkPreviewMode-DNXAvnet.d.ts} +83 -72
- package/dist/_dts/{client-Chh3bnXC.d.ts → client-BkkExozE.d.ts} +13 -41
- package/dist/_dts/{content-types-Bbzqw9J2.d.ts → content-types-CXNAD7ef.d.ts} +2 -2
- package/dist/_dts/{contracts-GJ1kGBsi.d.ts → contracts-XRXhbLWP.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-BNMKhyvo.d.ts → footerPageOutline-BP2bJYdY.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-Ce0m1P3B.d.ts → generatePageMetadata-DcMtbztV.d.ts} +2 -2
- package/dist/_dts/{index-CyQhZuhM.d.ts → index-B4ozSzFP.d.ts} +48377 -47862
- package/dist/_dts/{index-DRxgeK8L.d.ts → index-BdkHhyf8.d.ts} +2 -2
- package/dist/_dts/{index-CdSNXLOx.d.ts → index-CQfJhOEA.d.ts} +2 -2
- package/dist/_dts/{index-C3mJvn27.d.ts → index-CRRiddNp.d.ts} +4 -4
- package/dist/_dts/index-CXsnaCGe.d.ts +10 -0
- package/dist/_dts/{index-rhMSu0oY.d.ts → index-C_3kdrUb.d.ts} +2 -2
- package/dist/_dts/{index-CaL0nKkl.d.ts → index-DAPTSmBM.d.ts} +31097 -31047
- package/dist/_dts/{index-FstkyqQB.d.ts → index-DKNEgSOS.d.ts} +2 -2
- package/dist/_dts/{index-G2p-HOrK.d.ts → index-RXkE3a7M.d.ts} +3 -3
- package/dist/_dts/{loadContent-DiLZoInK.d.ts → loadContent-B9vJMq3s.d.ts} +15 -30
- package/dist/_dts/{resolvePageContent-CWUnipv8.d.ts → resolvePageContent-DIQyYUi-.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +3 -4
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +6 -6
- 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/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/index.d.ts +7 -7
- 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/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 +32 -52
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-BmtrA45p.d.ts → types-BDF73NzM.d.ts} +3 -2
- package/dist/_dts/{types-DFOqkClJ.d.ts → types-Cl0nP6al.d.ts} +3 -3
- package/dist/_dts/{types-CalL7aKP.d.ts → types-mstFvhK4.d.ts} +7 -7
- package/dist/_dts/{validation-G8MRoIhq.d.ts → validation-DVWqSvjK.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DLCXwe30.mjs → BlocksIslandsHydrator-CzKpH9Pm.mjs} +20 -20
- package/dist/client/{BookingMailingListNote-BV5-50F0.mjs → BookingMailingListNote-rUqsBN7L.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-CVLAHdZG.mjs → CalendarNavigationChevron-YGzw2IPB.mjs} +6 -6
- package/dist/client/{CheckboxChoice-Dtgp3OU8.mjs → CheckboxChoice-DlTC4J2a.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-B3caCnTT.mjs → DemoBookingPortalAccess-D2LyS_Bi.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-Ct8JMKW0.mjs → DemoPortalSignInLink-BaFg2Uit.mjs} +1 -1
- package/dist/client/{EventCalendar.client-ffa6920T.mjs → EventCalendar.client-tRrhPscX.mjs} +17 -10
- package/dist/client/{EventCombined.client-zm0W2G79.mjs → EventCombined.client-6cfAVtnZ.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-CPPE2rWS.mjs → EventEmbeddedCheckoutStep-CDNUpI0S.mjs} +2 -1
- package/dist/client/{EventItem-CND3mfra.mjs → EventItem-dILw2PN_.mjs} +27 -17
- package/dist/client/{EventListWeekNavigation-D8QdxL_f.mjs → EventListWeekNavigation-ClgLtjNY.mjs} +1 -1
- package/dist/client/{EventListing.client-CaoRZUI9.mjs → EventListing.client-BNueAHmU.mjs} +3 -3
- package/dist/client/{EventListing.view-BfnOmxYD.mjs → EventListing.view-DtVbKVkt.mjs} +56 -12
- package/dist/client/{EventRegistrationPayment-Dfu3RSL2.mjs → EventRegistrationPayment-CzkG0NSJ.mjs} +18 -22
- package/dist/client/{LocationMapActions-wlyxASdT.mjs → LocationMapActions-zWQsJhE5.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-B9oKSitp.mjs → MapDrawingSvg-D1AO_o4h.mjs} +1 -1
- package/dist/client/{Page-BEF9HrAy.mjs → Page-DUr2YhFR.mjs} +1949 -418
- package/dist/client/ProtectedSubmitButton-2fJqT_NR.mjs +14 -0
- package/dist/client/SpamProtectionWidget-CCF6YLUX.mjs +141 -0
- package/dist/client/{StepIndicator-Bjx4faaw.mjs → StepIndicator-udNHcpOT.mjs} +2 -2
- package/dist/client/{TabBarFragment-Cu7k_VSl.mjs → TabBarFragment-C_kt-PXh.mjs} +1 -1
- package/dist/client/{ThemedButton-DclwabI7.mjs → ThemedButton-Cfbo1bfh.mjs} +2 -898
- package/dist/client/{accordion-lzM2nSZB.mjs → accordion-3CYNWzTS.mjs} +1 -1
- package/dist/client/altchaProtection-DjIV9A5n.mjs +12 -0
- package/dist/client/{booking-form.client-Bll4QwBi.mjs → booking-form.client-BSbWgLyx.mjs} +23 -56
- package/dist/client/{bookingForm-Cq5fQ-vo.mjs → bookingForm-2MoFBWSt.mjs} +4 -4
- package/dist/client/bookings.mjs +23 -32
- package/dist/client/{carousel-CxerQwIx.mjs → carousel-Cu5mcpO-.mjs} +2 -2
- package/dist/client/{carousel.client-CVUXq8Mb.mjs → carousel.client-CQLV8_Al.mjs} +1 -1
- package/dist/client/{cart-X-m0isoI.mjs → cart-CDc6x9cR.mjs} +3 -3
- package/dist/client/{cart.client-CJbzWIl0.mjs → cart.client-BWS2r5Ef.mjs} +1 -1
- package/dist/client/{checkout-Gd0O_fGH.mjs → checkout-CkxPqSwD.mjs} +3 -3
- package/dist/client/{checkout.client-Baee6Jsm.mjs → checkout.client-DJfomKQc.mjs} +1 -1
- package/dist/client/client.mjs +216 -109
- package/dist/client/{context-Bg0SFWcM.mjs → context-CBV21-9L.mjs} +17 -3
- package/dist/client/{cta-HffyM4MA.mjs → cta-Bw-al3cs.mjs} +26 -2
- package/dist/client/{dateFormatting-CV45BH5M.mjs → dateFormatting-CFIUJ4Uf.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CDWheSjI.mjs → demoPortalMagicLink-D0veHJyi.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-BqVDXL0D.mjs → enhanceHeaderSection-CEqqq92r.mjs} +3 -3
- package/dist/client/{event-details.client-SFtS9OkF.mjs → event-details.client-Bk2kQ7ax.mjs} +1 -1
- package/dist/client/{event-registration.client-CguNVIFY.mjs → event-registration.client-QMqtIywj.mjs} +47 -56
- package/dist/client/{eventCalendar-DSGG35jd.mjs → eventCalendar-BTDTMosr.mjs} +4 -4
- package/dist/client/{eventCombined-Oe-PiChx.mjs → eventCombined-BC7a709c.mjs} +4 -4
- package/dist/client/{eventDetails-BhcTT6P3.mjs → eventDetails-DL08GpUc.mjs} +2 -2
- package/dist/client/{eventListing-BS0kBEgI.mjs → eventListing-BfzuEQp_.mjs} +4 -4
- package/dist/client/{eventRegistration-B82SHv7j.mjs → eventRegistration-Lfyzh1Ab.mjs} +4 -4
- package/dist/client/{form-DAIUrVXb.mjs → form-L-xZOBUS.mjs} +3 -3
- package/dist/client/{form.client-BoAkhoh_.mjs → form.client-BtpK3TZW.mjs} +33 -24
- package/dist/client/{form.parts-1VnasOK8.mjs → form.parts-Djos5Un4.mjs} +6 -5
- package/dist/client/{formatDate-BKil_Psb.mjs → formatDate-DGmrm7YB.mjs} +1 -1
- package/dist/client/gifting/client.mjs +5 -4
- package/dist/client/{headerSection-CyuHk8Ei.mjs → headerSection-f16OGkz-.mjs} +2 -2
- package/dist/client/{mediaAssets-CGJE1Omu.mjs → mediaAssets-DHAmrVIi.mjs} +1 -1
- package/dist/client/{mediaContext-DIkX2S-X.mjs → mediaContext-CwT6ZOm7.mjs} +1 -1
- package/dist/client/{newsletter-form.client-CCdyHx0B.mjs → newsletter-form.client-DpHNZc7k.mjs} +100 -85
- package/dist/client/{newsletter-form.parts-Dl8AjsXW.mjs → newsletter-form.parts-CLGH20PL.mjs} +11 -7
- package/dist/client/{newsletterForm-qFWLZJui.mjs → newsletterForm-BEU0Ocu9.mjs} +3 -3
- package/dist/client/{noop-4XFGzJpT.mjs → noop-CQU7tiMg.mjs} +8 -4
- package/dist/client/portal/client.mjs +13 -12
- package/dist/client/{product-detail.client-Tq4S99ce.mjs → product-detail.client-Be-om1BT.mjs} +1 -1
- package/dist/client/{product-list.client-CuL5jB1w.mjs → product-list.client-DR7hD5Vs.mjs} +1 -1
- package/dist/client/{productDetail-BRqgcotZ.mjs → productDetail-BD42UOmG.mjs} +3 -3
- package/dist/client/{productList-EK9Um-oh.mjs → productList-CSk8sXCl.mjs} +3 -3
- package/dist/client/{propsDecoder-VD4arFq1.mjs → propsDecoder-C_Y6VYnF.mjs} +3 -3
- package/dist/client/protection-C0PoH1lT.mjs +104 -0
- package/dist/client/purchase-BV5xfaZH.mjs +894 -0
- package/dist/client/{registry.server-qYbsatxH.mjs → registry.server-CIKtTsCl.mjs} +197 -167
- package/dist/client/rendering/client.mjs +27 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +11 -7
- package/dist/client/{richText-coerce-CW8CFk8v.mjs → richText-coerce-spWtx86G.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CnZ_1ol2.mjs → routeIslandApiConfig-CROHPlYS.mjs} +1 -1
- package/dist/client/{schema-BFwQDvJL.mjs → schema-BdSglH2X.mjs} +2690 -2500
- package/dist/client/{shop-CTUaT57E.mjs → shop-DscvMz86.mjs} +3 -3
- package/dist/client/{shop-commerce-BWwbsm_-.mjs → shop-commerce-CDUohm_2.mjs} +11 -11
- package/dist/client/{shop-commerce-store-15UII0y3.mjs → shop-commerce-store-B9nw4lRP.mjs} +1 -1
- package/dist/client/{shop.client-UWgdmJBm.mjs → shop.client-M3kNsVPi.mjs} +12 -12
- package/dist/client/{shop.interactive-Cf_kASpd.mjs → shop.interactive-BGmkdIAZ.mjs} +268 -31
- package/dist/client/{shopShared-Bi8d584P.mjs → shopShared-BdWp6LHa.mjs} +2 -2
- package/dist/client/{site-styles-dy54AUdz.mjs → site-styles-CWHmlVT5.mjs} +2630 -461
- package/dist/client/spam-protection.mjs +4 -69
- package/dist/client/{timetableModel-Bi8ruFgB.mjs → timetableModel-Dynh5-j4.mjs} +10 -10
- package/dist/client/{useAvailableSlots-DiLbDqM3.mjs → useAvailableSlots-Cw9paRPY.mjs} +3 -3
- package/dist/client/{useBookingNowIso-CWIiqPd0.mjs → useBookingNowIso-C9SF2rC6.mjs} +1 -1
- package/dist/client/{useDiscountApply-ChtszhF9.mjs → useDiscountApply-B-QJfBg0.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-B0Z7n2tZ.mjs → useDiscountCodeUi-Uvum8q9d.mjs} +1 -1
- package/dist/client/{useEventPagination-DRrATQHQ.mjs → useEventPagination-BfM3xk6j.mjs} +9 -156
- package/dist/client/{view-yUIfWX3S.mjs → view-DXOuduIr.mjs} +4 -4
- package/dist/client/{view-OvsxzgxP.mjs → view-DlkCDfuN.mjs} +45 -32
- package/dist/client/{wizardSteps-kbONzKUv.mjs → wizardSteps-DManVJpc.mjs} +57 -47
- package/dist/preview-next/before-render.mjs +2 -2
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-DzoFjIqB.mjs → EventEmbeddedCheckoutStep-Die6Y25O.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-QtSG2Bl-.mjs → LocationPickerEnvironment-Bp4BHLCL.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B-rohNcG.mjs → MapLibreEditMap-Cb0JhM9p.mjs} +2 -2
- package/dist/preview-next/client/{PreviewEditorSidebar-BhgPyyUW.mjs → PreviewEditorSidebar-DEP3xD9K.mjs} +3478 -3109
- package/dist/preview-next/client/{PreviewEditorUI-lndKKBtB.mjs → PreviewEditorUI-CxwlLBGw.mjs} +577 -172
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DCDDXDlt.mjs → SdkPreviewModeRuntime-Cpe-XP8e.mjs} +1 -1
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bk7On_EM.mjs → SdkPreviewModeRuntime-QDkMPASV.mjs} +3761 -4769
- package/dist/preview-next/client/{siteStyleAccess-Chq5KKKh.mjs → SiteChromeCustomizeButton-1JaoGOKX.mjs} +3862 -8657
- package/dist/preview-next/client/{ThemedButton-nUnE3iMv.mjs → ThemedButton-Dc6aJ34Z.mjs} +274 -68
- package/dist/preview-next/client/editorStatusDecision-DR4BBKhy.mjs +101 -0
- package/dist/preview-next/client/{lucide-react-CA9cpo0P.mjs → lucide-react-CqxuVAyz.mjs} +1 -1
- package/dist/preview-next/client/{previewChromeSurface-CxQ6dZ8D.mjs → previewChromeSurface-yuwnDP3B.mjs} +49 -6
- package/dist/preview-next/client/{previewAuthStore-DHtSQIBE.mjs → previewSidebarNavigation-AXUj9-qQ.mjs} +186449 -173608
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DSZv7Vfm.mjs → sdk-runtime-O-eA9-rV.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +3 -3
- package/dist/preview-next/middleware.mjs +2 -2
- package/dist/preview-next/{route-contract-CxCstfkP.mjs → route-contract-BBAJjFIz.mjs} +42 -50
- package/dist/preview-next/{session-P1R_ajT7.mjs → session-DU6zpYUQ.mjs} +1 -1
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-Dz9k8vCX.mjs → Block.shared-ClFI3qpX.mjs} +5 -4
- package/dist/server/{bindings-S-gCHhj5.mjs → bindings-Bi8EoRZD.mjs} +2 -2
- package/dist/server/{client-C2Q56xqV.mjs → client-DfMDbZ41.mjs} +215 -109
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{effectiveNavLinkStyle-DLzJPcDL.mjs → effectiveNavLinkStyle-BHIYPVG1.mjs} +2362 -217
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-D7ItMsEl.mjs → loadContent-dEEhQxL7.mjs} +6 -4
- package/dist/server/loadPage-CnVB-aeL.mjs +2 -0
- package/dist/server/{loadPage-DaPiPYUL.mjs → loadPage-DBFBad8A.mjs} +3 -2
- package/dist/server/next/middleware.mjs +1 -1
- package/dist/server/next/revalidate.mjs +1 -1
- package/dist/server/next.mjs +11 -11
- package/dist/server/{overrideResolution-anoB3Kbn.mjs → overrideResolution-BIJbiXYc.mjs} +1 -1
- package/dist/server/{overrides-W1Cc6srh.mjs → overrides-DhF87Vsd.mjs} +352 -141
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-BF9yNfCS.mjs → prebuild-DaemmWQL.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Cn9k3DW6.mjs → prefetchBlockData-FwcsT5H2.mjs} +334 -110
- package/dist/server/{publicProducts-BVcJ6TG7.mjs → publicProducts-Bz8loTRn.mjs} +87 -78
- package/dist/server/{registry-4ZF3bUuJ.mjs → registry-Cdvz1OtL.mjs} +539 -401
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-BKQ1Fc0M.mjs → resolveBlockData-CLpAJWWf.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-DgrigZq9.mjs → schema-uSA_x1Zh.mjs} +247 -57
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-CxE9F3hj.mjs → site-styles-CntHn2KI.mjs} +61 -37
- package/dist/server/{siteChromeOverlayClearance-OhS6f830.mjs → siteChromeOverlayClearance-DqP40Ka0.mjs} +32 -36
- package/dist/server/{src-C44_fMy5.mjs → src-DsYPhTbs.mjs} +1289 -90
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-CVc04B9m.mjs → themeAdmission-CSknYpxk.mjs} +3 -2
- package/dist/server/{validation-BrbY0nxR.mjs → validation-DYxhLzqQ.mjs} +2 -2
- package/dist/server/{version-BBSk8uM6.mjs → version-Beu4q-Gv.mjs} +1 -1
- package/dist/styles/index.css +1173 -72
- package/package.json +2 -3
- package/dist/_dts/AltchaWidget-COIYJ7DF.d.ts +0 -33
- package/dist/_dts/index-D2y4Iy-d.d.ts +0 -77
- package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +0 -1
- package/dist/client/src-BNZzXgWu.mjs +0 -102
- package/dist/preview-next/client/spinner-CjxE3uws.mjs +0 -67
- package/dist/server/loadPage-D2qvYV5g.mjs +0 -2
package/dist/client/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as unwrapResponse, C as siteLocationRenderContext, D as requireSdkTheme, G as
|
|
2
|
+
import { $ as unwrapResponse, C as siteLocationRenderContext, D as requireSdkTheme, G as createInternalAPIClient, K as setSdkVersion, O as prefetchBlockDataWithFailures, Q as isApiError, U as encodePublicProductCategorySelector, W as createBearerAPIClient, X as ApiRequestError, Z as ApiEnvelopeError, _ as collectMediaAssetSidecar, at as isPublicReadEndpoint, et as PUBLIC_READ_ENDPOINT_DEFINITIONS, g as buildSiteRenderSupport, h as buildRenderablePageOutline, it as getPublicReadCachePolicy, nt as buildPublicReadMemoryCacheTags, ot as publicReadFreshnessSeconds, q as isSupportedLoaderEndpoint, rt as buildSiteReadTags, t as Page, tt as TAG_TEMPLATES, w as resolveSiteCustomBlocks, y as projectRenderablePageOutline } from "./Page-DUr2YhFR.mjs";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
//#region src/rendering/hooks/usePage.ts
|
|
5
5
|
/**
|
|
@@ -43,6 +43,7 @@ async function loadUsePageSuccess(input) {
|
|
|
43
43
|
},
|
|
44
44
|
openingHours: site.businessDetails?.openingHours ?? null,
|
|
45
45
|
mailingList: site.mailingList,
|
|
46
|
+
interactionContext: site.interactionContext,
|
|
46
47
|
sdkConfig: site.sdkConfig ?? null,
|
|
47
48
|
supabaseUrl: site.supabaseUrl,
|
|
48
49
|
...mediaAssets ? { mediaAssets } : {}
|
|
@@ -413,6 +414,49 @@ function isEntryResponse(response) {
|
|
|
413
414
|
return "type" in response && response.type === "entry";
|
|
414
415
|
}
|
|
415
416
|
//#endregion
|
|
417
|
+
//#region src/client/entryListReadRequest.ts
|
|
418
|
+
const entryOrder = {
|
|
419
|
+
newest: "published_at.desc",
|
|
420
|
+
oldest: "published_at.asc",
|
|
421
|
+
title: "title.asc",
|
|
422
|
+
manual: "manual.asc"
|
|
423
|
+
};
|
|
424
|
+
function entrySelection(input) {
|
|
425
|
+
return input.mode === "manual" && input.entryIds?.length ? {
|
|
426
|
+
keyPart: input.entryIds.join(","),
|
|
427
|
+
params: {
|
|
428
|
+
mode: "manual",
|
|
429
|
+
entryIds: JSON.stringify(input.entryIds)
|
|
430
|
+
}
|
|
431
|
+
} : {
|
|
432
|
+
keyPart: "",
|
|
433
|
+
params: {}
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function entryListMemoryKey(input, selection) {
|
|
437
|
+
const { siteId, contentType, limit, offset, order, mode, includeMeta, preview = false } = input;
|
|
438
|
+
return `entries:${siteId}:${contentType}:${limit ?? ""}:${offset ?? ""}:${order ?? ""}:${preview}:${mode ?? ""}:${selection.keyPart}:${includeMeta ?? ""}`;
|
|
439
|
+
}
|
|
440
|
+
/** One interpretation of pagination, selection and preview for the transport and memory key. */
|
|
441
|
+
function buildEntryListReadRequest(input) {
|
|
442
|
+
const { siteId, contentType, limit, offset, order, includeMeta, preview = false } = input;
|
|
443
|
+
const selection = entrySelection(input);
|
|
444
|
+
const orderParam = order ? entryOrder[order] : void 0;
|
|
445
|
+
return {
|
|
446
|
+
cacheKey: entryListMemoryKey(input, selection),
|
|
447
|
+
params: {
|
|
448
|
+
siteId,
|
|
449
|
+
type: contentType,
|
|
450
|
+
...typeof limit === "number" && { limit: String(limit) },
|
|
451
|
+
...typeof offset === "number" && { offset: String(offset) },
|
|
452
|
+
...includeMeta && { meta: "true" },
|
|
453
|
+
...orderParam && { order: orderParam },
|
|
454
|
+
...preview && { stage: "preview" },
|
|
455
|
+
...selection.params
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
//#endregion
|
|
416
460
|
//#region src/client/cache.ts
|
|
417
461
|
var SimpleCache = class {
|
|
418
462
|
constructor(options = {}) {
|
|
@@ -459,6 +503,7 @@ var SimpleCache = class {
|
|
|
459
503
|
while (this.cache.size >= this.maxSize && !this.cache.has(key)) this.evictOne(now);
|
|
460
504
|
this.cache.set(key, {
|
|
461
505
|
value,
|
|
506
|
+
tags: options?.tags ?? [],
|
|
462
507
|
createdAt: now,
|
|
463
508
|
freshUntil: now + ttl,
|
|
464
509
|
staleUntil: now + ttl + staleTtl
|
|
@@ -495,6 +540,14 @@ var SimpleCache = class {
|
|
|
495
540
|
/**
|
|
496
541
|
* Clear all entries
|
|
497
542
|
*/
|
|
543
|
+
clearForTags(tags) {
|
|
544
|
+
if (tags.includes("riverbank")) {
|
|
545
|
+
this.clear();
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
const selected = new Set(tags);
|
|
549
|
+
[...this.cache.entries()].filter(([, entry]) => entry.tags.some((tag) => selected.has(tag))).forEach(([key]) => this.cache.delete(key));
|
|
550
|
+
}
|
|
498
551
|
clear() {
|
|
499
552
|
this.cache.clear();
|
|
500
553
|
}
|
|
@@ -524,7 +577,7 @@ var SimpleCache = class {
|
|
|
524
577
|
* 1. This constant
|
|
525
578
|
* 2. The "version" field in package.json
|
|
526
579
|
*/
|
|
527
|
-
const SDK_VERSION = "0.
|
|
580
|
+
const SDK_VERSION = "0.165.0";
|
|
528
581
|
//#endregion
|
|
529
582
|
//#region src/client/error.ts
|
|
530
583
|
let _Symbol$for;
|
|
@@ -1185,73 +1238,95 @@ function planPublishedRuntimeCache(input) {
|
|
|
1185
1238
|
siteId: input.siteId ?? null
|
|
1186
1239
|
};
|
|
1187
1240
|
}
|
|
1188
|
-
function
|
|
1241
|
+
function siteApiParams(params) {
|
|
1189
1242
|
return {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
params: {
|
|
1233
|
-
siteId,
|
|
1234
|
-
path,
|
|
1235
|
-
preview
|
|
1236
|
-
},
|
|
1237
|
-
siteId
|
|
1238
|
-
});
|
|
1239
|
-
const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path}:${preview}`;
|
|
1240
|
-
return input.resilientFetch(cacheKey, (requestSignal) => input.apiClient({
|
|
1241
|
-
endpoint: "getContentByPath",
|
|
1242
|
-
params: {
|
|
1243
|
-
siteId,
|
|
1244
|
-
path,
|
|
1245
|
-
preview: String(preview)
|
|
1246
|
-
},
|
|
1247
|
-
options: { signal: requestSignal }
|
|
1248
|
-
}), {
|
|
1249
|
-
preview,
|
|
1250
|
-
signal,
|
|
1251
|
-
publishedRuntimeCache,
|
|
1252
|
-
prebuildFallback: void 0
|
|
1253
|
-
});
|
|
1243
|
+
...params.slug ? { slug: params.slug } : {},
|
|
1244
|
+
...params.domain ? { domain: params.domain } : {},
|
|
1245
|
+
...params.id ? { id: params.id } : {},
|
|
1246
|
+
...params.currentPath ? { currentPath: params.currentPath } : {},
|
|
1247
|
+
...params.force ? { force: "true" } : {}
|
|
1248
|
+
};
|
|
1249
|
+
}
|
|
1250
|
+
function siteReadIdentity(params) {
|
|
1251
|
+
const identifier = params.slug || params.domain || params.id;
|
|
1252
|
+
if (!identifier) throw new Error(`getSite() requires at least one identifier: slug, domain, or id. Received: ${JSON.stringify(params)}`);
|
|
1253
|
+
return identifier;
|
|
1254
|
+
}
|
|
1255
|
+
function planSiteRead(params) {
|
|
1256
|
+
const identifier = siteReadIdentity(params);
|
|
1257
|
+
const { slug, domain, id, currentPath, force } = params;
|
|
1258
|
+
const publishedRuntimeCache = planPublishedRuntimeCache({
|
|
1259
|
+
endpoint: "getSite",
|
|
1260
|
+
params: {
|
|
1261
|
+
slug,
|
|
1262
|
+
domain,
|
|
1263
|
+
id,
|
|
1264
|
+
currentPath,
|
|
1265
|
+
force
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
return {
|
|
1269
|
+
publishedRuntimeCache,
|
|
1270
|
+
prebuildIdentifier: id || slug || domain,
|
|
1271
|
+
cacheKey: publishedRuntimeCache?.cacheKey ?? `site:${identifier}:${currentPath ?? ""}`
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
async function readSiteWithResilience(input, params) {
|
|
1275
|
+
const { slug, domain, id, signal, force } = params;
|
|
1276
|
+
const plan = planSiteRead(params);
|
|
1277
|
+
const prebuildId = plan.prebuildIdentifier;
|
|
1278
|
+
const prebuild = input.prebuildLoader;
|
|
1279
|
+
return input.resilientFetch(plan.cacheKey, (requestSignal) => input.apiClient({
|
|
1280
|
+
endpoint: "getSite",
|
|
1281
|
+
params: siteApiParams(params),
|
|
1282
|
+
options: {
|
|
1283
|
+
signal: requestSignal,
|
|
1284
|
+
...force ? { cache: "no-store" } : {}
|
|
1254
1285
|
}
|
|
1286
|
+
}), {
|
|
1287
|
+
signal,
|
|
1288
|
+
force,
|
|
1289
|
+
publishedRuntimeCache: plan.publishedRuntimeCache,
|
|
1290
|
+
cacheTags: buildSiteReadTags({
|
|
1291
|
+
slug,
|
|
1292
|
+
domain,
|
|
1293
|
+
id
|
|
1294
|
+
}),
|
|
1295
|
+
prebuildFallback: prebuild && prebuildId ? () => prebuild.loadSite(prebuildId) : void 0
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
async function readPageWithResilience(input, params) {
|
|
1299
|
+
const { siteId, path, preview = false, signal } = params;
|
|
1300
|
+
const publishedRuntimeCache = planPublishedRuntimeCache({
|
|
1301
|
+
endpoint: "getContentByPath",
|
|
1302
|
+
params: {
|
|
1303
|
+
siteId,
|
|
1304
|
+
path,
|
|
1305
|
+
preview
|
|
1306
|
+
},
|
|
1307
|
+
siteId
|
|
1308
|
+
});
|
|
1309
|
+
const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path}:${preview}`;
|
|
1310
|
+
return input.resilientFetch(cacheKey, (requestSignal) => input.apiClient({
|
|
1311
|
+
endpoint: "getContentByPath",
|
|
1312
|
+
params: {
|
|
1313
|
+
siteId,
|
|
1314
|
+
path,
|
|
1315
|
+
preview: String(preview)
|
|
1316
|
+
},
|
|
1317
|
+
options: { signal: requestSignal }
|
|
1318
|
+
}), {
|
|
1319
|
+
preview,
|
|
1320
|
+
signal,
|
|
1321
|
+
publishedRuntimeCache,
|
|
1322
|
+
cacheTags: buildSiteReadTags({ siteId }),
|
|
1323
|
+
prebuildFallback: void 0
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
function createContentReadOperations(input) {
|
|
1327
|
+
return {
|
|
1328
|
+
getSiteWithResilience: (params) => readSiteWithResilience(input, params),
|
|
1329
|
+
getPageWithResilience: (params) => readPageWithResilience(input, params)
|
|
1255
1330
|
};
|
|
1256
1331
|
}
|
|
1257
1332
|
//#endregion
|
|
@@ -1272,7 +1347,10 @@ function createPublicAppointmentReadOperations(deps) {
|
|
|
1272
1347
|
params: apiParams,
|
|
1273
1348
|
options: { signal: requestSignal }
|
|
1274
1349
|
});
|
|
1275
|
-
}, {
|
|
1350
|
+
}, {
|
|
1351
|
+
signal,
|
|
1352
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublicBookingServices", { siteId })
|
|
1353
|
+
});
|
|
1276
1354
|
},
|
|
1277
1355
|
async getPublicWeeklySlotAvailability(params) {
|
|
1278
1356
|
const { siteId, serviceId, resourceId, horizonWeeks, timezone, signal } = params;
|
|
@@ -1298,7 +1376,10 @@ function createPublicAppointmentReadOperations(deps) {
|
|
|
1298
1376
|
params: apiParams,
|
|
1299
1377
|
options: { signal: requestSignal }
|
|
1300
1378
|
});
|
|
1301
|
-
}, {
|
|
1379
|
+
}, {
|
|
1380
|
+
signal,
|
|
1381
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublicWeeklySlotAvailability", { siteId })
|
|
1382
|
+
});
|
|
1302
1383
|
}
|
|
1303
1384
|
};
|
|
1304
1385
|
}
|
|
@@ -1322,7 +1403,8 @@ function createPublicEventReadOperations(deps) {
|
|
|
1322
1403
|
options: { signal: requestSignal }
|
|
1323
1404
|
}), {
|
|
1324
1405
|
signal,
|
|
1325
|
-
preview
|
|
1406
|
+
preview,
|
|
1407
|
+
cacheTags: buildPublicReadMemoryCacheTags("resolveEventSubroute", { siteId })
|
|
1326
1408
|
});
|
|
1327
1409
|
}
|
|
1328
1410
|
return {
|
|
@@ -1334,7 +1416,10 @@ function createPublicEventReadOperations(deps) {
|
|
|
1334
1416
|
limit: params.limit === void 0 ? void 0 : String(params.limit)
|
|
1335
1417
|
},
|
|
1336
1418
|
options: { signal: requestSignal }
|
|
1337
|
-
}), {
|
|
1419
|
+
}), {
|
|
1420
|
+
signal,
|
|
1421
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicEventCalendarWindow", { siteId: params.siteId })
|
|
1422
|
+
});
|
|
1338
1423
|
},
|
|
1339
1424
|
async resolveEventOccurrence(params) {
|
|
1340
1425
|
const response = await resolveEventSubroute(params, "event-occurrence");
|
|
@@ -2131,7 +2216,7 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2131
2216
|
} catch (error) {
|
|
2132
2217
|
convertToTypedError(error);
|
|
2133
2218
|
}
|
|
2134
|
-
if (shouldWrite(cacheEnabled, options.force)) cache.set(cacheKey, data);
|
|
2219
|
+
if (shouldWrite(cacheEnabled, options.force)) cache.set(cacheKey, data, { tags: options.cacheTags });
|
|
2135
2220
|
if (allowFallbacks && !isPreview) await writePublishedRuntimeCache(options.publishedRuntimeCache, data);
|
|
2136
2221
|
return emitStatus("live", data, statusDetails());
|
|
2137
2222
|
} catch (error) {
|
|
@@ -2183,34 +2268,16 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2183
2268
|
resilientFetchData
|
|
2184
2269
|
});
|
|
2185
2270
|
async function getEntriesInternal(params) {
|
|
2186
|
-
const { siteId,
|
|
2187
|
-
const
|
|
2188
|
-
return resilientFetchData("listPublishedEntries",
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
else if (order === "manual") orderParam = "manual.asc";
|
|
2194
|
-
return await apiClient({
|
|
2195
|
-
endpoint: "listPublishedEntries",
|
|
2196
|
-
params: {
|
|
2197
|
-
siteId,
|
|
2198
|
-
type: contentType,
|
|
2199
|
-
...typeof limit === "number" && { limit: String(limit) },
|
|
2200
|
-
...typeof offset === "number" && { offset: String(offset) },
|
|
2201
|
-
...includeMeta && { meta: "true" },
|
|
2202
|
-
...orderParam && { order: orderParam },
|
|
2203
|
-
...preview && { stage: "preview" },
|
|
2204
|
-
...mode === "manual" && entryIds?.length && {
|
|
2205
|
-
mode: "manual",
|
|
2206
|
-
entryIds: JSON.stringify(entryIds)
|
|
2207
|
-
}
|
|
2208
|
-
},
|
|
2209
|
-
options: { signal: sig }
|
|
2210
|
-
});
|
|
2211
|
-
}, {
|
|
2271
|
+
const { siteId, preview = false, signal } = params;
|
|
2272
|
+
const request = buildEntryListReadRequest(params);
|
|
2273
|
+
return resilientFetchData("listPublishedEntries", request.cacheKey, (sig) => apiClient({
|
|
2274
|
+
endpoint: "listPublishedEntries",
|
|
2275
|
+
params: request.params,
|
|
2276
|
+
options: { signal: sig }
|
|
2277
|
+
}), {
|
|
2212
2278
|
preview,
|
|
2213
2279
|
signal,
|
|
2280
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublishedEntries", { siteId }),
|
|
2214
2281
|
prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadEntries(siteId, params) : void 0
|
|
2215
2282
|
});
|
|
2216
2283
|
}
|
|
@@ -2255,7 +2322,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2255
2322
|
},
|
|
2256
2323
|
options: { signal: sig }
|
|
2257
2324
|
});
|
|
2258
|
-
}, {
|
|
2325
|
+
}, {
|
|
2326
|
+
signal,
|
|
2327
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublishedEntryPreview", { siteId })
|
|
2328
|
+
});
|
|
2259
2329
|
},
|
|
2260
2330
|
async getPublicFormById(params) {
|
|
2261
2331
|
const { formId, siteId, signal } = params;
|
|
@@ -2269,7 +2339,13 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2269
2339
|
},
|
|
2270
2340
|
options: { signal: sig }
|
|
2271
2341
|
}));
|
|
2272
|
-
}, {
|
|
2342
|
+
}, {
|
|
2343
|
+
signal,
|
|
2344
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublicFormById", {
|
|
2345
|
+
siteId,
|
|
2346
|
+
formId
|
|
2347
|
+
})
|
|
2348
|
+
});
|
|
2273
2349
|
},
|
|
2274
2350
|
async getForms(params) {
|
|
2275
2351
|
const { siteId, signal } = params;
|
|
@@ -2282,6 +2358,7 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2282
2358
|
}));
|
|
2283
2359
|
}, {
|
|
2284
2360
|
signal,
|
|
2361
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicForms", { siteId }),
|
|
2285
2362
|
prebuildFallback: prebuildLoader ? () => {
|
|
2286
2363
|
const result = prebuildLoader.loadForms();
|
|
2287
2364
|
if (result) return {
|
|
@@ -2331,7 +2408,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2331
2408
|
},
|
|
2332
2409
|
options: { signal: sig }
|
|
2333
2410
|
});
|
|
2334
|
-
}, {
|
|
2411
|
+
}, {
|
|
2412
|
+
signal,
|
|
2413
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicEvents", { siteId })
|
|
2414
|
+
});
|
|
2335
2415
|
},
|
|
2336
2416
|
async getPublicEventDetails(params) {
|
|
2337
2417
|
const { siteId, limit, from, to, afterStartsAt, afterId, stage, categoryIds, venueId, staffMemberId, kind, eventSurface, eventPresets, scheduleScope, seriesId, includeOccurrenceId, signal } = params;
|
|
@@ -2366,7 +2446,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2366
2446
|
}] },
|
|
2367
2447
|
options: { signal: sig }
|
|
2368
2448
|
}), requestId);
|
|
2369
|
-
}, {
|
|
2449
|
+
}, {
|
|
2450
|
+
signal,
|
|
2451
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublicEventDetails", { siteId })
|
|
2452
|
+
});
|
|
2370
2453
|
},
|
|
2371
2454
|
async listPublicTeamMembers(params) {
|
|
2372
2455
|
const { siteId, stage, signal } = params;
|
|
@@ -2380,7 +2463,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2380
2463
|
},
|
|
2381
2464
|
options: { signal: sig }
|
|
2382
2465
|
});
|
|
2383
|
-
}, {
|
|
2466
|
+
}, {
|
|
2467
|
+
signal,
|
|
2468
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicTeamMembers", { siteId })
|
|
2469
|
+
});
|
|
2384
2470
|
},
|
|
2385
2471
|
async listPublicProducts(params) {
|
|
2386
2472
|
const { siteId, stage, categorySelector, signal } = params;
|
|
@@ -2396,7 +2482,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2396
2482
|
},
|
|
2397
2483
|
options: { signal: sig }
|
|
2398
2484
|
});
|
|
2399
|
-
}, {
|
|
2485
|
+
}, {
|
|
2486
|
+
signal,
|
|
2487
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicProducts", { siteId })
|
|
2488
|
+
});
|
|
2400
2489
|
},
|
|
2401
2490
|
async listPublicPasses(params) {
|
|
2402
2491
|
const { siteId, categories, signal } = params;
|
|
@@ -2410,7 +2499,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2410
2499
|
},
|
|
2411
2500
|
options: { signal: sig }
|
|
2412
2501
|
});
|
|
2413
|
-
}, {
|
|
2502
|
+
}, {
|
|
2503
|
+
signal,
|
|
2504
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicPasses", { siteId })
|
|
2505
|
+
});
|
|
2414
2506
|
},
|
|
2415
2507
|
async listPublicMemberships(params) {
|
|
2416
2508
|
const { siteId, categories, signal } = params;
|
|
@@ -2424,7 +2516,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2424
2516
|
},
|
|
2425
2517
|
options: { signal: sig }
|
|
2426
2518
|
});
|
|
2427
|
-
}, {
|
|
2519
|
+
}, {
|
|
2520
|
+
signal,
|
|
2521
|
+
cacheTags: buildPublicReadMemoryCacheTags("listPublicMemberships", { siteId })
|
|
2522
|
+
});
|
|
2428
2523
|
},
|
|
2429
2524
|
...eventReads,
|
|
2430
2525
|
async checkRedirect(params) {
|
|
@@ -2439,7 +2534,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2439
2534
|
},
|
|
2440
2535
|
options: { signal: sig }
|
|
2441
2536
|
});
|
|
2442
|
-
}, {
|
|
2537
|
+
}, {
|
|
2538
|
+
signal,
|
|
2539
|
+
cacheTags: buildPublicReadMemoryCacheTags("checkRedirect", { site: siteId })
|
|
2540
|
+
});
|
|
2443
2541
|
},
|
|
2444
2542
|
async resolveRouteOutcome(params) {
|
|
2445
2543
|
const { siteId, path, preview = false, signal } = params;
|
|
@@ -2479,7 +2577,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2479
2577
|
},
|
|
2480
2578
|
options: { signal: sig }
|
|
2481
2579
|
});
|
|
2482
|
-
}, {
|
|
2580
|
+
}, {
|
|
2581
|
+
signal,
|
|
2582
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublicRoutableContent", { siteId })
|
|
2583
|
+
});
|
|
2483
2584
|
},
|
|
2484
2585
|
async getSitemapRoutes(params) {
|
|
2485
2586
|
const { siteId, page, pageSize, signal } = params;
|
|
@@ -2494,7 +2595,13 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
2494
2595
|
},
|
|
2495
2596
|
options: { signal: sig }
|
|
2496
2597
|
});
|
|
2497
|
-
}, {
|
|
2598
|
+
}, {
|
|
2599
|
+
signal,
|
|
2600
|
+
cacheTags: buildPublicReadMemoryCacheTags("getPublicSitemapRoutes", { siteId })
|
|
2601
|
+
});
|
|
2602
|
+
},
|
|
2603
|
+
clearCacheForTags(tags) {
|
|
2604
|
+
cache.clearForTags(tags);
|
|
2498
2605
|
},
|
|
2499
2606
|
clearCache() {
|
|
2500
2607
|
cache.clear();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as eventCheckoutReturnResponseSchema, i as eventCheckoutResponseSchema, n as blockSiteTermsSchema, o as eventRegisterResponseSchema, p as calendarWindowPageSchema } from "./noop-
|
|
2
|
+
import { a as eventCheckoutReturnResponseSchema, i as eventCheckoutResponseSchema, n as blockSiteTermsSchema, o as eventRegisterResponseSchema, p as calendarWindowPageSchema } from "./noop-CQU7tiMg.mjs";
|
|
3
|
+
import { n as submissionProof } from "./protection-C0PoH1lT.mjs";
|
|
3
4
|
import { createContext, useContext, useMemo } from "react";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -801,7 +802,7 @@ function createBlockApi(config) {
|
|
|
801
802
|
return {
|
|
802
803
|
config,
|
|
803
804
|
async submitForm(data) {
|
|
804
|
-
return request(FORMS.submit, { body: data });
|
|
805
|
+
return request(FORMS.submit, { body: protectedFormBody(data) });
|
|
805
806
|
},
|
|
806
807
|
async getForm(formId, formSiteId) {
|
|
807
808
|
const sid = formSiteId ?? siteId;
|
|
@@ -1061,7 +1062,10 @@ function createBlockApi(config) {
|
|
|
1061
1062
|
sourceRef: data.sourceRef,
|
|
1062
1063
|
setupRevision: data.setupRevision,
|
|
1063
1064
|
visitorSelection: data.visitorSelection,
|
|
1064
|
-
meta:
|
|
1065
|
+
meta: {
|
|
1066
|
+
...data.meta,
|
|
1067
|
+
altchaSolution: submissionProof(data.authorization)
|
|
1068
|
+
}
|
|
1065
1069
|
}
|
|
1066
1070
|
});
|
|
1067
1071
|
},
|
|
@@ -1289,6 +1293,16 @@ function createBlockApi(config) {
|
|
|
1289
1293
|
}
|
|
1290
1294
|
};
|
|
1291
1295
|
}
|
|
1296
|
+
/** The typed client owns translating live authorization to the existing wire contract. */
|
|
1297
|
+
function protectedFormBody({ authorization, ...data }) {
|
|
1298
|
+
return {
|
|
1299
|
+
...data,
|
|
1300
|
+
meta: {
|
|
1301
|
+
...data.meta,
|
|
1302
|
+
altchaSolution: submissionProof(authorization)
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1292
1306
|
//#endregion
|
|
1293
1307
|
//#region ../blocks/src/system/runtime/api/context.tsx
|
|
1294
1308
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as assertNever } from "./src-VIsPY-kw.mjs";
|
|
3
|
-
import { An as isEventFull, Cn as canJoinEventWaitlistOnAnyMode, xn as resolveRuntimeEventDestination } from "./wizardSteps-
|
|
3
|
+
import { An as isEventFull, Cn as canJoinEventWaitlistOnAnyMode, xn as resolveRuntimeEventDestination } from "./wizardSteps-DManVJpc.mjs";
|
|
4
4
|
//#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
|
|
5
5
|
/**
|
|
6
6
|
* Booking call-to-action resolution for events: where an event links to and
|
|
@@ -76,5 +76,29 @@ function resolveEventCta(event, buttonText) {
|
|
|
76
76
|
hidden: false
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* The CTA for a catalogue card that stands for a whole dated series. The card
|
|
81
|
+
* carries the next occurrence's capacity, but the visitor picks from the
|
|
82
|
+
* series' upcoming dates, so it says "Sold out" (or offers the waitlist) only
|
|
83
|
+
* when none of `upcomingDates` can be booked. The first date with places
|
|
84
|
+
* decides; failing that, the first full date with a waitlist; failing both,
|
|
85
|
+
* the next occurrence as {@link resolveEventCta} reads it. The link always
|
|
86
|
+
* goes to the series, never to the date that decided.
|
|
87
|
+
*
|
|
88
|
+
* Whole-series events share one run capacity, so they need no dates and read
|
|
89
|
+
* exactly as {@link resolveEventCta}; so does a dated series with none listed.
|
|
90
|
+
*/
|
|
91
|
+
function resolveDatedSeriesCta(series, upcomingDates, buttonText) {
|
|
92
|
+
const deciding = series.bookingScope === "single_occurrence" ? upcomingDates.find((date) => isOpenForBooking(date) && !isEventFull(date)) ?? upcomingDates.find((date) => isOpenForBooking(date) && isEventFull(date) && canJoinEventWaitlistOnAnyMode(date)) : void 0;
|
|
93
|
+
if (!deciding) return resolveEventCta(series, buttonText);
|
|
94
|
+
return {
|
|
95
|
+
...resolveEventCta(deciding, buttonText),
|
|
96
|
+
href: resolveEventHref(series),
|
|
97
|
+
external: resolveRuntimeEventDestination(series).kind === "external"
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function isOpenForBooking(event) {
|
|
101
|
+
return event.bookingAvailability.kind !== "closed";
|
|
102
|
+
}
|
|
79
103
|
//#endregion
|
|
80
|
-
export {
|
|
104
|
+
export { resolveEventCta as n, resolveEventLinkProps as r, resolveDatedSeriesCta as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { At as resolveBookingTimeZoneId, Nt as toUtcIsoDateTimeString, Ot as parseUtcIsoDateTimeString, ft as formatDateTime$1, mt as formatTime, pt as formatDateTimeRange, ut as formatDate$1, vt as resolveBookingDisplayContext } from "./noop-
|
|
2
|
+
import { At as resolveBookingTimeZoneId, Nt as toUtcIsoDateTimeString, Ot as parseUtcIsoDateTimeString, ft as formatDateTime$1, mt as formatTime, pt as formatDateTimeRange, ut as formatDate$1, vt as resolveBookingDisplayContext } from "./noop-CQU7tiMg.mjs";
|
|
3
3
|
//#region ../blocks/src/portal/dateFormatting.ts
|
|
4
4
|
/** Optional API timestamps enter the display model here; invalid values never render a Date. */
|
|
5
5
|
function readInstant(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as BlockApiError } from "./context-
|
|
2
|
+
import { r as BlockApiError } from "./context-CBV21-9L.mjs";
|
|
3
3
|
//#region ../blocks/src/system/runtime/shared/utils/demoBookingPassStorage.ts
|
|
4
4
|
const STORAGE_KEY = "riverbank:demo-booking-passes:v1";
|
|
5
5
|
const CHECKOUT_RETURN_EMAIL_KEY = "riverbank:demo-booking-checkout-email:v1";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { fn as staticHeaderChromeRuntime, v as buildCartDisplay } from "./shop.interactive-BGmkdIAZ.mjs";
|
|
3
|
+
import { i as ThemedButtonLink, r as ThemedButton } from "./ThemedButton-Cfbo1bfh.mjs";
|
|
4
4
|
import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-DKlZRNZD.mjs";
|
|
5
5
|
import { t as ModalShell } from "./ModalShell-B_fHWK71.mjs";
|
|
6
6
|
import { n as NAV_DROPDOWN_SHIFT_PROPERTY } from "./navDropdownSizing-CUjDrcIt.mjs";
|
|
7
|
-
import { n as useCommerceCart } from "./shop-commerce-store-
|
|
7
|
+
import { n as useCommerceCart } from "./shop-commerce-store-B9nw4lRP.mjs";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { createPortal } from "react-dom";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as resolveEventDetailsPresentation, t as EventDetailsView } from "./view-
|
|
2
|
+
import { a as resolveEventDetailsPresentation, t as EventDetailsView } from "./view-DlkCDfuN.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/event-details.client.tsx
|