@riverbankcms/sdk 0.134.0 → 0.135.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 +4 -3
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DfRhJPFQ.mjs → PreviewEditorSidebar-roNY0GVy.mjs} +4 -4
- package/dist/{PreviewEditorUI-Dppxcr_g.mjs → PreviewEditorUI-KboDbEh_.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D51gQaG3.mjs → PreviewQueryProvider-DcgaESkm.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-8CyGCXir.mjs → SdkPreviewModeRuntime-DBrF7Caa.mjs} +5 -5
- package/dist/{SiteChromeCustomizeContext-DVMTMvqA.mjs → SiteChromeCustomizeContext-DrIEpJKn.mjs} +4070 -8011
- 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 +10 -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 +6 -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-BQqwi8Oa.mjs} +180 -4
- package/dist/client/{DiscountCodeDisclosure-CfuPOHD0.mjs → DiscountCodeDisclosure-B97aMo0V.mjs} +13 -27
- package/dist/client/{EventCombined.client-DB8Qfzi-.mjs → EventCombined.client-Bs2Iw9Q6.mjs} +3 -3
- package/dist/client/{EventListing.client-DD4X8hp4.mjs → EventListing.client-C4QUQdmg.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-QhgIBQbv.mjs → LeafletStaticMap-CwWRk69M.mjs} +1 -1
- package/dist/client/{accordion-DFXpLvwg.mjs → accordion-BA0j8Mpw.mjs} +1 -1
- package/dist/client/{bookingForm-sI05d3lk.mjs → bookingForm-Br2e41H0.mjs} +6 -7
- package/dist/client/bookings.mjs +912 -1906
- package/dist/client/{carousel-wjyWTZCh.mjs → carousel-B4dmwnpD.mjs} +1 -1
- package/dist/client/{cart-DCwdpA4i.mjs → cart-B_ckGW4b.mjs} +3 -3
- package/dist/client/{checkout-DTDW3l0R.mjs → checkout-DAyspHdf.mjs} +3 -3
- package/dist/client/{checkoutUrls-DQYC_Br-.mjs → checkoutUrls-BuseL0dw.mjs} +4 -2
- package/dist/client/client.mjs +5074 -9309
- package/dist/client/{context-TSK1CGx8.mjs → context-DljQn8L5.mjs} +15 -69
- package/dist/client/{eventCalendar-B0Zg-i_w.mjs → eventCalendar-pJu3FUod.mjs} +5 -5
- package/dist/client/{eventCombined-B8Y2wizd.mjs → eventCombined-B6Kacm9F.mjs} +3 -3
- package/dist/client/{eventDetails-DPDOwURJ.mjs → eventDetails-CaX9z1pv.mjs} +8 -8
- package/dist/client/{eventListing-CjBcmSLn.mjs → eventListing-B9aXPO-I.mjs} +3 -3
- package/dist/client/{eventRegistration-CK30HsAq.mjs → eventRegistration-CBSovBkg.mjs} +4522 -3690
- package/dist/client/{form-CUXfsABE.mjs → form-Cm0tu_7o.mjs} +2 -2
- package/dist/client/{headerSection-N-mN3rjr.mjs → headerSection-OgRtHeKS.mjs} +2 -2
- package/dist/client/hooks.mjs +430 -692
- package/dist/client/{locationMap-oiIDQMBt.mjs → locationMap-DmjcYqNM.mjs} +2 -2
- package/dist/client/{newsletterForm-CkQ2tTrM.mjs → newsletterForm-D08OZQAC.mjs} +2 -2
- package/dist/client/{productDetail-CnidyrsN.mjs → productDetail-BqZeu2P4.mjs} +3 -3
- package/dist/client/{productList-CttYcS_S.mjs → productList-mNyIF9FG.mjs} +3 -3
- package/dist/client/{propsDecoder-CeUMxI9a.mjs → propsDecoder-DwHXRm9X.mjs} +4656 -4419
- package/dist/client/rendering/client.mjs +59504 -62158
- package/dist/client/rendering/islands.mjs +17 -19
- package/dist/client/rendering.mjs +5354 -9683
- package/dist/client/{scrollToBlock-lPr1oqxB.mjs → scrollToBlock-DtmdM3v-.mjs} +2 -2
- package/dist/client/{shop-DXQtMo2O.mjs → shop-CNjZK16F.mjs} +6 -6
- package/dist/client/{shop-commerce-quDL411J.mjs → shop-commerce-DkNNao1J.mjs} +6 -6
- package/dist/client/{shop-commerce-store-Dnu-8Iub.mjs → shop-commerce-store-9WA--zuW.mjs} +1 -1
- package/dist/client/{shopShared-BWPUURvG.mjs → shopShared-CHCVfccY.mjs} +3 -3
- package/dist/client/{useEventFilters-DRhWp2_5.mjs → useEventFilters-DvuaB4ZN.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-3GhW4knb.mjs} +2 -2
- package/dist/{separator-CMhj6BTi.mjs → separator-D3bCWYYb.mjs} +1 -1
- package/dist/server/components.mjs +535 -2950
- package/dist/server/config-validation.mjs +430 -692
- package/dist/server/config.mjs +430 -692
- package/dist/server/data.mjs +430 -692
- package/dist/server/index.mjs +41 -162
- package/dist/server/next.mjs +549 -2964
- package/dist/server/page-converter.mjs +331 -560
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +534 -2855
- package/dist/server/rendering.mjs +535 -2950
- package/dist/server/routing.mjs +574 -1065
- package/dist/server/server.mjs +444 -706
- 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,7 +26799,7 @@ 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,
|
|
@@ -26755,8 +26817,8 @@ z.discriminatedUnion("kind", [
|
|
|
26755
26817
|
label: z.string()
|
|
26756
26818
|
}),
|
|
26757
26819
|
z.object({
|
|
26758
|
-
kind: z.literal("
|
|
26759
|
-
display:
|
|
26820
|
+
kind: z.literal("whole_series"),
|
|
26821
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26760
26822
|
})
|
|
26761
26823
|
]);
|
|
26762
26824
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -26858,10 +26920,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
26858
26920
|
})
|
|
26859
26921
|
}),
|
|
26860
26922
|
z.object({
|
|
26861
|
-
kind: z.literal("
|
|
26923
|
+
kind: z.literal("whole_series"),
|
|
26862
26924
|
display: z.object({
|
|
26863
|
-
kind: z.literal("
|
|
26864
|
-
display:
|
|
26925
|
+
kind: z.literal("whole_series"),
|
|
26926
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26865
26927
|
})
|
|
26866
26928
|
}),
|
|
26867
26929
|
z.object({
|
|
@@ -27278,7 +27340,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
27278
27340
|
};
|
|
27279
27341
|
return { kind: "unscoped" };
|
|
27280
27342
|
}
|
|
27281
|
-
function
|
|
27343
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27344
|
+
const scope = resolveEventRegistrationScope(context);
|
|
27282
27345
|
switch (scope.kind) {
|
|
27283
27346
|
case "occurrenceSeries":
|
|
27284
27347
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -27290,9 +27353,6 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
27290
27353
|
case "unscoped": return [...events];
|
|
27291
27354
|
}
|
|
27292
27355
|
}
|
|
27293
|
-
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27294
|
-
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
27295
|
-
}
|
|
27296
27356
|
//#endregion
|
|
27297
27357
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27298
27358
|
function planEventRegistrationScope(input) {
|
|
@@ -27386,14 +27446,14 @@ function isRecord$6(value) {
|
|
|
27386
27446
|
}
|
|
27387
27447
|
function isPublicEventPricing(value) {
|
|
27388
27448
|
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 === "
|
|
27449
|
+
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
27450
|
}
|
|
27391
27451
|
function isPublicEventTicketType(value) {
|
|
27392
27452
|
return isRecord$6(value) && typeof value.id === "string";
|
|
27393
27453
|
}
|
|
27394
27454
|
function readTicketTypePriceDisplay(value, currency) {
|
|
27395
27455
|
const display = readLegacyPriceDisplay(value, currency);
|
|
27396
|
-
return display.kind === "
|
|
27456
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
27397
27457
|
kind: "unavailable",
|
|
27398
27458
|
currency
|
|
27399
27459
|
} : display;
|
|
@@ -27451,11 +27511,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27451
27511
|
kind: "unavailable",
|
|
27452
27512
|
currency: displayCurrency
|
|
27453
27513
|
};
|
|
27454
|
-
case "
|
|
27455
|
-
kind: "
|
|
27514
|
+
case "whole_series": return isRecord$6(value.display) ? {
|
|
27515
|
+
kind: "whole_series",
|
|
27456
27516
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
27457
27517
|
} : {
|
|
27458
|
-
kind: "
|
|
27518
|
+
kind: "whole_series",
|
|
27459
27519
|
display: {
|
|
27460
27520
|
kind: "unavailable",
|
|
27461
27521
|
currency: displayCurrency
|
|
@@ -27581,7 +27641,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
27581
27641
|
//#endregion
|
|
27582
27642
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
27583
27643
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
27584
|
-
return event.
|
|
27644
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
27585
27645
|
}
|
|
27586
27646
|
function findPreSelectedEvent(input) {
|
|
27587
27647
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -27607,12 +27667,127 @@ function toRegistrationEvent(event) {
|
|
|
27607
27667
|
return {
|
|
27608
27668
|
...event,
|
|
27609
27669
|
pricing: resolveRuntimeEventPricing(event),
|
|
27610
|
-
|
|
27611
|
-
|
|
27670
|
+
selectionId: event.id,
|
|
27671
|
+
registrationSubject: {
|
|
27672
|
+
kind: "occurrence",
|
|
27673
|
+
occurrenceId: event.occurrenceId
|
|
27674
|
+
}
|
|
27612
27675
|
};
|
|
27613
27676
|
}
|
|
27614
27677
|
function toRegistrationEvents(events) {
|
|
27615
|
-
return events.map(toRegistrationEvent);
|
|
27678
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
27679
|
+
}
|
|
27680
|
+
function toWholeSeriesTicketType(option) {
|
|
27681
|
+
return {
|
|
27682
|
+
...option,
|
|
27683
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
27684
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
27685
|
+
availability: {
|
|
27686
|
+
kind: "available",
|
|
27687
|
+
remainingCapacity: option.capacityLimit
|
|
27688
|
+
}
|
|
27689
|
+
};
|
|
27690
|
+
}
|
|
27691
|
+
function toWholeSeriesPricing(offering) {
|
|
27692
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
27693
|
+
switch (offering.pricing.pricingStrategy) {
|
|
27694
|
+
case "free": return {
|
|
27695
|
+
kind: "free_registration",
|
|
27696
|
+
currency: offering.currency,
|
|
27697
|
+
display: {
|
|
27698
|
+
kind: "free",
|
|
27699
|
+
currency: offering.currency
|
|
27700
|
+
}
|
|
27701
|
+
};
|
|
27702
|
+
case "single": {
|
|
27703
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
27704
|
+
return amount === 0 ? {
|
|
27705
|
+
kind: "free_registration",
|
|
27706
|
+
currency: offering.currency,
|
|
27707
|
+
display: {
|
|
27708
|
+
kind: "free",
|
|
27709
|
+
currency: offering.currency
|
|
27710
|
+
}
|
|
27711
|
+
} : {
|
|
27712
|
+
kind: "single_paid",
|
|
27713
|
+
amount,
|
|
27714
|
+
currency: offering.currency,
|
|
27715
|
+
display: {
|
|
27716
|
+
kind: "exact",
|
|
27717
|
+
amount,
|
|
27718
|
+
currency: offering.currency
|
|
27719
|
+
}
|
|
27720
|
+
};
|
|
27721
|
+
}
|
|
27722
|
+
case "tiered": return {
|
|
27723
|
+
kind: "ticket_types",
|
|
27724
|
+
currency: offering.currency,
|
|
27725
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
27726
|
+
display: resolved.display
|
|
27727
|
+
};
|
|
27728
|
+
case "sliding_scale": return {
|
|
27729
|
+
kind: "sliding_scale",
|
|
27730
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27731
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27732
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
27733
|
+
currency: offering.currency,
|
|
27734
|
+
display: {
|
|
27735
|
+
kind: "range",
|
|
27736
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27737
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27738
|
+
currency: offering.currency
|
|
27739
|
+
}
|
|
27740
|
+
};
|
|
27741
|
+
}
|
|
27742
|
+
}
|
|
27743
|
+
function toAttendanceModes(offering) {
|
|
27744
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
27745
|
+
mode,
|
|
27746
|
+
capacity: offering.enrollmentCapacity,
|
|
27747
|
+
registeredCount: offering.enrolledCount,
|
|
27748
|
+
availableSpots: offering.availableSpots,
|
|
27749
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
27750
|
+
}));
|
|
27751
|
+
}
|
|
27752
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
27753
|
+
const firstSession = offering.sessions[0];
|
|
27754
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
27755
|
+
return {
|
|
27756
|
+
selectionId: offering.eventSeriesId,
|
|
27757
|
+
registrationSubject: {
|
|
27758
|
+
kind: "wholeSeries",
|
|
27759
|
+
eventSeriesId: offering.eventSeriesId,
|
|
27760
|
+
sessions: offering.sessions
|
|
27761
|
+
},
|
|
27762
|
+
seriesId: offering.eventSeriesId,
|
|
27763
|
+
title: offering.title,
|
|
27764
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
27765
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
27766
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
27767
|
+
kind: "closed",
|
|
27768
|
+
reason: "enrollment_closed"
|
|
27769
|
+
},
|
|
27770
|
+
deliveryMode: offering.deliveryMode,
|
|
27771
|
+
attendanceModes: toAttendanceModes(offering),
|
|
27772
|
+
capacity: offering.enrollmentCapacity,
|
|
27773
|
+
registeredCount: offering.enrolledCount,
|
|
27774
|
+
availableSpots: offering.availableSpots,
|
|
27775
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
27776
|
+
venue: offering.venue ? {
|
|
27777
|
+
...offering.venue,
|
|
27778
|
+
location: null
|
|
27779
|
+
} : null,
|
|
27780
|
+
eventCategory: null,
|
|
27781
|
+
teamMembers: offering.teamMembers,
|
|
27782
|
+
status: offering.status,
|
|
27783
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
27784
|
+
pricing: toWholeSeriesPricing(offering),
|
|
27785
|
+
paymentTerms: offering.paymentTerms,
|
|
27786
|
+
consent: offering.consent,
|
|
27787
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
27788
|
+
acceptsPasses: false,
|
|
27789
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
27790
|
+
};
|
|
27616
27791
|
}
|
|
27617
27792
|
//#endregion
|
|
27618
27793
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -27638,11 +27813,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
27638
27813
|
maxTickets: z.string().optional(),
|
|
27639
27814
|
showVenue: z.boolean().optional(),
|
|
27640
27815
|
showCapacity: z.boolean().optional(),
|
|
27641
|
-
showSessions: z.boolean().optional(),
|
|
27642
|
-
showPrice: z.boolean().optional(),
|
|
27643
27816
|
successMessage: z.string().optional(),
|
|
27644
|
-
waitlistMessage: z.string().optional(),
|
|
27645
|
-
membershipMessage: z.string().optional(),
|
|
27646
27817
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27647
27818
|
overlayEnabled: z.boolean().optional(),
|
|
27648
27819
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -27712,6 +27883,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
27712
27883
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27713
27884
|
}
|
|
27714
27885
|
function buildEventRegistrationShellStepLabels(source) {
|
|
27886
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
27887
|
+
if (selectedOffering) {
|
|
27888
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
27889
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
27890
|
+
eligibility: null,
|
|
27891
|
+
selectedTicketType: null,
|
|
27892
|
+
event: selectedEvent
|
|
27893
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
27894
|
+
}
|
|
27715
27895
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
27716
27896
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
27717
27897
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -27775,11 +27955,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27775
27955
|
maxTickets: source.maxTickets ?? void 0,
|
|
27776
27956
|
showVenue: source.showVenue,
|
|
27777
27957
|
showCapacity: source.showCapacity,
|
|
27778
|
-
showSessions: source.showSessions,
|
|
27779
|
-
showPrice: source.showPrice,
|
|
27780
27958
|
successMessage: source.successMessage,
|
|
27781
|
-
waitlistMessage: source.waitlistMessage,
|
|
27782
|
-
membershipMessage: source.membershipMessage,
|
|
27783
27959
|
buttonVariant: source.buttonVariant,
|
|
27784
27960
|
overlayEnabled: source.overlayEnabled,
|
|
27785
27961
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -27895,24 +28071,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27895
28071
|
defaultValue: true,
|
|
27896
28072
|
ui: { intent: "display" }
|
|
27897
28073
|
},
|
|
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
28074
|
{
|
|
27917
28075
|
id: "successMessage",
|
|
27918
28076
|
type: "text",
|
|
@@ -27923,26 +28081,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27923
28081
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
27924
28082
|
maxLength: 500
|
|
27925
28083
|
},
|
|
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
28084
|
{
|
|
27947
28085
|
id: "buttonText",
|
|
27948
28086
|
type: "text",
|
|
@@ -27974,11 +28112,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
27974
28112
|
} },
|
|
27975
28113
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
27976
28114
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
27977
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
27978
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
27979
28115
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
27980
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
27981
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
27982
28116
|
buttonText: { $bind: {
|
|
27983
28117
|
from: "content.buttonText",
|
|
27984
28118
|
fallback: "Complete Registration"
|
|
@@ -28095,254 +28229,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
28095
28229
|
}
|
|
28096
28230
|
};
|
|
28097
28231
|
//#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
28232
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
28347
28233
|
/**
|
|
28348
28234
|
* Event Details Block
|
|
@@ -28589,200 +28475,6 @@ const eventDetailsBlockDefinition = {
|
|
|
28589
28475
|
mode: "server"
|
|
28590
28476
|
} }
|
|
28591
28477
|
};
|
|
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
28478
|
const eventSpotlightBlockDefinition = {
|
|
28787
28479
|
manifest: createBlockManifest({
|
|
28788
28480
|
id: "block.event-spotlight",
|
|
@@ -31446,7 +31138,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
31446
31138
|
fallback: "published"
|
|
31447
31139
|
} },
|
|
31448
31140
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
31449
|
-
|
|
31141
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
31450
31142
|
...offeringsPreviewEventDataBindings
|
|
31451
31143
|
})
|
|
31452
31144
|
], { gap: "lg" }),
|
|
@@ -31463,7 +31155,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31463
31155
|
dataSchemas: {
|
|
31464
31156
|
...offeringsPreviewEventDataSchemas,
|
|
31465
31157
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
31466
|
-
|
|
31158
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
31467
31159
|
},
|
|
31468
31160
|
dataLoaders: {
|
|
31469
31161
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31472,7 +31164,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31472
31164
|
params: {},
|
|
31473
31165
|
mode: "server"
|
|
31474
31166
|
},
|
|
31475
|
-
|
|
31167
|
+
wholeSeriesOfferings: {
|
|
31476
31168
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
31477
31169
|
params: {
|
|
31478
31170
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -36439,22 +36131,6 @@ const systemBlockDefinitions = [
|
|
|
36439
36131
|
weight: "standard"
|
|
36440
36132
|
})]
|
|
36441
36133
|
})),
|
|
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
36134
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
36459
36135
|
flow: offeringsFlow,
|
|
36460
36136
|
layoutProfiles: [layoutProfile({
|
|
@@ -38513,6 +38189,68 @@ function parsePublicProductCategorySelector(value) {
|
|
|
38513
38189
|
};
|
|
38514
38190
|
}
|
|
38515
38191
|
//#endregion
|
|
38192
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
38193
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
38194
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
38195
|
+
z.object({
|
|
38196
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
38197
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
38198
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
38199
|
+
remainderDueCount: z.number().int().positive(),
|
|
38200
|
+
intervalUnit: z.enum([
|
|
38201
|
+
"day",
|
|
38202
|
+
"week",
|
|
38203
|
+
"month"
|
|
38204
|
+
])
|
|
38205
|
+
}),
|
|
38206
|
+
z.object({
|
|
38207
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
38208
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
38209
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
38210
|
+
instalmentCount: z.number().int().positive(),
|
|
38211
|
+
intervalCount: z.number().int().positive(),
|
|
38212
|
+
intervalUnit: z.enum([
|
|
38213
|
+
"day",
|
|
38214
|
+
"week",
|
|
38215
|
+
"month"
|
|
38216
|
+
])
|
|
38217
|
+
}),
|
|
38218
|
+
z.object({
|
|
38219
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
38220
|
+
instalmentCount: z.number().int().positive(),
|
|
38221
|
+
intervalCount: z.number().int().positive(),
|
|
38222
|
+
intervalUnit: z.enum([
|
|
38223
|
+
"day",
|
|
38224
|
+
"week",
|
|
38225
|
+
"month"
|
|
38226
|
+
])
|
|
38227
|
+
})
|
|
38228
|
+
]);
|
|
38229
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
38230
|
+
kind: z.literal("relative_to_start_date"),
|
|
38231
|
+
daysBeforeStart: z.number().int().positive()
|
|
38232
|
+
}), z.object({
|
|
38233
|
+
kind: z.literal("fixed_calendar_date"),
|
|
38234
|
+
dueAt: z.string().datetime()
|
|
38235
|
+
})]);
|
|
38236
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
38237
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
38238
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
38239
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
38240
|
+
});
|
|
38241
|
+
z.discriminatedUnion("kind", [
|
|
38242
|
+
z.object({ kind: z.literal("upfront") }),
|
|
38243
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
38244
|
+
z.object({
|
|
38245
|
+
kind: z.literal("instalment_plan"),
|
|
38246
|
+
plan: bookingInstalmentPlanSchema
|
|
38247
|
+
}),
|
|
38248
|
+
z.object({
|
|
38249
|
+
kind: z.literal("flexible_balance"),
|
|
38250
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
38251
|
+
})
|
|
38252
|
+
]);
|
|
38253
|
+
//#endregion
|
|
38516
38254
|
//#region ../api/src/aiPlayground.ts
|
|
38517
38255
|
/**
|
|
38518
38256
|
* RFC-6902 JSON Patch Operations
|