@riverbankcms/sdk 0.155.0 → 0.156.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 (216) hide show
  1. package/dist/{PreviewEditorSidebar-CbSbqmz3.mjs → PreviewEditorSidebar-B4ESNPzL.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-CKKnAw11.mjs → PreviewEditorUI-BdUVaGOh.mjs} +3 -3
  3. package/dist/{SdkPreviewModeRuntime-wLkXrWy9.mjs → SdkPreviewModeRuntime-C4V3BvxK.mjs} +1122 -1079
  4. package/dist/{SiteChromeCustomizeContext-BQ8vvKb-.mjs → SiteChromeCustomizeContext-3gmd26Mn.mjs} +1019 -517
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +624 -624
  6. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +856 -856
  7. package/dist/_dts/api/src/accountApi.d.ts +5 -5
  8. package/dist/_dts/api/src/aiPlayground.d.ts +2 -2
  9. package/dist/_dts/api/src/bookingRecords.d.ts +2 -22
  10. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +1 -1
  11. package/dist/_dts/api/src/contentRuntime.d.ts +5 -2
  12. package/dist/_dts/api/src/footerCompositionContracts.d.ts +1 -1
  13. package/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
  14. package/dist/_dts/api/src/navigation/types.d.ts +1 -1
  15. package/dist/_dts/api/src/public/types.d.ts +2 -1
  16. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -1
  17. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +3 -3
  18. package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +1 -1
  19. package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +1 -1
  20. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +2 -1
  21. package/dist/_dts/api/src/sdkContracts.d.ts +2 -1
  22. package/dist/_dts/api/src/sdkPageDesign.d.ts +9 -9
  23. package/dist/_dts/api/src/sdkThemeWire.d.ts +182 -182
  24. package/dist/_dts/api/src/siteOnboarding.d.ts +1 -1
  25. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
  26. package/dist/_dts/api/src/siteSettings.d.ts +2 -2
  27. package/dist/_dts/api/src/teamMembers.d.ts +1 -1
  28. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLayoutGridMoveAnimation.d.ts +13 -0
  29. package/dist/_dts/blocks/src/client/portal.d.ts +5 -0
  30. package/dist/_dts/blocks/src/contracts/event-registration.d.ts +141 -0
  31. package/dist/_dts/blocks/src/contracts/events.d.ts +21 -0
  32. package/dist/_dts/blocks/src/contracts/footer.d.ts +130 -0
  33. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +1 -1
  34. package/dist/_dts/blocks/src/contracts/site-chrome.d.ts +10 -0
  35. package/dist/_dts/blocks/src/customer-portal/client.d.ts +62 -0
  36. package/dist/_dts/blocks/src/customer-portal/components/PortalLoginForm.d.ts +16 -0
  37. package/dist/_dts/blocks/src/customer-portal/components/badge.d.ts +6 -0
  38. package/dist/_dts/blocks/src/customer-portal/components/bookings/AppointmentBeforeYouComeTask.d.ts +29 -0
  39. package/dist/_dts/blocks/src/customer-portal/components/bookings/BookingsSection.d.ts +22 -0
  40. package/dist/_dts/blocks/src/customer-portal/components/bookings/BookingsTable.d.ts +9 -0
  41. package/dist/_dts/blocks/src/customer-portal/components/bookings/EventRow.d.ts +9 -0
  42. package/dist/_dts/blocks/src/customer-portal/components/bookings/EventSeriesRegistrationRow.d.ts +8 -0
  43. package/dist/_dts/blocks/src/customer-portal/components/bookings/EventSeriesRegistrationTableRow.d.ts +22 -0
  44. package/dist/_dts/blocks/src/customer-portal/components/bookings/PortalAppointmentRescheduleFlow.d.ts +7 -0
  45. package/dist/_dts/blocks/src/customer-portal/components/bookings/ScalarQuestionInput.d.ts +11 -0
  46. package/dist/_dts/blocks/src/customer-portal/components/bookings/WaitlistCard.d.ts +8 -0
  47. package/dist/_dts/blocks/src/customer-portal/components/bookings/WaitlistsSection.d.ts +19 -0
  48. package/dist/_dts/blocks/src/customer-portal/components/bookings/bookingsTypes.d.ts +11 -0
  49. package/dist/_dts/blocks/src/customer-portal/components/bookings/eventGuestDrafts.d.ts +6 -0
  50. package/dist/_dts/blocks/src/customer-portal/components/bookings/eventSeriesRegistrationPresentation.d.ts +8 -0
  51. package/dist/_dts/blocks/src/customer-portal/components/bookings/usePortalCancelFlow.d.ts +36 -0
  52. package/dist/_dts/blocks/src/customer-portal/components/bookings/usePortalCancelFlow.state.d.ts +43 -0
  53. package/dist/_dts/blocks/src/customer-portal/components/orders/OrdersSection.d.ts +8 -0
  54. package/dist/_dts/blocks/src/customer-portal/components/orders/orderInteraction.d.ts +63 -0
  55. package/dist/_dts/blocks/src/customer-portal/components/portal-modal.d.ts +8 -0
  56. package/dist/_dts/blocks/src/customer-portal/components/portalDeepLink.d.ts +19 -0
  57. package/dist/_dts/blocks/src/customer-portal/components/useMembershipCancelFlow.d.ts +13 -0
  58. package/dist/_dts/blocks/src/customer-portal/components/useMembershipCancelFlow.state.d.ts +32 -0
  59. package/dist/_dts/blocks/src/customer-portal/pages/AccessState.d.ts +11 -0
  60. package/dist/_dts/blocks/src/customer-portal/pages/DigitalProductView.d.ts +4 -0
  61. package/dist/_dts/blocks/src/customer-portal/pages/PageChrome.d.ts +9 -0
  62. package/dist/_dts/blocks/src/customer-portal/pages/PrintButton.d.ts +1 -0
  63. package/dist/_dts/blocks/src/customer-portal/pages/TicketCode.d.ts +3 -0
  64. package/dist/_dts/blocks/src/customer-portal/pages/TicketView.d.ts +4 -0
  65. package/dist/_dts/blocks/src/customer-portal/route-client.d.ts +9 -0
  66. package/dist/_dts/blocks/src/customer-portal/shared/bookingRoute.d.ts +9 -0
  67. package/dist/_dts/blocks/src/customer-portal/shared/checkoutUrls.d.ts +4 -0
  68. package/dist/_dts/blocks/src/customer-portal/shared/signedUrlUpload.d.ts +1 -0
  69. package/dist/_dts/blocks/src/customer-portal/shared/urlParams.d.ts +30 -0
  70. package/dist/_dts/blocks/src/customer-portal/state.d.ts +196 -0
  71. package/dist/_dts/blocks/src/customer-portal/tabs.d.ts +17 -0
  72. package/dist/_dts/blocks/src/portal/dateFormatting.d.ts +13 -0
  73. package/dist/_dts/blocks/src/portal/types.d.ts +7 -14
  74. package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +1 -25
  75. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -141
  76. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +3 -3
  77. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -3
  78. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +135 -135
  79. package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +3 -129
  80. package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +2 -5
  81. package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +2 -5
  82. package/dist/_dts/blocks/src/system/constants/events.d.ts +1 -1
  83. package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
  84. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +82 -82
  85. package/dist/_dts/blocks/src/system/node/fragments/lookSlot.d.ts +2 -2
  86. package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
  87. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +21 -2
  88. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +87 -3
  89. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  90. package/dist/_dts/blocks/src/system/runtime/api/schemas/events.d.ts +1 -1
  91. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -1
  92. package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +16 -27
  93. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
  94. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +4 -4
  95. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +2 -5
  96. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -5
  97. package/dist/_dts/blocks/src/system/runtime/lookSurfaces.d.ts +9 -9
  98. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/lookPresentation.d.ts +9 -9
  99. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +2 -2
  100. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
  101. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +18 -18
  102. package/dist/_dts/blocks/src/system/runtime/nodes/form.interactive.d.ts +2 -10
  103. package/dist/_dts/blocks/src/system/runtime/nodes/form.types.d.ts +10 -0
  104. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -1
  105. package/dist/_dts/blocks/src/system/runtime/shared/AppointmentRescheduleSlotOptions.d.ts +11 -0
  106. package/dist/_dts/blocks/src/system/runtime/shared/useAppointmentRescheduleFlow.d.ts +73 -0
  107. package/dist/_dts/blocks/src/system/runtime/shared/useAppointmentRescheduleFlow.state.d.ts +62 -0
  108. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +1 -4
  109. package/dist/_dts/commerce/src/moneyDateUtils.d.ts +7 -0
  110. package/dist/_dts/core/src/booking-date-time.d.ts +5 -1
  111. package/dist/_dts/core/src/date-display.d.ts +4 -0
  112. package/dist/_dts/core/src/navigation-portal-labels.d.ts +1 -1
  113. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
  114. package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
  115. package/dist/_dts/preview-next/src/client/preview/PreviewEditingModeProvider.d.ts +7 -0
  116. package/dist/_dts/sdk/src/bookings/types.d.ts +0 -1
  117. package/dist/_dts/sdk/src/next/index.d.ts +1 -0
  118. package/dist/_dts/sdk/src/next/portal.d.ts +41 -0
  119. package/dist/_dts/sdk/src/next/resolveTheme.d.ts +4 -9
  120. package/dist/_dts/sdk/src/next/types.d.ts +8 -3
  121. package/dist/_dts/sdk/src/portal/client.d.ts +1 -0
  122. package/dist/_dts/sdk/src/portal/index.d.ts +4 -36
  123. package/dist/_dts/sdk/src/portal/token.d.ts +4 -20
  124. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -1
  125. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +1 -28
  126. package/dist/_dts/sdk/src/version.d.ts +1 -1
  127. package/dist/_dts/theme-core/src/accordions/types.d.ts +4 -4
  128. package/dist/_dts/theme-core/src/buttons/types.d.ts +41 -41
  129. package/dist/_dts/theme-core/src/buttons/typography.d.ts +2 -2
  130. package/dist/_dts/theme-core/src/cards/types.d.ts +34 -34
  131. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  132. package/dist/_dts/theme-core/src/header/containerSchema.d.ts +2 -2
  133. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +1 -1
  134. package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
  135. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +255 -255
  136. package/dist/_dts/theme-core/src/navigation/types.d.ts +6 -6
  137. package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
  138. package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
  139. package/dist/_dts/theme-core/src/schema.d.ts +294 -294
  140. package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
  141. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  142. package/dist/_dts/theme-core/src/site-styles/compileFooterAgainstRow.d.ts +7 -7
  143. package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +1 -1
  144. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +12 -12
  145. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
  146. package/dist/_dts/theme-core/src/typography/schema.d.ts +27 -27
  147. package/dist/_dts/ui/src/button.d.ts +1 -1
  148. package/dist/_dts/ui/src/surface.d.ts +2 -2
  149. package/dist/_dts/ui/src/toggle.d.ts +2 -2
  150. package/dist/client/{BookingMailingListNote-CiW1dsz7.mjs → BookingMailingListNote-B9mP3Io9.mjs} +2 -2
  151. package/dist/client/{CardListItem-DVYTlYpS.mjs → CardListItem-D5rL2wPv.mjs} +3 -3
  152. package/dist/client/{CheckboxChoice-CUnPrBlC.mjs → CheckboxChoice-Bz6wLaBl.mjs} +1 -1
  153. package/dist/client/{DemoBookingPortalAccess-DEsn5F2C.mjs → DemoBookingPortalAccess-7BPVzfLU.mjs} +6 -10
  154. package/dist/client/{EventCombined.client-BdctbwnV.mjs → EventCombined.client-DZH5qHJl.mjs} +5 -5
  155. package/dist/client/{EventEmbeddedCheckoutStep-DAhQs6Jb.mjs → EventEmbeddedCheckoutStep-CV31Qvn2.mjs} +2 -2
  156. package/dist/client/{EventListing.client-BviZXfAE.mjs → EventListing.client-C19sjRGF.mjs} +2 -2
  157. package/dist/client/{LeafletStaticMap-BLTECfjU.mjs → LeafletStaticMap-DjUjYdzQ.mjs} +1 -1
  158. package/dist/client/{RichText-D3oE1_pw.mjs → RichText-DkKcVZwr.mjs} +2 -2
  159. package/dist/client/{ThemedButton-Ckj0Rfr_.mjs → ThemedButton-CTgpAXfL.mjs} +1 -1
  160. package/dist/client/{accordion-yBx6d4O2.mjs → accordion-R2-q5wo-.mjs} +1 -1
  161. package/dist/client/{bookingForm-CPDEsQci.mjs → bookingForm-VSU8nIdO.mjs} +12 -16
  162. package/dist/client/bookings.mjs +352 -64
  163. package/dist/client/{carousel-DCqjwd2s.mjs → carousel-BjPlY4ee.mjs} +2 -2
  164. package/dist/client/{carousel.client-Bx7XMF8-.mjs → carousel.client-Tnwvm0l1.mjs} +1 -1
  165. package/dist/client/{cart-DWJXrQxs.mjs → cart-DAPYTOP7.mjs} +3 -3
  166. package/dist/client/{checkout-CH4ypSLS.mjs → checkout-DGJTx4vB.mjs} +3 -3
  167. package/dist/client/client.mjs +61275 -61217
  168. package/dist/client/{context-BOs0m_iw.mjs → context-ByZBoKdq.mjs} +92 -209
  169. package/dist/client/{eventCalendar-CRylMllc.mjs → eventCalendar-CP5Z7iME.mjs} +8 -8
  170. package/dist/client/{eventCombined-DohTS3kp.mjs → eventCombined-D8nbUyxu.mjs} +4 -4
  171. package/dist/client/{eventDetails-qf-u9zcF.mjs → eventDetails-Bknq8k7E.mjs} +46 -44
  172. package/dist/client/{eventListing-Cg__X2vy.mjs → eventListing-BwMnPteX.mjs} +4 -4
  173. package/dist/client/{eventRegistration-CybWxswy.mjs → eventRegistration-COFk1mjw.mjs} +11 -11
  174. package/dist/client/{form-C-SGk6nq.mjs → form-BiWLd_me.mjs} +5 -5
  175. package/dist/client/{headerSection-BdzPaHqo.mjs → headerSection-BptDP4xF.mjs} +3 -3
  176. package/dist/client/hooks.mjs +22850 -22861
  177. package/dist/client/{locationMap-CEwIKmMb.mjs → locationMap-B-kPoqcK.mjs} +3 -3
  178. package/dist/client/{media-V_ShXXru.mjs → media-FjqQK4qS.mjs} +68 -1
  179. package/dist/client/{newsletterForm-CmwTltoS.mjs → newsletterForm-s_B8fCtT.mjs} +4 -4
  180. package/dist/client/portal/client.mjs +17419 -0
  181. package/dist/client/{productDetail-DjIzUwg3.mjs → productDetail-CS3GZMPi.mjs} +3 -3
  182. package/dist/client/{productList-D6JGFnMF.mjs → productList-Csc3WJDs.mjs} +3 -3
  183. package/dist/client/{propsDecoder-BRKz13eg.mjs → propsDecoder-Dn68GoQZ.mjs} +502 -2705
  184. package/dist/client/rendering/client.mjs +3303 -3612
  185. package/dist/client/rendering/islands.mjs +17 -17
  186. package/dist/client/rendering.mjs +46273 -46220
  187. package/dist/client/{routeIslandApiConfig-slAAILQ5.mjs → routeIslandApiConfig-DeBuevOO.mjs} +1 -1
  188. package/dist/client/{shop-C45K96_0.mjs → shop-B5EQbeUX.mjs} +7 -7
  189. package/dist/client/{shop-commerce-oGBiKT5d.mjs → shop-commerce-DYs7PdNL.mjs} +8 -8
  190. package/dist/client/{shop-commerce-store-H_HFPFZ8.mjs → shop-commerce-store-B2-DIPbg.mjs} +1 -1
  191. package/dist/client/{shopShared-D54T_LAV.mjs → shopShared-CE302Pfy.mjs} +4 -4
  192. package/dist/client/{useDiscountCodeUi-Dm2EUa03.mjs → useDiscountCodeUi-BZ02FBrV.mjs} +1 -1
  193. package/dist/client/{useEventPagination-0l_A8CxG.mjs → useEventPagination-VudQWKtG.mjs} +116 -6
  194. package/dist/preview-next/client/runtime.mjs +3 -3
  195. package/dist/{sdk-runtime-CjTM32Ah.mjs → sdk-runtime-C8Qh6r51.mjs} +1 -1
  196. package/dist/server/components.mjs +927 -262
  197. package/dist/server/config-template-validation.mjs +5 -3
  198. package/dist/server/config-validation.mjs +35200 -35211
  199. package/dist/server/config.mjs +35200 -35211
  200. package/dist/server/data.mjs +32783 -32794
  201. package/dist/server/date-time.mjs +14 -7
  202. package/dist/server/index.mjs +1 -1
  203. package/dist/server/navigation.mjs +1 -1
  204. package/dist/server/next.mjs +71470 -70677
  205. package/dist/server/page-converter.mjs +202 -213
  206. package/dist/server/portal.mjs +5 -51
  207. package/dist/server/prebuild.mjs +1 -1
  208. package/dist/server/rendering/server.mjs +1180 -722
  209. package/dist/server/rendering.mjs +922 -262
  210. package/dist/server/routing.mjs +39382 -41704
  211. package/dist/server/server.mjs +203 -214
  212. package/dist/server/theme-bridge.mjs +262 -2
  213. package/dist/{spinner-KVVZh8jd.mjs → spinner-Bi68Z_0o.mjs} +1 -1
  214. package/dist/styles/index.css +258 -2
  215. package/package.json +9 -1
  216. package/dist/_dts/sdk/src/portal/config.d.ts +0 -67
@@ -0,0 +1,36 @@
1
+ type PortalRefundInfo = {
2
+ status: 'succeeded' | 'failed' | 'skipped';
3
+ amountCents: number | null;
4
+ currency: string | null;
5
+ paymentLast4: string | null;
6
+ stripeRefundId: string | null;
7
+ errorMessage?: string;
8
+ errorCode?: string;
9
+ };
10
+ export type PortalCancelResultLike = {
11
+ cancelled: boolean;
12
+ refunded: boolean;
13
+ refund?: PortalRefundInfo;
14
+ requiresCancelWithoutRefundConfirmation?: boolean;
15
+ failedToRestoreCredit?: boolean;
16
+ message: string;
17
+ };
18
+ export declare function usePortalCancelFlow(options: {
19
+ cancel: (opts?: {
20
+ confirmCancelWithoutRefund?: boolean;
21
+ }) => Promise<PortalCancelResultLike>;
22
+ onRefresh: () => Promise<void>;
23
+ }): {
24
+ submitting: boolean;
25
+ dialog: import("./usePortalCancelFlow.state").PortalCancelDialogState;
26
+ feedback: import("./usePortalCancelFlow.state").PortalCancelFeedbackState;
27
+ clearFeedback: () => void;
28
+ reportError: (message: string) => void;
29
+ reportSuccess: (message: string) => void;
30
+ startCancelFlow: () => void;
31
+ submitCancel: (opts?: {
32
+ confirmCancelWithoutRefund?: boolean;
33
+ }) => Promise<void>;
34
+ dismissCancelFlow: () => void;
35
+ };
36
+ export {};
@@ -0,0 +1,43 @@
1
+ import { type FeedbackState } from '@riverbankcms/frontend-state';
2
+ import type { PortalCancelResultLike } from './usePortalCancelFlow';
3
+ export type PortalCancelDialogState = {
4
+ tag: 'closed';
5
+ } | {
6
+ tag: 'confirm';
7
+ } | {
8
+ tag: 'confirmWithoutRefund';
9
+ message: string;
10
+ };
11
+ export type PortalCancelFeedbackState = FeedbackState<string>;
12
+ export type PortalCancelState = {
13
+ submitting: boolean;
14
+ dialog: PortalCancelDialogState;
15
+ feedback: PortalCancelFeedbackState;
16
+ };
17
+ export type PortalCancelAction = {
18
+ type: 'start-cancel-flow';
19
+ } | {
20
+ type: 'dismiss-dialog';
21
+ } | {
22
+ type: 'submit-started';
23
+ } | {
24
+ type: 'confirm-without-refund-required';
25
+ message: string;
26
+ } | {
27
+ type: 'submit-failed';
28
+ message: string;
29
+ } | {
30
+ type: 'submit-succeeded';
31
+ message: string;
32
+ } | {
33
+ type: 'report-error';
34
+ message: string;
35
+ } | {
36
+ type: 'report-success';
37
+ message: string;
38
+ } | {
39
+ type: 'clear-feedback';
40
+ };
41
+ export declare const initialPortalCancelState: PortalCancelState;
42
+ export declare function portalCancelReducer(state: PortalCancelState, action: PortalCancelAction): PortalCancelState;
43
+ export declare function formatPortalCancelSuccessMessage(result: PortalCancelResultLike): string;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import type { CustomerOrder } from '../../../portal/types';
3
+ export declare function OrdersSection({ orders, emptyMessage, requestedOrderId, onRequestedOrderResolved, }: {
4
+ orders: readonly CustomerOrder[];
5
+ emptyMessage: string;
6
+ requestedOrderId?: string | null;
7
+ onRequestedOrderResolved?: (resolution: 'matched' | 'missing') => void;
8
+ }): React.JSX.Element;
@@ -0,0 +1,63 @@
1
+ import { type FlexibleBalancePaymentEligibility } from '../../../../../core/src/index';
2
+ import type { CustomerOrder, CustomerOrderFilter, CustomerOrderFilterSummary } from '../../../portal/types';
3
+ type OrderDetailState = Readonly<{
4
+ kind: 'closed';
5
+ }> | Readonly<{
6
+ kind: 'open';
7
+ orderId: string;
8
+ customAmount: Readonly<{
9
+ kind: 'closed';
10
+ }> | Readonly<{
11
+ kind: 'editing';
12
+ input: string;
13
+ }>;
14
+ }>;
15
+ export type OrderInteractionState = Readonly<{
16
+ detail: OrderDetailState;
17
+ checkout: Readonly<{
18
+ kind: 'idle';
19
+ }> | Readonly<{
20
+ kind: 'submitting';
21
+ orderId: string;
22
+ }>;
23
+ error: string | null;
24
+ }>;
25
+ export type OrderInteractionAction = Readonly<{
26
+ type: 'details-opened';
27
+ orderId: string;
28
+ }> | Readonly<{
29
+ type: 'details-closed';
30
+ }> | Readonly<{
31
+ type: 'custom-amount-toggled';
32
+ eligibility: Extract<FlexibleBalancePaymentEligibility, {
33
+ kind: 'eligible';
34
+ }>;
35
+ }> | Readonly<{
36
+ type: 'custom-amount-changed';
37
+ input: string;
38
+ }> | Readonly<{
39
+ type: 'checkout-started';
40
+ orderId: string;
41
+ }> | Readonly<{
42
+ type: 'checkout-failed';
43
+ message: string;
44
+ }> | Readonly<{
45
+ type: 'validation-failed';
46
+ message: string;
47
+ }>;
48
+ export declare const initialOrderInteraction: OrderInteractionState;
49
+ export declare function orderInteractionReducer(state: OrderInteractionState, action: OrderInteractionAction): OrderInteractionState;
50
+ /** Reconcile only detail state: an in-flight checkout still owns its result. */
51
+ export declare function reconcileOrderInteraction(state: OrderInteractionState, orders: readonly Pick<CustomerOrder, 'id'>[]): OrderInteractionState;
52
+ export declare function resolveEffectiveOrderFilter(preference: CustomerOrderFilter, summary: CustomerOrderFilterSummary): CustomerOrderFilter;
53
+ export declare function resolveOrderFlexibleBalanceEligibility(order: Pick<CustomerOrder, 'flexibleBalance'>): FlexibleBalancePaymentEligibility | null;
54
+ /** Project the reconciled interaction into the values needed by the detail UI. */
55
+ export declare function selectOrderInteraction(state: OrderInteractionState, orders: readonly CustomerOrder[]): {
56
+ selectedOrder: CustomerOrder | null;
57
+ isCustomAmountOpen: boolean;
58
+ customAmountInput: string;
59
+ payingOrderId: string | null;
60
+ orderActionError: string | null;
61
+ balanceEligibility: FlexibleBalancePaymentEligibility | null;
62
+ };
63
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export declare const CustomerPortalPortalRootContext: React.Context<HTMLElement | null>;
3
+ export declare function PortalModal({ title, titleId, onClose, children, }: {
4
+ title: string;
5
+ titleId: string;
6
+ onClose: () => void;
7
+ children: React.ReactNode;
8
+ }): React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { CustomerPortalTabId } from '../state';
2
+ export declare const PORTAL_LOGIN_QUERY_PARAM = "portal_login";
3
+ export declare const PORTAL_TAB_QUERY_PARAM = "portal_tab";
4
+ export declare const PORTAL_ORDER_QUERY_PARAM = "portal_order";
5
+ export declare const PORTAL_TASK_QUERY_PARAM = "portal_task";
6
+ export declare const CUSTOMER_PORTAL_DEEP_LINK_QUERY_PARAMS: readonly ["portal_login", "portal_tab", "portal_order", "portal_task"];
7
+ export type CustomerPortalTaskLink = Readonly<{
8
+ kind: 'appointment' | 'event' | 'event_series_registration' | 'waitlist';
9
+ id: string;
10
+ }>;
11
+ export type CustomerPortalDeepLink = Readonly<{
12
+ loginStatus: 'success' | null;
13
+ requestedTab: CustomerPortalTabId | null;
14
+ requestedOrderId: string | null;
15
+ requestedTask: CustomerPortalTaskLink | null;
16
+ }>;
17
+ export declare function parseCustomerPortalDeepLink(searchParams: URLSearchParams): CustomerPortalDeepLink;
18
+ /** Keep recognised links only; callers retain this value before consuming the URL. */
19
+ export declare function buildCustomerPortalReturnPath(pathname: string, searchParams: URLSearchParams): string;
@@ -0,0 +1,13 @@
1
+ export declare function useMembershipCancelFlow(options: {
2
+ cancelMembershipAtPeriodEnd: (membershipId: string) => Promise<{
3
+ cancelled: boolean;
4
+ message: string;
5
+ }>;
6
+ onRefresh: () => Promise<void>;
7
+ }): {
8
+ dialog: import("./useMembershipCancelFlow.state").MembershipCancelDialogState;
9
+ feedback: import("@riverbankcms/frontend-state").FeedbackState<string>;
10
+ startCancelFlow: (membershipId: string) => void;
11
+ dismissCancelFlow: () => void;
12
+ submitCancel: (membershipId: string) => Promise<void>;
13
+ };
@@ -0,0 +1,32 @@
1
+ import { type FeedbackState } from '@riverbankcms/frontend-state';
2
+ export type MembershipCancelDialogState = {
3
+ tag: 'closed';
4
+ } | {
5
+ tag: 'confirming';
6
+ membershipId: string;
7
+ } | {
8
+ tag: 'submitting';
9
+ membershipId: string;
10
+ };
11
+ export type MembershipCancelState = {
12
+ dialog: MembershipCancelDialogState;
13
+ feedback: FeedbackState<string>;
14
+ };
15
+ export type MembershipCancelAction = {
16
+ type: 'start-cancel-flow';
17
+ membershipId: string;
18
+ } | {
19
+ type: 'dismiss-dialog';
20
+ } | {
21
+ type: 'submit-started';
22
+ } | {
23
+ type: 'submit-succeeded';
24
+ message: string;
25
+ } | {
26
+ type: 'submit-failed';
27
+ message: string;
28
+ } | {
29
+ type: 'clear-feedback';
30
+ };
31
+ export declare const initialMembershipCancelState: MembershipCancelState;
32
+ export declare function membershipCancelReducer(state: MembershipCancelState, action: MembershipCancelAction): MembershipCancelState;
@@ -0,0 +1,11 @@
1
+ export type PortalAccessPageKind = 'ticket' | 'digital-product' | 'file';
2
+ export type PortalAccessStateProps = Readonly<{
3
+ kind: PortalAccessPageKind;
4
+ state: 'login' | 'unavailable' | 'failed';
5
+ apiBaseUrl: string;
6
+ siteId: string;
7
+ redirectTo: string;
8
+ callbackPath?: string;
9
+ demoEmailSuppressed?: boolean;
10
+ }>;
11
+ export declare function PortalAccessState(props: PortalAccessStateProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { PortalDigitalProductAccessResponse } from '../../api';
2
+ export declare function PortalDigitalProductView({ detail, }: Readonly<{
3
+ detail: PortalDigitalProductAccessResponse;
4
+ }>): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare function DigitalProductPageShell({ children, }: Readonly<{
3
+ children: ReactNode;
4
+ }>): import("react").JSX.Element;
5
+ export declare function DigitalProductCard({ title, children, maxWidth, }: Readonly<{
6
+ title: string;
7
+ children: ReactNode;
8
+ maxWidth?: 'md' | '2xl';
9
+ }>): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function PrintButton(): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function TicketCode({ code }: {
2
+ code: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { PortalEventTicket } from '../../api';
2
+ export declare function PortalTicketView({ ticket, }: Readonly<{
3
+ ticket: PortalEventTicket;
4
+ }>): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { type CustomerPortalClientProps } from './client';
3
+ export type CustomerPortalProps = Omit<CustomerPortalClientProps, 'hasInitialPortalToken'> & Readonly<{
4
+ siteId: string;
5
+ apiBaseUrl: string;
6
+ portalToken: string | null;
7
+ }>;
8
+ /** Reserved customer route, shared by managed and headless hosts. The host supplies theme scope. */
9
+ export declare function CustomerPortal({ apiBaseUrl, portalToken, siteId, ...props }: CustomerPortalProps): React.ReactElement;
@@ -0,0 +1,9 @@
1
+ import type { CustomerAppointment } from '../../portal/types';
2
+ export type PortalBookingRoute = Readonly<{
3
+ kind: 'dedicated';
4
+ }> | Readonly<{
5
+ kind: 'host';
6
+ path: string;
7
+ }>;
8
+ /** The booking owner chooses the route; the portal adds the rebook intent. */
9
+ export declare function portalRebookHref(appointment: Pick<CustomerAppointment, 'serviceId' | 'resourceId'>, route: PortalBookingRoute): string;
@@ -0,0 +1,4 @@
1
+ export declare function buildCheckoutReturnUrls(paramName: string, anchorId: string): {
2
+ successUrl: string;
3
+ cancelUrl: string;
4
+ };
@@ -0,0 +1 @@
1
+ export declare function uploadFileToSignedUrl(signedUrl: string, file: File): Promise<void>;
@@ -0,0 +1,30 @@
1
+ import type { BoundBlockApiClient } from '../../system/runtime/api/client';
2
+ import type { LoginAction } from '../state';
3
+ import type { CustomerPortalClientProps } from '../client';
4
+ export declare function consumeSearchParam(paramName: string): string | null;
5
+ export declare function consumeSearchParams<const TNames extends readonly string[]>(paramNames: TNames): {
6
+ [K in TNames[number]]: string | null;
7
+ };
8
+ /** Host cookie deletion remains server-owned. */
9
+ export declare function submitPortalLogout(logoutPath: string): void;
10
+ export declare function resolvePortalHostPaths(paths: Pick<CustomerPortalClientProps, 'callbackPath' | 'logoutPath' | 'bookPath'>): {
11
+ callbackPath: string;
12
+ logoutPath: string;
13
+ bookPath: {
14
+ kind: "dedicated";
15
+ path?: undefined;
16
+ } | {
17
+ kind: "host";
18
+ path: string;
19
+ };
20
+ };
21
+ export declare function usePortalInitialLocation(): {
22
+ returnPath: string;
23
+ initialPortalDeepLink: Readonly<{
24
+ loginStatus: "success" | null;
25
+ requestedTab: import("../tabs").CustomerPortalTabId | null;
26
+ requestedOrderId: string | null;
27
+ requestedTask: import("../components/portalDeepLink").CustomerPortalTaskLink | null;
28
+ }>;
29
+ };
30
+ export declare function requestPortalLogin(api: BoundBlockApiClient, email: string, returnPath: string, callbackPath: string): Promise<LoginAction>;
@@ -0,0 +1,196 @@
1
+ import { type CustomerPortalTab, type CustomerPortalTabId } from './tabs';
2
+ export { resolveInitialCustomerPortalTab, resolveCustomerPortalActiveTab, isCustomerPortalTabId, type CustomerPortalTab, type CustomerPortalTabId } from './tabs';
3
+ import { type FeedbackState } from '@riverbankcms/frontend-state';
4
+ import type { CustomerAppointment, CustomerEventSeriesRegistration, CustomerEventRegistration, CustomerMembership, CustomerPass, CustomerProfile, CustomerOrder, CustomerPortalWaitlistEntry, EnabledModules, EventGuest, PortalCredit, PortalDigitalProduct } from '../portal/types';
5
+ export type AuthState = Readonly<{
6
+ tag: 'checking';
7
+ }> | Readonly<{
8
+ tag: 'unauthenticated';
9
+ }> | Readonly<{
10
+ tag: 'authenticated';
11
+ customer: CustomerProfile;
12
+ enabledModules: EnabledModules;
13
+ }>;
14
+ export type DigitalProductsDataState = Readonly<{
15
+ tag: 'loaded';
16
+ tabLabel: string;
17
+ products: readonly PortalDigitalProduct[];
18
+ }> | Readonly<{
19
+ tag: 'failed';
20
+ tabLabel: string;
21
+ products: readonly PortalDigitalProduct[];
22
+ error: string;
23
+ }>;
24
+ export type PortalData = Readonly<{
25
+ passes: readonly CustomerPass[];
26
+ memberships: readonly CustomerMembership[];
27
+ events: readonly CustomerEventRegistration[];
28
+ waitlists: readonly CustomerPortalWaitlistEntry[];
29
+ wholeSeriesRegistrations: readonly CustomerEventSeriesRegistration[];
30
+ appointments: readonly CustomerAppointment[];
31
+ orders: readonly CustomerOrder[];
32
+ credit: PortalCredit | null;
33
+ digitalProducts: DigitalProductsDataState;
34
+ }>;
35
+ export type PortalDataState = Readonly<{
36
+ tag: 'idle';
37
+ data: PortalData;
38
+ }> | Readonly<{
39
+ tag: 'initial-loading';
40
+ data: PortalData;
41
+ }> | Readonly<{
42
+ tag: 'failed-initial';
43
+ data: PortalData;
44
+ message: string;
45
+ }> | Readonly<{
46
+ tag: 'ready';
47
+ data: PortalData;
48
+ }> | Readonly<{
49
+ tag: 'refreshing';
50
+ data: PortalData;
51
+ }> | Readonly<{
52
+ tag: 'ready-with-error';
53
+ data: PortalData;
54
+ message: string;
55
+ }>;
56
+ export type PortalLoginStatus = Readonly<{
57
+ tag: 'editing';
58
+ }> | Readonly<{
59
+ tag: 'submitting';
60
+ }> | Readonly<{
61
+ tag: 'sent';
62
+ email: string;
63
+ }> | Readonly<{
64
+ tag: 'demo_link';
65
+ email: string;
66
+ url: string;
67
+ }> | Readonly<{
68
+ tag: 'demo_refused';
69
+ email: string;
70
+ message: string;
71
+ }>;
72
+ export type PortalLoginState = Readonly<{
73
+ email: string;
74
+ status: PortalLoginStatus;
75
+ feedback: FeedbackState<string>;
76
+ }>;
77
+ export type PortalDeepLinkState = Readonly<{
78
+ tag: 'idle';
79
+ }> | Readonly<{
80
+ tag: 'pending-order';
81
+ requestedTab: CustomerPortalTabId;
82
+ requestedOrderId: string;
83
+ }> | Readonly<{
84
+ tag: 'resolved-order';
85
+ resolution: 'matched' | 'missing';
86
+ }>;
87
+ export type CustomerPortalState = Readonly<{
88
+ session: AuthState;
89
+ data: PortalDataState;
90
+ login: PortalLoginState;
91
+ activeTab: CustomerPortalTabId;
92
+ postLoginBanner: FeedbackState<string>;
93
+ deepLink: PortalDeepLinkState;
94
+ }>;
95
+ export type CustomerPortalAction = Readonly<{
96
+ type: 'session-authenticated';
97
+ customer: CustomerProfile;
98
+ enabledModules: EnabledModules;
99
+ }> | Readonly<{
100
+ type: 'session-unauthenticated';
101
+ }> | Readonly<{
102
+ type: 'customer-updated';
103
+ customer: CustomerProfile;
104
+ }> | Readonly<{
105
+ type: 'portal-data-loading';
106
+ }> | Readonly<{
107
+ type: 'portal-data-loaded';
108
+ data: PortalData;
109
+ }> | Readonly<{
110
+ type: 'portal-data-failed';
111
+ message: string;
112
+ }> | Readonly<{
113
+ type: 'event-guests-updated';
114
+ registrationId: string;
115
+ guests: readonly EventGuest[];
116
+ }> | Readonly<{
117
+ type: 'login-email-updated';
118
+ email: string;
119
+ }> | Readonly<{
120
+ type: 'login-started';
121
+ }> | Readonly<{
122
+ type: 'login-succeeded';
123
+ email: string;
124
+ }> | Readonly<{
125
+ type: 'login-demo-link';
126
+ email: string;
127
+ url: string;
128
+ }> | Readonly<{
129
+ type: 'login-demo-refused';
130
+ email: string;
131
+ message: string;
132
+ }> | Readonly<{
133
+ type: 'login-failed';
134
+ message: string;
135
+ }> | Readonly<{
136
+ type: 'login-reset';
137
+ }> | Readonly<{
138
+ type: 'post-login-banner-shown';
139
+ message: string;
140
+ }> | Readonly<{
141
+ type: 'post-login-banner-hidden';
142
+ }> | Readonly<{
143
+ type: 'active-tab-changed';
144
+ tab: CustomerPortalTabId;
145
+ }> | Readonly<{
146
+ type: 'active-tab-ensured';
147
+ tabs: readonly CustomerPortalTab[];
148
+ }> | Readonly<{
149
+ type: 'requested-order-resolved';
150
+ resolution: 'matched' | 'missing';
151
+ }>;
152
+ export type LoginAction = Extract<CustomerPortalAction, Readonly<{
153
+ type: 'login-email-updated';
154
+ }> | Readonly<{
155
+ type: 'login-started';
156
+ }> | Readonly<{
157
+ type: 'login-succeeded';
158
+ }> | Readonly<{
159
+ type: 'login-demo-link';
160
+ }> | Readonly<{
161
+ type: 'login-demo-refused';
162
+ }> | Readonly<{
163
+ type: 'login-failed';
164
+ }> | Readonly<{
165
+ type: 'login-reset';
166
+ }>>;
167
+ export declare const DEFAULT_DIGITAL_PRODUCTS_TAB_LABEL = "Digital Products";
168
+ export declare function createLoadedDigitalProductsState(products?: readonly PortalDigitalProduct[], tabLabel?: string): DigitalProductsDataState;
169
+ export declare function createInitialPortalData(): PortalData;
170
+ export declare function createInitialCustomerPortalState(activeTab: CustomerPortalTabId, deepLink?: Readonly<{
171
+ requestedTab: CustomerPortalTabId | null;
172
+ requestedOrderId: string | null;
173
+ }>, options?: Readonly<{
174
+ hasPortalToken: boolean;
175
+ }>): CustomerPortalState;
176
+ export declare function customerPortalReducer(state: CustomerPortalState, action: CustomerPortalAction): CustomerPortalState;
177
+ export declare function reducePortalLoginState(state: PortalLoginState, action: LoginAction): PortalLoginState;
178
+ export declare function selectIsCheckingPortalSession(state: CustomerPortalState): boolean;
179
+ export declare function selectIsUnauthenticatedPortalSession(state: CustomerPortalState): boolean;
180
+ export declare function selectAuthenticatedPortalSession(state: CustomerPortalState): Extract<AuthState, Readonly<{
181
+ tag: 'authenticated';
182
+ }>> | null;
183
+ export declare function selectIsPortalDataLoading(state: CustomerPortalState): boolean;
184
+ export declare function selectPortalDataError(state: CustomerPortalState): string | null;
185
+ export declare function selectPortalData(state: CustomerPortalState): PortalData;
186
+ export declare function selectHasLoadedPortalData(state: CustomerPortalState): boolean;
187
+ export declare function selectPortalLoginEmail(state: CustomerPortalState): string;
188
+ export declare function selectIsPortalLoginSubmitting(state: CustomerPortalState): boolean;
189
+ export declare function selectPortalLoginError(state: CustomerPortalState): string | null;
190
+ export declare function selectPortalSubmittedLoginEmail(state: CustomerPortalState): string | null;
191
+ export declare function selectShowPortalLoginSuccess(state: CustomerPortalState): boolean;
192
+ export declare function selectShowPortalPostLoginBanner(state: CustomerPortalState): boolean;
193
+ export declare function selectPortalPostLoginBannerMessage(state: CustomerPortalState): string;
194
+ export declare function selectPortalActiveTab(state: CustomerPortalState): CustomerPortalTabId;
195
+ export declare function selectRequestedPortalOrderId(state: CustomerPortalState): string | null;
196
+ export declare function createInitialPortalLoginState(): PortalLoginState;
@@ -0,0 +1,17 @@
1
+ import type { PortalDataState } from './state';
2
+ export type CustomerPortalTabId = 'events' | 'orders' | 'digital-products' | 'passes-memberships' | 'appointments' | 'credit' | 'profile';
3
+ export type CustomerPortalTab = Readonly<{
4
+ id: CustomerPortalTabId;
5
+ label: string;
6
+ }>;
7
+ export declare function resolveInitialCustomerPortalTab(options: Readonly<{
8
+ showEvents: boolean;
9
+ showWholeSeries: boolean;
10
+ showPasses: boolean;
11
+ showMemberships: boolean;
12
+ showOrders: boolean;
13
+ showAppointments: boolean;
14
+ showProfile: boolean;
15
+ }>): CustomerPortalTabId;
16
+ export declare function resolveCustomerPortalActiveTab(currentTab: CustomerPortalTabId, tabs: readonly CustomerPortalTab[], data: PortalDataState): CustomerPortalTabId | null;
17
+ export declare function isCustomerPortalTabId(value: string): value is CustomerPortalTabId;
@@ -1,3 +1,16 @@
1
1
  export declare function safeDate(dateString: string | null | undefined): Date | null;
2
2
  export declare function formatDate(dateString: string | null | undefined): string;
3
3
  export declare function formatDateTime(dateString: string | null | undefined): string;
4
+ /**
5
+ * Format relative time (e.g., "in 3 days", "2 hours ago")
6
+ */
7
+ export declare function formatRelativeTime(dateStr: string | null | undefined): string;
8
+ /**
9
+ * Check if a date is in the past
10
+ */
11
+ export declare function isPast(dateStr: string | null | undefined): boolean;
12
+ /**
13
+ * Check if a date is in the future
14
+ */
15
+ export declare function isFuture(dateStr: string | null | undefined): boolean;
16
+ export declare function formatWaitlistDateTime(value: string, timeZone?: string): string;
@@ -5,7 +5,7 @@
5
5
  * route. Status values use British spelling ('cancelled') to match the backend.
6
6
  */
7
7
  import type { BookingFlexibleBalanceContractStatus, OrderInstalmentSummary, OrderInstalmentSummaryRow, OrderInstalmentPlanStatus, OrderInstalmentStatus } from '../../../core/src/index';
8
- export { formatDate, formatDateTime } from './dateFormatting';
8
+ export { formatDate, formatDateTime, formatRelativeTime, isPast, isFuture } from './dateFormatting';
9
9
  type JsonPrimitive = string | number | boolean | null;
10
10
  type JsonValue = JsonPrimitive | JsonValue[] | {
11
11
  [key: string]: JsonValue | undefined;
@@ -111,7 +111,7 @@ export interface CustomerEventRegistration {
111
111
  ticketingEnabled: boolean;
112
112
  ticketUrl?: string;
113
113
  }
114
- export type { CustomerPortalWaitlistEntry, CustomerPortalWaitlistSubject } from './waitlist-types';
114
+ export type { CustomerPortalWaitlistEntry, CustomerPortalWaitlistSubject, } from './waitlist-types';
115
115
  /** Guest details for event registration. */ export interface EventGuest {
116
116
  id: string;
117
117
  name: string;
@@ -440,17 +440,10 @@ export declare function getDigitalProductAccessBadgeVariant(status: PortalDigita
440
440
  export declare function digitalProductModeLabel(mode: PortalDigitalProduct['fulfillmentMode']): string;
441
441
  export declare function summarizeCustomerOrderFilters(orders: readonly CustomerOrder[]): CustomerOrderFilterSummary;
442
442
  export declare function getEventSeriesRegistrationBadgeVariant(status: CustomerEventSeriesRegistration['status']): BadgeVariant;
443
- /**
444
- * Format relative time (e.g., "in 3 days", "2 hours ago")
445
- */
446
- export declare function formatRelativeTime(dateStr: string | null | undefined): string;
447
- /**
448
- * Check if a date is in the past
449
- */
450
- export declare function isPast(dateStr: string | null | undefined): boolean;
451
- /**
452
- * Check if a date is in the future
453
- */
454
- export declare function isFuture(dateStr: string | null | undefined): boolean;
455
443
  export declare function formatCurrencyCents(amountCents: number, currency: string): string;
456
444
  export declare function formatCreditTransactionType(type: string): string;
445
+ export declare function isUnavailableBeforeYouComeTask(task: PortalBeforeYouComeTask): task is UnavailableBeforeYouComeTask;
446
+ export type CustomerEventSession = CustomerEventSeriesRegistration['sessions'][number];
447
+ export type UnavailableBeforeYouComeTask = Extract<PortalBeforeYouComeTask, {
448
+ kind: 'unavailable';
449
+ }>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ export { eventAutoApplyDiscountPreviewSchema, type EventAutoApplyDiscountPreview } from '../../contracts/events';
2
2
  import type { SystemBlockDefinition } from '../registry';
3
3
  import type { SectionStylesContent } from '../fields/boxStyles';
4
4
  /**
@@ -144,28 +144,4 @@ export type EventDetailsContent = {
144
144
  showAcceptedMemberships?: boolean | null;
145
145
  _sectionStyles?: SectionStylesContent;
146
146
  };
147
- type EventAutoApplyDiscountPreviewBase = {
148
- id: string;
149
- publicLabel: string;
150
- description: string | null;
151
- minTicketsRequired: number | null;
152
- };
153
- /**
154
- * Local structural equivalent of `EventAutoApplyDiscountPreview` from
155
- * `@riverbankcms/api`. `@riverbankcms/blocks` deliberately does not depend on
156
- * the api package — see `system/blocks/shared/teamMembers.ts` for the rationale.
157
- * Keep this type in sync with the api-side definition; the guardrail lives in
158
- * `@riverbankcms/api/src/eventAutoApplyDiscountPreview.typetest.ts`.
159
- */
160
- export type EventAutoApplyDiscountPreview = (EventAutoApplyDiscountPreviewBase & {
161
- discountType: 'percent';
162
- discountPercent: number;
163
- discountAmountCents: null;
164
- }) | (EventAutoApplyDiscountPreviewBase & {
165
- discountType: 'fixed';
166
- discountPercent: null;
167
- discountAmountCents: number;
168
- });
169
- export declare const eventAutoApplyDiscountPreviewSchema: z.ZodType<EventAutoApplyDiscountPreview>;
170
147
  export declare const eventDetailsBlockDefinition: SystemBlockDefinition<EventDetailsContent>;
171
- export {};