@riverbankcms/sdk 0.149.0 → 0.150.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 (165) hide show
  1. package/dist/EventEmbeddedCheckoutStep-D00Kc8Zj.mjs +285 -0
  2. package/dist/{PreviewEditorSidebar-DBKln68M.mjs → PreviewEditorSidebar-7ZhmmnBB.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-DpRX4Mum.mjs → PreviewEditorUI-BIJucTRd.mjs} +2 -2
  4. package/dist/{SdkPreviewModeRuntime-DJPmPY-r.mjs → SdkPreviewModeRuntime-tj45gmCX.mjs} +4 -3
  5. package/dist/{SiteChromeCustomizeContext-JYA0cJ_Z.mjs → SiteChromeCustomizeContext-BFOt0ss-.mjs} +4454 -4059
  6. package/dist/_dts/ai/src/contracts/proposals.d.ts +660 -0
  7. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +510 -0
  8. package/dist/_dts/api/src/billing.d.ts +2 -2
  9. package/dist/_dts/api/src/contentRuntime.d.ts +5 -1
  10. package/dist/_dts/api/src/footerCompositionContracts.d.ts +9 -0
  11. package/dist/_dts/api/src/footerSettings.d.ts +3 -3
  12. package/dist/_dts/api/src/index.d.ts +1 -1
  13. package/dist/_dts/api/src/navigation/bookingPortalLink.d.ts +13 -0
  14. package/dist/_dts/api/src/navigation.d.ts +1 -0
  15. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +9 -173
  16. package/dist/_dts/api/src/sdkThemeWire.d.ts +12 -0
  17. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
  18. package/dist/_dts/api/src/siteSettings.d.ts +2 -0
  19. package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -1
  20. package/dist/_dts/blocks/src/client.d.ts +2 -1
  21. package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
  22. package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +30 -3
  23. package/dist/_dts/blocks/src/system/designCapabilities.d.ts +10 -1
  24. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  25. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +38 -18
  26. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +1 -1
  27. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +6 -0
  28. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.d.ts +13 -0
  29. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.d.ts +15 -0
  30. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +0 -1
  31. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/FullyBookedStep.d.ts +6 -0
  32. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.d.ts +3 -0
  33. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
  34. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +15 -5
  35. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +4 -2
  36. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentLocation.d.ts +3 -0
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentResponse.d.ts +72 -0
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +66 -5
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -4
  40. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +13 -5
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +11 -52
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +19 -2
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +7 -42
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +7 -8
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +90 -24
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useGuestRegistrationRecovery.d.ts +30 -0
  47. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +24 -12
  48. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useRegistrationAdmission.d.ts +18 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/wizardSteps.d.ts +6 -1
  50. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +1 -1
  51. package/dist/_dts/blocks/src/system/runtime/shared/stripe/browserStripe.d.ts +8 -0
  52. package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +8 -0
  53. package/dist/_dts/commerce/src/purchase/checkoutCopy.d.ts +10 -0
  54. package/dist/_dts/commerce/src/purchase/checkoutPresentation.d.ts +49 -0
  55. package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +4 -4
  56. package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +5 -1
  57. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +9 -0
  58. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
  59. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +1 -0
  60. package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +9 -2
  61. package/dist/_dts/commerce/src/purchase/types.d.ts +5 -6
  62. package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +3 -2
  63. package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +6 -1
  64. package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +7 -0
  65. package/dist/_dts/core/src/index.d.ts +1 -0
  66. package/dist/_dts/core/src/patch/index.d.ts +30 -0
  67. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +30 -1
  68. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -1
  69. package/dist/_dts/sdk/src/bookings/types.d.ts +1 -1
  70. package/dist/_dts/sdk/src/version.d.ts +1 -1
  71. package/dist/_dts/theme-core/src/blocks/index.d.ts +1 -0
  72. package/dist/_dts/theme-core/src/blocks/opaquePanels.d.ts +147 -0
  73. package/dist/_dts/theme-core/src/boxBackgroundSchema.d.ts +22 -0
  74. package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +22 -0
  75. package/dist/_dts/theme-core/src/cards/roles.d.ts +12 -0
  76. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  77. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +198 -0
  78. package/dist/_dts/theme-core/src/palette/utils/index.d.ts +2 -0
  79. package/dist/_dts/theme-core/src/palette/utils/scrimContrast.d.ts +22 -0
  80. package/dist/_dts/theme-core/src/runtime/bridgeColourTokens.d.ts +10 -0
  81. package/dist/_dts/theme-core/src/schema.d.ts +330 -0
  82. package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +0 -51
  83. package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +0 -51
  84. package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +11 -0
  85. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +7 -1
  86. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +7 -1
  87. package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +12 -6
  88. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +7 -4
  89. package/dist/_dts/theme-core/src/site-styles/sectionSurfaceBackgrounds.d.ts +65 -0
  90. package/dist/_dts/theme-core/src/site-styles/types.d.ts +17 -0
  91. package/dist/_dts/theme-core/src/surfaces/opaqueSurface.d.ts +43 -0
  92. package/dist/client/{BookingMailingListNote-Cr3EeTP5.mjs → BookingMailingListNote-CYHOufsI.mjs} +10 -440
  93. package/dist/client/{CheckboxChoice-B33MqoUo.mjs → CheckboxChoice-M-3HycLw.mjs} +1 -1
  94. package/dist/client/{DemoBookingPortalAccess-BFGB1Fay.mjs → DemoBookingPortalAccess-Cvr9O_ca.mjs} +2 -2
  95. package/dist/client/{EventCombined.client-DKYV0_ft.mjs → EventCombined.client-m5UZIobP.mjs} +7 -7
  96. package/dist/client/EventEmbeddedCheckoutStep-DL6zFAkA.mjs +289 -0
  97. package/dist/client/{EventListing.client-B9UIcEYc.mjs → EventListing.client-DeMfCM04.mjs} +2 -2
  98. package/dist/client/{LeafletStaticMap-CFLPkP0K.mjs → LeafletStaticMap-CvZ3gOdD.mjs} +1 -1
  99. package/dist/client/{checkoutUrls-CXhko2Rv.mjs → RichText-BtfNvQV6.mjs} +2 -29
  100. package/dist/client/{TerminalPanel-JjmgxEsR.mjs → TerminalPanel-CUCNEwlH.mjs} +2 -18
  101. package/dist/client/{ThemedButton-CKV1Jh2m.mjs → ThemedButton-C7WhXuRl.mjs} +2 -2
  102. package/dist/client/{accordion-DXWIfT3T.mjs → accordion-cQm5mjqs.mjs} +1 -1
  103. package/dist/client/{bookingForm-CjZgHNvv.mjs → bookingForm-BVPJE5RQ.mjs} +11 -10
  104. package/dist/client/bookings.mjs +2668 -1134
  105. package/dist/client/{carousel-DSLikmvZ.mjs → carousel-3vgnY7LC.mjs} +2 -2
  106. package/dist/client/{carousel.client-A2lG-9od.mjs → carousel.client-CISsdZvg.mjs} +1 -1
  107. package/dist/client/{cart-HDjWReFt.mjs → cart-BGK4oOjm.mjs} +3 -3
  108. package/dist/client/{checkout-CUvRZA3W.mjs → checkout-GsBLUNJD.mjs} +3 -3
  109. package/dist/client/checkoutUrls-ChxwaNtO.mjs +28 -0
  110. package/dist/client/client.mjs +3042 -1868
  111. package/dist/client/{colorStyles-j5U9v5JA.mjs → colorStyles-D-32xHZh.mjs} +2 -30
  112. package/dist/client/{context-DFmaZa-Q.mjs → context-D_8s12Fp.mjs} +1 -1
  113. package/dist/client/{dates-BBep1JnF.mjs → dates-DeJQbQ9T.mjs} +2 -2
  114. package/dist/client/{eventCalendar-zEobhxo4.mjs → eventCalendar-cmucD4NR.mjs} +10 -10
  115. package/dist/client/{eventCombined-Dp7bz5k-.mjs → eventCombined-ku3E9FTl.mjs} +4 -4
  116. package/dist/client/{eventDetails-FE-zqTt7.mjs → eventDetails-CyKZ61sF.mjs} +5 -5
  117. package/dist/client/{eventListing-BMt5snal.mjs → eventListing-B7yxGIhX.mjs} +4 -4
  118. package/dist/client/{eventRegistration-O6ZxHfOb.mjs → eventRegistration-BoXfSFgZ.mjs} +1403 -857
  119. package/dist/client/{form-DFa1D8vt.mjs → form-CNQOWhJo.mjs} +5 -5
  120. package/dist/client/{headerSection-CmjHLR-N.mjs → headerSection-DahaBJGQ.mjs} +3 -3
  121. package/dist/client/hooks.mjs +123 -64
  122. package/dist/client/{locationMap-BXKP_lGh.mjs → locationMap-BoDjqYlW.mjs} +4 -4
  123. package/dist/client/{media-Cl38iOMI.mjs → media-BFY0y2rb.mjs} +2 -1
  124. package/dist/client/{newsletterForm-CU-HmxGx.mjs → newsletterForm-DtzXDklw.mjs} +4 -4
  125. package/dist/client/{pricing-KEAEsibq.mjs → pricing-DXEh2Lhh.mjs} +1 -1
  126. package/dist/client/{productDetail-Ckp7MGnt.mjs → productDetail-D7cPa-00.mjs} +3 -3
  127. package/dist/client/{productList-D91V0sYa.mjs → productList-D1XMap66.mjs} +3 -3
  128. package/dist/client/{propsDecoder-DZd6RJeA.mjs → propsDecoder-DiIeBopB.mjs} +758 -245
  129. package/dist/client/rendering/client.mjs +4381 -2892
  130. package/dist/client/rendering/islands.mjs +19 -19
  131. package/dist/client/rendering.mjs +3026 -1852
  132. package/dist/client/result-DRW7JWXz.mjs +30 -0
  133. package/dist/client/{routeIslandApiConfig-E1EkhhYY.mjs → routeIslandApiConfig-wzR4lKAY.mjs} +1 -1
  134. package/dist/client/scrollToBlock-C86BYkyV.mjs +17 -0
  135. package/dist/client/{shop-4F2jLQPI.mjs → shop-CYT5P-S5.mjs} +8 -8
  136. package/dist/client/{shop-commerce-store-vicweP2K.mjs → shop-commerce-store-wKhsJQxI.mjs} +1 -1
  137. package/dist/client/{shop-commerce-BbfCJjB3.mjs → shop-commerce-ypBu_dx4.mjs} +9 -9
  138. package/dist/client/{shopShared-DlONJt0T.mjs → shopShared-DFGhYrf2.mjs} +52 -6
  139. package/dist/client/{useEventFilters-COYyL3m7.mjs → useEventFilters-blSbN5o7.mjs} +8 -8
  140. package/dist/preview-next/client/runtime.mjs +3 -3
  141. package/dist/{sdk-runtime-CwvFFjB-.mjs → sdk-runtime-2p8uQk1V.mjs} +1 -1
  142. package/dist/{separator-ByL72zUT.mjs → separator-Cvvzk0Oo.mjs} +1 -1
  143. package/dist/server/components.mjs +4066 -3765
  144. package/dist/server/config-validation.mjs +185 -126
  145. package/dist/server/config.mjs +185 -126
  146. package/dist/server/data.mjs +123 -64
  147. package/dist/server/index.mjs +1 -1
  148. package/dist/server/next.mjs +615 -314
  149. package/dist/server/page-converter.mjs +100 -56
  150. package/dist/server/prebuild.mjs +1 -1
  151. package/dist/server/rendering/server.mjs +4041 -3751
  152. package/dist/server/rendering.mjs +4069 -3768
  153. package/dist/server/routing.mjs +149 -72
  154. package/dist/server/server.mjs +124 -65
  155. package/dist/server/theme-bridge.mjs +1122 -310
  156. package/dist/server/theme.mjs +126 -116
  157. package/dist/spinner-CDo6AkDz.mjs +658 -0
  158. package/dist/styles/index.css +75 -212
  159. package/package.json +1 -1
  160. package/dist/_dts/billing/src/checkout/platform.d.ts +0 -77
  161. package/dist/_dts/billing/src/config/env.d.ts +0 -29
  162. package/dist/_dts/billing/src/stripe/client.d.ts +0 -29
  163. package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +0 -63
  164. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +0 -9
  165. package/dist/client/urlParams-D71VXFGx.mjs +0 -47
@@ -1,3 +1,4 @@
1
+ import type { CheckoutSessionHandle, EmbeddedCheckoutBrowserContext } from '../../../../../../commerce/src/purchase/index';
1
2
  import type { BookingMailingListNote as BookingSignupNote } from '../../../../../../core/src/index';
2
3
  /**
3
4
  * Public event, registration, checkout and eligibility types
@@ -103,8 +104,7 @@ export interface EventRegisterRequest {
103
104
  */
104
105
  registrationCommandId: string;
105
106
  checkout?: {
106
- successUrl: string;
107
- cancelUrl: string;
107
+ returnUrl: string;
108
108
  discountCode?: string;
109
109
  collectionOptionKind?: DirectCheckoutCollectionOptionKind;
110
110
  };
@@ -152,6 +152,10 @@ export type EventRegistrationSummary = {
152
152
  passCreditsUsed?: number;
153
153
  passCreditsRemaining?: number;
154
154
  };
155
+ export type EventEmbeddedCheckout = CheckoutSessionHandle<'embedded'> & Readonly<{
156
+ browser: EmbeddedCheckoutBrowserContext;
157
+ expiresAt: string;
158
+ }>;
155
159
  export type EventRegisterResponse = {
156
160
  kind: 'bookingComplete';
157
161
  reference: EventRegistrationStatusReference;
@@ -171,7 +175,7 @@ export type EventRegisterResponse = {
171
175
  } | {
172
176
  kind: 'checkoutRequired';
173
177
  reference: EventRegistrationStatusReference;
174
- checkoutUrl: string;
178
+ checkout: EventEmbeddedCheckout;
175
179
  submissionId: string;
176
180
  mailingListSignupNote?: BookingSignupNote;
177
181
  demoBookingPass?: string;
@@ -203,8 +207,7 @@ type EventCheckoutRequestCommon = {
203
207
  siteId: string;
204
208
  discountCode?: string;
205
209
  collectionOptionKind?: DirectCheckoutCollectionOptionKind;
206
- successUrl: string;
207
- cancelUrl: string;
210
+ returnUrl: string;
208
211
  };
209
212
  export type EventCheckoutRequest = EventCheckoutRequestCommon & ({
210
213
  subject: {
@@ -233,30 +236,35 @@ export type EventCheckoutRequest = EventCheckoutRequestCommon & ({
233
236
  claimToken?: string;
234
237
  waitlistEntryId?: string;
235
238
  checkoutAttemptId: string;
239
+ collectionOptionKind: DirectCheckoutCollectionOptionKind;
236
240
  });
237
- type OccurrenceCheckoutResponse = Readonly<{
241
+ type CheckoutOutcome = Readonly<{
242
+ kind: 'checkoutRequired';
243
+ checkout: EventEmbeddedCheckout;
244
+ }> | Readonly<{
245
+ kind: 'completed';
246
+ deferredBalance?: {
247
+ amountCents: number;
248
+ currency: string;
249
+ };
250
+ }>;
251
+ type OccurrenceCheckoutResponse = CheckoutOutcome & Readonly<{
238
252
  scope: 'occurrence';
239
253
  attendeeId: string;
240
- checkoutUrl: string | null;
241
- sessionId: string | null;
242
- bypassed: boolean;
243
254
  mailingListSignupNote?: BookingSignupNote;
244
255
  }>;
245
- type WholeSeriesCheckoutResponse = Readonly<{
256
+ type WholeSeriesCheckoutResponse = CheckoutOutcome & Readonly<{
246
257
  scope: 'wholeSeries';
247
258
  registrationId: string;
248
259
  checkoutAttemptId: string;
249
260
  recoverableUntil?: string;
250
- checkoutUrl: string | null;
251
- sessionId: string | null;
252
- bypassed: boolean;
253
261
  mailingListSignupNote?: BookingSignupNote;
254
262
  }>;
255
263
  type WholeSeriesPaymentStatusRequired = Readonly<{
256
264
  scope: 'wholeSeries';
257
265
  status: 'paymentStatusRequired';
258
266
  checkoutAttemptId: string;
259
- recoverableUntil: string;
267
+ recoverableUntil?: string;
260
268
  mailingListSignupNote?: BookingSignupNote;
261
269
  }>;
262
270
  type WholeSeriesWaitlistResponse = Readonly<{
@@ -333,17 +341,17 @@ export interface EventRegistrationStatusResponse {
333
341
  waitlistPosition: number | null;
334
342
  }
335
343
  export type EventCheckoutReturnRequest = {
336
- kind: 'resolveSuccess';
344
+ kind: 'resolveSession';
337
345
  checkoutAttemptId: string;
338
346
  sessionId: string;
339
347
  } | {
340
348
  kind: 'abandon';
341
- checkoutAttemptId: string;
349
+ subject: EventRegistrationPaymentSubject;
342
350
  } | {
343
351
  kind: 'checkStatus';
344
352
  subject: EventRegistrationPaymentSubject;
345
353
  };
346
- export type EventCheckoutReturnResponse = {
354
+ export type EventCheckoutStatusOutcome = {
347
355
  kind: 'resolved';
348
356
  reference: EventRegistrationStatusReference;
349
357
  deferredBalance?: {
@@ -361,7 +369,7 @@ export type EventCheckoutReturnResponse = {
361
369
  recoverableUntil?: string;
362
370
  } | {
363
371
  kind: 'paymentAvailable';
364
- checkoutUrl: string;
372
+ checkout: EventEmbeddedCheckout;
365
373
  recoverableUntil?: string;
366
374
  } | {
367
375
  kind: 'paymentRetryAvailable';
@@ -371,4 +379,16 @@ export type EventCheckoutReturnResponse = {
371
379
  } | {
372
380
  kind: 'paymentAssistanceRequired';
373
381
  };
382
+ /** A subject is returned only after the server verifies the exact checkout binding. */
383
+ export type EventCheckoutReturnResponse = {
384
+ kind: 'checkout';
385
+ subject: EventRegistrationPaymentSubject;
386
+ outcome: Exclude<EventCheckoutStatusOutcome, {
387
+ kind: 'notFound';
388
+ }>;
389
+ } | {
390
+ kind: 'notFound';
391
+ } | {
392
+ kind: 'reconciliationRequired';
393
+ };
374
394
  export {};
@@ -8,7 +8,7 @@ import { createEventRegistrationBlockApiConfig } from '../nodes/event-registrati
8
8
  export type { BlockApiConfig };
9
9
  export { createEventRegistrationBlockApiConfig };
10
10
  export type { EventRegistrationAttendeeModel, EventRegistrationDiscountModel, EventRegistrationEventsModel, EventRegistrationFlowActionResult, EventRegistrationFlowActions, EventRegistrationFlowStatus, EventRegistrationFlowStep, EventRegistrationFlowStepId, EventRegistrationFlowView, EventRegistrationGuestsModel, EventRegistrationLoadState, EventRegistrationOverrideData, EventRegistrationOverrideInput, EventRegistrationOverrideInputResult, EventRegistrationOverridePropsLike, EventRegistrationPaymentModel, EventRegistrationPaymentSelection, EventRegistrationPortalAuthModel, EventRegistrationSpamProtectionModel, EventRegistrationTerminalModel, EventRegistrationTicketsModel, HeadlessEventRegistrationFlow, } from '../nodes/event-registration/event-registration.headless.state';
11
- export type { EventRegistrationSubmitOptions, EventRegistrationSubmitResult, } from '../nodes/event-registration/useEventRegistrationSubmit';
11
+ export type { EventRegistrationSubmitResult, } from '../nodes/event-registration/useEventRegistrationSubmit';
12
12
  export type HeadlessEventRegistrationFlowOptions = Readonly<{
13
13
  anchorId?: string;
14
14
  occurrenceContext?: EventRegistrationClientProps['occurrenceContext'];
@@ -16,6 +16,12 @@ type BookingFormProps = BookingFormSourceProps & Readonly<{
16
16
  * card drawn exactly once after hydration, because the client wizard renders its
17
17
  * own `.rb-reg-surface`, and leaves no stale loading state on the mounted form.
18
18
  * `event-registration.server.tsx` follows the same shape.
19
+ *
20
+ * The root also carries `data-block="appointment-booking"`, because the
21
+ * appointment-booking and registration-surface styles and the block's Tier 3
22
+ * vars are all scoped under that attribute. On a page the block wrapper
23
+ * already provides it, but the system service destination and /book render
24
+ * this form on its own, so without it those routes lose every booking style.
19
25
  */
20
26
  export declare function BookingFormSSR({ blockId, children, ...sourceProps }: BookingFormProps): React.JSX.Element;
21
27
  export default BookingFormSSR;
@@ -0,0 +1,13 @@
1
+ import type { EventEmbeddedCheckout } from '../../api/types';
2
+ import { loadBrowserStripe } from '../../shared/stripe/browserStripe';
3
+ type Props = Readonly<{
4
+ checkout: EventEmbeddedCheckout;
5
+ onComplete: () => void;
6
+ onRetry: () => void;
7
+ onBack: () => void;
8
+ }>;
9
+ export default function EventEmbeddedCheckoutStep(props: Props): import("react").JSX.Element;
10
+ export declare function EventEmbeddedCheckoutStepWithDeps(props: Props & Readonly<{
11
+ load: typeof loadBrowserStripe;
12
+ }>): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { HeadlessEventRegistrationFlow } from './event-registration.headless.contract';
2
+ import type { EventPaymentState } from './types';
3
+ type PaymentMountProps = Readonly<{
4
+ state: EventPaymentState;
5
+ onComplete: () => void;
6
+ onRetry: () => void;
7
+ onBack: () => Promise<void>;
8
+ }>;
9
+ /** The one Stripe mount, shared by the standard wizard and headless arrangements. */
10
+ export declare function EventPaymentMount({ state, onComplete, onRetry, onBack }: PaymentMountProps): import("react").JSX.Element | null;
11
+ /** Mount the active checkout from the same headless registration controller. */
12
+ export declare function EventRegistrationPayment({ flow }: Readonly<{
13
+ flow: HeadlessEventRegistrationFlow;
14
+ }>): import("react").JSX.Element;
15
+ export {};
@@ -10,7 +10,6 @@ import type { ThemeButtonVariantId } from '../../../../../../theme-core/src/butt
10
10
  */
11
11
  export declare function resolveDetailsButtonText(input: Readonly<{
12
12
  wizard: UseEventRegistrationWizardResult;
13
- hasWaitlistClaim: boolean;
14
13
  fallbackText: string;
15
14
  }>): string;
16
15
  type WizardActionsProps = Readonly<{
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { UseEventRegistrationWizardResult } from './useEventRegistrationWizard';
3
+ export declare function FullyBookedStep(props: Readonly<{
4
+ wizard: UseEventRegistrationWizardResult;
5
+ showSpamProtection: boolean;
6
+ }>): React.JSX.Element;
@@ -1,13 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { EligibilityData, PaymentStepState } from './types';
3
+ import { type RegistrationAdmission } from './registrationCompletion';
3
4
  export declare function resolvePaymentStepStatus(input: Readonly<{
4
5
  loading: boolean;
5
6
  error: string | null;
6
7
  eligibility: EligibilityData | null;
8
+ admission: RegistrationAdmission;
7
9
  }>): PaymentStepState['status'];
8
10
  export declare function shouldPromptForLogin(status: PaymentStepState['status'], isAuthenticated: boolean, eligibility: EligibilityData | null): boolean;
9
11
  export declare function PaymentBlockingPanel(props: Readonly<{
10
12
  eligibility: EligibilityData | null;
13
+ admission: RegistrationAdmission;
11
14
  eligibilityLoading: boolean;
12
15
  eligibilityError: string | null;
13
16
  occurrenceId: string;
@@ -1,3 +1,4 @@
1
+ import type { RegistrationAdmission } from './registrationCompletion';
1
2
  /**
2
3
  * Payment Selection Step Component
3
4
  *
@@ -27,6 +28,7 @@ type PaymentSelectionStepProps = {
27
28
  /** Called whenever the user updates payment selection in this step */
28
29
  onSelectionChange: (selection: PaymentSelection) => void;
29
30
  eligibility: EligibilityData | null;
31
+ admission: RegistrationAdmission;
30
32
  eligibilityLoading: boolean;
31
33
  eligibilityError?: string | null;
32
34
  /** Called when the user wants to request a login link (optional) */
@@ -2,13 +2,13 @@ import type { DirectCheckoutCollectionOptionKind, PaymentMethod } from '../../ap
2
2
  import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
3
3
  import type { EventRegistrationDirectPaymentOption, EventRegistrationDirectPaymentSelectionState } from './eventPaymentOptions';
4
4
  import type { EventRegistrationPageSurfaceSubject } from './eventScope';
5
- import type { EligibilityData, EventTicketSelectionLine, FormData, Guest, GuestErrors, OccurrenceContext, PaymentSelection, PaymentStatusRecoveryState, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult } from './types';
5
+ import type { EligibilityData, EventTicketSelectionLine, FormData, Guest, GuestErrors, OccurrenceContext, EventPaymentState, PaymentSelection, PaymentStatusRecoveryState, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult } from './types';
6
6
  import type { SelectableEventTicketType } from './utils';
7
7
  import type { BlockButtonRole } from '../../../constants/buttonRoles';
8
8
  import type { PortalAuthState, PortalProfile } from './hooks';
9
9
  import type { UseWaitlistClaimResult } from '../../shared/useWaitlistClaim';
10
10
  import type { UseEventRegistrationWizardResult } from './useEventRegistrationWizard';
11
- import type { EventRegistrationSubmitOptions, EventRegistrationSubmitResult } from './useEventRegistrationSubmit';
11
+ import type { EventRegistrationSubmitResult } from './useEventRegistrationSubmit';
12
12
  export declare const DEFAULT_EVENT_REGISTRATION_MAX_TICKETS = 5;
13
13
  export type EventRegistrationLoadState<T> = Readonly<{
14
14
  tag: 'idle';
@@ -39,7 +39,7 @@ export type EventRegistrationFlowStatus = Readonly<{
39
39
  }> | Readonly<{
40
40
  tag: 'submitting';
41
41
  }> | Readonly<{
42
- tag: 'redirecting';
42
+ tag: 'payment';
43
43
  }> | Readonly<{
44
44
  tag: 'verifying-payment';
45
45
  }> | Readonly<{
@@ -66,6 +66,10 @@ export type EventRegistrationFlowView = Readonly<{
66
66
  message: string;
67
67
  }> | Readonly<{
68
68
  kind: 'form';
69
+ }> | Readonly<{
70
+ kind: 'fully-booked';
71
+ recovery: 'byEmail' | 'none';
72
+ recoveryMessage: string | null;
69
73
  }> | Readonly<{
70
74
  kind: 'verifying';
71
75
  message: string;
@@ -79,7 +83,7 @@ export type EventRegistrationFlowView = Readonly<{
79
83
  kind: 'error';
80
84
  message: string;
81
85
  }>;
82
- export type EventRegistrationFlowStepId = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment';
86
+ export type EventRegistrationFlowStepId = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment' | 'payment';
83
87
  export type EventRegistrationFlowStepState = 'complete' | 'active' | 'available' | 'blocked';
84
88
  export type EventRegistrationFlowStep = Readonly<{
85
89
  id: EventRegistrationFlowStepId;
@@ -161,12 +165,14 @@ export type EventRegistrationPaymentModel = Readonly<{
161
165
  selection: EventRegistrationPaymentSelection;
162
166
  directPaymentOptions: readonly EventRegistrationDirectPaymentOption[];
163
167
  directPaymentSelectionState: EventRegistrationDirectPaymentSelectionState;
168
+ checkout: EventPaymentState;
164
169
  stepState: PaymentStepState;
165
170
  }> | Readonly<{
166
171
  kind: 'loading' | 'error' | 'not-eligible' | 'ready';
167
172
  selection: EventRegistrationPaymentSelection;
168
173
  directPaymentOptions: readonly EventRegistrationDirectPaymentOption[];
169
174
  directPaymentSelectionState: EventRegistrationDirectPaymentSelectionState;
175
+ checkout: EventPaymentState;
170
176
  stepState: PaymentStepState;
171
177
  eligibility: EligibilityData | null;
172
178
  eligibilityError: string | null | undefined;
@@ -218,8 +224,12 @@ export type EventRegistrationFlowActions = Readonly<{
218
224
  logout: () => void;
219
225
  next: () => Promise<EventRegistrationFlowActionResult>;
220
226
  back: () => void;
221
- submit: (options?: EventRegistrationSubmitOptions) => Promise<EventRegistrationSubmitResult>;
227
+ submit: () => Promise<EventRegistrationSubmitResult>;
222
228
  retry: () => void;
229
+ checkPayment: () => void;
230
+ completePayment: () => void;
231
+ retryPaymentLoad: () => void;
232
+ backToBooking: () => Promise<void>;
223
233
  checkPaymentStatus: () => void;
224
234
  continueExistingPayment: () => void;
225
235
  returnToPayment: () => void;
@@ -11,12 +11,14 @@ export declare function resolveEventRegistrationSubmitPlan(input: Readonly<{
11
11
  canJoinWaitlist?: boolean | null;
12
12
  }>): EventRegistrationSubmitPlan;
13
13
  export declare function resolveHeadlessEventRegistrationStatus(wizard: Pick<UseEventRegistrationWizardResult, 'step' | 'registrationResult' | 'errorMessage'> & Partial<Pick<UseEventRegistrationWizardResult, 'errorAction' | 'paymentStatusRecovery'>>): EventRegistrationFlowStatus;
14
- export declare function resolveHeadlessEventRegistrationView(wizard: Readonly<Pick<UseEventRegistrationWizardResult, 'step' | 'scopedEvents' | 'occurrenceContext' | 'registrationResult' | 'errorMessage'> & Partial<Pick<UseEventRegistrationWizardResult, 'paymentStatusRecovery'>> & {
14
+ type RegistrationViewInput = Readonly<Pick<UseEventRegistrationWizardResult, 'step' | 'scopedEvents' | 'occurrenceContext' | 'registrationResult' | 'errorMessage' | 'paymentStatusRecovery' | 'admission' | 'recoveryMessage'> & {
15
15
  api: Pick<UseEventRegistrationWizardResult['api'], 'config'>;
16
- }>): EventRegistrationFlowView;
16
+ }>;
17
+ export declare function resolveHeadlessEventRegistrationView(wizard: RegistrationViewInput): EventRegistrationFlowView;
17
18
  export declare function deriveEventRegistrationSteps(input: Readonly<{
18
19
  step: RegistrationStep;
19
20
  hasPreSelectedContext: boolean;
20
21
  eventRequiresPayment: boolean;
21
22
  paymentSelection: PaymentSelection;
22
23
  }>): readonly EventRegistrationFlowStep[];
24
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function eventPaymentReturnUrl(submissionId: string): string;
2
+ export declare function rememberEventPayment(submissionId: string, sessionId: string): void;
3
+ export declare function clearEventPayment(siteId: string | undefined): void;
@@ -0,0 +1,72 @@
1
+ import type { EventCheckoutReturnResponse, EventEmbeddedCheckout, EventRegistrationPaymentSubject } from '../../api/types';
2
+ import type { PaymentStatusRecoveryState } from './types';
3
+ type PaymentResponseIntent = 'resume' | 'check' | 'abandon';
4
+ export type PaymentResponseTransition = {
5
+ kind: 'confirmed';
6
+ } | {
7
+ kind: 'restartBooking';
8
+ } | {
9
+ kind: 'unresolved';
10
+ } | {
11
+ kind: 'payment';
12
+ checkout: EventEmbeddedCheckout;
13
+ subject: EventRegistrationPaymentSubject;
14
+ } | {
15
+ kind: 'recovery';
16
+ state: PaymentStatusRecoveryState;
17
+ };
18
+ /**
19
+ * Verified response identity owns every follow-up action, including storage-free returns.
20
+ * `requested` is the subject the client sent, if any: a subject-bound `notFound`
21
+ * means the server lost that booking, which no amount of re-checking will fix.
22
+ */
23
+ export declare function planPaymentResponse(response: EventCheckoutReturnResponse, intent: PaymentResponseIntent, requested: EventRegistrationPaymentSubject | null): PaymentResponseTransition;
24
+ type CheckoutEnvelope = Extract<EventCheckoutReturnResponse, {
25
+ kind: 'checkout';
26
+ }>;
27
+ /** A mounted-form check that never reached the server. */
28
+ export type PaymentCheckUnreachable = Readonly<{
29
+ kind: 'unreachable';
30
+ }>;
31
+ export type PaymentCheckResult = EventCheckoutReturnResponse | PaymentCheckUnreachable;
32
+ /**
33
+ * What a check result proves, before deciding what the customer sees.
34
+ * `inconclusive` means the server could not look; `bindingLost` means it looked
35
+ * and the booking association is gone. Confusing the two either strands a
36
+ * customer mid-authentication or lets them pay for a booking we can't find.
37
+ */
38
+ export type PaymentCheckEvidence = Readonly<{
39
+ kind: 'inconclusive';
40
+ }> | Readonly<{
41
+ kind: 'bindingLost';
42
+ }> | Readonly<{
43
+ kind: 'paymentUnderway';
44
+ }> | Readonly<{
45
+ kind: 'payable';
46
+ checkout: EventEmbeddedCheckout;
47
+ response: CheckoutEnvelope;
48
+ }> | Readonly<{
49
+ kind: 'terminal';
50
+ response: CheckoutEnvelope;
51
+ }>;
52
+ export declare function paymentCheckEvidence(result: PaymentCheckResult): PaymentCheckEvidence;
53
+ /**
54
+ * What a background check may do to a customer looking at a live Stripe form.
55
+ * Only conclusive evidence moves them; inconclusive evidence keeps the form,
56
+ * since unmounting it can interrupt an authentication already in progress.
57
+ */
58
+ export type MountedPaymentRefresh = Readonly<{
59
+ kind: 'stay';
60
+ }> | Readonly<{
61
+ kind: 'poll';
62
+ }> | Readonly<{
63
+ kind: 'leave';
64
+ transition: PaymentResponseTransition;
65
+ }>;
66
+ export type MountedPayment = Readonly<{
67
+ sessionId: string;
68
+ subject: EventRegistrationPaymentSubject;
69
+ }>;
70
+ export declare function planMountedPaymentRefresh(result: PaymentCheckResult, mounted: MountedPayment): MountedPaymentRefresh;
71
+ export declare function paymentResponseNeedsPolling(response: EventCheckoutReturnResponse): boolean;
72
+ export {};
@@ -1,12 +1,73 @@
1
- import type { EligibilityData } from './types';
2
- export declare function isSelectionSoldOut(availability: EligibilityData['availability'] | undefined): boolean;
3
- export declare function resolveRegistrationAvailabilityBlocker(input: Readonly<{
1
+ import type { EventRegistrationNextStepRequest } from '../../api/types';
2
+ import type { EligibilityData, RegistrationStep } from './types';
3
+ export type RegistrationAdmission = Readonly<{
4
+ kind: 'checking';
5
+ }> | Readonly<{
6
+ kind: 'open' | 'resume';
7
+ }> | Readonly<{
8
+ kind: 'waitlist';
9
+ recovery: 'byEmail' | 'none';
10
+ }> | Readonly<{
11
+ kind: 'fullyBooked';
12
+ recovery: 'byEmail' | 'none';
13
+ }> | Readonly<{
14
+ kind: 'closed';
15
+ reason: 'unavailable' | 'optionsUnavailable' | 'alreadyWaitlisted';
16
+ message: string;
17
+ }>;
18
+ /** One admission decision for navigation, labels and completion. Email recovery
19
+ * permits navigation only; submission remains the owner of payment recovery. */
20
+ export declare function resolveRegistrationAdmission(input: Readonly<{
4
21
  hasWaitlistClaim: boolean;
5
- eligibility: EligibilityData | null;
22
+ eligibility: Pick<EligibilityData, 'registration' | 'availability'> | null;
6
23
  eligibilityError: string | null;
7
- }>): string | null;
24
+ eligibilityLoading: boolean;
25
+ isAuthenticated: boolean;
26
+ }>): RegistrationAdmission;
27
+ export declare function stepAfterTickets(admission: RegistrationAdmission): RegistrationStep;
28
+ export type RegistrationAvailabilityBlocker = Readonly<{
29
+ kind: 'pending';
30
+ message: string;
31
+ }> | Readonly<{
32
+ kind: 'unavailable';
33
+ message: string;
34
+ }>;
35
+ export declare function resolveRegistrationAvailabilityBlocker(admission: RegistrationAdmission): RegistrationAvailabilityBlocker | null;
8
36
  export declare function resolvePricingSelectionBlocker(input: Readonly<{
9
37
  selectionRequired: boolean;
10
38
  hasValidSelection: boolean;
11
39
  slidingScaleSelectionMessage: string | null;
12
40
  }>): string | null;
41
+ export type GuestNextStepCheck = Readonly<{
42
+ kind: 'skip';
43
+ outcome: Readonly<{
44
+ kind: 'continue' | 'waitlist';
45
+ }>;
46
+ }> | Readonly<{
47
+ kind: 'blocked';
48
+ message: string;
49
+ }> | Readonly<{
50
+ kind: 'check';
51
+ request: EventRegistrationNextStepRequest;
52
+ }>;
53
+ /** Submit owns fresh admission. Open quotes do not depend on an email lookup. */
54
+ export declare function resolveGuestNextStepCheck(admission: RegistrationAdmission, request: EventRegistrationNextStepRequest | null): GuestNextStepCheck;
55
+ export type RegistrationTicketContinuation = Readonly<{
56
+ kind: 'advance';
57
+ admission: Exclude<RegistrationAdmission, {
58
+ kind: 'closed' | 'checking';
59
+ }>;
60
+ label: string;
61
+ pending: false;
62
+ }> | Readonly<{
63
+ kind: 'blocked';
64
+ message: string;
65
+ label: string;
66
+ pending: boolean;
67
+ }>;
68
+ export declare function resolveRegistrationTicketContinuation(input: Readonly<{
69
+ admission: RegistrationAdmission;
70
+ ticketSelectionRequired: boolean;
71
+ hasValidTicketSelection: boolean;
72
+ isCheckingExistingRegistration: boolean;
73
+ }>): RegistrationTicketContinuation;
@@ -1,9 +1,7 @@
1
1
  import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
2
- import type { EligibilityData, EventTicketSelectionLine, RegistrationEvent, RegistrationStep } from './types';
2
+ import type { EventTicketSelectionLine, RegistrationEvent, RegistrationStep } from './types';
3
3
  import type { RegistrationFlowAction } from './registrationStateMachine';
4
- import type { EventRegistrationStatusReference } from '../../api/types';
5
4
  export declare function resolveRegistrationRecoveryAction(step: RegistrationStep, action: EventRegistrationErrorAction): EventRegistrationErrorAction;
6
- export declare function canRecoverToWaitlist(eligibility: EligibilityData | null): boolean;
7
5
  export declare function shouldRefreshAfterRegistrationError(step: RegistrationStep, action: EventRegistrationErrorAction, enabled: boolean): boolean;
8
6
  export declare function resetRegistrationAfterExpiry(input: Readonly<{
9
7
  hasPreSelectedContext: boolean;
@@ -13,7 +11,6 @@ export declare function resetRegistrationAfterExpiry(input: Readonly<{
13
11
  setSelectedSlidingAmountInput: (value: string) => void;
14
12
  setSelectedAttendanceMode: (mode: 'online' | 'in_person' | null) => void;
15
13
  setErrorMessage: (message: string) => void;
16
- setPendingRegistrationReference: (reference: EventRegistrationStatusReference | null) => void;
17
14
  }>): void;
18
15
  /** Retry the retained submission in place; explicit payment uncertainty stays status-only. */
19
16
  export declare function recoverRegistrationError(action: EventRegistrationErrorAction, handlers: Readonly<{
@@ -1,4 +1,6 @@
1
1
  import type { EligibilityData, PaymentSelection, RegistrationStep } from './types';
2
+ import { type RegistrationAdmission } from './registrationCompletion';
3
+ import type { EventRegistrationNextStepResponse } from '../../api/types';
2
4
  export type SelectionSource = 'auto' | 'manual';
3
5
  export type RegistrationFlowState = {
4
6
  step: RegistrationStep;
@@ -12,6 +14,17 @@ export type RegistrationFlowState = {
12
14
  export type RegistrationFlowAction = {
13
15
  type: 'set-step';
14
16
  step: RegistrationStep;
17
+ } | {
18
+ type: 'admission-updated';
19
+ admission: RegistrationAdmission;
20
+ } | {
21
+ type: 'tickets-completed';
22
+ admission: Exclude<RegistrationAdmission, {
23
+ kind: 'closed' | 'checking';
24
+ }>;
25
+ } | {
26
+ type: 'recovery-checked';
27
+ outcome: EventRegistrationNextStepResponse;
15
28
  } | {
16
29
  type: 'set-tickets-count';
17
30
  ticketsCount: number;
@@ -33,11 +46,6 @@ export type RegistrationFlowAction = {
33
46
  type: 'reset';
34
47
  hasPreSelectedContext: boolean;
35
48
  };
36
- export declare function hasBlockingExistingRegistration(input: Readonly<{
37
- isAuthenticated: boolean;
38
- registration: EligibilityData['registration'];
39
- hasWaitlistClaim: boolean;
40
- }>): boolean;
41
49
  export declare function createInitialRegistrationFlowState(hasPreSelectedContext: boolean): RegistrationFlowState;
42
50
  export declare function registrationFlowReducer(state: RegistrationFlowState, action: RegistrationFlowAction): RegistrationFlowState;
43
51
  export declare function isEntitlementSelection(selection: PaymentSelection): boolean;
@@ -1,64 +1,23 @@
1
- import type { BookingMailingListNote as BookingSignupNote } from '../../../../../../core/src/index';
2
- /**
3
- * SessionStorage utilities for preserving form state across Stripe redirects.
4
- *
5
- * Saves form data before redirecting to Stripe, restores on return.
6
- * Handles graceful degradation when sessionStorage is unavailable.
7
- */
8
- import type { FormData } from './types';
9
- import type { EventTicketSelectionLine, PaymentSelection } from './types';
1
+ import type { BookingMailingListNote } from '../../../../../../core/src/index';
10
2
  import type { EventRegistrationStatusReference } from '../../api/types';
11
- /**
12
- * Schema for pending registration data stored in sessionStorage.
13
- * Version field allows future migrations if schema changes.
14
- */
15
- type PendingRegistrationV5 = {
16
- version: 5;
3
+ import type { FormData, Guest, EventTicketSelectionLine, PaymentSelection } from './types';
4
+ export type PendingRegistration = {
5
+ version: 6;
17
6
  reference: EventRegistrationStatusReference;
18
7
  formData: FormData;
19
8
  ticketSelections: EventTicketSelectionLine[];
20
9
  selectedEventId: string | null;
21
- eventSeriesId?: string | null;
22
10
  selectedAttendanceMode?: 'in_person' | 'online' | null;
23
11
  paymentSelection: PaymentSelection & {
24
12
  method: Exclude<PaymentSelection['method'], null>;
25
13
  };
26
- mailingListSignupNote?: BookingSignupNote;
14
+ guests: Guest[];
15
+ selectedSlidingAmount: number | null;
16
+ discountCode: string;
17
+ mailingListSignupNote?: BookingMailingListNote;
27
18
  timestamp: number;
28
19
  };
29
- export type PendingRegistration = PendingRegistrationV5;
30
- /**
31
- * Save pending registration data before Stripe redirect.
32
- *
33
- * @param siteId - Site ID
34
- * @param checkoutAttemptId - Correlation ID included in the checkout return URL
35
- * @param data - Registration data to save (excluding version and timestamp)
36
- */
37
- export declare function savePendingRegistration(siteId: string, checkoutAttemptId: string, data: Omit<PendingRegistration, 'version' | 'timestamp'>): void;
38
- /**
39
- * Get pending registration data after returning from Stripe.
40
- *
41
- * Returns null if:
42
- * - No entry exists for this checkout attempt
43
- * - Entry is stale (> 24 hours old)
44
- * - Entry is corrupt or wrong version
45
- * - Storage is unavailable
46
- *
47
- * @param siteId - Site ID
48
- * @param checkoutAttemptId - Correlation ID returned from checkout.
49
- * @returns Pending registration data or null
50
- */
51
- export declare function getPendingRegistration(siteId: string, checkoutAttemptId: string): PendingRegistration | null;
52
- /**
53
- * Clear pending registration data after successful verification.
54
- *
55
- * @param siteId - Site ID
56
- * @param checkoutAttemptId - Checkout return correlation ID
57
- */
58
- export declare function clearPendingRegistration(siteId: string, checkoutAttemptId: string): void;
59
- /**
60
- * Clean up all stale registration entries from sessionStorage.
61
- * Should be called on component mount to prevent accumulation.
62
- */
20
+ export declare function savePendingRegistration(siteId: string, submissionId: string, data: Omit<PendingRegistration, 'version' | 'timestamp'>): void;
21
+ export declare function getPendingRegistration(siteId: string, submissionId: string): PendingRegistration | null;
22
+ export declare function clearPendingRegistration(siteId: string, submissionId: string): void;
63
23
  export declare function cleanupStaleRegistrations(): void;
64
- export {};