@riverbankcms/sdk 0.130.2 → 0.134.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 +13 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DfRhJPFQ.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-Dppxcr_g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-8CyGCXir.mjs} +91 -21
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-DVMTMvqA.mjs} +6896 -4335
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1105 -533
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +363 -276
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- 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/bookingOperations.d.ts +2 -14
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/bookings.d.ts +2 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -2
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +2 -2
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +469 -349
- 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/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +28 -13
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +3 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -3
- 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 +64 -54
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- 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 +2 -3
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -116
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- 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 +42 -20
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -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 +84 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -11
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/DynamicFormFields.d.ts +3 -19
- 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 +22 -37
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- 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/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/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 +21 -4
- 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 +6 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/validation.d.ts +2 -1
- 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 +46 -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 +7 -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 +51 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingConsentAgreement.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- 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/blocks/src/system/types/link.d.ts +7 -1
- 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/content-model/src/content-types/schema.d.ts +4 -4
- package/dist/_dts/core/src/booking-consent.d.ts +8 -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 +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -3
- package/dist/_dts/db/src/schemas/forms.d.ts +25 -25
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -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-core/src/usageScanner.d.ts +1 -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/bookings/types.d.ts +7 -89
- 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/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- 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/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- 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 +11 -38
- 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/accordions/types.d.ts +2 -2
- 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 +41 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +7 -29
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +90 -75
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +98 -110
- 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/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- 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/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → BookingConsentAgreement-BxgpGEFD.mjs} +26 -4
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-CfuPOHD0.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-DB8Qfzi-.mjs} +37 -49
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-DD4X8hp4.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-QhgIBQbv.mjs} +1 -1
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-DwtC7bCs.mjs} +1460 -1247
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-DFXpLvwg.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-sI05d3lk.mjs} +73 -47
- package/dist/client/bookings.mjs +1719 -706
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-wjyWTZCh.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DCwdpA4i.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-DTDW3l0R.mjs} +3 -3
- package/dist/client/checkoutUrls-DQYC_Br-.mjs +187 -0
- package/dist/client/client.mjs +6830 -3672
- package/dist/client/{context-B83PiNzm.mjs → context-TSK1CGx8.mjs} +1 -14
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-A-Tg7qw_.mjs} +11 -5
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-B0Zg-i_w.mjs} +41 -44
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-B8Y2wizd.mjs} +3 -3
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-DPDOwURJ.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-CjBcmSLn.mjs} +3 -3
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CK30HsAq.mjs} +730 -190
- package/dist/client/{form-BA4t3kKU.mjs → form-CUXfsABE.mjs} +2 -2
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-N-mN3rjr.mjs} +2 -2
- package/dist/client/hooks.mjs +1418 -484
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-oiIDQMBt.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-CkQ2tTrM.mjs} +2 -2
- package/dist/client/pricing-Caa0QWzh.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-CnidyrsN.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-CttYcS_S.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-CeUMxI9a.mjs} +677 -350
- package/dist/client/rendering/client.mjs +6075 -4150
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7589 -4388
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-lPr1oqxB.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DXQtMo2O.mjs} +6 -6
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-quDL411J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-Dnu-8Iub.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-BWPUURvG.mjs} +3 -3
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-DRhWp2_5.mjs} +196 -7
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-UN4WKnaM.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-Ca5RD78X.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-CMhj6BTi.mjs} +1 -1
- package/dist/server/components.mjs +3578 -1614
- package/dist/server/config-validation.mjs +1418 -485
- package/dist/server/config.mjs +1418 -485
- package/dist/server/data.mjs +1418 -484
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3761 -1794
- package/dist/server/page-converter.mjs +911 -261
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3580 -1613
- package/dist/server/rendering.mjs +3578 -1614
- package/dist/server/routing.mjs +1687 -689
- package/dist/server/server.mjs +1458 -563
- package/dist/server/theme-bridge.mjs +1996 -935
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +2 -2
- 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/checkoutUrls-Ct8Mxna3.mjs +0 -26
- 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
|
@@ -3,11 +3,14 @@ export type InternalRouteOnlyLinkValue = {
|
|
|
3
3
|
kind: 'internal';
|
|
4
4
|
routeId: string;
|
|
5
5
|
};
|
|
6
|
+
export declare const RESOLVED_INTERNAL_LINK_ENTITY_TYPES: readonly ["page", "content", "pageSurface"];
|
|
7
|
+
export type ResolvedInternalLinkEntityType = (typeof RESOLVED_INTERNAL_LINK_ENTITY_TYPES)[number];
|
|
8
|
+
export declare function isResolvedInternalLinkEntityType(value: unknown): value is ResolvedInternalLinkEntityType;
|
|
6
9
|
export type InternalResolvedLinkValue = {
|
|
7
10
|
kind: 'internal';
|
|
8
11
|
routeId: string;
|
|
9
12
|
entityId: string;
|
|
10
|
-
entityType:
|
|
13
|
+
entityType: ResolvedInternalLinkEntityType;
|
|
11
14
|
href: string;
|
|
12
15
|
title: string;
|
|
13
16
|
typeLabel: string;
|
|
@@ -70,6 +73,7 @@ export declare const internalResolvedLinkSchema: z.ZodObject<{
|
|
|
70
73
|
entityType: z.ZodEnum<{
|
|
71
74
|
content: "content";
|
|
72
75
|
page: "page";
|
|
76
|
+
pageSurface: "pageSurface";
|
|
73
77
|
}>;
|
|
74
78
|
href: z.ZodString;
|
|
75
79
|
title: z.ZodString;
|
|
@@ -85,6 +89,7 @@ export declare const internalLinkSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
85
89
|
entityType: z.ZodEnum<{
|
|
86
90
|
content: "content";
|
|
87
91
|
page: "page";
|
|
92
|
+
pageSurface: "pageSurface";
|
|
88
93
|
}>;
|
|
89
94
|
href: z.ZodString;
|
|
90
95
|
title: z.ZodString;
|
|
@@ -120,6 +125,7 @@ export declare const linkSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.Zod
|
|
|
120
125
|
entityType: z.ZodEnum<{
|
|
121
126
|
content: "content";
|
|
122
127
|
page: "page";
|
|
128
|
+
pageSurface: "pageSurface";
|
|
123
129
|
}>;
|
|
124
130
|
href: z.ZodString;
|
|
125
131
|
title: z.ZodString;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type BookingInstalmentPlanConfig } from '../../../core/src/index';
|
|
2
|
+
export type BookingInstalmentScheduleRow = Readonly<{
|
|
3
|
+
id: string;
|
|
4
|
+
sequence: number;
|
|
5
|
+
stateAtBooking: 'paid_today' | 'scheduled';
|
|
6
|
+
dueAt: string;
|
|
7
|
+
amountCents: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function buildBookingInstalmentSchedule(input: Readonly<{
|
|
10
|
+
anchorAt: string;
|
|
11
|
+
totalAmountCents: number;
|
|
12
|
+
plan: BookingInstalmentPlanConfig;
|
|
13
|
+
}>): readonly BookingInstalmentScheduleRow[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { NonNegativeCents } from '../../../core/src/index';
|
|
2
|
+
import type { OrderRefundMode } from './orderRefundPolicy';
|
|
3
|
+
export type CanonicalRefundMethod = 'cash' | 'credit';
|
|
4
|
+
export type OrderRefundRail = 'cash' | 'credit' | 'mixed';
|
|
5
|
+
export type CanonicalRefundPlannerErrorCode = 'already_refunded' | 'idempotency_amount_mismatch' | 'idempotency_method_mismatch' | 'refund_in_progress' | 'invalid_amount' | 'amount_exceeds_remaining' | 'pass_revoke_requires_full_refund' | 'refund_failed';
|
|
6
|
+
export type CanonicalRefundSnapshot = Readonly<{
|
|
7
|
+
id: string;
|
|
8
|
+
status: 'pending' | 'succeeded' | 'failed' | 'reconciliation_needed';
|
|
9
|
+
amountCents: NonNegativeCents;
|
|
10
|
+
refundRail: OrderRefundRail;
|
|
11
|
+
refundMode: OrderRefundMode;
|
|
12
|
+
failureCode: string | null;
|
|
13
|
+
failureMessage: string | null;
|
|
14
|
+
isStale: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
export type CanonicalRefundPlannerInput = Readonly<{
|
|
17
|
+
refundMethod: CanonicalRefundMethod;
|
|
18
|
+
refundMode: OrderRefundMode;
|
|
19
|
+
requestedAmountCents: NonNegativeCents | undefined;
|
|
20
|
+
remainingRefundableCents: NonNegativeCents;
|
|
21
|
+
refundedSoFarCents: NonNegativeCents;
|
|
22
|
+
requireFullRemainingRefund: boolean;
|
|
23
|
+
acceptableExistingRails: readonly OrderRefundRail[];
|
|
24
|
+
existingByIdempotency: CanonicalRefundSnapshot | null;
|
|
25
|
+
latestPending: CanonicalRefundSnapshot | null;
|
|
26
|
+
}>;
|
|
27
|
+
export type CanonicalRefundPlannerDecision = Readonly<{
|
|
28
|
+
kind: 'existing_succeeded';
|
|
29
|
+
refund: CanonicalRefundSnapshot;
|
|
30
|
+
totalRefundedCents: NonNegativeCents;
|
|
31
|
+
remainingRefundableCents: NonNegativeCents;
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
kind: 'resume_pending';
|
|
34
|
+
refund: CanonicalRefundSnapshot;
|
|
35
|
+
requestedAmountCents: NonNegativeCents;
|
|
36
|
+
}> | Readonly<{
|
|
37
|
+
kind: 'create_pending';
|
|
38
|
+
requestedAmountCents: NonNegativeCents;
|
|
39
|
+
}> | Readonly<{
|
|
40
|
+
kind: 'failed';
|
|
41
|
+
errorCode: CanonicalRefundPlannerErrorCode;
|
|
42
|
+
errorMessage: string;
|
|
43
|
+
refund: CanonicalRefundSnapshot | null;
|
|
44
|
+
amountCents: NonNegativeCents | null;
|
|
45
|
+
totalRefundedCents: NonNegativeCents;
|
|
46
|
+
remainingRefundableCents: NonNegativeCents;
|
|
47
|
+
}>;
|
|
48
|
+
export declare function planCanonicalRefundRequest(input: CanonicalRefundPlannerInput): CanonicalRefundPlannerDecision;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type NonEmptyArray, type Result } from '../../../core/src/index';
|
|
2
|
+
export type CheckoutCollectionPlanningError = Readonly<{
|
|
3
|
+
_tag: 'CheckoutCollectionPlanningError';
|
|
4
|
+
code: 'shop_shipping_not_configured';
|
|
5
|
+
message: string;
|
|
6
|
+
}>;
|
|
7
|
+
export type CheckoutCollectionPlan<TCountryCode extends string = string> = Readonly<{
|
|
8
|
+
kind: 'digital_only';
|
|
9
|
+
automaticTaxEnabled: boolean;
|
|
10
|
+
billingAddressCollection: 'auto';
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'requires_shipping';
|
|
13
|
+
automaticTaxEnabled: boolean;
|
|
14
|
+
billingAddressCollection: 'auto';
|
|
15
|
+
allowedShippingCountries: NonEmptyArray<TCountryCode>;
|
|
16
|
+
}>;
|
|
17
|
+
export type CheckoutCollectionItemKind = 'event_ticket' | 'product' | 'pass' | 'course_enrollment' | 'appointment';
|
|
18
|
+
export type CheckoutCollectionProductItem = Readonly<{
|
|
19
|
+
validated: Readonly<{
|
|
20
|
+
type: 'product';
|
|
21
|
+
product: Readonly<{
|
|
22
|
+
requiresShipping: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
export type CheckoutCollectionNonProductItem = Readonly<{
|
|
27
|
+
validated: Readonly<{
|
|
28
|
+
type: Exclude<CheckoutCollectionItemKind, 'product'>;
|
|
29
|
+
}>;
|
|
30
|
+
}>;
|
|
31
|
+
export type CheckoutCollectionItem = CheckoutCollectionProductItem | CheckoutCollectionNonProductItem;
|
|
32
|
+
export type CheckoutCollectionCart<TItem extends CheckoutCollectionItem = CheckoutCollectionItem> = Readonly<{
|
|
33
|
+
items: readonly TItem[];
|
|
34
|
+
}>;
|
|
35
|
+
export declare function buildCheckoutCollectionPlan<TCountryCode extends string, TItem extends CheckoutCollectionItem>(options: Readonly<{
|
|
36
|
+
settledCart: CheckoutCollectionCart<TItem>;
|
|
37
|
+
automaticTaxEnabled: boolean;
|
|
38
|
+
allowedShippingCountries: readonly TCountryCode[];
|
|
39
|
+
}>): Result<CheckoutCollectionPlan<TCountryCode>, CheckoutCollectionPlanningError>;
|
|
@@ -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[];
|