@riverbankcms/sdk 0.148.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.
- package/README.md +1 -1
- package/dist/EventEmbeddedCheckoutStep-D00Kc8Zj.mjs +285 -0
- package/dist/{PreviewEditorSidebar-DvEPG3Z2.mjs → PreviewEditorSidebar-7ZhmmnBB.mjs} +103 -66
- package/dist/{PreviewEditorUI-D6eb6fkx.mjs → PreviewEditorUI-BIJucTRd.mjs} +3 -6
- package/dist/{PreviewQueryProvider-5znTyJuz.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
- package/dist/{SdkPreviewModeRuntime-DJ6utQ_R.mjs → SdkPreviewModeRuntime-tj45gmCX.mjs} +96 -67
- package/dist/{SiteChromeCustomizeContext-CFJYh6vo.mjs → SiteChromeCustomizeContext-BFOt0ss-.mjs} +4804 -4161
- package/dist/_dts/ai/src/contracts/proposals.d.ts +660 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +510 -0
- package/dist/_dts/api/src/billing.d.ts +2 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +33 -48
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
- package/dist/_dts/api/src/bookingOperations.d.ts +5 -7
- package/dist/_dts/api/src/bookingRecords.d.ts +15 -11
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +0 -2
- package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +5 -1
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +2 -10
- package/dist/_dts/api/src/eventManagementContracts.d.ts +4 -7
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +9 -0
- package/dist/_dts/api/src/footerSettings.d.ts +3 -3
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/navigation/bookingPortalLink.d.ts +13 -0
- package/dist/_dts/api/src/navigation.d.ts +1 -0
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -2
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -29
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +9 -173
- package/dist/_dts/api/src/request.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkThemeWire.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteOperations.d.ts +6 -2
- package/dist/_dts/api/src/siteSettings.d.ts +2 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -1
- package/dist/_dts/blocks/src/client.d.ts +2 -1
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +38 -10
- package/dist/_dts/blocks/src/portal/types.d.ts +9 -6
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +24 -24
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +30 -3
- package/dist/_dts/blocks/src/system/designCapabilities.d.ts +10 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +38 -18
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/FullyBookedStep.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +15 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentLocation.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentResponse.d.ts +72 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +66 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +13 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +11 -52
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +19 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +7 -42
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +7 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +94 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useGuestRegistrationRecovery.d.ts +30 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +24 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useRegistrationAdmission.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/wizardSteps.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +24 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -6
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/shared/stripe/browserStripe.d.ts +8 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
- package/dist/_dts/commerce/src/purchase/checkoutCopy.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
- package/dist/_dts/commerce/src/purchase/checkoutPresentation.d.ts +49 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +6 -6
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +5 -1
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +9 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +3 -3
- package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +4 -1
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +9 -2
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +7 -7
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +3 -2
- package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +6 -1
- package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +7 -0
- package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
- package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
- package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
- package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/edit-lease.d.ts +5 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/patch/index.d.ts +30 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +326 -36
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
- package/dist/_dts/media-editor/src/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +0 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
- package/dist/_dts/preview-next/src/constants.d.ts +4 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/blocks/opaquePanels.d.ts +147 -0
- package/dist/_dts/theme-core/src/boxBackgroundSchema.d.ts +22 -0
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +22 -0
- package/dist/_dts/theme-core/src/cards/roles.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +198 -0
- package/dist/_dts/theme-core/src/palette/utils/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/palette/utils/scrimContrast.d.ts +22 -0
- package/dist/_dts/theme-core/src/runtime/bridgeColourTokens.d.ts +10 -0
- package/dist/_dts/theme-core/src/schema.d.ts +330 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +0 -51
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +0 -51
- package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +11 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +7 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +7 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
- package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +12 -6
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +7 -4
- package/dist/_dts/theme-core/src/site-styles/sectionSurfaceBackgrounds.d.ts +65 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +17 -0
- package/dist/_dts/theme-core/src/surfaces/opaqueSurface.d.ts +43 -0
- package/dist/_dts/ui/src/color-picker.d.ts +1 -1
- package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
- package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-CYHOufsI.mjs} +33 -124
- package/dist/client/{CheckboxChoice-B33MqoUo.mjs → CheckboxChoice-M-3HycLw.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-Cvr9O_ca.mjs} +2 -2
- package/dist/client/{EventCombined.client-CDb11igO.mjs → EventCombined.client-m5UZIobP.mjs} +7 -7
- package/dist/client/EventEmbeddedCheckoutStep-DL6zFAkA.mjs +289 -0
- package/dist/client/{EventListing.client-EgYhzKPa.mjs → EventListing.client-DeMfCM04.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-gtmtaA2b.mjs → LeafletStaticMap-CvZ3gOdD.mjs} +1 -1
- package/dist/client/{checkoutUrls-CXhko2Rv.mjs → RichText-BtfNvQV6.mjs} +2 -29
- package/dist/client/{TerminalPanel-DvNUP5ot.mjs → TerminalPanel-CUCNEwlH.mjs} +2 -18
- package/dist/client/{ThemedButton-C7CeUJjW.mjs → ThemedButton-C7WhXuRl.mjs} +2 -2
- package/dist/client/{accordion-kjvt49rA.mjs → accordion-cQm5mjqs.mjs} +1 -1
- package/dist/client/{bookingForm-pbRZordh.mjs → bookingForm-BVPJE5RQ.mjs} +15 -11
- package/dist/client/bookings.mjs +2860 -1222
- package/dist/client/{carousel-f4Zbmicv.mjs → carousel-3vgnY7LC.mjs} +2 -2
- package/dist/client/{carousel.client-A2lG-9od.mjs → carousel.client-CISsdZvg.mjs} +1 -1
- package/dist/client/{cart-DO20An50.mjs → cart-BGK4oOjm.mjs} +3 -3
- package/dist/client/{checkout-Du5amDR_.mjs → checkout-GsBLUNJD.mjs} +3 -3
- package/dist/client/checkoutUrls-ChxwaNtO.mjs +28 -0
- package/dist/client/client.mjs +3324 -2053
- package/dist/client/{colorStyles-j5U9v5JA.mjs → colorStyles-D-32xHZh.mjs} +2 -30
- package/dist/client/{context-eW97E945.mjs → context-D_8s12Fp.mjs} +1 -1
- package/dist/client/{dates-jPCirRea.mjs → dates-DeJQbQ9T.mjs} +2 -2
- package/dist/client/{eventCalendar-C2M-iE4j.mjs → eventCalendar-cmucD4NR.mjs} +10 -10
- package/dist/client/{eventCombined-W6ns3LHg.mjs → eventCombined-ku3E9FTl.mjs} +4 -4
- package/dist/client/{eventDetails-CR-GT0f0.mjs → eventDetails-CyKZ61sF.mjs} +5 -5
- package/dist/client/{eventListing-BK8AfYZz.mjs → eventListing-B7yxGIhX.mjs} +4 -4
- package/dist/client/{eventRegistration-BJSd4KUu.mjs → eventRegistration-BoXfSFgZ.mjs} +1455 -1184
- package/dist/client/{form-BvpfbQaT.mjs → form-CNQOWhJo.mjs} +5 -5
- package/dist/client/{headerSection-I5sUQ8x-.mjs → headerSection-DahaBJGQ.mjs} +3 -3
- package/dist/client/hooks.mjs +283 -193
- package/dist/client/{locationMap-BLvwf9_f.mjs → locationMap-BoDjqYlW.mjs} +4 -4
- package/dist/client/{media-Cl38iOMI.mjs → media-BFY0y2rb.mjs} +2 -1
- package/dist/client/{newsletterForm-DrQ2weE8.mjs → newsletterForm-DtzXDklw.mjs} +4 -4
- package/dist/client/{pricing-BES87mrR.mjs → pricing-DXEh2Lhh.mjs} +1 -1
- package/dist/client/{productDetail-Url9jcc5.mjs → productDetail-D7cPa-00.mjs} +3 -3
- package/dist/client/{productList-DE7ngEZJ.mjs → productList-D1XMap66.mjs} +3 -3
- package/dist/client/{propsDecoder-D1OtGXDV.mjs → propsDecoder-DiIeBopB.mjs} +913 -322
- package/dist/client/rendering/client.mjs +3913 -2260
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3302 -2013
- package/dist/client/result-DRW7JWXz.mjs +30 -0
- package/dist/client/{routeIslandApiConfig-BG9Y-SHg.mjs → routeIslandApiConfig-wzR4lKAY.mjs} +1 -1
- package/dist/client/scrollToBlock-C86BYkyV.mjs +17 -0
- package/dist/client/{shop-CJkuySJ3.mjs → shop-CYT5P-S5.mjs} +13 -14
- package/dist/client/{shop-commerce-store-Bxm75Pg6.mjs → shop-commerce-store-wKhsJQxI.mjs} +1 -1
- package/dist/client/{shop-commerce-4rKj5n9h.mjs → shop-commerce-ypBu_dx4.mjs} +9 -9
- package/dist/client/{shopShared-DpoQDWfz.mjs → shopShared-DFGhYrf2.mjs} +52 -6
- package/dist/client/{useEventFilters-D8HliSqR.mjs → useEventFilters-blSbN5o7.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +15 -22
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/constants.mjs +5 -1
- package/dist/preview-next/index.mjs +5 -1
- package/dist/preview-next/keepAlive.mjs +149 -82
- package/dist/preview-next/middleware.mjs +15 -22
- package/dist/{previewAuthStore-BXXF3hhW.mjs → previewAuthStore-BBmV7UsW.mjs} +49 -29
- package/dist/{sdk-runtime-C2a05WjL.mjs → sdk-runtime-2p8uQk1V.mjs} +2 -2
- package/dist/{separator-CuNhBAhS.mjs → separator-Cvvzk0Oo.mjs} +1 -1
- package/dist/server/components.mjs +4041 -3704
- package/dist/server/config-validation.mjs +345 -255
- package/dist/server/config.mjs +345 -255
- package/dist/server/data.mjs +283 -193
- package/dist/server/index.mjs +20 -27
- package/dist/server/next.mjs +788 -469
- package/dist/server/page-converter.mjs +245 -121
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4018 -3690
- package/dist/server/rendering.mjs +4044 -3707
- package/dist/server/routing.mjs +314 -190
- package/dist/server/server.mjs +290 -218
- package/dist/server/theme-bridge.mjs +1122 -310
- package/dist/server/theme.mjs +126 -116
- package/dist/spinner-CDo6AkDz.mjs +658 -0
- package/dist/styles/index.css +75 -212
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
- package/dist/_dts/billing/src/checkout/platform.d.ts +0 -77
- package/dist/_dts/billing/src/config/env.d.ts +0 -29
- package/dist/_dts/billing/src/stripe/client.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +0 -63
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +0 -9
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
- package/dist/client/urlParams-D71VXFGx.mjs +0 -47
|
@@ -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 {
|
|
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: '
|
|
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: (
|
|
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
|
-
|
|
14
|
+
type RegistrationViewInput = Readonly<Pick<UseEventRegistrationWizardResult, 'step' | 'scopedEvents' | 'occurrenceContext' | 'registrationResult' | 'errorMessage' | 'paymentStatusRecovery' | 'admission' | 'recoveryMessage'> & {
|
|
15
15
|
api: Pick<UseEventRegistrationWizardResult['api'], 'config'>;
|
|
16
|
-
}
|
|
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 {};
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ import type { BlockBookingPaymentCollectionOption, BlockBookingPaymentTerms } fr
|
|
|
3
3
|
import type { EventRegistrationAvailablePaymentOption } from '../../../blocks/event-registration';
|
|
4
4
|
import { type BookingPaymentOptionViewModel } from '../../shared/bookingPaymentOptions';
|
|
5
5
|
import type { PaymentSelection } from './types';
|
|
6
|
-
type EventDirectPaymentOption =
|
|
7
|
-
kind: 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance';
|
|
8
|
-
}>;
|
|
6
|
+
type EventDirectPaymentOption = BlockBookingPaymentCollectionOption;
|
|
9
7
|
export declare function getApprovedDirectPaymentCollectionOptionKinds(paymentOptions: readonly EventRegistrationAvailablePaymentOption[]): readonly DirectCheckoutCollectionOptionKind[];
|
|
10
8
|
export type EventRegistrationDirectPaymentOption = Omit<BookingPaymentOptionViewModel, 'kind' | 'title'> & Readonly<{
|
|
11
9
|
kind: Extract<DirectCheckoutCollectionOptionKind, EventDirectPaymentOption['kind']>;
|
|
@@ -40,6 +38,8 @@ export declare function buildEventRegistrationPaymentOptionsViewModel(input: Rea
|
|
|
40
38
|
totalPriceCents: number;
|
|
41
39
|
currency: string;
|
|
42
40
|
startsAt?: string | null;
|
|
41
|
+
/** When the registration is being made; instalment schedules start here. */
|
|
42
|
+
nowIso: string;
|
|
43
43
|
locale?: string;
|
|
44
44
|
}>): EventRegistrationPaymentOptionsViewModel;
|
|
45
45
|
export declare function resolveEventRegistrationDirectPaymentSelection(input: Readonly<{
|
|
@@ -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 {};
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts
CHANGED
|
@@ -1,12 +1,73 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export
|
|
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
|
-
|
|
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;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
2
|
-
import type {
|
|
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<{
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
13
|
-
|
|
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
|
-
|
|
14
|
+
guests: Guest[];
|
|
15
|
+
selectedSlidingAmount: number | null;
|
|
16
|
+
discountCode: string;
|
|
17
|
+
mailingListSignupNote?: BookingMailingListNote;
|
|
27
18
|
timestamp: number;
|
|
28
19
|
};
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
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 {};
|
|
@@ -26,7 +26,7 @@ export type GuestErrors = Record<number, {
|
|
|
26
26
|
/** Error message for name field */
|
|
27
27
|
name?: string;
|
|
28
28
|
}>;
|
|
29
|
-
export type RegistrationStep = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment' | 'submitting' | '
|
|
29
|
+
export type RegistrationStep = 'select-event' | 'select-tickets' | 'fully-booked' | 'enter-details' | 'select-payment' | 'submitting' | 'payment' | 'verifying-payment' | 'verifying-timeout' | 'payment-status' | 'payment-failed' | 'success' | 'error';
|
|
30
30
|
export type RegistrationResult = {
|
|
31
31
|
status: 'confirmed' | 'waitlist';
|
|
32
32
|
/**
|
|
@@ -46,7 +46,7 @@ export type PaymentStatusRecoveryState = Readonly<{
|
|
|
46
46
|
kind: 'ready' | 'checking' | 'processing' | 'temporarilyUnavailable' | 'retryAvailable' | 'assistanceRequired';
|
|
47
47
|
}> | Readonly<{
|
|
48
48
|
kind: 'paymentAvailable';
|
|
49
|
-
|
|
49
|
+
checkout: import('../../api/types').EventEmbeddedCheckout;
|
|
50
50
|
}>);
|
|
51
51
|
export type RegistrationAttendanceMode = 'in_person' | 'online';
|
|
52
52
|
export type EventTicketSelectionLine = Readonly<{
|
|
@@ -197,3 +197,20 @@ export type EventRegistrationClientProps = {
|
|
|
197
197
|
mailingList?: MailingListRuntimeContext;
|
|
198
198
|
siteName?: string;
|
|
199
199
|
};
|
|
200
|
+
export type EventPaymentState = Readonly<{
|
|
201
|
+
kind: 'idle';
|
|
202
|
+
}> | Readonly<{
|
|
203
|
+
kind: 'payment';
|
|
204
|
+
checkout: import('../../api/types').EventEmbeddedCheckout;
|
|
205
|
+
subject: import('../../api/types').EventRegistrationPaymentSubject;
|
|
206
|
+
}> | Readonly<{
|
|
207
|
+
kind: 'verifying';
|
|
208
|
+
request: import('../../api/types').EventCheckoutReturnRequest;
|
|
209
|
+
resumePayment: boolean;
|
|
210
|
+
}> | Readonly<{
|
|
211
|
+
kind: 'abandoning';
|
|
212
|
+
subject: import('../../api/types').EventRegistrationPaymentSubject;
|
|
213
|
+
}> | Readonly<{
|
|
214
|
+
kind: 'recovery';
|
|
215
|
+
state: PaymentStatusRecoveryState;
|
|
216
|
+
}>;
|
|
@@ -1,42 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
api: BlockApiClient;
|
|
9
|
-
events: RegistrationEvent[];
|
|
10
|
-
registrationSubject: RegistrationSubject | null;
|
|
11
|
-
step: RegistrationStep;
|
|
12
|
-
pendingRegistrationReference: EventRegistrationStatusReference | null;
|
|
13
|
-
setFormData: (data: FormData) => void;
|
|
14
|
-
setTicketsCount: (count: number) => void;
|
|
15
|
-
setTicketSelections: (lines: readonly EventTicketSelectionLine[]) => void;
|
|
16
|
-
setSelectedEvent: (event: RegistrationEvent | null) => void;
|
|
17
|
-
setSelectedAttendanceMode: (attendanceMode: 'in_person' | 'online' | null) => void;
|
|
18
|
-
setPaymentSelection: (selection: PaymentSelection) => void;
|
|
19
|
-
setPendingRegistrationReference: (reference: EventRegistrationStatusReference | null) => void;
|
|
20
|
-
setStep: (step: RegistrationStep) => void;
|
|
21
|
-
setRegistrationResult: (result: RegistrationResult) => void;
|
|
22
|
-
setErrorMessage: (message: string) => void;
|
|
23
|
-
};
|
|
24
|
-
export type EventRegistrationStripeReturnDeps = Readonly<{
|
|
25
|
-
usePaymentVerification: typeof usePaymentVerification;
|
|
26
|
-
readReturnParams: () => Readonly<{
|
|
27
|
-
registration: string | null;
|
|
28
|
-
registration_attempt: string | null;
|
|
29
|
-
session_id: string | null;
|
|
30
|
-
}>;
|
|
31
|
-
clearReturnParams: () => void;
|
|
32
|
-
scrollToBlock: typeof scrollToBlock;
|
|
33
|
-
cleanupStaleRegistrations: typeof cleanupStaleRegistrations;
|
|
34
|
-
clearPendingRegistration: typeof clearPendingRegistration;
|
|
35
|
-
getPendingRegistration: typeof getPendingRegistration;
|
|
36
|
-
}>;
|
|
37
|
-
export type EventRegistrationStripeReturnResult = ReturnType<typeof usePaymentVerification> & Readonly<{
|
|
38
|
-
retryReturn?: () => void;
|
|
39
|
-
}>;
|
|
40
|
-
export declare function useEventRegistrationStripeReturn(options: EventRegistrationStripeReturnOptions): EventRegistrationStripeReturnResult;
|
|
41
|
-
export declare function useEventRegistrationStripeReturnWithDeps(options: EventRegistrationStripeReturnOptions, deps: EventRegistrationStripeReturnDeps): EventRegistrationStripeReturnResult;
|
|
42
|
-
export {};
|
|
1
|
+
import type { EventCheckoutReturnRequest } from '../../api/types';
|
|
2
|
+
import type { PendingRegistration } from './sessionStorage';
|
|
3
|
+
export declare function useEventRegistrationStripeReturn(options: Readonly<{
|
|
4
|
+
siteId: string | undefined;
|
|
5
|
+
restore: (pending: PendingRegistration) => void;
|
|
6
|
+
verify: (request: EventCheckoutReturnRequest) => void;
|
|
7
|
+
}>): void;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
import type { BookingMailingListNote as BookingSignupNote } from '../../../../../../core/src/index';
|
|
1
2
|
import { generateUuidV4 } from '../../../../../../core/src/index';
|
|
2
3
|
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
3
4
|
import type { BlockApiClient } from '../../api';
|
|
4
|
-
import type {
|
|
5
|
+
import type { EventEmbeddedCheckout, EventRegistrationPaymentSubject, PaymentMethod } from '../../api/types';
|
|
5
6
|
import { type RegistrationTarget } from './registrationDerivations';
|
|
6
7
|
import { savePendingRegistration } from './sessionStorage';
|
|
7
8
|
import type { EventTicketSelectionLine, FormData, Guest, PaymentSelection, PaymentStatusRecoveryState, RegistrationResult, RegistrationStep } from './types';
|
|
8
|
-
export type EventRegistrationSubmitOptions = Readonly<{
|
|
9
|
-
redirect?: 'auto' | 'manual';
|
|
10
|
-
}>;
|
|
11
9
|
export type EventRegistrationSubmitResult = Readonly<{
|
|
12
10
|
ok: true;
|
|
13
11
|
outcome: {
|
|
@@ -21,16 +19,18 @@ export type EventRegistrationSubmitResult = Readonly<{
|
|
|
21
19
|
}> | Readonly<{
|
|
22
20
|
ok: true;
|
|
23
21
|
outcome: {
|
|
24
|
-
kind: '
|
|
25
|
-
|
|
22
|
+
kind: 'checkout_ready';
|
|
23
|
+
checkout: EventEmbeddedCheckout;
|
|
24
|
+
subject: EventRegistrationPaymentSubject;
|
|
26
25
|
};
|
|
27
26
|
}> | Readonly<{
|
|
28
27
|
ok: false;
|
|
29
28
|
reason: 'blocked' | 'missing-target' | 'submission-failed';
|
|
30
29
|
message: string;
|
|
31
30
|
}>;
|
|
32
|
-
export type EventRegistrationSubmit = (method: PaymentMethod, passId?: string, membershipId?: string, selection?: PaymentSelection
|
|
31
|
+
export type EventRegistrationSubmit = (method: PaymentMethod, passId?: string, membershipId?: string, selection?: PaymentSelection) => Promise<EventRegistrationSubmitResult>;
|
|
33
32
|
export type UseEventRegistrationSubmitInput = {
|
|
33
|
+
openPayment: (checkout: EventEmbeddedCheckout, subject: EventRegistrationPaymentSubject, note?: BookingSignupNote) => void;
|
|
34
34
|
commandRef: EventRegistrationCommandRef;
|
|
35
35
|
api: BlockApiClient;
|
|
36
36
|
registrationTarget: RegistrationTarget | null;
|
|
@@ -47,7 +47,6 @@ export type UseEventRegistrationSubmitInput = {
|
|
|
47
47
|
discountCode: string;
|
|
48
48
|
claimToken: string | null;
|
|
49
49
|
waitlistEntryId?: string | null;
|
|
50
|
-
setPendingRegistrationReference: (reference: EventRegistrationStatusReference) => void;
|
|
51
50
|
setStep: (step: RegistrationStep) => void;
|
|
52
51
|
setErrorAction?: (action: EventRegistrationErrorAction) => void;
|
|
53
52
|
setRegistrationResult: (result: RegistrationResult) => void;
|