@riverbankcms/sdk 0.180.0 → 0.181.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 (232) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-DC_AvZwy.d.ts → BlocksIslandsHydrator-CVCasDPz.d.ts} +1 -1
  2. package/dist/_dts/{Page-DQOxVtp3.d.ts → Page-Dtj2Ui3S.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-DrLgY9_f.d.ts → SdkPreviewMode-D1f_60WW.d.ts} +2 -2
  4. package/dist/_dts/{client-BP7VBRvs.d.ts → client-Chr9pNVW.d.ts} +58 -70
  5. package/dist/_dts/{content-types-1-K2qi__.d.ts → content-types-kjccgopX.d.ts} +2 -2
  6. package/dist/_dts/{contracts-Dfqz0Tcu.d.ts → contracts-BodaiS00.d.ts} +3 -3
  7. package/dist/_dts/{generatePageMetadata-CSfAqmry.d.ts → generatePageMetadata-BS6kaJFp.d.ts} +2 -2
  8. package/dist/_dts/{index-BeM5Ylwf.d.ts → index-Brl6_I2j.d.ts} +1 -2
  9. package/dist/_dts/{index-CB5Csefo.d.ts → index-CJkefwYh.d.ts} +2 -2
  10. package/dist/_dts/{index-DQBGwBPx.d.ts → index-D1WpKwQe.d.ts} +1 -1
  11. package/dist/_dts/{index-DQr358-m.d.ts → index-DG0OvBs0.d.ts} +8 -8
  12. package/dist/_dts/{index-Blrw2oVk.d.ts → index-Diqt0PvG.d.ts} +1 -1
  13. package/dist/_dts/{index-DCcxLa8p.d.ts → index-Dy50xUMK.d.ts} +2 -2
  14. package/dist/_dts/{loadContent-BG2tLGXj.d.ts → loadContent-BgxshKrA.d.ts} +7 -7
  15. package/dist/_dts/{request-P08l6mkr.d.ts → request-CA0izds5.d.ts} +2498 -1108
  16. package/dist/_dts/{resolveBlockData-BDHc8lFs.d.ts → resolveBlockData-ChQmwEd3.d.ts} +5 -5
  17. package/dist/_dts/{resolvePageContent-Y3IZBbtL.d.ts → resolvePageContent-BvGyvblj.d.ts} +1 -1
  18. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  19. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client.d.ts +7 -7
  21. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  22. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  23. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  25. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  27. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  28. package/dist/_dts/sdk/src/index.d.ts +104 -8
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/next/index.d.ts +83 -52
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  35. package/dist/_dts/sdk/src/portal/client.d.ts +43 -56
  36. package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  48. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  50. package/dist/_dts/sdk/src/server.d.ts +5 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  53. package/dist/_dts/{serviceBookingOutline-BvtNagjw.d.ts → serviceBookingOutline-BgFbJQhU.d.ts} +6 -6
  54. package/dist/_dts/{types-HAy1-Jjo.d.ts → types-CQrsP1x_.d.ts} +3 -3
  55. package/dist/_dts/{types-DpEAnP4F.d.ts → types-CgS3xLk8.d.ts} +2 -2
  56. package/dist/_dts/{types-BrK6SS5c.d.ts → types-R65DKjPn.d.ts} +7 -7
  57. package/dist/_dts/{validation-D6q3tOBA.d.ts → validation-6LTIbuBA.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DJSmdNUJ.mjs → BlocksIslandsHydrator-DqZPz6oW.mjs} +19 -19
  59. package/dist/client/{BookingMailingListNote-CGxg37zx.mjs → BookingMailingListNote-uWfR2kaG.mjs} +93 -18
  60. package/dist/client/{BookingQuestionFields-DXegGSnS.mjs → BookingQuestionFields-CyNIKw6k.mjs} +7 -87
  61. package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
  62. package/dist/client/{CalendarNavigationChevron-VfP50sYm.mjs → CalendarNavigationChevron-BGCX3zwG.mjs} +6 -6
  63. package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
  64. package/dist/client/{DemoBookingPortalAccess-0Ua44F1j.mjs → DemoBookingPortalAccess-DFLPyuqe.mjs} +9 -6
  65. package/dist/client/{EventCalendar.client-CrpiyDSP.mjs → EventCalendar.client-zDL4-t-B.mjs} +10 -10
  66. package/dist/client/{EventCombined.client-D0me9wnz.mjs → EventCombined.client-uciDKLID.mjs} +60 -10
  67. package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
  68. package/dist/client/{EventItem-CJITrGkF.mjs → EventItem-CwzrjcRw.mjs} +6 -6
  69. package/dist/client/{EventListWeekNavigation-BlEm_xjq.mjs → EventListWeekNavigation-ChvcnPma.mjs} +1 -1
  70. package/dist/client/{EventListing.client-BNM_HuS0.mjs → EventListing.client-DA57Qoyx.mjs} +3 -3
  71. package/dist/client/{EventListing.view-CXfb7RRy.mjs → EventListing.view-DZ0qMFF4.mjs} +6 -6
  72. package/dist/client/{EventRegistrationPayment-DiD9uYs6.mjs → EventRegistrationPayment-DSqCJL8E.mjs} +700 -514
  73. package/dist/client/{Page-bX7iy_MK.mjs → Page-C7mygH_f.mjs} +389 -248
  74. package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
  75. package/dist/client/{SiteTermsAgreementField-BAdW5DvE.mjs → SiteTermsAgreementField-B4z-e4Wq.mjs} +7 -11
  76. package/dist/client/{StepIndicator-DCfdcb7s.mjs → StepIndicator-Dn_DY4oY.mjs} +1 -1
  77. package/dist/client/{StepIndicator-DCqorVne.mjs → StepIndicator-atfDU82W.mjs} +21 -13
  78. package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
  79. package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-n6kS6Hct.mjs} +77 -1
  80. package/dist/client/{accordion-wofJY8xY.mjs → accordion-CsW8U3ff.mjs} +1 -1
  81. package/dist/client/{booking-form.client-CYl9NrqS.mjs → booking-form.client-cBWM392H.mjs} +52 -29
  82. package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
  83. package/dist/client/{bookingForm-kgVWtuMe.mjs → bookingForm-DgySpp6C.mjs} +4 -4
  84. package/dist/client/bookings.mjs +17 -11
  85. package/dist/client/{boxStyleClassNames-CQHWz5gJ.mjs → boxStyleClassNames-BpGVdLFD.mjs} +2 -2
  86. package/dist/client/{carousel-BE1dEFsD.mjs → carousel-DJoleFV3.mjs} +2 -2
  87. package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
  88. package/dist/client/{cart-BsjsdGZE.mjs → cart-EO5o6uPH.mjs} +3 -3
  89. package/dist/client/{cart.client-DylGUWXY.mjs → cart.client-D_gPw45z.mjs} +1 -1
  90. package/dist/client/{checkout-B5KxEUDr.mjs → checkout-NVfZW0kR.mjs} +3 -3
  91. package/dist/client/{checkout.client-C98fhch3.mjs → checkout.client-DD3JuqOy.mjs} +1 -1
  92. package/dist/client/{checkoutUrls-BMLYTf38.mjs → checkoutUrls-z2gXvlGw.mjs} +1 -1
  93. package/dist/client/client.mjs +87 -43
  94. package/dist/client/{constants-PfYJsEZF.mjs → constants-CoOkvw__.mjs} +1 -2
  95. package/dist/client/{context-DtKdUdkO.mjs → context-CRhn9qzS.mjs} +732 -370
  96. package/dist/client/{dateFormatting-BaGPvQS3.mjs → dateFormatting-BnWB4L1s.mjs} +15 -25
  97. package/dist/client/{demoPortalMagicLink-B8eDjhuG.mjs → demoPortalMagicLink-CWDGSTBu.mjs} +2 -3
  98. package/dist/client/{enhanceHeaderSection-DvhD-8eE.mjs → enhanceHeaderSection-tdP_-Z9o.mjs} +4 -5
  99. package/dist/client/{event-registration.client-Du9a_xAN.mjs → event-registration.client-D7YYKySQ.mjs} +191 -210
  100. package/dist/client/{eventCalendar-Di9wDfzl.mjs → eventCalendar-CsAfu5d0.mjs} +4 -4
  101. package/dist/client/{eventCombined-CNW6nBsB.mjs → eventCombined-VXJB5CoS.mjs} +4 -4
  102. package/dist/client/{eventListing-CQMxQ8By.mjs → eventListing-B3KIZNfY.mjs} +4 -4
  103. package/dist/client/{eventRegistration-CprS9k1D.mjs → eventRegistration-BP-dEk1c.mjs} +4 -4
  104. package/dist/client/{form-Zl1_8RJ6.mjs → form-DM8Zbxbv.mjs} +3 -3
  105. package/dist/client/{form.client-TaMUys6I.mjs → form.client-e2z_Tlgk.mjs} +5 -5
  106. package/dist/client/{form.parts-CpNPbPPM.mjs → form.parts-Ctljy1a3.mjs} +3 -3
  107. package/dist/client/gifting/client.mjs +32 -29
  108. package/dist/client/{gifting-DNVa7-Wj.mjs → gifting-DWIsqQru.mjs} +4 -4
  109. package/dist/client/{gifting.client-CFUq3GVx.mjs → gifting.client-QsSWF0uA.mjs} +5 -5
  110. package/dist/client/{gifting.parts-CDQvxA4A.mjs → gifting.parts-CedLgwa_.mjs} +2 -2
  111. package/dist/client/{headerSection-Cg6083rn.mjs → headerSection-DAkRkwb-.mjs} +2 -2
  112. package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
  113. package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
  114. package/dist/client/{newsletter-form.client-VuL9I96G.mjs → newsletter-form.client-WYja9-WN.mjs} +7 -7
  115. package/dist/client/{newsletter-form.interactive-7Of3eYn0.mjs → newsletter-form.interactive-RuM86VAv.mjs} +23 -24
  116. package/dist/client/{newsletter-form.parts-OBqsfT24.mjs → newsletter-form.parts-2petDnWv.mjs} +2 -2
  117. package/dist/client/{newsletterForm-BkJe_RTv.mjs → newsletterForm-BUbXdA_e.mjs} +3 -3
  118. package/dist/client/{lookSurfaces-gJ3OqPf9.mjs → noop-Dl4mZ-rr.mjs} +167 -49
  119. package/dist/client/portal/client.mjs +13040 -8190
  120. package/dist/client/portalOrders-COGn4BKG.mjs +596 -0
  121. package/dist/client/portalRoutes-D72yvtDh.mjs +862 -0
  122. package/dist/client/{product-detail.client-B2hdxqJN.mjs → product-detail.client-pOAryevt.mjs} +1 -1
  123. package/dist/client/{product-list.client-CCEgu9rx.mjs → product-list.client-CcUpUiud.mjs} +1 -1
  124. package/dist/client/{productDetail-CRX_ZRfS.mjs → productDetail-BZJCfqat.mjs} +3 -3
  125. package/dist/client/{productList-BAdJ6z5S.mjs → productList-CiRs3mNb.mjs} +3 -3
  126. package/dist/client/{propsDecoder-BLKAmX0S.mjs → propsDecoder--uHW4tFM.mjs} +2 -2
  127. package/dist/client/{registry.server-Bj9cmHHF.mjs → registry.server-CDNNd8wC.mjs} +247 -203
  128. package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
  129. package/dist/client/rendering/client.mjs +26 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +16 -8
  132. package/dist/client/{richText-coerce-Z45OLLEX.mjs → richText-coerce-CQGE_wHV.mjs} +2 -1
  133. package/dist/client/{routeIslandApiConfig-DHpTTK77.mjs → routeIslandApiConfig-BtCg87-N.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-DL_ARBpa.mjs} +1 -1
  135. package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-Ds9cmBUf.mjs} +1 -1
  136. package/dist/client/{shop-BKsgxm_-.mjs → shop-Rx_gEMK8.mjs} +3 -3
  137. package/dist/client/{shop-commerce-Cbtk_kUW.mjs → shop-commerce-D8evQnMT.mjs} +53 -16
  138. package/dist/client/{shop-commerce-store-B-rv2p5h.mjs → shop-commerce-store-C9PcsSTj.mjs} +22 -5
  139. package/dist/client/{shop-discount-apply.state-CiCDLNh7.mjs → shop-discount-apply.state-D5CtGfJI.mjs} +2 -2
  140. package/dist/client/{shop.client-Rnqa74Tk.mjs → shop.client-D4lzQ9oY.mjs} +17 -39
  141. package/dist/client/{shopShared-BaBfhjCq.mjs → shopShared-BVbq7Nm-.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/src-Al4ooTl_.mjs +164 -0
  144. package/dist/client/{src-o7WEvbK1.mjs → src-ZSqRK3dD.mjs} +228 -90
  145. package/dist/client/{timetableModel-BOff1Kk5.mjs → timetableModel-BQJrSK0K.mjs} +9 -78
  146. package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
  147. package/dist/client/{useAvailableSlots-DQJNh10g.mjs → useAvailableSlots-Dm3lKJKR.mjs} +2 -3
  148. package/dist/client/{useDiscountCodeUi-BcFQRI_7.mjs → useDiscountCodeUi-klgfGn7f.mjs} +1 -1
  149. package/dist/client/{useEventPagination-BvdcexDC.mjs → useEventPagination-Jnjt7_ly.mjs} +8 -8
  150. package/dist/client/{view-CTBwSpKv.mjs → view-CC_yQLSA.mjs} +4 -4
  151. package/dist/client/{wizardSteps-CWIQyRIw.mjs → wizardSteps-BliJOzEX.mjs} +953 -279
  152. package/dist/preview-next/client/{PageSectionToolbar-CG6KwITA.mjs → PageSectionToolbar-BhL0uADo.mjs} +3 -3
  153. package/dist/preview-next/client/{PreviewEditorSidebar-BGBqrC9m.mjs → PreviewEditorSidebar-Ct8eIm0i.mjs} +5 -5
  154. package/dist/preview-next/client/{PreviewEditorUI-Bwkyx28x.mjs → PreviewEditorUI-BS32G4V9.mjs} +4 -4
  155. package/dist/preview-next/client/{PreviewShell-DB1l6JNU.mjs → PreviewShell-RL0WfZXD.mjs} +5 -5
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Bs6Cwzr3.mjs → SdkPreviewModeRuntime-MK_gHeGy.mjs} +29 -5
  157. package/dist/preview-next/client/{previewAssistantSlot-T-oDD_Dd.mjs → previewAssistantSlot-CQyS8pcq.mjs} +5011 -2074
  158. package/dist/preview-next/client/{previewChromeRoot-BeukcDRy.mjs → previewChromeRoot-BSxp3Mfu.mjs} +1 -1
  159. package/dist/preview-next/client/runtime.mjs +3 -3
  160. package/dist/preview-next/client/{sdk-runtime-ceDW_9q2.mjs → sdk-runtime-DKnTzy74.mjs} +2 -2
  161. package/dist/preview-next/client/{siteStyleAccess-CCB9bScO.mjs → siteStyleAccess-BlmbvbLN.mjs} +3 -3
  162. package/dist/preview-next/client/{useAutosaveStatus-D4o0CKq7.mjs → useAutosaveStatus-D-7GwZOQ.mjs} +1 -1
  163. package/dist/preview-next/client/{useOpenBlockForSetup-Seccrvwu.mjs → useOpenBlockForSetup-BNZtGM5g.mjs} +1 -1
  164. package/dist/preview-next/container-responsive.css +203 -174
  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-FwFj8zGL.mjs → route-contract-R3PcMmax.mjs} +71 -37
  168. package/dist/server/{Block.shared-D6WrRCxX.mjs → Block.shared-CniF9tSu.mjs} +5 -5
  169. package/dist/server/{ThemeScopeCore-BQzjDQ2q.mjs → ThemeScopeCore-BQWsnGT6.mjs} +126 -120
  170. package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-WPzUAHp4.mjs} +33 -2
  171. package/dist/server/accordions-By_0Ykks.mjs +111 -0
  172. package/dist/server/{bindings-CS6ih1Yc.mjs → bindings-DxojjtK3.mjs} +7 -7
  173. package/dist/server/{client-m0ylCj_f.mjs → client-CDndhbYO.mjs} +86 -42
  174. package/dist/server/config-validation.mjs +1 -1
  175. package/dist/server/config.mjs +2 -2
  176. package/dist/server/constants-VyF5nEhL.mjs +1474 -0
  177. package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
  178. package/dist/server/data/resolveBlockData.mjs +1 -1
  179. package/dist/server/index.mjs +3 -3
  180. package/dist/server/{loadContent-vgWMz1uD.mjs → loadContent-BKstMBmX.mjs} +5 -4
  181. package/dist/server/{loadPage-CIOL3-9t.mjs → loadPage-IgNnZaqr.mjs} +3 -3
  182. package/dist/server/{lookMediaFrame-m-91jGGn.mjs → lookMediaFrame-TFjgNG61.mjs} +38 -18
  183. package/dist/server/manifest.mjs +36 -25
  184. package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
  185. package/dist/server/media-BRmYrnzb.mjs +31 -0
  186. package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
  187. package/dist/server/{navigation-BcNfYYuu.mjs → navigation-quBYlSKD.mjs} +2 -2
  188. package/dist/server/navigation.mjs +1 -1
  189. package/dist/server/next.mjs +134 -81
  190. package/dist/server/{overrideResolution-BiHmsvTZ.mjs → overrideResolution-CCaAPpIa.mjs} +1 -1
  191. package/dist/server/page-converter.mjs +3 -3
  192. package/dist/server/{pageRenderPlan-DJo_obpi.mjs → pageRenderPlan-B7iULvKe.mjs} +8 -7
  193. package/dist/server/{pageRuntimeSupport-BnSuoHON.mjs → pageRuntimeSupport-BytMroxn.mjs} +5 -5
  194. package/dist/server/{pageShared-BJuOzxzn.mjs → pageShared-Dcs_XTIO.mjs} +243 -323
  195. package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-Bihl4W5K.mjs} +3 -2
  196. package/dist/server/{portal-B4JVkdjc.mjs → portal-CMW_b9mG.mjs} +62 -46
  197. package/dist/server/portal.mjs +3 -3
  198. package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
  199. package/dist/server/{prebuild-Cr8p8T7V.mjs → prebuild-agaH-vZV.mjs} +1 -1
  200. package/dist/server/prebuild.mjs +1 -1
  201. package/dist/server/{prefetchBlockData-BZh57-ua.mjs → prefetchBlockData-DwpRjqw4.mjs} +4 -3
  202. package/dist/server/{registry-CvhFwbXJ.mjs → registry-DM9dHfDC.mjs} +345 -449
  203. package/dist/server/rendering/components/pageShared.mjs +1 -1
  204. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  205. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  206. package/dist/server/rendering/server.mjs +4 -4
  207. package/dist/server/rendering.mjs +10 -9
  208. package/dist/server/{resolveBlockData-Cv_W1LVB.mjs → resolveBlockData-CinHGf8l.mjs} +2 -2
  209. package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → resolveButtonColourStates-B0O1IM16.mjs} +2 -1028
  210. package/dist/server/{responseMedia-KRKguBC5.mjs → responseMedia-IfH65QAH.mjs} +1 -1
  211. package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
  212. package/dist/server/server.mjs +3 -3
  213. package/dist/server/{servicePageContent-CRKbTm_7.mjs → servicePageContent-BBBhOtdE.mjs} +21 -20
  214. package/dist/server/theme-bridge.mjs +3 -2
  215. package/dist/server/theme.mjs +2 -2
  216. package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
  217. package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
  218. package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
  219. package/dist/server/types-BKaBZFjD.mjs +1085 -0
  220. package/dist/server/{validation-DCl-FCk_.mjs → validation-DG5jX3jH.mjs} +70 -17
  221. package/dist/server/{version-DT_R5JAR.mjs → version-CipbxPHL.mjs} +1 -1
  222. package/dist/server/video-Cdr3wh-q.mjs +272 -0
  223. package/dist/styles/index.css +1013 -1840
  224. package/package.json +2 -1
  225. package/dist/_dts/index-B0_2-65A.d.ts +0 -101
  226. package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
  227. package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
  228. package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
  229. package/dist/client/formatDate-hhI1-tzt.mjs +0 -26
  230. package/dist/server/constants-Cj7hfbrA.mjs +0 -41
  231. package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
  232. package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
@@ -1,6 +1,8 @@
1
1
  "use client";
2
- import { Sn as parsePositiveCents, b as publicPassProductCollectionSchema, bt as normalizeCurrencyCode, c as blockSiteTermsSchema, g as calendarWindowPageSchema, j as beforeBookingQuestionsPresentationSchema, wn as toNonNegativeCents } from "./src-o7WEvbK1.mjs";
2
+ import { m as ok, p as err } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
3
+ import { Dn as parsePositiveCents, Tt as normalizeCurrencyCode, _t as unknownKind, c as blockSiteTermsSchema, ft as bookingQuestionsDocumentAnswerValueSchema, gt as exactSchema, ht as evolvingSchema, k as beforeBookingQuestionsPresentationSchema, kn as toNonNegativeCents, m as calendarWindowPageSchema, pt as bookingQuestionsTaskDetailSchema, v as publicPassProductCollectionSchema } from "./src-ZSqRK3dD.mjs";
3
4
  import { t as stableJsonStringify } from "./stable-json-D0XAEIXc.mjs";
5
+ import { C as customerProfileSchema, E as eventTicketBreakdownLineSchema, S as portalCreditSchema, T as eventGuestSchema, b as customerPassSchema, d as verifiedSiteTermsAcceptanceSchema, n as customerOrderSchema, s as cancelledMoneySchema, v as customerMembershipSchema, w as enabledModulesSchema } from "./portalOrders-COGn4BKG.mjs";
4
6
  import { t as BEFORE_BOOKING_QUESTIONS_ROUTE } from "./bookingQuestions-BHq83mzS.mjs";
5
7
  import { t as EVENT_BOOKING_RESPONSE_QUERY } from "./events-9LPvwbWp.mjs";
6
8
  import { n as submissionProof } from "./protection-C0PoH1lT.mjs";
@@ -44,7 +46,7 @@ const uncoveredReason = z.enum([
44
46
  "already_used_on_date",
45
47
  "no_credits_left"
46
48
  ]);
47
- const cents = z.number().int().nonnegative();
49
+ const cents$1 = z.number().int().nonnegative();
48
50
  const credits = z.object({
49
51
  used: z.number().int().nonnegative(),
50
52
  leftAfter: z.number().int().nonnegative()
@@ -67,7 +69,7 @@ const entitlementSchema = z.discriminatedUnion("kind", [
67
69
  kind: z.literal("buyPass"),
68
70
  productId: id,
69
71
  name: z.string(),
70
- priceCents: cents,
72
+ priceCents: cents$1,
71
73
  credits: credits.extend({ total: z.number().int().positive() }),
72
74
  expiresAt: z.string().nullable()
73
75
  }),
@@ -75,15 +77,15 @@ const entitlementSchema = z.discriminatedUnion("kind", [
75
77
  kind: z.literal("buyMembership"),
76
78
  productId: id,
77
79
  name: z.string(),
78
- priceCents: cents,
80
+ priceCents: cents$1,
79
81
  interval: z.enum(["month", "year"])
80
82
  })
81
83
  ]);
82
84
  const moneySchema = z.object({
83
- totalCents: cents,
85
+ totalCents: cents$1,
84
86
  currency: z.string().min(1)
85
87
  });
86
- const optionSchema = z.discriminatedUnion("kind", [z.object({
88
+ const optionSchema$1 = z.discriminatedUnion("kind", [z.object({
87
89
  kind: z.literal("money"),
88
90
  moneyDates: ids,
89
91
  money: moneySchema
@@ -100,7 +102,7 @@ const optionSchema = z.discriminatedUnion("kind", [z.object({
100
102
  })]);
101
103
  const eventSelectionFundingSchema = z.object({
102
104
  /** Money first, then passes and memberships in the order to show them. */
103
- options: z.tuple([optionSchema]).rest(optionSchema).readonly(),
105
+ options: z.tuple([optionSchema$1]).rest(optionSchema$1).readonly(),
104
106
  /** The option to select: the first pass or membership, or money; after a refusal, the nearest to the customer's pick. */
105
107
  selected: eventSelectionFundingPickSchema,
106
108
  /** `severalPlaces` when passes and memberships are left out because more than one place is booked. */
@@ -484,126 +486,371 @@ function identityMatchesSubject(identity, subject) {
484
486
  return identity.scope === subject.scope && identity.submissionId === subject.submissionId && (identity.scope !== "occurrence" || subject.scope !== "occurrence" || identity.attendeeId === subject.attendeeId);
485
487
  }
486
488
  //#endregion
487
- //#region ../blocks/src/system/runtime/api/schemas/waitlist-claims.ts
488
- const attendanceMode = z.enum(["in_person", "online"]);
489
- const ticketSelection = z.object({
490
- pricingOptionId: z.string().uuid().nullable(),
491
- quantity: z.number().int().positive()
492
- });
493
- const subject = z.discriminatedUnion("kind", [z.object({
494
- kind: z.literal("event_occurrence"),
495
- occurrenceId: z.string().uuid(),
496
- attendanceMode
497
- }), z.object({
498
- kind: z.literal("whole_series"),
499
- eventSeriesId: z.string().uuid(),
500
- attendanceMode,
501
- ticketSelections: z.array(ticketSelection).nonempty().readonly(),
502
- seatCount: z.number().int().positive(),
503
- selectedSlidingAmount: z.number().int().nonnegative().nullable()
504
- }).refine((value) => value.seatCount === value.ticketSelections.reduce((total, line) => total + line.quantity, 0), { message: "Seat count must match the reserved selection" })]);
505
- const identity = {
506
- email: z.string().email(),
507
- name: z.string(),
508
- phone: z.string().nullable()
489
+ //#region ../site-contracts/src/siteData/portalDigitalProducts.ts
490
+ const jsonValueSchema = z.lazy(() => z.union([
491
+ z.string(),
492
+ z.number(),
493
+ z.boolean(),
494
+ z.null(),
495
+ z.array(jsonValueSchema),
496
+ z.record(z.string(), z.optional(jsonValueSchema))
497
+ ]));
498
+ const digitalProductBase = {
499
+ entitlementId: z.string(),
500
+ productId: z.string(),
501
+ productTitle: z.string(),
502
+ productDescription: z.nullable(jsonValueSchema),
503
+ accessState: z.enum(["active", "revoked"]),
504
+ revokedReason: z.string().nullable(),
505
+ lastEmailSentAt: z.string().nullable()
509
506
  };
510
- /** Decode once before invitation restoration or admission consumes the response. */
511
- const waitlistClaimResponseSchema = z.object({
512
- subject,
513
- expiresAt: z.string().datetime({ offset: true }),
514
- customer: z.object(identity),
515
- prefill: z.object({
516
- ...identity,
517
- notes: z.string().nullable(),
518
- guests: z.array(z.object({
519
- name: z.string(),
520
- email: z.string().nullable().optional(),
521
- phone: z.string().nullable()
522
- })).readonly()
507
+ const digitalProductFileSchema = exactSchema()(z.object({
508
+ assetId: z.string(),
509
+ label: z.string(),
510
+ filename: z.string(),
511
+ bytes: z.number().nullable(),
512
+ downloadPath: z.string()
513
+ }));
514
+ const portalDigitalProductSchema = exactSchema()(z.discriminatedUnion("fulfillmentMode", [
515
+ z.object({
516
+ ...digitalProductBase,
517
+ fulfillmentMode: z.literal("email")
518
+ }),
519
+ z.object({
520
+ ...digitalProductBase,
521
+ fulfillmentMode: z.literal("guarded_url"),
522
+ accessPath: z.string()
523
+ }),
524
+ z.object({
525
+ ...digitalProductBase,
526
+ fulfillmentMode: z.literal("file_download"),
527
+ accessPath: z.string(),
528
+ files: z.array(digitalProductFileSchema)
523
529
  })
524
- });
530
+ ]));
525
531
  //#endregion
526
- //#region ../blocks/src/system/runtime/api/deduplication.ts
527
- /**
528
- * Create a request deduplication cache.
529
- *
530
- * Concurrent identical GET requests share a single network request.
531
- * Results are cached briefly to handle rapid re-renders.
532
- *
533
- * @example
534
- * ```ts
535
- * const dedup = createDeduplicationCache({ ttl: 100 });
536
- *
537
- * // These will share one network request
538
- * const [result1, result2] = await Promise.all([
539
- * dedup.dedupe('/api/events', () => fetch('/api/events')),
540
- * dedup.dedupe('/api/events', () => fetch('/api/events')),
541
- * ]);
542
- * ```
543
- */
544
- function createDeduplicationCache(options = {}) {
545
- const { ttl = 100 } = options;
546
- const cache = /* @__PURE__ */ new Map();
547
- /**
548
- * Generate a cache key from method, URL, and params
549
- */
550
- function getCacheKey(method, url, params) {
551
- return `${method}:${url}:${params ? JSON.stringify(params) : ""}`;
552
- }
553
- /**
554
- * Deduplicate a request.
555
- *
556
- * For GET requests, if an identical request is already in-flight or
557
- * recently completed, returns the existing promise instead of making
558
- * a new request.
559
- *
560
- * - In-flight requests are always shared (regardless of TTL)
561
- * - Settled requests are shared if within TTL of settlement time
562
- *
563
- * @param key - Unique cache key for this request
564
- * @param fetcher - Function that performs the actual fetch
565
- * @returns Promise with the response
566
- */
567
- async function dedupe(key, fetcher) {
568
- const now = Date.now();
569
- const existing = cache.get(key);
570
- if (existing) {
571
- if (!existing.settled) return existing.promise;
572
- if (existing.settledTime && now - existing.settledTime < ttl) return existing.promise;
573
- }
574
- const entry = {
575
- promise: fetcher().finally(() => {
576
- entry.settled = true;
577
- entry.settledTime = Date.now();
578
- setTimeout(() => {
579
- if (cache.get(key)?.promise === entry.promise) cache.delete(key);
580
- }, ttl);
581
- }),
582
- startTime: now,
583
- settled: false
584
- };
585
- cache.set(key, entry);
586
- return entry.promise;
587
- }
588
- /**
589
- * Clear all cached requests
590
- */
591
- function clear() {
592
- cache.clear();
593
- }
594
- /**
595
- * Get the number of cached entries (for testing)
596
- */
597
- function size() {
598
- return cache.size;
599
- }
532
+ //#region ../site-contracts/src/siteData/portalOccurrenceBookings.ts
533
+ const portalOccurrenceBookingSchema = exactSchema()(z.object({
534
+ id: z.string(),
535
+ occurrenceId: z.string(),
536
+ ticketsCount: z.number().int().nonnegative(),
537
+ ticketBreakdown: z.string().nullable()
538
+ }));
539
+ const portalOccurrenceBookingsResponseSchema = exactSchema()(z.object({ bookings: z.array(portalOccurrenceBookingSchema).readonly() }));
540
+ //#endregion
541
+ //#region ../site-contracts/src/siteData/portalActions.ts
542
+ const portalMeResponseSchema = exactSchema()(z.object({
543
+ siteTermsAcceptance: verifiedSiteTermsAcceptanceSchema.nullable(),
544
+ profile: customerProfileSchema,
545
+ modules: enabledModulesSchema
546
+ }));
547
+ /** What asking for a sign-in link answers: sent by email, or (on a demo site) the link itself. */
548
+ const magicLinkResponseSchema = exactSchema()(z.union([z.object({ demoSignInUrl: z.string() }), z.object({ message: z.string() })]));
549
+ const portalMeUpdateResponseSchema = exactSchema()(z.object({
550
+ profile: customerProfileSchema,
551
+ modules: enabledModulesSchema
552
+ }));
553
+ exactSchema()(z.object({ credit: portalCreditSchema.nullable() }));
554
+ exactSchema()(z.object({ passes: z.array(customerPassSchema) }));
555
+ exactSchema()(z.object({ memberships: z.array(customerMembershipSchema) }));
556
+ exactSchema()(z.object({ orders: z.array(customerOrderSchema) }));
557
+ const portalOrderCheckoutResponseSchema = exactSchema()(z.object({
558
+ checkoutUrl: z.string(),
559
+ sessionId: z.string()
560
+ }));
561
+ const portalEventGuestsResponseSchema = exactSchema()(z.object({ guests: z.array(eventGuestSchema) }));
562
+ const portalEventTicketSchema = exactSchema()(z.object({
563
+ ticketUrl: z.string(),
564
+ qrImageUrl: z.string(),
565
+ fallbackCode: z.string(),
566
+ registration: z.object({
567
+ id: z.string(),
568
+ eventTitle: z.string(),
569
+ seriesName: z.string().nullable(),
570
+ startsAt: z.string(),
571
+ endsAt: z.string(),
572
+ timeZone: z.string(),
573
+ isOnline: z.boolean(),
574
+ venueName: z.string().nullable(),
575
+ venueAddress: z.string().nullable(),
576
+ ticketsCount: z.number(),
577
+ ticketLines: z.array(eventTicketBreakdownLineSchema),
578
+ ticketBreakdown: z.string().nullable()
579
+ })
580
+ }));
581
+ const portalEventTicketResponseSchema = exactSchema()(z.object({ ticket: portalEventTicketSchema }));
582
+ const portalDigitalProductsResponseSchema = exactSchema()(z.object({
583
+ tabLabel: z.string(),
584
+ products: z.array(portalDigitalProductSchema)
585
+ }));
586
+ const portalDigitalProductAccessResponseSchema = exactSchema()(z.object({
587
+ product: portalDigitalProductSchema,
588
+ guardedHref: z.string().nullable()
589
+ }));
590
+ const portalDigitalProductDownloadUrlResponseSchema = exactSchema()(z.object({
591
+ signedUrl: z.string(),
592
+ filename: z.string()
593
+ }));
594
+ const portalBookingQuestionsTaskResponseSchema = evolvingSchema()(z.object({ task: bookingQuestionsTaskDetailSchema }));
595
+ const portalBookingQuestionsUploadUrlResponseSchema = exactSchema()(z.object({
596
+ uploadId: z.string(),
597
+ signedUrl: z.string()
598
+ }));
599
+ const portalBookingQuestionsFinalizeUploadResponseSchema = exactSchema()(z.object({ answer: bookingQuestionsDocumentAnswerValueSchema }));
600
+ const portalRefundInfoSchema = exactSchema()(z.object({
601
+ status: z.enum([
602
+ "succeeded",
603
+ "failed",
604
+ "skipped"
605
+ ]),
606
+ amountCents: z.number().nullable(),
607
+ currency: z.string().nullable(),
608
+ paymentLast4: z.string().nullable(),
609
+ stripeRefundId: z.string().nullable(),
610
+ errorMessage: z.string().optional(),
611
+ errorCode: z.string().optional()
612
+ }));
613
+ const portalCancelledMoneySchema = evolvingSchema()(z.union([cancelledMoneySchema, unknownKind([
614
+ "refunded",
615
+ "credit_restored",
616
+ "refund_failed",
617
+ "none"
618
+ ]).transform(() => ({ kind: "unsupported" }))]));
619
+ const cancelResultFields = {
620
+ cancelled: z.boolean(),
621
+ refunded: z.boolean(),
622
+ refund: portalRefundInfoSchema.optional(),
623
+ requiresCancelWithoutRefundConfirmation: z.boolean().optional(),
624
+ followUp: z.string().nullable(),
625
+ message: z.string()
626
+ };
627
+ /** The fields of every kind's cancel answer that the new portal reads, money decoded with its fallback. */
628
+ const cancelAnswerSchema = z.object({
629
+ cancelled: z.boolean(),
630
+ requiresCancelWithoutRefundConfirmation: z.boolean().optional(),
631
+ money: portalCancelledMoneySchema,
632
+ followUp: z.string().nullable(),
633
+ message: z.string()
634
+ });
635
+ exactSchema()(z.object({
636
+ ...cancelResultFields,
637
+ money: cancelledMoneySchema
638
+ }));
639
+ exactSchema()(z.object({
640
+ ...cancelResultFields,
641
+ money: cancelledMoneySchema
642
+ }));
643
+ exactSchema()(z.object({
644
+ ...cancelResultFields,
645
+ money: cancelledMoneySchema
646
+ }));
647
+ function portalCancelOutcome(answer) {
648
+ if (answer.requiresCancelWithoutRefundConfirmation) return {
649
+ kind: "needs_confirmation",
650
+ message: answer.message
651
+ };
652
+ if (!answer.cancelled) return {
653
+ kind: "not_cancelled",
654
+ message: answer.message
655
+ };
600
656
  return {
601
- getCacheKey,
602
- dedupe,
603
- clear,
604
- size
657
+ kind: "cancelled",
658
+ money: answer.money,
659
+ followUp: answer.followUp,
660
+ message: answer.message
605
661
  };
606
662
  }
663
+ /** Any kind's cancel answer, read as a `PortalCancelOutcome`. */
664
+ const portalCancelOutcomeSchema = z.object({ result: cancelAnswerSchema }).transform(({ result }) => portalCancelOutcome(result));
665
+ const portalRescheduleAppointmentResponseSchema = exactSchema()(z.object({ appointment: z.object({
666
+ id: z.string(),
667
+ status: z.string(),
668
+ startAt: z.string(),
669
+ endAt: z.string(),
670
+ resourceId: z.string()
671
+ }) }));
672
+ const portalTransferEventRegistrationResultSchema = exactSchema()(z.object({
673
+ transferred: z.boolean(),
674
+ message: z.string(),
675
+ transferId: z.string().optional()
676
+ }));
677
+ const portalCancelMembershipAtPeriodEndResultSchema = exactSchema()(z.object({
678
+ cancelled: z.boolean(),
679
+ message: z.string(),
680
+ outcome: z.discriminatedUnion("kind", [
681
+ z.object({ kind: z.literal("changed") }),
682
+ z.object({
683
+ kind: z.literal("unchanged"),
684
+ reason: z.enum([
685
+ "already_so",
686
+ "already_ended",
687
+ "does_not_renew",
688
+ "cannot_change_online"
689
+ ])
690
+ }),
691
+ z.object({ kind: z.literal("settling") })
692
+ ])
693
+ }));
694
+ exactSchema()(z.object({ outcome: z.enum([
695
+ "cancelled",
696
+ "alreadyClosed",
697
+ "notFound"
698
+ ]) }));
699
+ const attendanceModeSchema = z.enum(["in_person", "online"]);
700
+ const rescheduleBookingSchema = exactSchema()(z.object({
701
+ customerId: z.string(),
702
+ ticketLines: z.array(z.object({
703
+ ticketLineId: z.string(),
704
+ pricingOptionId: z.string().nullable(),
705
+ quantity: z.number(),
706
+ unitPriceCents: z.number(),
707
+ currency: z.string()
708
+ })).readonly()
709
+ }));
710
+ const rescheduleNoticeSchema = exactSchema()(z.discriminatedUnion("kind", [z.object({
711
+ kind: z.literal("attendance_mode_changed"),
712
+ from: attendanceModeSchema,
713
+ to: attendanceModeSchema
714
+ }), z.object({
715
+ kind: z.literal("venue_changed"),
716
+ from: z.string().nullable(),
717
+ to: z.string().nullable()
718
+ })]));
719
+ const rescheduleAssessmentSchema = exactSchema()(z.discriminatedUnion("kind", [
720
+ z.object({
721
+ kind: z.literal("selectable"),
722
+ notices: z.array(rescheduleNoticeSchema).readonly()
723
+ }),
724
+ z.object({
725
+ kind: z.literal("needs_ticket_choice"),
726
+ ticketLineIds: z.array(z.string()).readonly()
727
+ }),
728
+ z.object({
729
+ kind: z.literal("needs_capacity_override"),
730
+ booked: z.number(),
731
+ capacity: z.number()
732
+ }),
733
+ z.object({
734
+ kind: z.literal("blocked"),
735
+ reason: z.enum([
736
+ "full",
737
+ "not_enough_room",
738
+ "ticket_not_usable",
739
+ "tickets_collide",
740
+ "pass_not_accepted",
741
+ "already_booked",
742
+ "not_bookable"
743
+ ])
744
+ })
745
+ ]));
746
+ const rescheduleDateSchema = exactSchema()(z.object({
747
+ occurrenceId: z.string(),
748
+ title: z.string(),
749
+ startsAt: z.string(),
750
+ endsAt: z.string(),
751
+ timeZone: z.string(),
752
+ venueId: z.string().nullable(),
753
+ venueName: z.string().nullable(),
754
+ attendanceMode: attendanceModeSchema,
755
+ assessment: rescheduleAssessmentSchema,
756
+ capacity: z.discriminatedUnion("kind", [z.object({ kind: z.literal("unbounded") }), z.object({
757
+ kind: z.literal("bounded"),
758
+ booked: z.number(),
759
+ capacity: z.number(),
760
+ availableSeats: z.number()
761
+ })])
762
+ }));
763
+ const portalEventRescheduleDatesSchema = exactSchema()(z.object({
764
+ source: z.discriminatedUnion("kind", [
765
+ z.object({
766
+ kind: z.literal("available"),
767
+ until: z.string().nullable()
768
+ }),
769
+ z.object({
770
+ kind: z.literal("closed"),
771
+ closedAt: z.string()
772
+ }),
773
+ z.object({
774
+ kind: z.literal("not_offered"),
775
+ reason: z.enum([
776
+ "switched_off",
777
+ "course_booking",
778
+ "checked_in",
779
+ "cancelled",
780
+ "waitlisted",
781
+ "past",
782
+ "date_missing",
783
+ "payment_pending",
784
+ "not_owner",
785
+ "has_room"
786
+ ])
787
+ })
788
+ ]),
789
+ booking: rescheduleBookingSchema.nullable(),
790
+ dates: z.array(rescheduleDateSchema).readonly(),
791
+ nextPage: z.object({
792
+ afterStartsAt: z.string(),
793
+ afterId: z.string()
794
+ }).nullable()
795
+ }));
796
+ const portalEventRescheduleResultSchema = exactSchema()(z.union([z.object({
797
+ moved: z.literal(true),
798
+ moveId: z.string(),
799
+ effects: z.enum(["settled", "pending"])
800
+ }), z.object({
801
+ moved: z.literal(false),
802
+ reason: z.enum([
803
+ "not_found",
804
+ "source_changed",
805
+ "source_unavailable",
806
+ "target_full",
807
+ "target_not_bookable",
808
+ "target_changed",
809
+ "already_booked_on_target",
810
+ "ticket_not_usable",
811
+ "has_room"
812
+ ]),
813
+ message: z.string()
814
+ })]));
815
+ //#endregion
816
+ //#region ../site-contracts/src/siteData/eventSelectionPayment.ts
817
+ const cents = z.number().int().nonnegative();
818
+ const collectionSchema = z.object({
819
+ kind: z.enum([
820
+ "upfront",
821
+ "deferred_manual",
822
+ "instalment_plan",
823
+ "flexible_balance"
824
+ ]),
825
+ amountCents: cents,
826
+ currency: z.string().min(1),
827
+ bookings: z.array(z.object({
828
+ itemId: z.string().min(1),
829
+ amountCents: cents
830
+ }).readonly()).readonly().optional()
831
+ }).readonly();
832
+ const optionSchema = z.object({
833
+ funding: eventSelectionFundingPickSchema,
834
+ collect: z.discriminatedUnion("kind", [z.object({ kind: z.literal("nothing") }), z.object({
835
+ kind: z.literal("money"),
836
+ collections: z.tuple([collectionSchema]).rest(collectionSchema).readonly()
837
+ })])
838
+ });
839
+ const eventSelectionPaymentSchema = z.discriminatedUnion("kind", [
840
+ z.object({
841
+ kind: z.literal("bookable"),
842
+ options: z.tuple([optionSchema]).rest(optionSchema).readonly()
843
+ }),
844
+ z.object({ kind: z.literal("bookSeparately") }),
845
+ z.object({
846
+ kind: z.literal("cannotBookOnline"),
847
+ organiserContact: z.object({
848
+ email: z.string().nullable(),
849
+ phone: z.string().nullable()
850
+ }).nullable()
851
+ }),
852
+ z.object({ kind: z.literal("noPaymentOption") })
853
+ ]);
607
854
  //#endregion
608
855
  //#region ../blocks/src/system/runtime/api/endpoints.ts
609
856
  /**
@@ -865,18 +1112,24 @@ const PORTAL = {
865
1112
  authScope: "portal",
866
1113
  skipPreviewStage: true
867
1114
  },
868
- getCredit: {
869
- path: "/portal/credit",
1115
+ getOccurrenceBookings: {
1116
+ path: "/portal/occurrences/{occurrenceId}/bookings",
870
1117
  method: "GET",
871
1118
  authScope: "portal",
872
1119
  skipPreviewStage: true
873
1120
  },
874
- getOrders: {
875
- path: "/portal/orders",
1121
+ getDetails: {
1122
+ path: "/portal/details",
876
1123
  method: "GET",
877
1124
  authScope: "portal",
878
1125
  skipPreviewStage: true
879
1126
  },
1127
+ updateNewsletter: {
1128
+ path: "/portal/details/newsletter",
1129
+ method: "PATCH",
1130
+ authScope: "portal",
1131
+ skipPreviewStage: true
1132
+ },
880
1133
  createOrderCheckout: {
881
1134
  path: "/portal/orders/{orderId}/checkout",
882
1135
  method: "POST",
@@ -913,50 +1166,68 @@ const PORTAL = {
913
1166
  authScope: "portal",
914
1167
  skipPreviewStage: true
915
1168
  },
916
- getPasses: {
917
- path: "/portal/passes",
1169
+ getEventTicket: {
1170
+ path: "/portal/events/{registrationId}/ticket",
918
1171
  method: "GET",
919
1172
  authScope: "portal",
920
1173
  skipPreviewStage: true
921
1174
  },
922
- getMemberships: {
923
- path: "/portal/memberships",
1175
+ getEventBookingQuestions: {
1176
+ path: "/portal/events/{registrationId}/booking-questions",
924
1177
  method: "GET",
925
1178
  authScope: "portal",
926
1179
  skipPreviewStage: true
927
1180
  },
928
- getEvents: {
929
- path: "/portal/events",
1181
+ updateEventBookingQuestions: {
1182
+ path: "/portal/events/{registrationId}/booking-questions",
1183
+ method: "PUT",
1184
+ authScope: "portal",
1185
+ skipPreviewStage: true
1186
+ },
1187
+ getRegularSessions: {
1188
+ path: "/portal/appointments/regular-sessions",
930
1189
  method: "GET",
931
1190
  authScope: "portal",
932
1191
  skipPreviewStage: true
933
1192
  },
934
- getEventTicket: {
935
- path: "/portal/events/{registrationId}/ticket",
1193
+ getBookings: {
1194
+ path: "/portal/bookings",
936
1195
  method: "GET",
937
1196
  authScope: "portal",
938
1197
  skipPreviewStage: true
939
1198
  },
940
- getEventBookingQuestions: {
941
- path: "/portal/events/{registrationId}/booking-questions",
1199
+ getHome: {
1200
+ path: "/portal/home",
942
1201
  method: "GET",
943
1202
  authScope: "portal",
944
1203
  skipPreviewStage: true
945
1204
  },
946
- updateEventBookingQuestions: {
947
- path: "/portal/events/{registrationId}/booking-questions",
948
- method: "PUT",
1205
+ getHoldings: {
1206
+ path: "/portal/holdings",
1207
+ method: "GET",
949
1208
  authScope: "portal",
950
1209
  skipPreviewStage: true
951
1210
  },
952
- getAppointments: {
953
- path: "/portal/appointments",
1211
+ getPayments: {
1212
+ path: "/portal/payments",
954
1213
  method: "GET",
955
1214
  authScope: "portal",
956
1215
  skipPreviewStage: true
957
1216
  },
958
- getRegularSessions: {
959
- path: "/portal/appointments/regular-sessions",
1217
+ getReceipt: {
1218
+ path: "/portal/payments/receipts/{receiptId}",
1219
+ method: "GET",
1220
+ authScope: "portal",
1221
+ skipPreviewStage: true
1222
+ },
1223
+ getOrder: {
1224
+ path: "/portal/orders/{orderId}",
1225
+ method: "GET",
1226
+ authScope: "portal",
1227
+ skipPreviewStage: true
1228
+ },
1229
+ getBooking: {
1230
+ path: "/portal/bookings/{kind}/{bookingId}",
960
1231
  method: "GET",
961
1232
  authScope: "portal",
962
1233
  skipPreviewStage: true
@@ -973,12 +1244,6 @@ const PORTAL = {
973
1244
  authScope: "portal",
974
1245
  skipPreviewStage: true
975
1246
  },
976
- getWholeSeriesRegistrations: {
977
- path: "/portal/dated-offerings/whole-series",
978
- method: "GET",
979
- authScope: "portal",
980
- skipPreviewStage: true
981
- },
982
1247
  getWholeSeriesBookingQuestions: {
983
1248
  path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions",
984
1249
  method: "GET",
@@ -1015,12 +1280,6 @@ const PORTAL = {
1015
1280
  authScope: "portal",
1016
1281
  skipPreviewStage: true
1017
1282
  },
1018
- getEventGuests: {
1019
- path: "/portal/events/{registrationId}/guests",
1020
- method: "GET",
1021
- authScope: "portal",
1022
- skipPreviewStage: true
1023
- },
1024
1283
  updateEventGuests: {
1025
1284
  path: "/portal/events/{registrationId}/guests",
1026
1285
  method: "PUT",
@@ -1077,6 +1336,290 @@ const SITES = { runtime: {
1077
1336
  authScope: "default"
1078
1337
  } };
1079
1338
  //#endregion
1339
+ //#region ../blocks/src/portal/api/portalApiError.ts
1340
+ function isUncertainPortalFailure(error) {
1341
+ switch (error.kind) {
1342
+ case "network":
1343
+ case "unreadable":
1344
+ case "unavailable": return true;
1345
+ case "signed_out":
1346
+ case "not_found":
1347
+ case "conflict":
1348
+ case "rejected": return false;
1349
+ }
1350
+ }
1351
+ const fieldErrorSchema = z.object({
1352
+ field: z.string(),
1353
+ code: z.string(),
1354
+ message: z.string()
1355
+ });
1356
+ /** The error envelope as the dashboard sends it, read loosely: any part may be missing. */
1357
+ const errorEnvelopeSchema = z.object({
1358
+ message: z.string().optional(),
1359
+ code: z.string().optional(),
1360
+ error: z.object({
1361
+ message: z.string().optional(),
1362
+ code: z.string().optional(),
1363
+ fieldErrors: z.array(fieldErrorSchema).optional()
1364
+ }).optional()
1365
+ });
1366
+ /** What a failed HTTP answer means for the portal, from its status and whatever body came with it. */
1367
+ function portalApiErrorFor(status, body, retryAfter = null) {
1368
+ const { message, code, fieldErrors } = readErrorEnvelope(status, body);
1369
+ if (status === 401) return { kind: "signed_out" };
1370
+ if (status === 404) return {
1371
+ kind: "not_found",
1372
+ message
1373
+ };
1374
+ if (status === 409) return {
1375
+ kind: "conflict",
1376
+ code,
1377
+ message
1378
+ };
1379
+ if (status >= 500 || status < 400) return {
1380
+ kind: "unavailable",
1381
+ status,
1382
+ message
1383
+ };
1384
+ return {
1385
+ kind: "rejected",
1386
+ status,
1387
+ code,
1388
+ message,
1389
+ fieldErrors,
1390
+ retryAfterSeconds: retryAfterSeconds(retryAfter)
1391
+ };
1392
+ }
1393
+ /** Retry-After in whole seconds; the HTTP-date form isn't sent by our server, so it reads as unknown. */
1394
+ function retryAfterSeconds(header) {
1395
+ if (header === null || !/^\d+$/.test(header.trim())) return null;
1396
+ return Number(header.trim());
1397
+ }
1398
+ function readErrorEnvelope(status, body) {
1399
+ const parsed = errorEnvelopeSchema.safeParse(body);
1400
+ const envelope = parsed.success ? parsed.data : {};
1401
+ return {
1402
+ message: envelope.error?.message ?? envelope.message ?? fallbackMessage(status),
1403
+ code: envelope.error?.code ?? envelope.code ?? null,
1404
+ fieldErrors: envelope.error?.fieldErrors ?? []
1405
+ };
1406
+ }
1407
+ function fallbackMessage(status) {
1408
+ return status >= 500 ? "Something went wrong on our side. Please try again in a moment." : "We couldn’t do that just now. Please try again.";
1409
+ }
1410
+ //#endregion
1411
+ //#region ../blocks/src/portal/api/portalTransport.ts
1412
+ function createPortalTransport(config) {
1413
+ const fetchImpl = config.fetch ?? globalThis.fetch;
1414
+ return async (endpoint, schema, options = {}) => {
1415
+ const sent = await send(fetchImpl, portalRequest(config, endpoint, options));
1416
+ if (!sent.ok) return sent;
1417
+ const body = await readJson(sent.value);
1418
+ if (!sent.value.ok) return err(portalApiErrorFor(sent.value.status, body.kind === "json" ? body.value : null, sent.value.headers.get("Retry-After")));
1419
+ if (body.kind === "unreadable") return err({
1420
+ kind: "unreadable",
1421
+ endpoint: endpoint.path,
1422
+ issues: [body.reason]
1423
+ });
1424
+ return decodePortalResponse(endpoint.path, schema, body.value);
1425
+ };
1426
+ }
1427
+ function portalRequest(config, endpoint, options) {
1428
+ const path = options.params ? buildPath(endpoint.path, options.params) : endpoint.path;
1429
+ const hasBody = options.body !== void 0;
1430
+ return {
1431
+ url: `${config.baseUrl}${options.query ? appendQuery(path, options.query) : path}`,
1432
+ init: {
1433
+ method: endpoint.method,
1434
+ headers: {
1435
+ Accept: "application/json",
1436
+ ...config.sessionToken ? { Authorization: `Bearer ${config.sessionToken}` } : {},
1437
+ ...hasBody ? { "Content-Type": "application/json" } : {}
1438
+ },
1439
+ body: hasBody ? JSON.stringify(options.body) : void 0
1440
+ }
1441
+ };
1442
+ }
1443
+ async function send(fetchImpl, request) {
1444
+ try {
1445
+ return ok(await fetchImpl(request.url, request.init));
1446
+ } catch (cause) {
1447
+ return err({
1448
+ kind: "network",
1449
+ message: cause instanceof Error ? cause.message : "The request failed."
1450
+ });
1451
+ }
1452
+ }
1453
+ async function readJson(response) {
1454
+ const text = await response.text().catch(() => null);
1455
+ if (text === null) return {
1456
+ kind: "unreadable",
1457
+ reason: "body could not be read"
1458
+ };
1459
+ if (text.trim() === "") return {
1460
+ kind: "unreadable",
1461
+ reason: "empty body"
1462
+ };
1463
+ try {
1464
+ return {
1465
+ kind: "json",
1466
+ value: JSON.parse(text)
1467
+ };
1468
+ } catch {
1469
+ return {
1470
+ kind: "unreadable",
1471
+ reason: "body is not JSON"
1472
+ };
1473
+ }
1474
+ }
1475
+ const successEnvelopeSchema = z.object({
1476
+ success: z.literal(true),
1477
+ data: z.unknown()
1478
+ });
1479
+ /** Unwraps the success envelope and decodes its data against the contract, once. */
1480
+ function decodePortalResponse(endpoint, schema, json) {
1481
+ const envelope = successEnvelopeSchema.safeParse(json);
1482
+ const decoded = schema.safeParse(envelope.success ? envelope.data.data : json);
1483
+ if (decoded.success) return ok(decoded.data);
1484
+ return err({
1485
+ kind: "unreadable",
1486
+ endpoint,
1487
+ issues: decoded.error.issues.slice(0, 5).map((issue) => `${issue.path.join(".") || "(root)"}: ${issue.message}`)
1488
+ });
1489
+ }
1490
+ /** Narrows a decoded envelope to one of its fields. */
1491
+ const field = (key) => (result) => result.ok ? ok(result.value[key]) : result;
1492
+ //#endregion
1493
+ //#region ../blocks/src/portal/api/portalVisitor.ts
1494
+ function createPortalVisitorApi(config) {
1495
+ const call = createPortalTransport(config);
1496
+ return {
1497
+ profile: () => call(PORTAL.getProfile, portalMeResponseSchema),
1498
+ occurrenceBookings: (occurrenceId) => call(PORTAL.getOccurrenceBookings, portalOccurrenceBookingsResponseSchema, { params: { occurrenceId } }).then(field("bookings"))
1499
+ };
1500
+ }
1501
+ //#endregion
1502
+ //#region ../blocks/src/system/runtime/api/schemas/waitlist-claims.ts
1503
+ const attendanceMode = z.enum(["in_person", "online"]);
1504
+ const ticketSelection = z.object({
1505
+ pricingOptionId: z.string().uuid().nullable(),
1506
+ quantity: z.number().int().positive()
1507
+ });
1508
+ const subject = z.discriminatedUnion("kind", [z.object({
1509
+ kind: z.literal("event_occurrence"),
1510
+ occurrenceId: z.string().uuid(),
1511
+ attendanceMode
1512
+ }), z.object({
1513
+ kind: z.literal("whole_series"),
1514
+ eventSeriesId: z.string().uuid(),
1515
+ attendanceMode,
1516
+ ticketSelections: z.array(ticketSelection).nonempty().readonly(),
1517
+ seatCount: z.number().int().positive(),
1518
+ selectedSlidingAmount: z.number().int().nonnegative().nullable()
1519
+ }).refine((value) => value.seatCount === value.ticketSelections.reduce((total, line) => total + line.quantity, 0), { message: "Seat count must match the reserved selection" })]);
1520
+ const identity = {
1521
+ email: z.string().email(),
1522
+ name: z.string(),
1523
+ phone: z.string().nullable()
1524
+ };
1525
+ /** Decode once before invitation restoration or admission consumes the response. */
1526
+ const waitlistClaimResponseSchema = z.object({
1527
+ subject,
1528
+ expiresAt: z.string().datetime({ offset: true }),
1529
+ customer: z.object(identity),
1530
+ prefill: z.object({
1531
+ ...identity,
1532
+ notes: z.string().nullable(),
1533
+ guests: z.array(z.object({
1534
+ name: z.string(),
1535
+ email: z.string().nullable().optional(),
1536
+ phone: z.string().nullable()
1537
+ })).readonly()
1538
+ })
1539
+ });
1540
+ //#endregion
1541
+ //#region ../blocks/src/system/runtime/api/deduplication.ts
1542
+ /**
1543
+ * Create a request deduplication cache.
1544
+ *
1545
+ * Concurrent identical GET requests share a single network request.
1546
+ * Results are cached briefly to handle rapid re-renders.
1547
+ *
1548
+ * @example
1549
+ * ```ts
1550
+ * const dedup = createDeduplicationCache({ ttl: 100 });
1551
+ *
1552
+ * // These will share one network request
1553
+ * const [result1, result2] = await Promise.all([
1554
+ * dedup.dedupe('/api/events', () => fetch('/api/events')),
1555
+ * dedup.dedupe('/api/events', () => fetch('/api/events')),
1556
+ * ]);
1557
+ * ```
1558
+ */
1559
+ function createDeduplicationCache(options = {}) {
1560
+ const { ttl = 100 } = options;
1561
+ const cache = /* @__PURE__ */ new Map();
1562
+ /**
1563
+ * Generate a cache key from method, URL, and params
1564
+ */
1565
+ function getCacheKey(method, url, params) {
1566
+ return `${method}:${url}:${params ? JSON.stringify(params) : ""}`;
1567
+ }
1568
+ /**
1569
+ * Deduplicate a request.
1570
+ *
1571
+ * For GET requests, if an identical request is already in-flight or
1572
+ * recently completed, returns the existing promise instead of making
1573
+ * a new request.
1574
+ *
1575
+ * - In-flight requests are always shared (regardless of TTL)
1576
+ * - Settled requests are shared if within TTL of settlement time
1577
+ *
1578
+ * @param key - Unique cache key for this request
1579
+ * @param fetcher - Function that performs the actual fetch
1580
+ * @returns Promise with the response
1581
+ */
1582
+ async function dedupe(key, fetcher) {
1583
+ const now = Date.now();
1584
+ const existing = cache.get(key);
1585
+ if (existing) {
1586
+ if (!existing.settled) return existing.promise;
1587
+ if (existing.settledTime && now - existing.settledTime < ttl) return existing.promise;
1588
+ }
1589
+ const entry = {
1590
+ promise: fetcher().finally(() => {
1591
+ entry.settled = true;
1592
+ entry.settledTime = Date.now();
1593
+ setTimeout(() => {
1594
+ if (cache.get(key)?.promise === entry.promise) cache.delete(key);
1595
+ }, ttl);
1596
+ }),
1597
+ startTime: now,
1598
+ settled: false
1599
+ };
1600
+ cache.set(key, entry);
1601
+ return entry.promise;
1602
+ }
1603
+ /**
1604
+ * Clear all cached requests
1605
+ */
1606
+ function clear() {
1607
+ cache.clear();
1608
+ }
1609
+ /**
1610
+ * Get the number of cached entries (for testing)
1611
+ */
1612
+ function size() {
1613
+ return cache.size;
1614
+ }
1615
+ return {
1616
+ getCacheKey,
1617
+ dedupe,
1618
+ clear,
1619
+ size
1620
+ };
1621
+ }
1622
+ //#endregion
1080
1623
  //#region ../blocks/src/system/runtime/api/client.ts
1081
1624
  /**
1082
1625
  * Block API Client
@@ -1269,6 +1812,16 @@ function isApiSuccessResponse(json) {
1269
1812
  function publicEventsQuery(params) {
1270
1813
  return { ...params ?? {} };
1271
1814
  }
1815
+ /** A portal session is a bearer token, given for portal endpoints or as the client's own auth. */
1816
+ function portalVisitorFor(config) {
1817
+ const auth = config.authOverrides?.portal ?? config.auth;
1818
+ if (auth.type !== "bearer") return null;
1819
+ return createPortalVisitorApi({
1820
+ baseUrl: config.baseUrl,
1821
+ siteId: config.siteId ?? "",
1822
+ sessionToken: auth.token
1823
+ });
1824
+ }
1272
1825
  function createBlockApi(config) {
1273
1826
  const { baseUrl, authOverrides, siteId, isPreview, readAuthority } = config;
1274
1827
  const auth = readAuthority ? readAuthority.kind === "preview" ? {
@@ -1336,6 +1889,7 @@ function createBlockApi(config) {
1336
1889
  }
1337
1890
  return {
1338
1891
  config,
1892
+ portalVisitor: portalVisitorFor(config),
1339
1893
  async submitForm(data) {
1340
1894
  return request(FORMS.submit, { body: protectedFormBody(data) });
1341
1895
  },
@@ -1496,7 +2050,7 @@ function createBlockApi(config) {
1496
2050
  path,
1497
2051
  body: data
1498
2052
  });
1499
- if (!isSingleRegistrationOptions(response)) throw new Error("Registration options came back for dates instead of one booking.");
2053
+ if (!isSingleRegistrationOptions(response)) throw new Error("Registration options came back for a selection instead of one booking.");
1500
2054
  return response;
1501
2055
  },
1502
2056
  async getSelectionFunding(data) {
@@ -1508,6 +2062,15 @@ function createBlockApi(config) {
1508
2062
  decoder: selectionFundingResponseSchema
1509
2063
  });
1510
2064
  },
2065
+ async getRunsSelectionPayment(data) {
2066
+ const sid = requireSiteId();
2067
+ const path = buildPath(EVENTS.registrationOptions.path, { siteId: sid });
2068
+ return request(EVENTS.registrationOptions, {
2069
+ path,
2070
+ body: data,
2071
+ decoder: runsSelectionPaymentResponseSchema
2072
+ });
2073
+ },
1511
2074
  async checkRegistrationNextStep(data) {
1512
2075
  const path = buildPath(EVENTS.registrationNextStep.path, { siteId: requireSiteId() });
1513
2076
  return request(EVENTS.registrationNextStep, {
@@ -1645,218 +2208,6 @@ function createBlockApi(config) {
1645
2208
  decoder: schema
1646
2209
  })).siteTerms ?? { kind: "none" };
1647
2210
  },
1648
- async getPortalProfile() {
1649
- return request(PORTAL.getProfile, { skipDedup: true });
1650
- },
1651
- async getPortalCredit() {
1652
- return (await request(PORTAL.getCredit)).credit;
1653
- },
1654
- async getPortalOrders() {
1655
- return (await request(PORTAL.getOrders)).orders;
1656
- },
1657
- async createPortalOrderCheckout(orderId, data) {
1658
- const path = buildPath(PORTAL.createOrderCheckout.path, { orderId });
1659
- return request(PORTAL.createOrderCheckout, {
1660
- path,
1661
- body: data
1662
- });
1663
- },
1664
- async getPortalDigitalProducts() {
1665
- return request(PORTAL.getDigitalProducts);
1666
- },
1667
- async getPortalDigitalProduct(entitlementId) {
1668
- const path = buildPath(PORTAL.getDigitalProduct.path, { entitlementId });
1669
- return request(PORTAL.getDigitalProduct, { path });
1670
- },
1671
- async resendPortalDigitalProduct(entitlementId) {
1672
- const path = buildPath(PORTAL.resendDigitalProduct.path, { entitlementId });
1673
- await request(PORTAL.resendDigitalProduct, { path });
1674
- },
1675
- async getPortalDigitalProductDownloadUrl(entitlementId, assetId) {
1676
- const path = buildPath(PORTAL.getDigitalProductDownloadUrl.path, {
1677
- entitlementId,
1678
- assetId
1679
- });
1680
- return request(PORTAL.getDigitalProductDownloadUrl, { path });
1681
- },
1682
- async updatePortalProfile(data) {
1683
- return (await request(PORTAL.updateProfile, { body: data })).profile;
1684
- },
1685
- async getPortalPasses() {
1686
- return (await request(PORTAL.getPasses)).passes;
1687
- },
1688
- async getPortalMemberships(params) {
1689
- return (await request(PORTAL.getMemberships, params?.includeInactive ? { query: { includeInactive: "true" } } : void 0)).memberships;
1690
- },
1691
- getPortalEvents(params) {
1692
- return request(PORTAL.getEvents, { query: params });
1693
- },
1694
- async cancelPortalWaitlist(entryId) {
1695
- try {
1696
- return await request(PORTAL.cancelWaitlist, { path: buildPath(PORTAL.cancelWaitlist.path, { entryId }) });
1697
- } catch (error) {
1698
- if (error instanceof BlockApiError && error.status === 409) return { outcome: "alreadyClosed" };
1699
- if (error instanceof BlockApiError && error.status === 404) return { outcome: "notFound" };
1700
- throw error;
1701
- }
1702
- },
1703
- createPortalAppointmentBookingQuestionsUploadUrl(appointmentId, data) {
1704
- return request(PORTAL.createAppointmentBookingQuestionsUploadUrl, {
1705
- path: buildPath(PORTAL.createAppointmentBookingQuestionsUploadUrl.path, { appointmentId }),
1706
- body: data
1707
- });
1708
- },
1709
- async finalizePortalAppointmentBookingQuestionsUpload(appointmentId, data) {
1710
- return (await request(PORTAL.finalizeAppointmentBookingQuestionsUpload, {
1711
- path: buildPath(PORTAL.finalizeAppointmentBookingQuestionsUpload.path, { appointmentId }),
1712
- body: data
1713
- })).answer;
1714
- },
1715
- createPortalEventBookingQuestionsUploadUrl(registrationId, data) {
1716
- return request(PORTAL.createEventBookingQuestionsUploadUrl, {
1717
- path: buildPath(PORTAL.createEventBookingQuestionsUploadUrl.path, { registrationId }),
1718
- body: data
1719
- });
1720
- },
1721
- async finalizePortalEventBookingQuestionsUpload(registrationId, data) {
1722
- return (await request(PORTAL.finalizeEventBookingQuestionsUpload, {
1723
- path: buildPath(PORTAL.finalizeEventBookingQuestionsUpload.path, { registrationId }),
1724
- body: data
1725
- })).answer;
1726
- },
1727
- createPortalWholeSeriesBookingQuestionsUploadUrl(registrationId, data) {
1728
- return request(PORTAL.createWholeSeriesBookingQuestionsUploadUrl, {
1729
- path: buildPath(PORTAL.createWholeSeriesBookingQuestionsUploadUrl.path, { registrationId }),
1730
- body: data
1731
- });
1732
- },
1733
- async finalizePortalWholeSeriesBookingQuestionsUpload(registrationId, data) {
1734
- return (await request(PORTAL.finalizeWholeSeriesBookingQuestionsUpload, {
1735
- path: buildPath(PORTAL.finalizeWholeSeriesBookingQuestionsUpload.path, { registrationId }),
1736
- body: data
1737
- })).answer;
1738
- },
1739
- async getPortalEventTicket(registrationId) {
1740
- const path = buildPath(PORTAL.getEventTicket.path, { registrationId });
1741
- return (await request(PORTAL.getEventTicket, { path })).ticket;
1742
- },
1743
- async getPortalAppointments() {
1744
- return (await request(PORTAL.getAppointments)).appointments;
1745
- },
1746
- async getPortalRegularSessions() {
1747
- return (await request(PORTAL.getRegularSessions)).arrangements;
1748
- },
1749
- async getPortalAppointmentBookingQuestions(appointmentId) {
1750
- const path = buildPath(PORTAL.getAppointmentBookingQuestions.path, { appointmentId });
1751
- return (await request(PORTAL.getAppointmentBookingQuestions, { path })).task;
1752
- },
1753
- async updatePortalAppointmentBookingQuestions(appointmentId, data) {
1754
- const path = buildPath(PORTAL.updateAppointmentBookingQuestions.path, { appointmentId });
1755
- return (await request(PORTAL.updateAppointmentBookingQuestions, {
1756
- path,
1757
- body: data
1758
- })).task;
1759
- },
1760
- async getPortalEventBookingQuestions(registrationId) {
1761
- const path = buildPath(PORTAL.getEventBookingQuestions.path, { registrationId });
1762
- return (await request(PORTAL.getEventBookingQuestions, { path })).task;
1763
- },
1764
- async updatePortalEventBookingQuestions(registrationId, data) {
1765
- const path = buildPath(PORTAL.updateEventBookingQuestions.path, { registrationId });
1766
- return (await request(PORTAL.updateEventBookingQuestions, {
1767
- path,
1768
- body: data
1769
- })).task;
1770
- },
1771
- async getPortalWholeSeriesRegistrations() {
1772
- return (await request(PORTAL.getWholeSeriesRegistrations)).enrollments;
1773
- },
1774
- async getPortalWholeSeriesBookingQuestions(registrationId) {
1775
- const path = buildPath(PORTAL.getWholeSeriesBookingQuestions.path, { registrationId });
1776
- return (await request(PORTAL.getWholeSeriesBookingQuestions, { path })).task;
1777
- },
1778
- async updatePortalWholeSeriesBookingQuestions(registrationId, data) {
1779
- const path = buildPath(PORTAL.updateWholeSeriesBookingQuestions.path, { registrationId });
1780
- return (await request(PORTAL.updateWholeSeriesBookingQuestions, {
1781
- path,
1782
- body: data
1783
- })).task;
1784
- },
1785
- async cancelWholeSeriesRegistration(registrationId, options) {
1786
- const path = buildPath(PORTAL.cancelWholeSeriesRegistration.path, { registrationId });
1787
- return (await request(PORTAL.cancelWholeSeriesRegistration, {
1788
- path,
1789
- body: options ?? {}
1790
- })).result;
1791
- },
1792
- async cancelAppointment(appointmentId, options) {
1793
- const path = buildPath(PORTAL.cancelAppointment.path, { appointmentId });
1794
- return (await request(PORTAL.cancelAppointment, {
1795
- path,
1796
- body: options ?? {}
1797
- })).result;
1798
- },
1799
- async rescheduleAppointment(appointmentId, data) {
1800
- const path = buildPath(PORTAL.rescheduleAppointment.path, { appointmentId });
1801
- return request(PORTAL.rescheduleAppointment, {
1802
- path,
1803
- body: data
1804
- });
1805
- },
1806
- async cancelEventRegistration(registrationId, options) {
1807
- const path = buildPath(PORTAL.cancelEventRegistration.path, { registrationId });
1808
- return (await request(PORTAL.cancelEventRegistration, {
1809
- path,
1810
- body: options ?? {}
1811
- })).result;
1812
- },
1813
- async transferEventRegistration(registrationId, data) {
1814
- const path = buildPath(PORTAL.transferEventRegistration.path, { registrationId });
1815
- return (await request(PORTAL.transferEventRegistration, {
1816
- path,
1817
- body: data
1818
- })).result;
1819
- },
1820
- async cancelMembershipAtPeriodEnd(customerMembershipId) {
1821
- const path = buildPath(PORTAL.cancelMembershipAtPeriodEnd.path, { customerMembershipId });
1822
- return (await request(PORTAL.cancelMembershipAtPeriodEnd, {
1823
- path,
1824
- body: {}
1825
- })).result;
1826
- },
1827
- async resumeMembership(customerMembershipId) {
1828
- const path = buildPath(PORTAL.resumeMembership.path, { customerMembershipId });
1829
- return (await request(PORTAL.resumeMembership, {
1830
- path,
1831
- body: {}
1832
- })).result;
1833
- },
1834
- async listEventRescheduleDates(registrationId, query) {
1835
- const path = buildPath(PORTAL.listEventRescheduleDates.path, { registrationId });
1836
- return request(PORTAL.listEventRescheduleDates, {
1837
- path,
1838
- query: { ...query },
1839
- skipDedup: true
1840
- });
1841
- },
1842
- async rescheduleEventRegistration(registrationId, data) {
1843
- const path = buildPath(PORTAL.rescheduleEventRegistration.path, { registrationId });
1844
- return (await request(PORTAL.rescheduleEventRegistration, {
1845
- path,
1846
- body: data
1847
- })).result;
1848
- },
1849
- async getEventGuests(registrationId) {
1850
- const path = buildPath(PORTAL.getEventGuests.path, { registrationId });
1851
- return (await request(PORTAL.getEventGuests, { path })).guests;
1852
- },
1853
- async updateEventGuests(registrationId, data) {
1854
- const path = buildPath(PORTAL.updateEventGuests.path, { registrationId });
1855
- return (await request(PORTAL.updateEventGuests, {
1856
- path,
1857
- body: data
1858
- })).guests;
1859
- },
1860
2211
  async sendMagicLink(data) {
1861
2212
  const sid = requireSiteId();
1862
2213
  return request(PORTAL.sendMagicLink, { body: {
@@ -1888,10 +2239,21 @@ const selectionFundingResponseSchema = z.object({
1888
2239
  kind: z.literal("dates"),
1889
2240
  occurrenceIds: z.tuple([occurrenceId]).rest(occurrenceId).readonly()
1890
2241
  }),
1891
- funding: eventSelectionFundingSchema
2242
+ funding: eventSelectionFundingSchema,
2243
+ /** How each way to fund the dates collects its money; older servers don't send it. */
2244
+ payment: eventSelectionPaymentSchema.optional()
2245
+ });
2246
+ const eventSeriesId = z.string().min(1);
2247
+ /** And a runs subject with how those runs can be paid. */
2248
+ const runsSelectionPaymentResponseSchema = z.object({
2249
+ subject: z.object({
2250
+ kind: z.literal("runs"),
2251
+ eventSeriesIds: z.tuple([eventSeriesId]).rest(eventSeriesId).readonly()
2252
+ }),
2253
+ payment: eventSelectionPaymentSchema
1892
2254
  });
1893
2255
  function isSingleRegistrationOptions(response) {
1894
- return response.subject.kind !== "dates";
2256
+ return response.subject.kind !== "dates" && response.subject.kind !== "runs";
1895
2257
  }
1896
2258
  //#endregion
1897
2259
  //#region ../blocks/src/system/runtime/api/blockApiContext.ts
@@ -1972,4 +2334,4 @@ function useBlockApiOptional() {
1972
2334
  return useContext(BlockApiContext);
1973
2335
  }
1974
2336
  //#endregion
1975
- export { createBlockApi as a, BlockApiError as i, useBlockApi as n, useBlockApiOptional as r, BlockApiProvider as t };
2337
+ export { portalMeUpdateResponseSchema as C, portalTransferEventRegistrationResultSchema as E, portalMeResponseSchema as S, portalRescheduleAppointmentResponseSchema as T, portalDigitalProductsResponseSchema as _, createPortalTransport as a, portalEventRescheduleResultSchema as b, PORTAL as c, portalBookingQuestionsTaskResponseSchema as d, portalBookingQuestionsUploadUrlResponseSchema as f, portalDigitalProductDownloadUrlResponseSchema as g, portalDigitalProductAccessResponseSchema as h, BlockApiError as i, magicLinkResponseSchema as l, portalCancelOutcomeSchema as m, useBlockApi as n, field as o, portalCancelMembershipAtPeriodEndResultSchema as p, useBlockApiOptional as r, isUncertainPortalFailure as s, BlockApiProvider as t, portalBookingQuestionsFinalizeUploadResponseSchema as u, portalEventGuestsResponseSchema as v, portalOrderCheckoutResponseSchema as w, portalEventTicketResponseSchema as x, portalEventRescheduleDatesSchema as y };