@riverbankcms/sdk 0.134.0 → 0.135.1
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 +4 -3
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DfRhJPFQ.mjs → PreviewEditorSidebar-D4p_5TdY.mjs} +4 -4
- package/dist/{PreviewEditorUI-Dppxcr_g.mjs → PreviewEditorUI-D0cRoTX1.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D51gQaG3.mjs → PreviewQueryProvider-DcgaESkm.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-8CyGCXir.mjs → SdkPreviewModeRuntime-BKLtM3Nz.mjs} +5 -5
- package/dist/{SiteChromeCustomizeContext-DVMTMvqA.mjs → SiteChromeCustomizeContext-61X2m7QV.mjs} +4105 -8035
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +15 -15
- package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +25 -60
- package/dist/_dts/api/src/bookingOperations.d.ts +111 -161
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +123 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +13 -13
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +4 -4
- package/dist/_dts/api/src/bookingSessionSummaryTypes.d.ts +34 -0
- package/dist/_dts/api/src/bookings.d.ts +5 -9
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -7
- package/dist/_dts/api/src/communications.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +29 -109
- package/dist/_dts/api/src/eventManagementContracts.d.ts +1 -1
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +43 -0
- package/dist/_dts/api/src/index.d.ts +3 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/participantMessaging.d.ts +2 -2
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +32 -28
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +85 -5
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +1 -1
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +9 -100
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +7 -6
- package/dist/_dts/api/src/publicWholeSeriesEndpointDefinitions.d.ts +0 -32
- package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/siteOperations.d.ts +2 -2
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/{courses.d.ts → wholeSeriesOfferings.d.ts} +43 -95
- package/dist/_dts/blocks/src/client.d.ts +0 -5
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +5 -94
- package/dist/_dts/blocks/src/portal/dateFormatting.d.ts +3 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +17 -20
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +147 -42
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +35 -10
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/scheduleSummary.d.ts +3 -3
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +9 -12
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +2 -44
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +99 -59
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +19 -16
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -247
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +13 -126
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/constants.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +7 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventScope.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +7 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +53 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +10 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +20 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +5 -56
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/waitlistClaimRestoration.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +6 -22
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DateTimeTile.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +16 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +1 -13
- package/dist/_dts/blocks/src/system/runtime/shared/components/LoggedInAsUser.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/MembershipHero.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/StateIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/checkoutUrls.d.ts +2 -2
- package/dist/_dts/commerce/src/index.d.ts +16 -0
- package/dist/_dts/commerce/src/money.d.ts +122 -0
- package/dist/_dts/commerce/src/moneyContracts.d.ts +178 -0
- package/dist/_dts/commerce/src/moneyDateUtils.d.ts +22 -0
- package/dist/_dts/commerce/src/moneyPayments.d.ts +59 -0
- package/dist/_dts/commerce/src/moneyPlanningTime.d.ts +4 -0
- package/dist/_dts/commerce/src/moneyReceiptReadModel.d.ts +68 -0
- package/dist/_dts/commerce/src/moneyReport.d.ts +105 -0
- package/dist/_dts/commerce/src/moneyReportBreakdowns.d.ts +3 -0
- package/dist/_dts/commerce/src/moneyReportKindFilter.d.ts +4 -0
- package/dist/_dts/commerce/src/moneyReportPage.d.ts +132 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +3 -3
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +6 -25
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +4 -4
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +11 -11
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/types.d.ts +12 -8
- package/dist/_dts/commerce/src/shop/digitalFulfillment.d.ts +111 -0
- package/dist/_dts/commerce/src/shop/fulfillmentStatus.d.ts +10 -0
- package/dist/_dts/commerce/src/shop/inventoryRestore.d.ts +13 -0
- package/dist/_dts/commerce/src/shop/shippingAddress.d.ts +18 -0
- package/dist/_dts/commerce/src/types/json.d.ts +3 -0
- package/dist/_dts/commerce/src/utils/isPlainRecord.d.ts +1 -0
- package/dist/_dts/commerce/src/waitlists.d.ts +172 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +0 -30
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +2 -39
- package/dist/_dts/content-model/src/metadataConfig.d.ts +0 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -68
- package/dist/_dts/core/src/branded.d.ts +3 -3
- package/dist/_dts/core/src/event-pricing.d.ts +6 -6
- package/dist/_dts/core/src/participants.d.ts +17 -17
- package/dist/_dts/core/src/rectification.d.ts +1 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +890 -2154
- package/dist/_dts/sdk/src/bookings/index.d.ts +4 -5
- package/dist/_dts/sdk/src/bookings/types.d.ts +34 -4
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +4 -6
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +0 -2
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +1 -1
- package/dist/client/{usePolling-UN4WKnaM.mjs → BookingConsentAgreement-Bz9znbpn.mjs} +180 -4
- package/dist/client/{DiscountCodeDisclosure-CfuPOHD0.mjs → DiscountCodeDisclosure-35Ru8yB9.mjs} +13 -27
- package/dist/client/{EventCombined.client-DB8Qfzi-.mjs → EventCombined.client-BKB0ZxRR.mjs} +3 -3
- package/dist/client/{EventListing.client-DD4X8hp4.mjs → EventListing.client-Dx8I21ok.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-QhgIBQbv.mjs → LeafletStaticMap-CEWx-Bhe.mjs} +1 -1
- package/dist/client/{accordion-DFXpLvwg.mjs → accordion-KIDsKTwS.mjs} +1 -1
- package/dist/client/{bookingForm-sI05d3lk.mjs → bookingForm-D96Rmp-5.mjs} +6 -7
- package/dist/client/bookings.mjs +913 -1906
- package/dist/client/{carousel-wjyWTZCh.mjs → carousel-YwUgyL66.mjs} +1 -1
- package/dist/client/{cart-DCwdpA4i.mjs → cart-BbwuNrUT.mjs} +3 -3
- package/dist/client/{checkout-DTDW3l0R.mjs → checkout-hp1ucmEY.mjs} +3 -3
- package/dist/client/{checkoutUrls-DQYC_Br-.mjs → checkoutUrls-BuseL0dw.mjs} +4 -2
- package/dist/client/client.mjs +5109 -9333
- package/dist/client/{context-TSK1CGx8.mjs → context-DljQn8L5.mjs} +15 -69
- package/dist/client/{eventCalendar-B0Zg-i_w.mjs → eventCalendar-DU4iNLpo.mjs} +5 -5
- package/dist/client/{eventCombined-B8Y2wizd.mjs → eventCombined-CZuupW8m.mjs} +3 -3
- package/dist/client/{eventDetails-DPDOwURJ.mjs → eventDetails-DPQWwCIi.mjs} +8 -8
- package/dist/client/{eventListing-CjBcmSLn.mjs → eventListing-C7oMidwS.mjs} +3 -3
- package/dist/client/{eventRegistration-CK30HsAq.mjs → eventRegistration-zEiunlUs.mjs} +4522 -3690
- package/dist/client/{form-CUXfsABE.mjs → form-D2KIyCVJ.mjs} +2 -2
- package/dist/client/{headerSection-N-mN3rjr.mjs → headerSection-CK5uChUK.mjs} +2 -2
- package/dist/client/hooks.mjs +459 -714
- package/dist/client/{locationMap-oiIDQMBt.mjs → locationMap-DLQNH1ln.mjs} +2 -2
- package/dist/client/{newsletterForm-CkQ2tTrM.mjs → newsletterForm-ZuhIG7fZ.mjs} +2 -2
- package/dist/client/{productDetail-CnidyrsN.mjs → productDetail-7hIcGeae.mjs} +3 -3
- package/dist/client/{productList-CttYcS_S.mjs → productList-T4Cii1ot.mjs} +3 -3
- package/dist/client/{propsDecoder-CeUMxI9a.mjs → propsDecoder-mB0aC_Fi.mjs} +4702 -4458
- package/dist/client/rendering/client.mjs +59617 -62260
- package/dist/client/rendering/islands.mjs +17 -19
- package/dist/client/rendering.mjs +5389 -9707
- package/dist/client/{scrollToBlock-lPr1oqxB.mjs → scrollToBlock-Du5mHgvL.mjs} +2 -2
- package/dist/client/{shop-DXQtMo2O.mjs → shop-B5zAcKZn.mjs} +6 -6
- package/dist/client/{shop-commerce-quDL411J.mjs → shop-commerce-BKBZB6l5.mjs} +6 -6
- package/dist/client/{shop-commerce-store-Dnu-8Iub.mjs → shop-commerce-store-Cq4qlNtQ.mjs} +1 -1
- package/dist/client/{shopShared-BWPUURvG.mjs → shopShared-DYGzEs9D.mjs} +3 -3
- package/dist/client/{useEventFilters-DRhWp2_5.mjs → useEventFilters-Bphkda8m.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +40 -161
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +40 -161
- package/dist/preview-next/middleware.mjs +40 -161
- package/dist/{previewAuthStore-BFKd4LrN.mjs → previewAuthStore-C7ksxt5b.mjs} +40 -161
- package/dist/{sdk-runtime-Ca5RD78X.mjs → sdk-runtime-BbIC8G4J.mjs} +2 -2
- package/dist/{separator-CMhj6BTi.mjs → separator-CadhAtI7.mjs} +1 -1
- package/dist/server/components.mjs +558 -2962
- package/dist/server/config-validation.mjs +459 -714
- package/dist/server/config.mjs +459 -714
- package/dist/server/data.mjs +459 -714
- package/dist/server/index.mjs +41 -162
- package/dist/server/next.mjs +572 -2976
- package/dist/server/page-converter.mjs +360 -582
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +569 -2879
- package/dist/server/rendering.mjs +558 -2962
- package/dist/server/routing.mjs +603 -1087
- package/dist/server/server.mjs +473 -728
- package/dist/server/theme-bridge.mjs +41 -1524
- package/dist/styles/index.css +41 -1348
- package/package.json +1 -1
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +0 -99
- package/dist/_dts/blocks/src/client/course-registration.d.ts +0 -5
- package/dist/_dts/blocks/src/system/blocks/course-details.d.ts +0 -134
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +0 -130
- 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 +0 -2
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +0 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +0 -135
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +0 -28
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/logic.d.ts +0 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/runs.d.ts +0 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/view.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details.server.d.ts +0 -20
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +0 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +0 -181
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.server.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/CoursePricingDisplay.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/BookingModeStep.d.ts +0 -32
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/CheckIcon.d.ts +0 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/ErrorStep.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/MembershipHero.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/PaymentFailedStep.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/PortalAuthSidebar.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/SuccessStep.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/VerifyingTimeoutStep.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WaitlistStep.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts +0 -25
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +0 -46
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/index.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +0 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/types.d.ts +0 -105
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesEligibility.d.ts +0 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +0 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts +0 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +0 -185
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/utils.d.ts +0 -43
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/whole-series-registration.headless.contract.d.ts +0 -325
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/whole-series-registration.headless.planning.d.ts +0 -27
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts +0 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wizardSteps.d.ts +0 -30
- package/dist/_dts/sdk/src/rendering/islands/enhancers/courseRegistration.d.ts +0 -3
- package/dist/_dts/theme-core/src/blocks/vars/course-details.d.ts +0 -16
- package/dist/_dts/theme-core/src/blocks/vars/course-registration.d.ts +0 -21
- package/dist/client/BookingConsentAgreement-BxgpGEFD.mjs +0 -160
- package/dist/client/WholeSeriesRegistrationWizard-DwtC7bCs.mjs +0 -2546
- package/dist/client/courseRegistration-A-Tg7qw_.mjs +0 -52
- package/dist/client/pricing-Caa0QWzh.mjs +0 -195
package/dist/server/data.mjs
CHANGED
|
@@ -754,69 +754,8 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
754
754
|
}
|
|
755
755
|
});
|
|
756
756
|
//#endregion
|
|
757
|
-
//#region ../api/src/
|
|
758
|
-
const
|
|
759
|
-
listCourses: {
|
|
760
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
761
|
-
method: "GET",
|
|
762
|
-
auth: "user",
|
|
763
|
-
responseKind: "json"
|
|
764
|
-
},
|
|
765
|
-
exportCoursesCsv: {
|
|
766
|
-
path: "/sites/{siteId}/bookings/courses/export.csv",
|
|
767
|
-
method: "GET",
|
|
768
|
-
tags: [
|
|
769
|
-
"site-{siteId}",
|
|
770
|
-
"bookings",
|
|
771
|
-
"courses-{siteId}"
|
|
772
|
-
],
|
|
773
|
-
errors: [],
|
|
774
|
-
auth: "user",
|
|
775
|
-
responseKind: "blob"
|
|
776
|
-
},
|
|
777
|
-
createCourse: {
|
|
778
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
779
|
-
method: "POST",
|
|
780
|
-
auth: "user",
|
|
781
|
-
responseKind: "json",
|
|
782
|
-
errors: [
|
|
783
|
-
"validation:invalid_input",
|
|
784
|
-
"resource:not_found",
|
|
785
|
-
"resource:already_exists",
|
|
786
|
-
"resource:conflict",
|
|
787
|
-
"server:internal_error"
|
|
788
|
-
]
|
|
789
|
-
},
|
|
790
|
-
getCourse: {
|
|
791
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
792
|
-
method: "GET",
|
|
793
|
-
auth: "user",
|
|
794
|
-
responseKind: "json"
|
|
795
|
-
},
|
|
796
|
-
updateCourse: {
|
|
797
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
798
|
-
method: "PATCH",
|
|
799
|
-
auth: "user",
|
|
800
|
-
responseKind: "json",
|
|
801
|
-
errors: [
|
|
802
|
-
"validation:invalid_input",
|
|
803
|
-
"resource:not_found",
|
|
804
|
-
"resource:conflict",
|
|
805
|
-
"server:internal_error"
|
|
806
|
-
]
|
|
807
|
-
},
|
|
808
|
-
deleteCourse: {
|
|
809
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
810
|
-
method: "DELETE",
|
|
811
|
-
auth: "user",
|
|
812
|
-
responseKind: "json",
|
|
813
|
-
errors: [
|
|
814
|
-
"validation:invalid_input",
|
|
815
|
-
"resource:not_found",
|
|
816
|
-
"resource:conflict",
|
|
817
|
-
"server:internal_error"
|
|
818
|
-
]
|
|
819
|
-
},
|
|
757
|
+
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
758
|
+
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
820
759
|
deleteEventOffering: {
|
|
821
760
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
822
761
|
method: "DELETE",
|
|
@@ -829,20 +768,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
829
768
|
"server:internal_error"
|
|
830
769
|
]
|
|
831
770
|
},
|
|
832
|
-
|
|
833
|
-
path: "/sites/{siteId}/bookings/
|
|
834
|
-
method: "POST",
|
|
835
|
-
auth: "user",
|
|
836
|
-
responseKind: "json",
|
|
837
|
-
errors: [
|
|
838
|
-
"validation:invalid_input",
|
|
839
|
-
"resource:not_found",
|
|
840
|
-
"resource:already_exists",
|
|
841
|
-
"server:internal_error"
|
|
842
|
-
]
|
|
843
|
-
},
|
|
844
|
-
changeCourseContentOwnership: {
|
|
845
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/content-ownership",
|
|
771
|
+
changeEventSeriesContentOwnership: {
|
|
772
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/content-ownership",
|
|
846
773
|
method: "POST",
|
|
847
774
|
auth: "user",
|
|
848
775
|
responseKind: "json",
|
|
@@ -853,8 +780,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
853
780
|
"server:internal_error"
|
|
854
781
|
]
|
|
855
782
|
},
|
|
856
|
-
|
|
857
|
-
path: "/sites/{siteId}/bookings/
|
|
783
|
+
addEventSeriesRegistration: {
|
|
784
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
858
785
|
method: "POST",
|
|
859
786
|
auth: "user",
|
|
860
787
|
responseKind: "json",
|
|
@@ -865,33 +792,21 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
865
792
|
"server:internal_error"
|
|
866
793
|
]
|
|
867
794
|
},
|
|
868
|
-
|
|
869
|
-
path: "/sites/{siteId}/bookings/
|
|
795
|
+
listEventSeriesRegistrations: {
|
|
796
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
870
797
|
method: "GET",
|
|
871
798
|
auth: "user",
|
|
872
799
|
responseKind: "json"
|
|
873
800
|
},
|
|
874
|
-
|
|
875
|
-
path: "/sites/{siteId}/bookings/
|
|
801
|
+
exportEventSeriesRegistrationsCsv: {
|
|
802
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/export.csv",
|
|
876
803
|
method: "GET",
|
|
877
804
|
auth: "user",
|
|
878
805
|
errors: [],
|
|
879
806
|
responseKind: "blob"
|
|
880
807
|
},
|
|
881
|
-
|
|
882
|
-
path: "/sites/{siteId}/bookings/
|
|
883
|
-
method: "GET",
|
|
884
|
-
tags: [
|
|
885
|
-
"site-{siteId}",
|
|
886
|
-
"bookings",
|
|
887
|
-
"courses-{courseId}"
|
|
888
|
-
],
|
|
889
|
-
auth: "user",
|
|
890
|
-
responseKind: "blob",
|
|
891
|
-
errors: []
|
|
892
|
-
},
|
|
893
|
-
updateCourseEnrollment: {
|
|
894
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/enrollments/{enrollmentId}",
|
|
808
|
+
updateEventSeriesRegistration: {
|
|
809
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
895
810
|
method: "PATCH",
|
|
896
811
|
auth: "user",
|
|
897
812
|
responseKind: "json",
|
|
@@ -1279,71 +1194,35 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1279
1194
|
errors: ["resource:not_found", "server:internal_error"],
|
|
1280
1195
|
auth: "public",
|
|
1281
1196
|
responseKind: "json"
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
"auth:forbidden",
|
|
1290
|
-
"validation:invalid_input",
|
|
1291
|
-
"resource:not_found",
|
|
1292
|
-
"resource:conflict",
|
|
1293
|
-
"resource:already_exists",
|
|
1294
|
-
"server:internal_error"
|
|
1295
|
-
],
|
|
1296
|
-
auth: "public",
|
|
1297
|
-
responseKind: "json"
|
|
1298
|
-
},
|
|
1299
|
-
checkWholeSeriesEligibility: {
|
|
1300
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/check-eligibility",
|
|
1301
|
-
method: "POST",
|
|
1302
|
-
tags: [TAG_TEMPLATES.publicWholeSeriesOfferings, "course-enrollment"],
|
|
1303
|
-
errors: [
|
|
1304
|
-
"auth:unauthenticated",
|
|
1305
|
-
"resource:not_found",
|
|
1306
|
-
"resource:conflict",
|
|
1307
|
-
"server:internal_error"
|
|
1308
|
-
],
|
|
1309
|
-
auth: "public",
|
|
1310
|
-
responseKind: "json"
|
|
1311
|
-
},
|
|
1312
|
-
createWholeSeriesCheckout: {
|
|
1313
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
//#endregion
|
|
1200
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1201
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1202
|
+
getPublicEventRegistrationOptions: {
|
|
1203
|
+
path: "/public/sites/{siteId}/events/registration-options",
|
|
1314
1204
|
method: "POST",
|
|
1315
|
-
tags: [TAG_TEMPLATES.
|
|
1205
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration-options"],
|
|
1316
1206
|
auth: "public",
|
|
1317
1207
|
responseKind: "json",
|
|
1318
1208
|
errors: [
|
|
1319
|
-
"auth:unauthenticated",
|
|
1320
1209
|
"validation:invalid_input",
|
|
1321
1210
|
"resource:not_found",
|
|
1322
1211
|
"resource:conflict",
|
|
1323
1212
|
"server:internal_error"
|
|
1324
1213
|
]
|
|
1325
1214
|
},
|
|
1326
|
-
|
|
1327
|
-
path: "/public/sites/{siteId}/
|
|
1215
|
+
resolveEventSubroute: {
|
|
1216
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1328
1217
|
method: "GET",
|
|
1329
|
-
|
|
1330
|
-
|
|
1218
|
+
revalidate: 60,
|
|
1219
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1331
1220
|
auth: "public",
|
|
1332
|
-
responseKind: "json"
|
|
1221
|
+
responseKind: "json",
|
|
1222
|
+
errors: []
|
|
1333
1223
|
}
|
|
1334
1224
|
});
|
|
1335
1225
|
//#endregion
|
|
1336
|
-
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1337
|
-
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1338
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1339
|
-
method: "GET",
|
|
1340
|
-
revalidate: 60,
|
|
1341
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1342
|
-
auth: "public",
|
|
1343
|
-
responseKind: "json",
|
|
1344
|
-
errors: []
|
|
1345
|
-
} });
|
|
1346
|
-
//#endregion
|
|
1347
1226
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1348
1227
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1349
1228
|
listSiteApiKeys: {
|
|
@@ -1711,7 +1590,7 @@ const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1711
1590
|
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
1712
1591
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1713
1592
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1714
|
-
...
|
|
1593
|
+
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
1715
1594
|
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
1716
1595
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1717
1596
|
z.object({
|
|
@@ -1887,14 +1766,14 @@ function publicEventPricingType(pricing) {
|
|
|
1887
1766
|
case "single_paid":
|
|
1888
1767
|
case "ticket_types":
|
|
1889
1768
|
case "sliding_scale":
|
|
1890
|
-
case "
|
|
1769
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
1891
1770
|
case "external": return "external";
|
|
1892
1771
|
}
|
|
1893
1772
|
}
|
|
1894
1773
|
function isFreePublicEventPriceDisplay(display) {
|
|
1895
1774
|
switch (display.kind) {
|
|
1896
1775
|
case "free": return true;
|
|
1897
|
-
case "
|
|
1776
|
+
case "whole_series": return display.display.kind === "free";
|
|
1898
1777
|
case "exact":
|
|
1899
1778
|
case "from":
|
|
1900
1779
|
case "range":
|
|
@@ -2183,6 +2062,25 @@ function parseManagementKey(raw) {
|
|
|
2183
2062
|
return ok(createSecretInternal("management-key", raw));
|
|
2184
2063
|
}
|
|
2185
2064
|
//#endregion
|
|
2065
|
+
//#region ../core/src/planner.ts
|
|
2066
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
2067
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
2068
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
2069
|
+
function resolvePlanningNowDate(input = {}) {
|
|
2070
|
+
if (input.now !== void 0) return input.now;
|
|
2071
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
2072
|
+
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Resolve a Date-compatible planner input.
|
|
2075
|
+
*
|
|
2076
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
2077
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
2078
|
+
*/
|
|
2079
|
+
function resolvePlanningDateInput(input = {}) {
|
|
2080
|
+
if (input instanceof Date) return input;
|
|
2081
|
+
return resolvePlanningNowDate(input);
|
|
2082
|
+
}
|
|
2083
|
+
//#endregion
|
|
2186
2084
|
//#region ../core/src/event-series-behaviour.ts
|
|
2187
2085
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2188
2086
|
"class",
|
|
@@ -10642,7 +10540,7 @@ defineBlockAppearancePreset({
|
|
|
10642
10540
|
id: "schedule-details-brand-depth",
|
|
10643
10541
|
target: "events",
|
|
10644
10542
|
label: "Brand-depth schedule details",
|
|
10645
|
-
blockKinds: ["block.event-details"
|
|
10543
|
+
blockKinds: ["block.event-details"],
|
|
10646
10544
|
design: {
|
|
10647
10545
|
sectionSurface: "brand-depth-band",
|
|
10648
10546
|
contentFrame: plainFrame,
|
|
@@ -16824,7 +16722,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
16824
16722
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
16825
16723
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
16826
16724
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
16827
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
16828
16725
|
function bind(from, options) {
|
|
16829
16726
|
return (node) => ({
|
|
16830
16727
|
...node,
|
|
@@ -26484,12 +26381,12 @@ const RichTextDocSchema = z.object({
|
|
|
26484
26381
|
}).strict();
|
|
26485
26382
|
//#endregion
|
|
26486
26383
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
26487
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
26488
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
26384
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
26385
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
26489
26386
|
z.object({
|
|
26490
26387
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
26491
26388
|
depositAmountCents: z.number().int().min(0),
|
|
26492
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26389
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26493
26390
|
remainderDueCount: z.number().int().positive(),
|
|
26494
26391
|
intervalUnit: z.enum([
|
|
26495
26392
|
"day",
|
|
@@ -26500,7 +26397,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26500
26397
|
z.object({
|
|
26501
26398
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
26502
26399
|
depositAmountCents: z.number().int().min(0),
|
|
26503
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26400
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26504
26401
|
instalmentCount: z.number().int().positive(),
|
|
26505
26402
|
intervalCount: z.number().int().positive(),
|
|
26506
26403
|
intervalUnit: z.enum([
|
|
@@ -26520,28 +26417,28 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26520
26417
|
])
|
|
26521
26418
|
})
|
|
26522
26419
|
]);
|
|
26523
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
26420
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
26524
26421
|
kind: z.literal("relative_to_start_date"),
|
|
26525
26422
|
daysBeforeStart: z.number().int().positive()
|
|
26526
26423
|
}), z.object({
|
|
26527
26424
|
kind: z.literal("fixed_calendar_date"),
|
|
26528
26425
|
dueAt: z.string().datetime()
|
|
26529
26426
|
})]);
|
|
26530
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
26427
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
26531
26428
|
upfrontAmountCents: z.number().int().min(0),
|
|
26532
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
26533
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
26429
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
26430
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
26534
26431
|
});
|
|
26535
26432
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
26536
26433
|
z.object({ kind: z.literal("upfront") }),
|
|
26537
26434
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
26538
26435
|
z.object({
|
|
26539
26436
|
kind: z.literal("instalment_plan"),
|
|
26540
|
-
plan: bookingInstalmentPlanSchema
|
|
26437
|
+
plan: bookingInstalmentPlanSchema$1
|
|
26541
26438
|
}),
|
|
26542
26439
|
z.object({
|
|
26543
26440
|
kind: z.literal("flexible_balance"),
|
|
26544
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
26441
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
26545
26442
|
})
|
|
26546
26443
|
]);
|
|
26547
26444
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
@@ -26563,6 +26460,164 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
26563
26460
|
});
|
|
26564
26461
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26565
26462
|
//#endregion
|
|
26463
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
26464
|
+
function isSaleWindowOpen(option, now) {
|
|
26465
|
+
if (!option.isActive) return false;
|
|
26466
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
26467
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
26468
|
+
return true;
|
|
26469
|
+
}
|
|
26470
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
26471
|
+
if (amount <= 0) return {
|
|
26472
|
+
kind: "free",
|
|
26473
|
+
currency
|
|
26474
|
+
};
|
|
26475
|
+
return {
|
|
26476
|
+
kind: "exact",
|
|
26477
|
+
amount,
|
|
26478
|
+
currency
|
|
26479
|
+
};
|
|
26480
|
+
}
|
|
26481
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
26482
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
26483
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
26484
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
26485
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
26486
|
+
return left.name.localeCompare(right.name);
|
|
26487
|
+
});
|
|
26488
|
+
}
|
|
26489
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
26490
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
26491
|
+
const currency = offering.pricing.currency;
|
|
26492
|
+
switch (offering.pricing.pricingStrategy) {
|
|
26493
|
+
case "free": return resolveFreePricing(currency);
|
|
26494
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
26495
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
26496
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
26497
|
+
}
|
|
26498
|
+
}
|
|
26499
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
26500
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
26501
|
+
selectedSlidingAmount: null,
|
|
26502
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
26503
|
+
} : {
|
|
26504
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
26505
|
+
nowInput
|
|
26506
|
+
};
|
|
26507
|
+
}
|
|
26508
|
+
function resolveFreePricing(currency) {
|
|
26509
|
+
return {
|
|
26510
|
+
currency,
|
|
26511
|
+
display: {
|
|
26512
|
+
kind: "free",
|
|
26513
|
+
currency
|
|
26514
|
+
},
|
|
26515
|
+
selectableOptions: [],
|
|
26516
|
+
requiresSelection: false,
|
|
26517
|
+
selectedOption: null,
|
|
26518
|
+
slidingScale: null,
|
|
26519
|
+
selectedSlidingAmount: null,
|
|
26520
|
+
selectedPriceAmount: 0,
|
|
26521
|
+
selectedRequiresPayment: false,
|
|
26522
|
+
hasPaidSelection: false,
|
|
26523
|
+
hasFreeSelection: true
|
|
26524
|
+
};
|
|
26525
|
+
}
|
|
26526
|
+
function resolveSinglePricing(amount, currency) {
|
|
26527
|
+
return {
|
|
26528
|
+
currency,
|
|
26529
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
26530
|
+
selectableOptions: [],
|
|
26531
|
+
requiresSelection: false,
|
|
26532
|
+
selectedOption: null,
|
|
26533
|
+
slidingScale: null,
|
|
26534
|
+
selectedSlidingAmount: null,
|
|
26535
|
+
selectedPriceAmount: amount,
|
|
26536
|
+
selectedRequiresPayment: amount > 0,
|
|
26537
|
+
hasPaidSelection: amount > 0,
|
|
26538
|
+
hasFreeSelection: amount <= 0
|
|
26539
|
+
};
|
|
26540
|
+
}
|
|
26541
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
26542
|
+
const currency = offering.pricing.currency;
|
|
26543
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
26544
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
26545
|
+
return {
|
|
26546
|
+
currency,
|
|
26547
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
26548
|
+
selectableOptions,
|
|
26549
|
+
requiresSelection: selectableOptions.length > 1,
|
|
26550
|
+
selectedOption,
|
|
26551
|
+
slidingScale: null,
|
|
26552
|
+
selectedSlidingAmount: null,
|
|
26553
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
26554
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
26555
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
26556
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
26557
|
+
};
|
|
26558
|
+
}
|
|
26559
|
+
function resolveSelectedTier(options, selectedId) {
|
|
26560
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
26561
|
+
}
|
|
26562
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
26563
|
+
if (lowestAmount === null) return {
|
|
26564
|
+
kind: "unavailable",
|
|
26565
|
+
currency
|
|
26566
|
+
};
|
|
26567
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
26568
|
+
kind: "from",
|
|
26569
|
+
amount: lowestAmount,
|
|
26570
|
+
currency
|
|
26571
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
26572
|
+
}
|
|
26573
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
26574
|
+
const currency = offering.pricing.currency;
|
|
26575
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
26576
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
26577
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
26578
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
26579
|
+
return {
|
|
26580
|
+
currency,
|
|
26581
|
+
display: {
|
|
26582
|
+
kind: "range",
|
|
26583
|
+
minAmount,
|
|
26584
|
+
maxAmount,
|
|
26585
|
+
currency
|
|
26586
|
+
},
|
|
26587
|
+
selectableOptions: [],
|
|
26588
|
+
requiresSelection: selectedAmount === null,
|
|
26589
|
+
selectedOption: null,
|
|
26590
|
+
slidingScale: {
|
|
26591
|
+
minAmount,
|
|
26592
|
+
maxAmount,
|
|
26593
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
26594
|
+
},
|
|
26595
|
+
selectedSlidingAmount: selectedAmount,
|
|
26596
|
+
selectedPriceAmount: selectedAmount,
|
|
26597
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
26598
|
+
hasPaidSelection: maxAmount > 0,
|
|
26599
|
+
hasFreeSelection: minAmount === 0
|
|
26600
|
+
};
|
|
26601
|
+
}
|
|
26602
|
+
function unavailableSlidingScale(currency) {
|
|
26603
|
+
return {
|
|
26604
|
+
currency,
|
|
26605
|
+
display: {
|
|
26606
|
+
kind: "unavailable",
|
|
26607
|
+
currency
|
|
26608
|
+
},
|
|
26609
|
+
selectableOptions: [],
|
|
26610
|
+
requiresSelection: true,
|
|
26611
|
+
selectedOption: null,
|
|
26612
|
+
slidingScale: null,
|
|
26613
|
+
selectedSlidingAmount: null,
|
|
26614
|
+
selectedPriceAmount: null,
|
|
26615
|
+
selectedRequiresPayment: false,
|
|
26616
|
+
hasPaidSelection: false,
|
|
26617
|
+
hasFreeSelection: false
|
|
26618
|
+
};
|
|
26619
|
+
}
|
|
26620
|
+
//#endregion
|
|
26566
26621
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26567
26622
|
const wholeSeriesVenueSchema = z.object({
|
|
26568
26623
|
id: z.string(),
|
|
@@ -26622,6 +26677,13 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
26622
26677
|
title: z.string(),
|
|
26623
26678
|
slug: z.string(),
|
|
26624
26679
|
description: z.unknown().nullable(),
|
|
26680
|
+
deliveryMode: z.enum([
|
|
26681
|
+
"in_person",
|
|
26682
|
+
"online",
|
|
26683
|
+
"hybrid"
|
|
26684
|
+
]),
|
|
26685
|
+
waitlistEnabled: z.boolean(),
|
|
26686
|
+
requireGuestDetails: z.boolean(),
|
|
26625
26687
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
26626
26688
|
enrollmentOpen: z.boolean(),
|
|
26627
26689
|
pricing: wholeSeriesPricingSchema,
|
|
@@ -26737,10 +26799,11 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
26737
26799
|
paidToAmount: z.number(),
|
|
26738
26800
|
currency: z.string()
|
|
26739
26801
|
});
|
|
26740
|
-
const
|
|
26802
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
26741
26803
|
freePriceDisplaySchema,
|
|
26742
26804
|
exactPriceDisplaySchema,
|
|
26743
26805
|
fromPriceDisplaySchema,
|
|
26806
|
+
rangePriceDisplaySchema,
|
|
26744
26807
|
unavailablePriceDisplaySchema
|
|
26745
26808
|
]);
|
|
26746
26809
|
z.discriminatedUnion("kind", [
|
|
@@ -26755,8 +26818,8 @@ z.discriminatedUnion("kind", [
|
|
|
26755
26818
|
label: z.string()
|
|
26756
26819
|
}),
|
|
26757
26820
|
z.object({
|
|
26758
|
-
kind: z.literal("
|
|
26759
|
-
display:
|
|
26821
|
+
kind: z.literal("whole_series"),
|
|
26822
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26760
26823
|
})
|
|
26761
26824
|
]);
|
|
26762
26825
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -26858,10 +26921,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
26858
26921
|
})
|
|
26859
26922
|
}),
|
|
26860
26923
|
z.object({
|
|
26861
|
-
kind: z.literal("
|
|
26924
|
+
kind: z.literal("whole_series"),
|
|
26862
26925
|
display: z.object({
|
|
26863
|
-
kind: z.literal("
|
|
26864
|
-
display:
|
|
26926
|
+
kind: z.literal("whole_series"),
|
|
26927
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26865
26928
|
})
|
|
26866
26929
|
}),
|
|
26867
26930
|
z.object({
|
|
@@ -27278,7 +27341,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
27278
27341
|
};
|
|
27279
27342
|
return { kind: "unscoped" };
|
|
27280
27343
|
}
|
|
27281
|
-
function
|
|
27344
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27345
|
+
const scope = resolveEventRegistrationScope(context);
|
|
27282
27346
|
switch (scope.kind) {
|
|
27283
27347
|
case "occurrenceSeries":
|
|
27284
27348
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -27290,9 +27354,6 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
27290
27354
|
case "unscoped": return [...events];
|
|
27291
27355
|
}
|
|
27292
27356
|
}
|
|
27293
|
-
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27294
|
-
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
27295
|
-
}
|
|
27296
27357
|
//#endregion
|
|
27297
27358
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27298
27359
|
function planEventRegistrationScope(input) {
|
|
@@ -27386,14 +27447,14 @@ function isRecord$6(value) {
|
|
|
27386
27447
|
}
|
|
27387
27448
|
function isPublicEventPricing(value) {
|
|
27388
27449
|
if (!isRecord$6(value) || typeof value.kind !== "string") return false;
|
|
27389
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
27450
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "whole_series" || value.kind === "external";
|
|
27390
27451
|
}
|
|
27391
27452
|
function isPublicEventTicketType(value) {
|
|
27392
27453
|
return isRecord$6(value) && typeof value.id === "string";
|
|
27393
27454
|
}
|
|
27394
27455
|
function readTicketTypePriceDisplay(value, currency) {
|
|
27395
27456
|
const display = readLegacyPriceDisplay(value, currency);
|
|
27396
|
-
return display.kind === "
|
|
27457
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
27397
27458
|
kind: "unavailable",
|
|
27398
27459
|
currency
|
|
27399
27460
|
} : display;
|
|
@@ -27451,11 +27512,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27451
27512
|
kind: "unavailable",
|
|
27452
27513
|
currency: displayCurrency
|
|
27453
27514
|
};
|
|
27454
|
-
case "
|
|
27455
|
-
kind: "
|
|
27515
|
+
case "whole_series": return isRecord$6(value.display) ? {
|
|
27516
|
+
kind: "whole_series",
|
|
27456
27517
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
27457
27518
|
} : {
|
|
27458
|
-
kind: "
|
|
27519
|
+
kind: "whole_series",
|
|
27459
27520
|
display: {
|
|
27460
27521
|
kind: "unavailable",
|
|
27461
27522
|
currency: displayCurrency
|
|
@@ -27581,7 +27642,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
27581
27642
|
//#endregion
|
|
27582
27643
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
27583
27644
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
27584
|
-
return event.
|
|
27645
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
27585
27646
|
}
|
|
27586
27647
|
function findPreSelectedEvent(input) {
|
|
27587
27648
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -27607,12 +27668,127 @@ function toRegistrationEvent(event) {
|
|
|
27607
27668
|
return {
|
|
27608
27669
|
...event,
|
|
27609
27670
|
pricing: resolveRuntimeEventPricing(event),
|
|
27610
|
-
|
|
27611
|
-
|
|
27671
|
+
selectionId: event.id,
|
|
27672
|
+
registrationSubject: {
|
|
27673
|
+
kind: "occurrence",
|
|
27674
|
+
occurrenceId: event.occurrenceId
|
|
27675
|
+
}
|
|
27612
27676
|
};
|
|
27613
27677
|
}
|
|
27614
27678
|
function toRegistrationEvents(events) {
|
|
27615
|
-
return events.map(toRegistrationEvent);
|
|
27679
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
27680
|
+
}
|
|
27681
|
+
function toWholeSeriesTicketType(option) {
|
|
27682
|
+
return {
|
|
27683
|
+
...option,
|
|
27684
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
27685
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
27686
|
+
availability: {
|
|
27687
|
+
kind: "available",
|
|
27688
|
+
remainingCapacity: option.capacityLimit
|
|
27689
|
+
}
|
|
27690
|
+
};
|
|
27691
|
+
}
|
|
27692
|
+
function toWholeSeriesPricing(offering) {
|
|
27693
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
27694
|
+
switch (offering.pricing.pricingStrategy) {
|
|
27695
|
+
case "free": return {
|
|
27696
|
+
kind: "free_registration",
|
|
27697
|
+
currency: offering.currency,
|
|
27698
|
+
display: {
|
|
27699
|
+
kind: "free",
|
|
27700
|
+
currency: offering.currency
|
|
27701
|
+
}
|
|
27702
|
+
};
|
|
27703
|
+
case "single": {
|
|
27704
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
27705
|
+
return amount === 0 ? {
|
|
27706
|
+
kind: "free_registration",
|
|
27707
|
+
currency: offering.currency,
|
|
27708
|
+
display: {
|
|
27709
|
+
kind: "free",
|
|
27710
|
+
currency: offering.currency
|
|
27711
|
+
}
|
|
27712
|
+
} : {
|
|
27713
|
+
kind: "single_paid",
|
|
27714
|
+
amount,
|
|
27715
|
+
currency: offering.currency,
|
|
27716
|
+
display: {
|
|
27717
|
+
kind: "exact",
|
|
27718
|
+
amount,
|
|
27719
|
+
currency: offering.currency
|
|
27720
|
+
}
|
|
27721
|
+
};
|
|
27722
|
+
}
|
|
27723
|
+
case "tiered": return {
|
|
27724
|
+
kind: "ticket_types",
|
|
27725
|
+
currency: offering.currency,
|
|
27726
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
27727
|
+
display: resolved.display
|
|
27728
|
+
};
|
|
27729
|
+
case "sliding_scale": return {
|
|
27730
|
+
kind: "sliding_scale",
|
|
27731
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27732
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27733
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
27734
|
+
currency: offering.currency,
|
|
27735
|
+
display: {
|
|
27736
|
+
kind: "range",
|
|
27737
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27738
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27739
|
+
currency: offering.currency
|
|
27740
|
+
}
|
|
27741
|
+
};
|
|
27742
|
+
}
|
|
27743
|
+
}
|
|
27744
|
+
function toAttendanceModes(offering) {
|
|
27745
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
27746
|
+
mode,
|
|
27747
|
+
capacity: offering.enrollmentCapacity,
|
|
27748
|
+
registeredCount: offering.enrolledCount,
|
|
27749
|
+
availableSpots: offering.availableSpots,
|
|
27750
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
27751
|
+
}));
|
|
27752
|
+
}
|
|
27753
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
27754
|
+
const firstSession = offering.sessions[0];
|
|
27755
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
27756
|
+
return {
|
|
27757
|
+
selectionId: offering.eventSeriesId,
|
|
27758
|
+
registrationSubject: {
|
|
27759
|
+
kind: "wholeSeries",
|
|
27760
|
+
eventSeriesId: offering.eventSeriesId,
|
|
27761
|
+
sessions: offering.sessions
|
|
27762
|
+
},
|
|
27763
|
+
seriesId: offering.eventSeriesId,
|
|
27764
|
+
title: offering.title,
|
|
27765
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
27766
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
27767
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
27768
|
+
kind: "closed",
|
|
27769
|
+
reason: "enrollment_closed"
|
|
27770
|
+
},
|
|
27771
|
+
deliveryMode: offering.deliveryMode,
|
|
27772
|
+
attendanceModes: toAttendanceModes(offering),
|
|
27773
|
+
capacity: offering.enrollmentCapacity,
|
|
27774
|
+
registeredCount: offering.enrolledCount,
|
|
27775
|
+
availableSpots: offering.availableSpots,
|
|
27776
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
27777
|
+
venue: offering.venue ? {
|
|
27778
|
+
...offering.venue,
|
|
27779
|
+
location: null
|
|
27780
|
+
} : null,
|
|
27781
|
+
eventCategory: null,
|
|
27782
|
+
teamMembers: offering.teamMembers,
|
|
27783
|
+
status: offering.status,
|
|
27784
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
27785
|
+
pricing: toWholeSeriesPricing(offering),
|
|
27786
|
+
paymentTerms: offering.paymentTerms,
|
|
27787
|
+
consent: offering.consent,
|
|
27788
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
27789
|
+
acceptsPasses: false,
|
|
27790
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
27791
|
+
};
|
|
27616
27792
|
}
|
|
27617
27793
|
//#endregion
|
|
27618
27794
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -27638,11 +27814,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
27638
27814
|
maxTickets: z.string().optional(),
|
|
27639
27815
|
showVenue: z.boolean().optional(),
|
|
27640
27816
|
showCapacity: z.boolean().optional(),
|
|
27641
|
-
showSessions: z.boolean().optional(),
|
|
27642
|
-
showPrice: z.boolean().optional(),
|
|
27643
27817
|
successMessage: z.string().optional(),
|
|
27644
|
-
waitlistMessage: z.string().optional(),
|
|
27645
|
-
membershipMessage: z.string().optional(),
|
|
27646
27818
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27647
27819
|
overlayEnabled: z.boolean().optional(),
|
|
27648
27820
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -27712,6 +27884,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
27712
27884
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27713
27885
|
}
|
|
27714
27886
|
function buildEventRegistrationShellStepLabels(source) {
|
|
27887
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
27888
|
+
if (selectedOffering) {
|
|
27889
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
27890
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
27891
|
+
eligibility: null,
|
|
27892
|
+
selectedTicketType: null,
|
|
27893
|
+
event: selectedEvent
|
|
27894
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
27895
|
+
}
|
|
27715
27896
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
27716
27897
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
27717
27898
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -27726,13 +27907,16 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
27726
27907
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
27727
27908
|
}
|
|
27728
27909
|
function scopeEventRegistrationEvents(source) {
|
|
27910
|
+
return toRegistrationEvents(scopeEventRegistrationSourceEvents(source));
|
|
27911
|
+
}
|
|
27912
|
+
function scopeEventRegistrationSourceEvents(source) {
|
|
27729
27913
|
const scope = planEventRegistrationScope({
|
|
27730
|
-
events:
|
|
27914
|
+
events: source.events ?? [],
|
|
27731
27915
|
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
27732
27916
|
occurrenceContext: source.occurrenceContext,
|
|
27733
27917
|
subject: source.subject
|
|
27734
27918
|
});
|
|
27735
|
-
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
27919
|
+
return scope.kind === "invalidSelectedRun" ? [] : [...scope.events];
|
|
27736
27920
|
}
|
|
27737
27921
|
function shellLabelForRegistrationStep(step, events) {
|
|
27738
27922
|
switch (step) {
|
|
@@ -27764,30 +27948,29 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27764
27948
|
source: createZodCodec(eventRegistrationSourceSchema),
|
|
27765
27949
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
27766
27950
|
},
|
|
27767
|
-
buildRender: (source) =>
|
|
27768
|
-
|
|
27769
|
-
|
|
27770
|
-
|
|
27771
|
-
|
|
27772
|
-
|
|
27773
|
-
|
|
27774
|
-
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
|
|
27779
|
-
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
27790
|
-
})
|
|
27951
|
+
buildRender: (source) => {
|
|
27952
|
+
const events = source.events == null ? null : scopeEventRegistrationSourceEvents(source);
|
|
27953
|
+
return {
|
|
27954
|
+
display: buildEventRegistrationDisplay(source),
|
|
27955
|
+
hydration: {
|
|
27956
|
+
occurrenceContext: source.occurrenceContext ?? null,
|
|
27957
|
+
subject: source.subject ?? null,
|
|
27958
|
+
events,
|
|
27959
|
+
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
27960
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
27961
|
+
maxTickets: source.maxTickets ?? void 0,
|
|
27962
|
+
showVenue: source.showVenue,
|
|
27963
|
+
showCapacity: source.showCapacity,
|
|
27964
|
+
successMessage: source.successMessage,
|
|
27965
|
+
buttonVariant: source.buttonVariant,
|
|
27966
|
+
overlayEnabled: source.overlayEnabled,
|
|
27967
|
+
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
27968
|
+
supportEmail: source.supportEmail,
|
|
27969
|
+
sitePasses: source.sitePasses ?? null,
|
|
27970
|
+
siteMemberships: source.siteMemberships ?? null
|
|
27971
|
+
}
|
|
27972
|
+
};
|
|
27973
|
+
}
|
|
27791
27974
|
});
|
|
27792
27975
|
function normalizeEventRegistrationEventInput(value) {
|
|
27793
27976
|
if (!isRecord$5(value)) return value;
|
|
@@ -27895,24 +28078,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27895
28078
|
defaultValue: true,
|
|
27896
28079
|
ui: { intent: "display" }
|
|
27897
28080
|
},
|
|
27898
|
-
{
|
|
27899
|
-
id: "showSessions",
|
|
27900
|
-
type: "boolean",
|
|
27901
|
-
label: "Show complete schedule",
|
|
27902
|
-
description: "Display every session for whole-series registrations",
|
|
27903
|
-
required: false,
|
|
27904
|
-
defaultValue: true,
|
|
27905
|
-
ui: { intent: "display" }
|
|
27906
|
-
},
|
|
27907
|
-
{
|
|
27908
|
-
id: "showPrice",
|
|
27909
|
-
type: "boolean",
|
|
27910
|
-
label: "Show price",
|
|
27911
|
-
description: "Display the whole-series price",
|
|
27912
|
-
required: false,
|
|
27913
|
-
defaultValue: true,
|
|
27914
|
-
ui: { intent: "display" }
|
|
27915
|
-
},
|
|
27916
28081
|
{
|
|
27917
28082
|
id: "successMessage",
|
|
27918
28083
|
type: "text",
|
|
@@ -27923,26 +28088,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27923
28088
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
27924
28089
|
maxLength: 500
|
|
27925
28090
|
},
|
|
27926
|
-
{
|
|
27927
|
-
id: "waitlistMessage",
|
|
27928
|
-
type: "text",
|
|
27929
|
-
label: "Waitlist message",
|
|
27930
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
27931
|
-
required: false,
|
|
27932
|
-
multiline: true,
|
|
27933
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
27934
|
-
maxLength: 500
|
|
27935
|
-
},
|
|
27936
|
-
{
|
|
27937
|
-
id: "membershipMessage",
|
|
27938
|
-
type: "text",
|
|
27939
|
-
label: "Membership registration message",
|
|
27940
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
27941
|
-
required: false,
|
|
27942
|
-
multiline: true,
|
|
27943
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
27944
|
-
maxLength: 500
|
|
27945
|
-
},
|
|
27946
28091
|
{
|
|
27947
28092
|
id: "buttonText",
|
|
27948
28093
|
type: "text",
|
|
@@ -27974,11 +28119,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
27974
28119
|
} },
|
|
27975
28120
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
27976
28121
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
27977
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
27978
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
27979
28122
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
27980
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
27981
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
27982
28123
|
buttonText: { $bind: {
|
|
27983
28124
|
from: "content.buttonText",
|
|
27984
28125
|
fallback: "Complete Registration"
|
|
@@ -28095,254 +28236,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
28095
28236
|
}
|
|
28096
28237
|
};
|
|
28097
28238
|
//#endregion
|
|
28098
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
28099
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
28100
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
28101
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
28102
|
-
showSessions: z.boolean().optional(),
|
|
28103
|
-
showPrice: z.boolean().optional(),
|
|
28104
|
-
showCapacity: z.boolean().optional(),
|
|
28105
|
-
showVenue: z.boolean().optional(),
|
|
28106
|
-
successMessage: z.string().optional(),
|
|
28107
|
-
waitlistMessage: z.string().optional(),
|
|
28108
|
-
membershipMessage: z.string().optional(),
|
|
28109
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28110
|
-
};
|
|
28111
|
-
const courseRegistrationSourceSchema = z.object({
|
|
28112
|
-
siteId: z.string().optional(),
|
|
28113
|
-
apiBaseUrl: z.string().optional(),
|
|
28114
|
-
portalToken: z.string().nullable().optional(),
|
|
28115
|
-
...courseRegistrationHydrationSchemaShape,
|
|
28116
|
-
className: z.string().nullable().optional(),
|
|
28117
|
-
buttonText: z.string().nullable().optional(),
|
|
28118
|
-
stage: previewStageSchema.optional()
|
|
28119
|
-
});
|
|
28120
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
28121
|
-
kind: z.literal("course-registration"),
|
|
28122
|
-
state: z.literal("shell"),
|
|
28123
|
-
className: z.string().nullable(),
|
|
28124
|
-
summaryButtonText: z.string()
|
|
28125
|
-
});
|
|
28126
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
28127
|
-
const courseRegistrationRenderSchema = z.object({
|
|
28128
|
-
display: courseRegistrationDisplaySchema,
|
|
28129
|
-
hydration: courseRegistrationHydrationSchema
|
|
28130
|
-
});
|
|
28131
|
-
z.object({
|
|
28132
|
-
siteId: z.string().optional(),
|
|
28133
|
-
apiBaseUrl: z.string().optional(),
|
|
28134
|
-
portalToken: z.string().nullable().optional(),
|
|
28135
|
-
stage: previewStageSchema.optional()
|
|
28136
|
-
});
|
|
28137
|
-
function buildCourseRegistrationDisplay(source) {
|
|
28138
|
-
return {
|
|
28139
|
-
kind: "course-registration",
|
|
28140
|
-
state: "shell",
|
|
28141
|
-
className: source.className ?? null,
|
|
28142
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
28143
|
-
};
|
|
28144
|
-
}
|
|
28145
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
28146
|
-
kind: "client-owned",
|
|
28147
|
-
contracts: {
|
|
28148
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
28149
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
28150
|
-
},
|
|
28151
|
-
buildRender: (source) => ({
|
|
28152
|
-
display: buildCourseRegistrationDisplay(source),
|
|
28153
|
-
hydration: {
|
|
28154
|
-
subject: source.subject ?? null,
|
|
28155
|
-
courses: source.courses ?? null,
|
|
28156
|
-
showSessions: source.showSessions,
|
|
28157
|
-
showPrice: source.showPrice,
|
|
28158
|
-
showCapacity: source.showCapacity,
|
|
28159
|
-
showVenue: source.showVenue,
|
|
28160
|
-
successMessage: source.successMessage,
|
|
28161
|
-
waitlistMessage: source.waitlistMessage,
|
|
28162
|
-
membershipMessage: source.membershipMessage,
|
|
28163
|
-
buttonVariant: source.buttonVariant
|
|
28164
|
-
}
|
|
28165
|
-
})
|
|
28166
|
-
});
|
|
28167
|
-
const courseRegistrationBlockDefinition = {
|
|
28168
|
-
manifest: createBlockManifest({
|
|
28169
|
-
id: "block.course-registration",
|
|
28170
|
-
version: "1.0.0",
|
|
28171
|
-
title: "Course Registration",
|
|
28172
|
-
titleSource: "heading",
|
|
28173
|
-
description: "Enrollment form for multi-session courses",
|
|
28174
|
-
category: "interactive",
|
|
28175
|
-
contentSource: { kind: "inline" },
|
|
28176
|
-
tags: [
|
|
28177
|
-
"courses",
|
|
28178
|
-
"enrollment",
|
|
28179
|
-
"booking",
|
|
28180
|
-
"form",
|
|
28181
|
-
"signup",
|
|
28182
|
-
"education"
|
|
28183
|
-
],
|
|
28184
|
-
icon: "GraduationCap",
|
|
28185
|
-
styleTokens: {
|
|
28186
|
-
background: "surface",
|
|
28187
|
-
typography: "body",
|
|
28188
|
-
spacing: "md"
|
|
28189
|
-
},
|
|
28190
|
-
behaviours: {
|
|
28191
|
-
supportsThemeSwitching: true,
|
|
28192
|
-
inlineEditing: false,
|
|
28193
|
-
animation: false,
|
|
28194
|
-
paletteHidden: false
|
|
28195
|
-
},
|
|
28196
|
-
additionalFields: [
|
|
28197
|
-
{
|
|
28198
|
-
id: "heading",
|
|
28199
|
-
type: "text",
|
|
28200
|
-
label: "Heading",
|
|
28201
|
-
description: "Main heading for the registration form",
|
|
28202
|
-
required: false,
|
|
28203
|
-
multiline: false,
|
|
28204
|
-
defaultValue: "Sign up"
|
|
28205
|
-
},
|
|
28206
|
-
{
|
|
28207
|
-
id: "description",
|
|
28208
|
-
type: "richText",
|
|
28209
|
-
label: "Description",
|
|
28210
|
-
description: "Optional introductory text",
|
|
28211
|
-
required: false
|
|
28212
|
-
},
|
|
28213
|
-
{
|
|
28214
|
-
id: "showSessions",
|
|
28215
|
-
type: "boolean",
|
|
28216
|
-
label: "Show sessions",
|
|
28217
|
-
description: "Display the list of course sessions",
|
|
28218
|
-
required: false,
|
|
28219
|
-
defaultValue: true,
|
|
28220
|
-
ui: { intent: "display" }
|
|
28221
|
-
},
|
|
28222
|
-
{
|
|
28223
|
-
id: "showPrice",
|
|
28224
|
-
type: "boolean",
|
|
28225
|
-
label: "Show price",
|
|
28226
|
-
description: "Display the course price",
|
|
28227
|
-
required: false,
|
|
28228
|
-
defaultValue: true,
|
|
28229
|
-
ui: { intent: "display" }
|
|
28230
|
-
},
|
|
28231
|
-
{
|
|
28232
|
-
id: "showCapacity",
|
|
28233
|
-
type: "boolean",
|
|
28234
|
-
label: "Show available spots",
|
|
28235
|
-
description: "Display remaining enrollment capacity",
|
|
28236
|
-
required: false,
|
|
28237
|
-
defaultValue: true,
|
|
28238
|
-
ui: { intent: "display" }
|
|
28239
|
-
},
|
|
28240
|
-
{
|
|
28241
|
-
id: "showVenue",
|
|
28242
|
-
type: "boolean",
|
|
28243
|
-
label: "Show venue",
|
|
28244
|
-
description: "Display venue information",
|
|
28245
|
-
required: false,
|
|
28246
|
-
defaultValue: true,
|
|
28247
|
-
ui: { intent: "display" }
|
|
28248
|
-
},
|
|
28249
|
-
{
|
|
28250
|
-
id: "successMessage",
|
|
28251
|
-
type: "text",
|
|
28252
|
-
label: "Success message",
|
|
28253
|
-
description: "Message shown after successful enrollment",
|
|
28254
|
-
required: false,
|
|
28255
|
-
multiline: true,
|
|
28256
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
28257
|
-
maxLength: 500
|
|
28258
|
-
},
|
|
28259
|
-
{
|
|
28260
|
-
id: "waitlistMessage",
|
|
28261
|
-
type: "text",
|
|
28262
|
-
label: "Waitlist message",
|
|
28263
|
-
description: "Message when added to waitlist",
|
|
28264
|
-
required: false,
|
|
28265
|
-
multiline: true,
|
|
28266
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
28267
|
-
maxLength: 500
|
|
28268
|
-
},
|
|
28269
|
-
{
|
|
28270
|
-
id: "membershipMessage",
|
|
28271
|
-
type: "text",
|
|
28272
|
-
label: "Membership enrollment message",
|
|
28273
|
-
description: "Message when enrolled using a membership",
|
|
28274
|
-
required: false,
|
|
28275
|
-
multiline: true,
|
|
28276
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
28277
|
-
maxLength: 500
|
|
28278
|
-
},
|
|
28279
|
-
{
|
|
28280
|
-
id: "buttonText",
|
|
28281
|
-
type: "text",
|
|
28282
|
-
label: "Submit button text",
|
|
28283
|
-
description: "Text for the enrollment submit button",
|
|
28284
|
-
required: false,
|
|
28285
|
-
multiline: false,
|
|
28286
|
-
defaultValue: "Sign up",
|
|
28287
|
-
maxLength: 40
|
|
28288
|
-
},
|
|
28289
|
-
createButtonVariantField()
|
|
28290
|
-
],
|
|
28291
|
-
layout: [styledSection({
|
|
28292
|
-
baseClass: "",
|
|
28293
|
-
spacing: "spacious",
|
|
28294
|
-
children: sectionContainer([
|
|
28295
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28296
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28297
|
-
courseRegistration(withApiBindings({
|
|
28298
|
-
subject: { $bind: {
|
|
28299
|
-
from: "$root.subject",
|
|
28300
|
-
fallback: null
|
|
28301
|
-
} },
|
|
28302
|
-
portalToken: { $bind: {
|
|
28303
|
-
from: "$root.portalToken",
|
|
28304
|
-
fallback: null
|
|
28305
|
-
} },
|
|
28306
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
28307
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
28308
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
28309
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28310
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
28311
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
28312
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
28313
|
-
buttonText: { $bind: {
|
|
28314
|
-
from: "content.buttonText",
|
|
28315
|
-
fallback: "Sign up"
|
|
28316
|
-
} },
|
|
28317
|
-
buttonVariant: { $bind: {
|
|
28318
|
-
from: "content.buttonVariant",
|
|
28319
|
-
fallback: "primary"
|
|
28320
|
-
} },
|
|
28321
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28322
|
-
stage: { $bind: {
|
|
28323
|
-
from: "$root.previewStage",
|
|
28324
|
-
fallback: "published"
|
|
28325
|
-
} }
|
|
28326
|
-
}))
|
|
28327
|
-
], { gap: "lg" })
|
|
28328
|
-
})]
|
|
28329
|
-
}),
|
|
28330
|
-
runtime: courseRegistrationBlockRuntime,
|
|
28331
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28332
|
-
dataLoaders: { courses: {
|
|
28333
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28334
|
-
params: {
|
|
28335
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28336
|
-
limit: "50",
|
|
28337
|
-
stage: { $bind: {
|
|
28338
|
-
from: "$root.previewStage",
|
|
28339
|
-
fallback: "published"
|
|
28340
|
-
} }
|
|
28341
|
-
},
|
|
28342
|
-
mode: "server"
|
|
28343
|
-
} }
|
|
28344
|
-
};
|
|
28345
|
-
//#endregion
|
|
28346
28239
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
28347
28240
|
/**
|
|
28348
28241
|
* Event Details Block
|
|
@@ -28589,200 +28482,6 @@ const eventDetailsBlockDefinition = {
|
|
|
28589
28482
|
mode: "server"
|
|
28590
28483
|
} }
|
|
28591
28484
|
};
|
|
28592
|
-
const courseDetailsBlockDefinition = {
|
|
28593
|
-
manifest: createBlockManifest({
|
|
28594
|
-
id: "block.course-details",
|
|
28595
|
-
version: "1.0.0",
|
|
28596
|
-
title: "Course Details",
|
|
28597
|
-
titleSource: "heading",
|
|
28598
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
28599
|
-
category: "content",
|
|
28600
|
-
contentSource: { kind: "entries" },
|
|
28601
|
-
tags: [
|
|
28602
|
-
"courses",
|
|
28603
|
-
"schedule",
|
|
28604
|
-
"sessions",
|
|
28605
|
-
"venue",
|
|
28606
|
-
"pricing"
|
|
28607
|
-
],
|
|
28608
|
-
icon: "GraduationCap",
|
|
28609
|
-
styleTokens: {
|
|
28610
|
-
background: "surface",
|
|
28611
|
-
typography: "body",
|
|
28612
|
-
spacing: "md"
|
|
28613
|
-
},
|
|
28614
|
-
behaviours: {
|
|
28615
|
-
supportsThemeSwitching: true,
|
|
28616
|
-
inlineEditing: false,
|
|
28617
|
-
animation: false,
|
|
28618
|
-
paletteHidden: false
|
|
28619
|
-
},
|
|
28620
|
-
additionalFields: [
|
|
28621
|
-
{
|
|
28622
|
-
id: "heading",
|
|
28623
|
-
type: "text",
|
|
28624
|
-
label: "Heading",
|
|
28625
|
-
description: "Optional heading shown above course details",
|
|
28626
|
-
required: false,
|
|
28627
|
-
multiline: false,
|
|
28628
|
-
defaultValue: "Course details"
|
|
28629
|
-
},
|
|
28630
|
-
{
|
|
28631
|
-
id: "showTitle",
|
|
28632
|
-
type: "boolean",
|
|
28633
|
-
label: "Show course title",
|
|
28634
|
-
required: false,
|
|
28635
|
-
defaultValue: false,
|
|
28636
|
-
ui: { intent: "display" }
|
|
28637
|
-
},
|
|
28638
|
-
{
|
|
28639
|
-
id: "showDescription",
|
|
28640
|
-
type: "boolean",
|
|
28641
|
-
label: "Show course description",
|
|
28642
|
-
description: "Render the course description from the bookings course record",
|
|
28643
|
-
required: false,
|
|
28644
|
-
defaultValue: false,
|
|
28645
|
-
ui: { intent: "display" }
|
|
28646
|
-
},
|
|
28647
|
-
{
|
|
28648
|
-
id: "showSessions",
|
|
28649
|
-
type: "boolean",
|
|
28650
|
-
label: "Show sessions",
|
|
28651
|
-
required: false,
|
|
28652
|
-
defaultValue: true,
|
|
28653
|
-
ui: { intent: "display" }
|
|
28654
|
-
},
|
|
28655
|
-
{
|
|
28656
|
-
id: "sessionsLimit",
|
|
28657
|
-
type: "select",
|
|
28658
|
-
label: "Sessions limit",
|
|
28659
|
-
required: false,
|
|
28660
|
-
multiple: false,
|
|
28661
|
-
defaultValue: "10",
|
|
28662
|
-
options: [
|
|
28663
|
-
{
|
|
28664
|
-
value: "3",
|
|
28665
|
-
label: "3 sessions"
|
|
28666
|
-
},
|
|
28667
|
-
{
|
|
28668
|
-
value: "5",
|
|
28669
|
-
label: "5 sessions"
|
|
28670
|
-
},
|
|
28671
|
-
{
|
|
28672
|
-
value: "10",
|
|
28673
|
-
label: "10 sessions"
|
|
28674
|
-
},
|
|
28675
|
-
{
|
|
28676
|
-
value: "all",
|
|
28677
|
-
label: "All sessions"
|
|
28678
|
-
}
|
|
28679
|
-
],
|
|
28680
|
-
ui: { intent: "display" }
|
|
28681
|
-
},
|
|
28682
|
-
{
|
|
28683
|
-
id: "showVenue",
|
|
28684
|
-
type: "boolean",
|
|
28685
|
-
label: "Show venue",
|
|
28686
|
-
required: false,
|
|
28687
|
-
defaultValue: true,
|
|
28688
|
-
ui: { intent: "display" }
|
|
28689
|
-
},
|
|
28690
|
-
{
|
|
28691
|
-
id: "showPrice",
|
|
28692
|
-
type: "boolean",
|
|
28693
|
-
label: "Show price",
|
|
28694
|
-
required: false,
|
|
28695
|
-
defaultValue: true,
|
|
28696
|
-
ui: { intent: "display" }
|
|
28697
|
-
},
|
|
28698
|
-
{
|
|
28699
|
-
id: "showCapacity",
|
|
28700
|
-
type: "boolean",
|
|
28701
|
-
label: "Show capacity",
|
|
28702
|
-
required: false,
|
|
28703
|
-
defaultValue: true,
|
|
28704
|
-
ui: { intent: "display" }
|
|
28705
|
-
},
|
|
28706
|
-
{
|
|
28707
|
-
id: "showEnrollmentStatus",
|
|
28708
|
-
type: "boolean",
|
|
28709
|
-
label: "Show enrollment status",
|
|
28710
|
-
required: false,
|
|
28711
|
-
defaultValue: true,
|
|
28712
|
-
ui: { intent: "display" }
|
|
28713
|
-
},
|
|
28714
|
-
{
|
|
28715
|
-
id: "showMembershipNote",
|
|
28716
|
-
type: "boolean",
|
|
28717
|
-
label: "Show membership note",
|
|
28718
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
28719
|
-
required: false,
|
|
28720
|
-
defaultValue: true,
|
|
28721
|
-
ui: { intent: "display" }
|
|
28722
|
-
}
|
|
28723
|
-
],
|
|
28724
|
-
layout: [styledSection({
|
|
28725
|
-
baseClass: "",
|
|
28726
|
-
spacing: "spacious",
|
|
28727
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
28728
|
-
subject: { $bind: {
|
|
28729
|
-
from: "$root.subject",
|
|
28730
|
-
fallback: null
|
|
28731
|
-
} },
|
|
28732
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28733
|
-
showTitle: { $bind: {
|
|
28734
|
-
from: "content.showTitle",
|
|
28735
|
-
fallback: false
|
|
28736
|
-
} },
|
|
28737
|
-
showDescription: { $bind: {
|
|
28738
|
-
from: "content.showDescription",
|
|
28739
|
-
fallback: false
|
|
28740
|
-
} },
|
|
28741
|
-
showSessions: { $bind: {
|
|
28742
|
-
from: "content.showSessions",
|
|
28743
|
-
fallback: true
|
|
28744
|
-
} },
|
|
28745
|
-
sessionsLimit: { $bind: {
|
|
28746
|
-
from: "content.sessionsLimit",
|
|
28747
|
-
fallback: "10"
|
|
28748
|
-
} },
|
|
28749
|
-
showVenue: { $bind: {
|
|
28750
|
-
from: "content.showVenue",
|
|
28751
|
-
fallback: true
|
|
28752
|
-
} },
|
|
28753
|
-
showPrice: { $bind: {
|
|
28754
|
-
from: "content.showPrice",
|
|
28755
|
-
fallback: true
|
|
28756
|
-
} },
|
|
28757
|
-
showCapacity: { $bind: {
|
|
28758
|
-
from: "content.showCapacity",
|
|
28759
|
-
fallback: true
|
|
28760
|
-
} },
|
|
28761
|
-
showEnrollmentStatus: { $bind: {
|
|
28762
|
-
from: "content.showEnrollmentStatus",
|
|
28763
|
-
fallback: true
|
|
28764
|
-
} },
|
|
28765
|
-
showMembershipNote: { $bind: {
|
|
28766
|
-
from: "content.showMembershipNote",
|
|
28767
|
-
fallback: true
|
|
28768
|
-
} }
|
|
28769
|
-
})], { gap: "lg" })
|
|
28770
|
-
})]
|
|
28771
|
-
}),
|
|
28772
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28773
|
-
dataLoaders: { courses: {
|
|
28774
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28775
|
-
params: {
|
|
28776
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28777
|
-
limit: "50",
|
|
28778
|
-
stage: { $bind: {
|
|
28779
|
-
from: "$root.previewStage",
|
|
28780
|
-
fallback: "published"
|
|
28781
|
-
} }
|
|
28782
|
-
},
|
|
28783
|
-
mode: "server"
|
|
28784
|
-
} }
|
|
28785
|
-
};
|
|
28786
28485
|
const eventSpotlightBlockDefinition = {
|
|
28787
28486
|
manifest: createBlockManifest({
|
|
28788
28487
|
id: "block.event-spotlight",
|
|
@@ -31446,7 +31145,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
31446
31145
|
fallback: "published"
|
|
31447
31146
|
} },
|
|
31448
31147
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
31449
|
-
|
|
31148
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
31450
31149
|
...offeringsPreviewEventDataBindings
|
|
31451
31150
|
})
|
|
31452
31151
|
], { gap: "lg" }),
|
|
@@ -31463,7 +31162,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31463
31162
|
dataSchemas: {
|
|
31464
31163
|
...offeringsPreviewEventDataSchemas,
|
|
31465
31164
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
31466
|
-
|
|
31165
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
31467
31166
|
},
|
|
31468
31167
|
dataLoaders: {
|
|
31469
31168
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31472,7 +31171,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31472
31171
|
params: {},
|
|
31473
31172
|
mode: "server"
|
|
31474
31173
|
},
|
|
31475
|
-
|
|
31174
|
+
wholeSeriesOfferings: {
|
|
31476
31175
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
31477
31176
|
params: {
|
|
31478
31177
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -36439,22 +36138,6 @@ const systemBlockDefinitions = [
|
|
|
36439
36138
|
weight: "standard"
|
|
36440
36139
|
})]
|
|
36441
36140
|
})),
|
|
36442
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
36443
|
-
flow: conversionFlow,
|
|
36444
|
-
layoutProfiles: [layoutProfile({
|
|
36445
|
-
variantKey: "default",
|
|
36446
|
-
family: "form",
|
|
36447
|
-
weight: "standard"
|
|
36448
|
-
})]
|
|
36449
|
-
})),
|
|
36450
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
36451
|
-
flow: offeringsFlow,
|
|
36452
|
-
layoutProfiles: [layoutProfile({
|
|
36453
|
-
variantKey: "default",
|
|
36454
|
-
family: "stack",
|
|
36455
|
-
weight: "standard"
|
|
36456
|
-
})]
|
|
36457
|
-
})),
|
|
36458
36141
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
36459
36142
|
flow: offeringsFlow,
|
|
36460
36143
|
layoutProfiles: [layoutProfile({
|
|
@@ -38513,6 +38196,68 @@ function parsePublicProductCategorySelector(value) {
|
|
|
38513
38196
|
};
|
|
38514
38197
|
}
|
|
38515
38198
|
//#endregion
|
|
38199
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
38200
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
38201
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
38202
|
+
z.object({
|
|
38203
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
38204
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
38205
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
38206
|
+
remainderDueCount: z.number().int().positive(),
|
|
38207
|
+
intervalUnit: z.enum([
|
|
38208
|
+
"day",
|
|
38209
|
+
"week",
|
|
38210
|
+
"month"
|
|
38211
|
+
])
|
|
38212
|
+
}),
|
|
38213
|
+
z.object({
|
|
38214
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
38215
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
38216
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
38217
|
+
instalmentCount: z.number().int().positive(),
|
|
38218
|
+
intervalCount: z.number().int().positive(),
|
|
38219
|
+
intervalUnit: z.enum([
|
|
38220
|
+
"day",
|
|
38221
|
+
"week",
|
|
38222
|
+
"month"
|
|
38223
|
+
])
|
|
38224
|
+
}),
|
|
38225
|
+
z.object({
|
|
38226
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
38227
|
+
instalmentCount: z.number().int().positive(),
|
|
38228
|
+
intervalCount: z.number().int().positive(),
|
|
38229
|
+
intervalUnit: z.enum([
|
|
38230
|
+
"day",
|
|
38231
|
+
"week",
|
|
38232
|
+
"month"
|
|
38233
|
+
])
|
|
38234
|
+
})
|
|
38235
|
+
]);
|
|
38236
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
38237
|
+
kind: z.literal("relative_to_start_date"),
|
|
38238
|
+
daysBeforeStart: z.number().int().positive()
|
|
38239
|
+
}), z.object({
|
|
38240
|
+
kind: z.literal("fixed_calendar_date"),
|
|
38241
|
+
dueAt: z.string().datetime()
|
|
38242
|
+
})]);
|
|
38243
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
38244
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
38245
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
38246
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
38247
|
+
});
|
|
38248
|
+
z.discriminatedUnion("kind", [
|
|
38249
|
+
z.object({ kind: z.literal("upfront") }),
|
|
38250
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
38251
|
+
z.object({
|
|
38252
|
+
kind: z.literal("instalment_plan"),
|
|
38253
|
+
plan: bookingInstalmentPlanSchema
|
|
38254
|
+
}),
|
|
38255
|
+
z.object({
|
|
38256
|
+
kind: z.literal("flexible_balance"),
|
|
38257
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
38258
|
+
})
|
|
38259
|
+
]);
|
|
38260
|
+
//#endregion
|
|
38516
38261
|
//#region ../api/src/aiPlayground.ts
|
|
38517
38262
|
/**
|
|
38518
38263
|
* RFC-6902 JSON Patch Operations
|