@riverbankcms/sdk 0.141.0 → 0.143.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 (123) hide show
  1. package/dist/{PreviewEditorSidebar-Q-fy9GYw.mjs → PreviewEditorSidebar-DROGfMKi.mjs} +24 -15
  2. package/dist/{PreviewEditorUI-LYGzgk85.mjs → PreviewEditorUI-BaRjhFu-.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-CN0ewic5.mjs → PreviewQueryProvider-BCYICImX.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-CoPYI5Jq.mjs → SdkPreviewModeRuntime-OIABYLES.mjs} +16 -11
  5. package/dist/{SiteChromeCustomizeContext-D8LePX8x.mjs → SiteChromeCustomizeContext-ohjTvZbc.mjs} +607 -545
  6. package/dist/_dts/api/src/billing.d.ts +6 -1
  7. package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
  8. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
  9. package/dist/_dts/api/src/endpoints.d.ts +7 -27
  10. package/dist/_dts/api/src/index.d.ts +1 -1
  11. package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
  12. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  13. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +48 -41
  14. package/dist/_dts/api/src/sdkConfig/layout.d.ts +13 -0
  15. package/dist/_dts/api/src/sdkContracts.d.ts +3 -8
  16. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -31
  17. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  18. package/dist/_dts/billing/src/site-arrangements.d.ts +9 -5
  19. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +56 -0
  20. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +8 -0
  21. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  22. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  23. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +95 -35
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.d.ts +10 -0
  25. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +0 -2
  26. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +12 -1
  27. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +2 -2
  28. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +1 -4
  29. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +12 -0
  30. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +1 -0
  32. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +4 -5
  33. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +9 -11
  34. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +56 -2
  35. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -4
  36. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +23 -0
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +1 -1
  38. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +56 -0
  39. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -4
  40. package/dist/_dts/commerce/src/purchase/eventCheckoutRecoveryWindow.d.ts +8 -0
  41. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -1
  42. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +1 -13
  43. package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +1 -2
  44. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +58 -45
  45. package/dist/_dts/editor-blocks/src/block-editor/ColourFieldOptionsProvider.d.ts +7 -0
  46. package/dist/_dts/editor-blocks/src/block-editor/colourFieldVisibility.d.ts +7 -0
  47. package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -0
  48. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  49. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -2
  50. package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +3 -6
  51. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -2
  52. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -2
  53. package/dist/_dts/preview-next/src/client/preview/footerInspection.d.ts +16 -0
  54. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +6 -0
  55. package/dist/_dts/sdk/src/config/types.d.ts +2 -18
  56. package/dist/_dts/sdk/src/config/validation.d.ts +6 -0
  57. package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -0
  58. package/dist/_dts/sdk/src/version.d.ts +1 -1
  59. package/dist/_dts/theme-core/src/footer/mode.d.ts +10 -1
  60. package/dist/_dts/theme-core/src/schema.d.ts +1 -7
  61. package/dist/_dts/theme-core/src/site-styles/effectivePageDesign.d.ts +32 -0
  62. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  63. package/dist/client/{BookingConsentAgreement-xJeYNdnb.mjs → BookingConsentAgreement-BoCtvzzu.mjs} +2 -2
  64. package/dist/client/{DiscountCodeDisclosure-DdT6uzl9.mjs → DiscountCodeDisclosure-B5S30nZk.mjs} +1 -1
  65. package/dist/client/{EventCombined.client-Cp28uYuM.mjs → EventCombined.client-CeZ2-zSt.mjs} +5 -5
  66. package/dist/client/{EventListing.client-CD6AJsMr.mjs → EventListing.client-DJN3j8B3.mjs} +2 -2
  67. package/dist/client/{LeafletStaticMap-DBsAi9-e.mjs → LeafletStaticMap-RjtGzDQT.mjs} +1 -1
  68. package/dist/client/{accordion-6dwbOKYR.mjs → accordion-DOmnDoyg.mjs} +1 -1
  69. package/dist/client/{bookingForm-CZE9_qPQ.mjs → bookingForm-C0vk7pgS.mjs} +5 -5
  70. package/dist/client/bookings.mjs +468 -534
  71. package/dist/client/{carousel-7VHGQARz.mjs → carousel-BZJ7pno3.mjs} +1 -1
  72. package/dist/client/{cart-Qg_mvQhh.mjs → cart-CaeVAHJl.mjs} +3 -3
  73. package/dist/client/{checkout-D84rpgdr.mjs → checkout-7wmoNDtG.mjs} +3 -3
  74. package/dist/client/client.mjs +559 -593
  75. package/dist/client/{context-Ctp3T0Wr.mjs → context-BOimxE3U.mjs} +12 -1
  76. package/dist/client/{dates-DJKFcI_N.mjs → dates-BnzVksi4.mjs} +2 -2
  77. package/dist/client/{eventCalendar-CK31z3vs.mjs → eventCalendar-l-fpaslC.mjs} +7 -7
  78. package/dist/client/{eventCombined-DiXd-ewn.mjs → eventCombined-DGGvssK6.mjs} +3 -3
  79. package/dist/client/{eventDetails-CTRgt2DK.mjs → eventDetails-DRiCm_hL.mjs} +4 -4
  80. package/dist/client/{eventListing-Dy9vi_j_.mjs → eventListing-dph8loYX.mjs} +3 -3
  81. package/dist/client/{eventRegistration-CnalYMr2.mjs → eventRegistration-ClBohmbY.mjs} +472 -531
  82. package/dist/client/{form-eUiMveTT.mjs → form-BLVVAnd3.mjs} +2 -2
  83. package/dist/client/{headerSection-Dy9kQpB1.mjs → headerSection-DHy4C8Ix.mjs} +2 -2
  84. package/dist/client/hooks.mjs +39 -13
  85. package/dist/client/{locationMap-DalCmWU0.mjs → locationMap-6HuS28ck.mjs} +2 -2
  86. package/dist/client/{newsletterForm-SDDPvhS0.mjs → newsletterForm-xOdcOhZP.mjs} +2 -2
  87. package/dist/client/{pricing-OcMz4SnX.mjs → pricing-ChinRYFt.mjs} +1 -1
  88. package/dist/client/{productDetail-BQrgHElM.mjs → productDetail-0chA5gbK.mjs} +3 -3
  89. package/dist/client/{productList-OnPn_UJj.mjs → productList-OoINA0h1.mjs} +3 -3
  90. package/dist/client/{propsDecoder-zBdsnS-N.mjs → propsDecoder-CIZ-hbIG.mjs} +33 -9
  91. package/dist/client/rendering/client.mjs +536 -550
  92. package/dist/client/rendering/islands.mjs +17 -17
  93. package/dist/client/rendering.mjs +602 -596
  94. package/dist/client/{scrollToBlock-BNM4Ob2Y.mjs → scrollToBlock-BPZl0gPZ.mjs} +1 -1
  95. package/dist/client/{shop-Bv1fPTwQ.mjs → shop-CLJFqNIq.mjs} +6 -6
  96. package/dist/client/{shop-commerce-D4KNGaW8.mjs → shop-commerce-PpANg5wB.mjs} +5 -5
  97. package/dist/client/{shop-commerce-store-2N5EV0Rc.mjs → shop-commerce-store-TA_Kz2ku.mjs} +1 -1
  98. package/dist/client/{shopShared-DvJGdHTV.mjs → shopShared-DzcFcA5g.mjs} +3 -3
  99. package/dist/client/{useEventFilters-BBBvGDHQ.mjs → useEventFilters-CFU21QZo.mjs} +5 -5
  100. package/dist/preview-next/before-render.mjs +11 -37
  101. package/dist/preview-next/client/runtime.mjs +4 -4
  102. package/dist/preview-next/keepAlive.mjs +11 -37
  103. package/dist/preview-next/middleware.mjs +11 -37
  104. package/dist/{previewAuthStore-Gjb6r6vz.mjs → previewAuthStore-JA6-I_sL.mjs} +11 -37
  105. package/dist/{sdk-runtime-Defnbfzw.mjs → sdk-runtime-CDKl0Fr7.mjs} +2 -2
  106. package/dist/{separator-CZXO3Sb0.mjs → separator-BTp96X32.mjs} +1 -1
  107. package/dist/server/components.mjs +80 -51
  108. package/dist/server/config-validation.mjs +43 -14
  109. package/dist/server/config.mjs +43 -14
  110. package/dist/server/data.mjs +39 -13
  111. package/dist/server/index.mjs +12 -38
  112. package/dist/server/next.mjs +40 -53
  113. package/dist/server/page-converter.mjs +20 -8
  114. package/dist/server/prebuild.mjs +1 -1
  115. package/dist/server/rendering/server.mjs +80 -51
  116. package/dist/server/rendering.mjs +80 -51
  117. package/dist/server/routing.mjs +52 -17
  118. package/dist/server/server.mjs +40 -51
  119. package/dist/server/theme-bridge.mjs +10 -8
  120. package/dist/server/theme.mjs +10 -8
  121. package/package.json +1 -1
  122. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +0 -14
  123. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +0 -8
@@ -101,6 +101,12 @@ export interface EventRegisterRequest {
101
101
  * server can replay a lost response instead of registering twice.
102
102
  */
103
103
  registrationCommandId: string;
104
+ checkout?: {
105
+ successUrl: string;
106
+ cancelUrl: string;
107
+ discountCode?: string;
108
+ collectionOptionKind?: DirectCheckoutCollectionOptionKind;
109
+ };
104
110
  subject: {
105
111
  kind: 'occurrence';
106
112
  occurrenceId: string;
@@ -129,44 +135,54 @@ export interface EventRegisterRequest {
129
135
  /** Guest details when "collect all attendee details" is enabled */
130
136
  guests?: EventRegisterGuest[];
131
137
  }
132
- export type EventRegisterResponse = {
133
- success: boolean;
138
+ export type EventRegistrationPaymentSubject = {
134
139
  scope: 'occurrence';
140
+ submissionId: string;
135
141
  attendeeId: string;
136
- status: 'confirmed';
142
+ } | {
143
+ scope: 'wholeSeries';
144
+ submissionId: string;
145
+ };
146
+ export type EventRegistrationSummary = {
137
147
  paymentMethod: PaymentMethod;
138
- pendingPayment: boolean;
148
+ ticketLines?: readonly EventTicketLineSummary[];
149
+ message: string;
139
150
  passCreditsUsed?: number;
140
151
  passCreditsRemaining?: number;
141
- alreadyRegistered?: boolean;
142
- ticketLines: EventTicketLineSummary[];
143
- message?: string;
152
+ };
153
+ export type EventRegisterResponse = {
154
+ kind: 'bookingComplete';
155
+ reference: EventRegistrationStatusReference;
156
+ summary: EventRegistrationSummary;
144
157
  } | {
145
- success: boolean;
146
- scope: 'occurrence';
147
- attendeeId: string;
148
- status: 'waitlist';
149
- waitlistPosition: number | null;
150
- alreadyRegistered?: boolean;
151
- message?: string;
158
+ kind: 'paymentDeferred';
159
+ reference: EventRegistrationStatusReference;
160
+ summary: EventRegistrationSummary;
161
+ balance: {
162
+ amountCents: number;
163
+ currency: string;
164
+ };
152
165
  } | {
153
- success: boolean;
154
- scope: 'wholeSeries';
155
- registrationId: string;
156
- status: 'confirmed';
157
- paymentMethod: 'free' | 'membership';
158
- pendingPayment: false;
159
- alreadyRegistered?: boolean;
160
- ticketLines: EventTicketLineSummary[];
161
- message?: string;
166
+ kind: 'checkoutRequired';
167
+ reference: EventRegistrationStatusReference;
168
+ checkoutUrl: string;
169
+ submissionId: string;
162
170
  } | {
163
- success: boolean;
164
- scope: 'wholeSeries';
165
- waitlistEntryId: string;
166
- status: 'waitlist';
167
- waitlistPosition: number | null;
168
- alreadyRegistered?: boolean;
169
- message?: string;
171
+ kind: 'paymentStatusRequired';
172
+ subject: EventRegistrationPaymentSubject;
173
+ } | {
174
+ kind: 'waitlisted';
175
+ waitlist: {
176
+ reference: {
177
+ scope: 'occurrence';
178
+ attendeeId: string;
179
+ } | {
180
+ scope: 'occurrence' | 'wholeSeries';
181
+ waitlistEntryId: string;
182
+ };
183
+ position: number | null;
184
+ message: string;
185
+ };
170
186
  };
171
187
  /** Type of checkout for event payment */
172
188
  export type EventCheckoutType = 'event' | 'pass_bundle' | 'membership_bundle';
@@ -182,7 +198,7 @@ export type EventCheckoutRequest = EventCheckoutRequestCommon & ({
182
198
  kind: 'occurrence';
183
199
  attendeeId: string;
184
200
  };
185
- registrationCommandId?: string;
201
+ registrationCommandId: string;
186
202
  checkoutType?: EventCheckoutType;
187
203
  productId?: string;
188
204
  } | {
@@ -204,26 +220,36 @@ export type EventCheckoutRequest = EventCheckoutRequestCommon & ({
204
220
  waitlistEntryId?: string;
205
221
  checkoutAttemptId: string;
206
222
  });
207
- export type EventCheckoutResponse = {
223
+ type OccurrenceCheckoutResponse = Readonly<{
208
224
  scope: 'occurrence';
209
225
  attendeeId: string;
210
226
  checkoutUrl: string | null;
211
227
  sessionId: string | null;
212
228
  bypassed: boolean;
213
- } | {
229
+ }>;
230
+ type WholeSeriesCheckoutResponse = Readonly<{
214
231
  scope: 'wholeSeries';
215
232
  registrationId: string;
216
233
  checkoutAttemptId: string;
234
+ recoverableUntil?: string;
217
235
  checkoutUrl: string | null;
218
236
  sessionId: string | null;
219
237
  bypassed: boolean;
220
- } | {
238
+ }>;
239
+ type WholeSeriesPaymentStatusRequired = Readonly<{
240
+ scope: 'wholeSeries';
241
+ status: 'paymentStatusRequired';
242
+ checkoutAttemptId: string;
243
+ recoverableUntil: string;
244
+ }>;
245
+ type WholeSeriesWaitlistResponse = Readonly<{
221
246
  scope: 'wholeSeries';
222
247
  status: 'waitlist';
223
248
  waitlistEntryId: string;
224
249
  waitlistPosition: number | null;
225
250
  alreadyRegistered?: boolean;
226
- };
251
+ }>;
252
+ export type EventCheckoutResponse = OccurrenceCheckoutResponse | WholeSeriesCheckoutResponse | WholeSeriesPaymentStatusRequired | WholeSeriesWaitlistResponse;
227
253
  export interface EligiblePass {
228
254
  customerPassId: string;
229
255
  passName: string;
@@ -255,6 +281,19 @@ export type RegistrationOptionsRequest = EventRegistrationOptionsRequest & {
255
281
  siteId: string;
256
282
  };
257
283
  export type RegistrationOptionsResponse = EventRegistrationOptionsResponse;
284
+ export type EventRegistrationNextStepRequest = EventRegistrationOptionsRequest & {
285
+ email: string;
286
+ altchaSolution?: string | null;
287
+ };
288
+ /** Navigation only; the booking submission remains authoritative for admission. */
289
+ export type EventRegistrationNextStepResponse = {
290
+ kind: 'continue';
291
+ } | {
292
+ kind: 'waitlist';
293
+ } | {
294
+ kind: 'unavailable';
295
+ message: string;
296
+ };
258
297
  /** Payment status values returned by the backend */
259
298
  export type PaymentStatus = 'pending' | 'completed' | 'failed' | 'not_required' | 'refunded';
260
299
  /** Attendee status values returned by the backend */
@@ -282,15 +321,36 @@ export type EventCheckoutReturnRequest = {
282
321
  } | {
283
322
  kind: 'abandon';
284
323
  checkoutAttemptId: string;
324
+ } | {
325
+ kind: 'checkStatus';
326
+ subject: EventRegistrationPaymentSubject;
285
327
  };
286
328
  export type EventCheckoutReturnResponse = {
287
329
  kind: 'resolved';
288
330
  reference: EventRegistrationStatusReference;
331
+ deferredBalance?: {
332
+ amountCents: number;
333
+ currency: string;
334
+ };
289
335
  } | {
290
336
  kind: 'abandoned';
291
337
  } | {
292
338
  kind: 'notFound';
293
339
  } | {
294
340
  kind: 'reconciliationRequired';
341
+ } | {
342
+ kind: 'paymentProcessing';
343
+ recoverableUntil?: string;
344
+ } | {
345
+ kind: 'paymentAvailable';
346
+ checkoutUrl: string;
347
+ recoverableUntil?: string;
348
+ } | {
349
+ kind: 'paymentRetryAvailable';
350
+ } | {
351
+ kind: 'paymentCheckUnavailable';
352
+ recoverableUntil?: string;
353
+ } | {
354
+ kind: 'paymentAssistanceRequired';
295
355
  };
296
356
  export {};
@@ -0,0 +1,10 @@
1
+ import type { PaymentStatusRecoveryState } from './types';
2
+ type PaymentStatusStepProps = Readonly<{
3
+ state: PaymentStatusRecoveryState;
4
+ onCheck: () => void;
5
+ onContinuePayment: () => void;
6
+ onReturnToPayment: () => void;
7
+ onReturnToBooking: () => void;
8
+ }>;
9
+ export declare function PaymentStatusStep(props: PaymentStatusStepProps): import("react").JSX.Element;
10
+ export {};
@@ -10,8 +10,6 @@ type TicketSelectionStepProps = {
10
10
  occurrenceContext?: OccurrenceContext | null;
11
11
  selectedAttendanceMode?: RegistrationAttendanceMode | null;
12
12
  onAttendanceModeChange?: (attendanceMode: RegistrationAttendanceMode) => void;
13
- checkoutRecovery?: boolean;
14
- onCheckoutRecovery?: () => void;
15
13
  ticketsCount: number;
16
14
  maxTickets: number;
17
15
  visibleTicketTypes?: ReturnType<typeof getVisibleTicketTypes>;
@@ -2,7 +2,7 @@ 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, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult } from './types';
5
+ import type { EligibilityData, EventTicketSelectionLine, FormData, Guest, GuestErrors, OccurrenceContext, 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';
@@ -44,6 +44,9 @@ export type EventRegistrationFlowStatus = Readonly<{
44
44
  tag: 'verifying-payment';
45
45
  }> | Readonly<{
46
46
  tag: 'verifying-timeout';
47
+ }> | Readonly<{
48
+ tag: 'payment-status';
49
+ state: PaymentStatusRecoveryState;
47
50
  }> | Readonly<{
48
51
  tag: 'payment-failed';
49
52
  message: string;
@@ -66,6 +69,9 @@ export type EventRegistrationFlowView = Readonly<{
66
69
  }> | Readonly<{
67
70
  kind: 'verifying';
68
71
  message: string;
72
+ }> | Readonly<{
73
+ kind: 'payment-status';
74
+ state: PaymentStatusRecoveryState;
69
75
  }> | Readonly<{
70
76
  kind: 'success';
71
77
  result: RegistrationResult;
@@ -191,6 +197,7 @@ export type EventRegistrationTerminalModel = Readonly<{
191
197
  result: RegistrationResult | null;
192
198
  errorMessage: string;
193
199
  verification: UseEventRegistrationWizardResult['verification'];
200
+ paymentStatusRecovery: PaymentStatusRecoveryState | null;
194
201
  }>;
195
202
  export type EventRegistrationFlowActions = Readonly<{
196
203
  selectEvent: (event: RegistrationEvent) => void;
@@ -210,6 +217,10 @@ export type EventRegistrationFlowActions = Readonly<{
210
217
  back: () => void;
211
218
  submit: (options?: EventRegistrationSubmitOptions) => Promise<EventRegistrationSubmitResult>;
212
219
  retry: () => void;
220
+ checkPaymentStatus: () => void;
221
+ continueExistingPayment: () => void;
222
+ returnToPayment: () => void;
223
+ returnToBooking: () => void;
213
224
  }>;
214
225
  export type HeadlessEventRegistrationFlow = Readonly<{
215
226
  status: EventRegistrationFlowStatus;
@@ -10,8 +10,8 @@ export declare function resolveEventRegistrationSubmitPlan(input: Readonly<{
10
10
  eventRequiresPayment: boolean;
11
11
  canJoinWaitlist?: boolean | null;
12
12
  }>): EventRegistrationSubmitPlan;
13
- export declare function resolveHeadlessEventRegistrationStatus(wizard: Pick<UseEventRegistrationWizardResult, 'step' | 'registrationResult' | 'errorMessage'> & Partial<Pick<UseEventRegistrationWizardResult, 'errorAction'>>): EventRegistrationFlowStatus;
14
- export declare function resolveHeadlessEventRegistrationView(wizard: Readonly<Pick<UseEventRegistrationWizardResult, 'step' | 'scopedEvents' | 'occurrenceContext' | 'registrationResult' | 'errorMessage'> & {
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'>> & {
15
15
  api: Pick<UseEventRegistrationWizardResult['api'], 'config'>;
16
16
  }>): EventRegistrationFlowView;
17
17
  export declare function deriveEventRegistrationSteps(input: Readonly<{
@@ -1,4 +1,5 @@
1
1
  import type { EligibilityData } from './types';
2
+ export declare function isSelectionSoldOut(availability: EligibilityData['availability'] | undefined): boolean;
2
3
  export declare function resolveRegistrationAvailabilityBlocker(input: Readonly<{
3
4
  hasWaitlistClaim: boolean;
4
5
  eligibility: EligibilityData | null;
@@ -9,7 +10,3 @@ export declare function resolvePricingSelectionBlocker(input: Readonly<{
9
10
  hasValidSelection: boolean;
10
11
  slidingScaleSelectionMessage: string | null;
11
12
  }>): string | null;
12
- export declare function isSoldOutWithoutWaitlist(input: Readonly<{
13
- hasWaitlistClaim: boolean;
14
- eligibility: EligibilityData | null;
15
- }>): boolean;
@@ -4,6 +4,18 @@ export type RegistrationTarget = Readonly<{
4
4
  subject: RegistrationSubject;
5
5
  selectedEventId: string | null;
6
6
  }>;
7
+ /** Public requests share subject identity without copying the run's display sessions. */
8
+ export declare function toRegistrationRequestSubject(subject: RegistrationSubject, attendanceMode: 'in_person' | 'online' | null | undefined): {
9
+ kind: "occurrence";
10
+ occurrenceId: string;
11
+ attendanceMode: "in_person" | "online" | undefined;
12
+ eventSeriesId?: undefined;
13
+ } | {
14
+ kind: "wholeSeries";
15
+ eventSeriesId: string;
16
+ attendanceMode: "in_person" | "online" | undefined;
17
+ occurrenceId?: undefined;
18
+ };
7
19
  export declare function eventMatchesOccurrenceId(event: Pick<RegistrationEvent, 'selectionId' | 'registrationSubject'>, occurrenceId: string): boolean;
8
20
  export declare function findEventByOccurrenceId(events: readonly RegistrationEvent[], occurrenceId: string): RegistrationEvent | null;
9
21
  export declare function findPreSelectedEvent(input: Readonly<{
@@ -15,7 +15,7 @@ export declare function resetRegistrationAfterExpiry(input: Readonly<{
15
15
  setErrorMessage: (message: string) => void;
16
16
  setPendingRegistrationReference: (reference: EventRegistrationStatusReference | null) => void;
17
17
  }>): void;
18
- /** Recovery never starts another payment. Unknown payment outcomes go to the portal. */
18
+ /** Retry the retained submission in place; explicit payment uncertainty stays status-only. */
19
19
  export declare function recoverRegistrationError(action: EventRegistrationErrorAction, handlers: Readonly<{
20
20
  canJoinWaitlist?: boolean;
21
21
  refreshOptions: () => void;
@@ -17,6 +17,7 @@ type PendingRegistrationV5 = {
17
17
  formData: FormData;
18
18
  ticketSelections: EventTicketSelectionLine[];
19
19
  selectedEventId: string | null;
20
+ eventSeriesId?: string | null;
20
21
  selectedAttendanceMode?: 'in_person' | 'online' | null;
21
22
  paymentSelection: PaymentSelection & {
22
23
  method: Exclude<PaymentSelection['method'], null>;
@@ -1,4 +1,7 @@
1
1
  import type { EventTicketSelectionLine } from './types';
2
+ import type { PublicEventPricingOptionAvailability } from '../../../../../../core/src/index';
3
+ /** Ticket selection requests a quote; only the server admits a booking. */
4
+ export declare function canRequestTicketOption(availability: PublicEventPricingOptionAvailability): boolean;
2
5
  export declare function normalizeTicketSelectionLines(lines: readonly EventTicketSelectionLine[]): EventTicketSelectionLine[];
3
6
  export declare function getTicketSelectionTotal(lines: readonly EventTicketSelectionLine[]): number;
4
7
  export declare function getTicketLineQuantity(lines: readonly EventTicketSelectionLine[], pricingOptionId: string | null): number;
@@ -8,9 +11,7 @@ export declare function hasValidPricingOptionSelection(input: Readonly<{
8
11
  lines: readonly EventTicketSelectionLine[];
9
12
  visibleOptions: readonly Readonly<{
10
13
  pricingOptionId: string;
11
- availability: Readonly<{
12
- kind: 'available' | 'unavailable';
13
- }>;
14
+ availability: PublicEventPricingOptionAvailability;
14
15
  }>[];
15
16
  }>): boolean;
16
17
  export declare function setTicketLineQuantity(input: Readonly<{
@@ -22,8 +23,6 @@ export declare function getTicketTypeLineMax(input: Readonly<{
22
23
  currentQuantity: number;
23
24
  totalSelectedQuantity: number;
24
25
  maxTickets: number;
25
- availableSpots: number | null | undefined;
26
- ticketTypeRemainingCapacity: number | null;
27
26
  }>): number;
28
27
  export type TicketSelectionSummaryLine = Readonly<{
29
28
  pricingOptionId: string | null;
@@ -24,7 +24,7 @@ export type GuestErrors = Record<number, {
24
24
  /** Error message for name field */
25
25
  name?: string;
26
26
  }>;
27
- export type RegistrationStep = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment' | 'submitting' | 'redirecting' | 'verifying-payment' | 'verifying-timeout' | 'payment-failed' | 'success' | 'error';
27
+ export type RegistrationStep = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment' | 'submitting' | 'redirecting' | 'verifying-payment' | 'verifying-timeout' | 'payment-status' | 'payment-failed' | 'success' | 'error';
28
28
  export type RegistrationResult = {
29
29
  status: 'confirmed' | 'waitlist';
30
30
  /**
@@ -35,6 +35,14 @@ export type RegistrationResult = {
35
35
  message?: string;
36
36
  variant?: 'success' | 'info';
37
37
  };
38
+ export type PaymentStatusRecoveryState = Readonly<{
39
+ subject: import('../../api/types').EventRegistrationPaymentSubject;
40
+ }> & (Readonly<{
41
+ kind: 'ready' | 'checking' | 'processing' | 'temporarilyUnavailable' | 'retryAvailable' | 'assistanceRequired';
42
+ }> | Readonly<{
43
+ kind: 'paymentAvailable';
44
+ checkoutUrl: string;
45
+ }>);
38
46
  export type RegistrationAttendanceMode = 'in_person' | 'online';
39
47
  export type EventTicketSelectionLine = Readonly<{
40
48
  pricingOptionId: string | null;
@@ -55,8 +63,6 @@ export type EligibilityData = {
55
63
  isFree: boolean;
56
64
  /** Site credit for the authenticated registration subject, if available. */
57
65
  credit?: import('../../api').PortalCredit | null;
58
- /** Whether the user has any payment/registration options available */
59
- eligible: boolean;
60
66
  /** Whether the selected event/ticket type currently requires payment. */
61
67
  requiresPayment: boolean;
62
68
  /** Persisted pricing mode for the underlying event series. */
@@ -69,12 +75,6 @@ export type EligibilityData = {
69
75
  ticketLines: EventTicketLineSummary[];
70
76
  /** Public ticket types available for selection in ticket-type mode. */
71
77
  ticketTypes: readonly EventRegistrationPricingOption[];
72
- /** Whether the event is currently full for the requested ticket count */
73
- isFull: boolean;
74
- /** Whether waitlists are enabled for this event */
75
- waitlistEnabled: boolean;
76
- /** Whether this registration can join the waitlist instead of paying */
77
- canJoinWaitlist: boolean;
78
78
  /** Event price in cents (null if free) */
79
79
  price: number | null;
80
80
  /** Price currency code */
@@ -94,8 +94,6 @@ export type EligibilityData = {
94
94
  id: string;
95
95
  membershipName: string;
96
96
  }>;
97
- /** Whether the event accepts direct payment */
98
- canPayDirectly: boolean;
99
97
  /** Whether the event accepts passes */
100
98
  eventAcceptsPasses: boolean;
101
99
  /** Whether the event accepts memberships */
@@ -1,9 +1,9 @@
1
1
  import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
2
2
  import type { BlockApiClient } from '../../api';
3
3
  import type { EventRegistrationStatusReference, PaymentMethod } from '../../api/types';
4
- import type { RegistrationTarget } from './registrationDerivations';
4
+ import { type RegistrationTarget } from './registrationDerivations';
5
5
  import { savePendingRegistration } from './sessionStorage';
6
- import type { EventTicketSelectionLine, FormData, Guest, PaymentSelection, RegistrationResult, RegistrationStep } from './types';
6
+ import type { EventTicketSelectionLine, FormData, Guest, PaymentSelection, PaymentStatusRecoveryState, RegistrationResult, RegistrationStep } from './types';
7
7
  export type EventRegistrationSubmitOptions = Readonly<{
8
8
  redirect?: 'auto' | 'manual';
9
9
  }>;
@@ -12,6 +12,11 @@ export type EventRegistrationSubmitResult = Readonly<{
12
12
  outcome: {
13
13
  kind: 'completed';
14
14
  };
15
+ }> | Readonly<{
16
+ ok: true;
17
+ outcome: {
18
+ kind: 'payment_status';
19
+ };
15
20
  }> | Readonly<{
16
21
  ok: true;
17
22
  outcome: {
@@ -25,6 +30,7 @@ export type EventRegistrationSubmitResult = Readonly<{
25
30
  }>;
26
31
  export type EventRegistrationSubmit = (method: PaymentMethod, passId?: string, membershipId?: string, selection?: PaymentSelection, submitOptions?: EventRegistrationSubmitOptions) => Promise<EventRegistrationSubmitResult>;
27
32
  export type UseEventRegistrationSubmitInput = {
33
+ commandRef: EventRegistrationCommandRef;
28
34
  api: BlockApiClient;
29
35
  registrationTarget: RegistrationTarget | null;
30
36
  selectedAttendanceMode: 'in_person' | 'online' | null;
@@ -42,6 +48,14 @@ export type UseEventRegistrationSubmitInput = {
42
48
  setErrorAction?: (action: EventRegistrationErrorAction) => void;
43
49
  setRegistrationResult: (result: RegistrationResult) => void;
44
50
  setErrorMessage: (message: string) => void;
51
+ setPaymentStatusRecovery: (state: PaymentStatusRecoveryState | null) => void;
52
+ };
53
+ /** Shared only with explicit start-again actions; uncertainty alone retains identity. */
54
+ export type EventRegistrationCommandRef = {
55
+ current: Readonly<{
56
+ id: string;
57
+ intentKey: string;
58
+ }> | null;
45
59
  };
46
60
  export type EventRegistrationSubmitDeps = Readonly<{
47
61
  savePendingRegistration: typeof savePendingRegistration;
@@ -57,5 +71,45 @@ type ClientCommandIdCryptoSource = Readonly<{
57
71
  }>;
58
72
  export declare function createClientCommandId(cryptoSource?: ClientCommandIdCryptoSource): string;
59
73
  export declare function useEventRegistrationSubmit(options: UseEventRegistrationSubmitInput): EventRegistrationSubmit;
74
+ /**
75
+ * Describe a completed registration to the success step.
76
+ *
77
+ * Only pass redemptions adopt the server's message: it names the credits spent
78
+ * and the balance left, which the block's copy cannot. Every other method keeps
79
+ * whatever success message the site configured.
80
+ */
60
81
  export declare function useEventRegistrationSubmitWithDeps(options: UseEventRegistrationSubmitInput, deps: EventRegistrationSubmitDeps): EventRegistrationSubmit;
82
+ type SelectionSnapshot = Exclude<PaymentSelection, Readonly<{
83
+ method: null;
84
+ }>>;
85
+ /**
86
+ * Freeze everything this submission is about to send, including the command
87
+ * identity the server keys the commit on.
88
+ */
89
+ declare function prepareSubmitContext(options: UseEventRegistrationSubmitInput, registrationCommandId: string, target: RegistrationTarget, method: PaymentMethod, passId: string | undefined, membershipId: string | undefined, selection: PaymentSelection | undefined): {
90
+ registrationCommandId: string;
91
+ ticketSelections: Readonly<{
92
+ pricingOptionId: string | null;
93
+ quantity: number;
94
+ }>[];
95
+ bundleProductId: string | undefined;
96
+ selectionSnapshot: SelectionSnapshot;
97
+ guestsPayload: {
98
+ name: string;
99
+ email: string | undefined;
100
+ phone: string | undefined;
101
+ }[] | undefined;
102
+ subject: {
103
+ kind: "occurrence";
104
+ occurrenceId: string;
105
+ attendanceMode: "in_person" | "online" | undefined;
106
+ eventSeriesId?: undefined;
107
+ } | {
108
+ kind: "wholeSeries";
109
+ eventSeriesId: string;
110
+ attendanceMode: "in_person" | "online" | undefined;
111
+ occurrenceId?: undefined;
112
+ };
113
+ };
114
+ export type PreparedSubmit = ReturnType<typeof prepareSubmitContext>;
61
115
  export {};
@@ -51,8 +51,6 @@ export declare function useEventRegistrationWizard(options: UseEventRegistration
51
51
  scopedEvents: RegistrationEvent[];
52
52
  preSelectedEvent: RegistrationEvent | null;
53
53
  hasPreSelectedContext: boolean;
54
- checkoutRecovery: boolean;
55
- startCheckoutRecovery: () => void;
56
54
  step: RegistrationStep;
57
55
  setStep: (nextStep: RegistrationStep) => void;
58
56
  selectedEvent: RegistrationEvent | null;
@@ -147,6 +145,11 @@ export declare function useEventRegistrationWizard(options: UseEventRegistration
147
145
  discountContext: import("../../api").DiscountContext | null;
148
146
  shouldShowDiscountToggle: boolean;
149
147
  verification: import("./useEventRegistrationStripeReturn").EventRegistrationStripeReturnResult;
148
+ paymentStatusRecovery: import("./types").PaymentStatusRecoveryState | null;
149
+ handleCheckPaymentStatus: () => void;
150
+ handleContinueExistingPayment: () => void;
151
+ handleReturnToPayment: () => void;
152
+ handleReturnToBooking: () => void;
150
153
  handleDetailsComplete: () => Promise<EventRegistrationDetailsCompleteResult>;
151
154
  handlePaymentSelect: () => Promise<void>;
152
155
  handleUseCardInsteadOfPass: () => void;
@@ -177,8 +180,6 @@ export declare function useEventRegistrationWizardWithDeps(options: UseEventRegi
177
180
  scopedEvents: RegistrationEvent[];
178
181
  preSelectedEvent: RegistrationEvent | null;
179
182
  hasPreSelectedContext: boolean;
180
- checkoutRecovery: boolean;
181
- startCheckoutRecovery: () => void;
182
183
  step: RegistrationStep;
183
184
  setStep: (nextStep: RegistrationStep) => void;
184
185
  selectedEvent: RegistrationEvent | null;
@@ -273,6 +274,11 @@ export declare function useEventRegistrationWizardWithDeps(options: UseEventRegi
273
274
  discountContext: import("../../api").DiscountContext | null;
274
275
  shouldShowDiscountToggle: boolean;
275
276
  verification: import("./useEventRegistrationStripeReturn").EventRegistrationStripeReturnResult;
277
+ paymentStatusRecovery: import("./types").PaymentStatusRecoveryState | null;
278
+ handleCheckPaymentStatus: () => void;
279
+ handleContinueExistingPayment: () => void;
280
+ handleReturnToPayment: () => void;
281
+ handleReturnToBooking: () => void;
276
282
  handleDetailsComplete: () => Promise<EventRegistrationDetailsCompleteResult>;
277
283
  handlePaymentSelect: () => Promise<void>;
278
284
  handleUseCardInsteadOfPass: () => void;
@@ -0,0 +1,23 @@
1
+ import { type Dispatch, type SetStateAction } from 'react';
2
+ import type { BlockApiClient } from '../../api/client';
3
+ import type { EventRegistrationStatusReference } from '../../api/types';
4
+ import type { PaymentStatusRecoveryState, RegistrationResult, RegistrationStep } from './types';
5
+ type PaymentStatusSetters = Readonly<{
6
+ setPendingRegistrationReference: Dispatch<SetStateAction<EventRegistrationStatusReference | null>>;
7
+ setRegistrationResult: Dispatch<SetStateAction<RegistrationResult | null>>;
8
+ setOptionsRefreshKey: Dispatch<SetStateAction<number>>;
9
+ setStep: (step: RegistrationStep) => void;
10
+ }>;
11
+ type UsePaymentStatusRecoveryOptions = PaymentStatusSetters & Readonly<{
12
+ api: BlockApiClient;
13
+ beginNewSubmission: () => void;
14
+ }>;
15
+ export declare function usePaymentStatusRecovery(options: UsePaymentStatusRecoveryOptions): {
16
+ recovery: PaymentStatusRecoveryState | null;
17
+ showRecovery: (next: PaymentStatusRecoveryState | null) => void;
18
+ check: () => void;
19
+ continuePayment: () => void;
20
+ returnToPayment: () => void;
21
+ returnToBooking: () => void;
22
+ };
23
+ export {};
@@ -59,7 +59,7 @@ export declare function getVisibleTicketTypes(input: {
59
59
  eligibility: EligibilityData | null;
60
60
  selectedAttendanceMode?: 'in_person' | 'online' | null;
61
61
  }): SelectableEventTicketType[];
62
- export declare function getImplicitSingleAvailableTicketType(ticketTypes: readonly SelectableEventTicketType[]): SelectableEventTicketType | null;
62
+ export declare function getImplicitSingleTicketType(ticketTypes: readonly SelectableEventTicketType[]): SelectableEventTicketType | null;
63
63
  export declare function findSelectedTicketType(input: {
64
64
  event: TicketTypeSourceEvent | null;
65
65
  eligibility: EligibilityData | null;