@riverbankcms/sdk 0.88.0 → 0.90.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 (198) hide show
  1. package/README.md +27 -4
  2. package/dist/{PreviewEditorSidebar-EVRS3C7T.mjs → PreviewEditorSidebar-KVXNF3VW.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-54WD4IGE.mjs → PreviewEditorUI-J3JN5Z7T.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
  6. package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
  7. package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
  8. package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
  9. package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
  10. package/dist/_dts/api/src/bookings.d.ts +3 -1
  11. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  12. package/dist/_dts/api/src/index.d.ts +7 -6
  13. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -5
  14. package/dist/_dts/api/src/request.d.ts +21 -0
  15. package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
  16. package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
  17. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
  18. package/dist/_dts/api/src/siteMembers.d.ts +6 -1
  19. package/dist/_dts/api/src/types.d.ts +4 -2
  20. package/dist/_dts/api/src/url.d.ts +6 -3
  21. package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
  22. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
  25. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
  26. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
  27. package/dist/_dts/blocks/src/index.d.ts +2 -1
  28. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -4
  30. package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
  31. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
  32. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
  33. package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
  34. package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
  35. package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
  36. package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
  37. package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
  38. package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
  39. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
  40. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
  41. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +18 -5
  42. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
  43. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  44. package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
  45. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
  46. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
  47. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
  48. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
  49. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
  50. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
  51. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
  52. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
  53. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
  54. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
  57. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
  58. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -1
  59. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
  62. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
  63. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
  64. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
  65. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  66. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +11 -1
  67. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
  68. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
  69. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
  70. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
  71. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
  72. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
  73. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
  74. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
  75. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
  76. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
  77. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  78. package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
  79. package/dist/_dts/content-model/src/entry-slots/types.d.ts +61 -0
  80. package/dist/_dts/core/src/branded.d.ts +7 -0
  81. package/dist/_dts/core/src/index.d.ts +1 -0
  82. package/dist/_dts/core/src/money-input.d.ts +18 -0
  83. package/dist/_dts/core/src/site-route-target.d.ts +40 -0
  84. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +209 -2
  85. package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
  86. package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
  87. package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
  88. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  89. package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
  90. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
  91. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
  92. package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
  93. package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
  94. package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
  95. package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
  96. package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
  97. package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
  98. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
  99. package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
  100. package/dist/_dts/sdk/src/client/types.d.ts +26 -1
  101. package/dist/_dts/sdk/src/components.d.ts +1 -0
  102. package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
  103. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
  104. package/dist/_dts/sdk/src/index.d.ts +3 -1
  105. package/dist/_dts/sdk/src/next/types.d.ts +8 -11
  106. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
  107. package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
  108. package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
  109. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
  110. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
  111. package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
  112. package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
  113. package/dist/_dts/sdk/src/version.d.ts +1 -1
  114. package/dist/_dts/site-commands/src/commands.d.ts +18 -0
  115. package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
  116. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
  117. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
  118. package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
  119. package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
  120. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  121. package/dist/_dts/theme-core/src/index.d.ts +2 -0
  122. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
  123. package/dist/_dts/theme-core/src/schema.d.ts +18 -18
  124. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
  125. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  126. package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
  127. package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
  128. package/dist/{chunk-ER4UIW4X.mjs → chunk-AEOYWPE4.mjs} +91 -55
  129. package/dist/{chunk-O4LVYUVH.mjs → chunk-BOQXMCSP.mjs} +147 -101
  130. package/dist/{chunk-HVOBXA3Y.mjs → chunk-GSPFFUVB.mjs} +2 -2
  131. package/dist/{chunk-7KOO7RPP.mjs → chunk-PMBB6MQ7.mjs} +2273 -1113
  132. package/dist/{chunk-K3JWH6HE.mjs → chunk-RQ3XZ4SJ.mjs} +9 -1
  133. package/dist/{chunk-YDMBIIS5.mjs → chunk-UG7I7S7W.mjs} +1 -1
  134. package/dist/cli/index.mjs +1564 -546
  135. package/dist/cli/init-docs/content/cli-reference.md +6 -1
  136. package/dist/cli/init-docs/content/content-management.md +27 -0
  137. package/dist/client/{accordion-PT5CGW5N.mjs → accordion-GXQNWQ6O.mjs} +2 -2
  138. package/dist/client/{bookingForm-2HLRTEYS.mjs → bookingForm-STLUJ36H.mjs} +206 -335
  139. package/dist/client/bookings.mjs +821 -413
  140. package/dist/client/{carousel-Z2LKYSWA.mjs → carousel-CVRN6EPP.mjs} +4 -3
  141. package/dist/client/{cart-ND5IK4A6.mjs → cart-IYIBA5CL.mjs} +8 -8
  142. package/dist/client/{checkout-EYUSGAY7.mjs → checkout-O3BGM4GS.mjs} +8 -8
  143. package/dist/client/chunk-4RTFGHZN.mjs +433 -0
  144. package/dist/client/{chunk-DIRW2LNG.mjs → chunk-6DPXDOIL.mjs} +336 -225
  145. package/dist/client/chunk-6N7YRNYU.mjs +183 -0
  146. package/dist/client/{chunk-O5JNI3E4.mjs → chunk-7DH35FGA.mjs} +2 -2
  147. package/dist/client/{chunk-S4G65LGR.mjs → chunk-D3ETC2SU.mjs} +1 -1
  148. package/dist/client/{chunk-BAWHZ5GM.mjs → chunk-DAS5CIER.mjs} +460 -157
  149. package/dist/client/{chunk-6DVPO44G.mjs → chunk-FHU6PFPM.mjs} +1 -1
  150. package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
  151. package/dist/client/{chunk-BL66UWGD.mjs → chunk-MFPKS6QS.mjs} +13 -16
  152. package/dist/client/{chunk-X7GVFB7Y.mjs → chunk-NBFRJ5NB.mjs} +157 -5
  153. package/dist/client/{chunk-WCVK4MBJ.mjs → chunk-VFHZLZAC.mjs} +1 -1
  154. package/dist/client/{chunk-GOFO7HRH.mjs → chunk-WHZQDPBZ.mjs} +19 -1
  155. package/dist/client/{chunk-MHBEWDT7.mjs → chunk-Z62JYS5O.mjs} +122 -50
  156. package/dist/client/client.mjs +5979 -5198
  157. package/dist/client/{courseRegistration-H3AZBUEG.mjs → courseRegistration-2D3ACMJR.mjs} +20 -58
  158. package/dist/client/{eventCalendar-FPKJGLGS.mjs → eventCalendar-QY4UZUFF.mjs} +11 -11
  159. package/dist/client/{eventCombined-QCGIZBUY.mjs → eventCombined-RRCDKJC2.mjs} +11 -11
  160. package/dist/client/{eventDetails-HIT3BJWU.mjs → eventDetails-YO335BUT.mjs} +11 -11
  161. package/dist/client/{eventListing-R4HNWJDN.mjs → eventListing-PXA6GFQ3.mjs} +11 -11
  162. package/dist/client/{eventRegistration-Q7BYY5HF.mjs → eventRegistration-2ZHEDDXO.mjs} +11 -11
  163. package/dist/client/{form-NI6YOG6S.mjs → form-ZS6KX4U2.mjs} +7 -7
  164. package/dist/client/{headerSection-SDYGII36.mjs → headerSection-QK5SLIIB.mjs} +3 -3
  165. package/dist/client/hooks.mjs +1102 -1029
  166. package/dist/client/{locationMap-BDETEUQD.mjs → locationMap-GFNIUD2X.mjs} +3 -3
  167. package/dist/client/{newsletterForm-EKYIU67X.mjs → newsletterForm-PGLTTCUG.mjs} +61 -25
  168. package/dist/client/{productDetail-5UTGNN76.mjs → productDetail-OPBE5ZPI.mjs} +8 -8
  169. package/dist/client/{productList-7YA5KXZQ.mjs → productList-NI72Q62Z.mjs} +8 -8
  170. package/dist/client/rendering/client.mjs +4390 -4245
  171. package/dist/client/rendering/islands.mjs +19 -19
  172. package/dist/client/rendering.mjs +3327 -3181
  173. package/dist/client/{shop-AIMUMZYC.mjs → shop-3ZQPEWYI.mjs} +8 -8
  174. package/dist/client/spam-protection.mjs +4 -5
  175. package/dist/preview-next/before-render.mjs +20 -2
  176. package/dist/preview-next/client/runtime.mjs +5 -5
  177. package/dist/preview-next/middleware.mjs +18 -0
  178. package/dist/{sdk-runtime-NW472WNT.mjs → sdk-runtime-FSHXCWDS.mjs} +6 -6
  179. package/dist/server/components.mjs +2580 -2783
  180. package/dist/server/config-validation.mjs +1334 -1261
  181. package/dist/server/config.mjs +1334 -1261
  182. package/dist/server/data.mjs +1102 -1029
  183. package/dist/server/index.mjs +1097 -476
  184. package/dist/server/navigation.mjs +20 -30
  185. package/dist/server/next.mjs +3282 -2847
  186. package/dist/server/page-converter.mjs +1009 -946
  187. package/dist/server/prebuild.mjs +1 -1
  188. package/dist/server/rendering/server.mjs +2580 -2783
  189. package/dist/server/rendering.mjs +2586 -2789
  190. package/dist/server/routing.mjs +1440 -1053
  191. package/dist/server/server.mjs +1886 -1153
  192. package/dist/server/theme-bridge.mjs +34 -5
  193. package/dist/styles/index.css +26 -0
  194. package/package.json +3 -2
  195. package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +0 -8
  196. package/dist/client/chunk-H4MHEXYS.mjs +0 -184
  197. package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
  198. /package/dist/client/{chunk-LI2C6M5O.mjs → chunk-25W2EQUN.mjs} +0 -0
@@ -341,6 +341,7 @@ export declare const runtimeBackedBlockServerEntries: {
341
341
  loadMoreText?: string;
342
342
  startOfWeek?: import("../..").WeekStart;
343
343
  calendarTabViews?: import("../..").CalendarTabViews;
344
+ defaultCalendarView?: import("../..").CalendarView;
344
345
  showFilters?: boolean | null;
345
346
  showCategoryFilter?: import("../..").FilterAutoShow;
346
347
  showVenueFilter?: boolean | null;
@@ -371,6 +372,7 @@ export declare const runtimeBackedBlockServerEntries: {
371
372
  paginationAction: import("../nodes/events/shared/listOptions").EventListPaginationAction;
372
373
  startOfWeek: import("../..").WeekStart;
373
374
  calendarTabViews: import("../..").CalendarTabViews;
375
+ defaultCalendarView: import("../..").CalendarView;
374
376
  showFilters: boolean;
375
377
  showCategoryFilter: import("../..").FilterAutoShow;
376
378
  showVenueFilter: boolean;
@@ -418,6 +420,7 @@ export declare const runtimeBackedBlockServerEntries: {
418
420
  loadMoreText?: string;
419
421
  startOfWeek?: import("../..").WeekStart;
420
422
  calendarTabViews?: import("../..").CalendarTabViews;
423
+ defaultCalendarView?: import("../..").CalendarView;
421
424
  showFilters?: boolean | null;
422
425
  showCategoryFilter?: import("../..").FilterAutoShow;
423
426
  showVenueFilter?: boolean | null;
@@ -454,6 +457,7 @@ export declare const runtimeBackedBlockServerEntries: {
454
457
  loadMoreText?: string;
455
458
  startOfWeek?: import("../..").WeekStart;
456
459
  calendarTabViews?: import("../..").CalendarTabViews;
460
+ defaultCalendarView?: import("../..").CalendarView;
457
461
  showFilters?: boolean | null;
458
462
  showCategoryFilter?: import("../..").FilterAutoShow;
459
463
  showVenueFilter?: boolean | null;
@@ -487,6 +491,7 @@ export declare const runtimeBackedBlockServerEntries: {
487
491
  paginationAction: import("../nodes/events/shared/listOptions").EventListPaginationAction;
488
492
  startOfWeek: import("../..").WeekStart;
489
493
  calendarTabViews: import("../..").CalendarTabViews;
494
+ defaultCalendarView: import("../..").CalendarView;
490
495
  showFilters: boolean;
491
496
  showCategoryFilter: import("../..").FilterAutoShow;
492
497
  showVenueFilter: boolean;
@@ -527,6 +532,7 @@ export declare const runtimeBackedBlockServerEntries: {
527
532
  paginationAction: import("../nodes/events/shared/listOptions").EventListPaginationAction;
528
533
  startOfWeek: import("../..").WeekStart;
529
534
  calendarTabViews: import("../..").CalendarTabViews;
535
+ defaultCalendarView: import("../..").CalendarView;
530
536
  showFilters: boolean;
531
537
  showCategoryFilter: import("../..").FilterAutoShow;
532
538
  showVenueFilter: boolean;
@@ -1191,6 +1197,12 @@ export declare const runtimeBackedBlockServerEntries: {
1191
1197
  spamProtectionEnabled?: boolean;
1192
1198
  stage?: "preview" | "published";
1193
1199
  supportEmail?: string;
1200
+ sitePasses?: Readonly<{
1201
+ passes: readonly import("../..").PublicPassProduct[];
1202
+ }> | null;
1203
+ siteMemberships?: Readonly<{
1204
+ memberships: readonly import("../..").PublicMembershipProduct[];
1205
+ }> | null;
1194
1206
  }>) => Readonly<{
1195
1207
  display: Readonly<{
1196
1208
  kind: "event-registration";
@@ -1229,6 +1241,12 @@ export declare const runtimeBackedBlockServerEntries: {
1229
1241
  spamProtectionEnabled?: boolean;
1230
1242
  stage?: "preview" | "published";
1231
1243
  supportEmail?: string;
1244
+ sitePasses?: Readonly<{
1245
+ passes: readonly import("../..").PublicPassProduct[];
1246
+ }> | null;
1247
+ siteMemberships?: Readonly<{
1248
+ memberships: readonly import("../..").PublicMembershipProduct[];
1249
+ }> | null;
1232
1250
  }>) => unknown;
1233
1251
  decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
1234
1252
  siteId?: string;
@@ -1254,6 +1272,12 @@ export declare const runtimeBackedBlockServerEntries: {
1254
1272
  spamProtectionEnabled?: boolean;
1255
1273
  stage?: "preview" | "published";
1256
1274
  supportEmail?: string;
1275
+ sitePasses?: Readonly<{
1276
+ passes: readonly import("../..").PublicPassProduct[];
1277
+ }> | null;
1278
+ siteMemberships?: Readonly<{
1279
+ memberships: readonly import("../..").PublicMembershipProduct[];
1280
+ }> | null;
1257
1281
  }>>;
1258
1282
  }>;
1259
1283
  render: Readonly<{
@@ -0,0 +1 @@
1
+ export declare function toError(error: unknown, fallbackMessage: string): Error;
@@ -15,7 +15,7 @@ export type UseAvailableDatesOptions = {
15
15
  initialDays?: number;
16
16
  };
17
17
  export type UseAvailableDatesResult = {
18
- availableDates: Set<string>;
18
+ availableDates: ReadonlySet<string>;
19
19
  isLoading: boolean;
20
20
  isRefreshing: boolean;
21
21
  error: string | null;
@@ -0,0 +1,55 @@
1
+ export type AvailableDatesLoadedRange = {
2
+ start: string;
3
+ end: string;
4
+ };
5
+ export type AvailableDatesData = {
6
+ availableDates: ReadonlySet<string>;
7
+ hasMore: boolean;
8
+ loadedRange: AvailableDatesLoadedRange | null;
9
+ nextStartDate: string | null;
10
+ };
11
+ export type AvailableDatesState = {
12
+ tag: "idle";
13
+ data: AvailableDatesData;
14
+ } | {
15
+ tag: "loading";
16
+ data: AvailableDatesData;
17
+ } | {
18
+ tag: "loaded";
19
+ data: AvailableDatesData;
20
+ } | {
21
+ tag: "refreshing";
22
+ data: AvailableDatesData;
23
+ } | {
24
+ tag: "error";
25
+ data: AvailableDatesData;
26
+ message: string;
27
+ };
28
+ export type AvailableDatesAction = {
29
+ type: "query-cleared";
30
+ } | {
31
+ type: "load-started";
32
+ } | {
33
+ type: "refresh-started";
34
+ } | {
35
+ type: "load-succeeded";
36
+ dates: readonly string[];
37
+ hasMore: boolean;
38
+ nextStartDate: string | null;
39
+ startDate: string;
40
+ endDate: string;
41
+ append: boolean;
42
+ } | {
43
+ type: "load-failed";
44
+ message: string;
45
+ };
46
+ export declare function createInitialAvailableDatesState(): AvailableDatesState;
47
+ export declare const initialAvailableDatesState: AvailableDatesState;
48
+ export declare function getAvailableDates(state: AvailableDatesState): ReadonlySet<string>;
49
+ export declare function getAvailableDatesLoadedRange(state: AvailableDatesState): AvailableDatesLoadedRange | null;
50
+ export declare function getAvailableDatesNextStartDate(state: AvailableDatesState): string | null;
51
+ export declare function hasMoreAvailableDates(state: AvailableDatesState): boolean;
52
+ export declare function isLoadingAvailableDates(state: AvailableDatesState): boolean;
53
+ export declare function isRefreshingAvailableDates(state: AvailableDatesState): boolean;
54
+ export declare function getAvailableDatesError(state: AvailableDatesState): string | null;
55
+ export declare function availableDatesReducer(state: AvailableDatesState, action: AvailableDatesAction): AvailableDatesState;
@@ -0,0 +1,39 @@
1
+ import type { TimeSlot } from "../api";
2
+ export type AvailableSlotsState = {
3
+ tag: "idle";
4
+ } | {
5
+ tag: "loading";
6
+ hasLoaded: boolean;
7
+ } | {
8
+ tag: "loaded";
9
+ slots: TimeSlot[];
10
+ } | {
11
+ tag: "refreshing";
12
+ slots: TimeSlot[];
13
+ hasLoaded: boolean;
14
+ } | {
15
+ tag: "error";
16
+ slots: TimeSlot[];
17
+ hasLoaded: boolean;
18
+ message: string;
19
+ };
20
+ export type AvailableSlotsAction = {
21
+ type: "query-cleared";
22
+ } | {
23
+ type: "load-started";
24
+ } | {
25
+ type: "refresh-started";
26
+ } | {
27
+ type: "load-succeeded";
28
+ slots: TimeSlot[];
29
+ } | {
30
+ type: "load-failed";
31
+ message: string;
32
+ };
33
+ export declare const initialAvailableSlotsState: AvailableSlotsState;
34
+ export declare function getAvailableSlots(state: AvailableSlotsState): TimeSlot[];
35
+ export declare function hasLoadedAvailableSlots(state: AvailableSlotsState): boolean;
36
+ export declare function isLoadingAvailableSlots(state: AvailableSlotsState): boolean;
37
+ export declare function isRefreshingAvailableSlots(state: AvailableSlotsState): boolean;
38
+ export declare function getAvailableSlotsError(state: AvailableSlotsState): string | null;
39
+ export declare function availableSlotsReducer(state: AvailableSlotsState, action: AvailableSlotsAction): AvailableSlotsState;
@@ -4,34 +4,12 @@
4
4
  * Uses the Block API Client for type-safe API calls.
5
5
  * Must be used within a BlockApiProvider.
6
6
  */
7
- import type { FormField } from '../components/multi-step/DynamicFormFields';
8
- export interface Service {
9
- id: string;
10
- title: string;
11
- description?: string;
12
- durationMinutes?: number;
13
- paymentTerms?: import("../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
14
- }
15
- export interface BookingFormConfig {
16
- id: string;
17
- name: string;
18
- slug: string;
19
- settings?: {
20
- type: 'booking';
21
- serviceId?: string;
22
- serviceIds?: string[];
23
- resourceId?: string;
24
- requiresApproval?: boolean;
25
- successMessage?: string;
26
- };
27
- schema?: {
28
- version: string;
29
- fields: FormField[];
30
- };
31
- }
7
+ import { type BookingFormConfig, type BookingFormService } from '../nodes/booking-form.state';
8
+ export type Service = BookingFormService;
9
+ export type { BookingFormConfig };
32
10
  interface UseBookingFormConfigResult {
33
11
  formConfig: BookingFormConfig | null;
34
- services: Service[];
12
+ services: readonly Service[];
35
13
  isLoading: boolean;
36
14
  error: string | null;
37
15
  }
@@ -58,4 +36,3 @@ interface UseBookingFormConfigResult {
58
36
  * ```
59
37
  */
60
38
  export declare function useBookingFormConfig(siteId: string, formId: string): UseBookingFormConfigResult;
61
- export {};
@@ -0,0 +1,40 @@
1
+ import type { BookingFormConfig, BookingFormService as Service } from '../nodes/booking-form.state';
2
+ type BookingFormConfigSnapshot = Readonly<{
3
+ formConfig: BookingFormConfig | null;
4
+ services: readonly Service[];
5
+ }>;
6
+ export type BookingFormConfigState = Readonly<{
7
+ tag: 'loading';
8
+ previous: BookingFormConfigSnapshot;
9
+ }> | Readonly<{
10
+ tag: 'loaded';
11
+ formConfig: BookingFormConfig;
12
+ services: readonly Service[];
13
+ }> | Readonly<{
14
+ tag: 'error';
15
+ message: string;
16
+ previous: BookingFormConfigSnapshot;
17
+ }>;
18
+ export type BookingFormConfigAction = Readonly<{
19
+ type: 'load-started';
20
+ }> | Readonly<{
21
+ type: 'form-loaded';
22
+ formConfig: BookingFormConfig;
23
+ }> | Readonly<{
24
+ type: 'load-succeeded';
25
+ formConfig: BookingFormConfig;
26
+ services: readonly Service[];
27
+ }> | Readonly<{
28
+ type: 'services-load-failed';
29
+ message: string;
30
+ }> | Readonly<{
31
+ type: 'load-failed';
32
+ message: string;
33
+ }>;
34
+ export declare function createInitialBookingFormConfigState(): BookingFormConfigState;
35
+ export declare function bookingFormConfigReducer(state: BookingFormConfigState, action: BookingFormConfigAction): BookingFormConfigState;
36
+ export declare function selectBookingFormConfig(state: BookingFormConfigState): BookingFormConfig | null;
37
+ export declare function selectBookingFormServices(state: BookingFormConfigState): readonly Service[];
38
+ export declare function selectBookingFormConfigIsLoading(state: BookingFormConfigState): boolean;
39
+ export declare function selectBookingFormConfigError(state: BookingFormConfigState): string | null;
40
+ export {};
@@ -0,0 +1,20 @@
1
+ export type CalendarEventCacheLoadState = Readonly<{
2
+ kind: 'idle';
3
+ }> | Readonly<{
4
+ kind: 'loading';
5
+ }> | Readonly<{
6
+ kind: 'error';
7
+ error: Error;
8
+ }>;
9
+ export type CalendarEventCacheLoadAction = Readonly<{
10
+ type: 'started';
11
+ }> | Readonly<{
12
+ type: 'succeeded';
13
+ }> | Readonly<{
14
+ type: 'failed';
15
+ error: Error;
16
+ }>;
17
+ export declare function calendarEventCacheLoadReducer(_state: CalendarEventCacheLoadState, action: CalendarEventCacheLoadAction): CalendarEventCacheLoadState;
18
+ export declare function toCalendarEventCacheLoadError(error: unknown): Error;
19
+ export declare function isCalendarEventCacheLoading(state: CalendarEventCacheLoadState): boolean;
20
+ export declare function getCalendarEventCacheError(state: CalendarEventCacheLoadState): Error | null;
@@ -0,0 +1,31 @@
1
+ import type { EventFiltersResponse } from '../api/types';
2
+ export declare const EMPTY_EVENT_FILTERS: EventFiltersResponse;
3
+ export type EventFiltersLoadState = Readonly<{
4
+ kind: 'idle';
5
+ filters: EventFiltersResponse;
6
+ }> | Readonly<{
7
+ kind: 'loading';
8
+ filters: EventFiltersResponse;
9
+ }> | Readonly<{
10
+ kind: 'loaded';
11
+ filters: EventFiltersResponse;
12
+ }> | Readonly<{
13
+ kind: 'error';
14
+ filters: EventFiltersResponse;
15
+ error: Error;
16
+ }>;
17
+ export type EventFiltersLoadAction = Readonly<{
18
+ type: 'started';
19
+ }> | Readonly<{
20
+ type: 'succeeded';
21
+ filters: EventFiltersResponse;
22
+ }> | Readonly<{
23
+ type: 'failed';
24
+ error: Error;
25
+ }>;
26
+ export declare function createInitialEventFiltersLoadState(): EventFiltersLoadState;
27
+ export declare function eventFiltersLoadReducer(state: EventFiltersLoadState, action: EventFiltersLoadAction): EventFiltersLoadState;
28
+ export declare function toEventFiltersLoadError(error: unknown): Error;
29
+ export declare function getEventFiltersData(state: EventFiltersLoadState): EventFiltersResponse;
30
+ export declare function isEventFiltersLoading(state: EventFiltersLoadState): boolean;
31
+ export declare function getEventFiltersError(state: EventFiltersLoadState): Error | null;
@@ -21,9 +21,9 @@ type UseEventPaginationOptions = {
21
21
  /** Fetch stage (preview vs published) */
22
22
  stage?: 'preview' | 'published';
23
23
  };
24
- type EventPaginationState = {
24
+ type EventPaginationResult = {
25
25
  /** All loaded events */
26
- events: PublicEvent[];
26
+ events: readonly PublicEvent[];
27
27
  /** Whether a load operation is in progress */
28
28
  loading: boolean;
29
29
  /** Error from last load attempt */
@@ -49,5 +49,5 @@ type EventPaginationState = {
49
49
  * ```
50
50
  */
51
51
  export declare function useEventPagination({ siteId: _siteId, // Deprecated: siteId now comes from BlockApiProvider context
52
- initialEvents, fetchInitialOnMount, initialFilters, filters, pageSize, stage, }: UseEventPaginationOptions): EventPaginationState;
52
+ initialEvents, fetchInitialOnMount, initialFilters, filters, pageSize, stage, }: UseEventPaginationOptions): EventPaginationResult;
53
53
  export default useEventPagination;
@@ -0,0 +1,39 @@
1
+ import type { PublicEvent } from '../../blocks/events/shared/types';
2
+ export type EventPaginationLoadState = Readonly<{
3
+ kind: 'ready';
4
+ events: readonly PublicEvent[];
5
+ hasMore: boolean;
6
+ }> | Readonly<{
7
+ kind: 'loading';
8
+ events: readonly PublicEvent[];
9
+ hasMore: boolean;
10
+ }> | Readonly<{
11
+ kind: 'error';
12
+ events: readonly PublicEvent[];
13
+ hasMore: boolean;
14
+ error: Error;
15
+ }>;
16
+ export type EventPaginationLoadAction = Readonly<{
17
+ type: 'started';
18
+ reset: boolean;
19
+ }> | Readonly<{
20
+ type: 'succeeded';
21
+ events: readonly PublicEvent[];
22
+ hasMore: boolean;
23
+ }> | Readonly<{
24
+ type: 'failed';
25
+ error: Error;
26
+ }> | Readonly<{
27
+ type: 'synced';
28
+ events: readonly PublicEvent[];
29
+ pageSize: number;
30
+ }>;
31
+ export declare function createInitialEventPaginationLoadState(events: readonly PublicEvent[], pageSize: number): EventPaginationLoadState;
32
+ export declare function eventPaginationLoadReducer(state: EventPaginationLoadState, action: EventPaginationLoadAction): EventPaginationLoadState;
33
+ export declare function getEventIdentity(event: PublicEvent): string;
34
+ export declare function mergeEventPaginationEvents(existingEvents: readonly PublicEvent[], newEvents: readonly PublicEvent[]): readonly PublicEvent[];
35
+ export declare function toEventPaginationLoadError(error: unknown): Error;
36
+ export declare function getEventPaginationEvents(state: EventPaginationLoadState): readonly PublicEvent[];
37
+ export declare function isEventPaginationLoading(state: EventPaginationLoadState): boolean;
38
+ export declare function getEventPaginationError(state: EventPaginationLoadState): Error | null;
39
+ export declare function hasMoreEventPages(events: readonly PublicEvent[], pageSize: number): boolean;
@@ -44,9 +44,9 @@ export declare function useCourseRegistrationWizard(props: CourseRegistrationCli
44
44
  selectedMembershipId: string | null;
45
45
  setSelectedMembershipId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
46
46
  discountUiOpen: boolean;
47
- setDiscountUiOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
47
+ setDiscountUiOpen: (isOpen: boolean) => void;
48
48
  discountCode: string;
49
- setDiscountCode: import("react").Dispatch<import("react").SetStateAction<string>>;
49
+ setDiscountCode: (code: string) => void;
50
50
  discountsAvailable: boolean;
51
51
  manualCodeEntryAllowed: boolean;
52
52
  discountsAvailableLoading: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { PublicEvent } from '../../../blocks/events/shared/types';
2
- import type { PublicPassProduct, PublicMembershipProduct } from '../../../blocks/shop';
2
+ export { filterPassesForEvent, filterMembershipsForEvent, } from '../events/shared/eventProductEligibility';
3
3
  export type OccurrenceContextLike = {
4
4
  id: string;
5
5
  seriesId: string;
@@ -19,19 +19,3 @@ export declare function selectEventDetails(args: {
19
19
  nowIso: string;
20
20
  otherDatesLimit: string | number | null | undefined;
21
21
  }): EventDetailsSelection;
22
- /**
23
- * Filter site passes to only those that cover the selected event.
24
- *
25
- * @param sitePasses - Array of all site passes (may be null/undefined)
26
- * @param event - The selected event (may be null)
27
- * @returns Passes that cover the event based on category eligibility
28
- */
29
- export declare function filterPassesForEvent(sitePasses: PublicPassProduct[] | null | undefined, event: PublicEvent | null): PublicPassProduct[];
30
- /**
31
- * Filter site memberships to only those that cover the selected event.
32
- *
33
- * @param siteMemberships - Array of all site memberships (may be null/undefined)
34
- * @param event - The selected event (may be null)
35
- * @returns Memberships that cover the event based on category eligibility
36
- */
37
- export declare function filterMembershipsForEvent(siteMemberships: PublicMembershipProduct[] | null | undefined, event: PublicEvent | null): PublicMembershipProduct[];
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { EventAutoApplyDiscountPreview } from '../../blocks/event-details';
3
3
  import type { EventDetailsContentEntry, EventDetailsIslandProps } from '../../../contracts';
4
4
  import type { PublicEvent } from '../../blocks/events/shared/types';
5
- import type { PublicPassProduct, PublicMembershipProduct } from '../../blocks/shop';
5
+ import type { PublicMembershipProductCollection, PublicPassProductCollection } from '../../blocks/shop';
6
6
  import { type OccurrenceContextLike } from './event-details/logic';
7
7
  export type EventDetailsClientProps = Readonly<{
8
8
  occurrenceContext?: OccurrenceContextLike | null;
@@ -15,14 +15,10 @@ export type EventDetailsClientProps = Readonly<{
15
15
  showCost?: boolean;
16
16
  showAcceptedPasses?: boolean;
17
17
  showAcceptedMemberships?: boolean;
18
- /** Response from listPublicPasses API (wrapped in { passes: [...] }) */
19
- sitePasses?: {
20
- passes: PublicPassProduct[];
21
- } | null;
22
- /** Response from listPublicMemberships API (wrapped in { memberships: [...] }) */
23
- siteMemberships?: {
24
- memberships: PublicMembershipProduct[];
25
- } | null;
18
+ /** Response from listPublicPasses API. */
19
+ sitePasses?: PublicPassProductCollection | null;
20
+ /** Response from listPublicMemberships API. */
21
+ siteMemberships?: PublicMembershipProductCollection | null;
26
22
  /** Best auto-apply discount code to advertise under the price, if any */
27
23
  autoApplyDiscount?: EventAutoApplyDiscountPreview | null;
28
24
  className?: string | null;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { EventAutoApplyDiscountPreview } from '../../blocks/event-details';
3
3
  import type { PublicEvent } from '../../blocks/events/shared/types';
4
- import type { PublicPassProduct, PublicMembershipProduct } from '../../blocks/shop';
4
+ import type { PublicMembershipProductCollection, PublicPassProductCollection } from '../../blocks/shop';
5
5
  import { type OccurrenceContextLike } from './event-details/logic';
6
6
  type EventDetailsProps = {
7
7
  blockId?: string | null;
@@ -15,14 +15,10 @@ type EventDetailsProps = {
15
15
  showCost?: boolean;
16
16
  showAcceptedPasses?: boolean;
17
17
  showAcceptedMemberships?: boolean;
18
- /** Response from listPublicPasses API (wrapped in { passes: [...] }) */
19
- sitePasses?: {
20
- passes: PublicPassProduct[];
21
- } | null;
22
- /** Response from listPublicMemberships API (wrapped in { memberships: [...] }) */
23
- siteMemberships?: {
24
- memberships: PublicMembershipProduct[];
25
- } | null;
18
+ /** Response from listPublicPasses API. */
19
+ sitePasses?: PublicPassProductCollection | null;
20
+ /** Response from listPublicMemberships API. */
21
+ siteMemberships?: PublicMembershipProductCollection | null;
26
22
  /** Best auto-apply discount code to advertise under the price, if any */
27
23
  autoApplyDiscount?: EventAutoApplyDiscountPreview | null;
28
24
  className?: string | null;
@@ -1,4 +1,4 @@
1
- import type { PaymentMethod } from '../../api/types';
1
+ import type { DirectCheckoutCollectionOptionKind, PaymentMethod } from '../../api/types';
2
2
  import type { EventRegistrationContentEntry } from '../event-registration.interactive';
3
3
  import type { EligibilityData, FormData, Guest, GuestErrors, OccurrenceContext, PaymentSelection, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult } from './types';
4
4
  import type { SelectableEventTicketType } from './utils';
@@ -123,6 +123,7 @@ export type EventRegistrationPaymentSelection = Readonly<{
123
123
  method: 'free';
124
124
  }> | Readonly<{
125
125
  method: 'stripe';
126
+ collectionOptionKind?: DirectCheckoutCollectionOptionKind;
126
127
  }> | Readonly<{
127
128
  method: 'pass';
128
129
  passId: string;
@@ -0,0 +1,24 @@
1
+ import type { DirectCheckoutCollectionOptionKind } from '../../api/types';
2
+ import type { BlockBookingPaymentCollectionOption, BlockBookingPaymentTerms } from '../../../blocks/shared/bookingPaymentTerms';
3
+ import { type BookingPaymentOptionViewModel } from '../../shared/bookingPaymentOptions';
4
+ type SupportedEventDirectPaymentOption = Extract<BlockBookingPaymentCollectionOption, {
5
+ kind: 'upfront' | 'flexible_balance';
6
+ }>;
7
+ export type EventRegistrationDirectPaymentOption = Omit<BookingPaymentOptionViewModel, 'kind' | 'title'> & Readonly<{
8
+ kind: Extract<DirectCheckoutCollectionOptionKind, SupportedEventDirectPaymentOption['kind']>;
9
+ label: string;
10
+ }>;
11
+ export type EventRegistrationPaymentOptionsViewModel = Readonly<{
12
+ mode: 'single_option' | 'choice_required';
13
+ sectionTitle: string;
14
+ options: readonly EventRegistrationDirectPaymentOption[];
15
+ }>;
16
+ export declare function buildEventRegistrationPaymentOptionsViewModel(input: Readonly<{
17
+ eventTitle: string;
18
+ paymentTerms?: BlockBookingPaymentTerms | null;
19
+ totalPriceCents: number;
20
+ currency: string;
21
+ startsAt?: string | null;
22
+ locale?: string;
23
+ }>): EventRegistrationPaymentOptionsViewModel;
24
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type { PublicEvent, PublicEventTicketType, PublicEventTicketTypeAvailability } from '../../../blocks/events/shared/types';
2
2
  import type { OccurrenceContext } from '../../../blocks/event-registration.shared';
3
+ import type { PublicMembershipProductCollection, PublicPassProductCollection } from '../../../blocks/shop.shared';
3
4
  import type { AvailablePass, AvailableMembership, DirectCheckoutCollectionOptionKind, EligibilityEventTicketType } from '../../api/types';
4
5
  export type { PublicEvent, OccurrenceContext };
5
6
  export type { FormData } from '../../shared';
@@ -169,4 +170,8 @@ export type EventRegistrationClientProps = {
169
170
  stage?: 'preview' | 'published';
170
171
  /** Support email to display on timeout step */
171
172
  supportEmail?: string;
173
+ /** Site-wide public pass products; filtered against the selected event before prompting. */
174
+ sitePasses?: PublicPassProductCollection | null;
175
+ /** Site-wide public membership products; filtered against the selected event before prompting. */
176
+ siteMemberships?: PublicMembershipProductCollection | null;
172
177
  };
@@ -1,16 +1,16 @@
1
1
  import type { BlockApiClient } from '../../api';
2
- import type { AutoAppliedDiscountPreview, DiscountContext } from '../../api/types';
2
+ import { type DiscountContext } from '../../api/types';
3
3
  export declare function useDiscountCodeUi(options: {
4
4
  api: BlockApiClient;
5
5
  discountContext: DiscountContext | null;
6
6
  subtotalCents?: number;
7
7
  }): {
8
8
  discountUiOpen: boolean;
9
- setDiscountUiOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
9
+ setDiscountUiOpen: (isOpen: boolean) => void;
10
10
  discountCode: string;
11
- setDiscountCode: import("react").Dispatch<import("react").SetStateAction<string>>;
11
+ setDiscountCode: (code: string) => void;
12
12
  discountsAvailable: boolean;
13
13
  manualCodeEntryAllowed: boolean;
14
- autoAppliedDiscount: AutoAppliedDiscountPreview | null;
14
+ autoAppliedDiscount: import("../../api/types").AutoAppliedDiscountPreview | null;
15
15
  discountsAvailableLoading: boolean;
16
16
  };
@@ -0,0 +1,50 @@
1
+ import { type AutoAppliedDiscountPreview, type DiscountContext, type DiscountsAvailableRequest, type DiscountsAvailableResponse } from '../../api/types';
2
+ export type DiscountAvailabilityRequestPlan = Readonly<{
3
+ ok: false;
4
+ key: 'disabled';
5
+ }> | Readonly<{
6
+ ok: true;
7
+ key: string;
8
+ request: Omit<DiscountsAvailableRequest, 'siteId'>;
9
+ }>;
10
+ type DiscountAvailabilityState = Readonly<{
11
+ tag: 'disabled';
12
+ }> | Readonly<{
13
+ tag: 'loading';
14
+ }> | Readonly<{
15
+ tag: 'unavailable';
16
+ }> | Readonly<{
17
+ tag: 'available';
18
+ manualCodeEntryAllowed: boolean;
19
+ autoAppliedDiscount: AutoAppliedDiscountPreview | null;
20
+ }> | Readonly<{
21
+ tag: 'error';
22
+ }>;
23
+ export type DiscountCodeUiState = Readonly<{
24
+ discountUiOpen: boolean;
25
+ discountCode: string;
26
+ availability: DiscountAvailabilityState;
27
+ }>;
28
+ export type DiscountCodeUiEvent = Readonly<{
29
+ type: 'availability-disabled';
30
+ }> | Readonly<{
31
+ type: 'availability-loading';
32
+ }> | Readonly<{
33
+ type: 'availability-loaded';
34
+ response: DiscountsAvailableResponse;
35
+ }> | Readonly<{
36
+ type: 'availability-failed';
37
+ }> | Readonly<{
38
+ type: 'discount-code-changed';
39
+ code: string;
40
+ }> | Readonly<{
41
+ type: 'discount-ui-open-changed';
42
+ isOpen: boolean;
43
+ }>;
44
+ export declare const initialDiscountCodeUiState: DiscountCodeUiState;
45
+ export declare function buildDiscountAvailabilityRequestPlan(options: {
46
+ discountContext: DiscountContext | null;
47
+ subtotalCents?: number;
48
+ }): DiscountAvailabilityRequestPlan;
49
+ export declare function discountCodeUiReducer(state: DiscountCodeUiState, event: DiscountCodeUiEvent): DiscountCodeUiState;
50
+ export {};
@@ -88,9 +88,9 @@ export declare function useEventRegistrationWizard(options: {
88
88
  hasMembershipEligibility: boolean;
89
89
  requireGuestDetails: boolean;
90
90
  discountCode: string;
91
- setDiscountCode: import("react").Dispatch<import("react").SetStateAction<string>>;
91
+ setDiscountCode: (code: string) => void;
92
92
  discountUiOpen: boolean;
93
- setDiscountUiOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
93
+ setDiscountUiOpen: (isOpen: boolean) => void;
94
94
  discountsAvailable: boolean;
95
95
  manualCodeEntryAllowed: boolean;
96
96
  autoAppliedDiscount: import("../../api/types").AutoAppliedDiscountPreview | null;