@riverbankcms/sdk 0.123.0 → 0.124.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/README.md +14 -9
- package/dist/{PreviewEditorSidebar-DvJFmC29.mjs → PreviewEditorSidebar-DBmAJJkQ.mjs} +22 -39
- package/dist/{PreviewEditorUI-DVHP4bCo.mjs → PreviewEditorUI-CfGaz9cY.mjs} +3 -3
- package/dist/{PreviewQueryProvider-07EE4uWL.mjs → PreviewQueryProvider-BH-3-jSj.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BE5eFayo.mjs → SdkPreviewModeRuntime-BW9Z8j8T.mjs} +1020 -1234
- package/dist/{SiteChromeCustomizeContext-4hn4A0HX.mjs → SiteChromeCustomizeContext-2z8moxYf.mjs} +1900 -1959
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1236 -4152
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +435 -0
- package/dist/_dts/api/src/bookingClosures.d.ts +3 -3
- package/dist/_dts/api/src/bookingConfig.d.ts +72 -73
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +26 -35
- package/dist/_dts/api/src/bookingRecords.d.ts +4 -15
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +746 -0
- package/dist/_dts/api/src/bookingVerticalPreset.d.ts +38 -0
- package/dist/_dts/api/src/bookingVerticals.d.ts +11 -652
- package/dist/_dts/api/src/bookings.d.ts +11 -9
- package/dist/_dts/api/src/cache-tags.d.ts +2 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +10 -10
- package/dist/_dts/api/src/common/envelope.d.ts +2 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +0 -17
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +99 -0
- package/dist/_dts/api/src/courses.d.ts +22 -33
- package/dist/_dts/api/src/defineEndpointDefinitions.d.ts +14 -0
- package/dist/_dts/api/src/demoMutationPolicies.d.ts +4 -0
- package/dist/_dts/api/src/endpoints.d.ts +3740 -3733
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/event-presentation.d.ts +4 -9
- package/dist/_dts/api/src/index.d.ts +9 -11
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +376 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +2 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +272 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +274 -0
- package/dist/_dts/api/src/publicExperience/newsletterEndpoints.d.ts +31 -0
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +152 -0
- package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +95 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +154 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -962
- package/dist/_dts/api/src/publicWholeSeriesEndpointDefinitions.d.ts +52 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +0 -51
- package/dist/_dts/api/src/sdkEntryReadEndpoints.d.ts +23 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -38
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -4
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -15
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +0 -16
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -222
- package/dist/_dts/blocks/src/portal/types.d.ts +3 -3
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +1 -14
- package/dist/_dts/blocks/src/subroutes/index.d.ts +1 -1
- package/dist/_dts/blocks/src/subroutes/kinds.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/course-details.d.ts +0 -11
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +3 -4
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +401 -12
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +9 -10
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -13
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +1 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +1 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +19 -18
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +9 -11
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +10 -10
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -10
- 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 +162 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +59 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +134 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/discounts.d.ts +85 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +241 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/forms.d.ts +53 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/newsletter.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +220 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +176 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +12 -1121
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +19 -583
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +9 -276
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +1 -12
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/logic.d.ts +1 -18
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/runs.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details.server.d.ts +1 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/courseRegistrationViewState.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/types.d.ts +0 -25
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseEligibility.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationPortal.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +80 -55
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseWaitlistSelection.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.contract.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +0 -38
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +0 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventScope.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +0 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +0 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +0 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +24 -433
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +52 -266
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventFilters.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +1573 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +1 -3
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -3
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +0 -5
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +0 -5
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -3
- package/dist/_dts/core/src/editor-state.d.ts +1 -13
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +1580 -120
- package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +6 -6
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +27 -4
- package/dist/_dts/sdk/src/cli/commands/audit.d.ts +1 -2
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/pull-dry-run.d.ts +4 -6
- package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +0 -1
- package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/content/collectionWriters.d.ts +23 -0
- package/dist/_dts/sdk/src/cli/content/metadataAfterPush.d.ts +25 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +0 -52
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +3 -81
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +6 -9
- package/dist/_dts/sdk/src/client/contentReadOperations.d.ts +40 -0
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -3
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -91
- package/dist/_dts/sdk/src/client/runtimeCacheKeys.d.ts +72 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +10 -75
- package/dist/_dts/sdk/src/client/types.d.ts +7 -33
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -6
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +0 -8
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -34
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +4 -3
- package/dist/_dts/sdk/src/next/catch-all-utils.d.ts +0 -11
- package/dist/_dts/sdk/src/next/catch-all.d.ts +1 -76
- package/dist/_dts/sdk/src/next/types.d.ts +0 -19
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +7 -207
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +0 -7
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +81 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +1 -51
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +6 -6
- package/dist/_dts/sdk/src/routing/index.d.ts +0 -2
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +3 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +10 -39
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/adapter.d.ts +1 -1
- package/dist/_dts/site-commands/src/appointmentCommandSchemas.d.ts +100 -0
- package/dist/_dts/site-commands/src/capabilityGaps.d.ts +2 -2
- package/dist/_dts/site-commands/src/commandContract.d.ts +1242 -0
- package/dist/_dts/site-commands/src/commandDomain.d.ts +20 -0
- package/dist/_dts/site-commands/src/commandIdentifiers.d.ts +7 -0
- package/dist/_dts/site-commands/src/commandValidation.d.ts +10 -0
- package/dist/_dts/site-commands/src/commands.d.ts +729 -2659
- package/dist/_dts/site-commands/src/domain.d.ts +1 -1
- package/dist/_dts/site-commands/src/eventCommandContent.d.ts +11 -0
- package/dist/_dts/site-commands/src/exposure.d.ts +1 -1
- package/dist/_dts/site-commands/src/index.d.ts +6 -0
- package/dist/_dts/site-commands/src/metadata.d.ts +1 -27
- package/dist/_dts/site-commands/src/planner.d.ts +1 -1
- package/dist/_dts/site-commands/src/refContributions.d.ts +1 -1
- package/dist/_dts/site-commands/src/refs.d.ts +1 -4
- package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +378 -0
- package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +46 -0
- package/dist/_dts/site-commands/src/staticExecutionGaps.d.ts +2 -2
- package/dist/_dts/site-commands/src/venueCommandMapping.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +58 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +47 -24
- package/dist/cli/index.mjs +7250 -8478
- package/dist/cli/init-docs/content/cli-reference.md +5 -21
- package/dist/cli/init-docs/content/content-management.md +4 -5
- package/dist/client/{DiscountCodeDisclosure-DIWj-P9v.mjs → DiscountCodeDisclosure-DxvjKvck.mjs} +2 -2
- package/dist/client/{EventCombined.client-De8YWBSr.mjs → EventCombined.client-BydMGc4c.mjs} +5 -16
- package/dist/client/{EventListing.client-seHTjimY.mjs → EventListing.client-vpzhhysN.mjs} +3 -10
- package/dist/client/{LeafletStaticMap-BmQxFcJW.mjs → LeafletStaticMap-CB07rpf8.mjs} +1 -1
- package/dist/client/{MagicLinkForm-OoJAIUIj.mjs → MagicLinkForm-BzyRJ8VF.mjs} +2 -2
- package/dist/client/{StepIndicator-CiZ8kdPk.mjs → StepIndicator-CTcGf8Be.mjs} +2 -2
- package/dist/client/{accordion-6lnN__XJ.mjs → accordion-B-DUDLRD.mjs} +1 -1
- package/dist/client/{bookingForm-5uyqhONU.mjs → bookingForm-DSbClLcZ.mjs} +6 -6
- package/dist/client/bookings.mjs +753 -818
- package/dist/client/{carousel-Dtnifil_.mjs → carousel-B6Ccdx8M.mjs} +1 -1
- package/dist/client/{cart-5Tc5S7NV.mjs → cart-BZh8G8wM.mjs} +3 -3
- package/dist/client/{checkout-CYKKN5Hr.mjs → checkout-o6zaC-kM.mjs} +3 -3
- package/dist/client/client.mjs +6859 -7149
- package/dist/client/{context-BGZNlGXB.mjs → context-CJz1Vlsz.mjs} +40 -43
- package/dist/client/{courseRegistration-CxCBybB4.mjs → courseRegistration-Cf11pNDs.mjs} +606 -621
- package/dist/client/{eventCalendar-Xj2jZS9X.mjs → eventCalendar-BeXrdsSE.mjs} +5 -13
- package/dist/client/{eventCombined-CgcMoOgM.mjs → eventCombined-DA76PZgG.mjs} +3 -3
- package/dist/client/{eventDetails-CEAH8Edc.mjs → eventDetails-BLxg0rok.mjs} +140 -116
- package/dist/client/{eventListing-qyPVQ0wP.mjs → eventListing-tO9LheBX.mjs} +3 -3
- package/dist/client/{eventRegistration-DDu79CtL.mjs → eventRegistration-Cnene9D9.mjs} +165 -68
- package/dist/client/{form-Bc7JKI7I.mjs → form-DZf72CHB.mjs} +2 -2
- package/dist/client/{headerSection-vTku_LEl.mjs → headerSection-Hioja5Cr.mjs} +2 -2
- package/dist/client/hooks.mjs +3452 -2365
- package/dist/client/{locationMap-Bg7X4Jna.mjs → locationMap-DwhUXEix.mjs} +2 -2
- package/dist/client/{newsletterForm-lpylVdp5.mjs → newsletterForm-C350bEQf.mjs} +2 -2
- package/dist/client/{pricing-DE8fjJiT.mjs → pricing-BYWN_ATa.mjs} +3 -19
- package/dist/client/{productDetail-D7Bo2RMH.mjs → productDetail-CCqCyXgU.mjs} +3 -3
- package/dist/client/{productList-VjnZqiqN.mjs → productList-BAiNJrOU.mjs} +3 -3
- package/dist/client/{propsDecoder-DreFXjNP.mjs → propsDecoder-DeunRj6m.mjs} +210 -378
- package/dist/client/rendering/client.mjs +2541 -2813
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +5622 -4734
- package/dist/client/{shop-IRsHHbf7.mjs → shop-DUmCdBtw.mjs} +6 -6
- package/dist/client/{shop-commerce-gnI8PieZ.mjs → shop-commerce-CY27mEUr.mjs} +5 -5
- package/dist/client/{shop-commerce-store-BTbrhObn.mjs → shop-commerce-store-ChXPbWfa.mjs} +1 -1
- package/dist/client/{shopShared-D6KS2_qk.mjs → shopShared-q0kin1cv.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-DCccGCxV.mjs → useDiscountCodeUi-I-92-x2V.mjs} +2 -2
- package/dist/client/{useEventFilters-eGs3rPZQ.mjs → useEventFilters-DlcVluZh.mjs} +59 -124
- package/dist/client/{usePolling-CvSU2sur.mjs → usePolling-Bz7GFV_a.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +1115 -1044
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +1118 -1047
- package/dist/{previewAuthStore-ShY26RNz.mjs → previewAuthStore-CJX21dGi.mjs} +1121 -1047
- package/dist/{sdk-runtime-CJxkFq2B.mjs → sdk-runtime-OnPM8Z69.mjs} +2 -2
- package/dist/{separator-CoFmo8uA.mjs → separator-CPtfzHqA.mjs} +1 -1
- package/dist/server/components.mjs +4560 -3672
- package/dist/server/config-validation.mjs +3454 -2356
- package/dist/server/config.mjs +3454 -2356
- package/dist/server/data.mjs +3452 -2367
- package/dist/server/index.mjs +1501 -1491
- package/dist/server/next.mjs +7524 -8067
- package/dist/server/page-converter.mjs +1898 -2040
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4258 -3373
- package/dist/server/rendering.mjs +6228 -5393
- package/dist/server/routing.mjs +3614 -2509
- package/dist/server/server.mjs +3298 -3479
- package/package.json +1 -1
- package/dist/_dts/api/src/previewContentContract.d.ts +0 -4
- package/dist/_dts/sdk/src/cli/commands/course.d.ts +0 -6
- package/dist/_dts/sdk/src/cli/commands/push/scopes/courses.d.ts +0 -4
- package/dist/_dts/sdk/src/client/management/courses.d.ts +0 -10
- package/dist/_dts/sdk/src/routing/resolveEntrySubroute.d.ts +0 -36
|
@@ -8,7 +8,7 @@ import type { BlockBookingPaymentTerms } from '../../shared/bookingPaymentTerms'
|
|
|
8
8
|
import type { PublicTeamMemberSummary } from '../../shared/teamMembers';
|
|
9
9
|
import type { CoursePricing } from '../../courses/shared/types';
|
|
10
10
|
import type { eventCalendarDefaultViewValues, eventCalendarDisplayModeValues, eventCalendarListLayoutValues } from '../../../constants/events';
|
|
11
|
-
import type {
|
|
11
|
+
import type { EventScheduleScope, EventSurfacePreset, EventSurfaceScope } from './filtering';
|
|
12
12
|
import type { CardVariantRole, LegacyCardVariantRoleAlias } from '../../../../../../theme-core/src/cards/index';
|
|
13
13
|
import type { BlockButtonRole } from '../../../constants/buttonRoles';
|
|
14
14
|
/**
|
|
@@ -96,8 +96,8 @@ export type PublicEventAttendanceModeAvailability = {
|
|
|
96
96
|
* Used by Event Spotlight, Event Calendar, and Event Listing blocks
|
|
97
97
|
*/
|
|
98
98
|
export type PublicEvent = {
|
|
99
|
-
/**
|
|
100
|
-
|
|
99
|
+
/** Canonical registration scope for this occurrence's series. */
|
|
100
|
+
bookingScope: "single_occurrence" | "whole_series";
|
|
101
101
|
/** Canonical event-series preset when this is an event occurrence. */
|
|
102
102
|
eventPreset?: "event" | EventSurfacePreset;
|
|
103
103
|
/** Resolved destination mode for the event series. */
|
|
@@ -160,14 +160,12 @@ export type PublicEvent = {
|
|
|
160
160
|
acceptsPasses?: boolean;
|
|
161
161
|
/** Whether the event accepts membership access (from event series settings) */
|
|
162
162
|
acceptsMemberships?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
pricing
|
|
167
|
-
/** Course price in cents (paid once for all sessions) */
|
|
168
|
-
priceCents: number | null;
|
|
163
|
+
/** Registration projection when this occurrence belongs to one whole-series booking. */
|
|
164
|
+
wholeSeries?: {
|
|
165
|
+
eventSeriesId: string;
|
|
166
|
+
pricing: CoursePricing;
|
|
169
167
|
currency: string;
|
|
170
|
-
/** True if the
|
|
168
|
+
/** True if the whole-series registration window remains open. */
|
|
171
169
|
enrollmentOpen: boolean;
|
|
172
170
|
} | null;
|
|
173
171
|
};
|
|
@@ -225,4 +223,4 @@ export type FilterAutoShow = "auto" | "always" | "never";
|
|
|
225
223
|
* - week: Week view only
|
|
226
224
|
*/
|
|
227
225
|
export type CalendarTabViews = "both" | "month" | "week";
|
|
228
|
-
export type {
|
|
226
|
+
export type { EventScheduleScope, EventSurfacePreset, EventSurfaceScope };
|
|
@@ -57,7 +57,7 @@ export type OfferingsPreviewResolvedCta = Readonly<{
|
|
|
57
57
|
label: string;
|
|
58
58
|
}>;
|
|
59
59
|
export type BookingOfferingCanonicalBehaviour = OfferingsPreviewEventPreset | 'course' | 'appointment';
|
|
60
|
-
export type BookingOfferingEngine = 'event_series' | '
|
|
60
|
+
export type BookingOfferingEngine = 'event_series' | 'appointment_service';
|
|
61
61
|
export type BookingOfferingPresetSummary = Readonly<{
|
|
62
62
|
id: string;
|
|
63
63
|
canonicalBehaviour: BookingOfferingCanonicalBehaviour;
|
|
@@ -159,4 +159,4 @@ export declare function buildOfferingsPreviewRenderStates(input: Readonly<{
|
|
|
159
159
|
emptyMessage: string;
|
|
160
160
|
failedMessage: string;
|
|
161
161
|
}>): readonly OfferingsPreviewGroupRenderState[];
|
|
162
|
-
export declare function resolveOfferingsPreviewCoursePath(course: Pick<PublicCourse, '
|
|
162
|
+
export declare function resolveOfferingsPreviewCoursePath(course: Pick<PublicCourse, 'eventSeriesId' | 'eventOfferingId'>, routes: readonly OfferingsPreviewRouteCandidate[] | null | undefined): string | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "listPublicRecurringSchedule", "getPublicEventDetails", "
|
|
1
|
+
export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "listPublicRecurringSchedule", "getPublicEventDetails", "listPublicWholeSeriesOfferings", "listPublicRouteCandidates", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices", "getPublicWeeklySlotAvailability"];
|
|
2
2
|
export type SupportedLoaderEndpoint = typeof SUPPORTED_LOADER_ENDPOINTS[number];
|
|
3
3
|
export declare function isSupportedLoaderEndpoint(endpoint: string): endpoint is SupportedLoaderEndpoint;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Factory function for creating a typed API client for block client-side API calls.
|
|
5
5
|
*/
|
|
6
|
-
import type { BlockApiConfig, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, BookingSubmitRequest, BookingPackageSubmitRequest, BookingSubmitResponse, EligibleAppointmentPackagesResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, WeeklySlotAvailabilityRequest, WeeklySlotAvailabilityResponse, AvailableDatesRequest, AvailableDatesResponse, BookingServicesResponse, BookingServiceResponse, BookingResourcesResponse, PublicEventsRequest, PublicEvent, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, EligibilityCheckRequest, EligibilityCheckResponse, EventRegistrationStatusRequest, EventRegistrationStatusResponse,
|
|
6
|
+
import type { BlockApiConfig, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, BookingSubmitRequest, BookingPackageSubmitRequest, BookingSubmitResponse, EligibleAppointmentPackagesResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, WeeklySlotAvailabilityRequest, WeeklySlotAvailabilityResponse, AvailableDatesRequest, AvailableDatesResponse, BookingServicesResponse, BookingServiceResponse, BookingResourcesResponse, PublicEventsRequest, PublicEvent, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, EligibilityCheckRequest, EligibilityCheckResponse, EventRegistrationStatusRequest, EventRegistrationStatusResponse, WholeSeriesRegistrationRequest, WholeSeriesRegistrationResponse, WholeSeriesEligibilityRequest, WholeSeriesEligibilityResponse, WholeSeriesCheckoutRequest, WholeSeriesCheckoutResponse, WholeSeriesRegistrationStatusRequest, WholeSeriesRegistrationStatusResponse, ResolveWaitlistClaimRequest, ResolveWaitlistClaimResponse, DiscountsAvailableRequest, DiscountsAvailableResponse, DiscountApplyRequest, DiscountApplyResponse, PublicProductsResponse, ShopCheckoutRequest, ShopCheckoutResponse, UnifiedCheckoutRequest, UnifiedCheckoutResponse, PublicGiftingOffersResponse, CreateGiftingCheckoutRequest, CreateGiftingCheckoutResponse, ClaimGiftCardRequest, ClaimGiftCardResponse, PortalMeResponse, CustomerProfile, CustomerOrder, PortalMeUpdateRequest, CustomerPass, CustomerMembership, CustomerEventRegistration, PortalEventTicket, CustomerAppointment, BookingQuestionsTaskDetail, CustomerCourseEnrollment, PortalCredit, PortalOrderCheckoutRequest, PortalOrderCheckoutResponse, PortalDigitalProductAccessResponse, PortalDigitalProductDownloadUrlResponse, PortalDigitalProductsResponse, PortalCancelWholeSeriesRegistrationRequest, PortalCancelWholeSeriesRegistrationResult, PortalCancelAppointmentRequest, PortalCancelAppointmentResult, PortalUpdateAppointmentBookingQuestionsRequest, PortalUpdateWholeSeriesBookingQuestionsRequest, PortalUpdateEventBookingQuestionsRequest, PortalCancelEventRegistrationRequest, PortalCancelEventRegistrationResult, PortalTransferEventRegistrationRequest, PortalTransferEventRegistrationResult, PortalRescheduleAppointmentRequest, PortalRescheduleAppointmentResponse, PortalCancelMembershipAtPeriodEndResult, MagicLinkRequest, EventGuest, UpdateEventGuestsRequest, NewsletterSubscribeRequest, NewsletterSubscribeResponse } from './types';
|
|
7
7
|
type PublicProductCategorySelector = Readonly<{
|
|
8
8
|
kind: 'category';
|
|
9
9
|
productCategoryId: string;
|
|
@@ -43,16 +43,16 @@ export interface BlockApiClient {
|
|
|
43
43
|
serviceId: string;
|
|
44
44
|
}): Promise<BookingResourcesResponse>;
|
|
45
45
|
getPublicEvents(params?: Omit<PublicEventsRequest, 'siteId'>): Promise<PublicEvent[]>;
|
|
46
|
-
getEventFilters(params?: Pick<PublicEventsRequest, 'categoryIds' | 'venueId' | 'staffMemberId' | '
|
|
46
|
+
getEventFilters(params?: Pick<PublicEventsRequest, 'categoryIds' | 'venueId' | 'staffMemberId' | 'eventSurface' | 'eventPresets' | 'scheduleScope'>): Promise<EventFiltersResponse>;
|
|
47
47
|
registerForEvent(data: Omit<EventRegisterRequest, 'siteId'>): Promise<EventRegisterResponse>;
|
|
48
48
|
createEventCheckout(data: Omit<EventCheckoutRequest, 'siteId'>): Promise<EventCheckoutResponse>;
|
|
49
49
|
checkEligibility(data: Omit<EligibilityCheckRequest, 'siteId'>): Promise<EligibilityCheckResponse>;
|
|
50
50
|
getEventRegistrationStatus(params: Omit<EventRegistrationStatusRequest, 'siteId'>): Promise<EventRegistrationStatusResponse>;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
registerForWholeSeries(data: Omit<WholeSeriesRegistrationRequest, 'siteId'>): Promise<WholeSeriesRegistrationResponse>;
|
|
52
|
+
checkWholeSeriesEligibility(data: Omit<WholeSeriesEligibilityRequest, 'siteId'>): Promise<WholeSeriesEligibilityResponse>;
|
|
53
53
|
resolveWaitlistClaim(data: Omit<ResolveWaitlistClaimRequest, 'siteId'>): Promise<ResolveWaitlistClaimResponse>;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
createWholeSeriesCheckout(data: Omit<WholeSeriesCheckoutRequest, 'siteId'>): Promise<WholeSeriesCheckoutResponse>;
|
|
55
|
+
getWholeSeriesRegistrationStatus(params: Omit<WholeSeriesRegistrationStatusRequest, 'siteId'>): Promise<WholeSeriesRegistrationStatusResponse>;
|
|
56
56
|
getDiscountsAvailable(data: Omit<DiscountsAvailableRequest, 'siteId'>): Promise<DiscountsAvailableResponse>;
|
|
57
57
|
applyDiscountCode(data: Omit<DiscountApplyRequest, 'siteId'>): Promise<DiscountApplyResponse>;
|
|
58
58
|
getPublicProducts(params?: {
|
|
@@ -84,10 +84,10 @@ export interface BlockApiClient {
|
|
|
84
84
|
updatePortalAppointmentBookingQuestions(appointmentId: string, data: PortalUpdateAppointmentBookingQuestionsRequest): Promise<BookingQuestionsTaskDetail>;
|
|
85
85
|
getPortalEventBookingQuestions(registrationId: string): Promise<BookingQuestionsTaskDetail>;
|
|
86
86
|
updatePortalEventBookingQuestions(registrationId: string, data: PortalUpdateEventBookingQuestionsRequest): Promise<BookingQuestionsTaskDetail>;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
getPortalWholeSeriesRegistrations(): Promise<CustomerCourseEnrollment[]>;
|
|
88
|
+
getPortalWholeSeriesBookingQuestions(enrollmentId: string): Promise<BookingQuestionsTaskDetail>;
|
|
89
|
+
updatePortalWholeSeriesBookingQuestions(enrollmentId: string, data: PortalUpdateWholeSeriesBookingQuestionsRequest): Promise<BookingQuestionsTaskDetail>;
|
|
90
|
+
cancelWholeSeriesRegistration(enrollmentId: string, options?: PortalCancelWholeSeriesRegistrationRequest): Promise<PortalCancelWholeSeriesRegistrationResult>;
|
|
91
91
|
cancelAppointment(appointmentId: string, options?: PortalCancelAppointmentRequest): Promise<PortalCancelAppointmentResult>;
|
|
92
92
|
rescheduleAppointment(appointmentId: string, data: PortalRescheduleAppointmentRequest): Promise<PortalRescheduleAppointmentResponse>;
|
|
93
93
|
cancelEventRegistration(registrationId: string, options?: PortalCancelEventRegistrationRequest): Promise<PortalCancelEventRegistrationResult>;
|
|
@@ -101,7 +101,7 @@ export declare const EVENTS: {
|
|
|
101
101
|
method: "GET";
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
-
export declare const
|
|
104
|
+
export declare const WHOLE_SERIES: {
|
|
105
105
|
list: {
|
|
106
106
|
path: string;
|
|
107
107
|
method: "GET";
|
|
@@ -285,25 +285,25 @@ export declare const PORTAL: {
|
|
|
285
285
|
authScope: "portal";
|
|
286
286
|
skipPreviewStage: true;
|
|
287
287
|
};
|
|
288
|
-
|
|
288
|
+
getWholeSeriesRegistrations: {
|
|
289
289
|
path: string;
|
|
290
290
|
method: "GET";
|
|
291
291
|
authScope: "portal";
|
|
292
292
|
skipPreviewStage: true;
|
|
293
293
|
};
|
|
294
|
-
|
|
294
|
+
getWholeSeriesBookingQuestions: {
|
|
295
295
|
path: string;
|
|
296
296
|
method: "GET";
|
|
297
297
|
authScope: "portal";
|
|
298
298
|
skipPreviewStage: true;
|
|
299
299
|
};
|
|
300
|
-
|
|
300
|
+
updateWholeSeriesBookingQuestions: {
|
|
301
301
|
path: string;
|
|
302
302
|
method: "PUT";
|
|
303
303
|
authScope: "portal";
|
|
304
304
|
skipPreviewStage: true;
|
|
305
305
|
};
|
|
306
|
-
|
|
306
|
+
cancelWholeSeriesRegistration: {
|
|
307
307
|
path: string;
|
|
308
308
|
method: "POST";
|
|
309
309
|
authScope: "portal";
|
|
@@ -447,7 +447,7 @@ export declare const ENDPOINTS: {
|
|
|
447
447
|
method: "GET";
|
|
448
448
|
};
|
|
449
449
|
};
|
|
450
|
-
readonly
|
|
450
|
+
readonly wholeSeries: {
|
|
451
451
|
list: {
|
|
452
452
|
path: string;
|
|
453
453
|
method: "GET";
|
|
@@ -617,25 +617,25 @@ export declare const ENDPOINTS: {
|
|
|
617
617
|
authScope: "portal";
|
|
618
618
|
skipPreviewStage: true;
|
|
619
619
|
};
|
|
620
|
-
|
|
620
|
+
getWholeSeriesRegistrations: {
|
|
621
621
|
path: string;
|
|
622
622
|
method: "GET";
|
|
623
623
|
authScope: "portal";
|
|
624
624
|
skipPreviewStage: true;
|
|
625
625
|
};
|
|
626
|
-
|
|
626
|
+
getWholeSeriesBookingQuestions: {
|
|
627
627
|
path: string;
|
|
628
628
|
method: "GET";
|
|
629
629
|
authScope: "portal";
|
|
630
630
|
skipPreviewStage: true;
|
|
631
631
|
};
|
|
632
|
-
|
|
632
|
+
updateWholeSeriesBookingQuestions: {
|
|
633
633
|
path: string;
|
|
634
634
|
method: "PUT";
|
|
635
635
|
authScope: "portal";
|
|
636
636
|
skipPreviewStage: true;
|
|
637
637
|
};
|
|
638
|
-
|
|
638
|
+
cancelWholeSeriesRegistration: {
|
|
639
639
|
path: string;
|
|
640
640
|
method: "POST";
|
|
641
641
|
authScope: "portal";
|
|
@@ -43,7 +43,7 @@ export { createBlockApi, BlockApiError } from './client';
|
|
|
43
43
|
export type { BlockApiClient } from './client';
|
|
44
44
|
export { BlockApiProvider, useBlockApi, useBlockApiOptional } from './context';
|
|
45
45
|
export type { BlockApiProviderProps } from './context';
|
|
46
|
-
export type { BlockApiConfig, BlockApiAuth, ApiKeyAuth, BearerAuth, NoAuth, ApiResponse, ApiSuccessResponse, ApiErrorResponse, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, FormField, BookingSubmitRequest, BookingSubmitResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, TimeSlot, AvailableDatesRequest, AvailableDatesResponse, BookingService, BookingServicesRequest, BookingServicesResponse, BookingServiceResponse, BookingResource, BookingResourcesRequest, BookingResourcesResponse, PublicEvent, PublicEventsRequest, PublicEventsResponse, EventVenue, PricingType, AccessRestriction, EventFilterCategory, EventFilterStaffMember, EventFilterVenue, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, PaymentMethod, EligibilityCheckRequest, EligibilityCheckResponse, EligiblePass, EligibleMembership, AvailablePass, AvailableMembership, CoursePaymentMethod,
|
|
46
|
+
export type { BlockApiConfig, BlockApiAuth, ApiKeyAuth, BearerAuth, NoAuth, ApiResponse, ApiSuccessResponse, ApiErrorResponse, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, FormField, BookingSubmitRequest, BookingSubmitResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, TimeSlot, AvailableDatesRequest, AvailableDatesResponse, BookingService, BookingServicesRequest, BookingServicesResponse, BookingServiceResponse, BookingResource, BookingResourcesRequest, BookingResourcesResponse, PublicEvent, PublicEventsRequest, PublicEventsResponse, EventVenue, PricingType, AccessRestriction, EventFilterCategory, EventFilterStaffMember, EventFilterVenue, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, PaymentMethod, EligibilityCheckRequest, EligibilityCheckResponse, EligiblePass, EligibleMembership, AvailablePass, AvailableMembership, CoursePaymentMethod, WholeSeriesRegistrationRequest, WholeSeriesRegistrationResponse, WholeSeriesRegistrationSuccessResponse, WholeSeriesWaitlistResponse, WholeSeriesCheckoutRequest, WholeSeriesCheckoutResponse, DiscountContext, DiscountsAvailableRequest, DiscountsAvailableResponse, DiscountApplyLine, DiscountApplyRequest, DiscountApplyRejectedReason, DiscountApplyResponse, ShopCheckoutRequest, ShopCheckoutResponse, ShopDuplicateMembershipWarning, CustomerProfile, CustomerOrder, CustomerOrderFilter, CustomerOrderItem, CustomerOrderInstalmentPlan, CustomerOrderInstalmentPlanStatus, CustomerOrderInstalmentRow, CustomerOrderInstalmentStatus, CustomerOrderPaymentState, CustomerOrderRefund, EnabledModules, PortalMeResponse, PortalMeUpdateRequest, CustomerPass, CustomerPassCreditHistoryEntry, CustomerMembership, EventTicketBreakdownLine, CustomerEventRegistration, PortalEventTicket, CustomerAppointment, AppointmentBookingQuestionsTaskDetail, BookingQuestionsTaskDetail, BookingQuestionsAnswerValue, BookingQuestionsField, BookingQuestionsFieldOption, BookingQuestionsSection, BeforeYouComeTaskSummary, CustomerCourseEnrollment, EventGuest, PortalCredit, PortalCreditSummary, PortalCreditTransaction, PortalCreditResponse, PortalOrderCheckoutRequest, PortalOrderCheckoutResponse, PortalDigitalProduct, PortalDigitalProductFile, PortalDigitalProductsResponse, PortalDigitalProductAccessResponse, PortalDigitalProductDownloadUrlResponse, PortalAppointmentBookingQuestionsResponse, PortalCreateAppointmentBookingQuestionsUploadUrlRequest, PortalCreateAppointmentBookingQuestionsUploadUrlResponse, PortalFinalizeAppointmentBookingQuestionsUploadRequest, PortalFinalizeAppointmentBookingQuestionsUploadResponse, PortalUpdateAppointmentBookingQuestionsRequest, PortalUpdateAppointmentBookingQuestionsResponse, PortalEventBookingQuestionsResponse, PortalCreateEventBookingQuestionsUploadUrlRequest, PortalCreateEventBookingQuestionsUploadUrlResponse, PortalFinalizeEventBookingQuestionsUploadRequest, PortalFinalizeEventBookingQuestionsUploadResponse, PortalUpdateEventBookingQuestionsRequest, PortalUpdateEventBookingQuestionsResponse, PortalWholeSeriesBookingQuestionsResponse, PortalCreateWholeSeriesBookingQuestionsUploadUrlRequest, PortalCreateWholeSeriesBookingQuestionsUploadUrlResponse, PortalFinalizeWholeSeriesBookingQuestionsUploadRequest, PortalFinalizeWholeSeriesBookingQuestionsUploadResponse, PortalUpdateWholeSeriesBookingQuestionsRequest, PortalUpdateWholeSeriesBookingQuestionsResponse, UpdateEventGuestsRequest, EventGuestsResponse, PortalCancelWholeSeriesRegistrationRequest, PortalCancelWholeSeriesRegistrationResult, PortalCancelAppointmentRequest, PortalCancelAppointmentResult, PortalCancelEventRegistrationRequest, PortalRefundInfo, PortalCancelEventRegistrationResult, PortalTransferEventRegistrationRequest, PortalTransferEventRegistrationResult, PortalRescheduleAppointmentRequest, PortalRescheduleAppointmentResponse, PortalCancelMembershipAtPeriodEndResult, MagicLinkRequest, } from './types';
|
|
47
47
|
export { discountAvailabilityAllowsManualEntry, discountAvailabilityHasDiscounts, getAutoAppliedDiscountPreview, } from './types';
|
|
48
48
|
export type { BookingQuestionsDocumentAnswerValue } from '../../../portal/types';
|
|
49
49
|
export { deriveCreditProductLabels, getCreditProductCreditUnit, getCreditProductTypeLabel, getPortalCreditProductCreditNoun, } from './creditProducts';
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appointment booking, availability, service and resource types
|
|
3
|
+
*
|
|
4
|
+
* Part of the block API client type surface; re-exported from `../types`.
|
|
5
|
+
*/
|
|
6
|
+
import type { AppointmentResourceId } from "../../../../../../core/src/index";
|
|
7
|
+
export interface BookingSubmitRequest {
|
|
8
|
+
formId: string;
|
|
9
|
+
serviceId: string;
|
|
10
|
+
resourceId?: string | null;
|
|
11
|
+
startAt: string;
|
|
12
|
+
endAt: string;
|
|
13
|
+
customFields: Record<string, unknown>;
|
|
14
|
+
timezone: string;
|
|
15
|
+
discountCode?: string;
|
|
16
|
+
selectedSlidingAmount?: number;
|
|
17
|
+
selectedCollectionOptionKind?: "upfront" | "deferred_manual" | "instalment_plan" | "flexible_balance";
|
|
18
|
+
altchaSolution?: string | null;
|
|
19
|
+
successUrl?: string;
|
|
20
|
+
cancelUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
export type BookingPackageSubmitRequest = Omit<BookingSubmitRequest, "altchaSolution" | "cancelUrl" | "discountCode" | "selectedCollectionOptionKind" | "successUrl"> & {
|
|
23
|
+
customerPassId: string;
|
|
24
|
+
};
|
|
25
|
+
export type BookingAppointmentSummary = {
|
|
26
|
+
id: string;
|
|
27
|
+
status: "confirmed" | "pending" | "cancelled";
|
|
28
|
+
startAt: string;
|
|
29
|
+
endAt: string;
|
|
30
|
+
timezone: string;
|
|
31
|
+
resourceName: string | null;
|
|
32
|
+
};
|
|
33
|
+
export type BookingCustomerSummary = {
|
|
34
|
+
id: string;
|
|
35
|
+
email: string | null;
|
|
36
|
+
name: string | null;
|
|
37
|
+
phone: string | null;
|
|
38
|
+
};
|
|
39
|
+
export type BookingSubmitResponse = {
|
|
40
|
+
type: "booked";
|
|
41
|
+
orderId: string;
|
|
42
|
+
orderNumber: string;
|
|
43
|
+
appointment: BookingAppointmentSummary;
|
|
44
|
+
customer: BookingCustomerSummary;
|
|
45
|
+
} | {
|
|
46
|
+
type: "checkout_redirect";
|
|
47
|
+
orderId: string;
|
|
48
|
+
orderNumber: string;
|
|
49
|
+
checkoutUrl: string;
|
|
50
|
+
sessionId: string;
|
|
51
|
+
appointment: BookingAppointmentSummary;
|
|
52
|
+
customer: BookingCustomerSummary;
|
|
53
|
+
};
|
|
54
|
+
export type EligibleAppointmentPackage = {
|
|
55
|
+
customerPassId: string;
|
|
56
|
+
passId: string;
|
|
57
|
+
passName: string;
|
|
58
|
+
passDescription: string | null;
|
|
59
|
+
creditsRemaining: number;
|
|
60
|
+
creditsTotal: number;
|
|
61
|
+
expiresAt: string | null;
|
|
62
|
+
};
|
|
63
|
+
export interface EligibleAppointmentPackagesResponse {
|
|
64
|
+
packages: EligibleAppointmentPackage[];
|
|
65
|
+
}
|
|
66
|
+
export interface AppointmentBookingStatusRequest {
|
|
67
|
+
siteId: string;
|
|
68
|
+
sessionId: string;
|
|
69
|
+
}
|
|
70
|
+
export type AppointmentBookingStatusResponse = {
|
|
71
|
+
appointmentId: string;
|
|
72
|
+
appointmentStatus: "pending" | "confirmed" | "cancelled";
|
|
73
|
+
resourceName: string | null;
|
|
74
|
+
paymentStatus: "pending" | "completed" | "failed" | "cancelled" | "refunded" | "not_required";
|
|
75
|
+
};
|
|
76
|
+
export interface AvailableSlotsRequest {
|
|
77
|
+
siteId: string;
|
|
78
|
+
serviceId: string;
|
|
79
|
+
startDate: string;
|
|
80
|
+
endDate: string;
|
|
81
|
+
timezone: string;
|
|
82
|
+
resourceId?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface TimeSlot {
|
|
85
|
+
startAt: string;
|
|
86
|
+
endAt: string;
|
|
87
|
+
resourceId: AppointmentResourceId;
|
|
88
|
+
}
|
|
89
|
+
export interface AvailableSlotsResponse {
|
|
90
|
+
slots: TimeSlot[];
|
|
91
|
+
}
|
|
92
|
+
export interface WeeklySlotAvailabilityRequest {
|
|
93
|
+
siteId: string;
|
|
94
|
+
serviceId: string;
|
|
95
|
+
resourceId?: string;
|
|
96
|
+
horizonWeeks?: number;
|
|
97
|
+
timezone: string;
|
|
98
|
+
}
|
|
99
|
+
export interface WeeklySlotAvailabilityOption {
|
|
100
|
+
id: string;
|
|
101
|
+
resourceId: string;
|
|
102
|
+
weekday: number;
|
|
103
|
+
weekdayLabel: string;
|
|
104
|
+
startTime: string;
|
|
105
|
+
endTime: string;
|
|
106
|
+
nextDate: string;
|
|
107
|
+
availableWeeks: number;
|
|
108
|
+
}
|
|
109
|
+
export interface WeeklySlotAvailabilityResponse {
|
|
110
|
+
slots: WeeklySlotAvailabilityOption[];
|
|
111
|
+
horizonWeeks: number;
|
|
112
|
+
timezone: string;
|
|
113
|
+
startDate: string;
|
|
114
|
+
endDate: string;
|
|
115
|
+
}
|
|
116
|
+
export interface AvailableDatesRequest {
|
|
117
|
+
siteId: string;
|
|
118
|
+
serviceId: string;
|
|
119
|
+
startDate: string;
|
|
120
|
+
endDate: string;
|
|
121
|
+
timezone: string;
|
|
122
|
+
resourceId?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface AvailableDatesResponse {
|
|
125
|
+
dates: string[];
|
|
126
|
+
hasMore: boolean;
|
|
127
|
+
nextStartDate?: string;
|
|
128
|
+
startDate: string;
|
|
129
|
+
endDate: string;
|
|
130
|
+
}
|
|
131
|
+
export interface BookingService {
|
|
132
|
+
id: string;
|
|
133
|
+
siteId: string;
|
|
134
|
+
title: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
durationMinutes?: number;
|
|
137
|
+
pricing?: import("../../nodes/booking-form.state").BookingFormServicePricing;
|
|
138
|
+
priceAmount?: number | null;
|
|
139
|
+
priceCurrency?: string | null;
|
|
140
|
+
paymentTerms?: import("../../../blocks/shared/bookingPaymentTerms").BlockBookingPaymentTerms;
|
|
141
|
+
}
|
|
142
|
+
export interface BookingServicesRequest {
|
|
143
|
+
siteId: string;
|
|
144
|
+
ids?: string[];
|
|
145
|
+
}
|
|
146
|
+
export interface BookingServicesResponse {
|
|
147
|
+
services: BookingService[];
|
|
148
|
+
}
|
|
149
|
+
export interface BookingServiceResponse {
|
|
150
|
+
service: BookingService;
|
|
151
|
+
}
|
|
152
|
+
export interface BookingResource {
|
|
153
|
+
id: string;
|
|
154
|
+
label: string;
|
|
155
|
+
}
|
|
156
|
+
export interface BookingResourcesRequest {
|
|
157
|
+
siteId: string;
|
|
158
|
+
serviceId: string;
|
|
159
|
+
}
|
|
160
|
+
export interface BookingResourcesResponse {
|
|
161
|
+
options: BookingResource[];
|
|
162
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Block API client configuration and response envelopes
|
|
3
|
+
*
|
|
4
|
+
* Part of the block API client type surface; re-exported from `../types`.
|
|
5
|
+
*/
|
|
6
|
+
export type DirectCheckoutCollectionOptionKind = "upfront" | "deferred_manual" | "flexible_balance";
|
|
7
|
+
/** API key auth for SDK sites (bld_live_sk_*) */
|
|
8
|
+
export type ApiKeyAuth = {
|
|
9
|
+
type: "api-key";
|
|
10
|
+
key: string;
|
|
11
|
+
};
|
|
12
|
+
/** Bearer token auth for preview mode or customer portal */
|
|
13
|
+
export type BearerAuth = {
|
|
14
|
+
type: "bearer";
|
|
15
|
+
token: string;
|
|
16
|
+
};
|
|
17
|
+
/** No auth - public endpoints only */
|
|
18
|
+
export type NoAuth = {
|
|
19
|
+
type: "none";
|
|
20
|
+
};
|
|
21
|
+
/** Auth strategy for Block API Client */
|
|
22
|
+
export type BlockApiAuth = ApiKeyAuth | BearerAuth | NoAuth;
|
|
23
|
+
/** Configuration for creating a Block API Client */
|
|
24
|
+
export interface BlockApiConfig {
|
|
25
|
+
/** Dashboard API URL (e.g., https://dashboard.example.com/api) */
|
|
26
|
+
baseUrl: string;
|
|
27
|
+
/** Auth strategy */
|
|
28
|
+
auth: BlockApiAuth;
|
|
29
|
+
/**
|
|
30
|
+
* Optional per-scope auth overrides.
|
|
31
|
+
* Useful when a single page needs multiple auth modes (e.g. preview + portal).
|
|
32
|
+
*/
|
|
33
|
+
authOverrides?: {
|
|
34
|
+
/**
|
|
35
|
+
* Auth override for customer portal endpoints (`/portal/*`).
|
|
36
|
+
* Portal endpoints are authenticated via a portal session token and are not stage-aware.
|
|
37
|
+
*/
|
|
38
|
+
portal?: BlockApiAuth;
|
|
39
|
+
};
|
|
40
|
+
/** Site ID for site-scoped endpoints */
|
|
41
|
+
siteId?: string;
|
|
42
|
+
/** Include draft content (adds stage=preview param) */
|
|
43
|
+
isPreview?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** API success response wrapper */
|
|
46
|
+
export interface ApiSuccessResponse<T> {
|
|
47
|
+
success: true;
|
|
48
|
+
data: T;
|
|
49
|
+
}
|
|
50
|
+
/** API error response */
|
|
51
|
+
export interface ApiErrorResponse {
|
|
52
|
+
success: false;
|
|
53
|
+
error: {
|
|
54
|
+
message: string;
|
|
55
|
+
code?: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** Standard API response */
|
|
59
|
+
export type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Course enrolment, eligibility and checkout types
|
|
3
|
+
*
|
|
4
|
+
* Part of the block API client type surface; re-exported from `../types`.
|
|
5
|
+
*/
|
|
6
|
+
import type { PaymentStatus } from "./events";
|
|
7
|
+
export type CoursePaymentMethod = "free" | "membership" | "stripe";
|
|
8
|
+
export interface WholeSeriesRegistrationRequest {
|
|
9
|
+
siteId: string;
|
|
10
|
+
eventSeriesId: string;
|
|
11
|
+
pricingOptionId?: string;
|
|
12
|
+
selectedSlidingAmount?: number;
|
|
13
|
+
email: string;
|
|
14
|
+
name: string;
|
|
15
|
+
phone?: string;
|
|
16
|
+
formData?: Record<string, unknown>;
|
|
17
|
+
altchaSolution?: string | null;
|
|
18
|
+
stage?: "preview" | "published";
|
|
19
|
+
paymentMethod?: Exclude<CoursePaymentMethod, "stripe">;
|
|
20
|
+
customerMembershipId?: string;
|
|
21
|
+
claimToken?: string;
|
|
22
|
+
}
|
|
23
|
+
interface WholeSeriesRegistrationBaseResponse {
|
|
24
|
+
waitlistPosition?: number | null;
|
|
25
|
+
courseTitle: string;
|
|
26
|
+
sessionsCount: number;
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
export interface WholeSeriesRegistrationSuccessResponse extends WholeSeriesRegistrationBaseResponse {
|
|
30
|
+
status: "enrolled";
|
|
31
|
+
enrollmentId: string;
|
|
32
|
+
paymentMethod: CoursePaymentMethod;
|
|
33
|
+
pendingPayment: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface WholeSeriesWaitlistResponse extends WholeSeriesRegistrationBaseResponse {
|
|
36
|
+
status: "waitlist";
|
|
37
|
+
paymentMethod: "free";
|
|
38
|
+
pendingPayment: false;
|
|
39
|
+
}
|
|
40
|
+
export type WholeSeriesRegistrationResponse = WholeSeriesRegistrationSuccessResponse | WholeSeriesWaitlistResponse;
|
|
41
|
+
export interface WholeSeriesEligibilityRequest {
|
|
42
|
+
siteId: string;
|
|
43
|
+
eventSeriesId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface WholeSeriesEligibilityResponse {
|
|
46
|
+
eventSeriesId: string;
|
|
47
|
+
canEnroll: boolean;
|
|
48
|
+
canJoinWaitlist: boolean;
|
|
49
|
+
reason?: string;
|
|
50
|
+
availableSpots: number | null;
|
|
51
|
+
isFull: boolean;
|
|
52
|
+
isOnWaitlist: boolean;
|
|
53
|
+
waitlistEnabled: boolean;
|
|
54
|
+
price: {
|
|
55
|
+
cents: number | null;
|
|
56
|
+
currency: string;
|
|
57
|
+
};
|
|
58
|
+
paymentOptions: {
|
|
59
|
+
free: boolean;
|
|
60
|
+
membership: boolean;
|
|
61
|
+
stripe: boolean;
|
|
62
|
+
};
|
|
63
|
+
eligibleMemberships?: Array<{
|
|
64
|
+
customerMembershipId: string;
|
|
65
|
+
membershipName: string;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export interface WholeSeriesCheckoutRequest {
|
|
69
|
+
siteId: string;
|
|
70
|
+
eventSeriesId: string;
|
|
71
|
+
pricingOptionId?: string;
|
|
72
|
+
selectedSlidingAmount?: number;
|
|
73
|
+
email: string;
|
|
74
|
+
name: string;
|
|
75
|
+
phone?: string;
|
|
76
|
+
formData?: Record<string, unknown>;
|
|
77
|
+
altchaSolution?: string | null;
|
|
78
|
+
/** Optional booking discount code (applies only to Stripe/card flows) */
|
|
79
|
+
discountCode?: string;
|
|
80
|
+
successUrl: string;
|
|
81
|
+
cancelUrl: string;
|
|
82
|
+
claimToken?: string;
|
|
83
|
+
}
|
|
84
|
+
export type WaitlistClaimSubject = {
|
|
85
|
+
kind: "event_occurrence";
|
|
86
|
+
occurrenceId: string;
|
|
87
|
+
attendanceMode: 'in_person' | 'online';
|
|
88
|
+
} | {
|
|
89
|
+
kind: "whole_series";
|
|
90
|
+
eventSeriesId: string;
|
|
91
|
+
};
|
|
92
|
+
export interface ResolveWaitlistClaimRequest {
|
|
93
|
+
siteId: string;
|
|
94
|
+
claimToken: string;
|
|
95
|
+
}
|
|
96
|
+
export interface ResolveWaitlistClaimResponse {
|
|
97
|
+
subject: WaitlistClaimSubject;
|
|
98
|
+
expiresAt: string;
|
|
99
|
+
customer: {
|
|
100
|
+
email: string;
|
|
101
|
+
name: string;
|
|
102
|
+
phone: string | null;
|
|
103
|
+
};
|
|
104
|
+
prefill: {
|
|
105
|
+
email: string;
|
|
106
|
+
name: string;
|
|
107
|
+
phone: string | null;
|
|
108
|
+
notes: string | null;
|
|
109
|
+
guests: Array<{
|
|
110
|
+
name: string;
|
|
111
|
+
email?: string | null;
|
|
112
|
+
phone: string | null;
|
|
113
|
+
}>;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface WholeSeriesCheckoutResponse {
|
|
117
|
+
checkoutUrl: string | null;
|
|
118
|
+
sessionId: string | null;
|
|
119
|
+
enrollmentId: string;
|
|
120
|
+
bypassed: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface WholeSeriesRegistrationStatusRequest {
|
|
123
|
+
siteId: string;
|
|
124
|
+
sessionId: string;
|
|
125
|
+
}
|
|
126
|
+
export interface WholeSeriesRegistrationStatusResponse {
|
|
127
|
+
enrollmentId: string;
|
|
128
|
+
eventSeriesId: string;
|
|
129
|
+
courseTitle: string;
|
|
130
|
+
status: "pending_payment" | "enrolled" | "waitlist" | "cancelled" | "completed";
|
|
131
|
+
paymentMethod: CoursePaymentMethod | null;
|
|
132
|
+
paymentStatus: PaymentStatus | null;
|
|
133
|
+
}
|
|
134
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discount availability and application types
|
|
3
|
+
*
|
|
4
|
+
* Part of the block API client type surface; re-exported from `../types`.
|
|
5
|
+
*/
|
|
6
|
+
export type DiscountContext = {
|
|
7
|
+
type: "event";
|
|
8
|
+
eventSeriesId: string;
|
|
9
|
+
eventCategoryId: string | null;
|
|
10
|
+
ticketsCount?: number;
|
|
11
|
+
} | {
|
|
12
|
+
type: "appointment";
|
|
13
|
+
serviceId: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: "whole_series";
|
|
16
|
+
eventSeriesId: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: "pass";
|
|
19
|
+
passId: string;
|
|
20
|
+
} | {
|
|
21
|
+
type: "membership";
|
|
22
|
+
membershipId: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: "product";
|
|
25
|
+
productId: string;
|
|
26
|
+
productCategoryId: string | null;
|
|
27
|
+
};
|
|
28
|
+
export interface DiscountsAvailableRequest {
|
|
29
|
+
siteId: string;
|
|
30
|
+
context: DiscountContext;
|
|
31
|
+
subtotalCents?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface AutoAppliedDiscountPreview {
|
|
34
|
+
id: string;
|
|
35
|
+
code: string;
|
|
36
|
+
publicLabel: string;
|
|
37
|
+
description: string | null;
|
|
38
|
+
discountType: "percent" | "fixed";
|
|
39
|
+
discountPercent: number | null;
|
|
40
|
+
discountAmountCents: number | null;
|
|
41
|
+
computedAmountCents: number;
|
|
42
|
+
}
|
|
43
|
+
export type DiscountsAvailableResponse = Readonly<{
|
|
44
|
+
type: "none";
|
|
45
|
+
}> | Readonly<{
|
|
46
|
+
type: "manual";
|
|
47
|
+
manualCodeEntryAllowed: true;
|
|
48
|
+
}> | Readonly<{
|
|
49
|
+
type: "auto";
|
|
50
|
+
manualCodeEntryAllowed: false;
|
|
51
|
+
autoAppliedDiscount: AutoAppliedDiscountPreview;
|
|
52
|
+
}> | Readonly<{
|
|
53
|
+
type: "auto_and_manual";
|
|
54
|
+
manualCodeEntryAllowed: true;
|
|
55
|
+
autoAppliedDiscount: AutoAppliedDiscountPreview;
|
|
56
|
+
}>;
|
|
57
|
+
export declare function discountAvailabilityHasDiscounts(availability: DiscountsAvailableResponse): boolean;
|
|
58
|
+
export declare function discountAvailabilityAllowsManualEntry(availability: DiscountsAvailableResponse): boolean;
|
|
59
|
+
export declare function getAutoAppliedDiscountPreview(availability: DiscountsAvailableResponse): AutoAppliedDiscountPreview | null;
|
|
60
|
+
export interface DiscountApplyLine {
|
|
61
|
+
context: DiscountContext;
|
|
62
|
+
subtotalCents: number;
|
|
63
|
+
currency: string;
|
|
64
|
+
}
|
|
65
|
+
export interface DiscountApplyRequest {
|
|
66
|
+
siteId: string;
|
|
67
|
+
discountCode: string;
|
|
68
|
+
customerEmail: string;
|
|
69
|
+
lines: DiscountApplyLine[];
|
|
70
|
+
}
|
|
71
|
+
export type DiscountApplyRejectedReason = "invalid_or_not_applicable" | "unavailable" | "unknown";
|
|
72
|
+
export type DiscountApplyResponse = {
|
|
73
|
+
type: "applied";
|
|
74
|
+
code: string;
|
|
75
|
+
publicLabel: string;
|
|
76
|
+
description: string | null;
|
|
77
|
+
discountCents: number;
|
|
78
|
+
subtotalCents: number;
|
|
79
|
+
totalAfterDiscountCents: number;
|
|
80
|
+
currency: string;
|
|
81
|
+
} | {
|
|
82
|
+
type: "rejected";
|
|
83
|
+
reason: DiscountApplyRejectedReason;
|
|
84
|
+
message: string;
|
|
85
|
+
};
|