@riverbankcms/sdk 0.151.0 → 0.152.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/CHANGELOG.md +37 -0
- package/dist/{EventEmbeddedCheckoutStep-BBHbM22D.mjs → EventEmbeddedCheckoutStep-DVQXWFm6.mjs} +10 -9
- package/dist/{PreviewEditorSidebar-BHplI9HE.mjs → PreviewEditorSidebar-Dr4NJi3Q.mjs} +4 -3
- package/dist/{PreviewEditorUI-DuyN8nsD.mjs → PreviewEditorUI-DSZXQbyh.mjs} +5 -4
- package/dist/{SdkPreviewModeRuntime-CR5ypwxJ.mjs → SdkPreviewModeRuntime-Dl4GyMc3.mjs} +124 -53
- package/dist/{SiteChromeCustomizeContext-D5t6joF_.mjs → SiteChromeCustomizeContext-DgBe-FlM.mjs} +20418 -32298
- package/dist/ThemedButton-B8ViBnLK.mjs +16350 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +5 -3
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +7 -0
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +10 -1
- package/dist/_dts/api/src/siteAssets.d.ts +1 -0
- package/dist/_dts/blocks/src/definitions.d.ts +1 -1
- package/dist/_dts/blocks/src/index.d.ts +1 -0
- package/dist/_dts/blocks/src/pageRenderPreparation.d.ts +1 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/content/utils/sanitizeHref.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +16 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +2 -0
- package/dist/_dts/blocks/src/system/helpers/normalizeMailingListBlockContent.d.ts +2 -0
- package/dist/_dts/blocks/src/system/registry.d.ts +14 -2
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -5
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/schemas/events.d.ts +971 -0
- package/dist/_dts/blocks/src/system/runtime/api/schemas/waitlist-claims.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +10 -136
- 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/useBookingSubmission.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +6 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.client.hooks.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.client.state.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/BookingEntryViews.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +19 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +24 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardContent.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/GuestDetailsSection.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SingleTicketEntitlementNote.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingCardDisplay.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingEntry.d.ts +154 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingFocus.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/finishedBooking.d.ts +77 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/index.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/offeringNoun.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentResponse.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +33 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDisplay.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDraft.state.d.ts +60 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +58 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +23 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useBookingBarFacts.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationRecoveryRequest.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +4 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +1563 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +2 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +147 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +50 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/waitlistClaimRestoration.d.ts +6 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/wizardSteps.d.ts +85 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +53 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/MonthLookView.d.ts +10 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptionCopy.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +37 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/PaymentChoiceRows.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +9 -12
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/themePortalRoot.d.ts +10 -15
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/links.d.ts +3 -1
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +14 -14
- package/dist/_dts/commerce/src/purchase/confirmationPayment.d.ts +65 -0
- package/dist/_dts/commerce/src/purchase/confirmationPaymentSchema.d.ts +66 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +2 -2
- package/dist/_dts/core/src/appointment-booking-terms.d.ts +20 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +70 -0
- package/dist/_dts/core/src/branded.d.ts +0 -2
- package/dist/_dts/core/src/demo-claim-access.d.ts +1 -1
- package/dist/_dts/core/src/demo-claim-readiness.d.ts +18 -0
- package/dist/_dts/core/src/demo-lifecycle-status.d.ts +1 -1
- package/dist/_dts/core/src/demo-warm-pool-target.d.ts +1 -1
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/mailing-list-targeting-availability.d.ts +68 -0
- package/dist/_dts/core/src/mailing-list-targeting.d.ts +2 -0
- package/dist/_dts/core/src/ticket-quantity.d.ts +13 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +51 -32
- package/dist/_dts/editor/src/chrome/chromeLayers.d.ts +7 -0
- package/dist/_dts/editor/src/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkAddressInput.d.ts +8 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkContentList.d.ts +12 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +5 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPickerDialog.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +8 -2
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +4 -3
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidgetContext.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/draft.d.ts +44 -0
- package/dist/_dts/editor-blocks/src/widgets/link/presentation.d.ts +13 -0
- package/dist/_dts/editor-blocks/src/widgets/link/types.d.ts +14 -0
- package/dist/_dts/editor-blocks/src/widgets/link/useRoutableContent.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +5 -4
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +13 -8
- package/dist/_dts/media-core/src/fileStorage.d.ts +4 -3
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/storageObjectKey.d.ts +12 -0
- package/dist/_dts/media-react/src/hooks/useSupabaseMediaUploader.d.ts +1 -1
- package/dist/_dts/media-react/src/internal/supabaseResumableUpload.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/previewModeRootAttribute.d.ts +11 -0
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/image.d.ts +10 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/link.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/opaquePanels.d.ts +3 -3
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/client/BookingMailingListNote-CBuMKN0w.mjs +386 -0
- package/dist/client/{CardListItem-ZDLYh6dL.mjs → CardListItem-Dc9XTXhB.mjs} +3 -4
- package/dist/client/CheckIcon-CpyXr-Kg.mjs +35 -0
- package/dist/client/{CheckboxChoice-M-3HycLw.mjs → CheckboxChoice-CIqx_o0E.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BMtvPTWE.mjs → DemoBookingPortalAccess-D3VQ_kLj.mjs} +85 -85
- package/dist/client/{EventCombined.client-DUm_DOxW.mjs → EventCombined.client-BHGEKise.mjs} +8 -9
- package/dist/client/{EventEmbeddedCheckoutStep-DsNNzgRm.mjs → EventEmbeddedCheckoutStep-Bo1Cm23R.mjs} +11 -10
- package/dist/client/{EventListing.client-DjNYGUVm.mjs → EventListing.client-D5OQgVPr.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DuFiOHq_.mjs → LeafletStaticMap-CLL5cWrr.mjs} +1 -1
- package/dist/client/{ModalShell-CqkBvBIC.mjs → ModalShell-BXzucfR6.mjs} +83 -12
- package/dist/client/{RichText-LjPCUGGi.mjs → RichText-BoDmnopf.mjs} +6 -3
- package/dist/client/{ThemedButton-DZKjtaDD.mjs → ThemedButton-Ciltp0IK.mjs} +2 -2
- package/dist/client/{accordion-Qe--SILD.mjs → accordion-DOkRS64-.mjs} +1 -1
- package/dist/client/aspectTransforms-D-TnDdq4.mjs +93 -0
- package/dist/client/{bookingForm-3BCl4g_f.mjs → bookingForm-wlMVwo9h.mjs} +289 -149
- package/dist/client/bookings.mjs +12212 -10832
- package/dist/client/{carousel-h2YjKOS2.mjs → carousel-CGWk-Z0u.mjs} +2 -2
- package/dist/client/{carousel.client-BLrd4hmY.mjs → carousel.client-kX5mN1Eg.mjs} +46 -41
- package/dist/client/{cart-5NeiigVd.mjs → cart-OBBPlaH4.mjs} +3 -3
- package/dist/client/{checkout-G4UWjOEw.mjs → checkout-Bmw2WjQX.mjs} +3 -3
- package/dist/client/client.mjs +9541 -6039
- package/dist/client/{colorStyles-DTunOThj.mjs → colorStyles-ECDNPE_P.mjs} +23 -86
- package/dist/client/{context-GK4-AVAh.mjs → context-BI77UFAn.mjs} +275 -10
- package/dist/client/{eventCalendar-Prw3Yo_L.mjs → eventCalendar-qkej2Edn.mjs} +19 -17
- package/dist/client/{eventCombined-BUugi6__.mjs → eventCombined-DApKHvat.mjs} +4 -4
- package/dist/client/{eventDetails-CBHUda-R.mjs → eventDetails-BQyUDPH0.mjs} +3 -4
- package/dist/client/{eventListing-CQeG45Dg.mjs → eventListing-CeAnshlZ.mjs} +4 -4
- package/dist/client/{eventRegistration-Dif3p3oJ.mjs → eventRegistration-C3A3NyBO.mjs} +2209 -2144
- package/dist/client/{form-Cf0WMtfG.mjs → form-DW8rU7jO.mjs} +6 -6
- package/dist/client/{headerSection-Bqdr3JWp.mjs → headerSection-CkIhsoNm.mjs} +9 -9
- package/dist/client/hooks.mjs +1289 -380
- package/dist/client/{locationMap-BVvPou4O.mjs → locationMap-D4O8wbli.mjs} +4 -4
- package/dist/client/{media-47fcnhzD.mjs → media-C5K_0xPd.mjs} +2 -2
- package/dist/client/{newsletterForm-Cx-1dnic.mjs → newsletterForm-B7IxSPuz.mjs} +5 -5
- package/dist/client/{productDetail-DaUMaJYk.mjs → productDetail-Bqxpwy5N.mjs} +3 -3
- package/dist/client/{productList-BKQlWEKE.mjs → productList-u9Lz8V15.mjs} +3 -3
- package/dist/client/{propsDecoder-DO5iXphQ.mjs → propsDecoder-Bf1jucUp.mjs} +17333 -14489
- package/dist/client/rendering/client.mjs +58216 -55133
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +9099 -5636
- package/dist/client/{routeIslandApiConfig-BNm0Z3-g.mjs → routeIslandApiConfig-BgP-aPMl.mjs} +1 -1
- package/dist/client/{shop-D7ytcFBC.mjs → shop-B_eykR-_.mjs} +16 -14
- package/dist/client/{shop-commerce-D68-hHy2.mjs → shop-commerce-CT0APkFV.mjs} +9 -9
- package/dist/client/{shop-commerce-store-Cu7X2lyu.mjs → shop-commerce-store-DcvZxdEK.mjs} +1 -1
- package/dist/client/{shopShared-D12rxE69.mjs → shopShared-BVJOiUiJ.mjs} +5 -5
- package/dist/client/themePortalRoot-DS92SRVZ.mjs +47 -0
- package/dist/client/{TerminalPanel-DOTSUCO0.mjs → useDiscountCodeUi-DPmYDunz.mjs} +60 -77
- package/dist/client/{useEventPagination-jgKa67KV.mjs → useEventPagination-8-U55vH5.mjs} +7 -8
- package/dist/preview-next/before-render.mjs +7 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/keepAlive.mjs +7 -0
- package/dist/preview-next/middleware.mjs +7 -0
- package/dist/{sdk-runtime-4cCWO_3i.mjs → sdk-runtime-C5jPdSrk.mjs} +1 -1
- package/dist/server/components.mjs +3138 -1373
- package/dist/server/config-validation.mjs +1395 -486
- package/dist/server/config.mjs +1395 -486
- package/dist/server/data.mjs +1289 -380
- package/dist/server/index.mjs +8 -1
- package/dist/server/next.mjs +3362 -1538
- package/dist/server/page-converter.mjs +1357 -453
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2335 -1044
- package/dist/server/rendering.mjs +3152 -1370
- package/dist/server/routing.mjs +1437 -490
- package/dist/server/server.mjs +1297 -381
- package/dist/server/theme-bridge.mjs +1135 -795
- package/dist/{spinner-tSdG9YvG.mjs → spinner-B-ab2rJp.mjs} +1 -1
- package/dist/styles/index.css +1088 -721
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/OrderSummary.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +0 -22
- package/dist/_dts/blocks/src/system/runtime/shared/components/SelectableOptionCard.d.ts +0 -30
- package/dist/client/BookingMailingListNote-DlDSs5Vm.mjs +0 -567
- package/dist/client/pricing-CMD0kADd.mjs +0 -314
- package/dist/client/result-DRW7JWXz.mjs +0 -30
- package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
- package/dist/client/themePortalRoot-AGs4cE7t.mjs +0 -30
- package/dist/spinner-BL3kW9Uh.mjs +0 -803
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
import { type ResolvedBookingCollectionOption } from '../../../../../commerce/src/purchase/index';
|
|
2
|
-
import { type BookingPaymentCollectionOptionKind } from '../../../../../core/src/index';
|
|
2
|
+
import { type BookingPaymentCollectionOptionKind, type AppointmentBookingTerms } from '../../../../../core/src/index';
|
|
3
3
|
export type BookingPaymentSelectionKind = BookingPaymentCollectionOptionKind;
|
|
4
4
|
export type BookingPaymentOptionSummaryRow = Readonly<{
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
}>;
|
|
8
|
+
/** The two figures a payment choice leads with, as numbers and as written. */
|
|
9
|
+
export type BookingPaymentOptionAmounts = Readonly<{
|
|
10
|
+
totalCents: number;
|
|
11
|
+
dueTodayCents: number;
|
|
12
|
+
formattedTotal: string;
|
|
13
|
+
formattedDueToday: string;
|
|
14
|
+
}>;
|
|
8
15
|
export type BookingPaymentOptionViewModel = Readonly<{
|
|
9
16
|
kind: BookingPaymentSelectionKind;
|
|
10
17
|
/** Copy can describe full payment without changing the admitted collection kind. */
|
|
11
18
|
presentationKind: BookingPaymentSelectionKind;
|
|
12
19
|
title: string;
|
|
13
20
|
description: string;
|
|
21
|
+
/** Total and Due today, then `termRows`: the full summary as written. */
|
|
14
22
|
summaryRows: readonly BookingPaymentOptionSummaryRow[];
|
|
23
|
+
amounts: BookingPaymentOptionAmounts;
|
|
24
|
+
/** Structured balance facts; presentation labels never identify money. */
|
|
25
|
+
flexibleBalance: Readonly<{
|
|
26
|
+
remainingBalance: string;
|
|
27
|
+
balanceDueBy: string;
|
|
28
|
+
depositPolicy: string;
|
|
29
|
+
}> | null;
|
|
30
|
+
/** The terms beyond the two amounts (balance, deposit policy, schedule). */
|
|
31
|
+
termRows: readonly BookingPaymentOptionSummaryRow[];
|
|
15
32
|
helperText?: string;
|
|
16
33
|
ctaLabel: string;
|
|
17
34
|
dueNowCents: number;
|
|
@@ -28,3 +45,22 @@ export declare function buildBookingPaymentSelectionViewModel(input: Readonly<{
|
|
|
28
45
|
priceCurrency?: string | null;
|
|
29
46
|
locale?: string;
|
|
30
47
|
}>): BookingPaymentSelectionViewModel;
|
|
48
|
+
/**
|
|
49
|
+
* A payment choice's price for its row (issue 1581): the total when it's all
|
|
50
|
+
* paid now, "£18.00 due" when nothing is paid now, otherwise what's paid today.
|
|
51
|
+
*/
|
|
52
|
+
export declare function paymentChoicePrice(amounts: BookingPaymentOptionAmounts): string;
|
|
53
|
+
/** The row's supporting lines: its description, the total when the price is today's part, then its terms. */
|
|
54
|
+
export declare function paymentChoiceDetails(input: Readonly<{
|
|
55
|
+
description: string;
|
|
56
|
+
amounts: BookingPaymentOptionAmounts;
|
|
57
|
+
termRows: readonly BookingPaymentOptionSummaryRow[];
|
|
58
|
+
helperText?: string;
|
|
59
|
+
}>): readonly string[];
|
|
60
|
+
/** Reviewed net amounts use the same payment facts and copy as the payment step. */
|
|
61
|
+
export declare function buildReviewedBookingPaymentViewModel(input: Readonly<{
|
|
62
|
+
terms: AppointmentBookingTerms;
|
|
63
|
+
bookingStartAt: string | null;
|
|
64
|
+
anchorAt: string;
|
|
65
|
+
locale?: string;
|
|
66
|
+
}>): BookingPaymentOptionViewModel | null;
|
|
@@ -22,13 +22,20 @@ export type ModalShellProps = Readonly<{
|
|
|
22
22
|
titleClassName?: string;
|
|
23
23
|
closeButtonClassName?: string;
|
|
24
24
|
closeIcon?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Where focus goes when the shell closes, given the element that opened it.
|
|
27
|
+
* By default the opener itself; a caller whose opener may not be focusable
|
|
28
|
+
* yet when the shell closes (an inert bar) decides its own destination.
|
|
29
|
+
*/
|
|
30
|
+
returnFocus?: (opener: HTMLElement | null) => void;
|
|
25
31
|
}>;
|
|
26
32
|
/**
|
|
27
33
|
* Shared, unopinionated modal shell for interactive runtime flows.
|
|
28
34
|
*
|
|
29
35
|
* Styling is supplied by the caller via class names, while the shell owns
|
|
30
|
-
* focus
|
|
36
|
+
* focus (trapped inside, returned on close), escape handling for the
|
|
37
|
+
* innermost open shell, body-scroll locking, overlay clicks, and optional
|
|
31
38
|
* portaling into a themed root.
|
|
32
39
|
*/
|
|
33
|
-
export declare function ModalShell({ title, titleId, onClose, children, portalRoot, portal, portalWrapperClassName, portalWrapperProps, overlayClassName, modalClassName, renderSrOnlyTitle, renderHeader, headerClassName, titleClassName, closeButtonClassName, closeIcon, }: ModalShellProps): React.ReactNode;
|
|
40
|
+
export declare function ModalShell({ title, titleId, onClose, children, portalRoot, portal, portalWrapperClassName, portalWrapperProps, overlayClassName, modalClassName, renderSrOnlyTitle, renderHeader, headerClassName, titleClassName, closeButtonClassName, closeIcon, returnFocus, }: ModalShellProps): React.ReactNode;
|
|
34
41
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* One way to pay, as a full-width row (issue 1581): the label and detail on
|
|
4
|
+
* the left, the price on the right. Event and appointment booking both
|
|
5
|
+
* render their payment choices through this.
|
|
6
|
+
*/
|
|
7
|
+
export type PaymentChoiceRow = Readonly<{
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** Supporting lines under the label. */
|
|
11
|
+
details?: readonly string[];
|
|
12
|
+
/** What this choice costs, e.g. "£18.00" or "£18.00 due". */
|
|
13
|
+
price?: string | null;
|
|
14
|
+
selected: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Why a disabled row can't be chosen; shown in the row, not a tooltip. */
|
|
17
|
+
disabledReason?: string;
|
|
18
|
+
onSelect: () => void;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Payment choices as a radio group. Native radios give the whole row as the
|
|
22
|
+
* hit area and arrow-key movement between choices; the selected row takes the
|
|
23
|
+
* primary accent and disabled rows stay readable with their reason.
|
|
24
|
+
*/
|
|
25
|
+
export declare function PaymentChoiceRows(props: Readonly<{
|
|
26
|
+
label: string;
|
|
27
|
+
rows: readonly PaymentChoiceRow[];
|
|
28
|
+
}>): React.ReactElement;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared
|
|
3
|
-
*
|
|
2
|
+
* Shared progress indicator for registration wizards (event and appointment
|
|
3
|
+
* booking): the current step's label, "Step N of M", and a thin bar.
|
|
4
4
|
*
|
|
5
5
|
* Two class channels can be emitted (independently or together):
|
|
6
6
|
* - `emitSharedClasses` adds the shared registration-surface classes
|
|
7
|
-
* (`rb-
|
|
8
|
-
*
|
|
9
|
-
* - `classPrefix` adds block-prefixed classes (e.g. `er-
|
|
10
|
-
*
|
|
7
|
+
* (`rb-progress`, `rb-progress__fill`, ...) styled by theme-core
|
|
8
|
+
* `blocks-static/registration-surface.css`.
|
|
9
|
+
* - `classPrefix` adds block-prefixed classes (e.g. `er-progress`), kept as a
|
|
10
|
+
* stable hook surface for per-site theme CSS.
|
|
11
11
|
*
|
|
12
|
-
* Blocks opt in to the shared channel as part of their registration-surface
|
|
13
|
-
* migration (issue 1174); until then a prefix-only render is unchanged output.
|
|
14
12
|
* At least one channel must be enabled or the indicator renders unstyled.
|
|
15
13
|
*/
|
|
16
14
|
/**
|
|
@@ -19,13 +19,13 @@ export { StateIcon } from './StateIcon';
|
|
|
19
19
|
export type { LoggedInAsUserProps } from './LoggedInAsUser';
|
|
20
20
|
export { MembershipHero } from './MembershipHero';
|
|
21
21
|
export { ModalShell } from './ModalShell';
|
|
22
|
+
export { PaymentChoiceRows } from './PaymentChoiceRows';
|
|
23
|
+
export type { PaymentChoiceRow } from './PaymentChoiceRows';
|
|
22
24
|
export type { ModalShellProps } from './ModalShell';
|
|
23
25
|
export { TabBarFragment } from './TabBarFragment';
|
|
24
26
|
export { TerminalPanel } from './TerminalPanel';
|
|
25
27
|
export type { TerminalPanelProps, TerminalPanelTitleElement, } from './TerminalPanel';
|
|
26
28
|
export { StepIndicator } from './StepIndicator';
|
|
27
29
|
export type { StepIndicatorBaseProps, StepIndicatorProps, } from './StepIndicator';
|
|
28
|
-
export { RB_OPTION_CARD_CLASSES, SelectableOptionCard, } from './SelectableOptionCard';
|
|
29
|
-
export type { SelectableOptionCardProps } from './SelectableOptionCard';
|
|
30
30
|
export { ThemedActionsButton, ThemedAuthoredButton, ThemedButton, ThemedButtonLink, ThemedButtonSpecimen, ThemedDownloadLink } from './ThemedButton';
|
|
31
31
|
export type { ThemedActionsButtonProps, ThemedAuthoredButtonProps, ThemedButtonProps, ThemedButtonLinkProps, ThemedButtonSpecimenProps, ThemedDownloadLinkProps } from './ThemedButton';
|
|
@@ -8,5 +8,5 @@ export { DEFAULT_CURRENCY } from './types';
|
|
|
8
8
|
export { BOOK_TARGET_PARAMS, buildCheckoutReturnUrls, resolveDedicatedBookingHref, resolveDedicatedBookingPath, resolveDedicatedBookingTarget, formatPrice, scrollToBlock, consumeSearchParam, consumeSearchParams, validateFormData, getStepNumber, } from './utils';
|
|
9
9
|
export type { DedicatedBookingTarget, UniversalBookingRouteTarget, } from './utils';
|
|
10
10
|
export { createBodyThemePortalRoot } from './utils';
|
|
11
|
-
export { ActionRow, CheckIcon, ClockIcon, CrossIcon, BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell,
|
|
12
|
-
export type { ActionRowProps,
|
|
11
|
+
export { ActionRow, CheckIcon, ClockIcon, CrossIcon, BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, StateIcon, StepIndicator, TerminalPanel, } from './components';
|
|
12
|
+
export type { ActionRowProps, DiscountCodeDisclosureProps, DiscountCodeDisclosureSurface, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { useBlockApi } from
|
|
2
|
-
import type
|
|
1
|
+
import { useBlockApi } from '../api';
|
|
2
|
+
import { type WaitlistClaimCredential, type WaitlistClaimRequest, type WaitlistClaimLookup } from './useWaitlistClaim.state';
|
|
3
3
|
export declare function getWaitlistClaimTokenFromUrl(): string | null;
|
|
4
4
|
export declare function getWaitlistClaimEntryIdFromUrl(): string | null;
|
|
5
|
-
export type UseWaitlistClaimResult =
|
|
6
|
-
token: string | null;
|
|
7
|
-
entryId: string | null;
|
|
8
|
-
claim: ResolveWaitlistClaimResponse | null;
|
|
9
|
-
error: string | null;
|
|
10
|
-
loginMessage: string | null;
|
|
11
|
-
requiresPortalLogin: boolean;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
};
|
|
5
|
+
export type UseWaitlistClaimResult = WaitlistClaimLookup | null;
|
|
14
6
|
export type UseWaitlistClaimDeps = Readonly<{
|
|
15
7
|
useBlockApi: typeof useBlockApi;
|
|
16
8
|
}>;
|
|
9
|
+
/** Memoize only claim parameters; payment URL cleanup is not a new invitation. */
|
|
10
|
+
export declare function useWaitlistClaimCredential(): WaitlistClaimCredential | null;
|
|
11
|
+
/** Remove both alternatives, retaining all unrelated URL and history state. */
|
|
12
|
+
export declare function clearWaitlistClaimLocation(): void;
|
|
17
13
|
export declare function useWaitlistClaim(): UseWaitlistClaimResult;
|
|
18
|
-
export declare function useWaitlistClaimForToken(token: string | null): UseWaitlistClaimResult;
|
|
19
14
|
export declare function useWaitlistClaimWithDeps(deps: UseWaitlistClaimDeps): UseWaitlistClaimResult;
|
|
15
|
+
export declare function useWaitlistClaimForRequest(request: WaitlistClaimRequest | null): UseWaitlistClaimResult;
|
|
16
|
+
export declare function useWaitlistClaimForRequestWithDeps(request: WaitlistClaimRequest | null, deps: UseWaitlistClaimDeps): UseWaitlistClaimResult;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import type { ResolveWaitlistClaimResponse } from "../api/types";
|
|
2
|
+
export type WaitlistClaimCredential = Readonly<{
|
|
3
|
+
kind: 'emailedToken';
|
|
4
|
+
token: string;
|
|
5
|
+
}> | Readonly<{
|
|
6
|
+
kind: 'portalOwnedEntry';
|
|
7
|
+
entryId: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** Object identity binds one asynchronous lookup to the draft that requested it. */
|
|
10
|
+
export type WaitlistClaimRequest = Readonly<{
|
|
11
|
+
credential: WaitlistClaimCredential;
|
|
12
|
+
}>;
|
|
13
|
+
export type WaitlistClaimLookup = Readonly<{
|
|
14
|
+
request: WaitlistClaimRequest;
|
|
15
|
+
state: WaitlistClaimState;
|
|
16
|
+
}>;
|
|
2
17
|
export type WaitlistClaimResolveFailure = Readonly<{
|
|
3
18
|
kind: "portal-login-required";
|
|
4
19
|
message: string;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* local stacking contexts.
|
|
4
|
-
*
|
|
5
|
-
* Why this exists:
|
|
6
|
-
* - Theme variables are applied via inline styles on the nearest `.theme-scope`.
|
|
7
|
-
* - Some pages create stacking contexts (e.g. transformed hero decorations) that
|
|
8
|
-
* can sit above fixed-position overlays rendered inside the normal tree.
|
|
9
|
-
* - Portaling to `document.body` escapes stacking contexts, but loses theme scope.
|
|
10
|
-
*
|
|
11
|
-
* This helper creates a new `.theme-scope` element attached to `document.body`,
|
|
12
|
-
* copying inline CSS vars + relevant data attrs from the current theme scope.
|
|
13
|
-
*/
|
|
14
|
-
export type ThemePortalRoot = {
|
|
1
|
+
/** Mirror a theme scope on body-level portals, including live preview edits. */
|
|
2
|
+
export type ThemePortalRoot = Readonly<{
|
|
15
3
|
root: HTMLElement;
|
|
16
4
|
cleanup: () => void;
|
|
17
|
-
}
|
|
5
|
+
}>;
|
|
6
|
+
type AttributeSnapshot = ReadonlyMap<string, string>;
|
|
7
|
+
type AttributeChanges = Readonly<{
|
|
8
|
+
set: AttributeSnapshot;
|
|
9
|
+
remove: readonly string[];
|
|
10
|
+
}>;
|
|
11
|
+
export declare function attributeChanges(prev: AttributeSnapshot, next: AttributeSnapshot): AttributeChanges;
|
|
18
12
|
export declare function createBodyThemePortalRoot(sourceEl: Element): ThemePortalRoot | null;
|
|
13
|
+
export {};
|
|
@@ -12,3 +12,4 @@ export declare const builtinTransformDefinitions: import("./core").TransformDefi
|
|
|
12
12
|
export declare const defaultTransforms: import("./core").TransformRegistry;
|
|
13
13
|
export { boxStyleClassNames } from "./_utils/boxStyleClassNames";
|
|
14
14
|
export { formattingTransforms, layoutTransforms, chromeLogoTransforms, uiTransforms, mediaTransforms, backgroundTransforms, linksTransforms, boxStylesTransforms, contentTransforms, headerRuntimeTransforms, };
|
|
15
|
+
export { resolveAuthoredLinkHref } from './links';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { TransformDefinition } from "./core";
|
|
1
|
+
import type { TransformContext, TransformDefinition } from "./core";
|
|
2
|
+
export type LinkResolutionContext = Pick<TransformContext, 'routes' | 'pagesByIdentifier' | 'entriesByIdentifier' | 'stage'>;
|
|
2
3
|
export declare const resolveLinkTransform: TransformDefinition;
|
|
3
4
|
export declare const linkLabelTransform: TransformDefinition;
|
|
4
5
|
export declare const linksTransforms: TransformDefinition[];
|
|
6
|
+
export declare function resolveAuthoredLinkHref(value: unknown, context?: LinkResolutionContext): string | null;
|
|
@@ -21,3 +21,5 @@ export declare function canInstalmentPlanCompleteBefore(input: Readonly<{
|
|
|
21
21
|
deadline: string;
|
|
22
22
|
schedule: readonly BookingInstalmentScheduleRow[];
|
|
23
23
|
}>): boolean;
|
|
24
|
+
/** Later obligations are identified by their state, never their position. */
|
|
25
|
+
export declare function getBookingLaterInstalments(schedule: readonly BookingInstalmentScheduleRow[]): readonly BookingInstalmentScheduleRow[];
|
|
@@ -84,6 +84,12 @@ export declare function resolveAvailableBookingCollectionOptions(input: Readonly
|
|
|
84
84
|
totalCents: number;
|
|
85
85
|
}>): readonly ResolvedBookingCollectionOption[];
|
|
86
86
|
export declare function isBookingCollectionEquivalentToUpfront(option: ResolvedBookingCollectionOption): boolean;
|
|
87
|
+
export declare function resolveBookingCollectionOptionFacts(input: Readonly<{
|
|
88
|
+
option: BookingPaymentCollectionOption;
|
|
89
|
+
totalCents: number;
|
|
90
|
+
anchorAt: string;
|
|
91
|
+
bookingStartAt: string | null;
|
|
92
|
+
}>): ResolvedBookingCollectionOption;
|
|
87
93
|
/** Discounts change preview money, never an already admitted collection identity. */
|
|
88
94
|
export declare function repriceBookingCollectionOptions(input: Readonly<{
|
|
89
95
|
options: readonly ResolvedBookingCollectionOption[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type ConfirmationPayment, type ConfirmationOrderItem } from './confirmationPayment';
|
|
2
|
+
export { settledOrderItemTotalCents } from './confirmationPayment';
|
|
1
3
|
import type { OrderPaymentMethod } from './orderTypes';
|
|
2
4
|
export type ConfirmationEmailPaymentSummary = Readonly<{
|
|
3
5
|
kind: 'free';
|
|
@@ -21,7 +23,7 @@ export type ConfirmationEmailPaymentSummary = Readonly<{
|
|
|
21
23
|
amountOutstandingCents?: number;
|
|
22
24
|
dueAt?: string | null;
|
|
23
25
|
currency: string;
|
|
24
|
-
paymentMethod: Extract<OrderPaymentMethod, 'stripe' | 'store_credit' | 'mixed'>;
|
|
26
|
+
paymentMethod: Extract<OrderPaymentMethod, 'stripe' | 'store_credit' | 'mixed' | 'manual'>;
|
|
25
27
|
}>;
|
|
26
28
|
export type ConfirmationEmailTemplatePaymentFields = Readonly<{
|
|
27
29
|
paymentMethod?: 'free' | 'pass' | 'membership' | 'stripe' | 'manual' | 'waived';
|
|
@@ -34,18 +36,10 @@ export type ConfirmationEmailTemplatePaymentFields = Readonly<{
|
|
|
34
36
|
managedBalanceDueAt?: string | null;
|
|
35
37
|
}>;
|
|
36
38
|
type NonMonetaryConfirmationPaymentMethod = 'free' | 'pass' | 'membership';
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
creditCents: number | null;
|
|
41
|
-
}>): number;
|
|
42
|
-
export declare function buildOrderItemConfirmationEmailPaymentSummary(options: {
|
|
39
|
+
/** Email copy projection; this function never decides settlement. */
|
|
40
|
+
export declare function toConfirmationEmailPaymentSummary(payment: ConfirmationPayment): ConfirmationEmailPaymentSummary;
|
|
41
|
+
type EmailOrderPaymentInput = Readonly<{
|
|
43
42
|
orderPaymentMethod: OrderPaymentMethod;
|
|
44
|
-
item: Readonly<{
|
|
45
|
-
netTotalCents: number | null;
|
|
46
|
-
totalCents: number | null;
|
|
47
|
-
creditCents: number | null;
|
|
48
|
-
}>;
|
|
49
43
|
currency: string;
|
|
50
44
|
flexibleBalanceDueAt?: string | null;
|
|
51
45
|
settlement: Readonly<{
|
|
@@ -54,7 +48,14 @@ export declare function buildOrderItemConfirmationEmailPaymentSummary(options: {
|
|
|
54
48
|
kind: 'collected';
|
|
55
49
|
collectedCents: number;
|
|
56
50
|
}>;
|
|
57
|
-
}
|
|
51
|
+
}>;
|
|
52
|
+
/** Legacy notification adapter, retained unchanged in meaning until #1587. */
|
|
53
|
+
export declare function buildOrderItemsConfirmationEmailPaymentSummary(options: EmailOrderPaymentInput & Readonly<{
|
|
54
|
+
items: readonly ConfirmationOrderItem[];
|
|
55
|
+
}>): ConfirmationEmailPaymentSummary;
|
|
56
|
+
export declare function buildOrderItemConfirmationEmailPaymentSummary(options: EmailOrderPaymentInput & Readonly<{
|
|
57
|
+
item: ConfirmationOrderItem;
|
|
58
|
+
}>): ConfirmationEmailPaymentSummary;
|
|
58
59
|
export declare function buildEventRegistrationConfirmationEmailPaymentSummary(options: Readonly<{
|
|
59
60
|
paymentMethod: NonMonetaryConfirmationPaymentMethod;
|
|
60
61
|
passCreditsUsed?: number;
|
|
@@ -88,4 +89,3 @@ export declare function buildBypassedCheckoutConfirmationEmailPaymentSummary(opt
|
|
|
88
89
|
currency: string;
|
|
89
90
|
}>): ConfirmationEmailPaymentSummary;
|
|
90
91
|
export declare function toConfirmationEmailTemplatePaymentFields(summary: ConfirmationEmailPaymentSummary | undefined): ConfirmationEmailTemplatePaymentFields;
|
|
91
|
-
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type NonNegativeCents, type Result } from '../../../core/src/index';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import { confirmationPaymentSchema, type paymentBalanceSchema } from './confirmationPaymentSchema';
|
|
4
|
+
import { type OrderPaymentPositionInconsistency, type PaymentTerms } from './orderPaymentState';
|
|
5
|
+
import type { OrderPaymentMethod } from './orderTypes';
|
|
6
|
+
import type { CurrencyCode } from './settlement';
|
|
7
|
+
export type PaymentBalance = z.infer<typeof paymentBalanceSchema>;
|
|
8
|
+
export type ConfirmationPayment = z.infer<typeof confirmationPaymentSchema>;
|
|
9
|
+
type MonetaryMethod = Extract<OrderPaymentMethod, 'stripe' | 'store_credit' | 'mixed' | 'manual'>;
|
|
10
|
+
export type ConfirmationPaymentIssue = OrderPaymentPositionInconsistency | Readonly<{
|
|
11
|
+
kind: 'missing_settlement_evidence';
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
kind: 'ambiguous_booking_allocation';
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'invalid_pass_credits';
|
|
16
|
+
}>;
|
|
17
|
+
export type ConfirmationPaymentInput = Readonly<{
|
|
18
|
+
kind: 'free' | 'waived';
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'pass';
|
|
21
|
+
passName?: string | null;
|
|
22
|
+
passCreditsUsed?: number | null;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'membership';
|
|
25
|
+
membershipName?: string | null;
|
|
26
|
+
}> | Readonly<{
|
|
27
|
+
kind: 'monetary';
|
|
28
|
+
paymentMethod: MonetaryMethod;
|
|
29
|
+
currency: CurrencyCode;
|
|
30
|
+
cashDueCents: NonNegativeCents;
|
|
31
|
+
cashPaidCents: NonNegativeCents;
|
|
32
|
+
creditPaidCents: NonNegativeCents;
|
|
33
|
+
waivedCents: NonNegativeCents;
|
|
34
|
+
terms: PaymentTerms;
|
|
35
|
+
}>;
|
|
36
|
+
/** Public payment evidence returns only schema-valid decisions. Legacy email
|
|
37
|
+
* snapshots deliberately use the amount calculation below instead of this boundary.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildConfirmationPayment(input: ConfirmationPaymentInput): Result<ConfirmationPayment, ConfirmationPaymentIssue>;
|
|
40
|
+
export type ConfirmationOrderItem = Readonly<{
|
|
41
|
+
netTotalCents: number | null;
|
|
42
|
+
totalCents: number | null;
|
|
43
|
+
creditCents: number | null;
|
|
44
|
+
}>;
|
|
45
|
+
export declare function settledOrderItemTotalCents(item: ConfirmationOrderItem): number;
|
|
46
|
+
/** Historical notification amounts, not a validated public payment decision.
|
|
47
|
+
* Preserve HEAD's raw snapshot numbers; strict evidence validation belongs to
|
|
48
|
+
* the public read boundary, not notification-plan construction (#1587).
|
|
49
|
+
*/
|
|
50
|
+
export declare function calculateOrderItemsConfirmationPaymentAmounts(input: Readonly<{
|
|
51
|
+
items: readonly ConfirmationOrderItem[];
|
|
52
|
+
settlement: Readonly<{
|
|
53
|
+
kind: 'settled_in_full';
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: 'collected';
|
|
56
|
+
collectedCents: number;
|
|
57
|
+
}>;
|
|
58
|
+
}>): Readonly<{
|
|
59
|
+
amountPaidCents: number;
|
|
60
|
+
amountOutstandingCents: number;
|
|
61
|
+
}>;
|
|
62
|
+
export declare function collectedOrderItemsConfirmationCents<TItem extends Readonly<{
|
|
63
|
+
id: string;
|
|
64
|
+
}>>(items: readonly TItem[], collectedCentsByOrderItemId: Readonly<Record<string, number>>): number;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paymentBalanceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"settled">;
|
|
4
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5
|
+
kind: z.ZodLiteral<"due">;
|
|
6
|
+
amountCents: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../core/src/index").PositiveCents, number>>;
|
|
7
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>], "kind">;
|
|
9
|
+
export declare const confirmationPaymentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"free">;
|
|
11
|
+
balance: z.ZodObject<{
|
|
12
|
+
kind: z.ZodLiteral<"settled">;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"waived">;
|
|
16
|
+
balance: z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"settled">;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"pass">;
|
|
21
|
+
passName: z.ZodNullable<z.ZodString>;
|
|
22
|
+
passCreditsUsed: z.ZodNullable<z.ZodNumber>;
|
|
23
|
+
balance: z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"settled">;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"membership">;
|
|
28
|
+
membershipName: z.ZodNullable<z.ZodString>;
|
|
29
|
+
balance: z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"settled">;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
33
|
+
kind: z.ZodLiteral<"manual_due">;
|
|
34
|
+
currency: z.ZodPipe<z.ZodString, z.ZodTransform<import("./settlement").CurrencyCode, string>>;
|
|
35
|
+
balance: z.ZodObject<{
|
|
36
|
+
kind: z.ZodLiteral<"due">;
|
|
37
|
+
amountCents: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../core/src/index").PositiveCents, number>>;
|
|
38
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
balance: z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"due">;
|
|
43
|
+
amountCents: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../core/src/index").PositiveCents, number>>;
|
|
44
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
amountPaidCents: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../core/src/index").NonNegativeCents, number>>;
|
|
47
|
+
currency: z.ZodPipe<z.ZodString, z.ZodTransform<import("./settlement").CurrencyCode, string>>;
|
|
48
|
+
kind: z.ZodLiteral<"managed_balance_due">;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
paymentMethod: z.ZodEnum<{
|
|
51
|
+
mixed: "mixed";
|
|
52
|
+
manual: "manual";
|
|
53
|
+
stripe: "stripe";
|
|
54
|
+
store_credit: "store_credit";
|
|
55
|
+
}>;
|
|
56
|
+
balance: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"settled">;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"due">;
|
|
60
|
+
amountCents: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../core/src/index").PositiveCents, number>>;
|
|
61
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
62
|
+
}, z.core.$strict>], "kind">;
|
|
63
|
+
amountPaidCents: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../core/src/index").NonNegativeCents, number>>;
|
|
64
|
+
currency: z.ZodPipe<z.ZodString, z.ZodTransform<import("./settlement").CurrencyCode, string>>;
|
|
65
|
+
kind: z.ZodLiteral<"monetary">;
|
|
66
|
+
}, z.core.$strict>], "kind">;
|
|
@@ -20,6 +20,8 @@ export * from './checkoutStripeSessionPlanning';
|
|
|
20
20
|
export * from './checkoutSessionMetadata';
|
|
21
21
|
export * from './canonicalRefundPlanner';
|
|
22
22
|
export * from './confirmationEmailPayment';
|
|
23
|
+
export * from './confirmationPayment';
|
|
24
|
+
export * from './confirmationPaymentSchema';
|
|
23
25
|
export * from './discountApplication';
|
|
24
26
|
export * from './oneTimeCheckoutPlanning';
|
|
25
27
|
export * from './order-number';
|
|
@@ -111,6 +111,14 @@ export type OrderPaymentPositionInput = Readonly<{
|
|
|
111
111
|
}> | null;
|
|
112
112
|
hasCollectionFailure?: boolean;
|
|
113
113
|
}>;
|
|
114
|
+
/** Amount arithmetic shared by strict payment evidence and tolerant email snapshots.
|
|
115
|
+
* Snapshots historically clamp overcollection to zero; the strict decision below
|
|
116
|
+
* checks collectability before using the same calculation.
|
|
117
|
+
*/
|
|
118
|
+
export declare function calculateOutstandingOrderAmountCents(input: Readonly<{
|
|
119
|
+
totalCents: number;
|
|
120
|
+
settledCents: number;
|
|
121
|
+
}>): number;
|
|
114
122
|
export declare function calculateOrderBalanceDueCents(input: Readonly<{
|
|
115
123
|
grandTotalCents: NonNegativeCents;
|
|
116
124
|
paidCents: NonNegativeCents;
|
|
@@ -150,11 +150,11 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
150
150
|
readonly blockKind: "block.event-registration";
|
|
151
151
|
readonly scope: "entry";
|
|
152
152
|
readonly content: {
|
|
153
|
-
readonly heading: "
|
|
153
|
+
readonly heading: "";
|
|
154
154
|
readonly maxTickets: "5";
|
|
155
155
|
readonly showVenue: true;
|
|
156
156
|
readonly showCapacity: true;
|
|
157
|
-
readonly buttonText: "
|
|
157
|
+
readonly buttonText: "Book your place";
|
|
158
158
|
readonly buttonVariant: "primary";
|
|
159
159
|
};
|
|
160
160
|
readonly bindings: {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BookingPaymentCollectionOption } from './booking-payment-options';
|
|
2
|
+
/** Customer disclosure only: amounts are acceptance ceilings, never settlement inputs. */
|
|
3
|
+
export type AppointmentBookingTerms = Readonly<{
|
|
4
|
+
currency: string;
|
|
5
|
+
totalCents: number;
|
|
6
|
+
dueNowCents: number;
|
|
7
|
+
laterPaymentAmountsCents: readonly number[];
|
|
8
|
+
paymentOption: BookingPaymentCollectionOption | Readonly<{
|
|
9
|
+
kind: 'not_required';
|
|
10
|
+
}>;
|
|
11
|
+
promisedDiscountId?: string | null;
|
|
12
|
+
}>;
|
|
13
|
+
export type AppointmentBookingReviewReason = 'amount_increased' | 'payment_terms_changed' | 'discount_unavailable';
|
|
14
|
+
export type AppointmentBookingReview = Readonly<{
|
|
15
|
+
terms: AppointmentBookingTerms;
|
|
16
|
+
subtotalCents: number;
|
|
17
|
+
discountCents: number;
|
|
18
|
+
creditCents: number;
|
|
19
|
+
reason: AppointmentBookingReviewReason;
|
|
20
|
+
}>;
|
|
@@ -519,4 +519,74 @@ export declare const bookingPaymentOptionsChoiceSchema: z.ZodDiscriminatedUnion<
|
|
|
519
519
|
}, z.core.$strip>], "kind">>;
|
|
520
520
|
}, z.core.$strip>;
|
|
521
521
|
}, z.core.$strict>], "source">;
|
|
522
|
+
/** Strict evidence shape; accepts configured rules but no materialised schedule metadata. */
|
|
523
|
+
export declare const appointmentBookingTermsSchema: z.ZodObject<{
|
|
524
|
+
currency: z.ZodString;
|
|
525
|
+
totalCents: z.ZodNumber;
|
|
526
|
+
dueNowCents: z.ZodNumber;
|
|
527
|
+
laterPaymentAmountsCents: z.ZodArray<z.ZodNumber>;
|
|
528
|
+
paymentOption: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
529
|
+
kind: z.ZodLiteral<"upfront">;
|
|
530
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
531
|
+
kind: z.ZodLiteral<"deferred_manual">;
|
|
532
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
533
|
+
kind: z.ZodLiteral<"instalment_plan">;
|
|
534
|
+
plan: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
535
|
+
kind: z.ZodLiteral<"deposit_plus_one_remainder">;
|
|
536
|
+
depositAmountCents: z.ZodNumber;
|
|
537
|
+
depositRefundability: z.ZodEnum<{
|
|
538
|
+
refundable: "refundable";
|
|
539
|
+
non_refundable: "non_refundable";
|
|
540
|
+
}>;
|
|
541
|
+
remainderDueCount: z.ZodNumber;
|
|
542
|
+
intervalUnit: z.ZodEnum<{
|
|
543
|
+
day: "day";
|
|
544
|
+
week: "week";
|
|
545
|
+
month: "month";
|
|
546
|
+
}>;
|
|
547
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
548
|
+
kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
|
|
549
|
+
depositAmountCents: z.ZodNumber;
|
|
550
|
+
depositRefundability: z.ZodEnum<{
|
|
551
|
+
refundable: "refundable";
|
|
552
|
+
non_refundable: "non_refundable";
|
|
553
|
+
}>;
|
|
554
|
+
instalmentCount: z.ZodNumber;
|
|
555
|
+
intervalCount: z.ZodNumber;
|
|
556
|
+
intervalUnit: z.ZodEnum<{
|
|
557
|
+
day: "day";
|
|
558
|
+
week: "week";
|
|
559
|
+
month: "month";
|
|
560
|
+
}>;
|
|
561
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
562
|
+
kind: z.ZodLiteral<"equal_scheduled_instalments">;
|
|
563
|
+
instalmentCount: z.ZodNumber;
|
|
564
|
+
intervalCount: z.ZodNumber;
|
|
565
|
+
intervalUnit: z.ZodEnum<{
|
|
566
|
+
day: "day";
|
|
567
|
+
week: "week";
|
|
568
|
+
month: "month";
|
|
569
|
+
}>;
|
|
570
|
+
}, z.core.$strict>], "kind">;
|
|
571
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
572
|
+
kind: z.ZodLiteral<"flexible_balance">;
|
|
573
|
+
config: z.ZodObject<{
|
|
574
|
+
upfrontAmountCents: z.ZodNumber;
|
|
575
|
+
dueDateRule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
576
|
+
kind: z.ZodLiteral<"relative_to_start_date">;
|
|
577
|
+
daysBeforeStart: z.ZodNumber;
|
|
578
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
579
|
+
kind: z.ZodLiteral<"fixed_calendar_date">;
|
|
580
|
+
dueAt: z.ZodString;
|
|
581
|
+
}, z.core.$strict>], "kind">;
|
|
582
|
+
depositRefundability: z.ZodEnum<{
|
|
583
|
+
refundable: "refundable";
|
|
584
|
+
non_refundable: "non_refundable";
|
|
585
|
+
}>;
|
|
586
|
+
}, z.core.$strict>;
|
|
587
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
588
|
+
kind: z.ZodLiteral<"not_required">;
|
|
589
|
+
}, z.core.$strict>]>;
|
|
590
|
+
promisedDiscountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
591
|
+
}, z.core.$strict>;
|
|
522
592
|
export {};
|
|
@@ -139,7 +139,6 @@ export type DemoLifecycleAuditEventId = Brand<string, 'DemoLifecycleAuditEventId
|
|
|
139
139
|
export type DemoRuntimeId = Brand<string, 'DemoRuntimeId'>;
|
|
140
140
|
export type DemoCapability = Brand<string, 'DemoCapability'>;
|
|
141
141
|
export type DemoPaymentFlowId = Brand<string, 'DemoPaymentFlowId'>;
|
|
142
|
-
export type DemoClaimTtlHours = Brand<number, 'DemoClaimTtlHours'>;
|
|
143
142
|
export type GiftingOfferId = Brand<string, 'GiftingOfferId'>;
|
|
144
143
|
export type GiftingInstrumentId = Brand<string, 'GiftingInstrumentId'>;
|
|
145
144
|
export type BookingRequirementId = Brand<string, 'BookingRequirementId'>;
|
|
@@ -278,7 +277,6 @@ export declare const unsafeAsDemoLifecycleAuditEventId: (id: string) => DemoLife
|
|
|
278
277
|
export declare const unsafeAsDemoRuntimeId: (id: string) => DemoRuntimeId;
|
|
279
278
|
export declare const unsafeAsDemoCapability: (value: string) => DemoCapability;
|
|
280
279
|
export declare const unsafeAsDemoPaymentFlowId: (id: string) => DemoPaymentFlowId;
|
|
281
|
-
export declare const unsafeAsDemoClaimTtlHours: (value: number) => DemoClaimTtlHours;
|
|
282
280
|
export declare const unsafeAsGiftingOfferId: (id: string) => GiftingOfferId;
|
|
283
281
|
export declare const unsafeAsGiftingInstrumentId: (id: string) => GiftingInstrumentId;
|
|
284
282
|
export declare const unsafeAsBookingRequirementId: (id: string) => BookingRequirementId;
|
|
@@ -4,7 +4,7 @@ export type DemoClaimAccessInstance = Readonly<{
|
|
|
4
4
|
status: DemoInstanceStatus;
|
|
5
5
|
}>;
|
|
6
6
|
export type DemoClaimAccessClaim = Readonly<{
|
|
7
|
-
status: DemoClaimStatus
|
|
7
|
+
status: Exclude<DemoClaimStatus, 'preparing'>;
|
|
8
8
|
expiresAt: string;
|
|
9
9
|
}> | null;
|
|
10
10
|
export declare function deriveDemoClaimAccessState(input: Readonly<{
|