@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/server.mjs
CHANGED
|
@@ -804,69 +804,8 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
804
804
|
}
|
|
805
805
|
});
|
|
806
806
|
//#endregion
|
|
807
|
-
//#region ../api/src/
|
|
808
|
-
const
|
|
809
|
-
listCourses: {
|
|
810
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
811
|
-
method: "GET",
|
|
812
|
-
auth: "user",
|
|
813
|
-
responseKind: "json"
|
|
814
|
-
},
|
|
815
|
-
exportCoursesCsv: {
|
|
816
|
-
path: "/sites/{siteId}/bookings/courses/export.csv",
|
|
817
|
-
method: "GET",
|
|
818
|
-
tags: [
|
|
819
|
-
"site-{siteId}",
|
|
820
|
-
"bookings",
|
|
821
|
-
"courses-{siteId}"
|
|
822
|
-
],
|
|
823
|
-
errors: [],
|
|
824
|
-
auth: "user",
|
|
825
|
-
responseKind: "blob"
|
|
826
|
-
},
|
|
827
|
-
createCourse: {
|
|
828
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
829
|
-
method: "POST",
|
|
830
|
-
auth: "user",
|
|
831
|
-
responseKind: "json",
|
|
832
|
-
errors: [
|
|
833
|
-
"validation:invalid_input",
|
|
834
|
-
"resource:not_found",
|
|
835
|
-
"resource:already_exists",
|
|
836
|
-
"resource:conflict",
|
|
837
|
-
"server:internal_error"
|
|
838
|
-
]
|
|
839
|
-
},
|
|
840
|
-
getCourse: {
|
|
841
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
842
|
-
method: "GET",
|
|
843
|
-
auth: "user",
|
|
844
|
-
responseKind: "json"
|
|
845
|
-
},
|
|
846
|
-
updateCourse: {
|
|
847
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
848
|
-
method: "PATCH",
|
|
849
|
-
auth: "user",
|
|
850
|
-
responseKind: "json",
|
|
851
|
-
errors: [
|
|
852
|
-
"validation:invalid_input",
|
|
853
|
-
"resource:not_found",
|
|
854
|
-
"resource:conflict",
|
|
855
|
-
"server:internal_error"
|
|
856
|
-
]
|
|
857
|
-
},
|
|
858
|
-
deleteCourse: {
|
|
859
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
860
|
-
method: "DELETE",
|
|
861
|
-
auth: "user",
|
|
862
|
-
responseKind: "json",
|
|
863
|
-
errors: [
|
|
864
|
-
"validation:invalid_input",
|
|
865
|
-
"resource:not_found",
|
|
866
|
-
"resource:conflict",
|
|
867
|
-
"server:internal_error"
|
|
868
|
-
]
|
|
869
|
-
},
|
|
807
|
+
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
808
|
+
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
870
809
|
deleteEventOffering: {
|
|
871
810
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
872
811
|
method: "DELETE",
|
|
@@ -879,20 +818,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
879
818
|
"server:internal_error"
|
|
880
819
|
]
|
|
881
820
|
},
|
|
882
|
-
|
|
883
|
-
path: "/sites/{siteId}/bookings/
|
|
884
|
-
method: "POST",
|
|
885
|
-
auth: "user",
|
|
886
|
-
responseKind: "json",
|
|
887
|
-
errors: [
|
|
888
|
-
"validation:invalid_input",
|
|
889
|
-
"resource:not_found",
|
|
890
|
-
"resource:already_exists",
|
|
891
|
-
"server:internal_error"
|
|
892
|
-
]
|
|
893
|
-
},
|
|
894
|
-
changeCourseContentOwnership: {
|
|
895
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/content-ownership",
|
|
821
|
+
changeEventSeriesContentOwnership: {
|
|
822
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/content-ownership",
|
|
896
823
|
method: "POST",
|
|
897
824
|
auth: "user",
|
|
898
825
|
responseKind: "json",
|
|
@@ -903,8 +830,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
903
830
|
"server:internal_error"
|
|
904
831
|
]
|
|
905
832
|
},
|
|
906
|
-
|
|
907
|
-
path: "/sites/{siteId}/bookings/
|
|
833
|
+
addEventSeriesRegistration: {
|
|
834
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
908
835
|
method: "POST",
|
|
909
836
|
auth: "user",
|
|
910
837
|
responseKind: "json",
|
|
@@ -915,33 +842,21 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
915
842
|
"server:internal_error"
|
|
916
843
|
]
|
|
917
844
|
},
|
|
918
|
-
|
|
919
|
-
path: "/sites/{siteId}/bookings/
|
|
845
|
+
listEventSeriesRegistrations: {
|
|
846
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
920
847
|
method: "GET",
|
|
921
848
|
auth: "user",
|
|
922
849
|
responseKind: "json"
|
|
923
850
|
},
|
|
924
|
-
|
|
925
|
-
path: "/sites/{siteId}/bookings/
|
|
851
|
+
exportEventSeriesRegistrationsCsv: {
|
|
852
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/export.csv",
|
|
926
853
|
method: "GET",
|
|
927
854
|
auth: "user",
|
|
928
855
|
errors: [],
|
|
929
856
|
responseKind: "blob"
|
|
930
857
|
},
|
|
931
|
-
|
|
932
|
-
path: "/sites/{siteId}/bookings/
|
|
933
|
-
method: "GET",
|
|
934
|
-
tags: [
|
|
935
|
-
"site-{siteId}",
|
|
936
|
-
"bookings",
|
|
937
|
-
"courses-{courseId}"
|
|
938
|
-
],
|
|
939
|
-
auth: "user",
|
|
940
|
-
responseKind: "blob",
|
|
941
|
-
errors: []
|
|
942
|
-
},
|
|
943
|
-
updateCourseEnrollment: {
|
|
944
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/enrollments/{enrollmentId}",
|
|
858
|
+
updateEventSeriesRegistration: {
|
|
859
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
945
860
|
method: "PATCH",
|
|
946
861
|
auth: "user",
|
|
947
862
|
responseKind: "json",
|
|
@@ -1329,71 +1244,35 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1329
1244
|
errors: ["resource:not_found", "server:internal_error"],
|
|
1330
1245
|
auth: "public",
|
|
1331
1246
|
responseKind: "json"
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
"auth:forbidden",
|
|
1340
|
-
"validation:invalid_input",
|
|
1341
|
-
"resource:not_found",
|
|
1342
|
-
"resource:conflict",
|
|
1343
|
-
"resource:already_exists",
|
|
1344
|
-
"server:internal_error"
|
|
1345
|
-
],
|
|
1346
|
-
auth: "public",
|
|
1347
|
-
responseKind: "json"
|
|
1348
|
-
},
|
|
1349
|
-
checkWholeSeriesEligibility: {
|
|
1350
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/check-eligibility",
|
|
1351
|
-
method: "POST",
|
|
1352
|
-
tags: [TAG_TEMPLATES.publicWholeSeriesOfferings, "course-enrollment"],
|
|
1353
|
-
errors: [
|
|
1354
|
-
"auth:unauthenticated",
|
|
1355
|
-
"resource:not_found",
|
|
1356
|
-
"resource:conflict",
|
|
1357
|
-
"server:internal_error"
|
|
1358
|
-
],
|
|
1359
|
-
auth: "public",
|
|
1360
|
-
responseKind: "json"
|
|
1361
|
-
},
|
|
1362
|
-
createWholeSeriesCheckout: {
|
|
1363
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1249
|
+
//#endregion
|
|
1250
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1251
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1252
|
+
getPublicEventRegistrationOptions: {
|
|
1253
|
+
path: "/public/sites/{siteId}/events/registration-options",
|
|
1364
1254
|
method: "POST",
|
|
1365
|
-
tags: [TAG_TEMPLATES.
|
|
1255
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration-options"],
|
|
1366
1256
|
auth: "public",
|
|
1367
1257
|
responseKind: "json",
|
|
1368
1258
|
errors: [
|
|
1369
|
-
"auth:unauthenticated",
|
|
1370
1259
|
"validation:invalid_input",
|
|
1371
1260
|
"resource:not_found",
|
|
1372
1261
|
"resource:conflict",
|
|
1373
1262
|
"server:internal_error"
|
|
1374
1263
|
]
|
|
1375
1264
|
},
|
|
1376
|
-
|
|
1377
|
-
path: "/public/sites/{siteId}/
|
|
1265
|
+
resolveEventSubroute: {
|
|
1266
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1378
1267
|
method: "GET",
|
|
1379
|
-
|
|
1380
|
-
|
|
1268
|
+
revalidate: 60,
|
|
1269
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1381
1270
|
auth: "public",
|
|
1382
|
-
responseKind: "json"
|
|
1271
|
+
responseKind: "json",
|
|
1272
|
+
errors: []
|
|
1383
1273
|
}
|
|
1384
1274
|
});
|
|
1385
1275
|
//#endregion
|
|
1386
|
-
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1387
|
-
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1388
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1389
|
-
method: "GET",
|
|
1390
|
-
revalidate: 60,
|
|
1391
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1392
|
-
auth: "public",
|
|
1393
|
-
responseKind: "json",
|
|
1394
|
-
errors: []
|
|
1395
|
-
} });
|
|
1396
|
-
//#endregion
|
|
1397
1276
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1398
1277
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1399
1278
|
listSiteApiKeys: {
|
|
@@ -2290,7 +2169,7 @@ const API_ENDPOINTS$1 = {
|
|
|
2290
2169
|
},
|
|
2291
2170
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
2292
2171
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
2293
|
-
...
|
|
2172
|
+
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS,
|
|
2294
2173
|
getSite: {
|
|
2295
2174
|
path: "/sites",
|
|
2296
2175
|
method: "GET",
|
|
@@ -5604,13 +5483,13 @@ const API_ENDPOINTS$1 = {
|
|
|
5604
5483
|
"server:internal_error"
|
|
5605
5484
|
]
|
|
5606
5485
|
},
|
|
5607
|
-
|
|
5608
|
-
path: "/sites/{siteId}/bookings/
|
|
5486
|
+
refundEventSeriesRegistration: {
|
|
5487
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/refund",
|
|
5609
5488
|
method: "POST",
|
|
5610
5489
|
tags: [
|
|
5611
5490
|
"site-{siteId}",
|
|
5612
|
-
"
|
|
5613
|
-
"
|
|
5491
|
+
"event-series-{seriesId}",
|
|
5492
|
+
"event-series-registration-{registrationId}",
|
|
5614
5493
|
"bookings"
|
|
5615
5494
|
],
|
|
5616
5495
|
auth: "user",
|
|
@@ -5633,13 +5512,13 @@ const API_ENDPOINTS$1 = {
|
|
|
5633
5512
|
auth: "user",
|
|
5634
5513
|
responseKind: "json"
|
|
5635
5514
|
},
|
|
5636
|
-
|
|
5637
|
-
path: "/sites/{siteId}/bookings/
|
|
5515
|
+
listEventSeriesRegistrationRefunds: {
|
|
5516
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/refunds",
|
|
5638
5517
|
method: "GET",
|
|
5639
5518
|
tags: [
|
|
5640
5519
|
"site-{siteId}",
|
|
5641
|
-
"
|
|
5642
|
-
"
|
|
5520
|
+
"event-series-{seriesId}",
|
|
5521
|
+
"event-series-registration-{registrationId}",
|
|
5643
5522
|
"bookings"
|
|
5644
5523
|
],
|
|
5645
5524
|
auth: "user",
|
|
@@ -7328,14 +7207,14 @@ const API_ENDPOINTS$1 = {
|
|
|
7328
7207
|
errors: ["server:internal_error"]
|
|
7329
7208
|
},
|
|
7330
7209
|
portalGetWholeSeriesBookingQuestions: {
|
|
7331
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7210
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions",
|
|
7332
7211
|
method: "GET",
|
|
7333
7212
|
auth: "public",
|
|
7334
7213
|
responseKind: "json",
|
|
7335
7214
|
errors: ["resource:not_found", "server:internal_error"]
|
|
7336
7215
|
},
|
|
7337
7216
|
portalUpdateWholeSeriesBookingQuestions: {
|
|
7338
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7217
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions",
|
|
7339
7218
|
method: "PUT",
|
|
7340
7219
|
auth: "public",
|
|
7341
7220
|
responseKind: "json",
|
|
@@ -7346,7 +7225,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7346
7225
|
]
|
|
7347
7226
|
},
|
|
7348
7227
|
portalCreateWholeSeriesBookingQuestionsUploadUrl: {
|
|
7349
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7228
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions/upload-url",
|
|
7350
7229
|
method: "POST",
|
|
7351
7230
|
auth: "public",
|
|
7352
7231
|
responseKind: "json",
|
|
@@ -7357,7 +7236,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7357
7236
|
]
|
|
7358
7237
|
},
|
|
7359
7238
|
portalFinalizeWholeSeriesBookingQuestionsUpload: {
|
|
7360
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7239
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions/upload",
|
|
7361
7240
|
method: "POST",
|
|
7362
7241
|
auth: "public",
|
|
7363
7242
|
responseKind: "json",
|
|
@@ -7368,7 +7247,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7368
7247
|
]
|
|
7369
7248
|
},
|
|
7370
7249
|
portalCancelWholeSeriesRegistration: {
|
|
7371
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7250
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/cancel",
|
|
7372
7251
|
method: "POST",
|
|
7373
7252
|
auth: "public",
|
|
7374
7253
|
responseKind: "json",
|
|
@@ -8196,7 +8075,7 @@ var SimpleCache = class {
|
|
|
8196
8075
|
* 1. This constant
|
|
8197
8076
|
* 2. The "version" field in package.json
|
|
8198
8077
|
*/
|
|
8199
|
-
const SDK_VERSION = "0.
|
|
8078
|
+
const SDK_VERSION = "0.135.0";
|
|
8200
8079
|
//#endregion
|
|
8201
8080
|
//#region src/client/error.ts
|
|
8202
8081
|
let _Symbol$for;
|
|
@@ -10795,14 +10674,14 @@ function publicEventPricingType(pricing) {
|
|
|
10795
10674
|
case "single_paid":
|
|
10796
10675
|
case "ticket_types":
|
|
10797
10676
|
case "sliding_scale":
|
|
10798
|
-
case "
|
|
10677
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
10799
10678
|
case "external": return "external";
|
|
10800
10679
|
}
|
|
10801
10680
|
}
|
|
10802
10681
|
function isFreePublicEventPriceDisplay(display) {
|
|
10803
10682
|
switch (display.kind) {
|
|
10804
10683
|
case "free": return true;
|
|
10805
|
-
case "
|
|
10684
|
+
case "whole_series": return display.display.kind === "free";
|
|
10806
10685
|
case "exact":
|
|
10807
10686
|
case "from":
|
|
10808
10687
|
case "range":
|
|
@@ -11091,6 +10970,25 @@ function parseManagementKey(raw) {
|
|
|
11091
10970
|
return ok$1(createSecretInternal("management-key", raw));
|
|
11092
10971
|
}
|
|
11093
10972
|
//#endregion
|
|
10973
|
+
//#region ../core/src/planner.ts
|
|
10974
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
10975
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
10976
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
10977
|
+
function resolvePlanningNowDate(input = {}) {
|
|
10978
|
+
if (input.now !== void 0) return input.now;
|
|
10979
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
10980
|
+
}
|
|
10981
|
+
/**
|
|
10982
|
+
* Resolve a Date-compatible planner input.
|
|
10983
|
+
*
|
|
10984
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
10985
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
10986
|
+
*/
|
|
10987
|
+
function resolvePlanningDateInput(input = {}) {
|
|
10988
|
+
if (input instanceof Date) return input;
|
|
10989
|
+
return resolvePlanningNowDate(input);
|
|
10990
|
+
}
|
|
10991
|
+
//#endregion
|
|
11094
10992
|
//#region ../core/src/event-series-behaviour.ts
|
|
11095
10993
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
11096
10994
|
"class",
|
|
@@ -19550,7 +19448,7 @@ defineBlockAppearancePreset({
|
|
|
19550
19448
|
id: "schedule-details-brand-depth",
|
|
19551
19449
|
target: "events",
|
|
19552
19450
|
label: "Brand-depth schedule details",
|
|
19553
|
-
blockKinds: ["block.event-details"
|
|
19451
|
+
blockKinds: ["block.event-details"],
|
|
19554
19452
|
design: {
|
|
19555
19453
|
sectionSurface: "brand-depth-band",
|
|
19556
19454
|
contentFrame: plainFrame,
|
|
@@ -25732,7 +25630,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
25732
25630
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
25733
25631
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
25734
25632
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
25735
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
25736
25633
|
function bind(from, options) {
|
|
25737
25634
|
return (node) => ({
|
|
25738
25635
|
...node,
|
|
@@ -35402,12 +35299,12 @@ function isRichTextDoc(value) {
|
|
|
35402
35299
|
}
|
|
35403
35300
|
//#endregion
|
|
35404
35301
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
35405
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
35406
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
35302
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
35303
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
35407
35304
|
z.object({
|
|
35408
35305
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
35409
35306
|
depositAmountCents: z.number().int().min(0),
|
|
35410
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
35307
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
35411
35308
|
remainderDueCount: z.number().int().positive(),
|
|
35412
35309
|
intervalUnit: z.enum([
|
|
35413
35310
|
"day",
|
|
@@ -35418,7 +35315,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
35418
35315
|
z.object({
|
|
35419
35316
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
35420
35317
|
depositAmountCents: z.number().int().min(0),
|
|
35421
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
35318
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
35422
35319
|
instalmentCount: z.number().int().positive(),
|
|
35423
35320
|
intervalCount: z.number().int().positive(),
|
|
35424
35321
|
intervalUnit: z.enum([
|
|
@@ -35438,28 +35335,28 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
35438
35335
|
])
|
|
35439
35336
|
})
|
|
35440
35337
|
]);
|
|
35441
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
35338
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
35442
35339
|
kind: z.literal("relative_to_start_date"),
|
|
35443
35340
|
daysBeforeStart: z.number().int().positive()
|
|
35444
35341
|
}), z.object({
|
|
35445
35342
|
kind: z.literal("fixed_calendar_date"),
|
|
35446
35343
|
dueAt: z.string().datetime()
|
|
35447
35344
|
})]);
|
|
35448
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
35345
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
35449
35346
|
upfrontAmountCents: z.number().int().min(0),
|
|
35450
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
35451
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
35347
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
35348
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
35452
35349
|
});
|
|
35453
35350
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
35454
35351
|
z.object({ kind: z.literal("upfront") }),
|
|
35455
35352
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
35456
35353
|
z.object({
|
|
35457
35354
|
kind: z.literal("instalment_plan"),
|
|
35458
|
-
plan: bookingInstalmentPlanSchema
|
|
35355
|
+
plan: bookingInstalmentPlanSchema$1
|
|
35459
35356
|
}),
|
|
35460
35357
|
z.object({
|
|
35461
35358
|
kind: z.literal("flexible_balance"),
|
|
35462
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
35359
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
35463
35360
|
})
|
|
35464
35361
|
]);
|
|
35465
35362
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
@@ -35481,6 +35378,164 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
35481
35378
|
});
|
|
35482
35379
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
35483
35380
|
//#endregion
|
|
35381
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
35382
|
+
function isSaleWindowOpen(option, now) {
|
|
35383
|
+
if (!option.isActive) return false;
|
|
35384
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
35385
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
35386
|
+
return true;
|
|
35387
|
+
}
|
|
35388
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
35389
|
+
if (amount <= 0) return {
|
|
35390
|
+
kind: "free",
|
|
35391
|
+
currency
|
|
35392
|
+
};
|
|
35393
|
+
return {
|
|
35394
|
+
kind: "exact",
|
|
35395
|
+
amount,
|
|
35396
|
+
currency
|
|
35397
|
+
};
|
|
35398
|
+
}
|
|
35399
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
35400
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
35401
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
35402
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
35403
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
35404
|
+
return left.name.localeCompare(right.name);
|
|
35405
|
+
});
|
|
35406
|
+
}
|
|
35407
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
35408
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
35409
|
+
const currency = offering.pricing.currency;
|
|
35410
|
+
switch (offering.pricing.pricingStrategy) {
|
|
35411
|
+
case "free": return resolveFreePricing(currency);
|
|
35412
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
35413
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
35414
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
35415
|
+
}
|
|
35416
|
+
}
|
|
35417
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
35418
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
35419
|
+
selectedSlidingAmount: null,
|
|
35420
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
35421
|
+
} : {
|
|
35422
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
35423
|
+
nowInput
|
|
35424
|
+
};
|
|
35425
|
+
}
|
|
35426
|
+
function resolveFreePricing(currency) {
|
|
35427
|
+
return {
|
|
35428
|
+
currency,
|
|
35429
|
+
display: {
|
|
35430
|
+
kind: "free",
|
|
35431
|
+
currency
|
|
35432
|
+
},
|
|
35433
|
+
selectableOptions: [],
|
|
35434
|
+
requiresSelection: false,
|
|
35435
|
+
selectedOption: null,
|
|
35436
|
+
slidingScale: null,
|
|
35437
|
+
selectedSlidingAmount: null,
|
|
35438
|
+
selectedPriceAmount: 0,
|
|
35439
|
+
selectedRequiresPayment: false,
|
|
35440
|
+
hasPaidSelection: false,
|
|
35441
|
+
hasFreeSelection: true
|
|
35442
|
+
};
|
|
35443
|
+
}
|
|
35444
|
+
function resolveSinglePricing(amount, currency) {
|
|
35445
|
+
return {
|
|
35446
|
+
currency,
|
|
35447
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
35448
|
+
selectableOptions: [],
|
|
35449
|
+
requiresSelection: false,
|
|
35450
|
+
selectedOption: null,
|
|
35451
|
+
slidingScale: null,
|
|
35452
|
+
selectedSlidingAmount: null,
|
|
35453
|
+
selectedPriceAmount: amount,
|
|
35454
|
+
selectedRequiresPayment: amount > 0,
|
|
35455
|
+
hasPaidSelection: amount > 0,
|
|
35456
|
+
hasFreeSelection: amount <= 0
|
|
35457
|
+
};
|
|
35458
|
+
}
|
|
35459
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
35460
|
+
const currency = offering.pricing.currency;
|
|
35461
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
35462
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
35463
|
+
return {
|
|
35464
|
+
currency,
|
|
35465
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
35466
|
+
selectableOptions,
|
|
35467
|
+
requiresSelection: selectableOptions.length > 1,
|
|
35468
|
+
selectedOption,
|
|
35469
|
+
slidingScale: null,
|
|
35470
|
+
selectedSlidingAmount: null,
|
|
35471
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
35472
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
35473
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
35474
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
35475
|
+
};
|
|
35476
|
+
}
|
|
35477
|
+
function resolveSelectedTier(options, selectedId) {
|
|
35478
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
35479
|
+
}
|
|
35480
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
35481
|
+
if (lowestAmount === null) return {
|
|
35482
|
+
kind: "unavailable",
|
|
35483
|
+
currency
|
|
35484
|
+
};
|
|
35485
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
35486
|
+
kind: "from",
|
|
35487
|
+
amount: lowestAmount,
|
|
35488
|
+
currency
|
|
35489
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
35490
|
+
}
|
|
35491
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
35492
|
+
const currency = offering.pricing.currency;
|
|
35493
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
35494
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
35495
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
35496
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
35497
|
+
return {
|
|
35498
|
+
currency,
|
|
35499
|
+
display: {
|
|
35500
|
+
kind: "range",
|
|
35501
|
+
minAmount,
|
|
35502
|
+
maxAmount,
|
|
35503
|
+
currency
|
|
35504
|
+
},
|
|
35505
|
+
selectableOptions: [],
|
|
35506
|
+
requiresSelection: selectedAmount === null,
|
|
35507
|
+
selectedOption: null,
|
|
35508
|
+
slidingScale: {
|
|
35509
|
+
minAmount,
|
|
35510
|
+
maxAmount,
|
|
35511
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
35512
|
+
},
|
|
35513
|
+
selectedSlidingAmount: selectedAmount,
|
|
35514
|
+
selectedPriceAmount: selectedAmount,
|
|
35515
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
35516
|
+
hasPaidSelection: maxAmount > 0,
|
|
35517
|
+
hasFreeSelection: minAmount === 0
|
|
35518
|
+
};
|
|
35519
|
+
}
|
|
35520
|
+
function unavailableSlidingScale(currency) {
|
|
35521
|
+
return {
|
|
35522
|
+
currency,
|
|
35523
|
+
display: {
|
|
35524
|
+
kind: "unavailable",
|
|
35525
|
+
currency
|
|
35526
|
+
},
|
|
35527
|
+
selectableOptions: [],
|
|
35528
|
+
requiresSelection: true,
|
|
35529
|
+
selectedOption: null,
|
|
35530
|
+
slidingScale: null,
|
|
35531
|
+
selectedSlidingAmount: null,
|
|
35532
|
+
selectedPriceAmount: null,
|
|
35533
|
+
selectedRequiresPayment: false,
|
|
35534
|
+
hasPaidSelection: false,
|
|
35535
|
+
hasFreeSelection: false
|
|
35536
|
+
};
|
|
35537
|
+
}
|
|
35538
|
+
//#endregion
|
|
35484
35539
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
35485
35540
|
const wholeSeriesVenueSchema = z.object({
|
|
35486
35541
|
id: z.string(),
|
|
@@ -35540,6 +35595,13 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
35540
35595
|
title: z.string(),
|
|
35541
35596
|
slug: z.string(),
|
|
35542
35597
|
description: z.unknown().nullable(),
|
|
35598
|
+
deliveryMode: z.enum([
|
|
35599
|
+
"in_person",
|
|
35600
|
+
"online",
|
|
35601
|
+
"hybrid"
|
|
35602
|
+
]),
|
|
35603
|
+
waitlistEnabled: z.boolean(),
|
|
35604
|
+
requireGuestDetails: z.boolean(),
|
|
35543
35605
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
35544
35606
|
enrollmentOpen: z.boolean(),
|
|
35545
35607
|
pricing: wholeSeriesPricingSchema,
|
|
@@ -35655,7 +35717,7 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
35655
35717
|
paidToAmount: z.number(),
|
|
35656
35718
|
currency: z.string()
|
|
35657
35719
|
});
|
|
35658
|
-
const
|
|
35720
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
35659
35721
|
freePriceDisplaySchema,
|
|
35660
35722
|
exactPriceDisplaySchema,
|
|
35661
35723
|
fromPriceDisplaySchema,
|
|
@@ -35673,8 +35735,8 @@ z.discriminatedUnion("kind", [
|
|
|
35673
35735
|
label: z.string()
|
|
35674
35736
|
}),
|
|
35675
35737
|
z.object({
|
|
35676
|
-
kind: z.literal("
|
|
35677
|
-
display:
|
|
35738
|
+
kind: z.literal("whole_series"),
|
|
35739
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
35678
35740
|
})
|
|
35679
35741
|
]);
|
|
35680
35742
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -35776,10 +35838,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
35776
35838
|
})
|
|
35777
35839
|
}),
|
|
35778
35840
|
z.object({
|
|
35779
|
-
kind: z.literal("
|
|
35841
|
+
kind: z.literal("whole_series"),
|
|
35780
35842
|
display: z.object({
|
|
35781
|
-
kind: z.literal("
|
|
35782
|
-
display:
|
|
35843
|
+
kind: z.literal("whole_series"),
|
|
35844
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
35783
35845
|
})
|
|
35784
35846
|
}),
|
|
35785
35847
|
z.object({
|
|
@@ -36196,7 +36258,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
36196
36258
|
};
|
|
36197
36259
|
return { kind: "unscoped" };
|
|
36198
36260
|
}
|
|
36199
|
-
function
|
|
36261
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
36262
|
+
const scope = resolveEventRegistrationScope(context);
|
|
36200
36263
|
switch (scope.kind) {
|
|
36201
36264
|
case "occurrenceSeries":
|
|
36202
36265
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -36208,9 +36271,6 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
36208
36271
|
case "unscoped": return [...events];
|
|
36209
36272
|
}
|
|
36210
36273
|
}
|
|
36211
|
-
function resolveEventRegistrationScopedEvents(events, context) {
|
|
36212
|
-
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
36213
|
-
}
|
|
36214
36274
|
//#endregion
|
|
36215
36275
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
36216
36276
|
function planEventRegistrationScope(input) {
|
|
@@ -36304,14 +36364,14 @@ function isRecord$9(value) {
|
|
|
36304
36364
|
}
|
|
36305
36365
|
function isPublicEventPricing(value) {
|
|
36306
36366
|
if (!isRecord$9(value) || typeof value.kind !== "string") return false;
|
|
36307
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
36367
|
+
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";
|
|
36308
36368
|
}
|
|
36309
36369
|
function isPublicEventTicketType(value) {
|
|
36310
36370
|
return isRecord$9(value) && typeof value.id === "string";
|
|
36311
36371
|
}
|
|
36312
36372
|
function readTicketTypePriceDisplay(value, currency) {
|
|
36313
36373
|
const display = readLegacyPriceDisplay(value, currency);
|
|
36314
|
-
return display.kind === "
|
|
36374
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
36315
36375
|
kind: "unavailable",
|
|
36316
36376
|
currency
|
|
36317
36377
|
} : display;
|
|
@@ -36369,11 +36429,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
36369
36429
|
kind: "unavailable",
|
|
36370
36430
|
currency: displayCurrency
|
|
36371
36431
|
};
|
|
36372
|
-
case "
|
|
36373
|
-
kind: "
|
|
36432
|
+
case "whole_series": return isRecord$9(value.display) ? {
|
|
36433
|
+
kind: "whole_series",
|
|
36374
36434
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
36375
36435
|
} : {
|
|
36376
|
-
kind: "
|
|
36436
|
+
kind: "whole_series",
|
|
36377
36437
|
display: {
|
|
36378
36438
|
kind: "unavailable",
|
|
36379
36439
|
currency: displayCurrency
|
|
@@ -36499,7 +36559,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
36499
36559
|
//#endregion
|
|
36500
36560
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
36501
36561
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
36502
|
-
return event.
|
|
36562
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
36503
36563
|
}
|
|
36504
36564
|
function findPreSelectedEvent(input) {
|
|
36505
36565
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -36525,12 +36585,127 @@ function toRegistrationEvent(event) {
|
|
|
36525
36585
|
return {
|
|
36526
36586
|
...event,
|
|
36527
36587
|
pricing: resolveRuntimeEventPricing(event),
|
|
36528
|
-
|
|
36529
|
-
|
|
36588
|
+
selectionId: event.id,
|
|
36589
|
+
registrationSubject: {
|
|
36590
|
+
kind: "occurrence",
|
|
36591
|
+
occurrenceId: event.occurrenceId
|
|
36592
|
+
}
|
|
36530
36593
|
};
|
|
36531
36594
|
}
|
|
36532
36595
|
function toRegistrationEvents(events) {
|
|
36533
|
-
return events.map(toRegistrationEvent);
|
|
36596
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
36597
|
+
}
|
|
36598
|
+
function toWholeSeriesTicketType(option) {
|
|
36599
|
+
return {
|
|
36600
|
+
...option,
|
|
36601
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
36602
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
36603
|
+
availability: {
|
|
36604
|
+
kind: "available",
|
|
36605
|
+
remainingCapacity: option.capacityLimit
|
|
36606
|
+
}
|
|
36607
|
+
};
|
|
36608
|
+
}
|
|
36609
|
+
function toWholeSeriesPricing(offering) {
|
|
36610
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
36611
|
+
switch (offering.pricing.pricingStrategy) {
|
|
36612
|
+
case "free": return {
|
|
36613
|
+
kind: "free_registration",
|
|
36614
|
+
currency: offering.currency,
|
|
36615
|
+
display: {
|
|
36616
|
+
kind: "free",
|
|
36617
|
+
currency: offering.currency
|
|
36618
|
+
}
|
|
36619
|
+
};
|
|
36620
|
+
case "single": {
|
|
36621
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
36622
|
+
return amount === 0 ? {
|
|
36623
|
+
kind: "free_registration",
|
|
36624
|
+
currency: offering.currency,
|
|
36625
|
+
display: {
|
|
36626
|
+
kind: "free",
|
|
36627
|
+
currency: offering.currency
|
|
36628
|
+
}
|
|
36629
|
+
} : {
|
|
36630
|
+
kind: "single_paid",
|
|
36631
|
+
amount,
|
|
36632
|
+
currency: offering.currency,
|
|
36633
|
+
display: {
|
|
36634
|
+
kind: "exact",
|
|
36635
|
+
amount,
|
|
36636
|
+
currency: offering.currency
|
|
36637
|
+
}
|
|
36638
|
+
};
|
|
36639
|
+
}
|
|
36640
|
+
case "tiered": return {
|
|
36641
|
+
kind: "ticket_types",
|
|
36642
|
+
currency: offering.currency,
|
|
36643
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
36644
|
+
display: resolved.display
|
|
36645
|
+
};
|
|
36646
|
+
case "sliding_scale": return {
|
|
36647
|
+
kind: "sliding_scale",
|
|
36648
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
36649
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
36650
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
36651
|
+
currency: offering.currency,
|
|
36652
|
+
display: {
|
|
36653
|
+
kind: "range",
|
|
36654
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
36655
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
36656
|
+
currency: offering.currency
|
|
36657
|
+
}
|
|
36658
|
+
};
|
|
36659
|
+
}
|
|
36660
|
+
}
|
|
36661
|
+
function toAttendanceModes(offering) {
|
|
36662
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
36663
|
+
mode,
|
|
36664
|
+
capacity: offering.enrollmentCapacity,
|
|
36665
|
+
registeredCount: offering.enrolledCount,
|
|
36666
|
+
availableSpots: offering.availableSpots,
|
|
36667
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
36668
|
+
}));
|
|
36669
|
+
}
|
|
36670
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
36671
|
+
const firstSession = offering.sessions[0];
|
|
36672
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
36673
|
+
return {
|
|
36674
|
+
selectionId: offering.eventSeriesId,
|
|
36675
|
+
registrationSubject: {
|
|
36676
|
+
kind: "wholeSeries",
|
|
36677
|
+
eventSeriesId: offering.eventSeriesId,
|
|
36678
|
+
sessions: offering.sessions
|
|
36679
|
+
},
|
|
36680
|
+
seriesId: offering.eventSeriesId,
|
|
36681
|
+
title: offering.title,
|
|
36682
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
36683
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
36684
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
36685
|
+
kind: "closed",
|
|
36686
|
+
reason: "enrollment_closed"
|
|
36687
|
+
},
|
|
36688
|
+
deliveryMode: offering.deliveryMode,
|
|
36689
|
+
attendanceModes: toAttendanceModes(offering),
|
|
36690
|
+
capacity: offering.enrollmentCapacity,
|
|
36691
|
+
registeredCount: offering.enrolledCount,
|
|
36692
|
+
availableSpots: offering.availableSpots,
|
|
36693
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
36694
|
+
venue: offering.venue ? {
|
|
36695
|
+
...offering.venue,
|
|
36696
|
+
location: null
|
|
36697
|
+
} : null,
|
|
36698
|
+
eventCategory: null,
|
|
36699
|
+
teamMembers: offering.teamMembers,
|
|
36700
|
+
status: offering.status,
|
|
36701
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
36702
|
+
pricing: toWholeSeriesPricing(offering),
|
|
36703
|
+
paymentTerms: offering.paymentTerms,
|
|
36704
|
+
consent: offering.consent,
|
|
36705
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
36706
|
+
acceptsPasses: false,
|
|
36707
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
36708
|
+
};
|
|
36534
36709
|
}
|
|
36535
36710
|
//#endregion
|
|
36536
36711
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -36556,11 +36731,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
36556
36731
|
maxTickets: z.string().optional(),
|
|
36557
36732
|
showVenue: z.boolean().optional(),
|
|
36558
36733
|
showCapacity: z.boolean().optional(),
|
|
36559
|
-
showSessions: z.boolean().optional(),
|
|
36560
|
-
showPrice: z.boolean().optional(),
|
|
36561
36734
|
successMessage: z.string().optional(),
|
|
36562
|
-
waitlistMessage: z.string().optional(),
|
|
36563
|
-
membershipMessage: z.string().optional(),
|
|
36564
36735
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
36565
36736
|
overlayEnabled: z.boolean().optional(),
|
|
36566
36737
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -36630,6 +36801,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
36630
36801
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
36631
36802
|
}
|
|
36632
36803
|
function buildEventRegistrationShellStepLabels(source) {
|
|
36804
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
36805
|
+
if (selectedOffering) {
|
|
36806
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
36807
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
36808
|
+
eligibility: null,
|
|
36809
|
+
selectedTicketType: null,
|
|
36810
|
+
event: selectedEvent
|
|
36811
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
36812
|
+
}
|
|
36633
36813
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
36634
36814
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
36635
36815
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -36693,11 +36873,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
36693
36873
|
maxTickets: source.maxTickets ?? void 0,
|
|
36694
36874
|
showVenue: source.showVenue,
|
|
36695
36875
|
showCapacity: source.showCapacity,
|
|
36696
|
-
showSessions: source.showSessions,
|
|
36697
|
-
showPrice: source.showPrice,
|
|
36698
36876
|
successMessage: source.successMessage,
|
|
36699
|
-
waitlistMessage: source.waitlistMessage,
|
|
36700
|
-
membershipMessage: source.membershipMessage,
|
|
36701
36877
|
buttonVariant: source.buttonVariant,
|
|
36702
36878
|
overlayEnabled: source.overlayEnabled,
|
|
36703
36879
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -36813,24 +36989,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
36813
36989
|
defaultValue: true,
|
|
36814
36990
|
ui: { intent: "display" }
|
|
36815
36991
|
},
|
|
36816
|
-
{
|
|
36817
|
-
id: "showSessions",
|
|
36818
|
-
type: "boolean",
|
|
36819
|
-
label: "Show complete schedule",
|
|
36820
|
-
description: "Display every session for whole-series registrations",
|
|
36821
|
-
required: false,
|
|
36822
|
-
defaultValue: true,
|
|
36823
|
-
ui: { intent: "display" }
|
|
36824
|
-
},
|
|
36825
|
-
{
|
|
36826
|
-
id: "showPrice",
|
|
36827
|
-
type: "boolean",
|
|
36828
|
-
label: "Show price",
|
|
36829
|
-
description: "Display the whole-series price",
|
|
36830
|
-
required: false,
|
|
36831
|
-
defaultValue: true,
|
|
36832
|
-
ui: { intent: "display" }
|
|
36833
|
-
},
|
|
36834
36992
|
{
|
|
36835
36993
|
id: "successMessage",
|
|
36836
36994
|
type: "text",
|
|
@@ -36841,26 +36999,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
36841
36999
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
36842
37000
|
maxLength: 500
|
|
36843
37001
|
},
|
|
36844
|
-
{
|
|
36845
|
-
id: "waitlistMessage",
|
|
36846
|
-
type: "text",
|
|
36847
|
-
label: "Waitlist message",
|
|
36848
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
36849
|
-
required: false,
|
|
36850
|
-
multiline: true,
|
|
36851
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
36852
|
-
maxLength: 500
|
|
36853
|
-
},
|
|
36854
|
-
{
|
|
36855
|
-
id: "membershipMessage",
|
|
36856
|
-
type: "text",
|
|
36857
|
-
label: "Membership registration message",
|
|
36858
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
36859
|
-
required: false,
|
|
36860
|
-
multiline: true,
|
|
36861
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
36862
|
-
maxLength: 500
|
|
36863
|
-
},
|
|
36864
37002
|
{
|
|
36865
37003
|
id: "buttonText",
|
|
36866
37004
|
type: "text",
|
|
@@ -36892,11 +37030,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
36892
37030
|
} },
|
|
36893
37031
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
36894
37032
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
36895
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
36896
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
36897
37033
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
36898
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
36899
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
36900
37034
|
buttonText: { $bind: {
|
|
36901
37035
|
from: "content.buttonText",
|
|
36902
37036
|
fallback: "Complete Registration"
|
|
@@ -37013,254 +37147,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
37013
37147
|
}
|
|
37014
37148
|
};
|
|
37015
37149
|
//#endregion
|
|
37016
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
37017
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
37018
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
37019
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
37020
|
-
showSessions: z.boolean().optional(),
|
|
37021
|
-
showPrice: z.boolean().optional(),
|
|
37022
|
-
showCapacity: z.boolean().optional(),
|
|
37023
|
-
showVenue: z.boolean().optional(),
|
|
37024
|
-
successMessage: z.string().optional(),
|
|
37025
|
-
waitlistMessage: z.string().optional(),
|
|
37026
|
-
membershipMessage: z.string().optional(),
|
|
37027
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
37028
|
-
};
|
|
37029
|
-
const courseRegistrationSourceSchema = z.object({
|
|
37030
|
-
siteId: z.string().optional(),
|
|
37031
|
-
apiBaseUrl: z.string().optional(),
|
|
37032
|
-
portalToken: z.string().nullable().optional(),
|
|
37033
|
-
...courseRegistrationHydrationSchemaShape,
|
|
37034
|
-
className: z.string().nullable().optional(),
|
|
37035
|
-
buttonText: z.string().nullable().optional(),
|
|
37036
|
-
stage: previewStageSchema.optional()
|
|
37037
|
-
});
|
|
37038
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
37039
|
-
kind: z.literal("course-registration"),
|
|
37040
|
-
state: z.literal("shell"),
|
|
37041
|
-
className: z.string().nullable(),
|
|
37042
|
-
summaryButtonText: z.string()
|
|
37043
|
-
});
|
|
37044
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
37045
|
-
const courseRegistrationRenderSchema = z.object({
|
|
37046
|
-
display: courseRegistrationDisplaySchema,
|
|
37047
|
-
hydration: courseRegistrationHydrationSchema
|
|
37048
|
-
});
|
|
37049
|
-
z.object({
|
|
37050
|
-
siteId: z.string().optional(),
|
|
37051
|
-
apiBaseUrl: z.string().optional(),
|
|
37052
|
-
portalToken: z.string().nullable().optional(),
|
|
37053
|
-
stage: previewStageSchema.optional()
|
|
37054
|
-
});
|
|
37055
|
-
function buildCourseRegistrationDisplay(source) {
|
|
37056
|
-
return {
|
|
37057
|
-
kind: "course-registration",
|
|
37058
|
-
state: "shell",
|
|
37059
|
-
className: source.className ?? null,
|
|
37060
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
37061
|
-
};
|
|
37062
|
-
}
|
|
37063
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
37064
|
-
kind: "client-owned",
|
|
37065
|
-
contracts: {
|
|
37066
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
37067
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
37068
|
-
},
|
|
37069
|
-
buildRender: (source) => ({
|
|
37070
|
-
display: buildCourseRegistrationDisplay(source),
|
|
37071
|
-
hydration: {
|
|
37072
|
-
subject: source.subject ?? null,
|
|
37073
|
-
courses: source.courses ?? null,
|
|
37074
|
-
showSessions: source.showSessions,
|
|
37075
|
-
showPrice: source.showPrice,
|
|
37076
|
-
showCapacity: source.showCapacity,
|
|
37077
|
-
showVenue: source.showVenue,
|
|
37078
|
-
successMessage: source.successMessage,
|
|
37079
|
-
waitlistMessage: source.waitlistMessage,
|
|
37080
|
-
membershipMessage: source.membershipMessage,
|
|
37081
|
-
buttonVariant: source.buttonVariant
|
|
37082
|
-
}
|
|
37083
|
-
})
|
|
37084
|
-
});
|
|
37085
|
-
const courseRegistrationBlockDefinition = {
|
|
37086
|
-
manifest: createBlockManifest({
|
|
37087
|
-
id: "block.course-registration",
|
|
37088
|
-
version: "1.0.0",
|
|
37089
|
-
title: "Course Registration",
|
|
37090
|
-
titleSource: "heading",
|
|
37091
|
-
description: "Enrollment form for multi-session courses",
|
|
37092
|
-
category: "interactive",
|
|
37093
|
-
contentSource: { kind: "inline" },
|
|
37094
|
-
tags: [
|
|
37095
|
-
"courses",
|
|
37096
|
-
"enrollment",
|
|
37097
|
-
"booking",
|
|
37098
|
-
"form",
|
|
37099
|
-
"signup",
|
|
37100
|
-
"education"
|
|
37101
|
-
],
|
|
37102
|
-
icon: "GraduationCap",
|
|
37103
|
-
styleTokens: {
|
|
37104
|
-
background: "surface",
|
|
37105
|
-
typography: "body",
|
|
37106
|
-
spacing: "md"
|
|
37107
|
-
},
|
|
37108
|
-
behaviours: {
|
|
37109
|
-
supportsThemeSwitching: true,
|
|
37110
|
-
inlineEditing: false,
|
|
37111
|
-
animation: false,
|
|
37112
|
-
paletteHidden: false
|
|
37113
|
-
},
|
|
37114
|
-
additionalFields: [
|
|
37115
|
-
{
|
|
37116
|
-
id: "heading",
|
|
37117
|
-
type: "text",
|
|
37118
|
-
label: "Heading",
|
|
37119
|
-
description: "Main heading for the registration form",
|
|
37120
|
-
required: false,
|
|
37121
|
-
multiline: false,
|
|
37122
|
-
defaultValue: "Sign up"
|
|
37123
|
-
},
|
|
37124
|
-
{
|
|
37125
|
-
id: "description",
|
|
37126
|
-
type: "richText",
|
|
37127
|
-
label: "Description",
|
|
37128
|
-
description: "Optional introductory text",
|
|
37129
|
-
required: false
|
|
37130
|
-
},
|
|
37131
|
-
{
|
|
37132
|
-
id: "showSessions",
|
|
37133
|
-
type: "boolean",
|
|
37134
|
-
label: "Show sessions",
|
|
37135
|
-
description: "Display the list of course sessions",
|
|
37136
|
-
required: false,
|
|
37137
|
-
defaultValue: true,
|
|
37138
|
-
ui: { intent: "display" }
|
|
37139
|
-
},
|
|
37140
|
-
{
|
|
37141
|
-
id: "showPrice",
|
|
37142
|
-
type: "boolean",
|
|
37143
|
-
label: "Show price",
|
|
37144
|
-
description: "Display the course price",
|
|
37145
|
-
required: false,
|
|
37146
|
-
defaultValue: true,
|
|
37147
|
-
ui: { intent: "display" }
|
|
37148
|
-
},
|
|
37149
|
-
{
|
|
37150
|
-
id: "showCapacity",
|
|
37151
|
-
type: "boolean",
|
|
37152
|
-
label: "Show available spots",
|
|
37153
|
-
description: "Display remaining enrollment capacity",
|
|
37154
|
-
required: false,
|
|
37155
|
-
defaultValue: true,
|
|
37156
|
-
ui: { intent: "display" }
|
|
37157
|
-
},
|
|
37158
|
-
{
|
|
37159
|
-
id: "showVenue",
|
|
37160
|
-
type: "boolean",
|
|
37161
|
-
label: "Show venue",
|
|
37162
|
-
description: "Display venue information",
|
|
37163
|
-
required: false,
|
|
37164
|
-
defaultValue: true,
|
|
37165
|
-
ui: { intent: "display" }
|
|
37166
|
-
},
|
|
37167
|
-
{
|
|
37168
|
-
id: "successMessage",
|
|
37169
|
-
type: "text",
|
|
37170
|
-
label: "Success message",
|
|
37171
|
-
description: "Message shown after successful enrollment",
|
|
37172
|
-
required: false,
|
|
37173
|
-
multiline: true,
|
|
37174
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
37175
|
-
maxLength: 500
|
|
37176
|
-
},
|
|
37177
|
-
{
|
|
37178
|
-
id: "waitlistMessage",
|
|
37179
|
-
type: "text",
|
|
37180
|
-
label: "Waitlist message",
|
|
37181
|
-
description: "Message when added to waitlist",
|
|
37182
|
-
required: false,
|
|
37183
|
-
multiline: true,
|
|
37184
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
37185
|
-
maxLength: 500
|
|
37186
|
-
},
|
|
37187
|
-
{
|
|
37188
|
-
id: "membershipMessage",
|
|
37189
|
-
type: "text",
|
|
37190
|
-
label: "Membership enrollment message",
|
|
37191
|
-
description: "Message when enrolled using a membership",
|
|
37192
|
-
required: false,
|
|
37193
|
-
multiline: true,
|
|
37194
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
37195
|
-
maxLength: 500
|
|
37196
|
-
},
|
|
37197
|
-
{
|
|
37198
|
-
id: "buttonText",
|
|
37199
|
-
type: "text",
|
|
37200
|
-
label: "Submit button text",
|
|
37201
|
-
description: "Text for the enrollment submit button",
|
|
37202
|
-
required: false,
|
|
37203
|
-
multiline: false,
|
|
37204
|
-
defaultValue: "Sign up",
|
|
37205
|
-
maxLength: 40
|
|
37206
|
-
},
|
|
37207
|
-
createButtonVariantField()
|
|
37208
|
-
],
|
|
37209
|
-
layout: [styledSection({
|
|
37210
|
-
baseClass: "",
|
|
37211
|
-
spacing: "spacious",
|
|
37212
|
-
children: sectionContainer([
|
|
37213
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
37214
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
37215
|
-
courseRegistration(withApiBindings({
|
|
37216
|
-
subject: { $bind: {
|
|
37217
|
-
from: "$root.subject",
|
|
37218
|
-
fallback: null
|
|
37219
|
-
} },
|
|
37220
|
-
portalToken: { $bind: {
|
|
37221
|
-
from: "$root.portalToken",
|
|
37222
|
-
fallback: null
|
|
37223
|
-
} },
|
|
37224
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
37225
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
37226
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
37227
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
37228
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
37229
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
37230
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
37231
|
-
buttonText: { $bind: {
|
|
37232
|
-
from: "content.buttonText",
|
|
37233
|
-
fallback: "Sign up"
|
|
37234
|
-
} },
|
|
37235
|
-
buttonVariant: { $bind: {
|
|
37236
|
-
from: "content.buttonVariant",
|
|
37237
|
-
fallback: "primary"
|
|
37238
|
-
} },
|
|
37239
|
-
courses: { $bind: { from: "data.courses" } },
|
|
37240
|
-
stage: { $bind: {
|
|
37241
|
-
from: "$root.previewStage",
|
|
37242
|
-
fallback: "published"
|
|
37243
|
-
} }
|
|
37244
|
-
}))
|
|
37245
|
-
], { gap: "lg" })
|
|
37246
|
-
})]
|
|
37247
|
-
}),
|
|
37248
|
-
runtime: courseRegistrationBlockRuntime,
|
|
37249
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
37250
|
-
dataLoaders: { courses: {
|
|
37251
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
37252
|
-
params: {
|
|
37253
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
37254
|
-
limit: "50",
|
|
37255
|
-
stage: { $bind: {
|
|
37256
|
-
from: "$root.previewStage",
|
|
37257
|
-
fallback: "published"
|
|
37258
|
-
} }
|
|
37259
|
-
},
|
|
37260
|
-
mode: "server"
|
|
37261
|
-
} }
|
|
37262
|
-
};
|
|
37263
|
-
//#endregion
|
|
37264
37150
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
37265
37151
|
/**
|
|
37266
37152
|
* Event Details Block
|
|
@@ -37507,200 +37393,6 @@ const eventDetailsBlockDefinition = {
|
|
|
37507
37393
|
mode: "server"
|
|
37508
37394
|
} }
|
|
37509
37395
|
};
|
|
37510
|
-
const courseDetailsBlockDefinition = {
|
|
37511
|
-
manifest: createBlockManifest({
|
|
37512
|
-
id: "block.course-details",
|
|
37513
|
-
version: "1.0.0",
|
|
37514
|
-
title: "Course Details",
|
|
37515
|
-
titleSource: "heading",
|
|
37516
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
37517
|
-
category: "content",
|
|
37518
|
-
contentSource: { kind: "entries" },
|
|
37519
|
-
tags: [
|
|
37520
|
-
"courses",
|
|
37521
|
-
"schedule",
|
|
37522
|
-
"sessions",
|
|
37523
|
-
"venue",
|
|
37524
|
-
"pricing"
|
|
37525
|
-
],
|
|
37526
|
-
icon: "GraduationCap",
|
|
37527
|
-
styleTokens: {
|
|
37528
|
-
background: "surface",
|
|
37529
|
-
typography: "body",
|
|
37530
|
-
spacing: "md"
|
|
37531
|
-
},
|
|
37532
|
-
behaviours: {
|
|
37533
|
-
supportsThemeSwitching: true,
|
|
37534
|
-
inlineEditing: false,
|
|
37535
|
-
animation: false,
|
|
37536
|
-
paletteHidden: false
|
|
37537
|
-
},
|
|
37538
|
-
additionalFields: [
|
|
37539
|
-
{
|
|
37540
|
-
id: "heading",
|
|
37541
|
-
type: "text",
|
|
37542
|
-
label: "Heading",
|
|
37543
|
-
description: "Optional heading shown above course details",
|
|
37544
|
-
required: false,
|
|
37545
|
-
multiline: false,
|
|
37546
|
-
defaultValue: "Course details"
|
|
37547
|
-
},
|
|
37548
|
-
{
|
|
37549
|
-
id: "showTitle",
|
|
37550
|
-
type: "boolean",
|
|
37551
|
-
label: "Show course title",
|
|
37552
|
-
required: false,
|
|
37553
|
-
defaultValue: false,
|
|
37554
|
-
ui: { intent: "display" }
|
|
37555
|
-
},
|
|
37556
|
-
{
|
|
37557
|
-
id: "showDescription",
|
|
37558
|
-
type: "boolean",
|
|
37559
|
-
label: "Show course description",
|
|
37560
|
-
description: "Render the course description from the bookings course record",
|
|
37561
|
-
required: false,
|
|
37562
|
-
defaultValue: false,
|
|
37563
|
-
ui: { intent: "display" }
|
|
37564
|
-
},
|
|
37565
|
-
{
|
|
37566
|
-
id: "showSessions",
|
|
37567
|
-
type: "boolean",
|
|
37568
|
-
label: "Show sessions",
|
|
37569
|
-
required: false,
|
|
37570
|
-
defaultValue: true,
|
|
37571
|
-
ui: { intent: "display" }
|
|
37572
|
-
},
|
|
37573
|
-
{
|
|
37574
|
-
id: "sessionsLimit",
|
|
37575
|
-
type: "select",
|
|
37576
|
-
label: "Sessions limit",
|
|
37577
|
-
required: false,
|
|
37578
|
-
multiple: false,
|
|
37579
|
-
defaultValue: "10",
|
|
37580
|
-
options: [
|
|
37581
|
-
{
|
|
37582
|
-
value: "3",
|
|
37583
|
-
label: "3 sessions"
|
|
37584
|
-
},
|
|
37585
|
-
{
|
|
37586
|
-
value: "5",
|
|
37587
|
-
label: "5 sessions"
|
|
37588
|
-
},
|
|
37589
|
-
{
|
|
37590
|
-
value: "10",
|
|
37591
|
-
label: "10 sessions"
|
|
37592
|
-
},
|
|
37593
|
-
{
|
|
37594
|
-
value: "all",
|
|
37595
|
-
label: "All sessions"
|
|
37596
|
-
}
|
|
37597
|
-
],
|
|
37598
|
-
ui: { intent: "display" }
|
|
37599
|
-
},
|
|
37600
|
-
{
|
|
37601
|
-
id: "showVenue",
|
|
37602
|
-
type: "boolean",
|
|
37603
|
-
label: "Show venue",
|
|
37604
|
-
required: false,
|
|
37605
|
-
defaultValue: true,
|
|
37606
|
-
ui: { intent: "display" }
|
|
37607
|
-
},
|
|
37608
|
-
{
|
|
37609
|
-
id: "showPrice",
|
|
37610
|
-
type: "boolean",
|
|
37611
|
-
label: "Show price",
|
|
37612
|
-
required: false,
|
|
37613
|
-
defaultValue: true,
|
|
37614
|
-
ui: { intent: "display" }
|
|
37615
|
-
},
|
|
37616
|
-
{
|
|
37617
|
-
id: "showCapacity",
|
|
37618
|
-
type: "boolean",
|
|
37619
|
-
label: "Show capacity",
|
|
37620
|
-
required: false,
|
|
37621
|
-
defaultValue: true,
|
|
37622
|
-
ui: { intent: "display" }
|
|
37623
|
-
},
|
|
37624
|
-
{
|
|
37625
|
-
id: "showEnrollmentStatus",
|
|
37626
|
-
type: "boolean",
|
|
37627
|
-
label: "Show enrollment status",
|
|
37628
|
-
required: false,
|
|
37629
|
-
defaultValue: true,
|
|
37630
|
-
ui: { intent: "display" }
|
|
37631
|
-
},
|
|
37632
|
-
{
|
|
37633
|
-
id: "showMembershipNote",
|
|
37634
|
-
type: "boolean",
|
|
37635
|
-
label: "Show membership note",
|
|
37636
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
37637
|
-
required: false,
|
|
37638
|
-
defaultValue: true,
|
|
37639
|
-
ui: { intent: "display" }
|
|
37640
|
-
}
|
|
37641
|
-
],
|
|
37642
|
-
layout: [styledSection({
|
|
37643
|
-
baseClass: "",
|
|
37644
|
-
spacing: "spacious",
|
|
37645
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
37646
|
-
subject: { $bind: {
|
|
37647
|
-
from: "$root.subject",
|
|
37648
|
-
fallback: null
|
|
37649
|
-
} },
|
|
37650
|
-
courses: { $bind: { from: "data.courses" } },
|
|
37651
|
-
showTitle: { $bind: {
|
|
37652
|
-
from: "content.showTitle",
|
|
37653
|
-
fallback: false
|
|
37654
|
-
} },
|
|
37655
|
-
showDescription: { $bind: {
|
|
37656
|
-
from: "content.showDescription",
|
|
37657
|
-
fallback: false
|
|
37658
|
-
} },
|
|
37659
|
-
showSessions: { $bind: {
|
|
37660
|
-
from: "content.showSessions",
|
|
37661
|
-
fallback: true
|
|
37662
|
-
} },
|
|
37663
|
-
sessionsLimit: { $bind: {
|
|
37664
|
-
from: "content.sessionsLimit",
|
|
37665
|
-
fallback: "10"
|
|
37666
|
-
} },
|
|
37667
|
-
showVenue: { $bind: {
|
|
37668
|
-
from: "content.showVenue",
|
|
37669
|
-
fallback: true
|
|
37670
|
-
} },
|
|
37671
|
-
showPrice: { $bind: {
|
|
37672
|
-
from: "content.showPrice",
|
|
37673
|
-
fallback: true
|
|
37674
|
-
} },
|
|
37675
|
-
showCapacity: { $bind: {
|
|
37676
|
-
from: "content.showCapacity",
|
|
37677
|
-
fallback: true
|
|
37678
|
-
} },
|
|
37679
|
-
showEnrollmentStatus: { $bind: {
|
|
37680
|
-
from: "content.showEnrollmentStatus",
|
|
37681
|
-
fallback: true
|
|
37682
|
-
} },
|
|
37683
|
-
showMembershipNote: { $bind: {
|
|
37684
|
-
from: "content.showMembershipNote",
|
|
37685
|
-
fallback: true
|
|
37686
|
-
} }
|
|
37687
|
-
})], { gap: "lg" })
|
|
37688
|
-
})]
|
|
37689
|
-
}),
|
|
37690
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
37691
|
-
dataLoaders: { courses: {
|
|
37692
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
37693
|
-
params: {
|
|
37694
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
37695
|
-
limit: "50",
|
|
37696
|
-
stage: { $bind: {
|
|
37697
|
-
from: "$root.previewStage",
|
|
37698
|
-
fallback: "published"
|
|
37699
|
-
} }
|
|
37700
|
-
},
|
|
37701
|
-
mode: "server"
|
|
37702
|
-
} }
|
|
37703
|
-
};
|
|
37704
37396
|
const eventSpotlightBlockDefinition = {
|
|
37705
37397
|
manifest: createBlockManifest({
|
|
37706
37398
|
id: "block.event-spotlight",
|
|
@@ -40364,7 +40056,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
40364
40056
|
fallback: "published"
|
|
40365
40057
|
} },
|
|
40366
40058
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
40367
|
-
|
|
40059
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
40368
40060
|
...offeringsPreviewEventDataBindings
|
|
40369
40061
|
})
|
|
40370
40062
|
], { gap: "lg" }),
|
|
@@ -40381,7 +40073,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
40381
40073
|
dataSchemas: {
|
|
40382
40074
|
...offeringsPreviewEventDataSchemas,
|
|
40383
40075
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
40384
|
-
|
|
40076
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
40385
40077
|
},
|
|
40386
40078
|
dataLoaders: {
|
|
40387
40079
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -40390,7 +40082,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
40390
40082
|
params: {},
|
|
40391
40083
|
mode: "server"
|
|
40392
40084
|
},
|
|
40393
|
-
|
|
40085
|
+
wholeSeriesOfferings: {
|
|
40394
40086
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
40395
40087
|
params: {
|
|
40396
40088
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -45377,22 +45069,6 @@ const systemBlockDefinitions = [
|
|
|
45377
45069
|
weight: "standard"
|
|
45378
45070
|
})]
|
|
45379
45071
|
})),
|
|
45380
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
45381
|
-
flow: conversionFlow,
|
|
45382
|
-
layoutProfiles: [layoutProfile({
|
|
45383
|
-
variantKey: "default",
|
|
45384
|
-
family: "form",
|
|
45385
|
-
weight: "standard"
|
|
45386
|
-
})]
|
|
45387
|
-
})),
|
|
45388
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
45389
|
-
flow: offeringsFlow,
|
|
45390
|
-
layoutProfiles: [layoutProfile({
|
|
45391
|
-
variantKey: "default",
|
|
45392
|
-
family: "stack",
|
|
45393
|
-
weight: "standard"
|
|
45394
|
-
})]
|
|
45395
|
-
})),
|
|
45396
45072
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
45397
45073
|
flow: offeringsFlow,
|
|
45398
45074
|
layoutProfiles: [layoutProfile({
|
|
@@ -47419,6 +47095,68 @@ function collectText(node) {
|
|
|
47419
47095
|
return (node.content ?? []).map(collectText).join("");
|
|
47420
47096
|
}
|
|
47421
47097
|
//#endregion
|
|
47098
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
47099
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
47100
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
47101
|
+
z.object({
|
|
47102
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
47103
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
47104
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
47105
|
+
remainderDueCount: z.number().int().positive(),
|
|
47106
|
+
intervalUnit: z.enum([
|
|
47107
|
+
"day",
|
|
47108
|
+
"week",
|
|
47109
|
+
"month"
|
|
47110
|
+
])
|
|
47111
|
+
}),
|
|
47112
|
+
z.object({
|
|
47113
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
47114
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
47115
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
47116
|
+
instalmentCount: z.number().int().positive(),
|
|
47117
|
+
intervalCount: z.number().int().positive(),
|
|
47118
|
+
intervalUnit: z.enum([
|
|
47119
|
+
"day",
|
|
47120
|
+
"week",
|
|
47121
|
+
"month"
|
|
47122
|
+
])
|
|
47123
|
+
}),
|
|
47124
|
+
z.object({
|
|
47125
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
47126
|
+
instalmentCount: z.number().int().positive(),
|
|
47127
|
+
intervalCount: z.number().int().positive(),
|
|
47128
|
+
intervalUnit: z.enum([
|
|
47129
|
+
"day",
|
|
47130
|
+
"week",
|
|
47131
|
+
"month"
|
|
47132
|
+
])
|
|
47133
|
+
})
|
|
47134
|
+
]);
|
|
47135
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
47136
|
+
kind: z.literal("relative_to_start_date"),
|
|
47137
|
+
daysBeforeStart: z.number().int().positive()
|
|
47138
|
+
}), z.object({
|
|
47139
|
+
kind: z.literal("fixed_calendar_date"),
|
|
47140
|
+
dueAt: z.string().datetime()
|
|
47141
|
+
})]);
|
|
47142
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
47143
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
47144
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
47145
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
47146
|
+
});
|
|
47147
|
+
z.discriminatedUnion("kind", [
|
|
47148
|
+
z.object({ kind: z.literal("upfront") }),
|
|
47149
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
47150
|
+
z.object({
|
|
47151
|
+
kind: z.literal("instalment_plan"),
|
|
47152
|
+
plan: bookingInstalmentPlanSchema
|
|
47153
|
+
}),
|
|
47154
|
+
z.object({
|
|
47155
|
+
kind: z.literal("flexible_balance"),
|
|
47156
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
47157
|
+
})
|
|
47158
|
+
]);
|
|
47159
|
+
//#endregion
|
|
47422
47160
|
//#region ../api/src/aiPlayground.ts
|
|
47423
47161
|
/**
|
|
47424
47162
|
* RFC-6902 JSON Patch Operations
|