@riverbankcms/sdk 0.147.0 → 0.149.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 +16 -0
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DtpB3_sS.mjs → PreviewEditorSidebar-DBKln68M.mjs} +301 -205
- package/dist/{PreviewEditorUI-DxTLgaHo.mjs → PreviewEditorUI-DpRX4Mum.mjs} +68 -63
- package/dist/{PreviewQueryProvider-Dd4dxOiU.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
- package/dist/{SdkPreviewModeRuntime-DMMNCngt.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +1247 -541
- package/dist/{SiteChromeCustomizeContext-DQXZXiqS.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +209720 -204978
- package/dist/_dts/ai/src/contracts/proposals.d.ts +0 -33
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +0 -3
- package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
- package/dist/_dts/api/src/accountApi.d.ts +1 -1
- package/dist/_dts/api/src/admin.d.ts +22 -22
- package/dist/_dts/api/src/aiPatch.d.ts +2 -2
- package/dist/_dts/api/src/aiPlayground.d.ts +1 -0
- package/dist/_dts/api/src/analytics.d.ts +2 -2
- package/dist/_dts/api/src/apiEndpointTypes.d.ts +2 -0
- package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
- package/dist/_dts/api/src/auth.d.ts +10 -10
- package/dist/_dts/api/src/availability.d.ts +6 -6
- package/dist/_dts/api/src/billing.d.ts +42 -15
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +15 -6
- package/dist/_dts/api/src/blocks.d.ts +15 -14
- package/dist/_dts/api/src/blocksKeys.d.ts +2 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +33 -50
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
- package/dist/_dts/api/src/bookingOperations.d.ts +9 -11
- package/dist/_dts/api/src/bookingRecords.d.ts +16 -11
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/bookings.d.ts +7 -7
- package/dist/_dts/api/src/calendar.d.ts +9 -9
- package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -8
- package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
- package/dist/_dts/api/src/common/envelope.d.ts +2 -2
- package/dist/_dts/api/src/content-editor.d.ts +2 -2
- package/dist/_dts/api/src/contentEntries.d.ts +17 -48
- package/dist/_dts/api/src/contentRuntime.d.ts +51 -37
- package/dist/_dts/api/src/contentTypes.d.ts +11 -11
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +6 -6
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
- package/dist/_dts/api/src/documentLifecycle.d.ts +67 -0
- package/dist/_dts/api/src/domains.d.ts +16 -16
- package/dist/_dts/api/src/editLeaseEndpoints.d.ts +72 -0
- package/dist/_dts/api/src/emailSettings.d.ts +4 -4
- package/dist/_dts/api/src/endpoints.d.ts +135 -51
- package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +29 -7
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +0 -8
- package/dist/_dts/api/src/eventPageWords.d.ts +7 -12
- package/dist/_dts/api/src/footerSettings.d.ts +6 -6
- package/dist/_dts/api/src/index.d.ts +8 -7
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/navigation.d.ts +5 -5
- package/dist/_dts/api/src/pageSurfaceEditorEndpoints.d.ts +55 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +28 -7
- package/dist/_dts/api/src/pages.d.ts +7 -7
- package/dist/_dts/api/src/performance.d.ts +1 -1
- package/dist/_dts/api/src/public/index.d.ts +1 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +4 -2
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +6 -29
- package/dist/_dts/api/src/redirects.d.ts +3 -3
- package/dist/_dts/api/src/request.d.ts +11 -2
- package/dist/_dts/api/src/resources.d.ts +4 -4
- package/dist/_dts/api/src/routes.d.ts +8 -3
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -2
- package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +21 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +5 -28
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/sdkEventOccurrenceRequestContracts.d.ts +43 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +4 -2
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +9 -2
- package/dist/_dts/api/src/seo.d.ts +4 -4
- package/dist/_dts/api/src/services.d.ts +4 -4
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +15 -8
- package/dist/_dts/api/src/siteMembers.d.ts +10 -10
- package/dist/_dts/api/src/siteOnboarding.d.ts +14 -0
- package/dist/_dts/api/src/siteOperations.d.ts +6 -2
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +5 -12
- package/dist/_dts/api/src/siteRuntimeEntry.d.ts +31 -0
- package/dist/_dts/billing/src/checkout/platform.d.ts +77 -0
- package/dist/_dts/billing/src/components/index.d.ts +25 -40
- package/dist/_dts/billing/src/membership/index.d.ts +1 -3
- package/dist/_dts/billing/src/plans/entitlements.d.ts +80 -0
- package/dist/_dts/billing/src/plans/registry.d.ts +16 -16
- package/dist/_dts/billing/src/plans/standing.d.ts +9 -2
- package/dist/_dts/billing/src/plans/types.d.ts +5 -15
- package/dist/_dts/billing/src/site-arrangements.d.ts +2 -2
- package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +2 -4
- package/dist/_dts/billing/src/subscriptions/store.d.ts +17 -11
- package/dist/_dts/block-form/src/backend/store-backend.d.ts +6 -7
- package/dist/_dts/block-form/src/backend/types.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -1
- package/dist/_dts/blocks/src/client/events.d.ts +3 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -14
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +4 -13
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +9 -8
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +28 -28
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +7 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -2
- 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 +4 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +72 -12
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +36 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/usePolling.d.ts +7 -48
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.checkout-return-context.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.payment-confirmation.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +17 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-actions.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +37 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +16 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +29 -29
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +54 -6
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/DemoBookingPortalAccess.d.ts +22 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DemoPortalSignInLink.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoBookingPassStorage.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
- package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
- package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -7
- package/dist/_dts/content-editor/src/controller/EditLeaseController.d.ts +39 -0
- package/dist/_dts/content-editor/src/controller/EditorWriteGate.d.ts +38 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +25 -61
- package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseBanner.d.ts +7 -0
- package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseControllers.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/deriveEditorUnpublishedState.d.ts +6 -0
- package/dist/_dts/content-editor/src/controller/documentValueBaseline.d.ts +25 -0
- package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
- package/dist/_dts/content-editor/src/controller/editLeaseLossSignal.d.ts +6 -0
- package/dist/_dts/content-editor/src/controller/editLeaseNotice.d.ts +28 -0
- package/dist/_dts/content-editor/src/controller/editorClientId.d.ts +2 -0
- package/dist/_dts/content-editor/src/controller/editorEditability.d.ts +38 -0
- package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +34 -0
- package/dist/_dts/content-editor/src/controller/normalizedMetadataBaseline.d.ts +29 -0
- package/dist/_dts/content-editor/src/controller/pageSurfaceDocumentBaselines.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/pageSurfaceLifecycle.d.ts +11 -0
- package/dist/_dts/content-editor/src/controller/planDocumentBaselineRefresh.d.ts +19 -0
- package/dist/_dts/content-editor/src/controller/readDocumentLeaseBaselines.d.ts +19 -0
- package/dist/_dts/content-editor/src/controller/refreshDocumentLeaseBaseline.d.ts +12 -0
- package/dist/_dts/content-editor/src/controller/refreshLinkedEntry.d.ts +17 -0
- package/dist/_dts/content-editor/src/controller/replayRestoredEditorEffects.d.ts +2 -3
- package/dist/_dts/content-editor/src/controller/routeWrites.d.ts +26 -0
- package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +16 -17
- package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +6 -2
- package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +3 -3
- package/dist/_dts/content-editor/src/controller/useEntryValueAutosaves.d.ts +21 -0
- package/dist/_dts/content-editor/src/controller/useInitialEditorUiStore.d.ts +24 -0
- package/dist/_dts/content-editor/src/controller/useServerBaselineReconciliation.d.ts +17 -0
- package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +5 -1
- package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +8 -47
- package/dist/_dts/content-editor/src/hooks/editLeaseMachine.d.ts +120 -0
- package/dist/_dts/content-editor/src/hooks/publishability.d.ts +6 -10
- package/dist/_dts/content-editor/src/hooks/useAutosaveStatus.d.ts +3 -0
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +5 -15
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +7 -5
- package/dist/_dts/content-editor/src/hooks/useEditLease.d.ts +28 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +25 -39
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +17 -19
- package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +5 -8
- package/dist/_dts/content-editor/src/hooks/useValueAutosave.d.ts +64 -0
- package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +0 -7
- package/dist/_dts/content-editor/src/index.d.ts +26 -7
- package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
- package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +12 -0
- package/dist/_dts/content-editor/src/linkedEntries/owner.d.ts +9 -0
- package/dist/_dts/content-editor/src/liveDrafts/draftProjection.d.ts +66 -0
- package/dist/_dts/content-editor/src/liveDrafts/linkedSaveHandovers.d.ts +37 -0
- package/dist/_dts/content-editor/src/liveDrafts/remoteDraftOverlay.d.ts +113 -0
- package/dist/_dts/content-editor/src/liveDrafts/useLiveDrafts.d.ts +32 -0
- package/dist/_dts/content-editor/src/liveDrafts/useRetentionTicks.d.ts +7 -0
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +6 -0
- package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +1 -0
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +96 -19
- package/dist/_dts/content-editor/src/services/editorApiClient.d.ts +13 -0
- package/dist/_dts/content-editor/src/services/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/services/pageSurfaceEditorServices.d.ts +23 -0
- package/dist/_dts/content-editor/src/sync/flushValues.d.ts +13 -0
- package/dist/_dts/content-editor/src/sync/lifecycleFailure.d.ts +51 -0
- package/dist/_dts/content-editor/src/sync/runLifecycle.d.ts +64 -0
- package/dist/_dts/content-editor/src/sync/schedulerValues.d.ts +27 -0
- package/dist/_dts/content-editor/src/sync/sendPlanning.d.ts +104 -0
- package/dist/_dts/content-editor/src/sync/valueSync.d.ts +114 -0
- package/dist/_dts/content-editor/src/ui/blockCollection.d.ts +8 -0
- package/dist/_dts/content-editor/src/ui/documentLifecycle.d.ts +18 -0
- package/dist/_dts/content-editor/src/ui/editorLeaseUiState.d.ts +7 -0
- package/dist/_dts/content-editor/src/ui/editorRefresh.d.ts +82 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +102 -127
- package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +126 -72
- package/dist/_dts/content-editor/src/ui/editorValueSnapshot.d.ts +18 -0
- package/dist/_dts/content-editor/src/ui/serverBlockAdmission.d.ts +26 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +16 -27
- package/dist/_dts/content-editor/src/ui/stores/blockVersionsStore.d.ts +24 -0
- package/dist/_dts/content-editor/src/ui/stores/linkedEntryLeaseStore.d.ts +54 -0
- package/dist/_dts/content-editor/src/ui/stores/linkedSaveHandoversStore.d.ts +11 -0
- package/dist/_dts/content-editor/src/ui/stores/remoteDraftsStore.d.ts +10 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +63 -3
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +2 -2
- package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -4
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -4
- package/dist/_dts/content-model/src/definitions/shared.d.ts +11 -2
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/serializeAllowedBlocks.d.ts +2 -0
- package/dist/_dts/content-model/src/metadataConfig.d.ts +10 -38
- package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
- package/dist/_dts/content-model/src/types.d.ts +0 -1
- package/dist/_dts/core/src/block-content-identity.d.ts +49 -1
- package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
- package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
- package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
- package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
- package/dist/_dts/core/src/branded.d.ts +15 -0
- package/dist/_dts/core/src/currency-format.d.ts +8 -2
- package/dist/_dts/core/src/demo-lifecycle-status.d.ts +2 -2
- package/dist/_dts/core/src/demo-warm-pool-target.d.ts +8 -0
- package/dist/_dts/core/src/edit-lease.d.ts +60 -0
- package/dist/_dts/core/src/editor-state.d.ts +38 -13
- package/dist/_dts/core/src/editor-value-sync.d.ts +79 -0
- package/dist/_dts/core/src/html-entities.d.ts +6 -0
- package/dist/_dts/core/src/index.d.ts +7 -0
- package/dist/_dts/core/src/uuid.d.ts +7 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +456 -189
- package/dist/_dts/editor/src/EditorProvider.d.ts +5 -0
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +14 -0
- package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +1 -0
- package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +0 -1
- package/dist/_dts/editor/src/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +10 -9
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardFrame.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/applyExtendedFieldDefaults.d.ts +3 -4
- package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +4 -8
- package/dist/_dts/editor-blocks/src/block-editor/editorBlockItem.d.ts +23 -0
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +2 -7
- package/dist/_dts/editor-blocks/src/block-editor/hooks/applyBlockStructureChange.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +14 -5
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +21 -19
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -10
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +8 -16
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +6 -16
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +37 -9
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +3 -2
- package/dist/_dts/media-core/src/fileStorage.d.ts +4 -0
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
- package/dist/_dts/media-editor/src/context.d.ts +1 -1
- package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
- package/dist/_dts/media-editor/src/index.d.ts +2 -0
- package/dist/_dts/media-editor/src/provider.d.ts +3 -2
- package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +8 -3
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +6 -3
- package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +22 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/entryFieldRebinding.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/blocks/renderPrecedence.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/blocks/useLinkedSaveHandoverRetention.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewAccessBanners.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +23 -14
- package/dist/_dts/preview-next/src/client/preview/PreviewLeaseEditingMode.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeAutosave.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/usePreviewCustomizeWorkflowState.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
- package/dist/_dts/preview-next/src/constants.d.ts +4 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
- package/dist/_dts/realtime/src/client.d.ts +3 -0
- package/dist/_dts/realtime/src/draftChannel.d.ts +91 -0
- package/dist/_dts/realtime/src/drafts.d.ts +210 -0
- package/dist/_dts/realtime/src/index.d.ts +3 -0
- package/dist/_dts/realtime/src/leaseChangeSubscriptions.d.ts +8 -0
- package/dist/_dts/realtime/src/types.d.ts +113 -0
- package/dist/_dts/realtime/src/useDraftChannel.d.ts +34 -0
- package/dist/_dts/realtime/src/useSiteRealtimeReload.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -55
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
- package/dist/_dts/ui/src/color-picker.d.ts +1 -1
- package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
- package/dist/client/{BookingMailingListNote-1n4Ch_u_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +504 -163
- package/dist/client/DemoBookingPortalAccess-BFGB1Fay.mjs +344 -0
- package/dist/client/{EventCombined.client-C0pgma9y.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
- package/dist/client/{EventListing.client-4fhLOvHP.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DScC4F3w.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
- package/dist/client/{TerminalPanel-B5ZUsYhe.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
- package/dist/client/{ThemedButton-DoVIV1Ao.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
- package/dist/client/{accordion-CoT5g7zo.mjs → accordion-DXWIfT3T.mjs} +1 -1
- package/dist/client/{bookingForm-BWxB46xD.mjs → bookingForm-CjZgHNvv.mjs} +216 -63
- package/dist/client/bookings.mjs +1187 -692
- package/dist/client/{carousel-DtNYWFd3.mjs → carousel-DSLikmvZ.mjs} +1 -1
- package/dist/client/{cart-z4qZih1Y.mjs → cart-HDjWReFt.mjs} +3 -3
- package/dist/client/{checkout-DpL7euFH.mjs → checkout-CUvRZA3W.mjs} +3 -3
- package/dist/client/{checkoutUrls-BEfR7kVu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
- package/dist/client/client.mjs +2711 -1684
- package/dist/client/{context-C8TinPJc.mjs → context-DFmaZa-Q.mjs} +4 -3
- package/dist/client/{dates-vwwxTeB0.mjs → dates-BBep1JnF.mjs} +56 -11
- package/dist/client/{eventCalendar-DIbHfJXO.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
- package/dist/client/{eventCombined-DoGMJ6cg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
- package/dist/client/{eventDetails-BjN9v6a1.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
- package/dist/client/{eventListing-DajjWgOv.mjs → eventListing-BMt5snal.mjs} +4 -4
- package/dist/client/{eventRegistration-DMq9gMA-.mjs → eventRegistration-O6ZxHfOb.mjs} +422 -570
- package/dist/client/{form-Qf6qTbos.mjs → form-DFa1D8vt.mjs} +3 -3
- package/dist/client/{headerSection-D7qJrqFX.mjs → headerSection-CmjHLR-N.mjs} +3 -3
- package/dist/client/hooks.mjs +414 -182
- package/dist/client/{locationMap-CCF9-t_0.mjs → locationMap-BXKP_lGh.mjs} +3 -3
- package/dist/client/{media-CwBGetqC.mjs → media-Cl38iOMI.mjs} +10 -3
- package/dist/client/{newsletterForm-DzCLSP4S.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
- package/dist/client/{pricing-Cgxv2KLC.mjs → pricing-KEAEsibq.mjs} +1 -1
- package/dist/client/{productDetail-ru9w5GHx.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
- package/dist/client/{productList-zaapKSl-.mjs → productList-D91V0sYa.mjs} +3 -3
- package/dist/client/{propsDecoder-CwvvNOHx.mjs → propsDecoder-DZd6RJeA.mjs} +244 -94
- package/dist/client/rendering/client.mjs +2656 -1705
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +3430 -2352
- package/dist/client/{routeIslandApiConfig-BwVFo0Y4.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
- package/dist/client/{shop-mktkXvbV.mjs → shop-4F2jLQPI.mjs} +131 -85
- package/dist/client/{shop-commerce-De7gEnkA.mjs → shop-commerce-BbfCJjB3.mjs} +25 -13
- package/dist/client/{shop-commerce-store-B3MCxIBW.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
- package/dist/client/{shopShared-TqExh235.mjs → shopShared-DlONJt0T.mjs} +4 -4
- package/dist/client/{useEventFilters-n_OjkIjX.mjs → useEventFilters-COYyL3m7.mjs} +32 -17
- package/dist/preview-next/before-render.mjs +207 -105
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/constants.mjs +5 -1
- package/dist/preview-next/index.mjs +5 -1
- package/dist/preview-next/keepAlive.mjs +341 -165
- package/dist/preview-next/middleware.mjs +207 -105
- package/dist/{previewAuthStore-C_EHQ5XA.mjs → previewAuthStore-BBmV7UsW.mjs} +243 -112
- package/dist/{sdk-runtime-BIkJg5y1.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
- package/dist/{separator-C9qDP95Z.mjs → separator-ByL72zUT.mjs} +1 -1
- package/dist/server/components.mjs +1839 -1475
- package/dist/server/config-validation.mjs +381 -166
- package/dist/server/config.mjs +381 -166
- package/dist/server/data.mjs +381 -166
- package/dist/server/index.mjs +214 -110
- package/dist/server/next.mjs +663 -351
- package/dist/server/page-converter.mjs +198 -79
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1536 -1169
- package/dist/server/rendering.mjs +2432 -2068
- package/dist/server/routing.mjs +456 -173
- package/dist/server/server.mjs +447 -267
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
- package/dist/_dts/billing/src/plans/display.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +0 -3
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
- package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +0 -4
- package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +0 -16
- package/dist/_dts/content-editor/src/controller/driver.d.ts +0 -14
- package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +0 -7
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +0 -29
- package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +0 -26
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +0 -64
- package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +0 -48
- package/dist/_dts/content-editor/src/types.d.ts +0 -44
- package/dist/client/DiscountCodeDisclosure-CKJtz0mY.mjs +0 -137
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type DraftStateMessage, type DraftSyncRequestMessage } from './drafts';
|
|
2
|
+
/**
|
|
3
|
+
* Structural slice of a Supabase client that the drafts channel needs, so this
|
|
4
|
+
* package stays free of a supabase-js dependency. A `SupabaseClient` satisfies
|
|
5
|
+
* it (proved by the realtime drafts integration test).
|
|
6
|
+
*
|
|
7
|
+
* Method syntax keeps parameter checks bivariant, which is what lets the real
|
|
8
|
+
* overloaded Supabase methods satisfy these narrower signatures.
|
|
9
|
+
*/
|
|
10
|
+
export type DraftBroadcastChannel = {
|
|
11
|
+
on(type: 'broadcast', filter: {
|
|
12
|
+
event: string;
|
|
13
|
+
}, callback: (message: {
|
|
14
|
+
payload: unknown;
|
|
15
|
+
}) => void): unknown;
|
|
16
|
+
subscribe(callback: (status: string, error?: Error) => void): unknown;
|
|
17
|
+
send(args: {
|
|
18
|
+
type: 'broadcast';
|
|
19
|
+
event: string;
|
|
20
|
+
payload: unknown;
|
|
21
|
+
}): Promise<DraftSendResult>;
|
|
22
|
+
};
|
|
23
|
+
export type DraftChannelOptions = {
|
|
24
|
+
config: {
|
|
25
|
+
private: true;
|
|
26
|
+
broadcast: {
|
|
27
|
+
self: false;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type DraftRealtimeClient = {
|
|
32
|
+
channel(name: string, options: DraftChannelOptions): DraftBroadcastChannel;
|
|
33
|
+
removeChannel(channel: DraftBroadcastChannel): unknown;
|
|
34
|
+
realtime: {
|
|
35
|
+
setAuth(token?: string | null): Promise<void>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export type DraftSendResult = 'ok' | 'timed out' | 'error';
|
|
39
|
+
/**
|
|
40
|
+
* How the channel authenticates:
|
|
41
|
+
* - `session`: the client's own Supabase auth session (dashboard). supabase-js
|
|
42
|
+
* already forwards the session token and its refreshes to Realtime.
|
|
43
|
+
* - `token`: an explicit access token (preview), applied with
|
|
44
|
+
* `realtime.setAuth(token)`. Note this pins the token for every channel on
|
|
45
|
+
* that client until `setAuth()` is called without arguments.
|
|
46
|
+
*/
|
|
47
|
+
export type DraftChannelAuth = Readonly<{
|
|
48
|
+
kind: 'session';
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'token';
|
|
51
|
+
accessToken: string;
|
|
52
|
+
}>;
|
|
53
|
+
/** Subscribe status as reported by realtime-js, narrowed to what callers act on. */
|
|
54
|
+
export type DraftChannelStatus = 'joining' | 'joined' | 'timed-out' | 'error' | 'closed';
|
|
55
|
+
export type DraftChannelHandlers = Readonly<{
|
|
56
|
+
onDraftState?: (message: DraftStateMessage) => void;
|
|
57
|
+
onSyncRequest?: (message: DraftSyncRequestMessage) => void;
|
|
58
|
+
onStatus?: (status: DraftChannelStatus, error?: Error) => void;
|
|
59
|
+
onInvalidMessage?: (event: string, error: unknown) => void;
|
|
60
|
+
}>;
|
|
61
|
+
export type DraftChannelConnection = Readonly<{
|
|
62
|
+
sendDraftState: (message: DraftStateMessage) => Promise<DraftSendResult>;
|
|
63
|
+
sendSyncRequest: (message: DraftSyncRequestMessage) => Promise<DraftSendResult>;
|
|
64
|
+
/**
|
|
65
|
+
* Apply a rotated token to the live connection. realtime-js pushes it to
|
|
66
|
+
* every joined channel, where Realtime re-evaluates the RLS policies; no
|
|
67
|
+
* rejoin is needed while the channel is healthy (see `planDraftAuthChange`).
|
|
68
|
+
*/
|
|
69
|
+
setAccessToken: (accessToken: string) => Promise<void>;
|
|
70
|
+
leave: () => Promise<void>;
|
|
71
|
+
}>;
|
|
72
|
+
export declare function toDraftChannelStatus(status: string): DraftChannelStatus;
|
|
73
|
+
/**
|
|
74
|
+
* A token change on a healthy (or still joining) channel is applied in place.
|
|
75
|
+
* A channel that was closed, timed out or refused (typically because the old
|
|
76
|
+
* token expired or lacked access) is rebuilt with the new token.
|
|
77
|
+
*/
|
|
78
|
+
export declare function planDraftAuthChange(status: DraftChannelStatus): 'reauthorise' | 'rejoin';
|
|
79
|
+
/**
|
|
80
|
+
* Join the private `site:{siteId}:drafts` channel. Validates every incoming
|
|
81
|
+
* message at the boundary; filtering by scope and origin/seq is the caller's
|
|
82
|
+
* decision (`isDraftForScope`, `acceptDraftState`).
|
|
83
|
+
*
|
|
84
|
+
* With token auth the join waits for `setAuth` so the join carries the token.
|
|
85
|
+
*/
|
|
86
|
+
export declare function joinDraftChannel(options: Readonly<{
|
|
87
|
+
client: DraftRealtimeClient;
|
|
88
|
+
siteId: string;
|
|
89
|
+
auth: DraftChannelAuth;
|
|
90
|
+
handlers: DraftChannelHandlers;
|
|
91
|
+
}>): DraftChannelConnection;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type RealtimeEditScope } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Live drafts (issue 1545): unsaved field values streamed from the editing tab to
|
|
5
|
+
* preview tabs over the PRIVATE channel `site:{siteId}:drafts`. Access is
|
|
6
|
+
* enforced by RLS on realtime.messages (only editors of the site may join or
|
|
7
|
+
* send), so nothing here is a security boundary; these schemas are the parse
|
|
8
|
+
* boundary for whatever arrives.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DRAFT_STATE_EVENT = "draft-state";
|
|
11
|
+
export declare const DRAFT_SYNC_REQUEST_EVENT = "draft-sync-request";
|
|
12
|
+
/** Per-item limit: an item whose JSON exceeds this is not streamed. */
|
|
13
|
+
export declare const DRAFT_ITEM_MAX_BYTES = 200000;
|
|
14
|
+
/**
|
|
15
|
+
* Whole-message budget, kept under Realtime's smallest plan limit (256 KB) with
|
|
16
|
+
* room for the envelope.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DRAFT_MESSAGE_MAX_BYTES = 240000;
|
|
19
|
+
export declare const draftItemStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
kind: z.ZodLiteral<"saved">;
|
|
23
|
+
revision: z.ZodString;
|
|
24
|
+
}, z.core.$strip>], "kind">;
|
|
25
|
+
declare const draftTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"block">;
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"content">;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"linked-entry">;
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
}, z.core.$strip>], "kind">;
|
|
34
|
+
/** A draft item is its target plus the streamed values and their state. */
|
|
35
|
+
export declare const draftItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
37
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"saved">;
|
|
41
|
+
revision: z.ZodString;
|
|
42
|
+
}, z.core.$strip>], "kind">;
|
|
43
|
+
kind: z.ZodLiteral<"block">;
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
47
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"saved">;
|
|
51
|
+
revision: z.ZodString;
|
|
52
|
+
}, z.core.$strip>], "kind">;
|
|
53
|
+
kind: z.ZodLiteral<"content">;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
56
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"saved">;
|
|
60
|
+
revision: z.ZodString;
|
|
61
|
+
}, z.core.$strip>], "kind">;
|
|
62
|
+
kind: z.ZodLiteral<"linked-entry">;
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
}, z.core.$strip>], "kind">;
|
|
65
|
+
export declare const draftStateMessageSchema: z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<"draft-state">;
|
|
67
|
+
siteId: z.ZodString;
|
|
68
|
+
scope: z.ZodObject<{
|
|
69
|
+
nodeType: z.ZodEnum<{
|
|
70
|
+
page: "page";
|
|
71
|
+
content_entry: "content_entry";
|
|
72
|
+
page_surface: "page_surface";
|
|
73
|
+
}>;
|
|
74
|
+
nodeId: z.ZodString;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
origin: z.ZodString;
|
|
77
|
+
seq: z.ZodNumber;
|
|
78
|
+
sentAt: z.ZodNumber;
|
|
79
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
80
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
81
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
kind: z.ZodLiteral<"saved">;
|
|
85
|
+
revision: z.ZodString;
|
|
86
|
+
}, z.core.$strip>], "kind">;
|
|
87
|
+
kind: z.ZodLiteral<"block">;
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
91
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"saved">;
|
|
95
|
+
revision: z.ZodString;
|
|
96
|
+
}, z.core.$strip>], "kind">;
|
|
97
|
+
kind: z.ZodLiteral<"content">;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
100
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
+
kind: z.ZodLiteral<"unsaved">;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
kind: z.ZodLiteral<"saved">;
|
|
104
|
+
revision: z.ZodString;
|
|
105
|
+
}, z.core.$strip>], "kind">;
|
|
106
|
+
kind: z.ZodLiteral<"linked-entry">;
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
}, z.core.$strip>], "kind">>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export declare const draftSyncRequestMessageSchema: z.ZodObject<{
|
|
111
|
+
type: z.ZodLiteral<"draft-sync-request">;
|
|
112
|
+
siteId: z.ZodString;
|
|
113
|
+
scope: z.ZodObject<{
|
|
114
|
+
nodeType: z.ZodEnum<{
|
|
115
|
+
page: "page";
|
|
116
|
+
content_entry: "content_entry";
|
|
117
|
+
page_surface: "page_surface";
|
|
118
|
+
}>;
|
|
119
|
+
nodeId: z.ZodString;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
origin: z.ZodString;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export type DraftItemState = z.infer<typeof draftItemStateSchema>;
|
|
124
|
+
export type DraftTarget = z.infer<typeof draftTargetSchema>;
|
|
125
|
+
export type DraftItem = z.infer<typeof draftItemSchema>;
|
|
126
|
+
export type DraftItemKind = DraftItem['kind'];
|
|
127
|
+
export type DraftStateMessage = z.infer<typeof draftStateMessageSchema>;
|
|
128
|
+
export type DraftSyncRequestMessage = z.infer<typeof draftSyncRequestMessageSchema>;
|
|
129
|
+
export type DraftChannelEvent = typeof DRAFT_STATE_EVENT | typeof DRAFT_SYNC_REQUEST_EVENT;
|
|
130
|
+
export type DraftParseResult<T> = Readonly<{
|
|
131
|
+
kind: 'valid';
|
|
132
|
+
message: T;
|
|
133
|
+
}> | Readonly<{
|
|
134
|
+
kind: 'invalid';
|
|
135
|
+
error: z.ZodError;
|
|
136
|
+
}>;
|
|
137
|
+
export declare function parseDraftStateMessage(data: unknown): DraftParseResult<DraftStateMessage>;
|
|
138
|
+
export declare function parseDraftSyncRequestMessage(data: unknown): DraftParseResult<DraftSyncRequestMessage>;
|
|
139
|
+
/**
|
|
140
|
+
* Get the private Realtime channel name for a site's live drafts. The RLS
|
|
141
|
+
* policies only authorise exactly this shape, with a lowercase uuid.
|
|
142
|
+
*/
|
|
143
|
+
export declare function getDraftChannelName(siteId: string): `site:${string}:drafts`;
|
|
144
|
+
/** Stable key for a target, for overlays keyed by item. */
|
|
145
|
+
export declare function draftTargetKey(target: DraftTarget): string;
|
|
146
|
+
/** An item's key is its target's key. */
|
|
147
|
+
export declare function draftItemKey(item: DraftItem): string;
|
|
148
|
+
/** True when a message is for the given site and document scope. */
|
|
149
|
+
export declare function isDraftForScope(message: Readonly<{
|
|
150
|
+
siteId: string;
|
|
151
|
+
scope: RealtimeEditScope;
|
|
152
|
+
}>, view: Readonly<{
|
|
153
|
+
siteId: string;
|
|
154
|
+
scope: RealtimeEditScope;
|
|
155
|
+
}>): boolean;
|
|
156
|
+
export type DraftSeqByOrigin = ReadonlyMap<string, number>;
|
|
157
|
+
export type DraftStateDecision = Readonly<{
|
|
158
|
+
kind: 'accept';
|
|
159
|
+
latestSeqByOrigin: DraftSeqByOrigin;
|
|
160
|
+
}> | Readonly<{
|
|
161
|
+
kind: 'ignore';
|
|
162
|
+
reason: 'own-origin' | 'stale-seq';
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Decide whether an incoming draft-state should be applied. Messages from this
|
|
166
|
+
* tab's own origin, and any whose seq is not newer than the last accepted seq
|
|
167
|
+
* from the same origin, are ignored. Accepting returns the next seq map; the
|
|
168
|
+
* input map is never mutated.
|
|
169
|
+
*
|
|
170
|
+
* Emitters must keep seq strictly increasing per origin for the origin's
|
|
171
|
+
* lifetime: if an origin id outlives a page load, seed seq from a clock rather
|
|
172
|
+
* than restarting at 0, or viewers will ignore it as stale.
|
|
173
|
+
*/
|
|
174
|
+
export declare function acceptDraftState(latestSeqByOrigin: DraftSeqByOrigin, message: Pick<DraftStateMessage, 'origin' | 'seq'>, selfOrigin: string | null): DraftStateDecision;
|
|
175
|
+
export type DroppedDraftItem = Readonly<{
|
|
176
|
+
key: string;
|
|
177
|
+
kind: DraftItemKind;
|
|
178
|
+
bytes: number;
|
|
179
|
+
reason: 'item-too-large' | 'message-budget';
|
|
180
|
+
}>;
|
|
181
|
+
export type DraftItemSizePlan = Readonly<{
|
|
182
|
+
kept: readonly DraftItem[];
|
|
183
|
+
dropped: readonly DroppedDraftItem[];
|
|
184
|
+
}>;
|
|
185
|
+
/** Byte length of an item's JSON, as it would travel. */
|
|
186
|
+
export declare function measureDraftItemBytes(item: DraftItem): number;
|
|
187
|
+
/**
|
|
188
|
+
* Split items into those that can be streamed and those that are dropped and
|
|
189
|
+
* reported. An item over `maxItemBytes` is always dropped; after that, items are
|
|
190
|
+
* kept in order until `maxMessageBytes` would be exceeded. A dropped item simply
|
|
191
|
+
* isn't live; the viewer still sees it after autosave and reload.
|
|
192
|
+
*/
|
|
193
|
+
export declare function planDraftItemsBySize(items: readonly DraftItem[], limits?: Readonly<{
|
|
194
|
+
maxItemBytes?: number;
|
|
195
|
+
maxMessageBytes?: number;
|
|
196
|
+
}>): DraftItemSizePlan;
|
|
197
|
+
export declare function createDraftStateMessage(options: Readonly<{
|
|
198
|
+
siteId: string;
|
|
199
|
+
scope: RealtimeEditScope;
|
|
200
|
+
origin: string;
|
|
201
|
+
seq: number;
|
|
202
|
+
items: readonly DraftItem[];
|
|
203
|
+
sentAt?: number;
|
|
204
|
+
}>): DraftStateMessage;
|
|
205
|
+
export declare function createDraftSyncRequestMessage(options: Readonly<{
|
|
206
|
+
siteId: string;
|
|
207
|
+
scope: RealtimeEditScope;
|
|
208
|
+
origin: string;
|
|
209
|
+
}>): DraftSyncRequestMessage;
|
|
210
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { realtimeReloadPayloadSchema, realtimeLeaseChangedPayloadSchema, realtimeSiteEventSchema, type RealtimeReloadPayload, type RealtimeLeaseChangedPayload, type RealtimeSiteEvent, getPreviewChannelName, validateReloadPayload, validateSiteEvent, createReloadPayload, createLeaseChangedPayload, shouldReloadForClient, } from './types';
|
|
2
|
+
export { realtimeEditScopeSchema, type RealtimeEditScope, } from './types';
|
|
3
|
+
export { DRAFT_STATE_EVENT, DRAFT_SYNC_REQUEST_EVENT, DRAFT_ITEM_MAX_BYTES, DRAFT_MESSAGE_MAX_BYTES, draftItemStateSchema, draftItemSchema, draftStateMessageSchema, draftSyncRequestMessageSchema, type DraftItemState, type DraftTarget, type DraftItem, type DraftItemKind, type DraftStateMessage, type DraftSyncRequestMessage, type DraftChannelEvent, type DraftParseResult, type DraftSeqByOrigin, type DraftStateDecision, type DroppedDraftItem, type DraftItemSizePlan, parseDraftStateMessage, parseDraftSyncRequestMessage, getDraftChannelName, draftTargetKey, draftItemKey, isDraftForScope, acceptDraftState, measureDraftItemBytes, planDraftItemsBySize, createDraftStateMessage, createDraftSyncRequestMessage, } from './drafts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RealtimeLeaseChangedPayload } from './types';
|
|
2
|
+
type Scope = RealtimeLeaseChangedPayload['scope'];
|
|
3
|
+
/** One site channel dispatches only to mounted controllers for the changed scope. */
|
|
4
|
+
export declare function createLeaseChangeSubscriptions(): {
|
|
5
|
+
subscribe: (scope: Scope, listener: () => void) => () => void;
|
|
6
|
+
notify: (scope: Scope) => void;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema for real-time reload broadcast payloads.
|
|
4
|
+
*
|
|
5
|
+
* Validates that broadcasts contain:
|
|
6
|
+
* - siteId: UUID of the site being updated
|
|
7
|
+
* - resource: Type of resource changed (theme, page, content)
|
|
8
|
+
* - resourceId: Optional UUID of specific resource (e.g., pageId, entryId)
|
|
9
|
+
* - timestamp: Unix timestamp (ms) when broadcast was sent
|
|
10
|
+
*/
|
|
11
|
+
export declare const realtimeReloadPayloadSchema: z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"reload">;
|
|
13
|
+
siteId: z.ZodString;
|
|
14
|
+
resource: z.ZodEnum<{
|
|
15
|
+
content: "content";
|
|
16
|
+
page: "page";
|
|
17
|
+
theme: "theme";
|
|
18
|
+
}>;
|
|
19
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
origin: z.ZodNullable<z.ZodString>;
|
|
21
|
+
timestamp: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
/** The editable document an edit lease or a live draft belongs to. */
|
|
24
|
+
export declare const realtimeEditScopeSchema: z.ZodObject<{
|
|
25
|
+
nodeType: z.ZodEnum<{
|
|
26
|
+
page: "page";
|
|
27
|
+
content_entry: "content_entry";
|
|
28
|
+
page_surface: "page_surface";
|
|
29
|
+
}>;
|
|
30
|
+
nodeId: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type RealtimeEditScope = z.infer<typeof realtimeEditScopeSchema>;
|
|
33
|
+
export declare const realtimeLeaseChangedPayloadSchema: z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"lease-changed">;
|
|
35
|
+
siteId: z.ZodString;
|
|
36
|
+
scope: z.ZodObject<{
|
|
37
|
+
nodeType: z.ZodEnum<{
|
|
38
|
+
page: "page";
|
|
39
|
+
content_entry: "content_entry";
|
|
40
|
+
page_surface: "page_surface";
|
|
41
|
+
}>;
|
|
42
|
+
nodeId: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
timestamp: z.ZodNumber;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export declare const realtimeSiteEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
type: z.ZodLiteral<"reload">;
|
|
48
|
+
siteId: z.ZodString;
|
|
49
|
+
resource: z.ZodEnum<{
|
|
50
|
+
content: "content";
|
|
51
|
+
page: "page";
|
|
52
|
+
theme: "theme";
|
|
53
|
+
}>;
|
|
54
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
origin: z.ZodNullable<z.ZodString>;
|
|
56
|
+
timestamp: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"lease-changed">;
|
|
59
|
+
siteId: z.ZodString;
|
|
60
|
+
scope: z.ZodObject<{
|
|
61
|
+
nodeType: z.ZodEnum<{
|
|
62
|
+
page: "page";
|
|
63
|
+
content_entry: "content_entry";
|
|
64
|
+
page_surface: "page_surface";
|
|
65
|
+
}>;
|
|
66
|
+
nodeId: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
timestamp: z.ZodNumber;
|
|
69
|
+
}, z.core.$strip>], "type">;
|
|
70
|
+
/**
|
|
71
|
+
* TypeScript type for reload broadcast payloads.
|
|
72
|
+
* Derived from Zod schema for single source of truth.
|
|
73
|
+
*/
|
|
74
|
+
export type RealtimeReloadPayload = z.infer<typeof realtimeReloadPayloadSchema>;
|
|
75
|
+
export type RealtimeLeaseChangedPayload = z.infer<typeof realtimeLeaseChangedPayloadSchema>;
|
|
76
|
+
export type RealtimeSiteEvent = z.infer<typeof realtimeSiteEventSchema>;
|
|
77
|
+
export declare function shouldReloadForClient(payload: RealtimeReloadPayload, view: Readonly<{
|
|
78
|
+
siteId: string;
|
|
79
|
+
resourceId?: string | null;
|
|
80
|
+
clientId?: string | null;
|
|
81
|
+
}>): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Get the Realtime channel name for a site's preview updates.
|
|
84
|
+
*
|
|
85
|
+
* @param siteId - UUID of the site
|
|
86
|
+
* @returns Channel name (format: "site:{siteId}:preview")
|
|
87
|
+
*/
|
|
88
|
+
export declare function getPreviewChannelName(siteId: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Validate and parse a reload payload at the boundary.
|
|
91
|
+
*
|
|
92
|
+
* @param data - Unknown data to validate
|
|
93
|
+
* @returns Parsed and validated RealtimeReloadPayload
|
|
94
|
+
* @throws ZodError if validation fails
|
|
95
|
+
*/
|
|
96
|
+
export declare function validateReloadPayload(data: unknown): RealtimeReloadPayload;
|
|
97
|
+
export declare function validateSiteEvent(data: unknown): RealtimeSiteEvent;
|
|
98
|
+
/**
|
|
99
|
+
* Create a reload payload for broadcasting.
|
|
100
|
+
*
|
|
101
|
+
* @param options - Payload options
|
|
102
|
+
* @returns Valid RealtimeReloadPayload
|
|
103
|
+
*/
|
|
104
|
+
export declare function createReloadPayload(options: {
|
|
105
|
+
siteId: string;
|
|
106
|
+
resource: 'theme' | 'page' | 'content';
|
|
107
|
+
resourceId?: string;
|
|
108
|
+
origin?: string | null;
|
|
109
|
+
}): RealtimeReloadPayload;
|
|
110
|
+
export declare function createLeaseChangedPayload(options: {
|
|
111
|
+
siteId: string;
|
|
112
|
+
scope: RealtimeEditScope;
|
|
113
|
+
}): RealtimeLeaseChangedPayload;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type DraftChannelStatus, type DraftRealtimeClient, type DraftSendResult } from './draftChannel';
|
|
2
|
+
import type { DraftStateMessage, DraftSyncRequestMessage } from './drafts';
|
|
3
|
+
/**
|
|
4
|
+
* `token` with a null access token waits (does not join) until one arrives.
|
|
5
|
+
* Changing the token never rebuilds the channel while it is healthy; the new
|
|
6
|
+
* token is applied in place.
|
|
7
|
+
*/
|
|
8
|
+
export type UseDraftChannelAuth = Readonly<{
|
|
9
|
+
kind: 'session';
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
kind: 'token';
|
|
12
|
+
accessToken: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
export type UseDraftChannelOptions = Readonly<{
|
|
15
|
+
/** Must be referentially stable (e.g. a module-level or memoised client). */
|
|
16
|
+
client: DraftRealtimeClient | null;
|
|
17
|
+
siteId: string;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
auth: UseDraftChannelAuth;
|
|
20
|
+
onDraftState?: (message: DraftStateMessage) => void;
|
|
21
|
+
onSyncRequest?: (message: DraftSyncRequestMessage) => void;
|
|
22
|
+
}>;
|
|
23
|
+
export type DraftChannelHookStatus = DraftChannelStatus | 'idle';
|
|
24
|
+
export type DraftHookSendResult = DraftSendResult | 'not-connected';
|
|
25
|
+
/**
|
|
26
|
+
* Join the private drafts channel for a site while mounted and enabled.
|
|
27
|
+
* Handlers are read through a ref, so re-renders never rejoin; only the client,
|
|
28
|
+
* site, enablement, auth mode or a needed rejoin after a token change do.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useDraftChannel(options: UseDraftChannelOptions): {
|
|
31
|
+
status: DraftChannelHookStatus;
|
|
32
|
+
sendDraftState: (message: DraftStateMessage) => Promise<DraftHookSendResult>;
|
|
33
|
+
sendSyncRequest: (message: DraftSyncRequestMessage) => Promise<DraftHookSendResult>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type RealtimeReloadPayload } from './types';
|
|
2
|
+
export type RealtimeStatus = 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
3
|
+
type ReloadChannel = Readonly<{
|
|
4
|
+
on: (event: 'broadcast', filter: {
|
|
5
|
+
event: 'reload' | 'lease-changed';
|
|
6
|
+
}, callback: (message: {
|
|
7
|
+
payload: unknown;
|
|
8
|
+
}) => void) => unknown;
|
|
9
|
+
subscribe: (callback: (status: string) => void) => unknown;
|
|
10
|
+
unsubscribe: () => unknown;
|
|
11
|
+
}>;
|
|
12
|
+
export type SiteRealtimeReloadOptions = Readonly<{
|
|
13
|
+
siteId: string;
|
|
14
|
+
resourceId?: string | null;
|
|
15
|
+
getClientId?: () => string | null;
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
createChannel: (name: string) => ReloadChannel;
|
|
18
|
+
onReload: (payload: RealtimeReloadPayload) => void;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function useSiteRealtimeReload({ siteId, resourceId, getClientId, enabled, createChannel, onReload, }: SiteRealtimeReloadOptions): {
|
|
21
|
+
status: RealtimeStatus;
|
|
22
|
+
subscribeToLeaseChanges: (scope: {
|
|
23
|
+
nodeType: "page" | "content_entry" | "page_surface";
|
|
24
|
+
nodeId: string;
|
|
25
|
+
}, listener: () => void) => () => void;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AddressedLocationValue, BusinessAddress } from '../../../core/src/index';
|
|
2
2
|
import type { ResolvedInternalLinkEntityType } from '../../../blocks/src/index';
|
|
3
|
-
import type { APIEndpoints, PublicBookingService as ApiPublicBookingService, PublicBookingServiceCatalogueItem as ApiPublicBookingServiceCatalogueItem, PublicBookingServicesResponse as ApiPublicBookingServicesResponse, PublicServiceCategorySummary as ApiPublicServiceCategorySummary, RoutableContentItem as ApiRoutableContentItem, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary, SdkBlockContentAdmission } from '../../../api/src/index';
|
|
3
|
+
import type { APIEndpoints, ApiErrorCode as SharedApiErrorCode, PublicBookingService as ApiPublicBookingService, PublicBookingServiceCatalogueItem as ApiPublicBookingServiceCatalogueItem, PublicBookingServicesResponse as ApiPublicBookingServicesResponse, PublicServiceCategorySummary as ApiPublicServiceCategorySummary, RoutableContentItem as ApiRoutableContentItem, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SdkRuntimePageSurfaceContentSource as ApiSdkRuntimePageSurfaceContentSource, SdkRuntimePageSurface as ApiSdkRuntimePageSurface, SdkRuntimeEntry as ApiSdkRuntimeEntry, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary, SdkBlockContentAdmission } from '../../../api/src/index';
|
|
4
4
|
import type { MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent } from '../contracts';
|
|
5
5
|
import type { PageRuntimeJoin } from '../../../theme-core/src/site-styles/index';
|
|
6
6
|
import type { BlockFieldConfig as SdkBlockFieldConfig, BlockFieldOptionsMap as SdkBlockFieldOptionsMap, ContentConfig as SdkContentConfig, ContainerOptionsConfig as SdkContainerOptionsConfig, FieldSelectOption as SdkFieldSelectOption, SdkCustomBlock, SdkThemeConfig, SdkThemePalette, SectionBackground as SdkSectionBackground, SectionOptionsConfig as SdkSectionOptionsConfig, SiteStyleConfig as SdkSiteStyleConfig } from '../config/types';
|
|
@@ -33,7 +33,7 @@ export interface ApiResponse<TData> {
|
|
|
33
33
|
data: TData;
|
|
34
34
|
meta: ResponseMeta;
|
|
35
35
|
}
|
|
36
|
-
export type ApiErrorCode =
|
|
36
|
+
export type ApiErrorCode = SharedApiErrorCode;
|
|
37
37
|
export interface FieldError {
|
|
38
38
|
field: string;
|
|
39
39
|
code: string;
|
|
@@ -299,6 +299,7 @@ export type SiteRouteRecord = {
|
|
|
299
299
|
export type SiteBookingOfferingPresetSummary = ApiSiteBookingOfferingPresetSummary;
|
|
300
300
|
type SiteSelectionResponse = Pick<ApiSiteBySlugResponse, 'theme' | 'hostedBookingAppearance' | 'themeId' | 'bookingAttribution' | Extract<keyof ApiSiteBySlugResponse, `selection${string}`>>;
|
|
301
301
|
export type SiteResponse = SiteSelectionResponse & {
|
|
302
|
+
demoEmailSuppressed?: boolean;
|
|
302
303
|
site: ApiSiteBySlugResponse['site'] & {
|
|
303
304
|
id: string;
|
|
304
305
|
title: string;
|
|
@@ -414,36 +415,8 @@ export type SdkSurfaceSlotContent = {
|
|
|
414
415
|
}>;
|
|
415
416
|
};
|
|
416
417
|
export type SdkRuntimePageSurfaceSubject = ApiSdkRuntimePageSurfaceSubject;
|
|
417
|
-
export type SdkRuntimePageSurfaceContentSource =
|
|
418
|
-
|
|
419
|
-
contentTypeId: string;
|
|
420
|
-
contentTypeKey: string;
|
|
421
|
-
templateKey: string | null;
|
|
422
|
-
}>;
|
|
423
|
-
export type SdkRuntimePageSurface = {
|
|
424
|
-
id: string;
|
|
425
|
-
routeId: string;
|
|
426
|
-
readinessState: 'internal_pilot' | 'shippable';
|
|
427
|
-
subject: SdkRuntimePageSurfaceSubject;
|
|
428
|
-
title: string;
|
|
429
|
-
slug: string | null;
|
|
430
|
-
path: string | null;
|
|
431
|
-
status: string;
|
|
432
|
-
publishAt: string | null;
|
|
433
|
-
content: Record<string, unknown>;
|
|
434
|
-
draftContent: Record<string, unknown> | null;
|
|
435
|
-
publishedContent: Record<string, unknown> | null;
|
|
436
|
-
metaTitle: string | null;
|
|
437
|
-
draftMetaTitle: string | null;
|
|
438
|
-
metaDescription: string | null;
|
|
439
|
-
draftMetaDescription: string | null;
|
|
440
|
-
ogImageId: string | null;
|
|
441
|
-
ogImageUrl: string | null;
|
|
442
|
-
canonicalUrl: string | null;
|
|
443
|
-
createdAt: string;
|
|
444
|
-
updatedAt: string;
|
|
445
|
-
contentSource: SdkRuntimePageSurfaceContentSource;
|
|
446
|
-
};
|
|
418
|
+
export type SdkRuntimePageSurfaceContentSource = ApiSdkRuntimePageSurfaceContentSource;
|
|
419
|
+
export type SdkRuntimePageSurface = ApiSdkRuntimePageSurface;
|
|
447
420
|
export type PageResponse = {
|
|
448
421
|
page: SdkRuntimePage;
|
|
449
422
|
templates?: SdkTemplate[];
|
|
@@ -465,29 +438,7 @@ export type PageResponse = {
|
|
|
465
438
|
type: 'pageSurface';
|
|
466
439
|
};
|
|
467
440
|
export type SdkRuntimeMediaAsset = MediaAssetIndexItem;
|
|
468
|
-
export type SdkRuntimeEntry =
|
|
469
|
-
id: string;
|
|
470
|
-
routeId: string | null;
|
|
471
|
-
type: string | null;
|
|
472
|
-
title: string;
|
|
473
|
-
slug: string | null;
|
|
474
|
-
status: string;
|
|
475
|
-
publishAt: string | null;
|
|
476
|
-
path: string | null;
|
|
477
|
-
draftPath: string | null;
|
|
478
|
-
content: Record<string, unknown>;
|
|
479
|
-
draftContent: Record<string, unknown> | null;
|
|
480
|
-
publishedContent: Record<string, unknown> | null;
|
|
481
|
-
metaTitle: string | null;
|
|
482
|
-
draftMetaTitle: string | null;
|
|
483
|
-
metaDescription: string | null;
|
|
484
|
-
draftMetaDescription: string | null;
|
|
485
|
-
ogImageId: string | null;
|
|
486
|
-
ogImageUrl: string | null;
|
|
487
|
-
canonicalUrl: string | null;
|
|
488
|
-
createdAt: string;
|
|
489
|
-
updatedAt: string;
|
|
490
|
-
};
|
|
441
|
+
export type SdkRuntimeEntry = ApiSdkRuntimeEntry;
|
|
491
442
|
export type PublishedContentEntryPreview = {
|
|
492
443
|
id: string;
|
|
493
444
|
title: string;
|
|
@@ -20,6 +20,7 @@ type MissingBlockOverrideErrorConstructor = Readonly<{
|
|
|
20
20
|
export declare const MissingBlockOverrideError: MissingBlockOverrideErrorConstructor;
|
|
21
21
|
export type PageRendererDataContext = {
|
|
22
22
|
siteId?: string;
|
|
23
|
+
demoEmailSuppressed?: boolean;
|
|
23
24
|
siteName?: string;
|
|
24
25
|
pageId?: string;
|
|
25
26
|
/** Canonical request pathname used by blocks when resolving same-site destinations. */
|
|
@@ -62,6 +62,7 @@ type PageCommonProps = {
|
|
|
62
62
|
*/
|
|
63
63
|
dataContext: {
|
|
64
64
|
readAuthority?: import('../../../../blocks/src/api').BrowserReadAuthority;
|
|
65
|
+
demoEmailSuppressed?: boolean;
|
|
65
66
|
siteName?: string;
|
|
66
67
|
/** Mailing-list runtime projected for the placements on this page. */
|
|
67
68
|
mailingList?: import('../../../../core/src/index').MailingListRuntimeContext;
|
|
@@ -44,6 +44,8 @@ type TransportedPageBlock = PageOutline['blocks'][number] & Readonly<{
|
|
|
44
44
|
draftContentId: string | null;
|
|
45
45
|
publishedPlacement: PublishedBlockPlacementRead;
|
|
46
46
|
}>;
|
|
47
|
+
/** Pair SDK preview publication data whether it is transported or already admitted. */
|
|
48
|
+
export declare function readSdkPreviewPublishedPlacement(block: Record<string, unknown>, kind: string): PublishedBlockPlacementRead;
|
|
47
49
|
export declare function readInvalidBlockAdmission(value: unknown): Readonly<{
|
|
48
50
|
kind: 'invalid';
|
|
49
51
|
error: PageBlockRenderAdmissionError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ButtonVariant as SystemButtonVariant, EventScheduleScope as SystemEventScheduleScope, EventSurfacePreset as SystemEventSurfacePreset, RichTextDoc as SystemRichTextDoc } from '../../contracts/system-block-content';
|
|
2
2
|
import type { PublicTeamMemberSummary } from '../../../../api/src/index';
|
|
3
|
-
import type {
|
|
3
|
+
import type { BookingPaymentCollectionOption, LocationCoordinates, PublicEventPriceDisplay, PublicEventPricing, PublicEventPricingOption, PublicEventPricingOptionAvailability, PublicEventPricingType } from '../../../../core/src/index';
|
|
4
4
|
import type { AccordionIslandProps as BlocksAccordionIslandProps, BookingFormConfig as BlocksBookingFormConfig, BookingFormInteractiveIslandProps as BlocksBookingFormIslandProps, BookingFormService as BlocksBookingFormService, CarouselIslandProps as BlocksCarouselIslandProps, CartDisplay as BlocksCartDisplay, CartInteractiveIslandProps as BlocksCartIslandProps, CartLineDisplay as BlocksCartLineDisplay, CheckoutDisplay as BlocksCheckoutDisplay, CheckoutInteractiveIslandProps as BlocksCheckoutIslandProps, EventCalendarInteractiveIslandProps as BlocksEventCalendarIslandProps, EventCombinedInteractiveIslandProps as BlocksEventCombinedIslandProps, EventDetailsIslandProps as BlocksEventDetailsIslandProps, EventDetailsOccurrenceContext as BlocksEventDetailsOccurrenceContext, LocationMapIslandProps as BlocksLocationMapIslandProps, EventRegistrationInteractiveIslandProps as BlocksEventRegistrationIslandProps, EventListingDisplay as BlocksEventListingDisplay, EventListingHydration as BlocksEventListingHydration, EventListingInteractiveIslandProps as BlocksEventListingIslandProps, PublicEvent as BlocksPublicEvent, FormInteractiveIslandProps as BlocksFormIslandProps, HeaderSectionIslandProps as BlocksHeaderSectionIslandProps, MembershipCardDisplay as BlocksMembershipCardDisplay, NewsletterFormInteractiveIslandProps as BlocksNewsletterFormIslandProps, PassCardDisplay as BlocksPassCardDisplay, PassesMembershipsDisplay as BlocksPassesMembershipsDisplay, ProductCardDisplay as BlocksProductCardDisplay, ProductDetailDisplay as BlocksProductDetailDisplay, ProductDetailInteractiveIslandProps as BlocksProductDetailIslandProps, ProductListDisplay as BlocksProductListDisplay, ProductListInteractiveIslandProps as BlocksProductListIslandProps, ProductVariantOptionDisplay as BlocksProductVariantOptionDisplay, ShopInteractiveIslandProps as BlocksShopIslandProps } from '../../../../blocks/src/contracts/index';
|
|
5
5
|
export type ResponsiveSlidesToShow = {
|
|
6
6
|
mobile?: number | string;
|
|
@@ -72,17 +72,7 @@ export type PublicEventAttendanceModeAvailability = {
|
|
|
72
72
|
waitlistEnabled: boolean;
|
|
73
73
|
};
|
|
74
74
|
export type { PublicTeamMemberSummary };
|
|
75
|
-
export type BookingPaymentCollectionOption
|
|
76
|
-
kind: 'upfront';
|
|
77
|
-
} | {
|
|
78
|
-
kind: 'deferred_manual';
|
|
79
|
-
} | {
|
|
80
|
-
kind: 'instalment_plan';
|
|
81
|
-
plan: BookingInstalmentPlanConfig;
|
|
82
|
-
} | {
|
|
83
|
-
kind: 'flexible_balance';
|
|
84
|
-
config: BookingFlexibleBalanceConfig;
|
|
85
|
-
};
|
|
75
|
+
export type { BookingPaymentCollectionOption };
|
|
86
76
|
export type BookingPaymentTerms = {
|
|
87
77
|
allowedOptions: BookingPaymentCollectionOption[];
|
|
88
78
|
};
|
|
@@ -35,6 +35,7 @@ export type SurfaceHostContext = Readonly<{
|
|
|
35
35
|
*/
|
|
36
36
|
export declare const SURFACE_ROOT_HOSTS: Readonly<Record<SurfaceId, Readonly<Record<SurfaceTier, string>>>>;
|
|
37
37
|
export declare const SURFACE_SITE_ROOT_HOSTS: Readonly<Record<SurfaceId, Readonly<Record<SurfaceTier, string>>>>;
|
|
38
|
+
export declare const SURFACE_SITE_ROOT_HOST_ALIASES: Readonly<Partial<Record<SurfaceId, Readonly<Partial<Record<SurfaceTier, readonly string[]>>>>>>;
|
|
38
39
|
/**
|
|
39
40
|
* Site slugs a surface host already occupies. A site's managed address is
|
|
40
41
|
* `{slug}.{site root host}`, so any surface host (dashboard root, site root or
|