@riverbankcms/sdk 0.107.0 → 0.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/dist/{PreviewEditorSidebar-DpAbAl08.mjs → PreviewEditorSidebar-DWqwfy3_.mjs} +48 -28
- package/dist/{PreviewEditorUI-O7cn6Xxv.mjs → PreviewEditorUI-B7OL4sfR.mjs} +10 -9
- package/dist/{PreviewQueryProvider-D0tnKl0t.mjs → PreviewQueryProvider-D0y2l8JN.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CVB7urtl.mjs → SdkPreviewModeRuntime-D8Gt9Gbe.mjs} +633 -220
- package/dist/{SiteChromeCustomizeContext-C_sizso-.mjs → SiteChromeCustomizeContext-DUpalEdL.mjs} +5764 -1556
- package/dist/_dts/ai/src/contracts/proposals.d.ts +15383 -11388
- package/dist/_dts/api/src/blocks.d.ts +41 -7
- package/dist/_dts/api/src/bookingAdjustments.d.ts +5 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +4 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +177 -127
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/cache-tags.d.ts +3 -0
- package/dist/_dts/api/src/common/envelope.d.ts +7 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +19 -1
- package/dist/_dts/api/src/courses.d.ts +1 -0
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/endpoints.d.ts +134 -0
- package/dist/_dts/api/src/footer-settings.d.ts +1 -0
- package/dist/_dts/api/src/footerSettings.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +7 -4
- package/dist/_dts/api/src/navigation/contracts.d.ts +3 -3
- package/dist/_dts/api/src/participantMessaging.d.ts +18 -12
- package/dist/_dts/api/src/previewContentContract.d.ts +4 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +309 -1
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +144 -60
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +74 -28
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientField.d.ts +9 -0
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientWidget.d.ts +3 -4
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -4
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/layout/Section.d.ts +0 -1
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/audio-player.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +1 -22
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -22
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/form.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +9 -48
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/video-grid.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +16 -6
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +9 -1
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +8 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +5 -0
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +33 -2
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/fragments/footerNav.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledContainer.d.ts +4 -4
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +3 -12
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +2 -2
- package/dist/_dts/blocks/src/system/types/link.d.ts +3 -3
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +27 -8
- package/dist/_dts/content-editor/src/footerComposer.d.ts +56 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +5 -5
- package/dist/_dts/content-editor/src/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +3 -1
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +20 -36
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +5 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +11 -0
- package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +31 -0
- package/dist/_dts/content-model/src/content-types/scaffold.d.ts +58 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/sentinels.d.ts +36 -0
- package/dist/_dts/content-model/src/definitions/shared.d.ts +3 -0
- package/dist/_dts/content-model/src/index.d.ts +3 -0
- package/dist/_dts/core/src/booking-date-time.d.ts +8 -0
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/editor-state.d.ts +4 -0
- package/dist/_dts/core/src/footer-composition.d.ts +143 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/public-profile.d.ts +73 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +221 -205
- package/dist/_dts/db/src/schemas/forms.d.ts +10 -10
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +5 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockReorder.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
- package/dist/_dts/media-core/src/fileMimeDetection.d.ts +16 -0
- package/dist/_dts/media-core/src/fileStorage.d.ts +8 -0
- package/dist/_dts/media-core/src/storagePathDomain.d.ts +2 -0
- package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +3 -0
- package/dist/_dts/path-utils/src/index.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +5 -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 +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewErrorMessages.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/audit.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/compare.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +18 -0
- package/dist/_dts/sdk/src/cli/commands/entry.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +12 -1
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/verify.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +22 -1
- package/dist/_dts/sdk/src/cli/index.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/output.d.ts +88 -0
- package/dist/_dts/sdk/src/cli/program.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/blocks.d.ts +14 -1
- package/dist/_dts/sdk/src/client/management/catalog.d.ts +10 -0
- package/dist/_dts/sdk/src/client/management/http.d.ts +7 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +2 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +58 -20
- package/dist/_dts/sdk/src/config/content-types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/content-validation.d.ts +4 -0
- package/dist/_dts/sdk/src/date-time/index.d.ts +68 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +900 -827
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/core.d.ts +15 -46
- package/dist/_dts/theme-core/src/buttons/effectClassification.d.ts +147 -0
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +2 -3
- package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +45 -33
- package/dist/_dts/theme-core/src/buttons/presets.d.ts +4 -25
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +100 -0
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +104 -86
- package/dist/_dts/theme-core/src/cards/types.d.ts +16 -16
- package/dist/_dts/theme-core/src/footer/mode.d.ts +15 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/presets.d.ts +200 -8
- package/dist/_dts/theme-core/src/gradients/utils.d.ts +6 -2
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +117 -150
- package/dist/_dts/theme-core/src/mock-themes/modern-minimal.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -2
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +5 -8
- package/dist/_dts/theme-core/src/palette/index.d.ts +0 -1
- package/dist/_dts/theme-core/src/schema.d.ts +1264 -138
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +10 -10
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +12 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +13 -6
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +29 -8
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +2 -2
- package/dist/cli/index.mjs +68552 -66955
- package/dist/cli/init-docs/content/cli-reference.md +50 -7
- package/dist/cli/init-docs/content/content-management.md +7 -4
- package/dist/cli/init-docs/content/workflow-publish.md +5 -1
- package/dist/client/{DiscountCodeDisclosure-BwGkvmVH.mjs → DiscountCodeDisclosure-DU1ygxU2.mjs} +1 -1
- package/dist/client/{EventCombined.client-JnWE6Hzc.mjs → EventCombined.client-DB5zagCo.mjs} +3 -3
- package/dist/client/{EventListing.client-DQewc_kg.mjs → EventListing.client-CTX9JHBL.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DPAU3SFt.mjs → LeafletStaticMap-BYImhgiB.mjs} +1 -1
- package/dist/client/{MagicLinkForm-D4kpWCbW.mjs → MagicLinkForm-CRkw_M3l.mjs} +2 -2
- package/dist/client/{StepIndicator-CBlkb4rA.mjs → StepIndicator-BnmVBJJh.mjs} +2 -2
- package/dist/client/{accordion-DAIBVpTS.mjs → accordion-CeGreumd.mjs} +1 -1
- package/dist/client/{bookingForm-DZ-4l5_1.mjs → bookingForm-CSzFNrpN.mjs} +6 -6
- package/dist/client/bookings.mjs +637 -328
- package/dist/client/{buttons-DJgynGHQ.mjs → buttons-DoFV7KDL.mjs} +618 -306
- package/dist/client/{carousel-D-SLfX8r.mjs → carousel-B2jDtogf.mjs} +1 -1
- package/dist/client/{cart-CEgbgJhX.mjs → cart-D-jZ-vaY.mjs} +3 -3
- package/dist/client/{checkout-CXWrCRAA.mjs → checkout-Dza-LA7N.mjs} +3 -3
- package/dist/client/client.mjs +2497 -1216
- package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-CrgzoXsm.mjs} +1 -30
- package/dist/client/{courseRegistration-DVmLrRVz.mjs → courseRegistration-TYkNychb.mjs} +7 -7
- package/dist/client/{eventCalendar-DCuyPY_c.mjs → eventCalendar-BI_90SsT.mjs} +5 -5
- package/dist/client/{eventCombined-kP2CA2D4.mjs → eventCombined-mNrpryE9.mjs} +2 -2
- package/dist/client/{eventDetails-DU0LeF5e.mjs → eventDetails-D4GVlCIY.mjs} +3 -3
- package/dist/client/{eventListing-CcHF87BI.mjs → eventListing-YhKN018y.mjs} +2 -2
- package/dist/client/{eventRegistration-DJnR0yFH.mjs → eventRegistration-CdHGtilr.mjs} +7 -7
- package/dist/client/foregroundContract-xICPq59x.mjs +31 -0
- package/dist/client/{form-CH1lCusH.mjs → form-AcAL45rA.mjs} +2 -2
- package/dist/client/{headerSection-CBPFZoku.mjs → headerSection-uEC52ueD.mjs} +3 -3
- package/dist/client/hooks.mjs +1249 -841
- package/dist/client/{locationMap-Cx1hBg5n.mjs → locationMap-_wJDSUYe.mjs} +3 -3
- package/dist/client/{media-DHtSxS5V.mjs → media-BK0O3b-U.mjs} +3 -2
- package/dist/client/{newsletterForm-1ZL_ti9u.mjs → newsletterForm-DrArsb2B.mjs} +2 -2
- package/dist/client/{pricing-BIbzmV0G.mjs → pricing-BSYVghwo.mjs} +1 -1
- package/dist/client/{productDetail-BTh5gHBV.mjs → productDetail-Dyk90sMs.mjs} +3 -3
- package/dist/client/{productList-Cc7OMrqN.mjs → productList-BCKThwAI.mjs} +3 -3
- package/dist/client/{propsDecoder-oR-M-ISN.mjs → propsDecoder-CkXxkdSR.mjs} +96 -33
- package/dist/client/rendering/client.mjs +1278 -523
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2308 -1028
- package/dist/client/{shop-CQ_YbCnn.mjs → shop-DeltVH10.mjs} +6 -6
- package/dist/client/{shop-commerce-BM-AoD3M.mjs → shop-commerce-BD9Jsm2Z.mjs} +6 -6
- package/dist/client/{shop-commerce-store-DFMQhU5p.mjs → shop-commerce-store-CmXD6FDS.mjs} +1 -1
- package/dist/client/{shopShared-D0SKO2Cu.mjs → shopShared-B8v-lH_F.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-CrG4_ARt.mjs → useDiscountCodeUi-DbWJN8ld.mjs} +1 -1
- package/dist/client/{useEventFilters-CxK8Fekl.mjs → useEventFilters-EJIMUnqT.mjs} +46 -69
- package/dist/client/{usePolling-jcVryNgZ.mjs → usePolling-Cmh14fc7.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +213 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +213 -0
- package/dist/{previewAuthStore-BPcJPzdz.mjs → previewAuthStore-CTO7CRPk.mjs} +213 -0
- package/dist/{sdk-runtime-C39Rsk-x.mjs → sdk-runtime-Dou0GAav.mjs} +2 -2
- package/dist/{separator-BoMSQnsP.mjs → separator-CI5wZNXT.mjs} +1 -1
- package/dist/server/components.mjs +2370 -1132
- package/dist/server/config-validation.mjs +1256 -842
- package/dist/server/config.mjs +1256 -843
- package/dist/server/data.mjs +1249 -841
- package/dist/server/date-time.mjs +386 -0
- package/dist/server/index.mjs +214 -1
- package/dist/server/navigation.mjs +9 -3
- package/dist/server/next.mjs +3421 -1949
- package/dist/server/page-converter.mjs +1236 -659
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2074 -1060
- package/dist/server/rendering.mjs +2370 -1132
- package/dist/server/routing.mjs +1543 -1062
- package/dist/server/server.mjs +1464 -843
- package/dist/server/theme-bridge.mjs +1581 -474
- package/dist/server/theme.mjs +614 -305
- package/dist/styles/index.css +12 -1
- package/package.json +7 -1
- package/dist/_dts/theme-core/src/buttons/presets/types.d.ts +0 -88
- package/dist/_dts/theme-core/src/buttons/utils/contrast.d.ts +0 -38
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +0 -57
|
@@ -2,12 +2,100 @@
|
|
|
2
2
|
* CLI Output Formatting
|
|
3
3
|
*
|
|
4
4
|
* Provides consistent output formatting for CLI commands.
|
|
5
|
+
*
|
|
6
|
+
* ## Single JSON envelope contract (Phase 7.1)
|
|
7
|
+
*
|
|
8
|
+
* Under `--json`, EVERY command emits EXACTLY ONE JSON document on stdout:
|
|
9
|
+
*
|
|
10
|
+
* { ok: boolean, command: string, result: <command-specific>, warnings: [...], errors: [...] }
|
|
11
|
+
*
|
|
12
|
+
* This is enforced structurally: in JSON mode the terminal output methods
|
|
13
|
+
* (`success`/`result`/`json`/`table`) do NOT print — they buffer their payload
|
|
14
|
+
* into the invocation's {@link InvocationEnvelope}. `warn` appends to `warnings`,
|
|
15
|
+
* `error`/`fail` append to `errors`. A single writer (`InvocationEnvelope.flush`)
|
|
16
|
+
* emits the one envelope: on success via the program's `postAction` hook, on
|
|
17
|
+
* failure via `error()` (which throws `CliExit` so `runCli` owns the exit code),
|
|
18
|
+
* and for parse/help/version via `runCli` itself. Commands can therefore never
|
|
19
|
+
* double-print a JSON document, no matter how many output calls they make.
|
|
20
|
+
*
|
|
21
|
+
* Human (non-`--json`) output is unchanged.
|
|
22
|
+
*/
|
|
23
|
+
/** A structured warning or error entry inside the JSON envelope. */
|
|
24
|
+
export interface EnvelopeMessage {
|
|
25
|
+
message: string;
|
|
26
|
+
code?: string;
|
|
27
|
+
details?: unknown;
|
|
28
|
+
suggestion?: unknown;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The single machine-readable document emitted per invocation under `--json`.
|
|
32
|
+
*
|
|
33
|
+
* Closed discriminated final state: an `ok: false` envelope ALWAYS carries at
|
|
34
|
+
* least one typed error (`errors` is a non-empty tuple), and an `ok: true`
|
|
35
|
+
* envelope never carries errors. The invariant is enforced by
|
|
36
|
+
* {@link InvocationEnvelope.flush}, so `{ ok: false, errors: [] }` is
|
|
37
|
+
* unrepresentable in the emitted output.
|
|
5
38
|
*/
|
|
39
|
+
export type JsonEnvelope = {
|
|
40
|
+
ok: true;
|
|
41
|
+
command: string;
|
|
42
|
+
result: unknown;
|
|
43
|
+
warnings: EnvelopeMessage[];
|
|
44
|
+
errors: [];
|
|
45
|
+
} | {
|
|
46
|
+
ok: false;
|
|
47
|
+
command: string;
|
|
48
|
+
result: unknown;
|
|
49
|
+
warnings: EnvelopeMessage[];
|
|
50
|
+
errors: [EnvelopeMessage, ...EnvelopeMessage[]];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Raised by `output.error` (and mapped by `runCli`) to terminate a command with a
|
|
54
|
+
* non-zero exit code WITHOUT calling `process.exit` inside command code — so the
|
|
55
|
+
* single envelope is always flushed first and the exit code is owned in one place.
|
|
56
|
+
*/
|
|
57
|
+
export declare class CliExit extends Error {
|
|
58
|
+
readonly code: number;
|
|
59
|
+
constructor(code: number);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Accumulates the single JSON envelope for ONE CLI invocation. Created once per
|
|
63
|
+
* invocation (owned by the fresh root program) and threaded to every command's
|
|
64
|
+
* output, so all output — success, warnings, errors, and even parse/help/version
|
|
65
|
+
* handled by `runCli` — funnels into one document. `flush()` is idempotent and is
|
|
66
|
+
* the ONLY writer of the stdout JSON.
|
|
67
|
+
*/
|
|
68
|
+
export declare class InvocationEnvelope {
|
|
69
|
+
private resultValue;
|
|
70
|
+
private failed;
|
|
71
|
+
private readonly warnings;
|
|
72
|
+
private readonly errors;
|
|
73
|
+
private flushed;
|
|
74
|
+
setResult(value: unknown): void;
|
|
75
|
+
addWarning(warning: EnvelopeMessage): void;
|
|
76
|
+
addError(error: EnvelopeMessage): void;
|
|
77
|
+
markFailed(): void;
|
|
78
|
+
hasFlushed(): boolean;
|
|
79
|
+
/** True once at least one error has been recorded or a failure marked. */
|
|
80
|
+
isFailed(): boolean;
|
|
81
|
+
private finalState;
|
|
82
|
+
/** Emit the single envelope. Idempotent: subsequent calls are no-ops. */
|
|
83
|
+
flush(command: string): void;
|
|
84
|
+
}
|
|
6
85
|
export interface OutputOptions {
|
|
7
86
|
/** Output in JSON format for machine parsing */
|
|
8
87
|
json?: boolean;
|
|
9
88
|
/** Minimal output (suppress non-essential messages) */
|
|
10
89
|
quiet?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* In JSON mode, the invocation-scoped envelope all terminal output funnels into
|
|
92
|
+
* so exactly one document is emitted. Always supplied by `createOutputForCommand`
|
|
93
|
+
* in JSON mode; if absent, JSON-mode terminal writes are dropped (never a stray
|
|
94
|
+
* second document).
|
|
95
|
+
*/
|
|
96
|
+
envelope?: InvocationEnvelope;
|
|
97
|
+
/** Full command path (e.g. "entry upsert") for the envelope's `command` field. */
|
|
98
|
+
command?: string;
|
|
11
99
|
}
|
|
12
100
|
export interface OutputContext {
|
|
13
101
|
success(message: string, data?: unknown): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Riverbank CMS SDK CLI — program construction and invocation.
|
|
3
|
+
*
|
|
4
|
+
* `createProgram()` builds the full Commander command tree; `runCli()` drives it
|
|
5
|
+
* so that under `--json` EXACTLY ONE envelope reaches stdout for EVERY outcome,
|
|
6
|
+
* including the paths Commander itself owns — parse errors, `--help`, and
|
|
7
|
+
* `--version` (which would otherwise bypass command actions entirely).
|
|
8
|
+
*
|
|
9
|
+
* `runCli`:
|
|
10
|
+
* - runs `parseAsync` inside an AsyncLocalStorage invocation scope so all output
|
|
11
|
+
* (actions, and the parse/help/version handling below) funnels into ONE
|
|
12
|
+
* envelope, isolated per concurrent invocation;
|
|
13
|
+
* - installs `exitOverride` + `configureOutput` on every command so Commander's
|
|
14
|
+
* exits and its help/version/error text are intercepted rather than written
|
|
15
|
+
* raw or exiting the process; and
|
|
16
|
+
* - owns the process exit code (commands never call `process.exit`).
|
|
17
|
+
*/
|
|
18
|
+
import { Command } from 'commander';
|
|
19
|
+
export declare function createProgram(): Command;
|
|
20
|
+
/**
|
|
21
|
+
* Parse and run the CLI. Returns the process exit code (the caller sets
|
|
22
|
+
* `process.exitCode`); it never calls `process.exit` itself, so it is safe to
|
|
23
|
+
* drive from tests. Under `--json`, exactly one envelope is written to stdout for
|
|
24
|
+
* every outcome — success, non-fatal failure, thrown error, parse error, `--help`,
|
|
25
|
+
* and `--version`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function runCli(argv: string[], options?: {
|
|
28
|
+
program?: Command;
|
|
29
|
+
}): Promise<number>;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Block Operations for Management Client
|
|
3
3
|
*/
|
|
4
|
-
import { type HttpClient } from './http';
|
|
4
|
+
import { ManagementApiError, type HttpClient } from './http';
|
|
5
5
|
import type { BlockOperations } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Discriminated stale-conflict error for `blocks.patch`: the block's draft
|
|
8
|
+
* changed since the caller's read. `currentHash` is the server's current
|
|
9
|
+
* draft content hash — retry the patch with it as `baseContentHash`.
|
|
10
|
+
* Extracted from the typed `SdkPatchPageBlockStaleContentFieldError` wire
|
|
11
|
+
* contract, so callers never parse prose.
|
|
12
|
+
*/
|
|
13
|
+
export declare class BlockPatchStaleContentError extends ManagementApiError {
|
|
14
|
+
readonly kind = "stale-content";
|
|
15
|
+
readonly currentHash: string;
|
|
16
|
+
constructor(source: ManagementApiError, currentHash: string);
|
|
17
|
+
}
|
|
18
|
+
export declare function isBlockPatchStaleContentError(error: unknown): error is BlockPatchStaleContentError;
|
|
6
19
|
export declare function createBlockOperations(http: HttpClient): BlockOperations;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog (discovery surface) operations for the Management Client.
|
|
3
|
+
*
|
|
4
|
+
* Read-only catalogs an agent enumerates to act without reading repo source.
|
|
5
|
+
*/
|
|
6
|
+
import type { HttpClient } from './http';
|
|
7
|
+
import type { Capabilities, CatalogOperations, DemoContent } from './types';
|
|
8
|
+
export declare function createCatalogOperations(http: HttpClient): CatalogOperations;
|
|
9
|
+
export declare function createCapabilitiesOperation(http: HttpClient): () => Promise<Capabilities>;
|
|
10
|
+
export declare function createDemoContentOperation(http: HttpClient): () => Promise<DemoContent>;
|
|
@@ -25,7 +25,13 @@ export declare class ManagementApiError extends Error {
|
|
|
25
25
|
readonly details?: unknown;
|
|
26
26
|
readonly statusCode?: number;
|
|
27
27
|
readonly request?: ManagementApiErrorRequest;
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Precise failure tag from the server's `DomainServiceError` (e.g. `STALE_BASE`,
|
|
30
|
+
* `PALETTE_CAP_REACHED`). Branch on this when the coarse `code`/`statusCode`
|
|
31
|
+
* collapses several failures into one.
|
|
32
|
+
*/
|
|
33
|
+
readonly tag?: string;
|
|
34
|
+
constructor(message: string, code: string, details?: unknown, statusCode?: number, request?: ManagementApiErrorRequest, tag?: string);
|
|
29
35
|
}
|
|
30
36
|
/**
|
|
31
37
|
* Type guard to check if an error is a 404 Not Found response.
|
|
@@ -36,7 +36,8 @@ import { CourseSessionConflictError } from './courses';
|
|
|
36
36
|
* @returns ManagementClient instance
|
|
37
37
|
*/
|
|
38
38
|
export declare function createManagementClient(config: ManagementClientConfig): ManagementClient;
|
|
39
|
-
export type { ManagementClient, ManagementClientConfig, ManagementEntry, ManagementPage, ManagementBlock, ManagementNavigationMenu, ManagementNavigationItem, ManagementSettings, ManagementForm, ManagementFormField, ManagementFormSchema, ManagementFormSettings, ManagementVenue, VenueAddress, VenueLocation, VenueUpsertInput, ManagementEventCategory, EventCategoryUpsertInput, ManagementEventSeries, EventSchedule, EventScheduleUpsertInput, EventStartDurationSchedule, EventStartEndSchedule, EventPricing, EventPaymentTerms, EventPaymentTermsInput, EventContent, EventSeriesUpsertInput, ManagementCourseRun, CourseRunUpsertInput, CourseSession, CourseProgramContent, CourseSessionConflict, EntryUpsertInput, EntryPublishUpsertResult, UpsertedManagementEntry, PageUpsertInput, PagePublishUpsertResult, BlockUpsertInput, NavigationMenuUpsertInput, NavigationItemInput, FormUpsertInput, SiteStyleSelectionApplyCommand, SiteStyleSelectionApplyCommandInput, ThemeUpsertInitializeInput, ThemeUpsertInput, ThemeUpsertResult, ThemeUpsertUpdateInput, ThemeStyleSelectionApplyInput, ThemeStyleSelectionApplyResult, FooterContent, ManagementFooterContent, FooterContentUpsertInput, FooterOperations, PulledFooter, PulledEntries, PulledPages, PulledDrafts, PulledNavigation, PulledSettings, PulledForms, PulledTheme, PulledVenues, PulledEventCategories, PulledEvents, PulledCourses, PulledSiteInfo, PulledContentType, PulledContentTypes, PulledContent, PaginationOptions, PaginatedResult, EntryOperations, PageOperations, BlockOperations, NavigationOperations, SettingsOperations, SettingsUpdateInput, WebhookOperations, SetupRevalidationWebhookInput, SetupRevalidationWebhookResult, ManagementWebhookEndpoint, RevalidationWebhookPlannedEndpoint, FormOperations, ThemeOperations, VenueOperations, EventCategoryOperations, EventOperations, CourseOperations, PullOperations, IdentifiersOperations, BackfillResult, BackfillPageResult, BackfillBlockResult, BackfillEntryResult, MediaOperations, MediaUploadResult, } from './types';
|
|
39
|
+
export type { ManagementClient, ManagementClientConfig, ManagementEntry, ManagementPage, ManagementBlock, ManagementNavigationMenu, ManagementNavigationItem, ManagementSettings, ManagementForm, ManagementFormField, ManagementFormSchema, ManagementFormSettings, ManagementVenue, VenueAddress, VenueLocation, VenueUpsertInput, ManagementEventCategory, EventCategoryUpsertInput, ManagementEventSeries, EventSchedule, EventScheduleUpsertInput, EventStartDurationSchedule, EventStartEndSchedule, EventPricing, EventPaymentTerms, EventPaymentTermsInput, EventContent, EventSeriesUpsertInput, ManagementCourseRun, CourseRunUpsertInput, CourseSession, CourseProgramContent, CourseSessionConflict, EntryUpsertInput, EntryPublishUpsertResult, UpsertedManagementEntry, PageUpsertInput, PagePublishUpsertResult, BlockUpsertInput, NavigationMenuUpsertInput, NavigationItemInput, FormUpsertInput, SiteStyleSelectionApplyCommand, SiteStyleSelectionApplyCommandInput, ThemeUpsertInitializeInput, ThemeUpsertInput, ThemeUpsertResult, ThemeUpsertUpdateInput, ThemeStyleSelectionApplyInput, ThemeStyleSelectionApplyResult, FooterContent, ManagementFooterContent, FooterContentUpsertInput, FooterOperations, PulledFooter, PulledEntries, PulledPages, PulledDrafts, PulledNavigation, PulledSettings, PulledForms, PulledTheme, PulledVenues, PulledEventCategories, PulledEvents, PulledCourses, PulledSiteInfo, PulledContentType, PulledContentTypes, PulledContent, PaginationOptions, PaginatedResult, EntryOperations, PageOperations, BlockOperations, NavigationOperations, SettingsOperations, SettingsUpdateInput, WebhookOperations, SetupRevalidationWebhookInput, SetupRevalidationWebhookResult, ManagementWebhookEndpoint, RevalidationWebhookPlannedEndpoint, FormOperations, ThemeOperations, VenueOperations, EventCategoryOperations, EventOperations, CourseOperations, PullOperations, CatalogOperations, PulledCatalogTheme, PulledCatalogBlocks, PulledCatalogContentTypes, Capabilities, DemoContent, IdentifiersOperations, BackfillResult, BackfillPageResult, BackfillBlockResult, BackfillEntryResult, MediaOperations, MediaUploadResult, } from './types';
|
|
40
40
|
export { ManagementApiError, type ManagementApiErrorRequest } from './http';
|
|
41
|
+
export { BlockPatchStaleContentError, isBlockPatchStaleContentError, } from './blocks';
|
|
41
42
|
export { applySiteStyleSelectionBodyFromCommand, buildApplySiteStyleSelectionCommand, } from './theme';
|
|
42
43
|
export { CourseSessionConflictError };
|
|
@@ -11,11 +11,14 @@ import type { SdkEventPaymentTerms, SdkEventPaymentTermsInput } from '../../../.
|
|
|
11
11
|
import type { SdkEventUpsertBody } from '../../../../api/src/sdk-event-upsert';
|
|
12
12
|
import type { SdkManagementEventSeries } from '../../../../api/src/sdkContracts';
|
|
13
13
|
import type { SdkPullTruncationMeta } from '../../../../api/src/sdkContracts';
|
|
14
|
+
import type { SdkCapabilitiesResponse, SdkCatalogBlocksResponse, SdkCatalogContentTypesResponse, SdkCatalogThemeResponse, SdkDemoContentResponse } from '../../../../api/src/sdkContracts';
|
|
14
15
|
import type { SdkEntryPublishErrorCode, SdkPagePublishErrorCode, SdkPublicationOutcome } from '../../../../api/src/sdkContracts';
|
|
15
16
|
import type { PaletteSelection } from '../../../../theme-core/src/palette/index';
|
|
16
17
|
import type { Theme } from '../../contracts';
|
|
17
18
|
export type SdkDeletePageResponse = NonNullable<APIEndpoints['sdkDeletePage']['response']>;
|
|
18
19
|
export type SdkGetPageBlockResponse = NonNullable<APIEndpoints['sdkGetPageBlock']['response']>;
|
|
20
|
+
export type SdkPatchPageBlockBody = NonNullable<APIEndpoints['sdkPatchPageBlock']['body']>;
|
|
21
|
+
export type SdkPatchPageBlockResponse = NonNullable<APIEndpoints['sdkPatchPageBlock']['response']>;
|
|
19
22
|
export type SdkPullEntriesAllResponse = NonNullable<APIEndpoints['sdkPullEntriesAll']['response']>;
|
|
20
23
|
export type SdkUpsertEntryResponse = NonNullable<APIEndpoints['sdkUpsertEntry']['response']>;
|
|
21
24
|
export type SdkUpsertPageResponse = NonNullable<APIEndpoints['sdkUpsertPage']['response']>;
|
|
@@ -150,6 +153,7 @@ export interface ManagementNavigationMenu {
|
|
|
150
153
|
name: string;
|
|
151
154
|
isPrimary: boolean;
|
|
152
155
|
isFooter: boolean;
|
|
156
|
+
footerRole: 'main' | 'legal-policy' | null;
|
|
153
157
|
items: ManagementNavigationItem[];
|
|
154
158
|
createdAt: string;
|
|
155
159
|
updatedAt: string;
|
|
@@ -189,6 +193,7 @@ export interface PulledNavigationMenu {
|
|
|
189
193
|
name: string;
|
|
190
194
|
isPrimary: boolean;
|
|
191
195
|
isFooter: boolean;
|
|
196
|
+
footerRole: 'main' | 'legal-policy' | null;
|
|
192
197
|
items: PulledNavigationItem[];
|
|
193
198
|
createdAt: string;
|
|
194
199
|
updatedAt: string;
|
|
@@ -198,6 +203,7 @@ export interface NavigationMenuUpsertInput {
|
|
|
198
203
|
name: string;
|
|
199
204
|
isPrimary?: boolean;
|
|
200
205
|
isFooter?: boolean;
|
|
206
|
+
footerRole?: 'main' | 'legal-policy' | null;
|
|
201
207
|
items: NavigationItemInput[];
|
|
202
208
|
}
|
|
203
209
|
export interface NavigationItemInput {
|
|
@@ -554,28 +560,18 @@ export interface ThemeUpsertResult {
|
|
|
554
560
|
export type SiteStyleSelectionApplyCommand = SiteCommandOf<'applySiteStyleSelection'>;
|
|
555
561
|
export type SiteStyleSelectionApplyCommandInput = SiteStyleSelectionApplyCommand['input'];
|
|
556
562
|
/**
|
|
557
|
-
* Public SDK
|
|
558
|
-
*
|
|
559
|
-
* minimal request ({siteStyleId, baseSelectionVersion}); omitted choices
|
|
560
|
-
* default from the curated style server-side. Wire IDs are strings at this
|
|
561
|
-
* boundary; the server schema brands and validates them. The canonical header
|
|
562
|
-
* pair is atomic at the type level: both omitted (site-style default), both
|
|
563
|
-
* null (legacy default), or both supplied.
|
|
563
|
+
* Public SDK delta contract. `siteStyleRef` is command orchestration identity;
|
|
564
|
+
* semantic style changes live only in the `changes` batch.
|
|
564
565
|
*/
|
|
565
|
-
export type ThemeStyleSelectionApplyInput = Omit<SiteStyleSelectionApplyCommandInput, '
|
|
566
|
-
|
|
566
|
+
export type ThemeStyleSelectionApplyInput = Omit<SiteStyleSelectionApplyCommandInput, 'changes'> & Readonly<{
|
|
567
|
+
siteStyleRef: string;
|
|
567
568
|
baseSelectionVersion: number;
|
|
568
569
|
selectionId?: string | null;
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
headerStyleId: null;
|
|
575
|
-
}> | Readonly<{
|
|
576
|
-
headerLayoutId: string;
|
|
577
|
-
headerStyleId: string;
|
|
578
|
-
}>);
|
|
570
|
+
changes: readonly [
|
|
571
|
+
SiteStyleSelectionApplyCommandInput['changes'][number],
|
|
572
|
+
...SiteStyleSelectionApplyCommandInput['changes'][number][]
|
|
573
|
+
];
|
|
574
|
+
}>;
|
|
579
575
|
export interface ThemeStyleSelectionApplyResult {
|
|
580
576
|
success: boolean;
|
|
581
577
|
themeId: string;
|
|
@@ -595,7 +591,8 @@ export interface ThemeStyleSelectionApplyResult {
|
|
|
595
591
|
}
|
|
596
592
|
/**
|
|
597
593
|
* Footer content for SDK management operations.
|
|
598
|
-
*
|
|
594
|
+
* A narrow legal-text command. The CMS maps this onto the V1 footer composition's
|
|
595
|
+
* legal module without exposing or replacing the aggregate.
|
|
599
596
|
*/
|
|
600
597
|
export interface FooterContent {
|
|
601
598
|
/** Rich text content in ProseMirror JSON format */
|
|
@@ -905,6 +902,12 @@ export interface ApiErrorResponse {
|
|
|
905
902
|
code: string;
|
|
906
903
|
message: string;
|
|
907
904
|
}>;
|
|
905
|
+
/**
|
|
906
|
+
* Precise failure tag from the originating server `DomainServiceError`
|
|
907
|
+
* (e.g. `STALE_BASE`, `PALETTE_CAP_REACHED`). Optional; the coarse `code`
|
|
908
|
+
* collapses several tags into one HTTP status.
|
|
909
|
+
*/
|
|
910
|
+
tag?: string;
|
|
908
911
|
};
|
|
909
912
|
}
|
|
910
913
|
export type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
|
|
@@ -944,10 +947,18 @@ export interface PageOperations {
|
|
|
944
947
|
delete(identifier: string): Promise<void>;
|
|
945
948
|
}
|
|
946
949
|
export type ManagementPageBlock = SdkGetPageBlockResponse['block'];
|
|
950
|
+
/**
|
|
951
|
+
* Input for `blocks.patch` — derived from the API contract.
|
|
952
|
+
* `baseContentHash` must be the `contentHash` from a prior `blocks.get`;
|
|
953
|
+
* a stale hash rejects with a 409 whose `fieldErrors[0].message` carries the
|
|
954
|
+
* current hash (field `baseContentHash`, code `STALE_CONTENT`).
|
|
955
|
+
*/
|
|
956
|
+
export type BlockPatchInput = SdkPatchPageBlockBody;
|
|
947
957
|
export interface BlockOperations {
|
|
948
958
|
list(pageIdentifier: string): Promise<ManagementBlock[]>;
|
|
949
959
|
get(pageIdentifier: string, blockIdentifier: string): Promise<ManagementPageBlock | null>;
|
|
950
960
|
upsert(pageIdentifier: string, input: BlockUpsertInput): Promise<ManagementBlock>;
|
|
961
|
+
patch(pageIdentifier: string, blockIdentifier: string, input: BlockPatchInput): Promise<ManagementPageBlock>;
|
|
951
962
|
reorder(pageIdentifier: string, blockIdentifiers: string[]): Promise<void>;
|
|
952
963
|
delete(pageIdentifier: string, blockIdentifier: string): Promise<void>;
|
|
953
964
|
}
|
|
@@ -1034,6 +1045,20 @@ export interface PullOperations {
|
|
|
1034
1045
|
*/
|
|
1035
1046
|
contentTypes(): Promise<PulledContentTypes>;
|
|
1036
1047
|
}
|
|
1048
|
+
export type PulledCatalogTheme = SdkCatalogThemeResponse;
|
|
1049
|
+
export type PulledCatalogBlocks = SdkCatalogBlocksResponse;
|
|
1050
|
+
export type PulledCatalogContentTypes = SdkCatalogContentTypesResponse;
|
|
1051
|
+
export type Capabilities = SdkCapabilitiesResponse;
|
|
1052
|
+
/** Demo-seed provenance listing (plan 8.2). */
|
|
1053
|
+
export type DemoContent = SdkDemoContentResponse;
|
|
1054
|
+
export interface CatalogOperations {
|
|
1055
|
+
/** Theme discovery catalog: styles, personalities, palettes, looks + current selection. */
|
|
1056
|
+
theme(): Promise<PulledCatalogTheme>;
|
|
1057
|
+
/** Block discovery catalog: manifest fields, content-source, theme-aware variant availability. */
|
|
1058
|
+
blocks(): Promise<PulledCatalogBlocks>;
|
|
1059
|
+
/** Content-type discovery catalog: normalized field DSL per content type. */
|
|
1060
|
+
contentTypes(): Promise<PulledCatalogContentTypes>;
|
|
1061
|
+
}
|
|
1037
1062
|
export interface BackfillPageResult {
|
|
1038
1063
|
pagesUpdated: number;
|
|
1039
1064
|
identifiersAssigned: Record<string, string>;
|
|
@@ -1120,6 +1145,19 @@ export interface ManagementClient {
|
|
|
1120
1145
|
events: EventOperations;
|
|
1121
1146
|
courses: CourseOperations;
|
|
1122
1147
|
pull: PullOperations;
|
|
1148
|
+
/** Discovery catalogs (theme / blocks / content-types). */
|
|
1149
|
+
catalog: CatalogOperations;
|
|
1123
1150
|
identifiers: IdentifiersOperations;
|
|
1124
1151
|
media: MediaOperations;
|
|
1152
|
+
/**
|
|
1153
|
+
* Thin capabilities index: API version, catalog links, and per-catalog content
|
|
1154
|
+
* hashes so agents can cache catalogs and detect drift.
|
|
1155
|
+
*/
|
|
1156
|
+
capabilities(): Promise<Capabilities>;
|
|
1157
|
+
/**
|
|
1158
|
+
* Demo-seed provenance ledger: the resources demo recipe runs created on this
|
|
1159
|
+
* site (plan 8.2), so an agent can distinguish placeholder demo content from
|
|
1160
|
+
* authored content and drive cleanup.
|
|
1161
|
+
*/
|
|
1162
|
+
demoContent(): Promise<DemoContent>;
|
|
1125
1163
|
}
|
|
@@ -300,6 +300,8 @@ export interface NavigationMenuConfig {
|
|
|
300
300
|
isPrimary?: boolean;
|
|
301
301
|
/** Is this the footer menu? */
|
|
302
302
|
isFooter?: boolean;
|
|
303
|
+
/** Named footer destination. Prefer this for new configurations. */
|
|
304
|
+
footerRole?: 'main' | 'legal-policy' | null;
|
|
303
305
|
/** Menu items */
|
|
304
306
|
items: NavigationItemConfig[];
|
|
305
307
|
}
|
|
@@ -97,6 +97,10 @@ export declare const navigationMenuConfigSchema: z.ZodObject<{
|
|
|
97
97
|
name: z.ZodString;
|
|
98
98
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
99
99
|
isFooter: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
footerRole: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
101
|
+
main: "main";
|
|
102
|
+
"legal-policy": "legal-policy";
|
|
103
|
+
}>>>;
|
|
100
104
|
items: z.ZodArray<z.ZodType<Readonly<{
|
|
101
105
|
label: string;
|
|
102
106
|
link: import("../../../api/src/index").NavigationAuthoringLinkInput;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type ScheduledDateTimeInput = Readonly<{
|
|
2
|
+
startsAt: string;
|
|
3
|
+
timeZone: string;
|
|
4
|
+
locale?: string;
|
|
5
|
+
}>;
|
|
6
|
+
export type ScheduledDateTimeRangeInput = Readonly<{
|
|
7
|
+
startsAt: string;
|
|
8
|
+
endsAt: string;
|
|
9
|
+
timeZone: string;
|
|
10
|
+
locale?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type ScheduledIntlDateTimeFormatOptions = Readonly<Omit<Intl.DateTimeFormatOptions, 'timeZone'>>;
|
|
13
|
+
export type ScheduledDateFormatOptions = Readonly<{
|
|
14
|
+
format?: ScheduledIntlDateTimeFormatOptions;
|
|
15
|
+
}>;
|
|
16
|
+
export type ScheduledCompactTimeFormatOptions = Readonly<{
|
|
17
|
+
timePresentation?: 'compact';
|
|
18
|
+
format?: never;
|
|
19
|
+
}>;
|
|
20
|
+
export type ScheduledStandardTimeFormatOptions = Readonly<{
|
|
21
|
+
timePresentation: 'standard';
|
|
22
|
+
format?: ScheduledIntlDateTimeFormatOptions;
|
|
23
|
+
}>;
|
|
24
|
+
export type ScheduledTimeFormatOptions = ScheduledCompactTimeFormatOptions | ScheduledStandardTimeFormatOptions;
|
|
25
|
+
export type ScheduledDateTimeFormatOptions = Readonly<{
|
|
26
|
+
dateFormat?: ScheduledIntlDateTimeFormatOptions;
|
|
27
|
+
time?: ScheduledTimeFormatOptions;
|
|
28
|
+
}>;
|
|
29
|
+
export type RiverbankDateTimeFormatErrorDetails = Readonly<{
|
|
30
|
+
code: 'invalid_starts_at';
|
|
31
|
+
field: 'startsAt';
|
|
32
|
+
value: string;
|
|
33
|
+
}> | Readonly<{
|
|
34
|
+
code: 'invalid_ends_at';
|
|
35
|
+
field: 'endsAt';
|
|
36
|
+
value: string;
|
|
37
|
+
}> | Readonly<{
|
|
38
|
+
code: 'missing_ends_at';
|
|
39
|
+
field: 'endsAt';
|
|
40
|
+
value: string;
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
code: 'invalid_time_zone';
|
|
43
|
+
field: 'timeZone';
|
|
44
|
+
value: string;
|
|
45
|
+
}> | Readonly<{
|
|
46
|
+
code: 'invalid_locale';
|
|
47
|
+
field: 'locale';
|
|
48
|
+
value: string;
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
code: 'end_before_start';
|
|
51
|
+
field: 'endsAt';
|
|
52
|
+
value: string;
|
|
53
|
+
}>;
|
|
54
|
+
export type RiverbankDateTimeFormatErrorCode = RiverbankDateTimeFormatErrorDetails['code'];
|
|
55
|
+
export type RiverbankDateTimeFormatErrorField = RiverbankDateTimeFormatErrorDetails['field'];
|
|
56
|
+
export declare class RiverbankDateTimeFormatError extends Error {
|
|
57
|
+
readonly name = "RiverbankDateTimeFormatError";
|
|
58
|
+
readonly code: RiverbankDateTimeFormatErrorCode;
|
|
59
|
+
readonly field: RiverbankDateTimeFormatErrorField;
|
|
60
|
+
readonly value: string;
|
|
61
|
+
constructor(details: RiverbankDateTimeFormatErrorDetails);
|
|
62
|
+
}
|
|
63
|
+
export declare function formatScheduledDate(input: ScheduledDateTimeInput, options?: ScheduledDateFormatOptions): string;
|
|
64
|
+
export declare function formatScheduledTime(input: ScheduledDateTimeInput, options?: ScheduledTimeFormatOptions): string;
|
|
65
|
+
export declare function formatScheduledDateTime(input: ScheduledDateTimeInput, options?: ScheduledDateTimeFormatOptions): string;
|
|
66
|
+
export declare function formatScheduledDateRange(input: ScheduledDateTimeRangeInput, options?: ScheduledDateFormatOptions): string;
|
|
67
|
+
export declare function formatScheduledTimeRange(input: ScheduledDateTimeRangeInput, options?: ScheduledTimeFormatOptions): string;
|
|
68
|
+
export declare function formatScheduledDateTimeRange(input: ScheduledDateTimeRangeInput, options?: ScheduledDateTimeFormatOptions): string;
|
|
@@ -280,6 +280,7 @@ export declare function getPrimaryNavigation(navigation: NavigationMenuWithItems
|
|
|
280
280
|
* ```
|
|
281
281
|
*/
|
|
282
282
|
export declare function getFooterNavigation(navigation: NavigationMenuWithItems[] | null | undefined): NavigationMenuWithItems | null;
|
|
283
|
+
export declare function getFooterNavigationByRole(navigation: NavigationMenuWithItems[] | null | undefined, role: 'main' | 'legal-policy'): NavigationMenuWithItems | null;
|
|
283
284
|
/**
|
|
284
285
|
* Get a navigation menu by name/slug.
|
|
285
286
|
*
|
|
@@ -417,6 +418,7 @@ export declare function buildMenu(navigation: NavigationMenuWithItems[], routes:
|
|
|
417
418
|
* ```
|
|
418
419
|
*/
|
|
419
420
|
export declare function buildFooterMenu(navigation: NavigationMenuWithItems[], routes: RouteMap, options?: NavigationRenderOptions): FooterMenu;
|
|
421
|
+
export declare function buildFooterMenuForRole(navigation: NavigationMenuWithItems[], routes: RouteMap, role: 'main' | 'legal-policy', options?: NavigationRenderOptions): FooterMenu;
|
|
420
422
|
export declare function resolveNavigationLinkHref(link: LinkPayload | null, routes: RouteMap, options?: NavigationRenderOptions): string | null;
|
|
421
423
|
/**
|
|
422
424
|
* Build a Logo from site layout data.
|
|
@@ -58,6 +58,8 @@ export interface ApiError {
|
|
|
58
58
|
timestamp: string;
|
|
59
59
|
status: number;
|
|
60
60
|
fieldErrors?: FieldError[];
|
|
61
|
+
/** Precise failure tag from the originating server `DomainServiceError` (optional). */
|
|
62
|
+
tag?: string;
|
|
61
63
|
};
|
|
62
64
|
}
|
|
63
65
|
export type ApiResult<TData> = ApiResponse<TData> | ApiError;
|
|
@@ -184,6 +186,7 @@ export interface NavigationMenuRecord {
|
|
|
184
186
|
name: string;
|
|
185
187
|
isPrimary: boolean;
|
|
186
188
|
isFooter: boolean;
|
|
189
|
+
footerRole: 'main' | 'legal-policy' | null;
|
|
187
190
|
createdAt?: string | null;
|
|
188
191
|
updatedAt?: string | null;
|
|
189
192
|
}
|
|
@@ -315,7 +318,7 @@ export type SiteResponse = {
|
|
|
315
318
|
* Persisted design selections. Optional so legacy
|
|
316
319
|
* payloads without these columns still satisfy the type — consumers fall
|
|
317
320
|
* back to the site style's defaults when null.
|
|
318
|
-
|
|
321
|
+
*/
|
|
319
322
|
selectionButtonPersonalityId?: string | null;
|
|
320
323
|
runtimePaletteState?: RuntimePaletteState | null;
|
|
321
324
|
selectionHeaderLayoutId?: string | null;
|
|
@@ -424,7 +427,7 @@ export type SdkRuntimePageSurfaceContentSource = Readonly<{
|
|
|
424
427
|
export type SdkRuntimePageSurface = {
|
|
425
428
|
id: string;
|
|
426
429
|
routeId: string;
|
|
427
|
-
readinessState: 'shippable';
|
|
430
|
+
readinessState: 'internal_pilot' | 'shippable';
|
|
428
431
|
subject: SdkRuntimePageSurfaceSubject;
|
|
429
432
|
title: string;
|
|
430
433
|
slug: string | null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Renders site header and footer around content. Fetches site data if not provided.
|
|
5
5
|
*/
|
|
6
|
-
import { buildMenu, buildFooterMenu, buildLogo } from '../../navigation';
|
|
6
|
+
import { buildMenu, buildFooterMenu, buildFooterMenuForRole, buildLogo } from '../../navigation';
|
|
7
7
|
import type { RiverbankClient, SiteResponse } from '../../client/types';
|
|
8
8
|
import { type SdkThemeRuntime } from '../themeRuntime';
|
|
9
9
|
export type HeaderData = {
|
|
@@ -16,6 +16,7 @@ export type HeaderData = {
|
|
|
16
16
|
export type FooterData = {
|
|
17
17
|
menu: ReturnType<typeof buildMenu>;
|
|
18
18
|
footerMenu: ReturnType<typeof buildFooterMenu>;
|
|
19
|
+
legalFooterMenu: ReturnType<typeof buildFooterMenuForRole>;
|
|
19
20
|
logo: ReturnType<typeof buildLogo>;
|
|
20
21
|
site: SiteResponse['site'];
|
|
21
22
|
theme: SiteResponse['theme'];
|
|
@@ -182,7 +182,7 @@ export type EntryContentResult = {
|
|
|
182
182
|
export type PageSurfaceContentData = {
|
|
183
183
|
id: string;
|
|
184
184
|
routeId: string;
|
|
185
|
-
readinessState: 'shippable';
|
|
185
|
+
readinessState: 'internal_pilot' | 'shippable';
|
|
186
186
|
subject: SdkRuntimePageSurfaceSubject;
|
|
187
187
|
title: string;
|
|
188
188
|
slug: string | null;
|