@riverbankcms/sdk 0.132.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 +14 -3
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DKQ5eFK9.mjs → PreviewEditorSidebar-roNY0GVy.mjs} +4 -4
- package/dist/{PreviewEditorUI-CNTcOjCC.mjs → PreviewEditorUI-KboDbEh_.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D51gQaG3.mjs → PreviewQueryProvider-DcgaESkm.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DJu3qu33.mjs → SdkPreviewModeRuntime-DBrF7Caa.mjs} +48 -17
- package/dist/{SiteChromeCustomizeContext-2TzT3vbj.mjs → SiteChromeCustomizeContext-DrIEpJKn.mjs} +4351 -7964
- package/dist/_dts/ai/src/contracts/proposals.d.ts +549 -549
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +234 -234
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +25 -60
- package/dist/_dts/api/src/bookingOperations.d.ts +111 -173
- 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 +7 -11
- 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/contentRuntime.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +30 -110
- 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/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/participantMessaging.d.ts +2 -2
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- 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 +88 -6
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +1 -1
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +9 -98
- 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 +2 -2
- package/dist/_dts/api/src/sdkThemeWire.d.ts +50 -50
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/siteOperations.d.ts +2 -2
- package/dist/_dts/api/src/types.d.ts +2 -2
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/api/src/{courses.d.ts → wholeSeriesOfferings.d.ts} +43 -95
- package/dist/_dts/blocks/src/client.d.ts +1 -6
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +33 -166
- package/dist/_dts/blocks/src/index.d.ts +3 -2
- 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/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +147 -42
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +46 -24
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +6 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +5 -4
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/scheduleSummary.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/node/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/appointments.d.ts +2 -11
- 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 +100 -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/multi-step/DynamicFormFields.d.ts +3 -19
- 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/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/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/registrationSurface.d.ts +18 -1
- 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 +24 -9
- 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/validation.d.ts +2 -1
- 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 +40 -18
- 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/BookingConsentAgreement.d.ts +7 -0
- 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 +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/checkoutUrls.d.ts +2 -2
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- 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/content-types/schema.d.ts +4 -4
- 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/booking-consent.d.ts +8 -0
- 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/index.d.ts +1 -0
- 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 +899 -2157
- package/dist/_dts/db/src/schemas/forms.d.ts +21 -21
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -4
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +4 -5
- package/dist/_dts/sdk/src/bookings/types.d.ts +8 -60
- package/dist/_dts/sdk/src/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -19
- 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/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +0 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +12 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +72 -72
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +82 -82
- 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/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/client/{usePolling-M5jG675x.mjs → BookingConsentAgreement-BQqwi8Oa.mjs} +180 -4
- package/dist/client/{DiscountCodeDisclosure-DO7llLxm.mjs → DiscountCodeDisclosure-B97aMo0V.mjs} +13 -27
- package/dist/client/{EventCombined.client-xID7zN__.mjs → EventCombined.client-Bs2Iw9Q6.mjs} +3 -3
- package/dist/client/{EventListing.client-CriBslp0.mjs → EventListing.client-C4QUQdmg.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DYmHnM8g.mjs → LeafletStaticMap-CwWRk69M.mjs} +1 -1
- package/dist/client/{accordion-CgFbnnnQ.mjs → accordion-BA0j8Mpw.mjs} +1 -1
- package/dist/client/{bookingForm-dUyGpbxc.mjs → bookingForm-Br2e41H0.mjs} +72 -47
- package/dist/client/bookings.mjs +1987 -2132
- package/dist/client/{carousel-BvBwkUzx.mjs → carousel-B4dmwnpD.mjs} +1 -1
- package/dist/client/{cart-DiZENT2E.mjs → cart-B_ckGW4b.mjs} +3 -3
- package/dist/client/{checkout-Dq13KIgR.mjs → checkout-DAyspHdf.mjs} +3 -3
- package/dist/client/checkoutUrls-BuseL0dw.mjs +189 -0
- package/dist/client/client.mjs +5627 -9543
- package/dist/client/{context-B83PiNzm.mjs → context-DljQn8L5.mjs} +15 -82
- package/dist/client/{eventCalendar-BF0Jatfw.mjs → eventCalendar-pJu3FUod.mjs} +5 -5
- package/dist/client/{eventCombined-BuoCF8je.mjs → eventCombined-B6Kacm9F.mjs} +3 -3
- package/dist/client/{eventDetails-CKwh0S9s.mjs → eventDetails-CaX9z1pv.mjs} +8 -8
- package/dist/client/{eventListing-eUxaWFaB.mjs → eventListing-B9aXPO-I.mjs} +3 -3
- package/dist/client/{eventRegistration-CfkNOkPb.mjs → eventRegistration-CBSovBkg.mjs} +4550 -3671
- package/dist/client/{form-C17H1c_H.mjs → form-Cm0tu_7o.mjs} +2 -2
- package/dist/client/{headerSection-DEwUmrtt.mjs → headerSection-OgRtHeKS.mjs} +2 -2
- package/dist/client/hooks.mjs +535 -694
- package/dist/client/{locationMap-Pf2QwuvW.mjs → locationMap-DmjcYqNM.mjs} +2 -2
- package/dist/client/{newsletterForm-BWQAH5Sv.mjs → newsletterForm-D08OZQAC.mjs} +2 -2
- package/dist/client/{productDetail-BZi1Fa_G.mjs → productDetail-BqZeu2P4.mjs} +3 -3
- package/dist/client/{productList-qq-55DNk.mjs → productList-mNyIF9FG.mjs} +3 -3
- package/dist/client/{propsDecoder-BxmqPKdP.mjs → propsDecoder-DwHXRm9X.mjs} +4850 -4502
- package/dist/client/rendering/client.mjs +59921 -62298
- package/dist/client/rendering/islands.mjs +17 -19
- package/dist/client/rendering.mjs +6226 -10236
- package/dist/client/{scrollToBlock-B3CcKdtG.mjs → scrollToBlock-DtmdM3v-.mjs} +2 -2
- package/dist/client/{shop-DNWJPut5.mjs → shop-CNjZK16F.mjs} +6 -6
- package/dist/client/{shop-commerce-BhvQCosS.mjs → shop-commerce-DkNNao1J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-B04sCNnW.mjs → shop-commerce-store-9WA--zuW.mjs} +1 -1
- package/dist/client/{shopShared-DNNgZlmW.mjs → shopShared-CHCVfccY.mjs} +3 -3
- package/dist/client/{useEventFilters-CUmhE24_.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-BEXb1wqo.mjs → sdk-runtime-3GhW4knb.mjs} +2 -2
- package/dist/{separator-DGMuip1D.mjs → separator-D3bCWYYb.mjs} +1 -1
- package/dist/server/components.mjs +634 -2969
- package/dist/server/config-validation.mjs +535 -694
- package/dist/server/config.mjs +535 -694
- package/dist/server/data.mjs +535 -694
- package/dist/server/index.mjs +41 -162
- package/dist/server/next.mjs +644 -2979
- package/dist/server/page-converter.mjs +435 -561
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +635 -2874
- package/dist/server/rendering.mjs +634 -2969
- package/dist/server/routing.mjs +706 -1138
- package/dist/server/server.mjs +549 -708
- package/dist/server/theme-bridge.mjs +152 -1635
- package/dist/styles/index.css +41 -1348
- package/package.json +2 -2
- 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 -133
- 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 -45
- 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 -323
- 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/StepIndicator-CGixP_LW.mjs +0 -138
- package/dist/client/WholeSeriesRegistrationWizard-BEjzSiOA.mjs +0 -2496
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
- package/dist/client/courseRegistration-CKC5NmyH.mjs +0 -52
- package/dist/client/pricing-CVdvbopJ.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",
|
|
@@ -2485,6 +2383,68 @@ z.object({
|
|
|
2485
2383
|
monthlyCurrency: z.literal("gbp")
|
|
2486
2384
|
});
|
|
2487
2385
|
//#endregion
|
|
2386
|
+
//#region ../blocks/src/system/types/link.ts
|
|
2387
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
2388
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
2389
|
+
"page",
|
|
2390
|
+
"content",
|
|
2391
|
+
"pageSurface"
|
|
2392
|
+
];
|
|
2393
|
+
const resolvedInternalLinkKeys = [
|
|
2394
|
+
"entityId",
|
|
2395
|
+
"entityType",
|
|
2396
|
+
"href",
|
|
2397
|
+
"title",
|
|
2398
|
+
"typeLabel"
|
|
2399
|
+
];
|
|
2400
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
2401
|
+
kind: z.literal("internal"),
|
|
2402
|
+
routeId: z.string().min(1)
|
|
2403
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
2404
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
2405
|
+
ctx.addIssue({
|
|
2406
|
+
code: "custom",
|
|
2407
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
2408
|
+
});
|
|
2409
|
+
});
|
|
2410
|
+
const internalResolvedLinkSchema = z.object({
|
|
2411
|
+
kind: z.literal("internal"),
|
|
2412
|
+
routeId: z.string().min(1),
|
|
2413
|
+
entityId: z.string().min(1),
|
|
2414
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
2415
|
+
href: z.string().min(1),
|
|
2416
|
+
title: z.string().min(1),
|
|
2417
|
+
typeLabel: z.string().min(1),
|
|
2418
|
+
contentTypeKey: nullableString.optional(),
|
|
2419
|
+
contentTypeName: nullableString.optional(),
|
|
2420
|
+
updatedAt: nullableString.optional()
|
|
2421
|
+
}).passthrough();
|
|
2422
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
2423
|
+
const externalLinkSchema$1 = z.object({
|
|
2424
|
+
kind: z.literal("external"),
|
|
2425
|
+
href: z.string().min(1)
|
|
2426
|
+
}).passthrough();
|
|
2427
|
+
const customLinkSchema$1 = z.object({
|
|
2428
|
+
kind: z.literal("url"),
|
|
2429
|
+
href: z.string().min(1)
|
|
2430
|
+
}).passthrough();
|
|
2431
|
+
const pageLinkSchema$1 = z.object({
|
|
2432
|
+
kind: z.literal("page"),
|
|
2433
|
+
identifier: z.string().min(1)
|
|
2434
|
+
}).passthrough();
|
|
2435
|
+
const entryLinkSchema$1 = z.object({
|
|
2436
|
+
kind: z.literal("entry"),
|
|
2437
|
+
contentType: z.string().min(1),
|
|
2438
|
+
identifier: z.string().min(1)
|
|
2439
|
+
}).passthrough();
|
|
2440
|
+
z.union([
|
|
2441
|
+
internalLinkSchema,
|
|
2442
|
+
externalLinkSchema$1,
|
|
2443
|
+
customLinkSchema$1,
|
|
2444
|
+
pageLinkSchema$1,
|
|
2445
|
+
entryLinkSchema$1
|
|
2446
|
+
]);
|
|
2447
|
+
//#endregion
|
|
2488
2448
|
//#region ../api/src/navigation/contracts.ts
|
|
2489
2449
|
/**
|
|
2490
2450
|
* Canonical navigation/link Zod contracts.
|
|
@@ -2514,7 +2474,7 @@ const internalLinkPayloadSchema = z.object({
|
|
|
2514
2474
|
kind: z.literal("internal"),
|
|
2515
2475
|
routeId: z.string().uuid(),
|
|
2516
2476
|
entityId: z.string().uuid(),
|
|
2517
|
-
entityType: z.enum(
|
|
2477
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
2518
2478
|
href: z.string().min(1),
|
|
2519
2479
|
title: z.string().min(1),
|
|
2520
2480
|
typeLabel: z.string().min(1),
|
|
@@ -10580,7 +10540,7 @@ defineBlockAppearancePreset({
|
|
|
10580
10540
|
id: "schedule-details-brand-depth",
|
|
10581
10541
|
target: "events",
|
|
10582
10542
|
label: "Brand-depth schedule details",
|
|
10583
|
-
blockKinds: ["block.event-details"
|
|
10543
|
+
blockKinds: ["block.event-details"],
|
|
10584
10544
|
design: {
|
|
10585
10545
|
sectionSurface: "brand-depth-band",
|
|
10586
10546
|
contentFrame: plainFrame,
|
|
@@ -16762,7 +16722,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
16762
16722
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
16763
16723
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
16764
16724
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
16765
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
16766
16725
|
function bind(from, options) {
|
|
16767
16726
|
return (node) => ({
|
|
16768
16727
|
...node,
|
|
@@ -26422,12 +26381,12 @@ const RichTextDocSchema = z.object({
|
|
|
26422
26381
|
}).strict();
|
|
26423
26382
|
//#endregion
|
|
26424
26383
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
26425
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
26426
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
26384
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
26385
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
26427
26386
|
z.object({
|
|
26428
26387
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
26429
26388
|
depositAmountCents: z.number().int().min(0),
|
|
26430
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26389
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26431
26390
|
remainderDueCount: z.number().int().positive(),
|
|
26432
26391
|
intervalUnit: z.enum([
|
|
26433
26392
|
"day",
|
|
@@ -26438,7 +26397,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26438
26397
|
z.object({
|
|
26439
26398
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
26440
26399
|
depositAmountCents: z.number().int().min(0),
|
|
26441
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26400
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26442
26401
|
instalmentCount: z.number().int().positive(),
|
|
26443
26402
|
intervalCount: z.number().int().positive(),
|
|
26444
26403
|
intervalUnit: z.enum([
|
|
@@ -26458,32 +26417,207 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26458
26417
|
])
|
|
26459
26418
|
})
|
|
26460
26419
|
]);
|
|
26461
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
26420
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
26462
26421
|
kind: z.literal("relative_to_start_date"),
|
|
26463
26422
|
daysBeforeStart: z.number().int().positive()
|
|
26464
26423
|
}), z.object({
|
|
26465
26424
|
kind: z.literal("fixed_calendar_date"),
|
|
26466
26425
|
dueAt: z.string().datetime()
|
|
26467
26426
|
})]);
|
|
26468
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
26427
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
26469
26428
|
upfrontAmountCents: z.number().int().min(0),
|
|
26470
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
26471
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
26429
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
26430
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
26472
26431
|
});
|
|
26473
26432
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
26474
26433
|
z.object({ kind: z.literal("upfront") }),
|
|
26475
26434
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
26476
26435
|
z.object({
|
|
26477
26436
|
kind: z.literal("instalment_plan"),
|
|
26478
|
-
plan: bookingInstalmentPlanSchema
|
|
26437
|
+
plan: bookingInstalmentPlanSchema$1
|
|
26479
26438
|
}),
|
|
26480
26439
|
z.object({
|
|
26481
26440
|
kind: z.literal("flexible_balance"),
|
|
26482
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
26441
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
26483
26442
|
})
|
|
26484
26443
|
]);
|
|
26485
26444
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
26486
26445
|
//#endregion
|
|
26446
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
26447
|
+
const blockBookingConsentSchema = z.object({
|
|
26448
|
+
requirementId: z.string(),
|
|
26449
|
+
title: z.string(),
|
|
26450
|
+
agreement: RichTextDocSchema,
|
|
26451
|
+
checkboxLabel: z.string()
|
|
26452
|
+
});
|
|
26453
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
26454
|
+
id: z.string(),
|
|
26455
|
+
label: z.string(),
|
|
26456
|
+
type: z.literal("booking_requirement_consent"),
|
|
26457
|
+
required: z.literal(true),
|
|
26458
|
+
agreement: RichTextDocSchema,
|
|
26459
|
+
checkboxLabel: z.string().min(1)
|
|
26460
|
+
});
|
|
26461
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
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
|
|
26487
26621
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26488
26622
|
const wholeSeriesVenueSchema = z.object({
|
|
26489
26623
|
id: z.string(),
|
|
@@ -26543,11 +26677,19 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
26543
26677
|
title: z.string(),
|
|
26544
26678
|
slug: z.string(),
|
|
26545
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(),
|
|
26546
26687
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
26547
26688
|
enrollmentOpen: z.boolean(),
|
|
26548
26689
|
pricing: wholeSeriesPricingSchema,
|
|
26549
26690
|
currency: z.string(),
|
|
26550
26691
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26692
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
26551
26693
|
enrollmentCapacity: z.number().nullable(),
|
|
26552
26694
|
acceptsMemberships: z.boolean(),
|
|
26553
26695
|
status: z.enum([
|
|
@@ -26657,7 +26799,7 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
26657
26799
|
paidToAmount: z.number(),
|
|
26658
26800
|
currency: z.string()
|
|
26659
26801
|
});
|
|
26660
|
-
const
|
|
26802
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
26661
26803
|
freePriceDisplaySchema,
|
|
26662
26804
|
exactPriceDisplaySchema,
|
|
26663
26805
|
fromPriceDisplaySchema,
|
|
@@ -26675,8 +26817,8 @@ z.discriminatedUnion("kind", [
|
|
|
26675
26817
|
label: z.string()
|
|
26676
26818
|
}),
|
|
26677
26819
|
z.object({
|
|
26678
|
-
kind: z.literal("
|
|
26679
|
-
display:
|
|
26820
|
+
kind: z.literal("whole_series"),
|
|
26821
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26680
26822
|
})
|
|
26681
26823
|
]);
|
|
26682
26824
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -26778,10 +26920,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
26778
26920
|
})
|
|
26779
26921
|
}),
|
|
26780
26922
|
z.object({
|
|
26781
|
-
kind: z.literal("
|
|
26923
|
+
kind: z.literal("whole_series"),
|
|
26782
26924
|
display: z.object({
|
|
26783
|
-
kind: z.literal("
|
|
26784
|
-
display:
|
|
26925
|
+
kind: z.literal("whole_series"),
|
|
26926
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26785
26927
|
})
|
|
26786
26928
|
}),
|
|
26787
26929
|
z.object({
|
|
@@ -26865,6 +27007,7 @@ const publicEventSchema = z.object({
|
|
|
26865
27007
|
timeZone: z.string(),
|
|
26866
27008
|
pricing: publicEventPricingSchema,
|
|
26867
27009
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
27010
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
26868
27011
|
accessRestriction: accessRestrictionSchema,
|
|
26869
27012
|
allowedCategoryIds: z.array(z.string()),
|
|
26870
27013
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -27197,7 +27340,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
27197
27340
|
};
|
|
27198
27341
|
return { kind: "unscoped" };
|
|
27199
27342
|
}
|
|
27200
|
-
function
|
|
27343
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27344
|
+
const scope = resolveEventRegistrationScope(context);
|
|
27201
27345
|
switch (scope.kind) {
|
|
27202
27346
|
case "occurrenceSeries":
|
|
27203
27347
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -27209,8 +27353,24 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
27209
27353
|
case "unscoped": return [...events];
|
|
27210
27354
|
}
|
|
27211
27355
|
}
|
|
27212
|
-
|
|
27213
|
-
|
|
27356
|
+
//#endregion
|
|
27357
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27358
|
+
function planEventRegistrationScope(input) {
|
|
27359
|
+
const subject = input.subject;
|
|
27360
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
27361
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
27362
|
+
kind: "context",
|
|
27363
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
27364
|
+
occurrenceContext: input.occurrenceContext,
|
|
27365
|
+
subject
|
|
27366
|
+
})
|
|
27367
|
+
};
|
|
27368
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
27369
|
+
return {
|
|
27370
|
+
kind: "selectedRun",
|
|
27371
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
27372
|
+
offering: selectedRunOffering
|
|
27373
|
+
};
|
|
27214
27374
|
}
|
|
27215
27375
|
//#endregion
|
|
27216
27376
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
@@ -27286,14 +27446,14 @@ function isRecord$6(value) {
|
|
|
27286
27446
|
}
|
|
27287
27447
|
function isPublicEventPricing(value) {
|
|
27288
27448
|
if (!isRecord$6(value) || typeof value.kind !== "string") return false;
|
|
27289
|
-
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";
|
|
27290
27450
|
}
|
|
27291
27451
|
function isPublicEventTicketType(value) {
|
|
27292
27452
|
return isRecord$6(value) && typeof value.id === "string";
|
|
27293
27453
|
}
|
|
27294
27454
|
function readTicketTypePriceDisplay(value, currency) {
|
|
27295
27455
|
const display = readLegacyPriceDisplay(value, currency);
|
|
27296
|
-
return display.kind === "
|
|
27456
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
27297
27457
|
kind: "unavailable",
|
|
27298
27458
|
currency
|
|
27299
27459
|
} : display;
|
|
@@ -27351,11 +27511,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27351
27511
|
kind: "unavailable",
|
|
27352
27512
|
currency: displayCurrency
|
|
27353
27513
|
};
|
|
27354
|
-
case "
|
|
27355
|
-
kind: "
|
|
27514
|
+
case "whole_series": return isRecord$6(value.display) ? {
|
|
27515
|
+
kind: "whole_series",
|
|
27356
27516
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
27357
27517
|
} : {
|
|
27358
|
-
kind: "
|
|
27518
|
+
kind: "whole_series",
|
|
27359
27519
|
display: {
|
|
27360
27520
|
kind: "unavailable",
|
|
27361
27521
|
currency: displayCurrency
|
|
@@ -27481,7 +27641,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
27481
27641
|
//#endregion
|
|
27482
27642
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
27483
27643
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
27484
|
-
return event.
|
|
27644
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
27485
27645
|
}
|
|
27486
27646
|
function findPreSelectedEvent(input) {
|
|
27487
27647
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -27507,12 +27667,127 @@ function toRegistrationEvent(event) {
|
|
|
27507
27667
|
return {
|
|
27508
27668
|
...event,
|
|
27509
27669
|
pricing: resolveRuntimeEventPricing(event),
|
|
27510
|
-
|
|
27511
|
-
|
|
27670
|
+
selectionId: event.id,
|
|
27671
|
+
registrationSubject: {
|
|
27672
|
+
kind: "occurrence",
|
|
27673
|
+
occurrenceId: event.occurrenceId
|
|
27674
|
+
}
|
|
27512
27675
|
};
|
|
27513
27676
|
}
|
|
27514
27677
|
function toRegistrationEvents(events) {
|
|
27515
|
-
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
|
+
};
|
|
27516
27791
|
}
|
|
27517
27792
|
//#endregion
|
|
27518
27793
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -27538,11 +27813,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
27538
27813
|
maxTickets: z.string().optional(),
|
|
27539
27814
|
showVenue: z.boolean().optional(),
|
|
27540
27815
|
showCapacity: z.boolean().optional(),
|
|
27541
|
-
showSessions: z.boolean().optional(),
|
|
27542
|
-
showPrice: z.boolean().optional(),
|
|
27543
27816
|
successMessage: z.string().optional(),
|
|
27544
|
-
waitlistMessage: z.string().optional(),
|
|
27545
|
-
membershipMessage: z.string().optional(),
|
|
27546
27817
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27547
27818
|
overlayEnabled: z.boolean().optional(),
|
|
27548
27819
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -27612,6 +27883,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
27612
27883
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27613
27884
|
}
|
|
27614
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
|
+
}
|
|
27615
27895
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
27616
27896
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
27617
27897
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -27626,10 +27906,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
27626
27906
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
27627
27907
|
}
|
|
27628
27908
|
function scopeEventRegistrationEvents(source) {
|
|
27629
|
-
|
|
27909
|
+
const scope = planEventRegistrationScope({
|
|
27910
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
27911
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
27630
27912
|
occurrenceContext: source.occurrenceContext,
|
|
27631
27913
|
subject: source.subject
|
|
27632
27914
|
});
|
|
27915
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
27633
27916
|
}
|
|
27634
27917
|
function shellLabelForRegistrationStep(step, events) {
|
|
27635
27918
|
switch (step) {
|
|
@@ -27672,11 +27955,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27672
27955
|
maxTickets: source.maxTickets ?? void 0,
|
|
27673
27956
|
showVenue: source.showVenue,
|
|
27674
27957
|
showCapacity: source.showCapacity,
|
|
27675
|
-
showSessions: source.showSessions,
|
|
27676
|
-
showPrice: source.showPrice,
|
|
27677
27958
|
successMessage: source.successMessage,
|
|
27678
|
-
waitlistMessage: source.waitlistMessage,
|
|
27679
|
-
membershipMessage: source.membershipMessage,
|
|
27680
27959
|
buttonVariant: source.buttonVariant,
|
|
27681
27960
|
overlayEnabled: source.overlayEnabled,
|
|
27682
27961
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -27792,24 +28071,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27792
28071
|
defaultValue: true,
|
|
27793
28072
|
ui: { intent: "display" }
|
|
27794
28073
|
},
|
|
27795
|
-
{
|
|
27796
|
-
id: "showSessions",
|
|
27797
|
-
type: "boolean",
|
|
27798
|
-
label: "Show complete schedule",
|
|
27799
|
-
description: "Display every session for whole-series registrations",
|
|
27800
|
-
required: false,
|
|
27801
|
-
defaultValue: true,
|
|
27802
|
-
ui: { intent: "display" }
|
|
27803
|
-
},
|
|
27804
|
-
{
|
|
27805
|
-
id: "showPrice",
|
|
27806
|
-
type: "boolean",
|
|
27807
|
-
label: "Show price",
|
|
27808
|
-
description: "Display the whole-series price",
|
|
27809
|
-
required: false,
|
|
27810
|
-
defaultValue: true,
|
|
27811
|
-
ui: { intent: "display" }
|
|
27812
|
-
},
|
|
27813
28074
|
{
|
|
27814
28075
|
id: "successMessage",
|
|
27815
28076
|
type: "text",
|
|
@@ -27820,26 +28081,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27820
28081
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
27821
28082
|
maxLength: 500
|
|
27822
28083
|
},
|
|
27823
|
-
{
|
|
27824
|
-
id: "waitlistMessage",
|
|
27825
|
-
type: "text",
|
|
27826
|
-
label: "Waitlist message",
|
|
27827
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
27828
|
-
required: false,
|
|
27829
|
-
multiline: true,
|
|
27830
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
27831
|
-
maxLength: 500
|
|
27832
|
-
},
|
|
27833
|
-
{
|
|
27834
|
-
id: "membershipMessage",
|
|
27835
|
-
type: "text",
|
|
27836
|
-
label: "Membership registration message",
|
|
27837
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
27838
|
-
required: false,
|
|
27839
|
-
multiline: true,
|
|
27840
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
27841
|
-
maxLength: 500
|
|
27842
|
-
},
|
|
27843
28084
|
{
|
|
27844
28085
|
id: "buttonText",
|
|
27845
28086
|
type: "text",
|
|
@@ -27871,11 +28112,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
27871
28112
|
} },
|
|
27872
28113
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
27873
28114
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
27874
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
27875
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
27876
28115
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
27877
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
27878
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
27879
28116
|
buttonText: { $bind: {
|
|
27880
28117
|
from: "content.buttonText",
|
|
27881
28118
|
fallback: "Complete Registration"
|
|
@@ -27992,254 +28229,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27992
28229
|
}
|
|
27993
28230
|
};
|
|
27994
28231
|
//#endregion
|
|
27995
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27996
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
27997
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27998
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27999
|
-
showSessions: z.boolean().optional(),
|
|
28000
|
-
showPrice: z.boolean().optional(),
|
|
28001
|
-
showCapacity: z.boolean().optional(),
|
|
28002
|
-
showVenue: z.boolean().optional(),
|
|
28003
|
-
successMessage: z.string().optional(),
|
|
28004
|
-
waitlistMessage: z.string().optional(),
|
|
28005
|
-
membershipMessage: z.string().optional(),
|
|
28006
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28007
|
-
};
|
|
28008
|
-
const courseRegistrationSourceSchema = z.object({
|
|
28009
|
-
siteId: z.string().optional(),
|
|
28010
|
-
apiBaseUrl: z.string().optional(),
|
|
28011
|
-
portalToken: z.string().nullable().optional(),
|
|
28012
|
-
...courseRegistrationHydrationSchemaShape,
|
|
28013
|
-
className: z.string().nullable().optional(),
|
|
28014
|
-
buttonText: z.string().nullable().optional(),
|
|
28015
|
-
stage: previewStageSchema.optional()
|
|
28016
|
-
});
|
|
28017
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
28018
|
-
kind: z.literal("course-registration"),
|
|
28019
|
-
state: z.literal("shell"),
|
|
28020
|
-
className: z.string().nullable(),
|
|
28021
|
-
summaryButtonText: z.string()
|
|
28022
|
-
});
|
|
28023
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
28024
|
-
const courseRegistrationRenderSchema = z.object({
|
|
28025
|
-
display: courseRegistrationDisplaySchema,
|
|
28026
|
-
hydration: courseRegistrationHydrationSchema
|
|
28027
|
-
});
|
|
28028
|
-
z.object({
|
|
28029
|
-
siteId: z.string().optional(),
|
|
28030
|
-
apiBaseUrl: z.string().optional(),
|
|
28031
|
-
portalToken: z.string().nullable().optional(),
|
|
28032
|
-
stage: previewStageSchema.optional()
|
|
28033
|
-
});
|
|
28034
|
-
function buildCourseRegistrationDisplay(source) {
|
|
28035
|
-
return {
|
|
28036
|
-
kind: "course-registration",
|
|
28037
|
-
state: "shell",
|
|
28038
|
-
className: source.className ?? null,
|
|
28039
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
28040
|
-
};
|
|
28041
|
-
}
|
|
28042
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
28043
|
-
kind: "client-owned",
|
|
28044
|
-
contracts: {
|
|
28045
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
28046
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
28047
|
-
},
|
|
28048
|
-
buildRender: (source) => ({
|
|
28049
|
-
display: buildCourseRegistrationDisplay(source),
|
|
28050
|
-
hydration: {
|
|
28051
|
-
subject: source.subject ?? null,
|
|
28052
|
-
courses: source.courses ?? null,
|
|
28053
|
-
showSessions: source.showSessions,
|
|
28054
|
-
showPrice: source.showPrice,
|
|
28055
|
-
showCapacity: source.showCapacity,
|
|
28056
|
-
showVenue: source.showVenue,
|
|
28057
|
-
successMessage: source.successMessage,
|
|
28058
|
-
waitlistMessage: source.waitlistMessage,
|
|
28059
|
-
membershipMessage: source.membershipMessage,
|
|
28060
|
-
buttonVariant: source.buttonVariant
|
|
28061
|
-
}
|
|
28062
|
-
})
|
|
28063
|
-
});
|
|
28064
|
-
const courseRegistrationBlockDefinition = {
|
|
28065
|
-
manifest: createBlockManifest({
|
|
28066
|
-
id: "block.course-registration",
|
|
28067
|
-
version: "1.0.0",
|
|
28068
|
-
title: "Course Registration",
|
|
28069
|
-
titleSource: "heading",
|
|
28070
|
-
description: "Enrollment form for multi-session courses",
|
|
28071
|
-
category: "interactive",
|
|
28072
|
-
contentSource: { kind: "inline" },
|
|
28073
|
-
tags: [
|
|
28074
|
-
"courses",
|
|
28075
|
-
"enrollment",
|
|
28076
|
-
"booking",
|
|
28077
|
-
"form",
|
|
28078
|
-
"signup",
|
|
28079
|
-
"education"
|
|
28080
|
-
],
|
|
28081
|
-
icon: "GraduationCap",
|
|
28082
|
-
styleTokens: {
|
|
28083
|
-
background: "surface",
|
|
28084
|
-
typography: "body",
|
|
28085
|
-
spacing: "md"
|
|
28086
|
-
},
|
|
28087
|
-
behaviours: {
|
|
28088
|
-
supportsThemeSwitching: true,
|
|
28089
|
-
inlineEditing: false,
|
|
28090
|
-
animation: false,
|
|
28091
|
-
paletteHidden: false
|
|
28092
|
-
},
|
|
28093
|
-
additionalFields: [
|
|
28094
|
-
{
|
|
28095
|
-
id: "heading",
|
|
28096
|
-
type: "text",
|
|
28097
|
-
label: "Heading",
|
|
28098
|
-
description: "Main heading for the registration form",
|
|
28099
|
-
required: false,
|
|
28100
|
-
multiline: false,
|
|
28101
|
-
defaultValue: "Sign up"
|
|
28102
|
-
},
|
|
28103
|
-
{
|
|
28104
|
-
id: "description",
|
|
28105
|
-
type: "richText",
|
|
28106
|
-
label: "Description",
|
|
28107
|
-
description: "Optional introductory text",
|
|
28108
|
-
required: false
|
|
28109
|
-
},
|
|
28110
|
-
{
|
|
28111
|
-
id: "showSessions",
|
|
28112
|
-
type: "boolean",
|
|
28113
|
-
label: "Show sessions",
|
|
28114
|
-
description: "Display the list of course sessions",
|
|
28115
|
-
required: false,
|
|
28116
|
-
defaultValue: true,
|
|
28117
|
-
ui: { intent: "display" }
|
|
28118
|
-
},
|
|
28119
|
-
{
|
|
28120
|
-
id: "showPrice",
|
|
28121
|
-
type: "boolean",
|
|
28122
|
-
label: "Show price",
|
|
28123
|
-
description: "Display the course price",
|
|
28124
|
-
required: false,
|
|
28125
|
-
defaultValue: true,
|
|
28126
|
-
ui: { intent: "display" }
|
|
28127
|
-
},
|
|
28128
|
-
{
|
|
28129
|
-
id: "showCapacity",
|
|
28130
|
-
type: "boolean",
|
|
28131
|
-
label: "Show available spots",
|
|
28132
|
-
description: "Display remaining enrollment capacity",
|
|
28133
|
-
required: false,
|
|
28134
|
-
defaultValue: true,
|
|
28135
|
-
ui: { intent: "display" }
|
|
28136
|
-
},
|
|
28137
|
-
{
|
|
28138
|
-
id: "showVenue",
|
|
28139
|
-
type: "boolean",
|
|
28140
|
-
label: "Show venue",
|
|
28141
|
-
description: "Display venue information",
|
|
28142
|
-
required: false,
|
|
28143
|
-
defaultValue: true,
|
|
28144
|
-
ui: { intent: "display" }
|
|
28145
|
-
},
|
|
28146
|
-
{
|
|
28147
|
-
id: "successMessage",
|
|
28148
|
-
type: "text",
|
|
28149
|
-
label: "Success message",
|
|
28150
|
-
description: "Message shown after successful enrollment",
|
|
28151
|
-
required: false,
|
|
28152
|
-
multiline: true,
|
|
28153
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
28154
|
-
maxLength: 500
|
|
28155
|
-
},
|
|
28156
|
-
{
|
|
28157
|
-
id: "waitlistMessage",
|
|
28158
|
-
type: "text",
|
|
28159
|
-
label: "Waitlist message",
|
|
28160
|
-
description: "Message when added to waitlist",
|
|
28161
|
-
required: false,
|
|
28162
|
-
multiline: true,
|
|
28163
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
28164
|
-
maxLength: 500
|
|
28165
|
-
},
|
|
28166
|
-
{
|
|
28167
|
-
id: "membershipMessage",
|
|
28168
|
-
type: "text",
|
|
28169
|
-
label: "Membership enrollment message",
|
|
28170
|
-
description: "Message when enrolled using a membership",
|
|
28171
|
-
required: false,
|
|
28172
|
-
multiline: true,
|
|
28173
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
28174
|
-
maxLength: 500
|
|
28175
|
-
},
|
|
28176
|
-
{
|
|
28177
|
-
id: "buttonText",
|
|
28178
|
-
type: "text",
|
|
28179
|
-
label: "Submit button text",
|
|
28180
|
-
description: "Text for the enrollment submit button",
|
|
28181
|
-
required: false,
|
|
28182
|
-
multiline: false,
|
|
28183
|
-
defaultValue: "Sign up",
|
|
28184
|
-
maxLength: 40
|
|
28185
|
-
},
|
|
28186
|
-
createButtonVariantField()
|
|
28187
|
-
],
|
|
28188
|
-
layout: [styledSection({
|
|
28189
|
-
baseClass: "",
|
|
28190
|
-
spacing: "spacious",
|
|
28191
|
-
children: sectionContainer([
|
|
28192
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28193
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28194
|
-
courseRegistration(withApiBindings({
|
|
28195
|
-
subject: { $bind: {
|
|
28196
|
-
from: "$root.subject",
|
|
28197
|
-
fallback: null
|
|
28198
|
-
} },
|
|
28199
|
-
portalToken: { $bind: {
|
|
28200
|
-
from: "$root.portalToken",
|
|
28201
|
-
fallback: null
|
|
28202
|
-
} },
|
|
28203
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
28204
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
28205
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
28206
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28207
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
28208
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
28209
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
28210
|
-
buttonText: { $bind: {
|
|
28211
|
-
from: "content.buttonText",
|
|
28212
|
-
fallback: "Sign up"
|
|
28213
|
-
} },
|
|
28214
|
-
buttonVariant: { $bind: {
|
|
28215
|
-
from: "content.buttonVariant",
|
|
28216
|
-
fallback: "primary"
|
|
28217
|
-
} },
|
|
28218
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28219
|
-
stage: { $bind: {
|
|
28220
|
-
from: "$root.previewStage",
|
|
28221
|
-
fallback: "published"
|
|
28222
|
-
} }
|
|
28223
|
-
}))
|
|
28224
|
-
], { gap: "lg" })
|
|
28225
|
-
})]
|
|
28226
|
-
}),
|
|
28227
|
-
runtime: courseRegistrationBlockRuntime,
|
|
28228
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28229
|
-
dataLoaders: { courses: {
|
|
28230
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28231
|
-
params: {
|
|
28232
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28233
|
-
limit: "50",
|
|
28234
|
-
stage: { $bind: {
|
|
28235
|
-
from: "$root.previewStage",
|
|
28236
|
-
fallback: "published"
|
|
28237
|
-
} }
|
|
28238
|
-
},
|
|
28239
|
-
mode: "server"
|
|
28240
|
-
} }
|
|
28241
|
-
};
|
|
28242
|
-
//#endregion
|
|
28243
28232
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
28244
28233
|
/**
|
|
28245
28234
|
* Event Details Block
|
|
@@ -28486,200 +28475,6 @@ const eventDetailsBlockDefinition = {
|
|
|
28486
28475
|
mode: "server"
|
|
28487
28476
|
} }
|
|
28488
28477
|
};
|
|
28489
|
-
const courseDetailsBlockDefinition = {
|
|
28490
|
-
manifest: createBlockManifest({
|
|
28491
|
-
id: "block.course-details",
|
|
28492
|
-
version: "1.0.0",
|
|
28493
|
-
title: "Course Details",
|
|
28494
|
-
titleSource: "heading",
|
|
28495
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
28496
|
-
category: "content",
|
|
28497
|
-
contentSource: { kind: "entries" },
|
|
28498
|
-
tags: [
|
|
28499
|
-
"courses",
|
|
28500
|
-
"schedule",
|
|
28501
|
-
"sessions",
|
|
28502
|
-
"venue",
|
|
28503
|
-
"pricing"
|
|
28504
|
-
],
|
|
28505
|
-
icon: "GraduationCap",
|
|
28506
|
-
styleTokens: {
|
|
28507
|
-
background: "surface",
|
|
28508
|
-
typography: "body",
|
|
28509
|
-
spacing: "md"
|
|
28510
|
-
},
|
|
28511
|
-
behaviours: {
|
|
28512
|
-
supportsThemeSwitching: true,
|
|
28513
|
-
inlineEditing: false,
|
|
28514
|
-
animation: false,
|
|
28515
|
-
paletteHidden: false
|
|
28516
|
-
},
|
|
28517
|
-
additionalFields: [
|
|
28518
|
-
{
|
|
28519
|
-
id: "heading",
|
|
28520
|
-
type: "text",
|
|
28521
|
-
label: "Heading",
|
|
28522
|
-
description: "Optional heading shown above course details",
|
|
28523
|
-
required: false,
|
|
28524
|
-
multiline: false,
|
|
28525
|
-
defaultValue: "Course details"
|
|
28526
|
-
},
|
|
28527
|
-
{
|
|
28528
|
-
id: "showTitle",
|
|
28529
|
-
type: "boolean",
|
|
28530
|
-
label: "Show course title",
|
|
28531
|
-
required: false,
|
|
28532
|
-
defaultValue: false,
|
|
28533
|
-
ui: { intent: "display" }
|
|
28534
|
-
},
|
|
28535
|
-
{
|
|
28536
|
-
id: "showDescription",
|
|
28537
|
-
type: "boolean",
|
|
28538
|
-
label: "Show course description",
|
|
28539
|
-
description: "Render the course description from the bookings course record",
|
|
28540
|
-
required: false,
|
|
28541
|
-
defaultValue: false,
|
|
28542
|
-
ui: { intent: "display" }
|
|
28543
|
-
},
|
|
28544
|
-
{
|
|
28545
|
-
id: "showSessions",
|
|
28546
|
-
type: "boolean",
|
|
28547
|
-
label: "Show sessions",
|
|
28548
|
-
required: false,
|
|
28549
|
-
defaultValue: true,
|
|
28550
|
-
ui: { intent: "display" }
|
|
28551
|
-
},
|
|
28552
|
-
{
|
|
28553
|
-
id: "sessionsLimit",
|
|
28554
|
-
type: "select",
|
|
28555
|
-
label: "Sessions limit",
|
|
28556
|
-
required: false,
|
|
28557
|
-
multiple: false,
|
|
28558
|
-
defaultValue: "10",
|
|
28559
|
-
options: [
|
|
28560
|
-
{
|
|
28561
|
-
value: "3",
|
|
28562
|
-
label: "3 sessions"
|
|
28563
|
-
},
|
|
28564
|
-
{
|
|
28565
|
-
value: "5",
|
|
28566
|
-
label: "5 sessions"
|
|
28567
|
-
},
|
|
28568
|
-
{
|
|
28569
|
-
value: "10",
|
|
28570
|
-
label: "10 sessions"
|
|
28571
|
-
},
|
|
28572
|
-
{
|
|
28573
|
-
value: "all",
|
|
28574
|
-
label: "All sessions"
|
|
28575
|
-
}
|
|
28576
|
-
],
|
|
28577
|
-
ui: { intent: "display" }
|
|
28578
|
-
},
|
|
28579
|
-
{
|
|
28580
|
-
id: "showVenue",
|
|
28581
|
-
type: "boolean",
|
|
28582
|
-
label: "Show venue",
|
|
28583
|
-
required: false,
|
|
28584
|
-
defaultValue: true,
|
|
28585
|
-
ui: { intent: "display" }
|
|
28586
|
-
},
|
|
28587
|
-
{
|
|
28588
|
-
id: "showPrice",
|
|
28589
|
-
type: "boolean",
|
|
28590
|
-
label: "Show price",
|
|
28591
|
-
required: false,
|
|
28592
|
-
defaultValue: true,
|
|
28593
|
-
ui: { intent: "display" }
|
|
28594
|
-
},
|
|
28595
|
-
{
|
|
28596
|
-
id: "showCapacity",
|
|
28597
|
-
type: "boolean",
|
|
28598
|
-
label: "Show capacity",
|
|
28599
|
-
required: false,
|
|
28600
|
-
defaultValue: true,
|
|
28601
|
-
ui: { intent: "display" }
|
|
28602
|
-
},
|
|
28603
|
-
{
|
|
28604
|
-
id: "showEnrollmentStatus",
|
|
28605
|
-
type: "boolean",
|
|
28606
|
-
label: "Show enrollment status",
|
|
28607
|
-
required: false,
|
|
28608
|
-
defaultValue: true,
|
|
28609
|
-
ui: { intent: "display" }
|
|
28610
|
-
},
|
|
28611
|
-
{
|
|
28612
|
-
id: "showMembershipNote",
|
|
28613
|
-
type: "boolean",
|
|
28614
|
-
label: "Show membership note",
|
|
28615
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
28616
|
-
required: false,
|
|
28617
|
-
defaultValue: true,
|
|
28618
|
-
ui: { intent: "display" }
|
|
28619
|
-
}
|
|
28620
|
-
],
|
|
28621
|
-
layout: [styledSection({
|
|
28622
|
-
baseClass: "",
|
|
28623
|
-
spacing: "spacious",
|
|
28624
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
28625
|
-
subject: { $bind: {
|
|
28626
|
-
from: "$root.subject",
|
|
28627
|
-
fallback: null
|
|
28628
|
-
} },
|
|
28629
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28630
|
-
showTitle: { $bind: {
|
|
28631
|
-
from: "content.showTitle",
|
|
28632
|
-
fallback: false
|
|
28633
|
-
} },
|
|
28634
|
-
showDescription: { $bind: {
|
|
28635
|
-
from: "content.showDescription",
|
|
28636
|
-
fallback: false
|
|
28637
|
-
} },
|
|
28638
|
-
showSessions: { $bind: {
|
|
28639
|
-
from: "content.showSessions",
|
|
28640
|
-
fallback: true
|
|
28641
|
-
} },
|
|
28642
|
-
sessionsLimit: { $bind: {
|
|
28643
|
-
from: "content.sessionsLimit",
|
|
28644
|
-
fallback: "10"
|
|
28645
|
-
} },
|
|
28646
|
-
showVenue: { $bind: {
|
|
28647
|
-
from: "content.showVenue",
|
|
28648
|
-
fallback: true
|
|
28649
|
-
} },
|
|
28650
|
-
showPrice: { $bind: {
|
|
28651
|
-
from: "content.showPrice",
|
|
28652
|
-
fallback: true
|
|
28653
|
-
} },
|
|
28654
|
-
showCapacity: { $bind: {
|
|
28655
|
-
from: "content.showCapacity",
|
|
28656
|
-
fallback: true
|
|
28657
|
-
} },
|
|
28658
|
-
showEnrollmentStatus: { $bind: {
|
|
28659
|
-
from: "content.showEnrollmentStatus",
|
|
28660
|
-
fallback: true
|
|
28661
|
-
} },
|
|
28662
|
-
showMembershipNote: { $bind: {
|
|
28663
|
-
from: "content.showMembershipNote",
|
|
28664
|
-
fallback: true
|
|
28665
|
-
} }
|
|
28666
|
-
})], { gap: "lg" })
|
|
28667
|
-
})]
|
|
28668
|
-
}),
|
|
28669
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28670
|
-
dataLoaders: { courses: {
|
|
28671
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28672
|
-
params: {
|
|
28673
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28674
|
-
limit: "50",
|
|
28675
|
-
stage: { $bind: {
|
|
28676
|
-
from: "$root.previewStage",
|
|
28677
|
-
fallback: "published"
|
|
28678
|
-
} }
|
|
28679
|
-
},
|
|
28680
|
-
mode: "server"
|
|
28681
|
-
} }
|
|
28682
|
-
};
|
|
28683
28478
|
const eventSpotlightBlockDefinition = {
|
|
28684
28479
|
manifest: createBlockManifest({
|
|
28685
28480
|
id: "block.event-spotlight",
|
|
@@ -31066,7 +30861,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
31066
30861
|
entityId: z.string(),
|
|
31067
30862
|
path: z.string(),
|
|
31068
30863
|
title: z.string(),
|
|
31069
|
-
kind: z.enum(
|
|
30864
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
31070
30865
|
contentTypeKey: z.string().nullable().optional()
|
|
31071
30866
|
})) });
|
|
31072
30867
|
const groupOverrideFields = [
|
|
@@ -31343,7 +31138,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
31343
31138
|
fallback: "published"
|
|
31344
31139
|
} },
|
|
31345
31140
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
31346
|
-
|
|
31141
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
31347
31142
|
...offeringsPreviewEventDataBindings
|
|
31348
31143
|
})
|
|
31349
31144
|
], { gap: "lg" }),
|
|
@@ -31360,7 +31155,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31360
31155
|
dataSchemas: {
|
|
31361
31156
|
...offeringsPreviewEventDataSchemas,
|
|
31362
31157
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
31363
|
-
|
|
31158
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
31364
31159
|
},
|
|
31365
31160
|
dataLoaders: {
|
|
31366
31161
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31369,7 +31164,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31369
31164
|
params: {},
|
|
31370
31165
|
mode: "server"
|
|
31371
31166
|
},
|
|
31372
|
-
|
|
31167
|
+
wholeSeriesOfferings: {
|
|
31373
31168
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
31374
31169
|
params: {
|
|
31375
31170
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -36336,22 +36131,6 @@ const systemBlockDefinitions = [
|
|
|
36336
36131
|
weight: "standard"
|
|
36337
36132
|
})]
|
|
36338
36133
|
})),
|
|
36339
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
36340
|
-
flow: conversionFlow,
|
|
36341
|
-
layoutProfiles: [layoutProfile({
|
|
36342
|
-
variantKey: "default",
|
|
36343
|
-
family: "form",
|
|
36344
|
-
weight: "standard"
|
|
36345
|
-
})]
|
|
36346
|
-
})),
|
|
36347
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
36348
|
-
flow: offeringsFlow,
|
|
36349
|
-
layoutProfiles: [layoutProfile({
|
|
36350
|
-
variantKey: "default",
|
|
36351
|
-
family: "stack",
|
|
36352
|
-
weight: "standard"
|
|
36353
|
-
})]
|
|
36354
|
-
})),
|
|
36355
36134
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
36356
36135
|
flow: offeringsFlow,
|
|
36357
36136
|
layoutProfiles: [layoutProfile({
|
|
@@ -38410,6 +38189,68 @@ function parsePublicProductCategorySelector(value) {
|
|
|
38410
38189
|
};
|
|
38411
38190
|
}
|
|
38412
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
|
|
38413
38254
|
//#region ../api/src/aiPlayground.ts
|
|
38414
38255
|
/**
|
|
38415
38256
|
* RFC-6902 JSON Patch Operations
|