@riverbankcms/sdk 0.130.0 → 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 +85 -0
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DiEpbOdw.mjs → PreviewEditorSidebar-DKQ5eFK9.mjs} +365 -106
- package/dist/{PreviewEditorUI-C6MvxnIa.mjs → PreviewEditorUI-CNTcOjCC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-C2rnoPz6.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DRXA_m5L.mjs → SdkPreviewModeRuntime-DJu3qu33.mjs} +91 -25
- package/dist/{SiteChromeCustomizeContext-BTHdv5_-.mjs → SiteChromeCustomizeContext-2TzT3vbj.mjs} +12577 -9240
- package/dist/_dts/ai/src/contracts/proposals.d.ts +991 -142
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +1092 -148
- package/dist/_dts/api/src/accountApi.d.ts +213 -0
- package/dist/_dts/api/src/accountEndpointDefinitions.d.ts +30 -0
- package/dist/_dts/api/src/accountEndpoints.d.ts +254 -0
- package/dist/_dts/api/src/apiCallParams.d.ts +60 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +18 -24
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +12 -24
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +44 -0
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +9 -0
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +47 -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 +885 -721
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +173 -7
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +58 -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 +12 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -0
- 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/oauth.d.ts +8 -0
- package/dist/_dts/api/src/preview-auth.d.ts +26 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +29 -16
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
- package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +48 -0
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +14 -45
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkEventCategoryContracts.d.ts +9 -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 +54 -12
- package/dist/_dts/api/src/settings/permissions.d.ts +2 -2
- package/dist/_dts/api/src/siteApiKeyEndpointDefinitions.d.ts +66 -0
- package/dist/_dts/api/src/siteInfrastructure.d.ts +3 -3
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/siteOperations.d.ts +1 -1
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +16 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +8 -61
- package/dist/_dts/block-form/src/client/index.d.ts +15 -23
- package/dist/_dts/block-form/src/index.d.ts +23 -22
- 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/primitives/layout/Grid.d.ts +18 -1
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1 -0
- 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 +64 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +26 -31
- 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/feature-cards.d.ts +25 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +16 -39
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +0 -1
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +4 -63
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +1 -3
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +13 -2
- package/dist/_dts/blocks/src/system/fields/gridLayout.d.ts +20 -0
- package/dist/_dts/blocks/src/system/node/fragments/classNameBinding.d.ts +6 -1
- package/dist/_dts/blocks/src/system/node/fragments/styledCard.d.ts +31 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +0 -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/useHeadlessBookingFlow.state.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +24 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.validationErrors.d.ts +17 -0
- 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/event-registration.headless.planning.d.ts +1 -1
- 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/eventScope.d.ts +1 -1
- 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/event-registration.server.d.ts +1 -1
- 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 +59 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +4 -1
- 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/components/FeedbackMessage.d.ts +17 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/spacing.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +109 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +4 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +40 -3
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +4 -37
- 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-editor/src/components/ContentFieldsForm.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +10 -6
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +10 -6
- 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/branded.d.ts +4 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-page-surface-subject.d.ts +25 -4
- 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 +6 -0
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +8 -0
- package/dist/_dts/core/src/secret.d.ts +44 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +413 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockValidationManifests.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonVariantField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/content-type-select/ContentTypeSelectField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/EntryPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/OfferingsPreviewGroupOrderField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +1 -1
- 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/blocks/useBlockCustomizeControls.d.ts +1 -1
- 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/EntryEditorPanel.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteFontStorageContext.d.ts +6 -0
- 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/siteFontPreview.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/sdk/contentStorage.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -1
- package/dist/_dts/preview-next/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +3 -5
- package/dist/_dts/preview-next/src/refresh-contract.d.ts +1 -0
- package/dist/_dts/preview-next/src/route-contract.d.ts +7 -0
- 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 +64 -54
- 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/preview-next/keep-alive.d.ts +1 -1
- 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/components/Layout.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +9 -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/theme-bridge/types.d.ts +4 -2
- 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/core.d.ts +54 -10
- package/dist/_dts/theme-core/src/cards/decorations.d.ts +33 -0
- package/dist/_dts/theme-core/src/cards/generateDefaultCardSystem.d.ts +7 -2
- package/dist/_dts/theme-core/src/cards/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/cards/openCardVariant.d.ts +24 -0
- package/dist/_dts/theme-core/src/cards/roles.d.ts +38 -0
- package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +53 -8
- package/dist/_dts/theme-core/src/cards/types.d.ts +474 -28
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +59 -0
- package/dist/_dts/theme-core/src/header/paintTargets.d.ts +2 -2
- package/dist/_dts/theme-core/src/header/scrollTreatment.d.ts +3 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +30 -138
- package/dist/_dts/theme-core/src/palette/utils/contrast.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/utils/opaqueSurfaceColor.d.ts +6 -0
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +302 -107
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +111 -102
- package/dist/_dts/theme-core/src/site-styles/appearancePresetResolution.d.ts +12 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +9 -4
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +0 -20
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +111 -102
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +48 -0
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +21 -385
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +10 -18
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +2 -4
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +2 -9
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +0 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAppearanceAvailability.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +22 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +9 -8
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntentEquality.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +19 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeBackgroundResolution.d.ts +9 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +1 -62
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +13 -12
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +62 -39
- package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +9 -9
- package/dist/_dts/theme-core/src/status/generateStatusCss.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +39 -0
- package/dist/_dts/ui/src/navigation-tabs.d.ts +5 -2
- package/dist/client/{DiscountCodeDisclosure-Ur-Xx1U_.mjs → DiscountCodeDisclosure-DO7llLxm.mjs} +12 -12
- package/dist/client/{EventCombined.client-EhscD4U6.mjs → EventCombined.client-xID7zN__.mjs} +38 -50
- package/dist/client/{EventListing.client-Bn26cFTY.mjs → EventListing.client-CriBslp0.mjs} +2 -2
- package/dist/client/{FeedbackMessage-ByMrs3cr.mjs → FeedbackMessage-CtLvvS_d.mjs} +15 -3
- package/dist/client/{LeafletStaticMap-BUw9Ntzr.mjs → LeafletStaticMap-DYmHnM8g.mjs} +1 -1
- package/dist/client/{StepIndicator-BfbdiVQI.mjs → StepIndicator-CGixP_LW.mjs} +3 -3
- package/dist/client/{CourseRegistrationWizard-Bvtz9G9g.mjs → WholeSeriesRegistrationWizard-BEjzSiOA.mjs} +1410 -1247
- package/dist/client/{accordion-CjIeof73.mjs → accordion-CgFbnnnQ.mjs} +1 -1
- package/dist/client/{bookingForm-DwEeovf_.mjs → bookingForm-dUyGpbxc.mjs} +56 -39
- package/dist/client/bookings.mjs +1096 -731
- package/dist/client/{carousel-BMrfgOba.mjs → carousel-BvBwkUzx.mjs} +2 -2
- package/dist/client/{carousel.client-CpwTUhIo.mjs → carousel.client-59G_WMr4.mjs} +1 -1
- package/dist/client/{cart-rXEdxTdb.mjs → cart-DiZENT2E.mjs} +3 -3
- package/dist/client/{checkout-D3JlSzh3.mjs → checkout-Dq13KIgR.mjs} +3 -3
- package/dist/client/client.mjs +10645 -6794
- package/dist/client/{colorStyles-BWpj_h4C.mjs → colorStyles-CrxJrPjJ.mjs} +277 -1
- package/dist/client/{context-CJz1Vlsz.mjs → context-B83PiNzm.mjs} +6 -21
- package/dist/client/{courseRegistration-DO5XvMAA.mjs → courseRegistration-CKC5NmyH.mjs} +11 -5
- package/dist/client/{eventCalendar-DO6rTqCn.mjs → eventCalendar-BF0Jatfw.mjs} +42 -45
- package/dist/client/{eventCombined-bJ3i_ovU.mjs → eventCombined-BuoCF8je.mjs} +3 -3
- package/dist/client/{eventDetails-CCbrXE7o.mjs → eventDetails-CKwh0S9s.mjs} +276 -94
- package/dist/client/{eventListing-Bdlt9YTm.mjs → eventListing-eUxaWFaB.mjs} +3 -3
- package/dist/client/{eventRegistration-B02lt6iY.mjs → eventRegistration-CfkNOkPb.mjs} +630 -138
- package/dist/client/{form-DrUBAAox.mjs → form-C17H1c_H.mjs} +4 -4
- package/dist/client/{headerSection-MzqvHL6T.mjs → headerSection-DEwUmrtt.mjs} +2 -2
- package/dist/client/hooks.mjs +3224 -2485
- package/dist/client/{locationMap-DG8BxTBm.mjs → locationMap-Pf2QwuvW.mjs} +3 -3
- package/dist/client/{media-CNE1Z-wb.mjs → media-BOHuueS5.mjs} +16 -4
- package/dist/client/{newsletterForm-BzO-Td3p.mjs → newsletterForm-BWQAH5Sv.mjs} +4 -4
- package/dist/client/pricing-CVdvbopJ.mjs +195 -0
- package/dist/client/{productDetail-CfQ7rhVK.mjs → productDetail-BZi1Fa_G.mjs} +3 -3
- package/dist/client/{productList-C23rOLUi.mjs → productList-qq-55DNk.mjs} +3 -3
- package/dist/client/{propsDecoder-CAZdhwjs.mjs → propsDecoder-BxmqPKdP.mjs} +859 -650
- package/dist/client/rendering/client.mjs +8658 -7862
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +11437 -7446
- package/dist/client/{scrollToBlock-DSSqVQr1.mjs → scrollToBlock-B3CcKdtG.mjs} +1 -1
- package/dist/client/{shop-BMToKLK7.mjs → shop-DNWJPut5.mjs} +7 -7
- package/dist/client/{shop-commerce-DB4JRKmp.mjs → shop-commerce-BhvQCosS.mjs} +8 -8
- package/dist/client/{shop-commerce-store-BOqSIOuc.mjs → shop-commerce-store-B04sCNnW.mjs} +1 -1
- package/dist/client/{shopShared-B6SK9DZv.mjs → shopShared-DNNgZlmW.mjs} +5 -5
- package/dist/client/{useEventFilters-CULOa4nB.mjs → useEventFilters-CUmhE24_.mjs} +329 -84
- package/dist/client/{usePolling-BGG_8-jl.mjs → usePolling-M5jG675x.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +439 -168
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +7593 -29
- package/dist/preview-next/middleware.mjs +433 -167
- package/dist/{previewAuthStore-_GXFRg2W.mjs → previewAuthStore-BFKd4LrN.mjs} +432 -167
- package/dist/{sdk-runtime-hhSOMShR.mjs → sdk-runtime-BEXb1wqo.mjs} +2 -2
- package/dist/{separator-flRaFc14.mjs → separator-DGMuip1D.mjs} +1 -1
- package/dist/server/components.mjs +9596 -6347
- package/dist/server/config-validation.mjs +3224 -2486
- package/dist/server/config.mjs +3224 -2486
- package/dist/server/data.mjs +3224 -2485
- package/dist/server/index.mjs +486 -200
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +10343 -7188
- package/dist/server/page-converter.mjs +1828 -2094
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6750 -4519
- package/dist/server/rendering.mjs +9591 -6342
- package/dist/server/routing.mjs +3403 -1594
- package/dist/server/server.mjs +3274 -2671
- package/dist/server/theme-bridge.mjs +2979 -1639
- package/dist/server/theme.mjs +590 -176
- package/dist/styles/index.css +1896 -1129
- package/package.json +3 -2
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/block-form/src/client/blockDraftSaveability.d.ts +0 -1
- package/dist/_dts/block-form/src/widgets/index.d.ts +0 -20
- package/dist/_dts/blocks/src/system/runtime/api/requestBody.d.ts +0 -7
- 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/clsx-DgIEfj3H.mjs +0 -16
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-NgK7ozkg.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,40 @@
|
|
|
1
|
+
import type { CheckoutCommitState, CheckoutPaymentRail, OrderCheckoutReconciliationState, OrderItemReconciliationState, OrderItemCommitState, OrderStatus, ReservationFinalizationState } from './orderTypes';
|
|
2
|
+
import type { OrderItemPlanningRecord } from './orderPlanningTypes';
|
|
3
|
+
export type CheckoutCommitOrderRecord = Readonly<{
|
|
4
|
+
status: OrderStatus;
|
|
5
|
+
commitState: CheckoutCommitState;
|
|
6
|
+
reconciliationState: OrderCheckoutReconciliationState;
|
|
7
|
+
}>;
|
|
8
|
+
export type CheckoutCommitOrderItemRecord = Readonly<Pick<OrderItemPlanningRecord, 'kind' | 'commitState' | 'reconciliationState' | 'fulfilledAt' | 'cancelledAt' | 'customerMembershipId'>>;
|
|
9
|
+
export type CheckoutCommitPlanStepKind = 'consume_credit_reservation' | 'provision_memberships' | 'fulfill_order_items' | 'redeem_discount' | 'record_order_payment';
|
|
10
|
+
export type NormalizedOrderCommitItem<TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
|
|
11
|
+
item: TItem;
|
|
12
|
+
commitState: OrderItemCommitState;
|
|
13
|
+
reconciliationState: OrderItemReconciliationState;
|
|
14
|
+
}>;
|
|
15
|
+
export type NormalizedOrderCommitSnapshot<TOrder extends CheckoutCommitOrderRecord = CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
|
|
16
|
+
order: TOrder;
|
|
17
|
+
commitState: CheckoutCommitState;
|
|
18
|
+
reconciliationState: OrderCheckoutReconciliationState;
|
|
19
|
+
items: readonly NormalizedOrderCommitItem<TItem>[];
|
|
20
|
+
}>;
|
|
21
|
+
export type CheckoutCommitPlanStep = Readonly<{
|
|
22
|
+
kind: CheckoutCommitPlanStepKind;
|
|
23
|
+
}>;
|
|
24
|
+
export type CheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord = CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord = CheckoutCommitOrderItemRecord> = Readonly<{
|
|
25
|
+
paymentRail: CheckoutPaymentRail;
|
|
26
|
+
normalized: NormalizedOrderCommitSnapshot<TOrder, TItem>;
|
|
27
|
+
steps: readonly CheckoutCommitPlanStep[];
|
|
28
|
+
}>;
|
|
29
|
+
export declare function normalizeOrderCommitSnapshot<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: {
|
|
30
|
+
order: TOrder;
|
|
31
|
+
items: readonly TItem[];
|
|
32
|
+
}): NormalizedOrderCommitSnapshot<TOrder, TItem>;
|
|
33
|
+
export declare function buildCheckoutCommitPlan<TOrder extends CheckoutCommitOrderRecord, TItem extends CheckoutCommitOrderItemRecord>(input: {
|
|
34
|
+
paymentRail: CheckoutPaymentRail;
|
|
35
|
+
order: TOrder;
|
|
36
|
+
items: readonly TItem[];
|
|
37
|
+
creditReservationState: ReservationFinalizationState;
|
|
38
|
+
hasDiscountRedemption: boolean;
|
|
39
|
+
paymentRecorded: boolean;
|
|
40
|
+
}): CheckoutCommitPlan<TOrder, TItem>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { AppointmentServiceId, EventCategoryId, EventSeriesId, NonNegativeCents, PassId, ProductCategoryId, ProductId } from '../../../core/src/index';
|
|
2
|
+
export type CheckoutDiscountContext = Readonly<{
|
|
3
|
+
type: 'event';
|
|
4
|
+
eventSeriesId: EventSeriesId;
|
|
5
|
+
eventCategoryId: EventCategoryId | null;
|
|
6
|
+
ticketsCount?: number;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
type: 'product';
|
|
9
|
+
productId: ProductId;
|
|
10
|
+
productCategoryId: ProductCategoryId | null;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
type: 'pass';
|
|
13
|
+
passId: PassId;
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
type: 'whole_series';
|
|
16
|
+
eventSeriesId: EventSeriesId;
|
|
17
|
+
eventCategoryId: EventCategoryId | null;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
type: 'appointment';
|
|
20
|
+
serviceId: AppointmentServiceId;
|
|
21
|
+
}>;
|
|
22
|
+
export type CheckoutDiscountContextSource = Readonly<{
|
|
23
|
+
type: 'event_ticket';
|
|
24
|
+
ticketCount: number;
|
|
25
|
+
eventSeries: Readonly<{
|
|
26
|
+
id: EventSeriesId;
|
|
27
|
+
eventCategoryId: EventCategoryId | null;
|
|
28
|
+
}>;
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
type: 'product';
|
|
31
|
+
productId: ProductId;
|
|
32
|
+
product: Readonly<{
|
|
33
|
+
productCategoryId: ProductCategoryId | null;
|
|
34
|
+
}>;
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
type: 'pass';
|
|
37
|
+
passId: PassId;
|
|
38
|
+
}> | Readonly<{
|
|
39
|
+
type: 'whole_series_enrollment';
|
|
40
|
+
eventSeries: Readonly<{
|
|
41
|
+
id: EventSeriesId;
|
|
42
|
+
eventCategoryId: EventCategoryId | null;
|
|
43
|
+
}>;
|
|
44
|
+
}> | Readonly<{
|
|
45
|
+
type: 'appointment';
|
|
46
|
+
serviceId: AppointmentServiceId;
|
|
47
|
+
}>;
|
|
48
|
+
export type CheckoutDiscountContextLineInput<TLineId extends string> = Readonly<{
|
|
49
|
+
lineId: TLineId;
|
|
50
|
+
subtotalCents: number;
|
|
51
|
+
validated: CheckoutDiscountContextSource;
|
|
52
|
+
}>;
|
|
53
|
+
export type CheckoutDiscountContextEntry<TLineId extends string> = Readonly<{
|
|
54
|
+
identityKey: string;
|
|
55
|
+
context: CheckoutDiscountContext;
|
|
56
|
+
subtotalCents: number;
|
|
57
|
+
lineIds: readonly TLineId[];
|
|
58
|
+
}>;
|
|
59
|
+
export type CheckoutAutoDiscountCandidate<TCode, TLineId extends string> = Readonly<{
|
|
60
|
+
code: TCode;
|
|
61
|
+
applicableContexts: readonly CheckoutDiscountContextEntry<TLineId>[];
|
|
62
|
+
}>;
|
|
63
|
+
export type CheckoutAutoDiscountCandidateCode = Readonly<{
|
|
64
|
+
id: string;
|
|
65
|
+
discountType: 'fixed' | 'percent';
|
|
66
|
+
discountPercent?: number | null;
|
|
67
|
+
discountAmountCents?: number | null;
|
|
68
|
+
}>;
|
|
69
|
+
export declare function collectCheckoutDiscountContexts<TLineId extends string>(items: readonly CheckoutDiscountContextLineInput<TLineId>[]): readonly CheckoutDiscountContextEntry<TLineId>[];
|
|
70
|
+
export declare function subtotalForCheckoutDiscountContexts<TLineId extends string>(applicableContexts: readonly CheckoutDiscountContextEntry<TLineId>[]): number;
|
|
71
|
+
export declare function rankCheckoutAutoDiscountCandidates<TCode extends CheckoutAutoDiscountCandidateCode, TLineId extends string>(candidates: readonly CheckoutAutoDiscountCandidate<TCode, TLineId>[]): readonly (CheckoutAutoDiscountCandidate<TCode, TLineId> & Readonly<{
|
|
72
|
+
subtotalCents: number;
|
|
73
|
+
computedDiscountCents: NonNegativeCents;
|
|
74
|
+
}>)[];
|
|
75
|
+
export declare function computeCheckoutDiscountCents(options: Readonly<{
|
|
76
|
+
discountType: 'fixed' | 'percent';
|
|
77
|
+
discountPercent?: number | null;
|
|
78
|
+
discountAmountCents?: NonNegativeCents | null;
|
|
79
|
+
subtotalCents: NonNegativeCents;
|
|
80
|
+
}>): NonNegativeCents;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CheckoutErrorCode = "appointment_not_found" | "appointment_slot_unavailable" | "appointment_payment_terms_not_supported" | "booking_payment_terms_not_supported" | "checkout_amount_below_minimum" | "sliding_amount_required" | "sliding_amount_invalid" | "sliding_amount_below_min" | "sliding_amount_above_max" | "not_found" | "site_mismatch" | "registration_disabled" | "invalid_payment_method" | "payment_already_completed" | "invalid_payment_status" | "no_event_association" | "payment_not_required" | "customer_not_found" | "stripe_not_configured" | "stripe_commission_not_supported" | "stripe_tax_not_ready" | "stripe_tax_status_unavailable" | "course_pricing_option_not_available" | "product_not_available" | "product_not_eligible" | "insufficient_credits" | "invalid_discount_code" | "unsupported_discount_scope" | "checkout_in_progress" | "stripe_error" | "internal_error";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NonNegativeCents } from '../../../core/src/index';
|
|
2
|
+
import type { PositiveCheckoutQuantity } from './checkoutQuantity';
|
|
3
|
+
import type { LineSettlementBreakdown } from './settlement';
|
|
4
|
+
export type CheckoutOrderItemMoneyInput<TLineId extends string> = Readonly<{
|
|
5
|
+
lineId: TLineId;
|
|
6
|
+
itemIndex: number;
|
|
7
|
+
unitPriceCents: NonNegativeCents;
|
|
8
|
+
quantity: PositiveCheckoutQuantity;
|
|
9
|
+
settlement: LineSettlementBreakdown;
|
|
10
|
+
}>;
|
|
11
|
+
export type CheckoutOrderItemMoneyProjection<TLineId extends string> = Readonly<{
|
|
12
|
+
lineKey: TLineId;
|
|
13
|
+
unitPriceCents: number;
|
|
14
|
+
quantity: number;
|
|
15
|
+
subtotalCents: number;
|
|
16
|
+
discountCents: number;
|
|
17
|
+
creditCents: number;
|
|
18
|
+
netTotalCents: number;
|
|
19
|
+
totalCents: number;
|
|
20
|
+
refundedCents: 0;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function projectCheckoutOrderItemMoney<TLineId extends string>(input: CheckoutOrderItemMoneyInput<TLineId>): CheckoutOrderItemMoneyProjection<TLineId>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type NonNegativeCents } from '../../../core/src/index';
|
|
2
|
+
export type CheckoutPaymentFlowPlan = Readonly<{
|
|
3
|
+
kind: 'bypass';
|
|
4
|
+
bypassReason: 'free' | 'discount_free';
|
|
5
|
+
reserveCreditCents: 0;
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
kind: 'store_credit_only';
|
|
8
|
+
reserveCreditCents: NonNegativeCents;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
kind: 'stripe';
|
|
11
|
+
reserveCreditCents: NonNegativeCents;
|
|
12
|
+
}>;
|
|
13
|
+
export type FlexibleBalanceCreditFirstPlan = Readonly<{
|
|
14
|
+
kind: 'credit_only';
|
|
15
|
+
reserveCreditCents: NonNegativeCents;
|
|
16
|
+
cardDueNowCents: NonNegativeCents;
|
|
17
|
+
laterBalanceCents: NonNegativeCents;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'flexible_balance';
|
|
20
|
+
reserveCreditCents: NonNegativeCents;
|
|
21
|
+
cardDueNowCents: NonNegativeCents;
|
|
22
|
+
laterBalanceCents: NonNegativeCents;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'card_below_minimum';
|
|
25
|
+
reserveCreditCents: NonNegativeCents;
|
|
26
|
+
cardDueNowCents: NonNegativeCents;
|
|
27
|
+
laterBalanceCents: NonNegativeCents;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function planCheckoutPaymentFlow(options: Readonly<{
|
|
30
|
+
amountDueCents: number;
|
|
31
|
+
discountCents: number;
|
|
32
|
+
availableCreditCents: number;
|
|
33
|
+
creditCurrencyMatches: boolean;
|
|
34
|
+
minimumStripeChargeCents?: number | null;
|
|
35
|
+
}>): CheckoutPaymentFlowPlan;
|
|
36
|
+
/**
|
|
37
|
+
* Apply site credit to a flexible-balance booking before card payment.
|
|
38
|
+
*
|
|
39
|
+
* Credit first reduces the configured payment due now. Once that payment is
|
|
40
|
+
* covered, any remaining credit reduces the later balance. If a partial credit
|
|
41
|
+
* application would leave a positive card charge below Stripe's minimum, less
|
|
42
|
+
* credit is used so the configured payment can still be collected.
|
|
43
|
+
*/
|
|
44
|
+
export declare function planFlexibleBalanceCreditFirst(input: Readonly<{
|
|
45
|
+
totalAfterDiscountCents: number;
|
|
46
|
+
configuredPaymentDueNowCents: number;
|
|
47
|
+
availableCreditCents: number;
|
|
48
|
+
creditCurrencyMatches: boolean;
|
|
49
|
+
minimumStripeChargeCents?: number | null;
|
|
50
|
+
}>): FlexibleBalanceCreditFirstPlan;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type BookingFlexibleBalanceConfig } from '../../../core/src/index';
|
|
2
|
+
export type CheckoutStripeRequiredPaymentObligation<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
3
|
+
kind: 'stripe';
|
|
4
|
+
}> | Readonly<{
|
|
5
|
+
kind: 'instalment_plan';
|
|
6
|
+
planDefinition: TInstalmentPlan;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
kind: 'flexible_balance';
|
|
9
|
+
config: TFlexibleBalanceConfig;
|
|
10
|
+
initialPaymentCents: number;
|
|
11
|
+
bookingStartAt: string;
|
|
12
|
+
dueAt: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type CheckoutStripeRequiredPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
15
|
+
kind: 'standard';
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'instalment_plan';
|
|
18
|
+
planDefinition: TInstalmentPlan;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'flexible_balance';
|
|
21
|
+
selection: Readonly<{
|
|
22
|
+
config: TFlexibleBalanceConfig;
|
|
23
|
+
bookingStartAt: string;
|
|
24
|
+
dueAt: string;
|
|
25
|
+
}>;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function planStripeRequiredCheckoutPaymentObligation<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(input: Readonly<{
|
|
28
|
+
totalAfterDiscountCents: number;
|
|
29
|
+
paymentTerms?: CheckoutStripeRequiredPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig>;
|
|
30
|
+
}>): CheckoutStripeRequiredPaymentObligation<TInstalmentPlan, TFlexibleBalanceConfig>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BookingFlexibleBalanceConfig } from '../../../core/src/index';
|
|
2
|
+
import type { CheckoutPaymentTermLine, CheckoutPaymentTerms } from './checkoutPaymentTerms';
|
|
3
|
+
import type { CheckoutStripeRequiredPaymentTerms } from './checkoutPaymentPlanPlanning';
|
|
4
|
+
export type AttendeeBookingCheckoutPaymentSelectionSnapshot<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
5
|
+
bookingStartAt?: string | null;
|
|
6
|
+
selectedCollectionOptionKind?: 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance' | null;
|
|
7
|
+
selectedFlexibleBalanceConfig?: TFlexibleBalanceConfig | null;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function attendeeBookingPaymentSelectionToCheckoutPaymentTermLine<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(selection: AttendeeBookingCheckoutPaymentSelectionSnapshot<TFlexibleBalanceConfig>): CheckoutPaymentTermLine<never, TFlexibleBalanceConfig>;
|
|
10
|
+
export declare function checkoutPaymentTermsToStripeRequiredPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(paymentTerms: CheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig>): CheckoutStripeRequiredPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type BookingFlexibleBalanceConfig } from '../../../core/src/index';
|
|
2
|
+
import { type Result } from '../../../core/src/index';
|
|
3
|
+
export type CheckoutPaymentTermCollectionOptionKind = 'upfront' | 'deferred_manual' | 'instalment_plan' | 'flexible_balance';
|
|
4
|
+
export type CheckoutPaymentTermsError = Readonly<{
|
|
5
|
+
_tag: 'instalment_plan_not_supported';
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
_tag: 'flexible_balance_empty_cart';
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
_tag: 'flexible_balance_requires_single_item';
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
_tag: 'flexible_balance_not_supported';
|
|
12
|
+
}>;
|
|
13
|
+
export type CheckoutAppointmentPaymentTermSelection<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
|
|
14
|
+
kind: 'upfront' | 'deferred_manual';
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: 'instalment_plan';
|
|
17
|
+
plan: TInstalmentPlan;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'flexible_balance';
|
|
20
|
+
config: TFlexibleBalanceConfig;
|
|
21
|
+
}> | null;
|
|
22
|
+
export type CheckoutAttendeeBookingPaymentTermSelection<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
|
|
23
|
+
kind: 'upfront' | 'deferred_manual';
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
kind: 'flexible_balance';
|
|
26
|
+
config: TFlexibleBalanceConfig;
|
|
27
|
+
}> | null;
|
|
28
|
+
export type CheckoutPaymentTermLine<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
|
|
29
|
+
kind: 'appointment';
|
|
30
|
+
bookingStartAt: string;
|
|
31
|
+
selectedCollectionOption: CheckoutAppointmentPaymentTermSelection<TInstalmentPlan, TFlexibleBalanceConfig>;
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
kind: 'attendee_booking';
|
|
34
|
+
bookingStartAt?: string | null;
|
|
35
|
+
selectedCollectionOption: CheckoutAttendeeBookingPaymentTermSelection<TFlexibleBalanceConfig>;
|
|
36
|
+
}> | Readonly<{
|
|
37
|
+
kind: 'other';
|
|
38
|
+
}>;
|
|
39
|
+
export type CheckoutFlexibleBalanceSelection<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
|
|
40
|
+
config: TFlexibleBalanceConfig;
|
|
41
|
+
bookingStartAt: string;
|
|
42
|
+
dueAt: string;
|
|
43
|
+
}>;
|
|
44
|
+
export type CheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig> = Readonly<{
|
|
45
|
+
instalmentPlanDefinition: TInstalmentPlan | null;
|
|
46
|
+
flexibleBalanceSelection: CheckoutFlexibleBalanceSelection<TFlexibleBalanceConfig> | null;
|
|
47
|
+
}>;
|
|
48
|
+
type CheckoutPaymentTermsInput<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
49
|
+
requestedCollectionOptionKind?: CheckoutPaymentTermCollectionOptionKind;
|
|
50
|
+
items: readonly CheckoutPaymentTermLine<TInstalmentPlan, TFlexibleBalanceConfig>[];
|
|
51
|
+
}>;
|
|
52
|
+
export declare function resolveCheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig = BookingFlexibleBalanceConfig>(input: CheckoutPaymentTermsInput<TInstalmentPlan, TFlexibleBalanceConfig>): Result<CheckoutPaymentTerms<TInstalmentPlan, TFlexibleBalanceConfig>, CheckoutPaymentTermsError>;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Brand, type Result } from '../../../core/src/index';
|
|
2
|
+
export type PositiveCheckoutQuantity = Brand<number, 'PositiveCheckoutQuantity'>;
|
|
3
|
+
export type PositiveCheckoutQuantityParseError = Readonly<{
|
|
4
|
+
kind: 'not_positive_whole_quantity';
|
|
5
|
+
quantity: number;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function parsePositiveCheckoutQuantity(quantity: number): Result<PositiveCheckoutQuantity, PositiveCheckoutQuantityParseError>;
|
|
8
|
+
export declare function unsafeAsPositiveCheckoutQuantity(quantity: number): PositiveCheckoutQuantity;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DatedOfferingSharedEngineMetadataSchema: z.ZodObject<{
|
|
3
|
+
datedOfferingEngineContractVersion: z.ZodLiteral<"shared_v1">;
|
|
4
|
+
datedOfferingEngineRouteKind: z.ZodLiteral<"shared_whole_series_registration">;
|
|
5
|
+
datedOfferingCapacityHoldId: z.ZodString;
|
|
6
|
+
datedOfferingCapacityHoldAuditRef: z.ZodString;
|
|
7
|
+
customerId: z.ZodString;
|
|
8
|
+
eventSeriesId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const OrderCheckoutSessionMetadataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
+
datedOfferingEngineContractVersion: z.ZodLiteral<"shared_v1">;
|
|
12
|
+
datedOfferingEngineRouteKind: z.ZodLiteral<"shared_whole_series_registration">;
|
|
13
|
+
datedOfferingCapacityHoldId: z.ZodString;
|
|
14
|
+
datedOfferingCapacityHoldAuditRef: z.ZodString;
|
|
15
|
+
customerId: z.ZodString;
|
|
16
|
+
eventSeriesId: z.ZodString;
|
|
17
|
+
type: z.ZodLiteral<"order">;
|
|
18
|
+
site_id: z.ZodString;
|
|
19
|
+
order_id: z.ZodOptional<z.ZodString>;
|
|
20
|
+
customer_email: z.ZodString;
|
|
21
|
+
customer_name: z.ZodOptional<z.ZodString>;
|
|
22
|
+
product_id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
attendee_id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
occurrence_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
tickets_count: z.ZodOptional<z.ZodString>;
|
|
26
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
27
|
+
discount_redemption_id: z.ZodOptional<z.ZodString>;
|
|
28
|
+
discount_code_id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
discount_code: z.ZodOptional<z.ZodString>;
|
|
30
|
+
discount_public_label: z.ZodOptional<z.ZodString>;
|
|
31
|
+
credit_reservation_id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
credit_reserved_cents: z.ZodOptional<z.ZodString>;
|
|
33
|
+
discount_code_amount_cents: z.ZodOptional<z.ZodString>;
|
|
34
|
+
order_payment_reason: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
flexible_balance_paydown: "flexible_balance_paydown";
|
|
36
|
+
instalment_payoff: "instalment_payoff";
|
|
37
|
+
flexible_balance_initial: "flexible_balance_initial";
|
|
38
|
+
}>>;
|
|
39
|
+
order_payment_plan_id: z.ZodOptional<z.ZodString>;
|
|
40
|
+
order_flexible_balance_contract_id: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
datedOfferingEngineContractVersion: z.ZodOptional<z.ZodNever>;
|
|
43
|
+
datedOfferingEngineRouteKind: z.ZodOptional<z.ZodNever>;
|
|
44
|
+
datedOfferingCapacityHoldId: z.ZodOptional<z.ZodNever>;
|
|
45
|
+
datedOfferingCapacityHoldAuditRef: z.ZodOptional<z.ZodNever>;
|
|
46
|
+
customerId: z.ZodOptional<z.ZodNever>;
|
|
47
|
+
eventSeriesId: z.ZodOptional<z.ZodNever>;
|
|
48
|
+
type: z.ZodLiteral<"order">;
|
|
49
|
+
site_id: z.ZodString;
|
|
50
|
+
order_id: z.ZodOptional<z.ZodString>;
|
|
51
|
+
customer_email: z.ZodString;
|
|
52
|
+
customer_name: z.ZodOptional<z.ZodString>;
|
|
53
|
+
product_id: z.ZodOptional<z.ZodString>;
|
|
54
|
+
attendee_id: z.ZodOptional<z.ZodString>;
|
|
55
|
+
occurrence_id: z.ZodOptional<z.ZodString>;
|
|
56
|
+
tickets_count: z.ZodOptional<z.ZodString>;
|
|
57
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
58
|
+
discount_redemption_id: z.ZodOptional<z.ZodString>;
|
|
59
|
+
discount_code_id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
discount_code: z.ZodOptional<z.ZodString>;
|
|
61
|
+
discount_public_label: z.ZodOptional<z.ZodString>;
|
|
62
|
+
credit_reservation_id: z.ZodOptional<z.ZodString>;
|
|
63
|
+
credit_reserved_cents: z.ZodOptional<z.ZodString>;
|
|
64
|
+
discount_code_amount_cents: z.ZodOptional<z.ZodString>;
|
|
65
|
+
order_payment_reason: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
flexible_balance_paydown: "flexible_balance_paydown";
|
|
67
|
+
instalment_payoff: "instalment_payoff";
|
|
68
|
+
flexible_balance_initial: "flexible_balance_initial";
|
|
69
|
+
}>>;
|
|
70
|
+
order_payment_plan_id: z.ZodOptional<z.ZodString>;
|
|
71
|
+
order_flexible_balance_contract_id: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>]>;
|
|
73
|
+
export type OrderCheckoutSessionMetadata = z.infer<typeof OrderCheckoutSessionMetadataSchema>;
|
|
74
|
+
export type OrderCheckoutSessionMetadataWithOrderId = OrderCheckoutSessionMetadata & Readonly<{
|
|
75
|
+
order_id: string;
|
|
76
|
+
}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type NonNegativeCents, type Result } from '../../../core/src/index';
|
|
2
|
+
import { type CurrencyCode, type LineSettlementBreakdown, type LineSettlementMoneyField } from './settlement';
|
|
3
|
+
export type CheckoutSettlementMoneyField = LineSettlementMoneyField | 'totalAfterDiscountCents';
|
|
4
|
+
export type CheckoutSettlementError<TLineId extends string = string> = Readonly<{
|
|
5
|
+
_tag: 'empty_cart';
|
|
6
|
+
message: string;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
_tag: 'invalid_credit_requested';
|
|
9
|
+
message: string;
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
_tag: 'invalid_line_money';
|
|
12
|
+
lineId: TLineId;
|
|
13
|
+
field: CheckoutSettlementMoneyField;
|
|
14
|
+
message: string;
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
_tag: 'inconsistent_line_totals';
|
|
17
|
+
lineId: TLineId;
|
|
18
|
+
message: string;
|
|
19
|
+
}>;
|
|
20
|
+
export type CheckoutSettlementLineInput<TLineId extends string, TPayload> = Readonly<{
|
|
21
|
+
lineId: TLineId;
|
|
22
|
+
subtotalCents: NonNegativeCents;
|
|
23
|
+
discountCents: NonNegativeCents;
|
|
24
|
+
totalAfterDiscountCents: NonNegativeCents;
|
|
25
|
+
payload: TPayload;
|
|
26
|
+
}>;
|
|
27
|
+
export type CheckoutSettlementInput<TLineId extends string, TPayload> = Readonly<{
|
|
28
|
+
currency: CurrencyCode;
|
|
29
|
+
creditRequestedCents: NonNegativeCents;
|
|
30
|
+
items: readonly CheckoutSettlementLineInput<TLineId, TPayload>[];
|
|
31
|
+
}>;
|
|
32
|
+
export type CheckoutSettlementLine<TLineId extends string, TPayload> = Readonly<{
|
|
33
|
+
lineId: TLineId;
|
|
34
|
+
payload: TPayload;
|
|
35
|
+
settlement: LineSettlementBreakdown;
|
|
36
|
+
}>;
|
|
37
|
+
export type CheckoutSettlement<TLineId extends string, TPayload> = Readonly<{
|
|
38
|
+
currency: CurrencyCode;
|
|
39
|
+
items: readonly CheckoutSettlementLine<TLineId, TPayload>[];
|
|
40
|
+
subtotalCents: NonNegativeCents;
|
|
41
|
+
discountCents: NonNegativeCents;
|
|
42
|
+
totalAfterDiscountCents: NonNegativeCents;
|
|
43
|
+
creditCents: NonNegativeCents;
|
|
44
|
+
totalAfterCreditsCents: NonNegativeCents;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function settleCheckoutCart<TLineId extends string, TPayload>(input: CheckoutSettlementInput<TLineId, TPayload>): Result<CheckoutSettlement<TLineId, TPayload>, CheckoutSettlementError<TLineId>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type CheckoutStripeFinalizationPaymentPlanKind = 'stripe' | 'instalment_plan' | 'flexible_balance';
|
|
2
|
+
export type CheckoutStripeSessionRecordUpdateTarget = 'order' | 'order_payment_plan' | 'flexible_balance_contract';
|
|
3
|
+
export type CheckoutStripeSessionRecordUpdatePlan = Readonly<{
|
|
4
|
+
target: CheckoutStripeSessionRecordUpdateTarget;
|
|
5
|
+
orderId: string;
|
|
6
|
+
sessionId: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function planCheckoutStripeSessionRecordUpdates(options: Readonly<{
|
|
9
|
+
paymentPlanKind: CheckoutStripeFinalizationPaymentPlanKind;
|
|
10
|
+
orderId: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
}>): readonly CheckoutStripeSessionRecordUpdatePlan[];
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type Result } from '../../../core/src/index';
|
|
2
|
+
import { type LineSettlementBreakdown } from './settlement';
|
|
3
|
+
export type CheckoutStripeSessionPaymentPlan = Readonly<{
|
|
4
|
+
kind: 'stripe' | 'instalment_plan';
|
|
5
|
+
creditReservationId?: string | null;
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
kind: 'flexible_balance';
|
|
8
|
+
initialPaymentCents: number;
|
|
9
|
+
creditReservationId?: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
export type CheckoutStripeSessionPaymentIntentPaymentPlan = Readonly<{
|
|
12
|
+
kind: CheckoutStripeSessionPaymentPlan['kind'];
|
|
13
|
+
}>;
|
|
14
|
+
export type CheckoutStripeSessionLineInput = Readonly<{
|
|
15
|
+
displayName: string;
|
|
16
|
+
quantity: number;
|
|
17
|
+
settlement: Readonly<{
|
|
18
|
+
line: LineSettlementBreakdown;
|
|
19
|
+
}>;
|
|
20
|
+
}>;
|
|
21
|
+
export type CheckoutStripeSessionLineItemPlan = Readonly<{
|
|
22
|
+
name: string;
|
|
23
|
+
unitAmountCents: number;
|
|
24
|
+
quantity: number;
|
|
25
|
+
}>;
|
|
26
|
+
export type CheckoutStripeSessionCollectionPlan = Readonly<{
|
|
27
|
+
lineItems: readonly CheckoutStripeSessionLineItemPlan[];
|
|
28
|
+
totals: Readonly<{
|
|
29
|
+
discountCents: number;
|
|
30
|
+
creditCents: number;
|
|
31
|
+
}>;
|
|
32
|
+
expiresAtEpoch: number | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export type CheckoutStripeSessionDiscountMetadata = Readonly<{
|
|
35
|
+
redemptionId: string;
|
|
36
|
+
discountCodeId: string;
|
|
37
|
+
discountCode: string;
|
|
38
|
+
discountPublicLabel: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type CheckoutStripeSessionOrderReferences = Readonly<{
|
|
41
|
+
siteId: string;
|
|
42
|
+
orderId: string;
|
|
43
|
+
customerEmail: string;
|
|
44
|
+
orderPaymentPlanId: string | null;
|
|
45
|
+
flexibleBalanceContractId: string | null;
|
|
46
|
+
}>;
|
|
47
|
+
export type CheckoutStripeSessionApplicationFeeDecision = Readonly<{
|
|
48
|
+
kind: 'none';
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'application_fee_amount';
|
|
51
|
+
amountCents: number;
|
|
52
|
+
}>;
|
|
53
|
+
export type CheckoutStripeSessionPaymentIntentPlan = Readonly<{
|
|
54
|
+
customerCreation?: 'always';
|
|
55
|
+
setupFutureUsage?: 'off_session';
|
|
56
|
+
applicationFeeAmountCents?: number;
|
|
57
|
+
}>;
|
|
58
|
+
export type CheckoutStripeSessionSettlementPolicy = Readonly<{
|
|
59
|
+
kind: 'stripe_default';
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: 'must_settle_before_reservation_deadline';
|
|
62
|
+
paymentMethodSet: 'immediate_only';
|
|
63
|
+
}>;
|
|
64
|
+
export type CheckoutStripeSessionRequestPlan = CheckoutStripeSessionCollectionPlan & Readonly<{
|
|
65
|
+
metadata: Record<string, string>;
|
|
66
|
+
paymentIntent: CheckoutStripeSessionPaymentIntentPlan;
|
|
67
|
+
paymentMethodTypes: readonly ['card'] | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
export type CheckoutStripeSessionPlanningError = Readonly<{
|
|
70
|
+
_tag: 'invalid_line_quantity';
|
|
71
|
+
lineIndex: number;
|
|
72
|
+
quantity: number;
|
|
73
|
+
message: string;
|
|
74
|
+
}> | Readonly<{
|
|
75
|
+
_tag: 'invalid_line_money';
|
|
76
|
+
lineIndex: number;
|
|
77
|
+
field: 'stripeChargeCents';
|
|
78
|
+
amountCents: number;
|
|
79
|
+
message: string;
|
|
80
|
+
}> | Readonly<{
|
|
81
|
+
_tag: 'invalid_flexible_balance_initial_payment';
|
|
82
|
+
amountCents: number;
|
|
83
|
+
message: string;
|
|
84
|
+
}>;
|
|
85
|
+
export declare function planCheckoutStripeSessionRequest(options: Readonly<{
|
|
86
|
+
checkoutLines: readonly CheckoutStripeSessionLineInput[];
|
|
87
|
+
paymentPlan: CheckoutStripeSessionPaymentPlan;
|
|
88
|
+
orderDisplayName: string;
|
|
89
|
+
discountExpiresAtEpoch: number | undefined;
|
|
90
|
+
creditReservationExpiresAtIso: string | null;
|
|
91
|
+
registrationHoldExpiresAtEpoch?: number;
|
|
92
|
+
discount: CheckoutStripeSessionDiscountMetadata | null;
|
|
93
|
+
orderReferences: CheckoutStripeSessionOrderReferences;
|
|
94
|
+
applicationFeeDecision: CheckoutStripeSessionApplicationFeeDecision;
|
|
95
|
+
settlementPolicy?: CheckoutStripeSessionSettlementPolicy;
|
|
96
|
+
}>): Result<CheckoutStripeSessionRequestPlan, CheckoutStripeSessionPlanningError>;
|
|
97
|
+
export declare function planCheckoutStripeSessionCollection(options: Readonly<{
|
|
98
|
+
checkoutLines: readonly CheckoutStripeSessionLineInput[];
|
|
99
|
+
paymentPlan: CheckoutStripeSessionPaymentPlan;
|
|
100
|
+
orderDisplayName: string;
|
|
101
|
+
discountExpiresAtEpoch: number | undefined;
|
|
102
|
+
creditReservationExpiresAtIso: string | null;
|
|
103
|
+
registrationHoldExpiresAtEpoch?: number;
|
|
104
|
+
}>): Result<CheckoutStripeSessionCollectionPlan, CheckoutStripeSessionPlanningError>;
|
|
105
|
+
export declare function planCheckoutStripeSessionMetadata(options: Readonly<{
|
|
106
|
+
paymentPlan: CheckoutStripeSessionPaymentPlan;
|
|
107
|
+
discount: CheckoutStripeSessionDiscountMetadata | null;
|
|
108
|
+
orderReferences: CheckoutStripeSessionOrderReferences;
|
|
109
|
+
totals: CheckoutStripeSessionCollectionPlan['totals'];
|
|
110
|
+
}>): Record<string, string>;
|
|
111
|
+
export declare function planCheckoutStripeSessionPaymentIntent(options: Readonly<{
|
|
112
|
+
paymentPlan: CheckoutStripeSessionPaymentIntentPaymentPlan;
|
|
113
|
+
applicationFeeDecision: CheckoutStripeSessionApplicationFeeDecision;
|
|
114
|
+
}>): CheckoutStripeSessionPaymentIntentPlan;
|
|
115
|
+
export declare function summarizeCheckoutSessionLines(lines: readonly CheckoutStripeSessionLineInput[]): CheckoutStripeSessionCollectionPlan['totals'];
|
|
116
|
+
export declare function resolveCheckoutSessionExpiryEpoch(options: Readonly<{
|
|
117
|
+
discountExpiresAtEpoch: number | undefined;
|
|
118
|
+
creditReservationExpiresAtIso: string | null;
|
|
119
|
+
registrationHoldExpiresAtEpoch?: number;
|
|
120
|
+
}>): number | undefined;
|
|
121
|
+
export declare function planCheckoutStripeLineItems(options: Readonly<{
|
|
122
|
+
checkoutLines: readonly CheckoutStripeSessionLineInput[];
|
|
123
|
+
paymentPlan: CheckoutStripeSessionPaymentPlan;
|
|
124
|
+
orderDisplayName: string;
|
|
125
|
+
}>): Result<readonly CheckoutStripeSessionLineItemPlan[], CheckoutStripeSessionPlanningError>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { BookingFlexibleBalanceConfig } from '../../../core/src/index';
|
|
2
|
+
import type { CheckoutPaymentTermCollectionOptionKind } from './checkoutPaymentTerms';
|
|
3
|
+
export type SelectedAppointmentCheckoutCollectionOption<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
4
|
+
kind: 'upfront' | 'deferred_manual';
|
|
5
|
+
}> | Readonly<{
|
|
6
|
+
kind: 'instalment_plan';
|
|
7
|
+
plan: TInstalmentPlan;
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
kind: 'flexible_balance';
|
|
10
|
+
config: TFlexibleBalanceConfig;
|
|
11
|
+
}> | null;
|
|
12
|
+
export type SelectedAttendeeBookingCheckoutCollectionOption<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
13
|
+
kind: 'upfront' | 'deferred_manual';
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'flexible_balance';
|
|
16
|
+
config: TFlexibleBalanceConfig;
|
|
17
|
+
}> | null;
|
|
18
|
+
export type AttendeeBookingCollectionOptionInput<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
19
|
+
kind: 'upfront' | 'deferred_manual';
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
kind: 'flexible_balance';
|
|
22
|
+
config: TFlexibleBalanceConfig;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'instalment_plan';
|
|
25
|
+
}> | null;
|
|
26
|
+
export type ValidatedAttendeeBookingPaymentSelection<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
27
|
+
bookingStartAt: string;
|
|
28
|
+
selectedCollectionOptionKind: 'flexible_balance';
|
|
29
|
+
selectedFlexibleBalanceConfig: TFlexibleBalanceConfig;
|
|
30
|
+
}> | Readonly<{
|
|
31
|
+
bookingStartAt: string;
|
|
32
|
+
selectedCollectionOptionKind: Exclude<CheckoutPaymentTermCollectionOptionKind, 'flexible_balance'> | null;
|
|
33
|
+
selectedFlexibleBalanceConfig: null;
|
|
34
|
+
}>;
|
|
35
|
+
export type ValidatedAppointmentPaymentSelection<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig> = Readonly<{
|
|
36
|
+
selectedCollectionOptionKind: 'instalment_plan';
|
|
37
|
+
selectedInstalmentPlan: TInstalmentPlan;
|
|
38
|
+
selectedFlexibleBalanceConfig: null;
|
|
39
|
+
}> | Readonly<{
|
|
40
|
+
selectedCollectionOptionKind: 'flexible_balance';
|
|
41
|
+
selectedInstalmentPlan: null;
|
|
42
|
+
selectedFlexibleBalanceConfig: TFlexibleBalanceConfig;
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
selectedCollectionOptionKind: 'upfront' | 'deferred_manual' | null;
|
|
45
|
+
selectedInstalmentPlan: null;
|
|
46
|
+
selectedFlexibleBalanceConfig: null;
|
|
47
|
+
}>;
|
|
48
|
+
export declare function buildValidatedAttendeeBookingPaymentSelection<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(input: Readonly<{
|
|
49
|
+
bookingStartAt: string;
|
|
50
|
+
selectedCollectionOption: SelectedAttendeeBookingCheckoutCollectionOption<TFlexibleBalanceConfig>;
|
|
51
|
+
}>): ValidatedAttendeeBookingPaymentSelection<TFlexibleBalanceConfig>;
|
|
52
|
+
export declare function toSelectedAttendeeBookingCheckoutCollectionOption<TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(option: AttendeeBookingCollectionOptionInput<TFlexibleBalanceConfig>): SelectedAttendeeBookingCheckoutCollectionOption<TFlexibleBalanceConfig>;
|
|
53
|
+
export declare function buildValidatedAppointmentPaymentSelection<TInstalmentPlan, TFlexibleBalanceConfig extends BookingFlexibleBalanceConfig>(input: Readonly<{
|
|
54
|
+
selectedCollectionOption: SelectedAppointmentCheckoutCollectionOption<TInstalmentPlan, TFlexibleBalanceConfig>;
|
|
55
|
+
}>): ValidatedAppointmentPaymentSelection<TInstalmentPlan, TFlexibleBalanceConfig>;
|