@riverbankcms/sdk 0.177.0 → 0.179.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.
Files changed (225) hide show
  1. package/README.md +15 -8
  2. package/dist/_dts/{BlocksIslandsHydrator-sYraeqm9.d.ts → BlocksIslandsHydrator-DKwgs95u.d.ts} +1 -1
  3. package/dist/_dts/{Page-Bp7hTDTy.d.ts → Page-lWenra5i.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-CxkCCyKw.d.ts → SdkPreviewMode-BRxhRw4I.d.ts} +2 -2
  5. package/dist/_dts/{client-K6UhbL3t.d.ts → client-qWn7xAwJ.d.ts} +77 -23
  6. package/dist/_dts/{content-types-BLAdIMyr.d.ts → content-types-DL6GIvTm.d.ts} +2 -2
  7. package/dist/_dts/{contracts-BG7yTZ6t.d.ts → contracts-CzWyAiJj.d.ts} +6 -116
  8. package/dist/_dts/{generatePageMetadata-X_WpGzZZ.d.ts → generatePageMetadata-CBKd0cJ4.d.ts} +2 -2
  9. package/dist/_dts/{index--n-wV8Xd.d.ts → index-7CDBZGb-.d.ts} +1 -1
  10. package/dist/_dts/{index-Bygd2RCg.d.ts → index-BU9uAkHB.d.ts} +4 -4
  11. package/dist/_dts/{index-BMGif2r3.d.ts → index-BYnG_vF5.d.ts} +1 -1
  12. package/dist/_dts/{index-CBRbZJ6u.d.ts → index-CZgJrhzT.d.ts} +4 -2
  13. package/dist/_dts/{index-BLseXObg.d.ts → index-CaCum9mM.d.ts} +2 -2
  14. package/dist/_dts/{index-BpAW9AKB.d.ts → index-DCiSHd-C.d.ts} +1 -1
  15. package/dist/_dts/{index-CX9bp60k.d.ts → index-DVSipdrT.d.ts} +3 -3
  16. package/dist/_dts/{loadContent-uhUThWaq.d.ts → loadContent-CPKbFQyq.d.ts} +15 -13
  17. package/dist/_dts/{request-Bf9YImJw.d.ts → request-BjKBCS7t.d.ts} +1687 -373
  18. package/dist/_dts/{resolveBlockData-D6M5NMZB.d.ts → resolveBlockData-DupbMCup.d.ts} +8 -5
  19. package/dist/_dts/resolvePageContent-BqNyCHi8.d.ts +61 -0
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +3 -3
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/types.d.ts +7 -2
  29. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +32 -12
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +56 -4
  38. package/dist/_dts/sdk/src/portal/index.d.ts +95 -13
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +19 -6
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  55. package/dist/_dts/serviceBookingOutline-YcsIjvn1.d.ts +582 -0
  56. package/dist/_dts/{types-C1l2Sm2h.d.ts → types-B7e6Lmo5.d.ts} +3 -3
  57. package/dist/_dts/{types-DgV8P2mz.d.ts → types-BOxSq-Bq.d.ts} +8 -7
  58. package/dist/_dts/{types-BdZ5pJSk.d.ts → types-CT-KOxl_.d.ts} +5 -39
  59. package/dist/_dts/{validation-BtbZIT5f.d.ts → validation-Dz6qccue.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CeYQQQs7.mjs → BlocksIslandsHydrator-1XifJg6V.mjs} +17 -18
  61. package/dist/client/{BookingMailingListNote-CDDWrY_W.mjs → BookingMailingListNote-BsbEgagJ.mjs} +7 -7
  62. package/dist/client/{BookingQuestionFields-MbvIo2jS.mjs → BookingQuestionFields-C8IbeLHj.mjs} +4 -4
  63. package/dist/client/{CalendarNavigationChevron-C6CSVfEB.mjs → CalendarNavigationChevron-Bbqij1XQ.mjs} +43 -10
  64. package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-C9Ggcfx3.mjs → DemoBookingPortalAccess-uA9H8LIL.mjs} +4 -4
  66. package/dist/client/{EventCalendar.client-BSMuSqg0.mjs → EventCalendar.client-yoSI77ov.mjs} +11 -11
  67. package/dist/client/{EventCombined.client-BTrmSyUB.mjs → EventCombined.client-HeCNlliq.mjs} +11 -11
  68. package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
  69. package/dist/client/{EventItem-B0WjGXsH.mjs → EventItem-Duhk1vnF.mjs} +247 -7
  70. package/dist/client/{EventListWeekNavigation-8Ij7vuxY.mjs → EventListWeekNavigation-BiutEqPK.mjs} +1 -1
  71. package/dist/client/{EventListing.client-CWk2NEwd.mjs → EventListing.client-B5ln77jG.mjs} +3 -3
  72. package/dist/client/{EventListing.view-BEH4UbSL.mjs → EventListing.view-hUDhNtMv.mjs} +203 -9
  73. package/dist/client/{EventRegistrationPayment-B2EikR3f.mjs → EventRegistrationPayment-DqtX1vB2.mjs} +439 -123
  74. package/dist/client/{Page-C03rc6jw.mjs → Page-ChJ2TGVk.mjs} +24314 -20226
  75. package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
  76. package/dist/client/{SiteTermsAgreementField-BYACYP0T.mjs → SiteTermsAgreementField-CDBU31xW.mjs} +3 -3
  77. package/dist/client/{StepIndicator-Bb7rPtSq.mjs → StepIndicator-2Dl9zon2.mjs} +80 -33
  78. package/dist/client/{BookingPanelArrangement-BShQSial.mjs → StepIndicator-JQA-VuEH.mjs} +12 -12
  79. package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
  80. package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
  81. package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
  82. package/dist/client/{accordion-BfsOiweL.mjs → accordion-B6SqU49k.mjs} +1 -1
  83. package/dist/client/{booking-form.client-B8ohIj13.mjs → booking-form.client-DrEOjQ3N.mjs} +15 -15
  84. package/dist/client/{bookingForm-CXsck2oH.mjs → bookingForm-drZBwEZW.mjs} +4 -4
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-B_hcuT06.mjs → boxStyleClassNames-DEh45w16.mjs} +19 -19
  87. package/dist/client/{carousel-Cz5Ddbsx.mjs → carousel-C-YJliD-.mjs} +2 -2
  88. package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
  89. package/dist/client/{cart-CTC2oS3p.mjs → cart-acGFWK9R.mjs} +3 -3
  90. package/dist/client/{cart.client-c1YkTC-Q.mjs → cart.client-BzlOGP2j.mjs} +1 -1
  91. package/dist/client/{checkout-BeW1ufaH.mjs → checkout-SEontwhy.mjs} +3 -3
  92. package/dist/client/{checkout.client-BeU32khQ.mjs → checkout.client-C0Qvh-d4.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-DVfSUSKp.mjs → checkoutUrls-yUKeq1N9.mjs} +1 -1
  94. package/dist/client/client.mjs +469 -320
  95. package/dist/client/{context-R9p5c8IH.mjs → context-DTrwaQtg.mjs} +2 -1
  96. package/dist/client/{dateFormatting-CF6FWCoo.mjs → dateFormatting-Cg8E1r9l.mjs} +1 -1
  97. package/dist/client/{demoPortalMagicLink-tZxIm3RL.mjs → demoPortalMagicLink-D0kOJYOX.mjs} +5 -4
  98. package/dist/client/{enhanceHeaderSection-DEYDI54E.mjs → enhanceHeaderSection-DyrpZ7ks.mjs} +4 -4
  99. package/dist/client/{event-registration.client-DWvSODTI.mjs → event-registration.client-RLZQWi2V.mjs} +121 -183
  100. package/dist/client/{eventCalendar-C9Pn9eeZ.mjs → eventCalendar-CphYnImh.mjs} +4 -4
  101. package/dist/client/{eventCombined-Bdhk0fp0.mjs → eventCombined-BvqjASB_.mjs} +4 -4
  102. package/dist/client/{eventListing-B-bJOQUk.mjs → eventListing-BaNAoC_M.mjs} +4 -4
  103. package/dist/client/{eventRegistration-CbdmUiDT.mjs → eventRegistration-COMHoRl6.mjs} +4 -4
  104. package/dist/client/events-9LPvwbWp.mjs +28 -0
  105. package/dist/client/{form-BbUUt784.mjs → form-DyH2juYT.mjs} +3 -3
  106. package/dist/client/{form.client-BVlz-9_t.mjs → form.client-DBwzkB0M.mjs} +5 -5
  107. package/dist/client/{form.parts-TB4UIrML.mjs → form.parts-CY4kX3mh.mjs} +3 -3
  108. package/dist/client/{formatDate-TDHhFjFN.mjs → formatDate-CTEN7gxW.mjs} +1 -1
  109. package/dist/client/gifting/client.mjs +7 -6
  110. package/dist/client/{gifting-CbNSrp7C.mjs → gifting-CIx4V378.mjs} +4 -4
  111. package/dist/client/{gifting.client-B__bGhFc.mjs → gifting.client-BEVPpzJM.mjs} +5 -5
  112. package/dist/client/{gifting.parts-CTA1sDW6.mjs → gifting.parts-VnORjnZK.mjs} +2 -2
  113. package/dist/client/{headerSection-5Wn9nUW_.mjs → headerSection-DGcJfRS8.mjs} +2 -2
  114. package/dist/client/{lookSurfaces-BwiNdgMU.mjs → lookSurfaces-IqT_SVnX.mjs} +167 -85
  115. package/dist/client/{newsletter-form.client-B17WYHxZ.mjs → newsletter-form.client-BvEDkjiD.mjs} +6 -6
  116. package/dist/client/{shop.interactive-CxDJ8P2r.mjs → newsletter-form.interactive-DCO1lErD.mjs} +3970 -3997
  117. package/dist/client/{newsletter-form.parts-DN9wD1ZG.mjs → newsletter-form.parts-BIy4IUT3.mjs} +2 -2
  118. package/dist/client/{newsletterForm-DLMlxInp.mjs → newsletterForm-CoTXDNFS.mjs} +3 -3
  119. package/dist/client/portal/client.mjs +346 -21
  120. package/dist/client/{product-detail.client-Di_anRGR.mjs → product-detail.client-YHQ2aKX1.mjs} +1 -1
  121. package/dist/client/{product-list.client-Duhl6rtL.mjs → product-list.client-DxoZw1vF.mjs} +1 -1
  122. package/dist/client/{productDetail-BgKmCwA8.mjs → productDetail-DjuFvkey.mjs} +3 -3
  123. package/dist/client/{productList-C_wMKsYS.mjs → productList-DE9GEFoZ.mjs} +3 -3
  124. package/dist/client/{propsDecoder-y3LvxaiG.mjs → propsDecoder-Cyag_HOs.mjs} +2 -48
  125. package/dist/client/{registry.server-CIWYKz1V.mjs → registry.server-BPwV-0Pp.mjs} +10426 -9114
  126. package/dist/client/rendering/client.mjs +41 -27
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +23 -2836
  129. package/dist/client/{richText-coerce-DkPBFb_a.mjs → richText-coerce-NrRqDeOg.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-BgO0rZce.mjs → routeIslandApiConfig-BWq5gKFK.mjs} +1 -1
  131. package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
  132. package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
  133. package/dist/client/{shop-CFbWlv_W.mjs → shop-C3wM0Hr4.mjs} +3 -3
  134. package/dist/client/{shop-commerce-C-I29eaA.mjs → shop-commerce-34YvcpbX.mjs} +14 -14
  135. package/dist/client/{shop-commerce-store-DGcc7twO.mjs → shop-commerce-store-B7xHksOs.mjs} +1 -1
  136. package/dist/client/{shop-discount-apply.state-DOm7vx0X.mjs → shop-discount-apply.state-BiBnozfO.mjs} +2 -2
  137. package/dist/client/{shop.client-GHTWUKD6.mjs → shop.client-C0v88nLd.mjs} +14 -14
  138. package/dist/client/{shopShared-Be9QJJpT.mjs → shopShared-Ct-BRNez.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/{noop-CaQxI-Js.mjs → src-CCtanNlD.mjs} +462 -455
  141. package/dist/client/src-DqMbCjI1.mjs +3 -0
  142. package/dist/client/{src-xrjaKaCj.mjs → src-uwCpbHXG.mjs} +2 -1
  143. package/dist/client/{timetableModel--R0zVzZO.mjs → timetableModel-lhE29TNT.mjs} +66 -12
  144. package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
  145. package/dist/client/{useAvailableSlots-BGu_2F50.mjs → useAvailableSlots-BelJviOT.mjs} +2 -2
  146. package/dist/client/useDiscountCodeUi-rQRE1-Ho.mjs +196 -0
  147. package/dist/client/{useEventPagination-DxIJ--JZ.mjs → useEventPagination-C4rS2Xxl.mjs} +8 -8
  148. package/dist/client/{view-3foOzGWR.mjs → view-LJVHVqsy.mjs} +4 -4
  149. package/dist/client/{display-4HYOb-AK.mjs → wizardSteps-CNDsxeJH.mjs} +9168 -8981
  150. package/dist/preview-next/before-render.mjs +4 -3
  151. package/dist/preview-next/client/{PageSectionToolbar-D6-jojqh.mjs → PageSectionToolbar-C4TtBPN-.mjs} +3 -3
  152. package/dist/preview-next/client/{PreviewEditorSidebar-BUVFKZ4k.mjs → PreviewEditorSidebar-D6fkE59-.mjs} +15 -13
  153. package/dist/preview-next/client/{PreviewEditorUI-292pOiSt.mjs → PreviewEditorUI-amcDlj0O.mjs} +4 -4
  154. package/dist/preview-next/client/{PreviewShell-CW0Yzj3h.mjs → PreviewShell-DeQjx4zk.mjs} +5 -5
  155. package/dist/preview-next/client/{SdkPreviewModeRuntime-Dba7zoZK.mjs → SdkPreviewModeRuntime-Cx0SXnoX.mjs} +5 -5
  156. package/dist/preview-next/client/{previewAssistantSlot-B-utyhbS.mjs → previewAssistantSlot-aqpU34WI.mjs} +1764 -1090
  157. package/dist/preview-next/client/{previewChromeRoot-CCoGydUD.mjs → previewChromeRoot-D3Gy_Rs0.mjs} +1 -1
  158. package/dist/preview-next/client/runtime.mjs +3 -3
  159. package/dist/preview-next/client/{sdk-runtime-DCpXVcA0.mjs → sdk-runtime-Dzx_RrN7.mjs} +2 -2
  160. package/dist/preview-next/client/{siteStyleAccess-sjOvRAHY.mjs → siteStyleAccess-LHedw83e.mjs} +1 -1
  161. package/dist/preview-next/client/src-EO5QoRlU.mjs +3 -0
  162. package/dist/preview-next/client/{src-DzXUmsyK.mjs → src-lX6heoDA.mjs} +2 -1
  163. package/dist/preview-next/client/{useAutosaveStatus-R1rZ9-IZ.mjs → useAutosaveStatus-DpSd9aVk.mjs} +1 -1
  164. package/dist/preview-next/client/{useOpenBlockForSetup-BS7CANPv.mjs → useOpenBlockForSetup-BGZn5AT1.mjs} +1 -1
  165. package/dist/preview-next/keepAlive.mjs +1 -1
  166. package/dist/preview-next/middleware.mjs +1 -1
  167. package/dist/preview-next/{route-contract-BSSbtz6A.mjs → route-contract-DnL-FgSV.mjs} +83 -11
  168. package/dist/server/{Block.shared-Dc3DX7Cf.mjs → Block.shared-BEbq6EwO.mjs} +5 -5
  169. package/dist/server/{bindings-VGgS6UvF.mjs → bindings-Bly0dRs7.mjs} +36 -5
  170. package/dist/server/{client-BPLLL22F.mjs → client-CGJ2ztYp.mjs} +1021 -1118
  171. package/dist/server/config-validation.mjs +1 -1
  172. package/dist/server/config.mjs +2 -2
  173. package/dist/server/constants-Cj7hfbrA.mjs +41 -0
  174. package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
  175. package/dist/server/data/dataLoaderContext.mjs +1 -1
  176. package/dist/server/data/resolveBlockData.mjs +1 -1
  177. package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
  178. package/dist/server/error-f4g44bKx.mjs +387 -0
  179. package/dist/server/index.mjs +3 -2
  180. package/dist/server/loadContent-BkK1w3QQ.mjs +692 -0
  181. package/dist/server/{loadPage-CQgde5DN.mjs → loadPage-DTLe0FEs.mjs} +22 -4
  182. package/dist/server/{navigation-iC_hXjJI.mjs → navigation-BcNfYYuu.mjs} +1 -1
  183. package/dist/server/navigation.mjs +1 -1
  184. package/dist/server/next.mjs +103 -100
  185. package/dist/server/{overrideResolution-CkpwAHvW.mjs → overrideResolution-Uy9Zp2Ks.mjs} +1 -1
  186. package/dist/server/page-converter.mjs +1 -1
  187. package/dist/server/{pageRenderPlan-CfSnAkCO.mjs → pageRenderPlan-JzxBnqfV.mjs} +19 -7
  188. package/dist/server/{pageRuntimeSupport-uz4gzBOo.mjs → pageRuntimeSupport-DyNSd2Yj.mjs} +50 -2
  189. package/dist/server/{pageShared-6z6JBU41.mjs → pageShared-DU4ETFPS.mjs} +89 -83
  190. package/dist/server/portal-B4JVkdjc.mjs +783 -0
  191. package/dist/server/portal.mjs +3 -3
  192. package/dist/server/{prebuild-B4_Llisx.mjs → prebuild-8jNtDXmS.mjs} +5 -4
  193. package/dist/server/prebuild.mjs +1 -1
  194. package/dist/server/{prefetchBlockData-CCiYV8_s.mjs → prefetchBlockData-xeMG42aw.mjs} +3 -2
  195. package/dist/server/{registry-CXRXsFSx.mjs → registry-DH1VrsCl.mjs} +587 -329
  196. package/dist/server/rendering/components/pageShared.mjs +1 -1
  197. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  198. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  199. package/dist/server/rendering/server.mjs +5 -4
  200. package/dist/server/rendering.mjs +9 -8
  201. package/dist/server/{resolveBlockData-yfe8WLEA.mjs → resolveBlockData-BN8tweTx.mjs} +24 -5
  202. package/dist/server/resolvePageContent-DnM16_f9.mjs +89 -0
  203. package/dist/server/routing.mjs +271 -57
  204. package/dist/server/server.mjs +3 -3
  205. package/dist/server/{loadContent-CxASA3PE.mjs → servicePageContent-B-FezJmH.mjs} +709 -453
  206. package/dist/server/{validation-BvHio6QI.mjs → validation-3jOzYdPL.mjs} +3 -3
  207. package/dist/server/{version-SuFlio6n.mjs → version-8t0o6_jd.mjs} +1 -1
  208. package/dist/styles/index.css +19 -0
  209. package/package.json +1 -1
  210. package/dist/_dts/footerPageOutline-DwMHeYmQ.d.ts +0 -256
  211. package/dist/_dts/resolvePageContent-DkzWvFbG.d.ts +0 -162
  212. package/dist/client/LocationMapActions-myIQIvQL.mjs +0 -62
  213. package/dist/client/MapDrawingSvg-BfsVyPvB.mjs +0 -200
  214. package/dist/client/course-CUFVJEAc.mjs +0 -237
  215. package/dist/client/duration-Q6_QNgiv.mjs +0 -37
  216. package/dist/client/event-details.client-BwjBJP-f.mjs +0 -53
  217. package/dist/client/eventDetails-C2LfNW_o.mjs +0 -13
  218. package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
  219. package/dist/client/src-BozhJ43Z.mjs +0 -3
  220. package/dist/client/useDiscountCodeUi-I_mXI9Yd.mjs +0 -237
  221. package/dist/client/view-BbzH5MQb.mjs +0 -1371
  222. package/dist/preview-next/client/src-LUhVXBEQ.mjs +0 -3
  223. package/dist/server/constants-hl17xz6x.mjs +0 -22
  224. package/dist/server/portal-BjVHMAUC.mjs +0 -371
  225. package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { us as parseSiteId } from "./display-4HYOb-AK.mjs";
3
- import { E as resolveSiteCustomBlocks, M as materializeEntriesMedia, T as siteBlockRenderContext, _ as buildRenderablePageOutline, at as encodePublicProductCategorySelector, j as prefetchBlockDataWithFailures, k as requireSdkTheme, t as Page, ut as isSupportedLoaderEndpoint, v as buildSiteRenderSupport, x as projectRenderablePageOutline, y as collectMediaAssetSidecar } from "./Page-C03rc6jw.mjs";
4
- import { Wn as publicMapLocationParamsSchema } from "./registry.server-CIWYKz1V.mjs";
2
+ import { gs as parseSiteId } from "./wizardSteps-CNDsxeJH.mjs";
3
+ import { A as materializeEntriesMedia, C as siteBlockRenderContext, I as requireSdkTheme, M as RiverbankApiError, N as attachResilienceStatusToError, S as projectRenderablePageOutline, _ as loadContentFromContentResponse, b as buildSiteRenderSupport, ht as isSupportedLoaderEndpoint, k as prefetchBlockDataWithFailures, m as isPageContent, mt as encodePublicProductCategorySelector, t as Page, w as resolveSiteCustomBlocks, x as collectMediaAssetSidecar, y as buildRenderablePageOutline } from "./Page-ChJ2TGVk.mjs";
4
+ import { Jn as publicMapLocationParamsSchema } from "./registry.server-BPwV-0Pp.mjs";
5
5
  import { t as BEFORE_BOOKING_QUESTIONS_ROUTE } from "./bookingQuestions-BHq83mzS.mjs";
6
- import { t as restoreRuntimeResponse } from "./runtimeResponse-9v8q2NBc.mjs";
6
+ import { t as restoreRuntimeResponse } from "./runtimeResponse-DtWSfWSZ.mjs";
7
7
  import { useEffect, useState } from "react";
8
8
  import { z } from "zod";
9
9
  /**
@@ -46,7 +46,6 @@ const PUBLIC_READ_CACHE_POLICIES = {
46
46
  "public_memberships"
47
47
  ], "batch_only"),
48
48
  getPublicMapLocation: availability(["public_events", "public_event_filters"], "batch_only"),
49
- resolveEventSubroute: availability(["public_events", "public_event_filters"], "direct"),
50
49
  listPublicRouteCandidates: content(["published_content"], "batch_only"),
51
50
  listPublicTeamMembers: content(["public_team_members"]),
52
51
  listPublicProducts: availability(["public_products"], "direct"),
@@ -674,6 +673,23 @@ function buildFetchPolicy(siteId, reads, freshnessSeconds) {
674
673
  function buildPublicReadBatchFetchPolicy(siteId, reads) {
675
674
  return buildFetchPolicy(siteId, reads, publicReadBatchFreshnessSeconds);
676
675
  }
676
+ /** A page may depend on admission even when an ordinary CMS page won precedence. */
677
+ function buildPageReadCachePolicy(siteId, dependencies) {
678
+ return dependencies === "availability" ? {
679
+ tags: normalizeRevalidateTags([
680
+ ...buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
681
+ ...buildPublicReadFetchTags("listPublicEvents", { siteId }),
682
+ ...buildPublicReadFetchTags("getPublicBookingService", { siteId })
683
+ ]),
684
+ revalidate: 60
685
+ } : {
686
+ tags: buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
687
+ revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS
688
+ };
689
+ }
690
+ function pageReadDependencies(payload) {
691
+ return typeof payload === "object" && payload !== null && "dependencies" in payload && payload.dependencies === "content" ? "content" : "availability";
692
+ }
677
693
  //#endregion
678
694
  //#region ../api/src/sdkEntryReadEndpoints.ts
679
695
  const SDK_ENTRY_READ_ENDPOINTS = {
@@ -843,8 +859,10 @@ const arrangementEndRequestSchema = z.object({
843
859
  ...recordedReturn,
844
860
  lastDate: localDate
845
861
  }).strict();
846
- z.object({
862
+ /** `expectedUpdatedAt` is the version the dialog was showing, so a save can't overwrite a newer change. */
863
+ const arrangementEditSchema = z.object({
847
864
  ...operation,
865
+ expectedUpdatedAt: z.string().min(1),
848
866
  serviceId: z.string().uuid(),
849
867
  holdsTime: z.boolean(),
850
868
  payment: arrangementPaymentSchema
@@ -878,6 +896,11 @@ z.discriminatedUnion("kind", [
878
896
  kind: z.literal("end"),
879
897
  arrangementId: z.string().uuid(),
880
898
  request: arrangementEndRequestSchema
899
+ }).strict(),
900
+ z.object({
901
+ kind: z.literal("edit"),
902
+ arrangementId: z.string().uuid(),
903
+ request: arrangementEditSchema
881
904
  }).strict()
882
905
  ]);
883
906
  const arrangementTimeOffChoiceSchema = z.discriminatedUnion("kind", [
@@ -1578,6 +1601,20 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
1578
1601
  auth: "user",
1579
1602
  responseKind: "json"
1580
1603
  },
1604
+ listStaffServiceOnlineDetails: {
1605
+ path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
1606
+ method: "GET",
1607
+ auth: "user",
1608
+ responseKind: "json",
1609
+ errors: []
1610
+ },
1611
+ setStaffServiceOnlineDetails: {
1612
+ path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
1613
+ method: "PUT",
1614
+ auth: "user",
1615
+ responseKind: "json",
1616
+ errors: []
1617
+ },
1581
1618
  getServiceResources: {
1582
1619
  path: "/sites/{siteId}/bookings/services/{serviceId}/resources",
1583
1620
  method: "GET",
@@ -1975,6 +2012,18 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
1975
2012
  "server:internal_error"
1976
2013
  ]
1977
2014
  },
2015
+ setEventAttendeesNoShow: {
2016
+ path: "/sites/{siteId}/bookings/attendees/no-show",
2017
+ method: "POST",
2018
+ auth: "user",
2019
+ responseKind: "json",
2020
+ errors: [
2021
+ "validation:invalid_input",
2022
+ "auth:forbidden",
2023
+ "resource:conflict",
2024
+ "server:internal_error"
2025
+ ]
2026
+ },
1978
2027
  listEventOfferingCombinationPrices: {
1979
2028
  path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/combination-prices",
1980
2029
  method: "GET",
@@ -2854,15 +2903,6 @@ const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
2854
2903
  "resource:conflict",
2855
2904
  "server:internal_error"
2856
2905
  ]
2857
- },
2858
- resolveEventSubroute: {
2859
- path: "/public/sites/{siteId}/events/subroutes/resolve",
2860
- method: "GET",
2861
- revalidate: publicReadFreshnessSeconds("resolveEventSubroute"),
2862
- tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
2863
- auth: "public",
2864
- responseKind: "json",
2865
- errors: []
2866
2906
  }
2867
2907
  });
2868
2908
  //#endregion
@@ -6068,6 +6108,14 @@ const API_ENDPOINTS$1 = {
6068
6108
  responseKind: "json",
6069
6109
  errors: []
6070
6110
  },
6111
+ adminDeleteSupportTicketScreenshot: {
6112
+ path: "/admin/support/tickets/screenshot/delete",
6113
+ method: "POST",
6114
+ tags: ["admin", "support"],
6115
+ auth: "admin",
6116
+ responseKind: "json",
6117
+ errors: []
6118
+ },
6071
6119
  mfaTotpEnroll: {
6072
6120
  path: "/auth/mfa/totp/enroll",
6073
6121
  method: "POST",
@@ -7069,6 +7117,7 @@ const API_ENDPOINTS$1 = {
7069
7117
  responseKind: "json"
7070
7118
  },
7071
7119
  resolveRouteOutcome: {
7120
+ revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS,
7072
7121
  path: "/sites/{siteId}/route-outcome",
7073
7122
  method: "GET",
7074
7123
  tags: [
@@ -7996,6 +8045,25 @@ const API_ENDPOINTS$1 = {
7996
8045
  "bookings"
7997
8046
  ]
7998
8047
  },
8048
+ listEventBookingTicketChoices: {
8049
+ errors: [],
8050
+ path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/ticket-choices",
8051
+ method: "GET",
8052
+ auth: "user",
8053
+ responseKind: "json"
8054
+ },
8055
+ changeEventBookingTickets: {
8056
+ errors: [],
8057
+ path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/change-tickets",
8058
+ method: "POST",
8059
+ auth: "user",
8060
+ responseKind: "json",
8061
+ tags: [
8062
+ "site-{siteId}",
8063
+ "event-attendee-{attendeeId}",
8064
+ "bookings"
8065
+ ]
8066
+ },
7999
8067
  restoreEventBooking: {
8000
8068
  errors: [],
8001
8069
  path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/restore",
@@ -9885,6 +9953,27 @@ const API_ENDPOINTS$1 = {
9885
9953
  responseKind: "json",
9886
9954
  errors: []
9887
9955
  },
9956
+ portalEntryPreview: {
9957
+ path: "/portal/auth/entry/preview",
9958
+ method: "POST",
9959
+ auth: "public",
9960
+ responseKind: "json",
9961
+ errors: []
9962
+ },
9963
+ portalEntryRedeem: {
9964
+ path: "/portal/auth/entry/redeem",
9965
+ method: "POST",
9966
+ auth: "public",
9967
+ responseKind: "json",
9968
+ errors: []
9969
+ },
9970
+ portalEntryResend: {
9971
+ path: "/portal/auth/entry/resend",
9972
+ method: "POST",
9973
+ auth: "public",
9974
+ responseKind: "json",
9975
+ errors: []
9976
+ },
9888
9977
  portalLogout: {
9889
9978
  path: "/portal/auth/logout",
9890
9979
  method: "POST",
@@ -10084,20 +10173,20 @@ function isApiError(result) {
10084
10173
  function isApiSuccess(result) {
10085
10174
  return result.success === true;
10086
10175
  }
10087
- function isRecord(value) {
10176
+ function isRecord$1(value) {
10088
10177
  return typeof value === "object" && value !== null && !Array.isArray(value);
10089
10178
  }
10090
10179
  function isFieldError(value) {
10091
- return isRecord(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === void 0 || isCapacityOverrideRefusal(value.capacityOverride));
10180
+ return isRecord$1(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === void 0 || isCapacityOverrideRefusal(value.capacityOverride));
10092
10181
  }
10093
10182
  function fieldErrorsFromUnknown(value) {
10094
10183
  if (!Array.isArray(value)) return null;
10095
10184
  return value.every(isFieldError) ? value : null;
10096
10185
  }
10097
10186
  function extractEnvelopeErrorObject(body) {
10098
- if (!isRecord(body)) return null;
10187
+ if (!isRecord$1(body)) return null;
10099
10188
  const error = body.error;
10100
- if (!isRecord(error)) return null;
10189
+ if (!isRecord$1(error)) return null;
10101
10190
  if ("success" in body && body.success !== false) return null;
10102
10191
  return error;
10103
10192
  }
@@ -10221,6 +10310,163 @@ function resolveApiBaseUrl() {
10221
10310
  return getCmsApiUrl();
10222
10311
  }
10223
10312
  //#endregion
10313
+ //#region ../api/src/pageReadResponseCache.ts
10314
+ var CacheProbeMiss = class extends Error {};
10315
+ /** Next has no response-dependent fetch TTL. Only the matching policy may store a page read. */
10316
+ var UncachedPageRead = class extends Error {
10317
+ constructor(snapshot) {
10318
+ super("Page read belongs to another cache policy");
10319
+ this.snapshot = snapshot;
10320
+ }
10321
+ };
10322
+ function isRecord(value) {
10323
+ return typeof value === "object" && value !== null && !Array.isArray(value);
10324
+ }
10325
+ function isResolvedPage(page) {
10326
+ return page?.kind === "resolved" && typeof page.requestedPath === "string" && (page.dependencies === "content" || page.dependencies === "availability") && isRecord(page.result) && [
10327
+ "cms",
10328
+ "system_event",
10329
+ "system_service"
10330
+ ].includes(String(page.result.kind));
10331
+ }
10332
+ function envelopePage(body) {
10333
+ const data = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10334
+ return data?.type === "content" && isRecord(data.content) ? data.content : data;
10335
+ }
10336
+ function admit(snapshot) {
10337
+ try {
10338
+ const page = envelopePage(JSON.parse(snapshot.body));
10339
+ if (snapshot.status === 200 && isResolvedPage(page)) return {
10340
+ resolved: true,
10341
+ dependencies: page.dependencies
10342
+ };
10343
+ } catch {}
10344
+ return {
10345
+ resolved: false,
10346
+ dependencies: snapshot.status === 200 || snapshot.headers.some(([key, value]) => key === "x-riverbank-page-dependencies" && value === "availability") ? "availability" : "content"
10347
+ };
10348
+ }
10349
+ /** A scoped transport read is shared with Next's background refresh, never across requests. */
10350
+ function liveResponse(read) {
10351
+ const pending = /* @__PURE__ */ new Map();
10352
+ return () => {
10353
+ const existing = pending.get("response");
10354
+ if (existing) return existing;
10355
+ const response = read().then(async (value) => ({
10356
+ body: await value.text(),
10357
+ status: value.status,
10358
+ headers: [...value.headers.entries()],
10359
+ cachedAt: Date.now()
10360
+ }));
10361
+ pending.set("response", response);
10362
+ return response;
10363
+ };
10364
+ }
10365
+ /** Neutral probes do not register a policy; the chosen entry is then checked with its real tags. */
10366
+ async function readPolicy(input, probe = false) {
10367
+ const policy = buildPageReadCachePolicy(input.siteId, input.dependency);
10368
+ const revalidate = Math.min(policy.revalidate, input.maxAge ?? policy.revalidate);
10369
+ const snapshot = await input.cache(async () => {
10370
+ const snapshot = await input.read();
10371
+ const admission = admit(snapshot);
10372
+ if (!admission.resolved || admission.dependencies !== input.dependency) throw new UncachedPageRead(snapshot);
10373
+ return snapshot;
10374
+ }, [
10375
+ "page-read-envelope-v2",
10376
+ input.key,
10377
+ input.dependency
10378
+ ], probe ? {
10379
+ revalidate: false,
10380
+ tags: []
10381
+ } : {
10382
+ ...policy,
10383
+ revalidate
10384
+ })();
10385
+ if (Date.now() - snapshot.cachedAt < revalidate * 1e3) return snapshot;
10386
+ return probe ? null : input.read();
10387
+ }
10388
+ async function probePolicy(input) {
10389
+ return readPolicy({
10390
+ ...input,
10391
+ read: async () => {
10392
+ throw new CacheProbeMiss();
10393
+ }
10394
+ }, true).catch((error) => {
10395
+ if (error instanceof CacheProbeMiss) return null;
10396
+ throw error;
10397
+ });
10398
+ }
10399
+ /** Read in a framework cache scope, but never store an unclassified or failed response. */
10400
+ async function readInCacheScope(cache, key, read) {
10401
+ try {
10402
+ return await cache(async () => {
10403
+ throw new UncachedPageRead(await read());
10404
+ }, ["page-read-live-v2", key], {
10405
+ revalidate: false,
10406
+ tags: []
10407
+ })();
10408
+ } catch (error) {
10409
+ if (error instanceof UncachedPageRead) return error.snapshot;
10410
+ throw error;
10411
+ }
10412
+ }
10413
+ async function selectResponse(input) {
10414
+ const candidate = await probePolicy({
10415
+ ...input,
10416
+ dependency: "content"
10417
+ }) ?? await probePolicy({
10418
+ ...input,
10419
+ dependency: "availability"
10420
+ });
10421
+ if (candidate) try {
10422
+ const checked = await readPolicy({
10423
+ ...input,
10424
+ dependency: admit(candidate).dependencies
10425
+ });
10426
+ if (checked) return checked;
10427
+ } catch (error) {
10428
+ if (error instanceof UncachedPageRead) return storeResponse(input, error.snapshot);
10429
+ throw error;
10430
+ }
10431
+ return storeResponse(input, await readInCacheScope(input.cache, input.key, input.read));
10432
+ }
10433
+ async function storeResponse(input, snapshot) {
10434
+ const admission = admit(snapshot);
10435
+ try {
10436
+ return await readPolicy({
10437
+ ...input,
10438
+ key: admission.resolved ? input.key : `${input.key}:refusal:${snapshot.status}`,
10439
+ dependency: admission.dependencies,
10440
+ read: async () => snapshot
10441
+ }) ?? snapshot;
10442
+ } catch (error) {
10443
+ if (error instanceof UncachedPageRead) return error.snapshot;
10444
+ throw error;
10445
+ }
10446
+ }
10447
+ async function cachePageReadResponse(input) {
10448
+ if (!input.cache) return input.read();
10449
+ const result = await selectResponse({
10450
+ ...input,
10451
+ cache: input.cache,
10452
+ read: liveResponse(input.read)
10453
+ });
10454
+ return new Response(result.body, {
10455
+ status: result.status,
10456
+ headers: result.headers
10457
+ });
10458
+ }
10459
+ /** Result adapters use this for cache fallbacks that did not return through the HTTP transport. */
10460
+ async function observePageReadPolicy(cache, siteId, payload) {
10461
+ if (!cache) return;
10462
+ const dependency = pageReadDependencies(payload);
10463
+ await cache(async () => true, [
10464
+ "page-read-policy-v2",
10465
+ siteId,
10466
+ dependency
10467
+ ], buildPageReadCachePolicy(siteId, dependency))();
10468
+ }
10469
+ //#endregion
10224
10470
  //#region ../api/src/common/operationId.ts
10225
10471
  const OPERATION_ID_HEADER = "X-Riverbank-Operation-Id";
10226
10472
  z.uuid();
@@ -10291,18 +10537,9 @@ z.enum([
10291
10537
  ]);
10292
10538
  //#endregion
10293
10539
  //#region ../api/src/request.ts
10294
- let revalidateTag = null;
10295
- let revalidateTagResolved = false;
10296
- function getRevalidateTag() {
10297
- if (revalidateTagResolved) return revalidateTag;
10298
- revalidateTagResolved = true;
10299
- if (typeof window !== "undefined") return null;
10300
- try {
10301
- revalidateTag = new Function("modulePath", "return require(modulePath)")("next/cache").revalidateTag ?? null;
10302
- } catch {
10303
- revalidateTag = null;
10304
- }
10305
- return revalidateTag;
10540
+ /** Preserve the returned dependency even when the SDK served a durable fallback. */
10541
+ function observePageReadResponse(adapter, siteId, payload) {
10542
+ return observePageReadPolicy(adapter?.cache ?? null, siteId, payload);
10306
10543
  }
10307
10544
  /**
10308
10545
  * Generate a UUID, with fallback for environments where crypto.randomUUID isn't available.
@@ -10388,8 +10625,8 @@ function serializePathParam(endpoint, key, value) {
10388
10625
  if (typeof value === "string") return value;
10389
10626
  throw new Error(`Invalid path param for endpoint ${String(endpoint)}: ${key} must be a string`);
10390
10627
  }
10391
- function invalidateCacheTags(tags, params) {
10392
- const resolved = getRevalidateTag();
10628
+ function invalidateCacheTags(adapter, tags, params) {
10629
+ const resolved = adapter?.invalidateTag;
10393
10630
  if (typeof window !== "undefined" || !resolved || !tags) return;
10394
10631
  tags.forEach((tag) => {
10395
10632
  let processedTag = tag;
@@ -10397,7 +10634,7 @@ function invalidateCacheTags(tags, params) {
10397
10634
  processedTag = processedTag.replace(`{${key}}`, String(value));
10398
10635
  });
10399
10636
  try {
10400
- resolved(processedTag, "max");
10637
+ resolved(processedTag);
10401
10638
  } catch {}
10402
10639
  });
10403
10640
  }
@@ -10490,7 +10727,7 @@ function successJsonEnvelope(parsed, requestId) {
10490
10727
  if (parsed && typeof parsed === "object" && "success" in parsed && typeof parsed.success === "boolean") return parsed;
10491
10728
  return buildSuccessEnvelope(coerceResponse(parsed), requestId);
10492
10729
  }
10493
- function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersion } = {}) {
10730
+ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersion, frameworkCache } = {}) {
10494
10731
  return ({ endpoint, body, params, options = {} }) => {
10495
10732
  const plan = buildApiRequestPlan({
10496
10733
  endpoint,
@@ -10504,14 +10741,31 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
10504
10741
  baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
10505
10742
  sdkVersion
10506
10743
  });
10507
- const fetchPromise = fetch(plan.url, plan.init);
10744
+ const fetchPromise = executeApiRequest(plan, endpoint, params, options, frameworkCache);
10508
10745
  if (plan.cacheInvalidationTags) return fetchPromise.then((response) => {
10509
- if (response.ok) invalidateCacheTags(plan.cacheInvalidationTags, params);
10746
+ if (response.ok) invalidateCacheTags(frameworkCache, plan.cacheInvalidationTags, params);
10510
10747
  return response;
10511
10748
  });
10512
10749
  return fetchPromise;
10513
10750
  };
10514
10751
  }
10752
+ function isPublishedPageRead(endpoint, params, options) {
10753
+ return (endpoint === "getContentByPath" || endpoint === "resolveRouteOutcome") && params?.preview !== true && params?.preview !== "true" && options.cache !== "no-store";
10754
+ }
10755
+ function executeApiRequest(plan, endpoint, params, options, frameworkCache) {
10756
+ const inputParams = params;
10757
+ const { next: fetchPolicy, ...uncachedInit } = plan.init;
10758
+ return isPublishedPageRead(endpoint, inputParams, options) ? cachePageReadResponse({
10759
+ cache: frameworkCache?.cache ?? null,
10760
+ key: JSON.stringify([plan.url, [...new Headers(plan.init.headers).entries()]]),
10761
+ siteId: typeof inputParams?.siteId === "string" ? inputParams.siteId : "",
10762
+ maxAge: typeof fetchPolicy?.revalidate === "number" ? fetchPolicy.revalidate : void 0,
10763
+ read: () => fetch(plan.url, {
10764
+ ...uncachedInit,
10765
+ cache: "no-store"
10766
+ })
10767
+ }) : fetch(plan.url, plan.init);
10768
+ }
10515
10769
  const batchReadPolicyBodySchema = z.object({ requests: z.array(z.object({
10516
10770
  endpoint: z.string(),
10517
10771
  params: z.record(z.string(), z.unknown()).optional()
@@ -10545,10 +10799,12 @@ function batchReadRequestOptions(params, body, options) {
10545
10799
  function publicReadRequestOptions(endpoint, params, body, options) {
10546
10800
  if (endpoint === "batchBlockLoaders") return batchReadRequestOptions(params, body, options);
10547
10801
  const preview = params?.preview === true || params?.preview === "true";
10548
- return endpoint === "getContentByPath" && preview ? {
10802
+ if (endpoint !== "getContentByPath" && endpoint !== "resolveRouteOutcome") return options;
10803
+ if (preview) return {
10549
10804
  ...options,
10550
10805
  cache: "no-store"
10551
- } : options;
10806
+ };
10807
+ return options;
10552
10808
  }
10553
10809
  function assertResolvedEndpointPath(endpoint, url) {
10554
10810
  const tokens = [...url.match(/\{[^}]+\}/g) ?? [], ...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []];
@@ -10648,6 +10904,28 @@ function requireUsableCommitProjection(response, parsed) {
10648
10904
  throw new ApiCommittedWriteNotice(pageCommitConfirmationEnvelopeSchema.parse(parsed).data);
10649
10905
  }
10650
10906
  //#endregion
10907
+ //#region src/rendering/hooks/loadHookSystemPage.ts
10908
+ /** Both client hooks use the admitted destination and require a renderable page. */
10909
+ async function loadHookSystemPage(params) {
10910
+ const content = await loadContentFromContentResponse(params);
10911
+ if (!isPageContent(content)) throw new Error("Expected a selected system page");
10912
+ return {
10913
+ ...content,
10914
+ theme: requireSdkTheme(content.theme, params.siteId)
10915
+ };
10916
+ }
10917
+ function readHookPage(input) {
10918
+ const { client, siteId, path, preview } = input;
10919
+ return Promise.all([client.getSite({
10920
+ id: siteId,
10921
+ currentPath: path
10922
+ }), client.getPage({
10923
+ siteId,
10924
+ path,
10925
+ preview
10926
+ })]);
10927
+ }
10928
+ //#endregion
10651
10929
  //#region src/rendering/hooks/usePage.ts
10652
10930
  /**
10653
10931
  * Client-side React hook to fetch page data.
@@ -10778,15 +11056,30 @@ function usePage(params) {
10778
11056
  let cancelled = false;
10779
11057
  async function fetchPage() {
10780
11058
  try {
10781
- const [site, pageResponse] = await Promise.all([client.getSite({
10782
- id: siteId,
10783
- currentPath: path
10784
- }), client.getPage({
11059
+ const [site, pageRead] = await readHookPage({
11060
+ client,
10785
11061
  siteId,
10786
11062
  path,
10787
11063
  preview
10788
- })]);
11064
+ });
10789
11065
  if (cancelled) return;
11066
+ if (pageRead.result.kind !== "cms") {
11067
+ const content = await loadHookSystemPage({
11068
+ client,
11069
+ siteId,
11070
+ site,
11071
+ contentResponse: pageRead,
11072
+ preview
11073
+ });
11074
+ if (!cancelled) setResult({
11075
+ ...content,
11076
+ loading: false,
11077
+ error: null,
11078
+ theme: content.theme
11079
+ });
11080
+ return;
11081
+ }
11082
+ const pageResponse = pageRead.result.content;
10790
11083
  if ("entry" in pageResponse) throw new Error("This path resolves to a content entry, not a page. Use useContent() instead, which handles both pages and entries. For entries, useContent() returns the raw entry data for custom rendering.");
10791
11084
  if ("pageSurface" in pageResponse) throw new Error("This path resolves to a page surface, not a page. Use useContent() instead, which handles pages, entries, and page surfaces.");
10792
11085
  const success = await loadUsePageSuccess({
@@ -11008,15 +11301,31 @@ function useContent(params) {
11008
11301
  let cancelled = false;
11009
11302
  async function fetchContent() {
11010
11303
  try {
11011
- const [site, contentResponse] = await Promise.all([client.getSite({
11012
- id: siteId,
11013
- currentPath: path
11014
- }), client.getPage({
11304
+ const [site, pageRead] = await readHookPage({
11305
+ client,
11015
11306
  siteId,
11016
11307
  path,
11017
11308
  preview
11018
- })]);
11309
+ });
11019
11310
  if (cancelled) return;
11311
+ if (pageRead.result.kind !== "cms") {
11312
+ const content = await loadHookSystemPage({
11313
+ client,
11314
+ siteId,
11315
+ site,
11316
+ contentResponse: pageRead,
11317
+ preview
11318
+ });
11319
+ if (!cancelled) setResult({
11320
+ ...content,
11321
+ loading: false,
11322
+ error: null,
11323
+ entry: null,
11324
+ theme: content.theme
11325
+ });
11326
+ return;
11327
+ }
11328
+ const contentResponse = pageRead.result.content;
11020
11329
  if (isEntryResponse(contentResponse)) {
11021
11330
  setResult(projectEntrySuccess({
11022
11331
  response: contentResponse,
@@ -11237,191 +11546,7 @@ var SimpleCache = class {
11237
11546
  //#endregion
11238
11547
  //#region src/request-options.ts
11239
11548
  /** Every API client the SDK creates sends its version as `x-sdk-version`. */
11240
- const sdkRequestOptions = { sdkVersion: "0.177.0" };
11241
- //#endregion
11242
- //#region src/client/error.ts
11243
- let _Symbol$for;
11244
- _Symbol$for = Symbol.for("nodejs.util.inspect.custom");
11245
- /**
11246
- * Error thrown by SDK when API returns an error response
11247
- *
11248
- * @example
11249
- * ```ts
11250
- * try {
11251
- * await client.getSite({ slug: 'my-site' });
11252
- * } catch (error) {
11253
- * if (error instanceof RiverbankApiError) {
11254
- * console.log('Error code:', error.code);
11255
- * console.log('Request ID:', error.requestId);
11256
- *
11257
- * if (error.isAuthError()) {
11258
- * // Handle authentication error
11259
- * }
11260
- *
11261
- * if (error.isValidationError() && error.fieldErrors) {
11262
- * // Handle field-level validation errors
11263
- * error.fieldErrors.forEach(fe => {
11264
- * console.log(`${fe.field}: ${fe.message}`);
11265
- * });
11266
- * }
11267
- *
11268
- * // Check if error can be retried
11269
- * if (error.isRetryable) {
11270
- * const delay = error.retryAfterMs ?? 1000;
11271
- * console.log(`Retrying after ${delay}ms...`);
11272
- * }
11273
- * }
11274
- * }
11275
- * ```
11276
- */
11277
- var RiverbankApiError = class RiverbankApiError extends Error {
11278
- constructor(apiError) {
11279
- super(apiError.message);
11280
- this.name = "RiverbankApiError";
11281
- if ("cause" in apiError && apiError.cause) this.cause = apiError.cause;
11282
- this.code = apiError.code;
11283
- this.requestId = apiError.requestId;
11284
- this.status = apiError.status;
11285
- this.fieldErrors = apiError.fieldErrors;
11286
- this.timestamp = apiError.timestamp;
11287
- this.retryAfterMs = "retryAfterMs" in apiError ? apiError.retryAfterMs : void 0;
11288
- this.isRetryable = this.computeRetryable();
11289
- Object.setPrototypeOf(this, RiverbankApiError.prototype);
11290
- }
11291
- /**
11292
- * Compute whether this error is retryable based on HTTP status code.
11293
- * - 0 (network errors - no HTTP response): retryable
11294
- * - 429 (rate limit): retryable
11295
- * - 5xx (server errors): retryable
11296
- * - 4xx (client errors, except 429): NOT retryable
11297
- */
11298
- computeRetryable() {
11299
- if (this.status === 0) return true;
11300
- if (this.status === 429) return true;
11301
- if (this.status >= 500) return true;
11302
- return false;
11303
- }
11304
- /**
11305
- * Check if this is a network error (no HTTP response received)
11306
- *
11307
- * Matches: network:connection_error, network:timeout, network:dns_error
11308
- */
11309
- isNetworkError() {
11310
- return this.code.startsWith("network:");
11311
- }
11312
- /**
11313
- * Check if this error matches a specific error code
11314
- *
11315
- * @example
11316
- * ```ts
11317
- * if (error.is('auth:unauthenticated')) {
11318
- * // Redirect to login
11319
- * }
11320
- * ```
11321
- */
11322
- is(code) {
11323
- return this.code === code;
11324
- }
11325
- /**
11326
- * Check if this is an authentication or authorization error
11327
- *
11328
- * Matches: auth:unauthenticated, auth:token_expired, auth:token_invalid,
11329
- * auth:forbidden, auth:mfa_required, auth:insufficient_permissions
11330
- */
11331
- isAuthError() {
11332
- return this.code.startsWith("auth:");
11333
- }
11334
- /**
11335
- * Check if this is a validation error
11336
- *
11337
- * Matches: validation:invalid_input, validation:missing_field, validation:invalid_format
11338
- */
11339
- isValidationError() {
11340
- return this.code.startsWith("validation:");
11341
- }
11342
- /**
11343
- * Check if this is a resource error (not found, conflict, etc.)
11344
- *
11345
- * Matches: resource:not_found, resource:already_exists, resource:conflict, resource:gone
11346
- */
11347
- isResourceError() {
11348
- return this.code.startsWith("resource:");
11349
- }
11350
- /**
11351
- * Check if this is a rate limiting error
11352
- */
11353
- isRateLimitError() {
11354
- return this.code.startsWith("rate_limit:");
11355
- }
11356
- /**
11357
- * Check if this is a billing/payment error
11358
- */
11359
- isBillingError() {
11360
- return this.code.startsWith("billing:");
11361
- }
11362
- /**
11363
- * Check if this is a server error
11364
- */
11365
- isServerError() {
11366
- return this.code.startsWith("server:");
11367
- }
11368
- /**
11369
- * Returns a human-readable string representation of the error.
11370
- * Includes all key details for debugging.
11371
- *
11372
- * @example
11373
- * "RiverbankApiError: Content keys cannot access preview content | Code: auth:forbidden | Status: 401 | RequestId: req-abc123"
11374
- */
11375
- toString() {
11376
- const parts = [`RiverbankApiError: ${this.message}`];
11377
- if (this.code) parts.push(`Code: ${this.code}`);
11378
- if (this.status) parts.push(`Status: ${this.status}`);
11379
- if (this.requestId) parts.push(`RequestId: ${this.requestId}`);
11380
- return parts.join(" | ");
11381
- }
11382
- /**
11383
- * Custom Node.js inspect output for better console.log display.
11384
- * This ensures that console.log(error) shows all relevant details
11385
- * instead of just "[Object]" for nested properties.
11386
- */
11387
- [_Symbol$for]() {
11388
- return this.toDetailedString();
11389
- }
11390
- /**
11391
- * Returns a detailed multi-line string for debugging.
11392
- * Used by the Node.js inspect symbol for console output.
11393
- */
11394
- toDetailedString() {
11395
- const lines = [
11396
- `RiverbankApiError: ${this.message}`,
11397
- ` Code: ${this.code}`,
11398
- ` Status: ${this.status}`,
11399
- ` RequestId: ${this.requestId}`,
11400
- ` Timestamp: ${this.timestamp}`
11401
- ];
11402
- if (this.isRetryable) {
11403
- lines.push(` Retryable: true`);
11404
- if (this.retryAfterMs) lines.push(` RetryAfter: ${this.retryAfterMs}ms`);
11405
- }
11406
- if (this.fieldErrors && this.fieldErrors.length > 0) {
11407
- lines.push(" FieldErrors:");
11408
- this.fieldErrors.forEach((fe) => {
11409
- lines.push(` - ${fe.field}: ${fe.message}`);
11410
- });
11411
- }
11412
- return lines.join("\n");
11413
- }
11414
- };
11415
- const resilienceStatusSymbol = Symbol.for("riverbankcms.sdk.resilienceStatus");
11416
- function attachResilienceStatusToError(error, resilienceStatus) {
11417
- const target = error !== null && (typeof error === "object" || typeof error === "function") ? error : new Error(typeof error === "string" || typeof error === "number" || typeof error === "boolean" || typeof error === "bigint" ? String(error) : "Unknown error");
11418
- Object.defineProperty(target, resilienceStatusSymbol, {
11419
- configurable: true,
11420
- enumerable: false,
11421
- value: resilienceStatus
11422
- });
11423
- return target;
11424
- }
11549
+ const sdkRequestOptions = { sdkVersion: "0.179.0" };
11425
11550
  //#endregion
11426
11551
  //#region src/public-api/runtime.ts
11427
11552
  const PUBLIC_ENDPOINT_NAMES = [
@@ -11442,7 +11567,6 @@ const PUBLIC_ENDPOINT_NAMES = [
11442
11567
  "listPublicProducts",
11443
11568
  "listPublicPasses",
11444
11569
  "listPublicMemberships",
11445
- "resolveEventSubroute",
11446
11570
  "checkRedirect",
11447
11571
  "getRoutableContent",
11448
11572
  "getPublicRoutableContent",
@@ -11462,6 +11586,7 @@ const API_ENDPOINTS = Object.freeze({
11462
11586
  responseKind: "json"
11463
11587
  },
11464
11588
  resolveRouteOutcome: {
11589
+ revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS,
11465
11590
  path: "/sites/{siteId}/route-outcome",
11466
11591
  method: "GET",
11467
11592
  tags: [
@@ -11583,14 +11708,6 @@ const API_ENDPOINTS = Object.freeze({
11583
11708
  auth: "public",
11584
11709
  responseKind: "json"
11585
11710
  },
11586
- resolveEventSubroute: {
11587
- path: "/public/sites/{siteId}/events/subroutes/resolve",
11588
- method: "GET",
11589
- revalidate: 60,
11590
- tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
11591
- auth: "public",
11592
- responseKind: "json"
11593
- },
11594
11711
  checkRedirect: publicSiteReadDefinition(PUBLIC_READ_ENDPOINT_DEFINITIONS.checkRedirect)
11595
11712
  });
11596
11713
  function publicSiteReadDefinition(definition) {
@@ -11763,10 +11880,6 @@ const RUNTIME_CACHE_DURABILITY_OVERRIDES = {
11763
11880
  kind: "live-only",
11764
11881
  reason: "safety_sensitive_booking"
11765
11882
  },
11766
- resolveEventSubroute: {
11767
- kind: "memory-only",
11768
- reason: "durable_rollout_pending"
11769
- },
11770
11883
  checkRedirect: {
11771
11884
  kind: "memory-only",
11772
11885
  reason: "durable_rollout_pending"
@@ -11793,7 +11906,7 @@ function isTruthyParam(value) {
11793
11906
  }
11794
11907
  function isPreviewRequest(endpoint, params) {
11795
11908
  if (endpoint === "getContentByPath") return isTruthyParam(params.preview);
11796
- if (endpoint === "listPublishedEntries" || endpoint === "resolveEventSubroute") return params.stage === "preview";
11909
+ if (endpoint === "listPublishedEntries") return params.stage === "preview";
11797
11910
  return false;
11798
11911
  }
11799
11912
  function getEndpointFreshTtlSec(endpoint) {
@@ -11968,7 +12081,7 @@ async function readPageWithResilience(input, params) {
11968
12081
  siteId
11969
12082
  });
11970
12083
  const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path}:${preview}`;
11971
- return input.resilientFetch(cacheKey, (requestSignal) => input.apiClient({
12084
+ const result = await input.resilientFetch(cacheKey, (requestSignal) => input.apiClient({
11972
12085
  endpoint: "getContentByPath",
11973
12086
  params: {
11974
12087
  siteId,
@@ -11977,12 +12090,15 @@ async function readPageWithResilience(input, params) {
11977
12090
  },
11978
12091
  options: { signal: requestSignal }
11979
12092
  }), {
12093
+ pageRead: { siteId },
11980
12094
  preview,
11981
12095
  signal,
11982
12096
  publishedRuntimeCache,
11983
12097
  cacheTags: buildSiteReadTags({ siteId }),
11984
12098
  prebuildFallback: void 0
11985
12099
  });
12100
+ if (!preview) await observePageReadResponse(input.frameworkCache, siteId, result.data);
12101
+ return result;
11986
12102
  }
11987
12103
  function createContentReadOperations(input) {
11988
12104
  return {
@@ -12047,50 +12163,19 @@ function createPublicAppointmentReadOperations(deps) {
12047
12163
  //#endregion
12048
12164
  //#region src/client/publicEventReadOperations.ts
12049
12165
  function createPublicEventReadOperations(deps) {
12050
- async function resolveEventSubroute(params, kind) {
12051
- const { siteId, subject, segment, signal, preview = false } = params;
12052
- if (!siteId || !segment) throw new Error(`${kind === "event-run" ? "resolveEventRun" : "resolveEventOccurrence"}() requires siteId, subject, and segment`);
12053
- const subjectId = subject.kind === "eventOffering" ? subject.eventOfferingId : subject.eventSeriesId;
12054
- return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}:${preview ? "preview" : "published"}`, (requestSignal) => deps.apiClient({
12055
- endpoint: "resolveEventSubroute",
12166
+ return { async listPublicEventCalendarWindow({ signal, ...params }) {
12167
+ return deps.resilientFetchData("listPublicEventCalendarWindow", `public-calendar-window:${JSON.stringify(params)}`, (requestSignal) => deps.apiClient({
12168
+ endpoint: "listPublicEventCalendarWindow",
12056
12169
  params: {
12057
- siteId,
12058
- kind,
12059
- subjectKind: subject.kind,
12060
- subjectId,
12061
- segment,
12062
- stage: preview ? "preview" : "published"
12170
+ ...params,
12171
+ limit: params.limit === void 0 ? void 0 : String(params.limit)
12063
12172
  },
12064
12173
  options: { signal: requestSignal }
12065
12174
  }), {
12066
12175
  signal,
12067
- preview,
12068
- cacheTags: buildPublicReadMemoryCacheTags("resolveEventSubroute", { siteId })
12176
+ cacheTags: buildPublicReadMemoryCacheTags("listPublicEventCalendarWindow", { siteId: params.siteId })
12069
12177
  });
12070
- }
12071
- return {
12072
- async listPublicEventCalendarWindow({ signal, ...params }) {
12073
- return deps.resilientFetchData("listPublicEventCalendarWindow", `public-calendar-window:${JSON.stringify(params)}`, (requestSignal) => deps.apiClient({
12074
- endpoint: "listPublicEventCalendarWindow",
12075
- params: {
12076
- ...params,
12077
- limit: params.limit === void 0 ? void 0 : String(params.limit)
12078
- },
12079
- options: { signal: requestSignal }
12080
- }), {
12081
- signal,
12082
- cacheTags: buildPublicReadMemoryCacheTags("listPublicEventCalendarWindow", { siteId: params.siteId })
12083
- });
12084
- },
12085
- async resolveEventOccurrence(params) {
12086
- const response = await resolveEventSubroute(params, "event-occurrence");
12087
- return { occurrence: response.subroute?.kind === "event-occurrence" ? response.subroute.occurrence : null };
12088
- },
12089
- async resolveEventRun(params) {
12090
- const response = await resolveEventSubroute(params, "event-run");
12091
- return { run: response.subroute?.kind === "event-run" ? response.subroute.run : null };
12092
- }
12093
- };
12178
+ } };
12094
12179
  }
12095
12180
  //#endregion
12096
12181
  //#region src/client/combineAbortSignals.ts
@@ -12466,6 +12551,38 @@ function generateRequestId() {
12466
12551
  function toRecord(value) {
12467
12552
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
12468
12553
  }
12554
+ function adapterExceptionMessage(error) {
12555
+ return error instanceof Error ? error.message : String(error);
12556
+ }
12557
+ function publishedCacheLifetime(plan, payload) {
12558
+ if (plan.endpoint !== "getContentByPath" || pageReadDependencies(payload) !== "availability") return {
12559
+ freshTtlSec: plan.freshTtlSec,
12560
+ staleTtlSec: plan.staleTtlSec
12561
+ };
12562
+ const ttl = buildPageReadCachePolicy(plan.siteId ?? "", "availability").revalidate;
12563
+ return {
12564
+ freshTtlSec: ttl,
12565
+ staleTtlSec: ttl
12566
+ };
12567
+ }
12568
+ function reusableDurablePayload(plan, payload, freshness) {
12569
+ return plan.endpoint !== "getContentByPath" || pageReadDependencies(payload) !== "availability" || freshness === "fresh";
12570
+ }
12571
+ function memoryWritePolicy(pageRead, data, tags, cacheTTL) {
12572
+ if (!pageRead) return { tags };
12573
+ const dependency = pageReadDependencies(data);
12574
+ const policy = buildPageReadCachePolicy(pageRead.siteId, dependency);
12575
+ return {
12576
+ tags: policy.tags,
12577
+ ...dependency === "availability" ? {
12578
+ ttl: Math.min(cacheTTL, policy.revalidate * 1e3),
12579
+ staleTtl: 0
12580
+ } : {}
12581
+ };
12582
+ }
12583
+ function isPageReadRefusal(pageRead, error) {
12584
+ return Boolean(pageRead) && error instanceof RiverbankApiError && error.status === 404;
12585
+ }
12469
12586
  function getRuntimePayloadSiteId(value) {
12470
12587
  const site = toRecord(value).site;
12471
12588
  if (!site || typeof site !== "object" || Array.isArray(site)) return null;
@@ -12590,7 +12707,8 @@ function convertToTypedError(error) {
12590
12707
  requestId: error.requestId,
12591
12708
  timestamp: error.timestamp,
12592
12709
  status: error.status,
12593
- fieldErrors: error.fieldErrors
12710
+ fieldErrors: error.fieldErrors,
12711
+ tag: error.tag
12594
12712
  });
12595
12713
  if (error instanceof ApiRequestError && error.body && typeof error.body === "object") {
12596
12714
  const body = error.body;
@@ -12657,8 +12775,8 @@ const defaultRiverbankClientDeps = {
12657
12775
  * ```
12658
12776
  */
12659
12777
  /**
12660
- * A memory hit skips fetch, so Next never sees the read's tags: an ISR render would store old
12661
- * content under a page no webhook can reach. Next's tagged fetch cache already covers these reads.
12778
+ * Next's tagged cache owns normal reads; SDK memory remains an outage fallback by default.
12779
+ * Explicitly enabled admitted-page memory hits also register their returned framework policy.
12662
12780
  */
12663
12781
  function isRunningInNextServer() {
12664
12782
  return typeof window === "undefined" && typeof process !== "undefined" && Boolean(process.env.NEXT_RUNTIME);
@@ -12670,6 +12788,7 @@ function resolveMemoryCachePolicy(config) {
12670
12788
  servesFreshMemoryHits: enabled ?? !isRunningInNextServer()
12671
12789
  };
12672
12790
  }
12791
+ const frameworkCacheInstallers = /* @__PURE__ */ new WeakMap();
12673
12792
  function createRiverbankClient(config) {
12674
12793
  return createRiverbankClientWithDeps(defaultRiverbankClientDeps, config);
12675
12794
  }
@@ -12708,7 +12827,18 @@ function createRiverbankClientWithDeps(deps, config) {
12708
12827
  keyType = "preview";
12709
12828
  break;
12710
12829
  }
12711
- const apiClient = withDefaultHeaders(authConfig.type === "none" ? deps.createInternalAPIClient(config.baseUrl, sdkRequestOptions) : authConfig.type === "api-key" ? deps.createBearerAPIClient(authConfig.key, config.baseUrl, sdkRequestOptions) : deps.createBearerAPIClient(authConfig.token, config.baseUrl, sdkRequestOptions), config.defaultHeaders);
12830
+ function createApiClient(frameworkCache) {
12831
+ const requestOptions = frameworkCache ? {
12832
+ ...sdkRequestOptions,
12833
+ frameworkCache
12834
+ } : sdkRequestOptions;
12835
+ return withDefaultHeaders(authConfig.type === "none" ? deps.createInternalAPIClient(config.baseUrl, requestOptions) : deps.createBearerAPIClient(authConfig.type === "api-key" ? authConfig.key : authConfig.token, config.baseUrl, requestOptions), config.defaultHeaders);
12836
+ }
12837
+ const framework = {
12838
+ adapter: config.frameworkCache,
12839
+ apiClient: createApiClient(config.frameworkCache)
12840
+ };
12841
+ const apiClient = (params) => framework.apiClient(params);
12712
12842
  const cache = new SimpleCache({
12713
12843
  maxSize: cacheMaxSize,
12714
12844
  ttl: cacheTTL,
@@ -12759,7 +12889,7 @@ function createRiverbankClientWithDeps(deps, config) {
12759
12889
  const result = await reader({
12760
12890
  cacheKey: plan.cacheKey,
12761
12891
  endpoint: plan.endpoint,
12762
- payloadSchemaVersion: 4
12892
+ payloadSchemaVersion: 5
12763
12893
  });
12764
12894
  if (result.kind === "miss") return {
12765
12895
  kind: "miss",
@@ -12775,6 +12905,7 @@ function createRiverbankClientWithDeps(deps, config) {
12775
12905
  error: result.error
12776
12906
  }
12777
12907
  };
12908
+ if (!reusableDurablePayload(plan, result.payload, result.freshness)) return null;
12778
12909
  return {
12779
12910
  kind: "hit",
12780
12911
  result: emitStatus(result.freshness === "fresh" ? "cache" : "stale", result.payload, statusDetails({
@@ -12790,7 +12921,7 @@ function createRiverbankClientWithDeps(deps, config) {
12790
12921
  outcome: "error",
12791
12922
  error: {
12792
12923
  kind: "adapter_exception",
12793
- message: error instanceof Error ? error.message : String(error)
12924
+ message: adapterExceptionMessage(error)
12794
12925
  }
12795
12926
  }
12796
12927
  };
@@ -12806,13 +12937,21 @@ function createRiverbankClientWithDeps(deps, config) {
12806
12937
  normalizedParams: plan.normalizedParams,
12807
12938
  payload,
12808
12939
  siteId: plan.siteId ?? getRuntimePayloadSiteId(payload),
12809
- freshTtlSec: plan.freshTtlSec,
12810
- staleTtlSec: plan.staleTtlSec,
12811
- payloadSchemaVersion: 4,
12940
+ ...publishedCacheLifetime(plan, payload),
12941
+ payloadSchemaVersion: 5,
12812
12942
  writeReason: "live_success"
12813
12943
  });
12814
12944
  } catch {}
12815
12945
  }
12946
+ function tryPrebuildFallback(input) {
12947
+ const prebuild = input.allowed && !input.preview && input.fallback ? input.fallback() : null;
12948
+ return prebuild ? emitStatus("prebuild", prebuild.data, input.statusDetails({
12949
+ prebuildAgeSec: prebuild.prebuildAgeSec,
12950
+ cacheTier: "prebuild",
12951
+ durableCache: input.durableCache,
12952
+ error: input.error
12953
+ })) : null;
12954
+ }
12816
12955
  async function resilientFetch(cacheKey, fetcher, options) {
12817
12956
  const requestId = generateRequestId();
12818
12957
  const startTime = Date.now();
@@ -12847,18 +12986,18 @@ function createRiverbankClientWithDeps(deps, config) {
12847
12986
  }) : null;
12848
12987
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
12849
12988
  if (durableFallback?.kind === "hit") return durableFallback.result;
12850
- if (allowFallbacks && !isPreview && options.prebuildFallback) {
12851
- const prebuildResult = options.prebuildFallback();
12852
- if (prebuildResult) return emitStatus("prebuild", prebuildResult.data, statusDetails({
12853
- prebuildAgeSec: prebuildResult.prebuildAgeSec,
12854
- cacheTier: "prebuild",
12855
- durableCache,
12856
- error: {
12857
- code: "circuit_open",
12858
- message: "Circuit breaker is open"
12859
- }
12860
- }));
12861
- }
12989
+ const prebuild = tryPrebuildFallback({
12990
+ allowed: allowFallbacks,
12991
+ preview: isPreview,
12992
+ fallback: options.prebuildFallback,
12993
+ statusDetails,
12994
+ durableCache,
12995
+ error: {
12996
+ code: "circuit_open",
12997
+ message: "Circuit breaker is open"
12998
+ }
12999
+ });
13000
+ if (prebuild) return prebuild;
12862
13001
  const circuitState = circuitBreaker.getState();
12863
13002
  emitStatus("error", null, statusDetails({
12864
13003
  durableCache,
@@ -12890,10 +13029,11 @@ function createRiverbankClientWithDeps(deps, config) {
12890
13029
  } catch (error) {
12891
13030
  convertToTypedError(error);
12892
13031
  }
12893
- if (shouldWrite(cacheEnabled, options.force)) cache.set(cacheKey, data, { tags: options.cacheTags });
13032
+ if (shouldWrite(cacheEnabled, options.force)) cache.set(cacheKey, data, memoryWritePolicy(options.pageRead, data, options.cacheTags, cacheTTL));
12894
13033
  if (allowFallbacks && !isPreview) await writePublishedRuntimeCache(options.publishedRuntimeCache, data);
12895
13034
  return emitStatus("live", data, statusDetails());
12896
13035
  } catch (error) {
13036
+ if (isPageReadRefusal(options.pageRead, error)) throw attachResilienceStatusToError(error, emitStatus("error", null, statusDetails({ error: getRiverbankErrorInfo(error) })).resilience);
12897
13037
  if (resilienceEnabled && error instanceof Error) circuitBreaker.recordFailure(error);
12898
13038
  if (allowFallbacks && !isPreview && staleIfError && cacheEnabled) {
12899
13039
  const stale = cache.getStale(cacheKey);
@@ -12910,15 +13050,15 @@ function createRiverbankClientWithDeps(deps, config) {
12910
13050
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, errorInfo) : null;
12911
13051
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
12912
13052
  if (durableFallback?.kind === "hit") return durableFallback.result;
12913
- if (allowFallbacks && !isPreview && options.prebuildFallback) {
12914
- const prebuildResult = options.prebuildFallback();
12915
- if (prebuildResult) return emitStatus("prebuild", prebuildResult.data, statusDetails({
12916
- prebuildAgeSec: prebuildResult.prebuildAgeSec,
12917
- cacheTier: "prebuild",
12918
- durableCache,
12919
- error: errorInfo
12920
- }));
12921
- }
13053
+ const prebuild = tryPrebuildFallback({
13054
+ allowed: allowFallbacks,
13055
+ preview: isPreview,
13056
+ fallback: options.prebuildFallback,
13057
+ statusDetails,
13058
+ durableCache,
13059
+ error: errorInfo
13060
+ });
13061
+ if (prebuild) return prebuild;
12922
13062
  throw attachResilienceStatusToError(error, emitStatus("error", null, statusDetails({
12923
13063
  error: errorInfo,
12924
13064
  durableCache
@@ -12931,7 +13071,10 @@ function createRiverbankClientWithDeps(deps, config) {
12931
13071
  const contentReads = createContentReadOperations({
12932
13072
  apiClient,
12933
13073
  resilientFetch,
12934
- prebuildLoader
13074
+ prebuildLoader,
13075
+ get frameworkCache() {
13076
+ return framework.adapter;
13077
+ }
12935
13078
  });
12936
13079
  const eventReads = createPublicEventReadOperations({
12937
13080
  apiClient,
@@ -12955,7 +13098,7 @@ function createRiverbankClientWithDeps(deps, config) {
12955
13098
  prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadEntries(siteId, params) : void 0
12956
13099
  }));
12957
13100
  }
12958
- return {
13101
+ const client = {
12959
13102
  async getSite(params) {
12960
13103
  return (await contentReads.getSiteWithResilience(params)).data;
12961
13104
  },
@@ -13322,6 +13465,12 @@ function createRiverbankClientWithDeps(deps, config) {
13322
13465
  return config.baseUrl;
13323
13466
  }
13324
13467
  };
13468
+ frameworkCacheInstallers.set(client, (adapter) => {
13469
+ if (framework.adapter) return;
13470
+ framework.apiClient = createApiClient(adapter);
13471
+ framework.adapter = adapter;
13472
+ });
13473
+ return client;
13325
13474
  }
13326
13475
  //#endregion
13327
13476
  export { Page, createRiverbankClient, isContentError, isContentLoading, isEntryContentResult, isPageContentResult, useContent, usePage };