@riverbankcms/sdk 0.130.2 → 0.132.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 +3 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DKQ5eFK9.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-CNTcOjCC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-DJu3qu33.mjs} +48 -9
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-2TzT3vbj.mjs} +6417 -4184
- package/dist/_dts/ai/src/contracts/proposals.d.ts +723 -151
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +151 -64
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -9
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -19
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +31 -2
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -1
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +466 -346
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +91 -1
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +32 -0
- package/dist/_dts/api/src/giftingDashboard.d.ts +117 -0
- package/dist/_dts/api/src/giftingEndpointDefinitions.d.ts +124 -0
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +25 -12
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -2
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +9 -32
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +25 -0
- package/dist/_dts/api/src/sdkThemeCatalogContracts.d.ts +20 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +16 -6
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -10
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +1 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +26 -44
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/index.d.ts +0 -3
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +2 -50
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +1 -929
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -97
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +39 -6
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +6 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -9
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +81 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +45 -72
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -36
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +19 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +25 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +75 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -2
- 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/RegistrationClosedState.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/MembershipHero.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/CourseRegistrationErrorBoundary.d.ts → event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts} +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +45 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/index.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/types.d.ts +18 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseEligibility.d.ts → event-registration/whole-series/useWholeSeriesEligibility.d.ts} +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseRegistrationPortal.d.ts → event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts} +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +185 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseWaitlistSelection.d.ts → event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts} +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/utils.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.contract.d.ts +5 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/courseRegistrationViewState.d.ts → event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts} +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/wizardSteps.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalCloseButton.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +19 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +30 -11
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +15 -4
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -4
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +13 -0
- package/dist/_dts/commerce/src/purchase/cancellationPolicy.d.ts +7 -0
- package/dist/_dts/commerce/src/purchase/canonicalRefundPlanner.d.ts +48 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/checkoutDiscountContextPlanning.d.ts +80 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/checkoutOrderItemProjection.d.ts +22 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentFlow.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +30 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +53 -0
- package/dist/_dts/commerce/src/purchase/checkoutQuantity.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +76 -0
- package/dist/_dts/commerce/src/purchase/checkoutSettlement.d.ts +46 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +125 -0
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +91 -0
- package/dist/_dts/commerce/src/purchase/discountApplication.d.ts +74 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/order-number.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/orderCancellationPlan.d.ts +19 -0
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +71 -0
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +120 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +81 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentResult.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/orderHistoryLedgerFilters.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderHistorySource.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentAdminSettlement.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +44 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +24 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +151 -0
- package/dist/_dts/commerce/src/purchase/orderItemSupport.d.ts +14 -0
- package/dist/_dts/commerce/src/purchase/orderListFilters.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentLinkPlanning.d.ts +60 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentReceipt.d.ts +184 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +135 -0
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +102 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPlanning.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPolicy.d.ts +36 -0
- package/dist/_dts/commerce/src/purchase/orderTotals.d.ts +23 -0
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/pendingCheckoutSessionClaim.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +27 -0
- package/dist/_dts/commerce/src/purchase/protectedDepositRefundPolicy.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/refundPolicy.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/result.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +97 -0
- package/dist/_dts/commerce/src/purchase/shopRefundPlanning.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +31 -0
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +168 -0
- package/dist/_dts/commerce/src/shop/shipmentEligibility.d.ts +14 -0
- package/dist/_dts/commerce/src/utils/assertNever.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -0
- package/dist/_dts/core/src/booking-vertical-catalog.d.ts +741 -0
- package/dist/_dts/core/src/booking-vertical-config.d.ts +66 -0
- package/dist/_dts/core/src/booking-vertical-definitions.d.ts +68 -0
- package/dist/_dts/{api/src/bookingVerticalPreset.d.ts → core/src/booking-vertical-preset.d.ts} +1 -1
- package/dist/_dts/core/src/booking-verticals.d.ts +98 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-pricing.d.ts +5 -0
- package/dist/_dts/core/src/event-series-behaviour.d.ts +16 -0
- package/dist/_dts/core/src/index.d.ts +3 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +72 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
- package/dist/_dts/media-core/src/fileUploadCompletion.d.ts +3 -0
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +2 -0
- package/dist/_dts/media-core/src/identifiers.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaWriteNormalizer.d.ts +2 -6
- package/dist/_dts/media-core/src/types.d.ts +2 -1
- package/dist/_dts/media-editor/src/index.d.ts +2 -2
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +1 -22
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +0 -9
- package/dist/_dts/preview-next/src/client/preview/ButtonHoverRoleControls.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfiguratorWarningNotice.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/sdk/src/client/eventSubrouteReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/client/types.d.ts +12 -5
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/next/pageMetadataProjection.d.ts +7 -0
- package/dist/_dts/sdk/src/next/resolveEventPageSubroute.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -19
- package/dist/_dts/sdk/src/public-api/eventSubrouteContracts.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +44 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +4 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +7 -3
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/contextualHover.d.ts +41 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonHoverTreatment.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +21 -4
- package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +92 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +10 -150
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +57 -102
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +50 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +29 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +3 -25
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -6
- package/dist/_dts/theme-core/src/schema.d.ts +21 -33
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +13 -1
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-DO7llLxm.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-xID7zN__.mjs} +36 -48
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-CriBslp0.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-DYmHnM8g.mjs} +1 -1
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → StepIndicator-CGixP_LW.mjs} +2 -2
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-BEjzSiOA.mjs} +1408 -1245
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-CgFbnnnQ.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-dUyGpbxc.mjs} +5 -5
- package/dist/client/bookings.mjs +635 -471
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-BvBwkUzx.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DiZENT2E.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-Dq13KIgR.mjs} +3 -3
- package/dist/client/client.mjs +6291 -3452
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-CKC5NmyH.mjs} +10 -4
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-BF0Jatfw.mjs} +40 -43
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-BuoCF8je.mjs} +2 -2
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-CKwh0S9s.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-eUxaWFaB.mjs} +2 -2
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CfkNOkPb.mjs} +625 -132
- package/dist/client/{form-BA4t3kKU.mjs → form-C17H1c_H.mjs} +1 -1
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-DEwUmrtt.mjs} +2 -2
- package/dist/client/hooks.mjs +1312 -481
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-Pf2QwuvW.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-BWQAH5Sv.mjs} +1 -1
- package/dist/client/pricing-CVdvbopJ.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-BZi1Fa_G.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-qq-55DNk.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-BxmqPKdP.mjs} +412 -196
- package/dist/client/rendering/client.mjs +5685 -4037
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7006 -4124
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-B3CcKdtG.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DNWJPut5.mjs} +5 -5
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-BhvQCosS.mjs} +4 -4
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-B04sCNnW.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-DNNgZlmW.mjs} +2 -2
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-CUmhE24_.mjs} +195 -6
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-M5jG675x.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +247 -60
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +247 -60
- package/dist/preview-next/middleware.mjs +247 -60
- package/dist/{previewAuthStore-CX1C_KJ4.mjs → previewAuthStore-BFKd4LrN.mjs} +247 -60
- package/dist/{sdk-runtime-5CcPAI14.mjs → sdk-runtime-BEXb1wqo.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-DGMuip1D.mjs} +1 -1
- package/dist/server/components.mjs +3461 -1577
- package/dist/server/config-validation.mjs +1312 -482
- package/dist/server/config.mjs +1312 -482
- package/dist/server/data.mjs +1312 -481
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3576 -1689
- package/dist/server/page-converter.mjs +797 -250
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3461 -1576
- package/dist/server/rendering.mjs +3461 -1577
- package/dist/server/routing.mjs +1555 -616
- package/dist/server/server.mjs +1352 -560
- package/dist/server/theme-bridge.mjs +1992 -931
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +0 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +0 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +0 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +0 -102
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-BiqIMgZk.mjs +0 -174
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PortalAuthSidebar.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/SuccessStep.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/WaitlistStep.d.ts +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type BookingDepositRefundPolicy, type BookingInstalmentPlanConfig, type NonNegativeCents } from '../../../core/src/index';
|
|
2
|
+
import type { OrderPaymentPurpose } from './orderPaymentReceipt';
|
|
3
|
+
export type ProtectedDepositPolicySubject = Readonly<{
|
|
4
|
+
kind: 'none';
|
|
5
|
+
}> | Readonly<{
|
|
6
|
+
kind: 'protected_deposit';
|
|
7
|
+
sourceKind: 'flexible_balance' | 'instalment_plan';
|
|
8
|
+
protectedDepositAmountCents: NonNegativeCents;
|
|
9
|
+
depositRefundability: BookingDepositRefundPolicy;
|
|
10
|
+
}>;
|
|
11
|
+
export type ProtectedDepositRefundExposure = Readonly<{
|
|
12
|
+
subject: ProtectedDepositPolicySubject;
|
|
13
|
+
totalRemainingRefundableCents: NonNegativeCents;
|
|
14
|
+
policyRefundableCents: NonNegativeCents;
|
|
15
|
+
protectedDepositRemainingCents: NonNegativeCents;
|
|
16
|
+
}>;
|
|
17
|
+
export type ProtectedDepositRefundRequest = Readonly<{
|
|
18
|
+
kind: 'full_remaining';
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'partial_amount';
|
|
21
|
+
amountCents: NonNegativeCents;
|
|
22
|
+
}>;
|
|
23
|
+
export type AdminProtectedDepositRefundDecision = Readonly<{
|
|
24
|
+
kind: 'allowed';
|
|
25
|
+
requestedAmountCents: NonNegativeCents;
|
|
26
|
+
canonicalRemainingRefundableCents: NonNegativeCents;
|
|
27
|
+
touchesProtectedDeposit: boolean;
|
|
28
|
+
exposure: ProtectedDepositRefundExposure;
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
kind: 'blocked';
|
|
31
|
+
errorCode: 'already_refunded' | 'amount_exceeds_remaining';
|
|
32
|
+
errorMessage: string;
|
|
33
|
+
requestedAmountCents: NonNegativeCents;
|
|
34
|
+
exposure: ProtectedDepositRefundExposure;
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
kind: 'admin_override_required';
|
|
37
|
+
errorCode: 'deposit_refund_override_required';
|
|
38
|
+
errorMessage: string;
|
|
39
|
+
requestedAmountCents: NonNegativeCents;
|
|
40
|
+
exposure: ProtectedDepositRefundExposure;
|
|
41
|
+
}>;
|
|
42
|
+
export type PolicyOnlyProtectedDepositRefundDecision = Readonly<{
|
|
43
|
+
kind: 'allowed';
|
|
44
|
+
requestedAmountCents: NonNegativeCents;
|
|
45
|
+
canonicalRemainingRefundableCents: NonNegativeCents;
|
|
46
|
+
exposure: ProtectedDepositRefundExposure;
|
|
47
|
+
}> | Readonly<{
|
|
48
|
+
kind: 'blocked';
|
|
49
|
+
errorCode: 'already_refunded' | 'amount_exceeds_remaining' | 'non_refundable_deposit_remaining';
|
|
50
|
+
errorMessage: string;
|
|
51
|
+
requestedAmountCents: NonNegativeCents;
|
|
52
|
+
exposure: ProtectedDepositRefundExposure;
|
|
53
|
+
}>;
|
|
54
|
+
export declare function buildProtectedDepositPolicySubjectFromFlexibleBalance(input: Readonly<{
|
|
55
|
+
upfrontAmountCents: NonNegativeCents;
|
|
56
|
+
depositRefundability: BookingDepositRefundPolicy;
|
|
57
|
+
}>): ProtectedDepositPolicySubject;
|
|
58
|
+
export declare function buildProtectedDepositPolicySubjectFromInstalmentPlan(plan: BookingInstalmentPlanConfig): ProtectedDepositPolicySubject;
|
|
59
|
+
export declare function calculateProtectedDepositRefundExposure(input: Readonly<{
|
|
60
|
+
subject: ProtectedDepositPolicySubject;
|
|
61
|
+
itemTotalCents: NonNegativeCents;
|
|
62
|
+
itemRefundedCents: NonNegativeCents;
|
|
63
|
+
collectedRemainingCents: NonNegativeCents;
|
|
64
|
+
}>): ProtectedDepositRefundExposure;
|
|
65
|
+
/**
|
|
66
|
+
* Calculates policy exposure for one receipt allocation.
|
|
67
|
+
*
|
|
68
|
+
* A protected deposit is collected by the initial-checkout receipt. Later
|
|
69
|
+
* paydowns and instalments therefore remain independently refundable even
|
|
70
|
+
* while the entity still has a non-refundable deposit balance.
|
|
71
|
+
*/
|
|
72
|
+
export declare function calculateReceiptProtectedDepositRefundExposure(input: Readonly<{
|
|
73
|
+
subject: ProtectedDepositPolicySubject;
|
|
74
|
+
receiptPurpose: OrderPaymentPurpose['kind'];
|
|
75
|
+
allocatedCents: NonNegativeCents;
|
|
76
|
+
refundedCents: NonNegativeCents;
|
|
77
|
+
}>): ProtectedDepositRefundExposure;
|
|
78
|
+
export declare function planAdminProtectedDepositRefund(input: Readonly<{
|
|
79
|
+
exposure: ProtectedDepositRefundExposure;
|
|
80
|
+
request: ProtectedDepositRefundRequest;
|
|
81
|
+
allowProtectedDepositOverride: boolean;
|
|
82
|
+
}>): AdminProtectedDepositRefundDecision;
|
|
83
|
+
export declare function planPolicyOnlyProtectedDepositRefund(input: Readonly<{
|
|
84
|
+
exposure: ProtectedDepositRefundExposure;
|
|
85
|
+
request: ProtectedDepositRefundRequest;
|
|
86
|
+
}>): PolicyOnlyProtectedDepositRefundDecision;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ShopRefundablePaymentMethod = 'stripe' | 'mixed' | 'store_credit';
|
|
2
|
+
/**
|
|
3
|
+
* Whether an order's payment method supports refunds through the shop refund flow.
|
|
4
|
+
*
|
|
5
|
+
* Pass redemption, membership access, and free orders cannot be refunded
|
|
6
|
+
* through Stripe or site credit — they need domain-specific handling.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isShopRefundablePaymentMethod(paymentMethod: string): paymentMethod is ShopRefundablePaymentMethod;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type NonNegativeCents, type Result } from '../../../core/src/index';
|
|
2
|
+
/**
|
|
3
|
+
* Typed result of a rail-aware refund split.
|
|
4
|
+
* Prevents confusing cash/credit amounts at call sites.
|
|
5
|
+
*/
|
|
6
|
+
export type RefundRailSplit = Readonly<{
|
|
7
|
+
cashCents: NonNegativeCents;
|
|
8
|
+
creditCents: NonNegativeCents;
|
|
9
|
+
}>;
|
|
10
|
+
type RefundLineAllocation = Readonly<{
|
|
11
|
+
orderItemId: string;
|
|
12
|
+
appliedCents: number;
|
|
13
|
+
}>;
|
|
14
|
+
/** Minimal shape of a refund record for rail-aware splitting. */
|
|
15
|
+
type RefundWithAllocations = Readonly<{
|
|
16
|
+
refundRail: 'cash' | 'credit' | 'mixed';
|
|
17
|
+
lineAllocations: ReadonlyArray<RefundLineAllocation>;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* For mixed-payment items, compute remaining refundable amount per rail.
|
|
21
|
+
* Must account for prior refunds that already consumed part of each rail.
|
|
22
|
+
*
|
|
23
|
+
* The allocation order (credit before cash) is an accounting convention
|
|
24
|
+
* that determines *how much* goes to each rail — it does NOT imply
|
|
25
|
+
* execution order. The caller decides execution order (typically cash
|
|
26
|
+
* first so Stripe settles before issuing site credit).
|
|
27
|
+
*
|
|
28
|
+
* Pure function — no DB calls. Testable with just numbers.
|
|
29
|
+
*/
|
|
30
|
+
export declare function computeRailAwareRefundSplit(originalCashCents: NonNegativeCents, originalCreditCents: NonNegativeCents, priorCashRefunded: NonNegativeCents, priorCreditRefunded: NonNegativeCents, totalRefundCents: NonNegativeCents): RefundRailSplit;
|
|
31
|
+
/**
|
|
32
|
+
* Summarize prior successful refunds by rail for a specific order item.
|
|
33
|
+
* Reads from line_allocations in order_refunds records.
|
|
34
|
+
*
|
|
35
|
+
* Pure function — just array reduction.
|
|
36
|
+
*/
|
|
37
|
+
export declare function summarizePriorRefundsByRail(refunds: ReadonlyArray<RefundWithAllocations>, orderItemId: string): Result<RefundRailSplit, Readonly<{
|
|
38
|
+
kind: 'mixed_rail_attribution_missing';
|
|
39
|
+
}>>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { type Brand, type NonNegativeCents, type Result } from '../../../core/src/index';
|
|
2
|
+
export type CurrencyCode = Brand<string, 'CurrencyCode'>;
|
|
3
|
+
export type SubtotalCents = Brand<number, 'SubtotalCents'>;
|
|
4
|
+
export type DiscountCents = Brand<number, 'DiscountCents'>;
|
|
5
|
+
export type CreditAppliedCents = Brand<number, 'CreditAppliedCents'>;
|
|
6
|
+
export type StripeChargeCents = Brand<number, 'StripeChargeCents'>;
|
|
7
|
+
export type RefundedCents = Brand<number, 'RefundedCents'>;
|
|
8
|
+
export type RefundableTotalCents = Brand<number, 'RefundableTotalCents'>;
|
|
9
|
+
export type Money<C extends CurrencyCode = CurrencyCode> = Readonly<{
|
|
10
|
+
amountCents: NonNegativeCents;
|
|
11
|
+
currency: C;
|
|
12
|
+
}>;
|
|
13
|
+
export type CurrencyValidationResult = {
|
|
14
|
+
ok: true;
|
|
15
|
+
currency: CurrencyCode;
|
|
16
|
+
} | {
|
|
17
|
+
ok: false;
|
|
18
|
+
reason: 'empty_cart' | 'mixed_currency' | 'invalid_currency';
|
|
19
|
+
currencies: string[];
|
|
20
|
+
};
|
|
21
|
+
export type AllocationInput<TLineId extends string = string> = {
|
|
22
|
+
lineId: TLineId;
|
|
23
|
+
basisCents: NonNegativeCents;
|
|
24
|
+
maxReducibleCents: NonNegativeCents;
|
|
25
|
+
};
|
|
26
|
+
export type LineAllocation<TLineId extends string = string> = {
|
|
27
|
+
lineId: TLineId;
|
|
28
|
+
amountCents: NonNegativeCents;
|
|
29
|
+
};
|
|
30
|
+
export type AllocationResult<TLineId extends string = string> = {
|
|
31
|
+
requestedCents: NonNegativeCents;
|
|
32
|
+
appliedCents: NonNegativeCents;
|
|
33
|
+
allocations: LineAllocation<TLineId>[];
|
|
34
|
+
};
|
|
35
|
+
export type SettledOrderLine = {
|
|
36
|
+
lineId: string;
|
|
37
|
+
subtotalCents: NonNegativeCents;
|
|
38
|
+
discountCents: NonNegativeCents;
|
|
39
|
+
creditCents: NonNegativeCents;
|
|
40
|
+
netTotalCents: NonNegativeCents;
|
|
41
|
+
};
|
|
42
|
+
export type LineSettlementBreakdown = Readonly<{
|
|
43
|
+
subtotalCents: SubtotalCents;
|
|
44
|
+
discountCents: DiscountCents;
|
|
45
|
+
creditAppliedCents: CreditAppliedCents;
|
|
46
|
+
stripeChargeCents: StripeChargeCents;
|
|
47
|
+
}>;
|
|
48
|
+
export type LineSettlementMoneyField = 'subtotalCents' | 'discountCents' | 'creditAppliedCents' | 'stripeChargeCents' | 'alreadyRefundedCents';
|
|
49
|
+
export type LineSettlementBreakdownError<TLineId extends string = string> = Readonly<{
|
|
50
|
+
_tag: 'invalid_line_money';
|
|
51
|
+
lineId: TLineId;
|
|
52
|
+
field: LineSettlementMoneyField;
|
|
53
|
+
message: string;
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
_tag: 'inconsistent_line_totals';
|
|
56
|
+
lineId: TLineId;
|
|
57
|
+
message: string;
|
|
58
|
+
}>;
|
|
59
|
+
export type RefundableLineSettlementError<TLineId extends string = string> = LineSettlementBreakdownError<TLineId> | Readonly<{
|
|
60
|
+
_tag: 'refunded_exceeds_refundable_total';
|
|
61
|
+
lineId: TLineId;
|
|
62
|
+
message: string;
|
|
63
|
+
}>;
|
|
64
|
+
export type RefundableLineSettlement = Readonly<{
|
|
65
|
+
line: LineSettlementBreakdown;
|
|
66
|
+
refundableTotalCents: RefundableTotalCents;
|
|
67
|
+
alreadyRefundedCents: RefundedCents;
|
|
68
|
+
}>;
|
|
69
|
+
export declare function normalizeCurrencyCode(raw: string): CurrencyCode;
|
|
70
|
+
export declare function toSubtotalCents(raw: number): SubtotalCents;
|
|
71
|
+
export declare function toDiscountCents(raw: number): DiscountCents;
|
|
72
|
+
export declare function toCreditAppliedCents(raw: number): CreditAppliedCents;
|
|
73
|
+
export declare function toStripeChargeCents(raw: number): StripeChargeCents;
|
|
74
|
+
export declare function toRefundedCents(raw: number): RefundedCents;
|
|
75
|
+
export declare function toRefundableTotalCents(raw: number): RefundableTotalCents;
|
|
76
|
+
export declare function money<C extends CurrencyCode>(amountCents: number, currency: C): Money<C>;
|
|
77
|
+
export declare function buildLineSettlementBreakdown<TLineId extends string>(options: Readonly<{
|
|
78
|
+
lineId: TLineId;
|
|
79
|
+
subtotalCents: number;
|
|
80
|
+
discountCents: number;
|
|
81
|
+
creditAppliedCents: number;
|
|
82
|
+
stripeChargeCents: number;
|
|
83
|
+
}>): Result<LineSettlementBreakdown, LineSettlementBreakdownError<TLineId>>;
|
|
84
|
+
export declare function buildRefundableLineSettlement<TLineId extends string>(options: Readonly<{
|
|
85
|
+
lineId: TLineId;
|
|
86
|
+
subtotalCents: number;
|
|
87
|
+
discountCents: number;
|
|
88
|
+
creditAppliedCents: number;
|
|
89
|
+
stripeChargeCents: number;
|
|
90
|
+
alreadyRefundedCents: number;
|
|
91
|
+
}>): Result<RefundableLineSettlement, RefundableLineSettlementError<TLineId>>;
|
|
92
|
+
export declare function refundableRemainingCents(settlement: RefundableLineSettlement): NonNegativeCents;
|
|
93
|
+
export declare function ensureSingleCurrency(lines: ReadonlyArray<{
|
|
94
|
+
currency: string;
|
|
95
|
+
}>): CurrencyValidationResult;
|
|
96
|
+
export declare function allocateReductionCents<TLineId extends string = string>(inputs: ReadonlyArray<AllocationInput<TLineId>>, requestedCents: number): AllocationResult<TLineId>;
|
|
97
|
+
export declare function assertSettledOrderLineInvariants(lines: ReadonlyArray<SettledOrderLine>): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ShopRefundableOrderItem } from './orderItemSupport';
|
|
2
|
+
import type { OrderPaymentMethod } from './orderTypes';
|
|
3
|
+
import { type ShopRefundablePaymentMethod } from './refundPolicy';
|
|
4
|
+
export type ShopRefundPlanningError = Readonly<{
|
|
5
|
+
tag: 'ORDER_NOT_REFUNDABLE';
|
|
6
|
+
message: string;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
tag: 'NO_REFUNDABLE_ITEMS';
|
|
9
|
+
message: string;
|
|
10
|
+
}>;
|
|
11
|
+
type ShopRefundPlanningOrder = Readonly<{
|
|
12
|
+
orderNumber: string;
|
|
13
|
+
paymentMethod: OrderPaymentMethod;
|
|
14
|
+
}>;
|
|
15
|
+
export type RefundableShopOrder<TOrder extends ShopRefundPlanningOrder> = TOrder & Readonly<{
|
|
16
|
+
paymentMethod: ShopRefundablePaymentMethod;
|
|
17
|
+
}>;
|
|
18
|
+
export type ShopRefundPlanItem<TItem extends ShopRefundableOrderItem> = Readonly<{
|
|
19
|
+
item: TItem;
|
|
20
|
+
displayName: string;
|
|
21
|
+
refundMode: 'refund_and_revoke';
|
|
22
|
+
sourceType: 'product_order_refund' | 'pass_order_refund';
|
|
23
|
+
}>;
|
|
24
|
+
export type ShopRefundPlan<TOrder extends ShopRefundPlanningOrder, TItem extends ShopRefundableOrderItem> = Readonly<{
|
|
25
|
+
order: RefundableShopOrder<TOrder>;
|
|
26
|
+
items: readonly ShopRefundPlanItem<TItem>[];
|
|
27
|
+
}>;
|
|
28
|
+
export type ShopRefundPlanningResult<TOrder extends ShopRefundPlanningOrder, TItem extends ShopRefundableOrderItem> = Readonly<{
|
|
29
|
+
ok: true;
|
|
30
|
+
value: ShopRefundPlan<TOrder, TItem>;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
ok: false;
|
|
33
|
+
error: ShopRefundPlanningError;
|
|
34
|
+
}>;
|
|
35
|
+
export type ShopRefundItemStatusInput = Readonly<{
|
|
36
|
+
status: 'succeeded' | 'partially_succeeded' | 'failed';
|
|
37
|
+
}>;
|
|
38
|
+
export declare function refundMethodForShopOrder(order: Readonly<{
|
|
39
|
+
paymentMethod: ShopRefundablePaymentMethod;
|
|
40
|
+
}>): 'cash' | 'credit';
|
|
41
|
+
export declare function computeShopRefundStatus(itemResults: readonly ShopRefundItemStatusInput[]): 'succeeded' | 'partially_succeeded' | 'failed';
|
|
42
|
+
export declare function planShopRefund<TOrder extends ShopRefundPlanningOrder, TItem extends ShopRefundableOrderItem>(order: TOrder, shopItems: readonly TItem[]): ShopRefundPlanningResult<TOrder, TItem>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Result } from '../../../core/src/index';
|
|
2
|
+
import type { CheckoutCommitFailureStep, CheckoutCommitState, CheckoutCompensationDecision, CheckoutPaymentRail, OrderCheckoutReconciliationState, OrderItemReconciliationState, DiscountRedemptionStatus, OrderItemCommitState, OrderStatus } from './orderTypes';
|
|
3
|
+
export type OrderStatusEvent = 'checkout_failed' | 'stripe_payment_completed' | 'cancel' | 'partial_refund' | 'full_refund';
|
|
4
|
+
export declare function advanceOrderStatus(from: OrderStatus, event: OrderStatusEvent): Result<OrderStatus, string>;
|
|
5
|
+
export declare function transitionOrderStatusTo(from: OrderStatus, to: OrderStatus): Result<OrderStatus, string>;
|
|
6
|
+
export type CheckoutCommitEvent = 'start' | 'complete' | 'compensate' | 'release';
|
|
7
|
+
export declare function advanceCheckoutCommitState(from: CheckoutCommitState, event: CheckoutCommitEvent): Result<CheckoutCommitState, string>;
|
|
8
|
+
export declare function transitionCheckoutCommitStateTo(from: CheckoutCommitState, to: CheckoutCommitState): Result<CheckoutCommitState, string>;
|
|
9
|
+
export type OrderItemCommitEvent = 'commit' | 'compensate';
|
|
10
|
+
export declare function advanceOrderItemCommitState(from: OrderItemCommitState, event: OrderItemCommitEvent): Result<OrderItemCommitState, string>;
|
|
11
|
+
export declare function transitionOrderItemCommitStateTo(from: OrderItemCommitState, to: OrderItemCommitState): Result<OrderItemCommitState, string>;
|
|
12
|
+
export type OrderCheckoutReconciliationEvent = 'defer_settlement_evidence' | 'commit_verified_settlement' | 'mark_needed';
|
|
13
|
+
export declare function advanceOrderCheckoutReconciliationState(from: OrderCheckoutReconciliationState, event: OrderCheckoutReconciliationEvent): Result<OrderCheckoutReconciliationState, string>;
|
|
14
|
+
export declare function transitionOrderCheckoutReconciliationStateTo(from: OrderCheckoutReconciliationState, to: OrderCheckoutReconciliationState): Result<OrderCheckoutReconciliationState, string>;
|
|
15
|
+
export declare function transitionOrderItemReconciliationStateTo(from: OrderItemReconciliationState, to: OrderItemReconciliationState): Result<OrderItemReconciliationState, string>;
|
|
16
|
+
export declare function classifyCheckoutCompensationDecision(input: {
|
|
17
|
+
paymentRail: CheckoutPaymentRail;
|
|
18
|
+
failedStep: CheckoutCommitFailureStep;
|
|
19
|
+
reservationsConsumed: boolean;
|
|
20
|
+
fulfillmentCommitted: boolean;
|
|
21
|
+
}): CheckoutCompensationDecision;
|
|
22
|
+
export type DiscountRedemptionEvent = 'redeem' | 'release' | 'expire';
|
|
23
|
+
export declare function advanceDiscountRedemptionStatus(from: DiscountRedemptionStatus, event: DiscountRedemptionEvent): Result<DiscountRedemptionStatus, string>;
|
|
24
|
+
export declare function transitionDiscountRedemptionStatusTo(from: DiscountRedemptionStatus, to: DiscountRedemptionStatus): Result<DiscountRedemptionStatus, string>;
|
|
25
|
+
export type FulfillmentClaimState = 'unclaimed' | 'claimed' | 'claimed_stale' | 'fulfilled' | 'missing';
|
|
26
|
+
export type FulfillmentClaimEvent = 'claim' | 'reclaim' | 'complete' | 'release';
|
|
27
|
+
export declare function advanceFulfillmentClaimState(from: FulfillmentClaimState, event: FulfillmentClaimEvent): Result<FulfillmentClaimState, string>;
|
|
28
|
+
export type OrderRefundStatus = 'pending' | 'succeeded' | 'failed' | 'reconciliation_needed';
|
|
29
|
+
export type OrderRefundEvent = 'succeed' | 'fail' | 'mark_reconciliation_needed';
|
|
30
|
+
export declare function advanceOrderRefundStatus(from: OrderRefundStatus, event: OrderRefundEvent): Result<OrderRefundStatus, string>;
|
|
31
|
+
export declare function transitionOrderRefundStatusTo(from: OrderRefundStatus, to: OrderRefundStatus): Result<OrderRefundStatus, string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CurrencyCode } from './settlement';
|
|
2
|
+
export type StripeMinimumChargeRequirement = Readonly<{
|
|
3
|
+
currency: CurrencyCode;
|
|
4
|
+
minimumAmountCents: number;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function getStripeMinimumChargeRequirement(rawCurrency: string): StripeMinimumChargeRequirement | null;
|
|
7
|
+
export declare function isStripeChargeBelowMinimum(options: Readonly<{
|
|
8
|
+
amountCents: number;
|
|
9
|
+
currency: string;
|
|
10
|
+
}>): boolean;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Purchase domain types — the unified model for all customer acquisitions.
|
|
3
|
+
*
|
|
4
|
+
* Every time a customer acquires something (event ticket, product, pass,
|
|
5
|
+
* course, membership), it's a Purchase. Payment method is an attribute
|
|
6
|
+
* of the purchase, not a separate concept (Model B: unified).
|
|
7
|
+
*/
|
|
8
|
+
import type { OccurrenceId, TicketTypeId, PricingOptionId, ProductId, ProductVariantId, PassId, MembershipId, CustomerId, OrderId, AttendeeId, CustomerPassId, CustomerMembershipId, EnrollmentId, AppointmentId, NonEmptyArray, SiteId, EventSeriesId } from '../../../core/src/index';
|
|
9
|
+
import type { PositiveCheckoutQuantity } from './checkoutQuantity';
|
|
10
|
+
export type CheckoutItem = EventTicketItem | ProductItem | PassItem | CourseEnrollmentItem | AppointmentItem;
|
|
11
|
+
export type EventTicketItem = {
|
|
12
|
+
type: 'event_ticket';
|
|
13
|
+
occurrenceId: OccurrenceId;
|
|
14
|
+
ticketTypeId?: TicketTypeId;
|
|
15
|
+
selectedSlidingAmount?: number;
|
|
16
|
+
ticketCount: PositiveCheckoutQuantity;
|
|
17
|
+
attendeeInfo: AttendeeInfo;
|
|
18
|
+
};
|
|
19
|
+
export type ProductItem = {
|
|
20
|
+
type: 'product';
|
|
21
|
+
productId: ProductId;
|
|
22
|
+
variantId?: ProductVariantId;
|
|
23
|
+
quantity: PositiveCheckoutQuantity;
|
|
24
|
+
};
|
|
25
|
+
export type PassItem = {
|
|
26
|
+
type: 'pass';
|
|
27
|
+
passId: PassId;
|
|
28
|
+
};
|
|
29
|
+
export type CourseEnrollmentItem = {
|
|
30
|
+
type: 'course_enrollment';
|
|
31
|
+
eventSeriesId: EventSeriesId;
|
|
32
|
+
pricingOptionId?: PricingOptionId;
|
|
33
|
+
selectedSlidingAmount?: number;
|
|
34
|
+
attendeeInfo: AttendeeInfo;
|
|
35
|
+
};
|
|
36
|
+
export type AppointmentItem = {
|
|
37
|
+
type: 'appointment';
|
|
38
|
+
formId: string;
|
|
39
|
+
serviceId: string;
|
|
40
|
+
resourceId: string;
|
|
41
|
+
startAt: string;
|
|
42
|
+
endAt: string;
|
|
43
|
+
timezone: string;
|
|
44
|
+
selectedSlidingAmount?: number;
|
|
45
|
+
customerInfo: AttendeeInfo;
|
|
46
|
+
};
|
|
47
|
+
export type MembershipItem = {
|
|
48
|
+
type: 'membership';
|
|
49
|
+
membershipId: MembershipId;
|
|
50
|
+
};
|
|
51
|
+
export type AttendeeFormData = Readonly<Record<string, unknown>>;
|
|
52
|
+
export type AttendeeInfo = Readonly<{
|
|
53
|
+
email: string;
|
|
54
|
+
name: string;
|
|
55
|
+
formData?: AttendeeFormData;
|
|
56
|
+
}>;
|
|
57
|
+
export type AttendeeBearingCheckoutItem = EventTicketItem | CourseEnrollmentItem;
|
|
58
|
+
export type Checkout = CartCheckout | MembershipCheckout;
|
|
59
|
+
export type CartCheckout = {
|
|
60
|
+
mode: 'one_time';
|
|
61
|
+
siteId: SiteId;
|
|
62
|
+
items: NonEmptyArray<CheckoutItem>;
|
|
63
|
+
customer: CustomerInfo;
|
|
64
|
+
discountCode?: string;
|
|
65
|
+
collectionOptionKind?: 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance';
|
|
66
|
+
successUrl: string;
|
|
67
|
+
cancelUrl: string;
|
|
68
|
+
};
|
|
69
|
+
export type MembershipCheckout = {
|
|
70
|
+
mode: 'subscription';
|
|
71
|
+
siteId: SiteId;
|
|
72
|
+
membership: MembershipItem;
|
|
73
|
+
customer: CustomerInfo;
|
|
74
|
+
discountCode?: string;
|
|
75
|
+
successUrl: string;
|
|
76
|
+
cancelUrl: string;
|
|
77
|
+
};
|
|
78
|
+
export type CustomerInfo = {
|
|
79
|
+
email: string;
|
|
80
|
+
name: string;
|
|
81
|
+
existingCustomerId?: CustomerId;
|
|
82
|
+
};
|
|
83
|
+
export type PurchasePaymentMethod = {
|
|
84
|
+
type: 'stripe';
|
|
85
|
+
sessionId: string;
|
|
86
|
+
paymentIntentId: string;
|
|
87
|
+
accountId: string;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'store_credit';
|
|
90
|
+
amountCents: number;
|
|
91
|
+
} | {
|
|
92
|
+
type: 'mixed';
|
|
93
|
+
creditAmountCents: number;
|
|
94
|
+
stripeSessionId: string;
|
|
95
|
+
stripePaymentIntentId: string;
|
|
96
|
+
stripeAccountId: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'pass_redemption';
|
|
99
|
+
customerPassId: CustomerPassId;
|
|
100
|
+
creditsUsed: number;
|
|
101
|
+
} | {
|
|
102
|
+
type: 'membership_access';
|
|
103
|
+
customerMembershipId: CustomerMembershipId;
|
|
104
|
+
} | {
|
|
105
|
+
type: 'free';
|
|
106
|
+
};
|
|
107
|
+
export type Purchase = {
|
|
108
|
+
id: OrderId;
|
|
109
|
+
orderNumber: string;
|
|
110
|
+
siteId: string;
|
|
111
|
+
customerId: CustomerId;
|
|
112
|
+
items: PurchaseLineItem[];
|
|
113
|
+
totals: PurchaseTotals;
|
|
114
|
+
payment: PurchasePaymentMethod;
|
|
115
|
+
createdAt: string;
|
|
116
|
+
};
|
|
117
|
+
export type PurchaseLineItem = {
|
|
118
|
+
type: 'event_ticket';
|
|
119
|
+
attendeeId: AttendeeId;
|
|
120
|
+
occurrenceId: OccurrenceId;
|
|
121
|
+
unitPriceCents: number;
|
|
122
|
+
quantity: number;
|
|
123
|
+
} | {
|
|
124
|
+
type: 'product';
|
|
125
|
+
productId: ProductId;
|
|
126
|
+
variantId?: ProductVariantId;
|
|
127
|
+
unitPriceCents: number;
|
|
128
|
+
quantity: number;
|
|
129
|
+
shippingAddress?: ShippingAddress;
|
|
130
|
+
} | {
|
|
131
|
+
type: 'pass';
|
|
132
|
+
customerPassId: CustomerPassId;
|
|
133
|
+
passId: PassId;
|
|
134
|
+
unitPriceCents: number;
|
|
135
|
+
} | {
|
|
136
|
+
type: 'course_enrollment';
|
|
137
|
+
enrollmentId: EnrollmentId;
|
|
138
|
+
eventSeriesId: EventSeriesId;
|
|
139
|
+
pricingOptionId?: PricingOptionId;
|
|
140
|
+
unitPriceCents: number;
|
|
141
|
+
} | {
|
|
142
|
+
type: 'appointment';
|
|
143
|
+
appointmentId: AppointmentId;
|
|
144
|
+
serviceId: string;
|
|
145
|
+
resourceId: string;
|
|
146
|
+
unitPriceCents: number;
|
|
147
|
+
} | {
|
|
148
|
+
type: 'membership';
|
|
149
|
+
customerMembershipId: CustomerMembershipId;
|
|
150
|
+
membershipId: MembershipId;
|
|
151
|
+
unitPriceCents: number;
|
|
152
|
+
};
|
|
153
|
+
export type PurchaseTotals = {
|
|
154
|
+
subtotalCents: number;
|
|
155
|
+
discountCents: number;
|
|
156
|
+
creditCents: number;
|
|
157
|
+
paidCents: number;
|
|
158
|
+
currency: string;
|
|
159
|
+
};
|
|
160
|
+
export type ShippingAddress = {
|
|
161
|
+
name: string;
|
|
162
|
+
line1: string;
|
|
163
|
+
line2?: string;
|
|
164
|
+
city: string;
|
|
165
|
+
state?: string;
|
|
166
|
+
postalCode: string;
|
|
167
|
+
country: string;
|
|
168
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OrderItemKind } from '../purchase/orderTypes';
|
|
2
|
+
export type ShipmentEligibilityInput = Readonly<{
|
|
3
|
+
kind: OrderItemKind;
|
|
4
|
+
requiresShipping: boolean;
|
|
5
|
+
cancelledAt: string | null;
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Whether an order item is eligible for physical shipment.
|
|
9
|
+
*
|
|
10
|
+
* Only product items with `requires_shipping = true` that have not been cancelled
|
|
11
|
+
* are shippable. Digital products, passes, event tickets, course enrollments,
|
|
12
|
+
* and memberships are never shippable.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isShippableItem(item: ShipmentEligibilityInput): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertNever(value: never, message?: string): never;
|
|
@@ -80,6 +80,10 @@ export declare const EVENT_CONTENT_TYPE_SCHEMA: {
|
|
|
80
80
|
readonly kind: "event-occurrence";
|
|
81
81
|
readonly segmentType: "uuid-or-date";
|
|
82
82
|
readonly precedence: "subroute-first";
|
|
83
|
+
}, {
|
|
84
|
+
readonly kind: "event-run";
|
|
85
|
+
readonly segmentType: "slug";
|
|
86
|
+
readonly precedence: "content-first";
|
|
83
87
|
}];
|
|
84
88
|
};
|
|
85
89
|
readonly labels: {
|
|
@@ -185,6 +185,10 @@ export declare const BUILTIN_CONTENT_TYPE_SCHEMAS: {
|
|
|
185
185
|
readonly kind: "event-occurrence";
|
|
186
186
|
readonly segmentType: "uuid-or-date";
|
|
187
187
|
readonly precedence: "subroute-first";
|
|
188
|
+
}, {
|
|
189
|
+
readonly kind: "event-run";
|
|
190
|
+
readonly segmentType: "slug";
|
|
191
|
+
readonly precedence: "content-first";
|
|
188
192
|
}];
|
|
189
193
|
};
|
|
190
194
|
readonly labels: {
|