@riverbankcms/sdk 0.147.0 → 0.148.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/dist/{PreviewEditorSidebar-DtpB3_sS.mjs → PreviewEditorSidebar-DvEPG3Z2.mjs} +202 -143
- package/dist/{PreviewEditorUI-DxTLgaHo.mjs → PreviewEditorUI-D6eb6fkx.mjs} +68 -60
- package/dist/{PreviewQueryProvider-Dd4dxOiU.mjs → PreviewQueryProvider-5znTyJuz.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DMMNCngt.mjs → SdkPreviewModeRuntime-DJ6utQ_R.mjs} +1191 -513
- package/dist/{SiteChromeCustomizeContext-DQXZXiqS.mjs → SiteChromeCustomizeContext-CFJYh6vo.mjs} +201798 -197304
- 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 +0 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +4 -4
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -0
- 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/commercePortalEndpoints.d.ts +7 -6
- 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/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 +133 -41
- package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +25 -0
- 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 +6 -5
- 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 +2 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/redirects.d.ts +3 -3
- package/dist/_dts/api/src/request.d.ts +10 -1
- 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 +0 -1
- 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 +8 -1
- 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/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/proof-block-islands.d.ts +16 -4
- 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 +0 -2
- 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 +4 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +6 -1
- 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 +2 -0
- 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 +24 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -3
- 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 +15 -1
- 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/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/SuccessStep.d.ts +4 -1
- 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.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 +5 -5
- 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 +13 -0
- 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/event-registration-errors.d.ts +4 -0
- 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/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/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/branded.d.ts +12 -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 +55 -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 +4 -0
- package/dist/_dts/core/src/uuid.d.ts +7 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -153
- 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/context.d.ts +1 -1
- package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
- 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 +24 -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/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/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/client/{BookingMailingListNote-1n4Ch_u_.mjs → BookingMailingListNote-CzRt2dF_.mjs} +98 -96
- package/dist/client/DemoBookingPortalAccess-mxqwap3f.mjs +344 -0
- package/dist/client/{EventCombined.client-C0pgma9y.mjs → EventCombined.client-CDb11igO.mjs} +6 -6
- package/dist/client/{EventListing.client-4fhLOvHP.mjs → EventListing.client-EgYhzKPa.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DScC4F3w.mjs → LeafletStaticMap-gtmtaA2b.mjs} +1 -1
- package/dist/client/{TerminalPanel-B5ZUsYhe.mjs → TerminalPanel-DvNUP5ot.mjs} +1 -1
- package/dist/client/{ThemedButton-DoVIV1Ao.mjs → ThemedButton-C7CeUJjW.mjs} +1 -1
- package/dist/client/{accordion-CoT5g7zo.mjs → accordion-kjvt49rA.mjs} +1 -1
- package/dist/client/{bookingForm-BWxB46xD.mjs → bookingForm-pbRZordh.mjs} +212 -62
- package/dist/client/bookings.mjs +616 -225
- package/dist/client/{carousel-DtNYWFd3.mjs → carousel-f4Zbmicv.mjs} +1 -1
- package/dist/client/{cart-z4qZih1Y.mjs → cart-DO20An50.mjs} +3 -3
- package/dist/client/{checkout-DpL7euFH.mjs → checkout-Du5amDR_.mjs} +3 -3
- package/dist/client/{checkoutUrls-BEfR7kVu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
- package/dist/client/client.mjs +1753 -823
- package/dist/client/{context-C8TinPJc.mjs → context-eW97E945.mjs} +4 -3
- package/dist/client/{dates-vwwxTeB0.mjs → dates-jPCirRea.mjs} +56 -11
- package/dist/client/{eventCalendar-DIbHfJXO.mjs → eventCalendar-C2M-iE4j.mjs} +9 -9
- package/dist/client/{eventCombined-DoGMJ6cg.mjs → eventCombined-W6ns3LHg.mjs} +4 -4
- package/dist/client/{eventDetails-BjN9v6a1.mjs → eventDetails-CR-GT0f0.mjs} +4 -4
- package/dist/client/{eventListing-DajjWgOv.mjs → eventListing-BK8AfYZz.mjs} +4 -4
- package/dist/client/{eventRegistration-DMq9gMA-.mjs → eventRegistration-BJSd4KUu.mjs} +369 -242
- package/dist/client/{form-Qf6qTbos.mjs → form-BvpfbQaT.mjs} +3 -3
- package/dist/client/{headerSection-D7qJrqFX.mjs → headerSection-I5sUQ8x-.mjs} +3 -3
- package/dist/client/hooks.mjs +254 -53
- package/dist/client/{locationMap-CCF9-t_0.mjs → locationMap-BLvwf9_f.mjs} +3 -3
- package/dist/client/{media-CwBGetqC.mjs → media-Cl38iOMI.mjs} +10 -3
- package/dist/client/{newsletterForm-DzCLSP4S.mjs → newsletterForm-DrQ2weE8.mjs} +3 -3
- package/dist/client/{pricing-Cgxv2KLC.mjs → pricing-BES87mrR.mjs} +1 -1
- package/dist/client/{productDetail-ru9w5GHx.mjs → productDetail-Url9jcc5.mjs} +3 -3
- package/dist/client/{productList-zaapKSl-.mjs → productList-DE7ngEZJ.mjs} +3 -3
- package/dist/client/{propsDecoder-CwvvNOHx.mjs → propsDecoder-D1OtGXDV.mjs} +89 -17
- package/dist/client/rendering/client.mjs +1445 -658
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2478 -1515
- package/dist/client/{routeIslandApiConfig-BwVFo0Y4.mjs → routeIslandApiConfig-BG9Y-SHg.mjs} +1 -1
- package/dist/client/{shop-mktkXvbV.mjs → shop-CJkuySJ3.mjs} +126 -79
- package/dist/client/{shop-commerce-De7gEnkA.mjs → shop-commerce-4rKj5n9h.mjs} +25 -13
- package/dist/client/{shop-commerce-store-B3MCxIBW.mjs → shop-commerce-store-Bxm75Pg6.mjs} +1 -1
- package/dist/client/{shopShared-TqExh235.mjs → shopShared-DpoQDWfz.mjs} +4 -4
- package/dist/client/{useEventFilters-n_OjkIjX.mjs → useEventFilters-D8HliSqR.mjs} +32 -17
- package/dist/preview-next/before-render.mjs +192 -83
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +192 -83
- package/dist/preview-next/middleware.mjs +192 -83
- package/dist/{previewAuthStore-C_EHQ5XA.mjs → previewAuthStore-BXXF3hhW.mjs} +194 -83
- package/dist/{sdk-runtime-BIkJg5y1.mjs → sdk-runtime-C2a05WjL.mjs} +2 -2
- package/dist/{separator-C9qDP95Z.mjs → separator-CuNhBAhS.mjs} +1 -1
- package/dist/server/components.mjs +1720 -1392
- package/dist/server/config-validation.mjs +221 -37
- package/dist/server/config.mjs +221 -37
- package/dist/server/data.mjs +221 -37
- package/dist/server/index.mjs +195 -84
- package/dist/server/next.mjs +490 -196
- package/dist/server/page-converter.mjs +53 -14
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1427 -1098
- package/dist/server/rendering.mjs +2693 -2365
- package/dist/server/routing.mjs +291 -55
- package/dist/server/server.mjs +281 -114
- package/package.json +1 -1
- 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/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
|
@@ -3,6 +3,7 @@ import type { PublicProfile, RectificationHistoryPropagationPlan, RectificationI
|
|
|
3
3
|
import type { DbJson } from '../../db/src/index';
|
|
4
4
|
import type { APIEndpoint } from './apiEndpointTypes';
|
|
5
5
|
import type { BillingAPIEndpoints } from './billingEndpointTypes';
|
|
6
|
+
import type { EditLeaseAPIEndpoints } from './editLeaseEndpoints';
|
|
6
7
|
import type { CustomDomainConnectionSnapshot, DomainHostingStatus } from './domainConnection';
|
|
7
8
|
import type { AdminListAllowedDomainsQueryOutput } from './schemas/admin-allowed-domains';
|
|
8
9
|
import type { AdminListAxiomLogsQueryOutput, AdminListErrorLogsQueryOutput, AdminListSupabaseLogsQueryOutput, AdminListVercelLogsQueryOutput } from './schemas/admin-observability-logs';
|
|
@@ -10,7 +11,7 @@ import type { AcceptAdminInviteRequest, AcceptAdminInviteResponse, AcceptSiteInv
|
|
|
10
11
|
import type { AdminRoleMutationResponse, RevokeAdminRoleRequest, StartImpersonationRequest, StartImpersonationResponse, StopImpersonationRequest, StopImpersonationResponse, UpsertAdminRoleRequest } from './admin/types';
|
|
11
12
|
import type { AccountRevokeSessionsBody, AccountRevokeSessionsResponse, AccountUpdatePasswordBody, AccountUpdatePasswordResponse } from './siteOperations';
|
|
12
13
|
import type { BookingSessionCancelAppointmentRequest, BookingSessionCancelAppointmentResponse, BookingSessionCreateAppointmentRequest, BookingSessionCreateAppointmentResponse, BookingSessionGetAppointmentResponse, BookingSessionListEligibleAppointmentPackagesResponse, BookingSessionGetEventResponse, BookingSessionListAppointmentsResponse, BookingSessionListEventsResponse, BookingSessionListMembershipsResponse, BookingSessionListPassesResponse, BookingSessionMeResponse, BookingSessionUpdateMeRequest, BookingSessionUpdateMeResponse, PublicBookingAppointmentStatusResponse, PublicBookingAvailabilityQuery, PublicBookingAvailableDatesResponse, PublicBookingAvailableSlotsResponse, PublicBookingService, PublicBookingServicesResponse, PublicWeeklySlotAvailabilityQuery, PublicWeeklySlotAvailabilityResponse, PublicCreateBookingAppointmentRequest, PublicCreateBookingAppointmentResponse, ReferenceOptionsResponse } from './bookingOperations';
|
|
13
|
-
import type { ContentEntryOrPageResponse, ContentEntrySummary, ExportFormSubmissionsCsvQuery, ExportFormSubmissionsCsvResponse, CreateFormSubmissionRectificationAnnotationRequest, CreateFormSubmissionRectificationAnnotationResponse, FormRecord, FormSubmissionWithRectificationAnnotations, FormSummary, NavigationItemRecord, NavigationMenuWithItems, PublicFormRecord, PublishedContentEntryOrPageResponse, RunSdkWorkflowResponse,
|
|
14
|
+
import type { ContentEntryOrPageResponse, ContentEntryEditorDetail, ContentEntryDetailResponse, PageRecord, ContentEntrySummary, ExportFormSubmissionsCsvQuery, ExportFormSubmissionsCsvResponse, CreateFormSubmissionRectificationAnnotationRequest, CreateFormSubmissionRectificationAnnotationResponse, FormRecord, FormSubmissionWithRectificationAnnotations, FormSummary, NavigationItemRecord, NavigationMenuWithItems, PublicFormRecord, PublishContentEntryBody, PublishedContentEntryOrPageResponse, RunSdkWorkflowResponse, ScheduledPublishingRouteResponse, DiscardedContentEntryOrPageResponse, WorkflowRunStatusResponse } from './contentRuntime';
|
|
14
15
|
import type { GetVersionHistoryResponse, ListVersionHistoryResponse, RestoreVersionHistoryRequest, RestoreVersionHistoryResponse, VersionHistoryListQuery } from './contentVersionHistory';
|
|
15
16
|
import type { ApplyContentTemplateAddonRequest, ContentTemplateDetailsResponse, CreateTemplateBlockRequest, GetTransformsResponse, ReorderTemplateBlocksRequest, SerializedContentTypeSummary, UpdateContentTemplateBlockBindingsRequest, UpdateContentTemplateBlockRequest } from './contentTypes';
|
|
16
17
|
import type { LinkPayload, RoutableContentItem, SitemapRouteItem } from './navigation/types';
|
|
@@ -145,7 +146,7 @@ type DsarExecutionOutcomeApi = {
|
|
|
145
146
|
detail: string;
|
|
146
147
|
message: string;
|
|
147
148
|
};
|
|
148
|
-
export type SiteManagementAPIEndpoints = BillingAPIEndpoints & SiteLifecycleAPIEndpoints & PageSurfaceAPIEndpoints & {
|
|
149
|
+
export type SiteManagementAPIEndpoints = BillingAPIEndpoints & EditLeaseAPIEndpoints & SiteLifecycleAPIEndpoints & PageSurfaceAPIEndpoints & {
|
|
149
150
|
listContentEntries: APIEndpoint<never, {
|
|
150
151
|
siteId: string;
|
|
151
152
|
type: string;
|
|
@@ -203,7 +204,11 @@ export type SiteManagementAPIEndpoints = BillingAPIEndpoints & SiteLifecycleAPIE
|
|
|
203
204
|
siteId: string;
|
|
204
205
|
type: string;
|
|
205
206
|
entryId: string;
|
|
206
|
-
},
|
|
207
|
+
}, {
|
|
208
|
+
entry: ContentEntryEditorDetail;
|
|
209
|
+
} | {
|
|
210
|
+
entry: PageRecord;
|
|
211
|
+
}>;
|
|
207
212
|
listContentEntryVersions: APIEndpoint<never, VersionHistoryListQuery & {
|
|
208
213
|
siteId: string;
|
|
209
214
|
type: string;
|
|
@@ -232,7 +237,9 @@ export type SiteManagementAPIEndpoints = BillingAPIEndpoints & SiteLifecycleAPIE
|
|
|
232
237
|
siteId: string;
|
|
233
238
|
type: string;
|
|
234
239
|
entryId: string;
|
|
235
|
-
},
|
|
240
|
+
}, ContentEntryDetailResponse & Readonly<{
|
|
241
|
+
optimisticHash: string;
|
|
242
|
+
}>>;
|
|
236
243
|
runSdkWorkflow: APIEndpoint<never, {
|
|
237
244
|
siteId: string;
|
|
238
245
|
type: string;
|
|
@@ -245,7 +252,7 @@ export type SiteManagementAPIEndpoints = BillingAPIEndpoints & SiteLifecycleAPIE
|
|
|
245
252
|
entryId: string;
|
|
246
253
|
runId: string;
|
|
247
254
|
}, WorkflowRunStatusResponse>;
|
|
248
|
-
publishContentEntry: APIEndpoint<
|
|
255
|
+
publishContentEntry: APIEndpoint<PublishContentEntryBody | undefined, {
|
|
249
256
|
siteId: string;
|
|
250
257
|
type: string;
|
|
251
258
|
entryId: string;
|
|
@@ -256,17 +263,17 @@ export type SiteManagementAPIEndpoints = BillingAPIEndpoints & SiteLifecycleAPIE
|
|
|
256
263
|
siteId: string;
|
|
257
264
|
type: string;
|
|
258
265
|
entryId: string;
|
|
259
|
-
},
|
|
266
|
+
}, ScheduledPublishingRouteResponse>;
|
|
260
267
|
cancelScheduledContentEntry: APIEndpoint<never, {
|
|
261
268
|
siteId: string;
|
|
262
269
|
type: string;
|
|
263
270
|
entryId: string;
|
|
264
|
-
},
|
|
271
|
+
}, ScheduledPublishingRouteResponse>;
|
|
265
272
|
discardContentEntry: APIEndpoint<never, {
|
|
266
273
|
siteId: string;
|
|
267
274
|
type: string;
|
|
268
275
|
entryId: string;
|
|
269
|
-
},
|
|
276
|
+
}, DiscardedContentEntryOrPageResponse>;
|
|
270
277
|
unpublishContentEntry: APIEndpoint<never, {
|
|
271
278
|
siteId: string;
|
|
272
279
|
type: string;
|
|
@@ -9,51 +9,51 @@ export declare const SITE_ROLE_PERMISSION_LEVEL: Record<SiteRole, number>;
|
|
|
9
9
|
* Lower number sorts earlier in UI role pickers.
|
|
10
10
|
*/
|
|
11
11
|
export declare const SITE_ROLE_DISPLAY_ORDER: Record<SiteRole, number>;
|
|
12
|
-
export declare function getSiteMembers(apiClient: ApiClient
|
|
12
|
+
export declare function getSiteMembers(apiClient: ApiClient<'listSiteMembers'>, { siteId, options, }: {
|
|
13
13
|
siteId: string;
|
|
14
14
|
options?: RequestInit;
|
|
15
15
|
}): Promise<ListSiteMembersResponse>;
|
|
16
|
-
export declare function inviteSiteMember(apiClient: ApiClient
|
|
16
|
+
export declare function inviteSiteMember(apiClient: ApiClient<'inviteSiteMember'>, { siteId, body, options, }: {
|
|
17
17
|
siteId: string;
|
|
18
18
|
body: InviteSiteMemberRequest;
|
|
19
19
|
options?: RequestInit;
|
|
20
20
|
}): Promise<InviteSiteMemberResponse>;
|
|
21
|
-
export declare function updateSiteMemberRole(apiClient: ApiClient
|
|
21
|
+
export declare function updateSiteMemberRole(apiClient: ApiClient<'updateSiteMemberRole'>, { siteId, memberId, body, options, }: {
|
|
22
22
|
siteId: string;
|
|
23
23
|
memberId: string;
|
|
24
24
|
body: UpdateSiteMemberRoleRequest;
|
|
25
25
|
options?: RequestInit;
|
|
26
26
|
}): Promise<UpdateSiteMemberRoleResponse>;
|
|
27
|
-
export declare function linkCurrentUserPractitioner(apiClient: ApiClient
|
|
27
|
+
export declare function linkCurrentUserPractitioner(apiClient: ApiClient<'linkCurrentUserPractitioner'>, { siteId, body, options, }: {
|
|
28
28
|
siteId: string;
|
|
29
29
|
body: LinkCurrentUserPractitionerRequest;
|
|
30
30
|
options?: RequestInit;
|
|
31
31
|
}): Promise<CurrentUserPractitionerLinkResponse>;
|
|
32
|
-
export declare function unlinkCurrentUserPractitioner(apiClient: ApiClient
|
|
32
|
+
export declare function unlinkCurrentUserPractitioner(apiClient: ApiClient<'unlinkCurrentUserPractitioner'>, { siteId, options, }: {
|
|
33
33
|
siteId: string;
|
|
34
34
|
options?: RequestInit;
|
|
35
35
|
}): Promise<CurrentUserPractitionerLinkResponse>;
|
|
36
|
-
export declare function removeSiteMember(apiClient: ApiClient
|
|
36
|
+
export declare function removeSiteMember(apiClient: ApiClient<'removeSiteMember'>, { siteId, memberId, options, }: {
|
|
37
37
|
siteId: string;
|
|
38
38
|
memberId: string;
|
|
39
39
|
options?: RequestInit;
|
|
40
40
|
}): Promise<RemoveSiteMemberResponse>;
|
|
41
|
-
export declare function revokeSiteInvitation(apiClient: ApiClient
|
|
41
|
+
export declare function revokeSiteInvitation(apiClient: ApiClient<'revokeSiteInvitation'>, { siteId, invitationId, options, }: {
|
|
42
42
|
siteId: string;
|
|
43
43
|
invitationId: string;
|
|
44
44
|
options?: RequestInit;
|
|
45
45
|
}): Promise<RevokeSiteInvitationResponse>;
|
|
46
|
-
export declare function resendSiteInvitation(apiClient: ApiClient
|
|
46
|
+
export declare function resendSiteInvitation(apiClient: ApiClient<'resendSiteInvitation'>, { siteId, invitationId, options, }: {
|
|
47
47
|
siteId: string;
|
|
48
48
|
invitationId: string;
|
|
49
49
|
options?: RequestInit;
|
|
50
50
|
}): Promise<ResendSiteInvitationResponse>;
|
|
51
|
-
export declare function transferSiteOwnership(apiClient: ApiClient
|
|
51
|
+
export declare function transferSiteOwnership(apiClient: ApiClient<'transferSiteOwnership'>, { siteId, body, options, }: {
|
|
52
52
|
siteId: string;
|
|
53
53
|
body: TransferSiteOwnershipRequest;
|
|
54
54
|
options?: RequestInit;
|
|
55
55
|
}): Promise<TransferSiteOwnershipResponse>;
|
|
56
|
-
export declare function acceptSiteInvitation(apiClient: ApiClient
|
|
56
|
+
export declare function acceptSiteInvitation(apiClient: ApiClient<'acceptSiteInvitation'>, { body, options, }: {
|
|
57
57
|
body: AcceptSiteInvitationRequest;
|
|
58
58
|
options?: RequestInit;
|
|
59
59
|
}): Promise<AcceptSiteInvitationResponse>;
|
|
@@ -295,8 +295,22 @@ export declare const goLiveSiteRequestSchema: z.ZodObject<{
|
|
|
295
295
|
acceptExtraSiteCharge: z.ZodOptional<z.ZodBoolean>;
|
|
296
296
|
}, z.core.$strip>;
|
|
297
297
|
export type GoLiveSiteRequest = z.infer<typeof goLiveSiteRequestSchema>;
|
|
298
|
+
/**
|
|
299
|
+
* Going live on a trialing plan takes the first payment. When the bank wants
|
|
300
|
+
* to check it, or the card is declined, the site stays unlaunched and the page
|
|
301
|
+
* completes the payment with this PaymentIntent client secret, then goes live
|
|
302
|
+
* again. The secret is never stored or logged.
|
|
303
|
+
*/
|
|
298
304
|
export type GoLiveSiteResponse = {
|
|
305
|
+
kind: 'launched';
|
|
299
306
|
redirectPath: string;
|
|
307
|
+
} | {
|
|
308
|
+
kind: 'payment_action_required';
|
|
309
|
+
clientSecret: string;
|
|
310
|
+
reason: 'authenticate' | 'new_card';
|
|
311
|
+
amountPence: number;
|
|
312
|
+
/** The payment's Stripe mode, which the publishable key must match. */
|
|
313
|
+
livemode: boolean;
|
|
300
314
|
};
|
|
301
315
|
export type OnboardingPreviewStatusResponse = {
|
|
302
316
|
dashboardUnlocked: boolean;
|
|
@@ -7,7 +7,7 @@ import type { CheckRedirectQuery, CheckRedirectResponse, CreateRedirectRuleReque
|
|
|
7
7
|
import type { CreateManagementKeyRequest, CreateManagementKeyResponse, CreateSiteApiKeyRequest, CreateSiteApiKeyResponse, CreateSitePreviewKeyRequest, CreateSitePreviewKeyResponse, CreateWebhookRequest, CreateWebhookResponse, DeleteBackupUploadRequest, DeleteBackupUploadResponse, DeleteWebhookResponse, GetSiteApiKeyAccessLogsResponse, ListSitePreviewKeysResponse, GetWebhookResponse, ImportBackupAsNewSiteRequest, ImportBackupAsNewSiteResponse, ImportSiteBackupRequest, ListManagementKeysResponse, ListSiteApiKeysResponse, ListWebhooksResponse, RevokeManagementKeyRequest, RevokeManagementKeyResponse, RevokeSiteApiKeyResponse, SdkDeploymentHealthResponse, SetupSdkDeploymentRevalidationWebhookRequest, SetupSdkDeploymentRevalidationWebhookResponse, SetupSdkRevalidationWebhookRequest, SetupSdkRevalidationWebhookResponse, UpdateWebhookRequest, UpdateWebhookResponse, BackupImportResponse, BackupPreviewRequest, BackupPreviewResponse, CreateBackupUploadUrlRequest, CreateBackupUploadUrlResponse } from './siteInfrastructure';
|
|
8
8
|
import type { GetSiteInspirationAnalysisResponse, ListSiteInspirationAnalysesResponse } from './siteGeneration';
|
|
9
9
|
import type { ListGscPropertiesAdminResponse, AuthStatusResponse, CronAppointmentRemindersResponse, CronBillingStatusResponse, CronEventFeedbackEmailsResponse, CronEventOccurrencesResponse, CronEventRemindersResponse, CronMediaJobsQuery, CronMediaJobsResponse, CronNewsletterSendResponse, CronPaymentReconciliationResponse, CronSeoIngestResponse, CronWaitlistExpiryResponse } from './siteOperations';
|
|
10
|
-
import type { ManagementMediaAsset, MediaResolveResponse, PushSdkConfigRequest, PushSdkConfigResponse, SdkAddEventOccurrenceRequest, SdkBackfillIdentifiersResult, SdkEventOccurrenceResponse, SdkGetEntryResponse, SdkGetEventCategoryResponse, SdkGetEventResponse, SdkGetFormResponse, SdkGetPageBlockResponse, SdkPatchPageBlockBody, SdkPatchPageBlockResponse, SdkGetVenueResponse, SdkListEntriesResponse, SdkListEventCategoriesResponse, SdkListEventOccurrencesResponse, SdkListEventsResponse, SdkListFormsResponse, SdkListVenuesResponse, SdkMediaFinalizeUploadResponse, SdkMediaDeleteApplyResponse, SdkMediaDeletePreviewResponse, SdkMediaDownloadResponse, SdkMediaListResponse, SdkMediaUploadUrlResponse, SdkPageResponse, SdkEntryUpsertSlotBlock, SdkPublishOrUnpublishEntryResponse, SdkPullContentTypesResponse, SdkCatalogBlocksResponse, SdkCatalogContentTypesResponse, SdkCapabilitiesResponse, SdkConfigureBookingVerticalRequest, SdkConfigureBookingVerticalResponse, SdkDemoContentResponse, SdkDeleteResponse, SdkPullEntriesAllResponse, SdkPullEntriesByTypeResponse, SdkPullEntriesResponse, SdkPullEventCategoriesResponse, SdkPullEventsResponse, SdkPullFooterResponse, SdkPullFormSchema, SdkPullFormsResponse, SdkPullFormSettings, SdkPullDraftsResponse, SdkPullNavigationResponse, SdkPullPagesResponse, SdkUpdateSettingsInput, SdkPullSettingsResponse, SdkPullSiteInfoResponse, SdkPullVenue, SdkPullVenuesResponse, SdkUpdateSettingsResponse, SdkUpdateEventOccurrenceRequest, SdkUpsertBlockResponse, SdkUpsertEntryResponse, SdkUpsertPageResponse, SdkUpsertEventCategoryResponse, SdkUpsertEventResponse, SdkUpsertFooterResponse, SdkUpsertFormResponse, SdkUpsertNavigationMenuResponse, SdkUpsertVenueResponse } from './sdkContracts';
|
|
10
|
+
import type { ManagementMediaAsset, MediaResolveResponse, PushSdkConfigRequest, PushSdkConfigResponse, SdkAddEventOccurrenceRequest, SdkCancelEventOccurrenceRequest, SdkBackfillIdentifiersResult, SdkEventOccurrenceResponse, SdkGetEntryResponse, SdkGetEventCategoryResponse, SdkGetEventResponse, SdkGetFormResponse, SdkGetPageBlockResponse, SdkPatchPageBlockBody, SdkPatchPageBlockResponse, SdkGetVenueResponse, SdkListEntriesResponse, SdkListEventCategoriesResponse, SdkListEventOccurrencesResponse, SdkListEventsResponse, SdkListFormsResponse, SdkListVenuesResponse, SdkMediaFinalizeUploadResponse, SdkMediaDeleteApplyResponse, SdkMediaDeletePreviewResponse, SdkMediaDownloadResponse, SdkMediaListResponse, SdkMediaUploadUrlResponse, SdkPageResponse, SdkEntryUpsertSlotBlock, SdkPublishOrUnpublishEntryResponse, SdkPullContentTypesResponse, SdkCatalogBlocksResponse, SdkCatalogContentTypesResponse, SdkCapabilitiesResponse, SdkConfigureBookingVerticalRequest, SdkConfigureBookingVerticalResponse, SdkDemoContentResponse, SdkDeleteResponse, SdkPullEntriesAllResponse, SdkPullEntriesByTypeResponse, SdkPullEntriesResponse, SdkPullEventCategoriesResponse, SdkPullEventsResponse, SdkPullFooterResponse, SdkPullFormSchema, SdkPullFormsResponse, SdkPullFormSettings, SdkPullDraftsResponse, SdkPullNavigationResponse, SdkPullPagesResponse, SdkUpdateSettingsInput, SdkPullSettingsResponse, SdkPullSiteInfoResponse, SdkPullVenue, SdkPullVenuesResponse, SdkUpdateSettingsResponse, SdkUpdateEventOccurrenceRequest, SdkUpsertBlockResponse, SdkUpsertEntryResponse, SdkUpsertPageResponse, SdkUpsertEventCategoryResponse, SdkUpsertEventResponse, SdkUpsertFooterResponse, SdkUpsertFormResponse, SdkUpsertNavigationMenuResponse, SdkUpsertVenueResponse } from './sdkContracts';
|
|
11
11
|
import type { FooterCompositionUpdateRequest } from './siteManagementEndpoints';
|
|
12
12
|
import type { SdkEventUpsertBody } from './sdk-event-upsert';
|
|
13
13
|
import type { SdkEntryPaginationQueryInput } from './schemas/sdk-entries';
|
|
@@ -292,7 +292,9 @@ export type SitePlatformAPIEndpoints = import('./sdkEventLifecycle').SdkEventLif
|
|
|
292
292
|
siteId: string;
|
|
293
293
|
identifier: string;
|
|
294
294
|
blockIdentifier: string;
|
|
295
|
-
}, SdkDeleteResponse
|
|
295
|
+
}, SdkDeleteResponse & Readonly<{
|
|
296
|
+
designSyncWarning?: import('./siteRuntimeEndpoints').PageBlockDesignSyncWarning;
|
|
297
|
+
}>>;
|
|
296
298
|
sdkGetPageBlock: APIEndpoint<never, {
|
|
297
299
|
siteId: string;
|
|
298
300
|
identifier: string;
|
|
@@ -310,6 +312,8 @@ export type SitePlatformAPIEndpoints = import('./sdkEventLifecycle').SdkEventLif
|
|
|
310
312
|
identifier: string;
|
|
311
313
|
}, {
|
|
312
314
|
reordered: true;
|
|
315
|
+
effect: import('@riverbankcms/site-commands').CommandEffect;
|
|
316
|
+
designSyncWarning?: import('./siteRuntimeEndpoints').PageBlockDesignSyncWarning;
|
|
313
317
|
}>;
|
|
314
318
|
sdkUpsertNavigationMenu: APIEndpoint<{
|
|
315
319
|
location: 'main' | 'footer' | 'legal';
|
|
@@ -416,7 +420,7 @@ export type SitePlatformAPIEndpoints = import('./sdkEventLifecycle').SdkEventLif
|
|
|
416
420
|
runIdentifier: string;
|
|
417
421
|
occurrenceId: string;
|
|
418
422
|
}, SdkEventOccurrenceResponse>;
|
|
419
|
-
sdkCancelEventOccurrence: APIEndpoint<
|
|
423
|
+
sdkCancelEventOccurrence: APIEndpoint<SdkCancelEventOccurrenceRequest, {
|
|
420
424
|
siteId: string;
|
|
421
425
|
identifier: string;
|
|
422
426
|
runIdentifier: string;
|
|
@@ -8,7 +8,7 @@ import type { APIEndpoint } from './apiEndpointTypes';
|
|
|
8
8
|
import type { AnalyticsReportQuery, AnalyticsReportResponse } from './analytics';
|
|
9
9
|
import type { CreateMediaAssetBody, MediaAssetResponse, MediaAssetFileFilterContract, MediaBulkDeleteResponse, MediaDeleteResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse } from './media';
|
|
10
10
|
import type { MediaUsageCheckResponse } from './shared-contracts';
|
|
11
|
-
import type { BlockWithContentResponse, BlockListItem, ContentEntryListStage, EntryPageContentSlotsResponse, PageSurfaceContentSlotsResponse, ListPublishedEntriesResponse, PageDraftRecord,
|
|
11
|
+
import type { BlockWithContentResponse, BlockListItem, ContentEntryListStage, EntryPageContentSlotsResponse, PageSurfaceContentSlotsResponse, ListPublishedEntriesResponse, PageDraftRecord, PublishedContentEntryPreviewResponse, PublishedPostPreviewResponse, SdkBlockContent, SdkRuntimeContentByPathResponse, SdkRouteDecisionResponse, SdkRouteOutcomeResponse, SdkTemplate, SiteBySlugResponse, ThemePreferencesRecord } from './contentRuntime';
|
|
12
12
|
import type { GetVersionHistoryResponse, ListVersionHistoryResponse, RestoreVersionHistoryRequest, RestoreVersionHistoryResponse, VersionHistoryListQuery } from './contentVersionHistory';
|
|
13
13
|
import type { CreateMediaUploadUrlRequest, CreateMediaUploadUrlResponse, CreateSiteLogoUploadUrlRequest, CreateSiteLogoUploadUrlResponse, MediaUploadFinalizeRequest, UploadSiteLogoRequest } from './siteInfrastructure';
|
|
14
14
|
import type { DevToolsGetSiteRoleDowngradeQuery, DevToolsImpersonationResponse, DevToolsSeedResponse, DevToolsSetSiteRoleDowngradeRequest, SiteRoleDowngradeState } from './siteOperations';
|
|
@@ -184,14 +184,8 @@ export type PageDesignEditorStateResponse = {
|
|
|
184
184
|
revision: PageDesignRevisionToken;
|
|
185
185
|
editorModel: PageDesignEditorReadModel;
|
|
186
186
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
operation: 'create' | 'delete' | 'reorder';
|
|
190
|
-
message: string;
|
|
191
|
-
blocker?: string;
|
|
192
|
-
source?: 'draft' | 'published-fallback';
|
|
193
|
-
reason?: string;
|
|
194
|
-
}>;
|
|
187
|
+
import type { PageBlockDesignSyncWarning } from '@riverbankcms/site-commands';
|
|
188
|
+
export type { PageBlockDesignSyncWarning } from '@riverbankcms/site-commands';
|
|
195
189
|
/**
|
|
196
190
|
* Site runtime endpoints cover theme generation, site lookup, media/content runtime
|
|
197
191
|
* APIs, lightweight dev-tools helpers, and client-side analytics collection that used
|
|
@@ -468,7 +462,7 @@ export type SiteRuntimeAPIEndpoints = {
|
|
|
468
462
|
slotKey: string;
|
|
469
463
|
}, {
|
|
470
464
|
ok: boolean;
|
|
471
|
-
block:
|
|
465
|
+
block: BlockListItem;
|
|
472
466
|
}>;
|
|
473
467
|
reorderEntrySlotBlocks: APIEndpoint<{
|
|
474
468
|
blockIds: string[];
|
|
@@ -539,7 +533,7 @@ export type SiteRuntimeAPIEndpoints = {
|
|
|
539
533
|
pageId: string;
|
|
540
534
|
}, {
|
|
541
535
|
ok: boolean;
|
|
542
|
-
block:
|
|
536
|
+
block: BlockListItem;
|
|
543
537
|
designSyncWarning?: PageBlockDesignSyncWarning;
|
|
544
538
|
}>;
|
|
545
539
|
reorderBlocks: APIEndpoint<{
|
|
@@ -599,7 +593,6 @@ export type SiteRuntimeAPIEndpoints = {
|
|
|
599
593
|
pageId: string;
|
|
600
594
|
}, {
|
|
601
595
|
page: PageDraftRecord;
|
|
602
|
-
publishedBlocks?: PublishedBlockBaseline[];
|
|
603
596
|
}>;
|
|
604
597
|
discardPageDraft: APIEndpoint<never, {
|
|
605
598
|
siteId: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Raw editor baselines travel together with their compare-and-set revisions. */
|
|
2
|
+
export type SdkEditorRevision = Readonly<{
|
|
3
|
+
content: string;
|
|
4
|
+
metadata: string | null;
|
|
5
|
+
contentValues: Record<string, unknown>;
|
|
6
|
+
publishedContent: Record<string, unknown> | null;
|
|
7
|
+
}>;
|
|
8
|
+
export type SdkRuntimeEntry = {
|
|
9
|
+
id: string;
|
|
10
|
+
editorRevision?: SdkEditorRevision;
|
|
11
|
+
routeId: string | null;
|
|
12
|
+
type: string | null;
|
|
13
|
+
title: string;
|
|
14
|
+
slug: string | null;
|
|
15
|
+
status: string;
|
|
16
|
+
publishAt: string | null;
|
|
17
|
+
path: string | null;
|
|
18
|
+
draftPath: string | null;
|
|
19
|
+
content: Record<string, unknown>;
|
|
20
|
+
draftContent: Record<string, unknown> | null;
|
|
21
|
+
publishedContent: Record<string, unknown> | null;
|
|
22
|
+
metaTitle: string | null;
|
|
23
|
+
draftMetaTitle: string | null;
|
|
24
|
+
metaDescription: string | null;
|
|
25
|
+
draftMetaDescription: string | null;
|
|
26
|
+
ogImageId: string | null;
|
|
27
|
+
ogImageUrl: string | null;
|
|
28
|
+
canonicalUrl: string | null;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform Checkout for subscription setup.
|
|
3
|
+
*
|
|
4
|
+
* Creates Stripe Checkout sessions for users who need to set up a subscription
|
|
5
|
+
* to cover their platform costs (site fees, etc.). One builder serves both
|
|
6
|
+
* presentations: hosted Checkout, where the customer is redirected to Stripe's
|
|
7
|
+
* page, and embedded Checkout, mounted in our own page with a client secret.
|
|
8
|
+
*/
|
|
9
|
+
import { getStripeClient } from '../stripe/client';
|
|
10
|
+
export type PlatformCheckoutStripeDeps = {
|
|
11
|
+
getStripeClient: typeof getStripeClient;
|
|
12
|
+
};
|
|
13
|
+
type PlatformCheckoutPresentationFields = {
|
|
14
|
+
/** Stripe's own page: the customer leaves our site and comes back to one of these. */
|
|
15
|
+
hosted: Readonly<{
|
|
16
|
+
successUrl: string;
|
|
17
|
+
cancelUrl: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Mounted in our page. Stripe forbids success and cancel URLs here, and
|
|
21
|
+
* comes back to `returnUrl` with the session id appended.
|
|
22
|
+
*/
|
|
23
|
+
embedded: Readonly<{
|
|
24
|
+
returnUrl: string;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
type PlatformCheckoutSessionHandles = {
|
|
28
|
+
hosted: Readonly<{
|
|
29
|
+
checkoutUrl: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** `livemode` says which publishable key can mount the session. */
|
|
32
|
+
embedded: Readonly<{
|
|
33
|
+
clientSecret: string;
|
|
34
|
+
livemode: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
export type PlatformCheckoutMode = keyof PlatformCheckoutPresentationFields;
|
|
38
|
+
export type PlatformCheckoutPresentation<M extends PlatformCheckoutMode = PlatformCheckoutMode> = {
|
|
39
|
+
[K in M]: Readonly<{
|
|
40
|
+
mode: K;
|
|
41
|
+
}> & PlatformCheckoutPresentationFields[K];
|
|
42
|
+
}[M];
|
|
43
|
+
export type PlatformCheckoutSession<M extends PlatformCheckoutMode = PlatformCheckoutMode> = {
|
|
44
|
+
[K in M]: Readonly<{
|
|
45
|
+
kind: K;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
}> & PlatformCheckoutSessionHandles[K];
|
|
48
|
+
}[M];
|
|
49
|
+
export type CreatePlatformCheckoutOptions<M extends PlatformCheckoutMode = PlatformCheckoutMode> = Readonly<{
|
|
50
|
+
/** Stable for one checkout attempt and safe to pass to Stripe retries. */
|
|
51
|
+
idempotencyKey: string;
|
|
52
|
+
/** Stripe customer ID */
|
|
53
|
+
customerId: string;
|
|
54
|
+
/** Total price in cents */
|
|
55
|
+
priceAmountCents: number;
|
|
56
|
+
/** Currency code (e.g., 'gbp') */
|
|
57
|
+
currency: string;
|
|
58
|
+
/** Stripe product ID for platform subscriptions */
|
|
59
|
+
productId: string;
|
|
60
|
+
/** Hosted or embedded, with the URLs each one allows. */
|
|
61
|
+
presentation: PlatformCheckoutPresentation<M>;
|
|
62
|
+
/** Trial period in days (optional) */
|
|
63
|
+
trialDays?: number;
|
|
64
|
+
/** Additional metadata */
|
|
65
|
+
metadata?: Record<string, string>;
|
|
66
|
+
}>;
|
|
67
|
+
export declare function withCheckoutSessionIdReturn(returnUrl: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* Create a Stripe Checkout session for platform subscription setup.
|
|
70
|
+
*
|
|
71
|
+
* Uses inline price_data so the database remains the source of truth for pricing.
|
|
72
|
+
* The result matches the requested presentation: a URL to redirect to for
|
|
73
|
+
* hosted Checkout, or a client secret to mount for embedded Checkout.
|
|
74
|
+
*/
|
|
75
|
+
export declare function createPlatformCheckoutSession<M extends PlatformCheckoutMode>(options: CreatePlatformCheckoutOptions<M>): Promise<PlatformCheckoutSession<M>>;
|
|
76
|
+
export declare function createPlatformCheckoutSessionWithDeps<M extends PlatformCheckoutMode>(deps: PlatformCheckoutStripeDeps, options: CreatePlatformCheckoutOptions<M>): Promise<PlatformCheckoutSession<M>>;
|
|
77
|
+
export {};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { type PlannerNoChange } from '../../../core/src/index';
|
|
2
|
-
import { type BillingPlanId } from '../plans/types';
|
|
3
|
-
export type BillingComponentInterval = 'month' | 'year';
|
|
1
|
+
import { type Brand, type PlannerNoChange } from '../../../core/src/index';
|
|
2
|
+
import { type BillingPlanId, type PaidBillingPlanId } from '../plans/types';
|
|
4
3
|
export type BillingComponentCurrencyCode = string;
|
|
5
|
-
export type BillingComponentId = string
|
|
4
|
+
export type BillingComponentId = Brand<string, 'BillingComponentId'>;
|
|
5
|
+
export type BillingComponentIdempotencyKey = Brand<string, 'BillingComponentIdempotencyKey'>;
|
|
6
|
+
export type BillingComponentSnapshotHash = Brand<string, 'BillingComponentSnapshotHash'>;
|
|
6
7
|
export type BillingComponentSiteId = string;
|
|
7
8
|
export type BillingComponentSiteDomainId = string;
|
|
8
|
-
|
|
9
|
+
/** Brand a component id read from a trusted store (a database row or a fixture). */
|
|
10
|
+
export declare const unsafeAsBillingComponentId: (id: string) => BillingComponentId;
|
|
11
|
+
export declare const unsafeAsBillingComponentIdempotencyKey: (key: string) => BillingComponentIdempotencyKey;
|
|
12
|
+
export declare const unsafeAsBillingComponentSnapshotHash: (hash: string) => BillingComponentSnapshotHash;
|
|
13
|
+
/** Components derived on every read; they are never stored. */
|
|
14
|
+
export type ComputedBillingComponentKind = 'plan_base' | 'custom_site_price';
|
|
15
|
+
/** Components stored in `billing_components`; mirrors the database enum. */
|
|
16
|
+
export type PersistedBillingComponentKind = 'extra_site' | 'managed_domain_overage';
|
|
17
|
+
export type BillingComponentKind = ComputedBillingComponentKind | PersistedBillingComponentKind;
|
|
9
18
|
export type BillingComponentPersistenceStatus = 'pending_acceptance' | 'accepted' | 'sync_failed' | 'registrar_failed' | 'registrar_succeeded_persist_failed' | 'active' | 'ending' | 'ended' | 'failed';
|
|
10
19
|
export type EndableBillingComponentStatus = Extract<BillingComponentPersistenceStatus, 'active' | 'ending'>;
|
|
11
20
|
export type EndableBillingComponentKind = Extract<BillingComponentKind, 'extra_site' | 'managed_domain_overage'>;
|
|
@@ -14,10 +23,9 @@ export type BillingComponentProposalPlan = Readonly<{
|
|
|
14
23
|
pendingSourceKey: string;
|
|
15
24
|
userId: string;
|
|
16
25
|
siteId: string | null;
|
|
17
|
-
kind:
|
|
26
|
+
kind: PersistedBillingComponentKind;
|
|
18
27
|
amountCents: number;
|
|
19
28
|
currency: string;
|
|
20
|
-
interval: BillingComponentInterval;
|
|
21
29
|
sourceEntity: BillingComponentSourceEntityPlan;
|
|
22
30
|
snapshotHash: string;
|
|
23
31
|
pricingSnapshot: unknown;
|
|
@@ -51,7 +59,6 @@ export type BillingComponentBase<TKind extends BillingComponentKind, TOrigin ext
|
|
|
51
59
|
source: BillingComponentSourceForKind<TKind>;
|
|
52
60
|
amountCents: number;
|
|
53
61
|
currency: BillingComponentCurrencyCode;
|
|
54
|
-
interval: BillingComponentInterval;
|
|
55
62
|
}>;
|
|
56
63
|
export type MacadamiaExtraSiteBillingComponentProposalPlan = BillingComponentProposalPlan & Readonly<{
|
|
57
64
|
kind: 'extra_site';
|
|
@@ -122,9 +129,7 @@ export type BillingTotalPricePlan = BillingBasePricePlan & Readonly<{
|
|
|
122
129
|
componentBreakdown: readonly BillingComponent[];
|
|
123
130
|
}>;
|
|
124
131
|
export type BillingComponentCompatibilityMismatch = Readonly<{
|
|
125
|
-
tag: '
|
|
126
|
-
componentInterval: BillingComponentInterval;
|
|
127
|
-
requestedInterval: BillingComponentInterval;
|
|
132
|
+
tag: 'component_currency_mismatch';
|
|
128
133
|
componentCurrency: BillingComponentCurrencyCode;
|
|
129
134
|
requestedCurrency: BillingComponentCurrencyCode;
|
|
130
135
|
}>;
|
|
@@ -147,7 +152,6 @@ export type BillingComponentSummaryBase<TKind extends BillingComponentKind> = Re
|
|
|
147
152
|
label: string;
|
|
148
153
|
amountCents: number;
|
|
149
154
|
formatted: string;
|
|
150
|
-
interval: BillingComponentInterval;
|
|
151
155
|
}>;
|
|
152
156
|
export type BillingComponentSummaryBasePlanComponent = BillingComponentSummaryBase<'plan_base'> & Readonly<{
|
|
153
157
|
source: BillingComponentPlanSource;
|
|
@@ -208,13 +212,15 @@ export type MacadamiaExtraSitePricingSnapshot = Readonly<{
|
|
|
208
212
|
planId: BillingPlanId;
|
|
209
213
|
amountCents: number;
|
|
210
214
|
currency: BillingComponentCurrencyCode;
|
|
211
|
-
interval: BillingComponentInterval;
|
|
212
215
|
}>;
|
|
213
216
|
export type ExtraSitePricingPolicy = Readonly<{
|
|
214
217
|
includedSiteCount: number;
|
|
215
218
|
currency: BillingComponentCurrencyCode;
|
|
216
|
-
extraSite:
|
|
219
|
+
extraSite:
|
|
220
|
+
/** The plan an upgrade prompt names: the cheapest one that keeps what this plan has and adds extra sites. */
|
|
221
|
+
Readonly<{
|
|
217
222
|
tag: 'not_supported';
|
|
223
|
+
minimumPlanId: PaidBillingPlanId;
|
|
218
224
|
}> | Readonly<{
|
|
219
225
|
tag: 'priced';
|
|
220
226
|
monthlyAmountCents: number;
|
|
@@ -226,34 +232,22 @@ export type ConfiguredExtraSitePricingPolicy = ExtraSitePricingPolicy & Readonly
|
|
|
226
232
|
monthlyAmountCents: number;
|
|
227
233
|
}>;
|
|
228
234
|
}>;
|
|
229
|
-
export type MacadamiaSiteAllowancePricingInput = Readonly<{
|
|
230
|
-
includedLiveSiteCount: number;
|
|
231
|
-
extraSite: Readonly<{
|
|
232
|
-
tag: 'not_supported';
|
|
233
|
-
}> | Readonly<{
|
|
234
|
-
tag: 'priced';
|
|
235
|
-
monthlyPricePence: number;
|
|
236
|
-
}>;
|
|
237
|
-
}>;
|
|
238
235
|
export type ActiveExtraSiteComponentForReconciliation = Readonly<{
|
|
239
236
|
componentId: BillingComponentId;
|
|
240
237
|
siteId: BillingComponentSiteId;
|
|
241
238
|
amountCents: number;
|
|
242
239
|
currency: BillingComponentCurrencyCode;
|
|
243
|
-
interval: BillingComponentInterval;
|
|
244
240
|
}>;
|
|
245
241
|
export type MacadamiaExtraSiteReconciliationAction = Readonly<{
|
|
246
242
|
tag: 'requires_acceptance';
|
|
247
243
|
site: BillableMacadamiaSite;
|
|
248
244
|
amountCents: number;
|
|
249
245
|
currency: BillingComponentCurrencyCode;
|
|
250
|
-
interval: BillingComponentInterval;
|
|
251
246
|
}> | Readonly<{
|
|
252
247
|
tag: 'create_missing';
|
|
253
248
|
site: BillableMacadamiaSite;
|
|
254
249
|
amountCents: number;
|
|
255
250
|
currency: BillingComponentCurrencyCode;
|
|
256
|
-
interval: BillingComponentInterval;
|
|
257
251
|
}> | Readonly<{
|
|
258
252
|
tag: 'end_at_period_end';
|
|
259
253
|
component: ActiveExtraSiteComponentForReconciliation;
|
|
@@ -265,7 +259,7 @@ export type MacadamiaExtraSiteReconciliationAction = Readonly<{
|
|
|
265
259
|
}> | Readonly<{
|
|
266
260
|
tag: 'requires_plan_upgrade';
|
|
267
261
|
site: BillableMacadamiaSite;
|
|
268
|
-
minimumPlanId:
|
|
262
|
+
minimumPlanId: PaidBillingPlanId;
|
|
269
263
|
}>;
|
|
270
264
|
export type MacadamiaExtraSiteReconciliationPlan = PlannerNoChange | Readonly<{
|
|
271
265
|
tag: 'changes_required';
|
|
@@ -281,13 +275,12 @@ export type MacadamiaExtraSiteLaunchDecision = Readonly<{
|
|
|
281
275
|
}> | Readonly<{
|
|
282
276
|
tag: 'requires_plan_upgrade';
|
|
283
277
|
currentPlanId: BillingPlanId;
|
|
284
|
-
minimumPlanId:
|
|
278
|
+
minimumPlanId: PaidBillingPlanId;
|
|
285
279
|
}> | Readonly<{
|
|
286
280
|
tag: 'requires_acceptance';
|
|
287
281
|
currentPlanId: BillingPlanId;
|
|
288
282
|
amountCents: number;
|
|
289
283
|
currency: BillingComponentCurrencyCode;
|
|
290
|
-
interval: BillingComponentInterval;
|
|
291
284
|
}>;
|
|
292
285
|
export type MacadamiaSiteCreationBillingNotice = Readonly<{
|
|
293
286
|
tag: 'none';
|
|
@@ -298,13 +291,12 @@ export type MacadamiaSiteCreationBillingNotice = Readonly<{
|
|
|
298
291
|
}> | Readonly<{
|
|
299
292
|
tag: 'upgrade_required_on_launch';
|
|
300
293
|
currentPlanId: BillingPlanId;
|
|
301
|
-
minimumPlanId:
|
|
294
|
+
minimumPlanId: PaidBillingPlanId;
|
|
302
295
|
}> | Readonly<{
|
|
303
296
|
tag: 'extra_site_charge_on_launch';
|
|
304
297
|
currentPlanId: BillingPlanId;
|
|
305
298
|
amountCents: number;
|
|
306
299
|
currency: BillingComponentCurrencyCode;
|
|
307
|
-
interval: BillingComponentInterval;
|
|
308
300
|
}>;
|
|
309
301
|
export type MacadamiaExtraSiteProposalDecisionPlan = Extract<MacadamiaExtraSiteLaunchDecision, {
|
|
310
302
|
tag: 'requires_acceptance';
|
|
@@ -378,7 +370,7 @@ export declare function planBillingComponentEndAtTimestamp(input: Readonly<{
|
|
|
378
370
|
now: Date;
|
|
379
371
|
}>): BillingComponentTimestampEndPlan;
|
|
380
372
|
export declare function gbpPenceToAmountCents(amountPence: number, currency: BillingComponentCurrencyCode): number;
|
|
381
|
-
export declare function buildMacadamiaExtraSitePricingPolicy(
|
|
373
|
+
export declare function buildMacadamiaExtraSitePricingPolicy(planId: BillingPlanId): ExtraSitePricingPolicy;
|
|
382
374
|
export declare function buildManagedDomainRegistrarAttemptIdempotencyKey(input: Readonly<{
|
|
383
375
|
componentId: string;
|
|
384
376
|
domain: string;
|
|
@@ -408,14 +400,12 @@ export declare function classifyBillingModel(input: Readonly<{
|
|
|
408
400
|
export declare function planExtraSiteComponents(input: Readonly<{
|
|
409
401
|
sites: readonly BillableMacadamiaSite[];
|
|
410
402
|
policy: ConfiguredExtraSitePricingPolicy;
|
|
411
|
-
interval?: BillingComponentInterval;
|
|
412
403
|
}>): readonly BillingComponent[];
|
|
413
404
|
export declare function planMacadamiaExtraSiteReconciliation(input: Readonly<{
|
|
414
405
|
sites: readonly BillableMacadamiaSite[];
|
|
415
406
|
activeExtraSiteComponents: readonly ActiveExtraSiteComponentForReconciliation[];
|
|
416
407
|
acceptedSiteIds?: readonly BillingComponentSiteId[];
|
|
417
408
|
policy: ExtraSitePricingPolicy;
|
|
418
|
-
interval?: BillingComponentInterval;
|
|
419
409
|
}>): MacadamiaExtraSiteReconciliationPlan;
|
|
420
410
|
export declare function evaluateMacadamiaExtraSiteLaunchDecision(input: Readonly<{
|
|
421
411
|
siteId: BillingComponentSiteId;
|
|
@@ -426,14 +416,12 @@ export declare function evaluateMacadamiaExtraSiteLaunchDecision(input: Readonly
|
|
|
426
416
|
componentId?: BillingComponentId;
|
|
427
417
|
}>[];
|
|
428
418
|
policy: ExtraSitePricingPolicy;
|
|
429
|
-
interval?: BillingComponentInterval;
|
|
430
419
|
}>): MacadamiaExtraSiteLaunchDecision;
|
|
431
420
|
export declare function macadamiaExtraSiteLaunchDecisionToCreationBillingNotice(decision: MacadamiaExtraSiteLaunchDecision): MacadamiaSiteCreationBillingNotice;
|
|
432
421
|
export declare function evaluateMacadamiaSiteCreationBillingNotice(input: Readonly<{
|
|
433
422
|
currentPlanId: BillingPlanId;
|
|
434
423
|
currentLiveSiteCount: number;
|
|
435
424
|
policy: ExtraSitePricingPolicy;
|
|
436
|
-
interval?: BillingComponentInterval;
|
|
437
425
|
}>): MacadamiaSiteCreationBillingNotice;
|
|
438
426
|
export declare function resolveBillingComponents(input: Readonly<{
|
|
439
427
|
basePlan: BillingComponent;
|
|
@@ -454,16 +442,13 @@ export declare function toBillingSiteCostBreakdown(input: Readonly<{
|
|
|
454
442
|
export declare function planCustomSitePriceComponents(input: Readonly<{
|
|
455
443
|
siteBreakdown: readonly BillingSiteCostBreakdown[];
|
|
456
444
|
currency: BillingComponentCurrencyCode;
|
|
457
|
-
interval: BillingComponentInterval;
|
|
458
445
|
}>): readonly BillingComponent[];
|
|
459
446
|
export declare function validateBillingComponentCompatibility(input: Readonly<{
|
|
460
447
|
component: BillingComponent;
|
|
461
|
-
requestedInterval: BillingComponentInterval;
|
|
462
448
|
requestedCurrency: BillingComponentCurrencyCode;
|
|
463
449
|
}>): BillingComponentCompatibilityMismatch | null;
|
|
464
450
|
export declare function planBillingTotalPrice(input: Readonly<{
|
|
465
451
|
planId: string;
|
|
466
|
-
interval: BillingComponentInterval;
|
|
467
452
|
currency: BillingComponentCurrencyCode;
|
|
468
453
|
siteBreakdown: readonly BillingSiteCostBreakdown[];
|
|
469
454
|
persistedComponents: readonly PersistedBillingComponent[];
|
|
@@ -521,5 +506,5 @@ export declare function asBillingComponentProposalPlan<TIdempotencyKey, TPending
|
|
|
521
506
|
* programming/configuration error into every runtime caller.
|
|
522
507
|
*/
|
|
523
508
|
export declare function asBillingComponentProposalPricingSnapshot<TPricingSnapshot>(value: unknown, parse: BillingComponentProposalPricingSnapshotParser<TPricingSnapshot>, description?: string): TPricingSnapshot;
|
|
524
|
-
export declare function hashBillingComponentSnapshot(snapshot: unknown):
|
|
509
|
+
export declare function hashBillingComponentSnapshot(snapshot: unknown): BillingComponentSnapshotHash;
|
|
525
510
|
export declare function stableJson(value: unknown): string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BillingPlanId, PlanEntitlements } from '../plans/types';
|
|
2
2
|
import { type SubscriptionRepository, type SubscriptionRecord } from '../subscriptions/store';
|
|
3
3
|
import { type PlanStanding } from '../plans/standing';
|
|
4
4
|
export interface MembershipState {
|
|
5
5
|
userId: string;
|
|
6
6
|
planStanding: 'paid' | 'payment_recovery' | 'free';
|
|
7
7
|
planId: BillingPlanId;
|
|
8
|
-
interval: BillingInterval;
|
|
9
8
|
status: SubscriptionRecord['status'];
|
|
10
9
|
currentPeriodEnd: string;
|
|
11
10
|
cancelAtPeriodEnd: boolean;
|
|
@@ -19,7 +18,6 @@ export interface MembershipSummary {
|
|
|
19
18
|
planStanding: 'paid' | 'payment_recovery' | 'free';
|
|
20
19
|
/** Effective entitlement plan. Provider subscription identity remains in the repository. */
|
|
21
20
|
planId: BillingPlanId;
|
|
22
|
-
interval: BillingInterval;
|
|
23
21
|
status: SubscriptionRecord['status'];
|
|
24
22
|
currentPeriodEnd: string;
|
|
25
23
|
cancelAtPeriodEnd: boolean;
|