@riverbankcms/sdk 0.142.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 (90) hide show
  1. package/dist/{PreviewEditorSidebar-Dk6Dt11f.mjs → PreviewEditorSidebar-DROGfMKi.mjs} +4 -4
  2. package/dist/{PreviewEditorUI-D6EQTsCA.mjs → PreviewEditorUI-BaRjhFu-.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-CC-EPkyQ.mjs → PreviewQueryProvider-BCYICImX.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-DH1n4ytY.mjs → SdkPreviewModeRuntime-OIABYLES.mjs} +5 -5
  5. package/dist/{SiteChromeCustomizeContext-DunIzY0K.mjs → SiteChromeCustomizeContext-ohjTvZbc.mjs} +491 -525
  6. package/dist/_dts/api/src/endpoints.d.ts +7 -0
  7. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  8. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +48 -41
  9. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  10. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  11. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +95 -35
  12. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.d.ts +10 -0
  13. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +0 -2
  14. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +12 -1
  15. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +2 -2
  16. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +1 -4
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +12 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
  19. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +1 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +4 -5
  21. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +9 -11
  22. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +56 -2
  23. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -4
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +23 -0
  25. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +1 -1
  26. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -4
  27. package/dist/_dts/commerce/src/purchase/eventCheckoutRecoveryWindow.d.ts +8 -0
  28. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -1
  29. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +1 -13
  30. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3113 -3077
  31. package/dist/_dts/sdk/src/version.d.ts +1 -1
  32. package/dist/client/{BookingConsentAgreement-CnJeq3_r.mjs → BookingConsentAgreement-BoCtvzzu.mjs} +2 -2
  33. package/dist/client/{DiscountCodeDisclosure-BINEO6J9.mjs → DiscountCodeDisclosure-B5S30nZk.mjs} +1 -1
  34. package/dist/client/{EventCombined.client-srxNQ6sZ.mjs → EventCombined.client-CeZ2-zSt.mjs} +5 -5
  35. package/dist/client/{EventListing.client-DbyVyGkX.mjs → EventListing.client-DJN3j8B3.mjs} +2 -2
  36. package/dist/client/{LeafletStaticMap-B-wpijzL.mjs → LeafletStaticMap-RjtGzDQT.mjs} +1 -1
  37. package/dist/client/{accordion-B-iUXU7n.mjs → accordion-DOmnDoyg.mjs} +1 -1
  38. package/dist/client/{bookingForm-BXYPke5q.mjs → bookingForm-C0vk7pgS.mjs} +5 -5
  39. package/dist/client/bookings.mjs +449 -525
  40. package/dist/client/{carousel-Cr4aj63H.mjs → carousel-BZJ7pno3.mjs} +1 -1
  41. package/dist/client/{cart-DibP9WWa.mjs → cart-CaeVAHJl.mjs} +3 -3
  42. package/dist/client/{checkout-CrSBVnL8.mjs → checkout-7wmoNDtG.mjs} +3 -3
  43. package/dist/client/client.mjs +518 -540
  44. package/dist/client/{context-Ces-AgdR.mjs → context-BOimxE3U.mjs} +12 -1
  45. package/dist/client/{dates-BXyNeNhB.mjs → dates-BnzVksi4.mjs} +2 -2
  46. package/dist/client/{eventCalendar-HwpPeqrH.mjs → eventCalendar-l-fpaslC.mjs} +7 -7
  47. package/dist/client/{eventCombined-BpFUkuEI.mjs → eventCombined-DGGvssK6.mjs} +3 -3
  48. package/dist/client/{eventDetails-DK_agiWy.mjs → eventDetails-DRiCm_hL.mjs} +4 -4
  49. package/dist/client/{eventListing-DhzHqP1c.mjs → eventListing-dph8loYX.mjs} +3 -3
  50. package/dist/client/{eventRegistration-BdQ_Dn2d.mjs → eventRegistration-ClBohmbY.mjs} +472 -530
  51. package/dist/client/{form-B1frcuzy.mjs → form-BLVVAnd3.mjs} +2 -2
  52. package/dist/client/{headerSection-CT5z460s.mjs → headerSection-DHy4C8Ix.mjs} +2 -2
  53. package/dist/client/hooks.mjs +12 -0
  54. package/dist/client/{locationMap-CIQXB9i2.mjs → locationMap-6HuS28ck.mjs} +2 -2
  55. package/dist/client/{newsletterForm-BYNYZSes.mjs → newsletterForm-xOdcOhZP.mjs} +2 -2
  56. package/dist/client/{pricing-CbTlAsmt.mjs → pricing-ChinRYFt.mjs} +1 -1
  57. package/dist/client/{productDetail-CR7Z3yjS.mjs → productDetail-0chA5gbK.mjs} +3 -3
  58. package/dist/client/{productList-DXj00vzR.mjs → productList-OoINA0h1.mjs} +3 -3
  59. package/dist/client/{propsDecoder-DiLiBdek.mjs → propsDecoder-CIZ-hbIG.mjs} +14 -1
  60. package/dist/client/rendering/client.mjs +506 -539
  61. package/dist/client/rendering/islands.mjs +17 -17
  62. package/dist/client/rendering.mjs +517 -539
  63. package/dist/client/{scrollToBlock-CrcbBf0h.mjs → scrollToBlock-BPZl0gPZ.mjs} +1 -1
  64. package/dist/client/{shop-DgqiB_1b.mjs → shop-CLJFqNIq.mjs} +6 -6
  65. package/dist/client/{shop-commerce-D_J781in.mjs → shop-commerce-PpANg5wB.mjs} +5 -5
  66. package/dist/client/{shop-commerce-store-PGUbDwqe.mjs → shop-commerce-store-TA_Kz2ku.mjs} +1 -1
  67. package/dist/client/{shopShared-C_Bb2zwG.mjs → shopShared-DzcFcA5g.mjs} +3 -3
  68. package/dist/client/{useEventFilters-CM17Xpr1.mjs → useEventFilters-CFU21QZo.mjs} +5 -5
  69. package/dist/preview-next/before-render.mjs +11 -0
  70. package/dist/preview-next/client/runtime.mjs +4 -4
  71. package/dist/preview-next/keepAlive.mjs +11 -0
  72. package/dist/preview-next/middleware.mjs +11 -0
  73. package/dist/{previewAuthStore-oVttoRDO.mjs → previewAuthStore-JA6-I_sL.mjs} +11 -0
  74. package/dist/{sdk-runtime-DhmuRhIX.mjs → sdk-runtime-CDKl0Fr7.mjs} +2 -2
  75. package/dist/{separator-C3hlg9LH.mjs → separator-BTp96X32.mjs} +1 -1
  76. package/dist/server/components.mjs +12 -2
  77. package/dist/server/config-validation.mjs +12 -0
  78. package/dist/server/config.mjs +12 -0
  79. package/dist/server/data.mjs +12 -0
  80. package/dist/server/index.mjs +12 -1
  81. package/dist/server/next.mjs +13 -3
  82. package/dist/server/page-converter.mjs +1 -0
  83. package/dist/server/prebuild.mjs +1 -1
  84. package/dist/server/rendering/server.mjs +12 -0
  85. package/dist/server/rendering.mjs +12 -2
  86. package/dist/server/routing.mjs +12 -0
  87. package/dist/server/server.mjs +13 -1
  88. package/package.json +1 -1
  89. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +0 -14
  90. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +0 -8
@@ -5832,6 +5832,13 @@ export declare const API_ENDPOINTS: {
5832
5832
  auth: "public";
5833
5833
  responseKind: "json";
5834
5834
  };
5835
+ readonly checkPublicEventRegistrationNextStep: {
5836
+ path: "/public/sites/{siteId}/events/registration-next-step";
5837
+ method: "POST";
5838
+ auth: "public";
5839
+ responseKind: "json";
5840
+ errors: ("auth:forbidden" | "validation:invalid_input" | "server:internal_error")[];
5841
+ };
5835
5842
  readonly listPublicEventCalendarWindow: {
5836
5843
  path: "/public/sites/{siteId}/events/calendar-window";
5837
5844
  method: "GET";
@@ -1,4 +1,11 @@
1
1
  export declare const PUBLIC_EVENT_ENDPOINT_DEFINITIONS: {
2
+ checkPublicEventRegistrationNextStep: {
3
+ path: "/public/sites/{siteId}/events/registration-next-step";
4
+ method: "POST";
5
+ auth: "public";
6
+ responseKind: "json";
7
+ errors: ("auth:forbidden" | "validation:invalid_input" | "server:internal_error")[];
8
+ };
2
9
  listPublicEventCalendarWindow: {
3
10
  path: "/public/sites/{siteId}/events/calendar-window";
4
11
  method: "GET";
@@ -7,7 +7,8 @@ import type { EventRegistrationOptionsRequest, EventRegistrationOptionsResponse
7
7
  import type { PublicWaitlistClaimResponse } from '../../../commerce/src/index';
8
8
  import type { APIEndpoint } from '../apiEndpointTypes';
9
9
  import type { DirectCheckoutCollectionOptionKind, EventAttendanceMode } from '../bookingConfig';
10
- import type { EventTicketLineSummaryResponse, EventTicketSelectionRequest, PublicEventLoaderParams } from './sharedTypes';
10
+ import type { EventTicketSelectionRequest, PublicEventLoaderParams } from './sharedTypes';
11
+ import type { EventRegisterResponse as EventRegistrationOutcome, EventRegistrationPaymentSubject, EventRegistrationNextStepRequest, EventRegistrationNextStepResponse } from '../../../blocks/src/system/runtime/api/types';
11
12
  /**
12
13
  * The canonical public Event record.
13
14
  *
@@ -95,6 +96,12 @@ export type PublicEventAPIEndpoints = {
95
96
  * The single-occurrence commit is keyed on it; see #1273.
96
97
  */
97
98
  registrationCommandId: string;
99
+ checkout?: {
100
+ successUrl: string;
101
+ cancelUrl: string;
102
+ discountCode?: string;
103
+ collectionOptionKind?: DirectCheckoutCollectionOptionKind;
104
+ };
98
105
  subject: {
99
106
  kind: 'occurrence';
100
107
  occurrenceId: string;
@@ -126,51 +133,13 @@ export type PublicEventAPIEndpoints = {
126
133
  }>;
127
134
  }, {
128
135
  siteId: string;
129
- }, {
130
- success: boolean;
131
- scope: 'occurrence';
132
- attendeeId: string;
133
- status: 'confirmed';
134
- paymentMethod: 'free' | 'pass' | 'membership' | 'stripe' | 'pass_bundle' | 'membership_bundle';
135
- pendingPayment: boolean;
136
- passCreditsUsed?: number;
137
- passCreditsRemaining?: number;
138
- alreadyRegistered?: boolean;
139
- ticketLines: EventTicketLineSummaryResponse[];
140
- message: string;
141
- } | {
142
- success: boolean;
143
- scope: 'occurrence';
144
- attendeeId: string;
145
- status: 'waitlist';
146
- waitlistPosition: number | null;
147
- alreadyRegistered?: boolean;
148
- message: string;
149
- } | {
150
- success: boolean;
151
- scope: 'wholeSeries';
152
- registrationId: string;
153
- status: 'confirmed';
154
- paymentMethod: 'free' | 'membership';
155
- pendingPayment: false;
156
- alreadyRegistered?: boolean;
157
- ticketLines: EventTicketLineSummaryResponse[];
158
- message: string;
159
- } | {
160
- success: boolean;
161
- scope: 'wholeSeries';
162
- waitlistEntryId: string;
163
- status: 'waitlist';
164
- waitlistPosition: number | null;
165
- alreadyRegistered?: boolean;
166
- message: string;
167
- }>;
136
+ }, EventRegistrationOutcome>;
168
137
  createPublicEventCheckout: APIEndpoint<{
169
138
  subject: {
170
139
  kind: 'occurrence';
171
140
  attendeeId: string;
172
141
  };
173
- registrationCommandId?: string;
142
+ registrationCommandId: string;
174
143
  checkoutType?: 'event' | 'pass_bundle' | 'membership_bundle';
175
144
  productId?: string;
176
145
  discountCode?: string;
@@ -211,13 +180,27 @@ export type PublicEventAPIEndpoints = {
211
180
  checkoutUrl: string | null;
212
181
  sessionId: string | null;
213
182
  bypassed: boolean;
183
+ deferredBalance?: {
184
+ amountCents: number;
185
+ currency: string;
186
+ };
214
187
  } | {
215
188
  scope: 'wholeSeries';
216
189
  registrationId: string;
217
190
  checkoutAttemptId: string;
191
+ recoverableUntil?: string;
218
192
  checkoutUrl: string | null;
219
193
  sessionId: string | null;
220
194
  bypassed: boolean;
195
+ deferredBalance?: {
196
+ amountCents: number;
197
+ currency: string;
198
+ };
199
+ } | {
200
+ scope: 'wholeSeries';
201
+ status: 'paymentStatusRequired';
202
+ checkoutAttemptId: string;
203
+ recoverableUntil?: string;
221
204
  } | {
222
205
  scope: 'wholeSeries';
223
206
  status: 'waitlist';
@@ -228,6 +211,9 @@ export type PublicEventAPIEndpoints = {
228
211
  getPublicEventRegistrationOptions: APIEndpoint<PublicEventRegistrationOptionsRequest, {
229
212
  siteId: string;
230
213
  }, PublicEventRegistrationOptionsResponse>;
214
+ checkPublicEventRegistrationNextStep: APIEndpoint<EventRegistrationNextStepRequest, {
215
+ siteId: string;
216
+ }, EventRegistrationNextStepResponse>;
231
217
  getPublicEventRegistrationStatus: APIEndpoint<never, {
232
218
  siteId: string;
233
219
  } & ({
@@ -249,10 +235,17 @@ export type PublicEventAPIEndpoints = {
249
235
  } | {
250
236
  kind: 'abandon';
251
237
  checkoutAttemptId: string;
238
+ } | {
239
+ kind: 'checkStatus';
240
+ subject: EventRegistrationPaymentSubject;
252
241
  }, {
253
242
  siteId: string;
254
243
  }, {
255
244
  kind: 'resolved';
245
+ deferredBalance?: {
246
+ amountCents: number;
247
+ currency: string;
248
+ };
256
249
  reference: {
257
250
  scope: 'occurrence';
258
251
  attendeeId: string;
@@ -266,6 +259,20 @@ export type PublicEventAPIEndpoints = {
266
259
  kind: 'notFound';
267
260
  } | {
268
261
  kind: 'reconciliationRequired';
262
+ } | {
263
+ kind: 'paymentProcessing';
264
+ recoverableUntil?: string;
265
+ } | {
266
+ kind: 'paymentAvailable';
267
+ checkoutUrl: string;
268
+ recoverableUntil?: string;
269
+ } | {
270
+ kind: 'paymentRetryAvailable';
271
+ } | {
272
+ kind: 'paymentCheckUnavailable';
273
+ recoverableUntil?: string;
274
+ } | {
275
+ kind: 'paymentAssistanceRequired';
269
276
  }>;
270
277
  getPublicEventTicketQrSvg: APIEndpoint<never, {
271
278
  siteId: string;
@@ -4,7 +4,7 @@
4
4
  * Factory function for creating a typed API client for block client-side API calls.
5
5
  */
6
6
  import { type CalendarWindowPage, type CalendarWindowRequest } from '../../blocks/events/shared/calendarWindow';
7
- import type { BlockApiConfig, ApiFieldError, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, BookingSubmitRequest, BookingPackageSubmitRequest, BookingSubmitResponse, EligibleAppointmentPackagesResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, WeeklySlotAvailabilityRequest, WeeklySlotAvailabilityResponse, AvailableDatesRequest, AvailableDatesResponse, BookingServicesResponse, BookingServiceResponse, BookingResourcesResponse, PublicEventsRequest, PublicEvent, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, RegistrationOptionsRequest, RegistrationOptionsResponse, EventRegistrationStatusRequest, EventRegistrationStatusResponse, EventCheckoutReturnRequest, EventCheckoutReturnResponse, ResolveWaitlistClaimRequest, ResolveWaitlistClaimResponse, DiscountsAvailableRequest, DiscountsAvailableResponse, DiscountApplyRequest, DiscountApplyResponse, PublicProductsResponse, ShopCheckoutRequest, ShopCheckoutResponse, UnifiedCheckoutRequest, UnifiedCheckoutResponse, PublicGiftingOffersResponse, CreateGiftingCheckoutRequest, CreateGiftingCheckoutResponse, ClaimGiftCardRequest, ClaimGiftCardResponse, PortalMeResponse, CustomerProfile, CustomerOrder, PortalMeUpdateRequest, CustomerPass, CustomerMembership, CustomerEventRegistration, PortalEventTicket, CustomerAppointment, BookingQuestionsTaskDetail, CustomerEventSeriesRegistration, PortalCredit, PortalOrderCheckoutRequest, PortalOrderCheckoutResponse, PortalDigitalProductAccessResponse, PortalDigitalProductDownloadUrlResponse, PortalDigitalProductsResponse, PortalCancelWholeSeriesRegistrationRequest, PortalCancelWholeSeriesRegistrationResult, PortalCancelAppointmentRequest, PortalCancelAppointmentResult, PortalUpdateAppointmentBookingQuestionsRequest, PortalUpdateWholeSeriesBookingQuestionsRequest, PortalUpdateEventBookingQuestionsRequest, PortalCancelEventRegistrationRequest, PortalCancelEventRegistrationResult, PortalTransferEventRegistrationRequest, PortalTransferEventRegistrationResult, PortalRescheduleAppointmentRequest, PortalRescheduleAppointmentResponse, PortalCancelMembershipAtPeriodEndResult, MagicLinkRequest, EventGuest, UpdateEventGuestsRequest, NewsletterSubscribeRequest, NewsletterSubscribeResponse } from './types';
7
+ import type { BlockApiConfig, ApiFieldError, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, BookingSubmitRequest, BookingPackageSubmitRequest, BookingSubmitResponse, EligibleAppointmentPackagesResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, WeeklySlotAvailabilityRequest, WeeklySlotAvailabilityResponse, AvailableDatesRequest, AvailableDatesResponse, BookingServicesResponse, BookingServiceResponse, BookingResourcesResponse, PublicEventsRequest, PublicEvent, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, RegistrationOptionsRequest, EventRegistrationNextStepRequest, EventRegistrationNextStepResponse, RegistrationOptionsResponse, EventRegistrationStatusRequest, EventRegistrationStatusResponse, EventCheckoutReturnRequest, EventCheckoutReturnResponse, ResolveWaitlistClaimRequest, ResolveWaitlistClaimResponse, DiscountsAvailableRequest, DiscountsAvailableResponse, DiscountApplyRequest, DiscountApplyResponse, PublicProductsResponse, ShopCheckoutRequest, ShopCheckoutResponse, UnifiedCheckoutRequest, UnifiedCheckoutResponse, PublicGiftingOffersResponse, CreateGiftingCheckoutRequest, CreateGiftingCheckoutResponse, ClaimGiftCardRequest, ClaimGiftCardResponse, PortalMeResponse, CustomerProfile, CustomerOrder, PortalMeUpdateRequest, CustomerPass, CustomerMembership, CustomerEventRegistration, PortalEventTicket, CustomerAppointment, BookingQuestionsTaskDetail, CustomerEventSeriesRegistration, PortalCredit, PortalOrderCheckoutRequest, PortalOrderCheckoutResponse, PortalDigitalProductAccessResponse, PortalDigitalProductDownloadUrlResponse, PortalDigitalProductsResponse, PortalCancelWholeSeriesRegistrationRequest, PortalCancelWholeSeriesRegistrationResult, PortalCancelAppointmentRequest, PortalCancelAppointmentResult, PortalUpdateAppointmentBookingQuestionsRequest, PortalUpdateWholeSeriesBookingQuestionsRequest, PortalUpdateEventBookingQuestionsRequest, PortalCancelEventRegistrationRequest, PortalCancelEventRegistrationResult, PortalTransferEventRegistrationRequest, PortalTransferEventRegistrationResult, PortalRescheduleAppointmentRequest, PortalRescheduleAppointmentResponse, PortalCancelMembershipAtPeriodEndResult, MagicLinkRequest, EventGuest, UpdateEventGuestsRequest, NewsletterSubscribeRequest, NewsletterSubscribeResponse } from './types';
8
8
  type WithoutSiteId<T> = T extends unknown ? Omit<T, 'siteId'> : never;
9
9
  type PublicProductCategorySelector = Readonly<{
10
10
  kind: 'category';
@@ -57,6 +57,7 @@ export interface BlockApiClient {
57
57
  registerForEvent(data: Omit<EventRegisterRequest, 'siteId'>): Promise<EventRegisterResponse>;
58
58
  createEventCheckout(data: WithoutSiteId<EventCheckoutRequest>): Promise<EventCheckoutResponse>;
59
59
  getRegistrationOptions(data: Omit<RegistrationOptionsRequest, 'siteId'>): Promise<RegistrationOptionsResponse>;
60
+ checkRegistrationNextStep(data: EventRegistrationNextStepRequest): Promise<EventRegistrationNextStepResponse>;
60
61
  getEventRegistrationStatus(params: WithoutSiteId<EventRegistrationStatusRequest>): Promise<EventRegistrationStatusResponse>;
61
62
  resolveEventCheckoutReturn(data: EventCheckoutReturnRequest): Promise<EventCheckoutReturnResponse>;
62
63
  resolveWaitlistClaim(data: Omit<ResolveWaitlistClaimRequest, 'siteId'>): Promise<ResolveWaitlistClaimResponse>;
@@ -101,6 +101,10 @@ export declare const EVENTS: {
101
101
  method: "POST";
102
102
  authScope: "portal";
103
103
  };
104
+ registrationNextStep: {
105
+ path: string;
106
+ method: "POST";
107
+ };
104
108
  registrationStatus: {
105
109
  path: string;
106
110
  method: "GET";
@@ -432,6 +436,10 @@ export declare const ENDPOINTS: {
432
436
  method: "POST";
433
437
  authScope: "portal";
434
438
  };
439
+ registrationNextStep: {
440
+ path: string;
441
+ method: "POST";
442
+ };
435
443
  registrationStatus: {
436
444
  path: string;
437
445
  method: "GET";
@@ -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 */