@riverbankcms/sdk 0.108.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-BBT-kZAM.mjs → PreviewEditorSidebar-DWqwfy3_.mjs} +7 -22
- package/dist/{PreviewEditorUI-D69xNKT2.mjs → PreviewEditorUI-B7OL4sfR.mjs} +3 -3
- package/dist/{PreviewQueryProvider-RRu7wyQ5.mjs → PreviewQueryProvider-D0y2l8JN.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CuDjXH6o.mjs → SdkPreviewModeRuntime-D8Gt9Gbe.mjs} +212 -153
- package/dist/{SiteChromeCustomizeContext-BQUY2dEk.mjs → SiteChromeCustomizeContext-DUpalEdL.mjs} +1919 -1032
- package/dist/_dts/ai/src/contracts/proposals.d.ts +11244 -10741
- 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 +2 -17
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/common/envelope.d.ts +7 -0
- 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 +35 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/participantMessaging.d.ts +18 -12
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +247 -1
- package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +1 -5
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +29 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -27
- 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/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-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/manifest/schema.d.ts +31 -0
- 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 +1 -1
- 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/sentinels.d.ts +36 -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/db/src/generated/supabase/database.types.d.ts +3071 -3157
- 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/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -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/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/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 +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +43 -19
- package/dist/_dts/sdk/src/date-time/index.d.ts +68 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +893 -823
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- 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/types.d.ts +44 -32
- 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 +101 -83
- package/dist/_dts/theme-core/src/cards/types.d.ts +16 -16
- 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/mock-themes/all.d.ts +87 -126
- package/dist/_dts/theme-core/src/mock-themes/modern-minimal.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -2
- 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 +112 -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/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/styleTags.d.ts +2 -2
- package/dist/cli/index.mjs +67956 -66745
- 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-D6TOf6Hi.mjs → DiscountCodeDisclosure-DU1ygxU2.mjs} +1 -1
- package/dist/client/{EventCombined.client-Dao3zxRk.mjs → EventCombined.client-DB5zagCo.mjs} +3 -3
- package/dist/client/{EventListing.client-B2NNt4y1.mjs → EventListing.client-CTX9JHBL.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BhwFo16w.mjs → LeafletStaticMap-BYImhgiB.mjs} +1 -1
- package/dist/client/{MagicLinkForm-BWnB7cMR.mjs → MagicLinkForm-CRkw_M3l.mjs} +2 -2
- package/dist/client/{StepIndicator-TzRiQ0BY.mjs → StepIndicator-BnmVBJJh.mjs} +2 -2
- package/dist/client/{accordion-BPy-AJ4_.mjs → accordion-CeGreumd.mjs} +1 -1
- package/dist/client/{bookingForm-BL4PGZds.mjs → bookingForm-CSzFNrpN.mjs} +6 -6
- package/dist/client/bookings.mjs +512 -252
- package/dist/client/{buttons-EBjyslaX.mjs → buttons-DoFV7KDL.mjs} +493 -230
- package/dist/client/{carousel-C2b7Cn9-.mjs → carousel-B2jDtogf.mjs} +1 -1
- package/dist/client/{cart-BQcbXIVD.mjs → cart-D-jZ-vaY.mjs} +3 -3
- package/dist/client/{checkout-DEmpGRJu.mjs → checkout-Dza-LA7N.mjs} +3 -3
- package/dist/client/client.mjs +1673 -785
- package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-CrgzoXsm.mjs} +1 -30
- package/dist/client/{courseRegistration-BqRZPmsq.mjs → courseRegistration-TYkNychb.mjs} +7 -7
- package/dist/client/{eventCalendar-B8N_tSl5.mjs → eventCalendar-BI_90SsT.mjs} +5 -5
- package/dist/client/{eventCombined-Gjn6gtq7.mjs → eventCombined-mNrpryE9.mjs} +2 -2
- package/dist/client/{eventDetails-M-VCxA-r.mjs → eventDetails-D4GVlCIY.mjs} +3 -3
- package/dist/client/{eventListing-DR19hqYi.mjs → eventListing-YhKN018y.mjs} +2 -2
- package/dist/client/{eventRegistration-BR02a0k3.mjs → eventRegistration-CdHGtilr.mjs} +7 -7
- package/dist/client/foregroundContract-xICPq59x.mjs +31 -0
- package/dist/client/{form-LY2xIbwg.mjs → form-AcAL45rA.mjs} +2 -2
- package/dist/client/{headerSection-CYwwXJfh.mjs → headerSection-uEC52ueD.mjs} +3 -3
- package/dist/client/hooks.mjs +890 -497
- package/dist/client/{locationMap-DWnBXrFq.mjs → locationMap-_wJDSUYe.mjs} +3 -3
- package/dist/client/{media-DHtSxS5V.mjs → media-BK0O3b-U.mjs} +3 -2
- package/dist/client/{newsletterForm-D9s-fQ2P.mjs → newsletterForm-DrArsb2B.mjs} +2 -2
- package/dist/client/{pricing-DDq80oYc.mjs → pricing-BSYVghwo.mjs} +1 -1
- package/dist/client/{productDetail-B0SbWd45.mjs → productDetail-Dyk90sMs.mjs} +3 -3
- package/dist/client/{productList-PwYlZn0y.mjs → productList-BCKThwAI.mjs} +3 -3
- package/dist/client/{propsDecoder-BRWBiH7i.mjs → propsDecoder-CkXxkdSR.mjs} +63 -24
- package/dist/client/rendering/client.mjs +1034 -486
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +1832 -760
- package/dist/client/{shop-CMwZPYME.mjs → shop-DeltVH10.mjs} +6 -6
- package/dist/client/{shop-commerce-BuxsFate.mjs → shop-commerce-BD9Jsm2Z.mjs} +6 -6
- package/dist/client/{shop-commerce-store-boYlEJ91.mjs → shop-commerce-store-CmXD6FDS.mjs} +1 -1
- package/dist/client/{shopShared-D2naaOes.mjs → shopShared-B8v-lH_F.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D9RHpVoj.mjs → useDiscountCodeUi-DbWJN8ld.mjs} +1 -1
- package/dist/client/{useEventFilters-igGiK1re.mjs → useEventFilters-EJIMUnqT.mjs} +46 -69
- package/dist/client/{usePolling-CI7MbsFB.mjs → usePolling-Cmh14fc7.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +35 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +35 -0
- package/dist/{previewAuthStore-a_cBD28m.mjs → previewAuthStore-CTO7CRPk.mjs} +35 -0
- package/dist/{sdk-runtime-MBzD-GmP.mjs → sdk-runtime-Dou0GAav.mjs} +2 -2
- package/dist/{separator-5ahRBC85.mjs → separator-CI5wZNXT.mjs} +1 -1
- package/dist/server/components.mjs +1832 -784
- package/dist/server/config-validation.mjs +890 -497
- package/dist/server/config.mjs +890 -497
- package/dist/server/data.mjs +890 -497
- package/dist/server/date-time.mjs +386 -0
- package/dist/server/index.mjs +36 -1
- package/dist/server/next.mjs +1868 -785
- package/dist/server/page-converter.mjs +849 -285
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1553 -718
- package/dist/server/rendering.mjs +1832 -784
- package/dist/server/routing.mjs +933 -522
- package/dist/server/server.mjs +929 -501
- package/dist/server/theme-bridge.mjs +1408 -392
- package/dist/server/theme.mjs +471 -228
- package/dist/styles/index.css +5 -0
- 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
|
@@ -8,3 +8,19 @@ export type MagicDetectedMimeType = 'image/png' | 'image/jpeg' | 'image/gif' | '
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function detectMimeTypeFromBuffer(buffer: Uint8Array | null | undefined): MagicDetectedMimeType | undefined;
|
|
10
10
|
export declare function bufferAsLatin1(buffer: Uint8Array, maxBytes?: number): string;
|
|
11
|
+
/**
|
|
12
|
+
* Recognizes an SVG document by its leading element only.
|
|
13
|
+
*
|
|
14
|
+
* Within a bounded window we skip an optional UTF-8 BOM, whitespace, and any XML
|
|
15
|
+
* prolog constructs (XML declaration / processing instructions, comments, and a
|
|
16
|
+
* DOCTYPE) and then require the very first element to be `<svg>`. Requiring the
|
|
17
|
+
* root element — rather than scanning for `<svg` anywhere — is the false-positive
|
|
18
|
+
* guard: an HTML document that merely embeds inline `<svg>` further down (its
|
|
19
|
+
* first element is `<html>`/`<body>`/etc.) is deliberately NOT recognized as SVG.
|
|
20
|
+
*
|
|
21
|
+
* DOCTYPE is skipped rather than rejected here so a DOCTYPE-bearing SVG is still
|
|
22
|
+
* recognized and routed to the finalize sanitizer (which rejects DOCTYPE/entities
|
|
23
|
+
* outright) instead of failing earlier as an opaque MIME mismatch. This probe is
|
|
24
|
+
* intentionally trusted only through the contract-gated `svg-fallback` strategy.
|
|
25
|
+
*/
|
|
26
|
+
export declare function looksLikeSvgBuffer(buffer: Uint8Array | null | undefined): boolean;
|
|
@@ -9,6 +9,7 @@ export declare const PUBLIC_SITE_FILE_STORAGE_BUCKETS: readonly [StorageBucketNa
|
|
|
9
9
|
export declare const FILE_UPLOAD_STAGING_PREFIX = "temp-file-uploads";
|
|
10
10
|
export declare const DURABLE_FILE_STORAGE_PREFIX = "sites";
|
|
11
11
|
export declare const DURABLE_FILE_FOLDER = "files";
|
|
12
|
+
export declare const SDK_UPLOAD_STAGING_PREFIX = "sdk-staging";
|
|
12
13
|
export declare const PRIVATE_SITE_FILE_BUCKET_MIME_TYPES: readonly ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "application/rtf", "text/rtf", "image/jpeg", "image/png", "image/webp", "image/gif", "image/avif", "image/heic", "image/heif", "image/svg+xml", "text/csv", "application/csv", "application/vnd.ms-excel", "application/zip", "application/x-zip-compressed", "audio/mpeg", "audio/mp4", "audio/wav", "audio/x-wav", "audio/ogg", "audio/webm", "audio/flac", "video/mp4", "video/webm", "video/quicktime"];
|
|
13
14
|
export declare const TEMP_UPLOAD_BUCKET_MIME_TYPES: readonly ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "application/rtf", "text/rtf", "image/jpeg", "image/png", "image/webp", "image/gif", "image/avif", "image/heic", "image/heif", "image/svg+xml", "text/csv", "application/csv", "application/vnd.ms-excel", "application/zip", "application/x-zip-compressed", "audio/mpeg", "audio/mp4", "audio/wav", "audio/x-wav", "audio/ogg", "audio/webm", "audio/flac", "video/mp4", "video/webm", "video/quicktime", "font/woff2", "application/font-woff2", "application/x-font-woff2", "application/octet-stream"];
|
|
14
15
|
export type FileStoragePathError = 'unsafe-path-segment';
|
|
@@ -39,3 +40,10 @@ export declare function buildStagedUploadStoragePath(input: StagedUploadStorageP
|
|
|
39
40
|
*/
|
|
40
41
|
export declare function buildDurableFileStoragePath(input: DurableFileStoragePathInput): Result<SiteScopedStoragePath, FileStoragePathError>;
|
|
41
42
|
export declare function parseStoragePath(value: string): Result<StoragePath, FileStoragePathError>;
|
|
43
|
+
/**
|
|
44
|
+
* Builds the private staging path for an SDK-management upload from its intended
|
|
45
|
+
* durable relative path: `sdk-staging/{siteId}/{durableRelativePath}`. Finalize
|
|
46
|
+
* promotes the object from here (in `temp-uploads`) to the public bucket only
|
|
47
|
+
* after verification + sanitization.
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildSdkStagedStoragePath(siteId: SiteId, durableRelativePath: string): Result<StoragePath, FileStoragePathError>;
|
|
@@ -17,6 +17,9 @@ export type UploadVerificationStrategy = Readonly<{
|
|
|
17
17
|
}> | Readonly<{
|
|
18
18
|
tag: 'rtf-fallback';
|
|
19
19
|
detectedMimeType: 'application/rtf';
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
tag: 'svg-fallback';
|
|
22
|
+
detectedMimeType: 'image/svg+xml';
|
|
20
23
|
}>;
|
|
21
24
|
export type AcceptedUploadKindContract = Readonly<{
|
|
22
25
|
kind: FileKind;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BookingOfferingPresetSummary, type Theme } from '../../../../blocks/src/index';
|
|
3
3
|
import { type BackgroundColorPalette } from '../../../../blocks/src/system/customize/backgrounds';
|
|
4
|
+
import { type GradientPresetId } from '../../../../theme-core/src/gradients/index';
|
|
4
5
|
import { type PreviewChromeFloatingPlacement } from '../preview/previewChromePlacement';
|
|
5
6
|
export declare function BlockToolbar({ blockId, blockKind, content, bookingOfferingPresets, theme, placement, }: {
|
|
6
7
|
blockId: string;
|
|
@@ -10,4 +11,5 @@ export declare function BlockToolbar({ blockId, blockKind, content, bookingOffer
|
|
|
10
11
|
theme?: Theme | null;
|
|
11
12
|
placement?: PreviewChromeFloatingPlacement;
|
|
12
13
|
}): React.JSX.Element;
|
|
14
|
+
export declare function gradientPreviewCss(gradientId: GradientPresetId): string;
|
|
13
15
|
export declare function readBackgroundColorPaletteSnapshot(): BackgroundColorPalette | null;
|
|
@@ -213,6 +213,7 @@ export declare function reconcilePaletteLibraryActive(state: StyleConfiguratorSt
|
|
|
213
213
|
*/
|
|
214
214
|
export declare function rebasePaletteLibraryAuthority(state: StyleConfiguratorState, committedPalette: ResolvedPaletteSelection): StyleConfiguratorState;
|
|
215
215
|
export declare function selectionSnapshotsEqual(a: SelectionSnapshot, b: SelectionSnapshot): boolean;
|
|
216
|
+
export declare function typographyObjectsEqual(a: ThemeTypography, b: ThemeTypography): boolean;
|
|
216
217
|
type ModernRuntimePaletteState = Extract<RuntimePaletteState, Readonly<{
|
|
217
218
|
authority: 'curated';
|
|
218
219
|
}>> | Extract<RuntimePaletteState, Readonly<{
|
|
@@ -20,7 +20,7 @@ export type ApplySiteStyleSelectionBodyBuildResult = Readonly<{
|
|
|
20
20
|
ok: false;
|
|
21
21
|
error: Extract<PaletteApplyCommandPlan, {
|
|
22
22
|
ok: false;
|
|
23
|
-
}>['error'];
|
|
23
|
+
}>['error'] | 'no-selection-changes';
|
|
24
24
|
}>;
|
|
25
25
|
export declare function buildApplySiteStyleSelectionBody(input: Readonly<{
|
|
26
26
|
base: SelectionSnapshot;
|
|
@@ -99,4 +99,4 @@ export declare function auditOrphanedEntries(ctx: Pick<AuditContext, 'localEntry
|
|
|
99
99
|
export declare function auditContentTypes(localContentTypes: Set<string>, validContentTypes: Set<string>): AuditIssue[];
|
|
100
100
|
export declare function auditEventReferences(events: LocalEvent[], ctx: Pick<AuditContext, 'localVenueRefs' | 'remoteVenueRefs' | 'localCategoryRefs' | 'remoteCategoryRefs' | 'localFormRefs' | 'remoteFormRefs'>): AuditIssue[];
|
|
101
101
|
export declare function auditCourseReferences(courses: LocalCourse[], ctx: Pick<AuditContext, 'localVenueRefs' | 'remoteVenueRefs' | 'localCategoryRefs' | 'remoteCategoryRefs' | 'localFormRefs' | 'remoteFormRefs'>): AuditIssue[];
|
|
102
|
-
export declare const
|
|
102
|
+
export declare const createAuditCommand: () => Command;
|
|
@@ -58,5 +58,5 @@ export declare function compareLocalVsCms(localEntries: LocalEntry[], remoteEntr
|
|
|
58
58
|
data: Record<string, unknown>;
|
|
59
59
|
status: string;
|
|
60
60
|
}>, contentType: string): ComparisonResult;
|
|
61
|
-
export declare const
|
|
61
|
+
export declare const createCompareCommand: () => Command;
|
|
62
62
|
export {};
|
|
@@ -39,5 +39,5 @@ export declare function checkWorkingDirectoryClean(git: SimpleGit, prebuildOutpu
|
|
|
39
39
|
* @internal Exported for testing
|
|
40
40
|
*/
|
|
41
41
|
export declare function commitCacheIfChanged(git: SimpleGit, prebuildOutput: string): Promise<boolean>;
|
|
42
|
-
export declare const
|
|
42
|
+
export declare const createDeployCommand: () => Command;
|
|
43
43
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drafts Command (Phase 7.3)
|
|
3
|
+
*
|
|
4
|
+
* Cross-type overview of pages and entries with pending (unpublished) changes.
|
|
5
|
+
* Consumes the SDK `pull.drafts()` operation (server-side `GET pull/drafts`),
|
|
6
|
+
* which is correctly server-filtered and fully enumerated — replacing the
|
|
7
|
+
* post-pagination `entry list --status draft` trap.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* riverbankcms drafts
|
|
11
|
+
* riverbankcms drafts --json
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from 'commander';
|
|
14
|
+
import type { PulledDrafts } from '../../client/management/types';
|
|
15
|
+
/** Flatten the drafts overview into unified table rows for human display. */
|
|
16
|
+
export declare function draftsToTableRows(drafts: PulledDrafts): string[][];
|
|
17
|
+
export declare const createDraftsCommand: () => Command;
|
|
18
|
+
export declare const draftsCommand: Command;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* riverbankcms entry list <type> [--limit N] [--page N]
|
|
13
13
|
*/
|
|
14
14
|
import { Command } from 'commander';
|
|
15
|
+
import { type EntryScaffold } from '../../../../content-model/src/index';
|
|
15
16
|
import type { ManagementClient, ManagementEntry } from '../../client/management/types';
|
|
16
17
|
import { type MediaValidationResult } from '../media/write-guard';
|
|
17
18
|
export declare const ENTRY_LIST_COLUMNS: readonly ["id", "identifier", "slug", "status", "hasUnpublishedChanges", "updatedAt", "createdAt", "publishedAt", "title", "contentType"];
|
|
@@ -37,4 +38,18 @@ export declare function findEntryById(client: ManagementClient, contentType: str
|
|
|
37
38
|
limit?: number;
|
|
38
39
|
maxPages?: number;
|
|
39
40
|
}): Promise<ManagementEntry | null>;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve a scaffold for a content type from the discovery catalog (the field
|
|
43
|
+
* DSL), or an error listing the available keys. Sourced from
|
|
44
|
+
* `client.catalog.contentTypes()`, matching how `content-type list` resolves its
|
|
45
|
+
* source from the client. (An offline local-config fallback is not implemented:
|
|
46
|
+
* the normalized field DSL is only exposed over the catalog API, and
|
|
47
|
+
* `content-type list` likewise has no local fallback.)
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveEntryScaffold(client: ManagementClient, contentType: string): Promise<{
|
|
50
|
+
scaffold: EntryScaffold;
|
|
51
|
+
} | {
|
|
52
|
+
error: string;
|
|
53
|
+
availableKeys: string[];
|
|
54
|
+
}>;
|
|
40
55
|
export declare const entryCommand: Command;
|
|
@@ -9,5 +9,5 @@ interface InitDocsOptions {
|
|
|
9
9
|
config?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare function runInitDocs(options: InitDocsOptions, command: Command): Promise<void>;
|
|
12
|
-
declare const
|
|
13
|
-
export {
|
|
12
|
+
export declare const createInitDocsCommand: () => Command;
|
|
13
|
+
export {};
|
|
@@ -47,4 +47,4 @@ export declare function categorizeEntries(entries: ManagementEntry[]): {
|
|
|
47
47
|
* Exported for testing.
|
|
48
48
|
*/
|
|
49
49
|
export declare function aggregateResults(results: PublishResult[]): Omit<PublishAllSummary, 'total'>;
|
|
50
|
-
export declare const
|
|
50
|
+
export declare const createPublishAllCommand: () => Command;
|
|
@@ -5,7 +5,10 @@ export interface PushOptions {
|
|
|
5
5
|
force?: boolean;
|
|
6
6
|
forceUpdateAsset?: boolean;
|
|
7
7
|
allowTruncated?: boolean;
|
|
8
|
+
/** @deprecated Use `--diff-detail` instead; folded into the `--json` envelope. */
|
|
8
9
|
jsonDiff?: string;
|
|
10
|
+
/** Diff verbosity carried in the `--json` envelope: 'summary' (default) or 'full'. */
|
|
11
|
+
diffDetail?: string;
|
|
9
12
|
withConfig?: boolean;
|
|
10
13
|
withTheme?: boolean;
|
|
11
14
|
syncMedia?: boolean;
|
|
@@ -7,6 +7,17 @@ import { type PushScope } from './push/consts';
|
|
|
7
7
|
export interface PushExecutionResult {
|
|
8
8
|
success: boolean;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Single command-owned result for a push, assembled once at the end of the push
|
|
12
|
+
* command (finding 4). `executePushForEnv` writes the diff into `detail` and the
|
|
13
|
+
* sync outcome into `execution`; the command adds `verification` and emits the
|
|
14
|
+
* whole object exactly once, so no stage's result clobbers another's.
|
|
15
|
+
*/
|
|
16
|
+
export interface PushResultAccumulator {
|
|
17
|
+
detail?: unknown;
|
|
18
|
+
execution?: unknown;
|
|
19
|
+
verification?: unknown;
|
|
20
|
+
}
|
|
10
21
|
export declare function noContentFoundWarningDetails(contentDir: string): Readonly<{
|
|
11
22
|
contentDir: string;
|
|
12
23
|
expectedFiles: readonly string[];
|
|
@@ -39,5 +50,5 @@ export declare function executePushForEnv(output: OutputContext, target: EnvTarg
|
|
|
39
50
|
jsonDiffMode?: JsonDiffMode | null;
|
|
40
51
|
}, globalOpts: {
|
|
41
52
|
json?: boolean;
|
|
42
|
-
}): Promise<PushExecutionResult>;
|
|
53
|
+
}, resultSink?: PushResultAccumulator): Promise<PushExecutionResult>;
|
|
43
54
|
export {};
|
|
@@ -7,8 +7,29 @@
|
|
|
7
7
|
import { Command } from 'commander';
|
|
8
8
|
import type { SiteId } from '../../../core/src/index';
|
|
9
9
|
import type { ManagementClient } from '../client/management/types';
|
|
10
|
-
import { type OutputContext } from './output';
|
|
10
|
+
import { InvocationEnvelope, type OutputContext } from './output';
|
|
11
11
|
import { type CliErrorContext } from './errors';
|
|
12
|
+
/**
|
|
13
|
+
* Run `fn` within a fresh invocation envelope. Returns the envelope so `runCli`
|
|
14
|
+
* can flush it and derive the exit code after the run completes (or fails).
|
|
15
|
+
*/
|
|
16
|
+
export declare function runWithInvocation<T>(fn: (envelope: InvocationEnvelope) => Promise<T>): {
|
|
17
|
+
envelope: InvocationEnvelope;
|
|
18
|
+
done: Promise<T>;
|
|
19
|
+
};
|
|
20
|
+
/** The current invocation's envelope, if output is running inside `runCli`. */
|
|
21
|
+
export declare function currentInvocationEnvelope(): InvocationEnvelope | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Build the space-separated command path for the envelope's `command` field,
|
|
24
|
+
* excluding the root program name (e.g. `entry upsert`, `drafts`).
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveCommandPath(command: Command): string;
|
|
27
|
+
/**
|
|
28
|
+
* Create an OutputContext bound to a command. In JSON mode it resolves the
|
|
29
|
+
* current invocation's envelope from the async context, so all output funnels
|
|
30
|
+
* into one document.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createOutputForCommand(command: Command): OutputContext;
|
|
12
33
|
/**
|
|
13
34
|
* Environment target for CLI operations.
|
|
14
35
|
*/
|
|
@@ -3,5 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* CLI tools for SDK site developers.
|
|
5
5
|
* Supports bidirectional content management: pull content from CMS and push content back.
|
|
6
|
+
*
|
|
7
|
+
* This module is the bin entry point: it loads env files, then runs the CLI via
|
|
8
|
+
* `runCli`, which owns the process exit code and guarantees exactly one JSON
|
|
9
|
+
* envelope per invocation under `--json`. The command tree lives in `program.ts`.
|
|
6
10
|
*/
|
|
7
11
|
export {};
|
|
@@ -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>;
|
|
@@ -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,7 @@ 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
41
|
export { BlockPatchStaleContentError, isBlockPatchStaleContentError, } from './blocks';
|
|
42
42
|
export { applySiteStyleSelectionBodyFromCommand, buildApplySiteStyleSelectionCommand, } from './theme';
|
|
@@ -11,6 +11,7 @@ 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';
|
|
@@ -559,28 +560,18 @@ export interface ThemeUpsertResult {
|
|
|
559
560
|
export type SiteStyleSelectionApplyCommand = SiteCommandOf<'applySiteStyleSelection'>;
|
|
560
561
|
export type SiteStyleSelectionApplyCommandInput = SiteStyleSelectionApplyCommand['input'];
|
|
561
562
|
/**
|
|
562
|
-
* Public SDK
|
|
563
|
-
*
|
|
564
|
-
* minimal request ({siteStyleId, baseSelectionVersion}); omitted choices
|
|
565
|
-
* default from the curated style server-side. Wire IDs are strings at this
|
|
566
|
-
* boundary; the server schema brands and validates them. The canonical header
|
|
567
|
-
* pair is atomic at the type level: both omitted (site-style default), both
|
|
568
|
-
* 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.
|
|
569
565
|
*/
|
|
570
|
-
export type ThemeStyleSelectionApplyInput = Omit<SiteStyleSelectionApplyCommandInput, '
|
|
571
|
-
|
|
566
|
+
export type ThemeStyleSelectionApplyInput = Omit<SiteStyleSelectionApplyCommandInput, 'changes'> & Readonly<{
|
|
567
|
+
siteStyleRef: string;
|
|
572
568
|
baseSelectionVersion: number;
|
|
573
569
|
selectionId?: string | null;
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
headerStyleId: null;
|
|
580
|
-
}> | Readonly<{
|
|
581
|
-
headerLayoutId: string;
|
|
582
|
-
headerStyleId: string;
|
|
583
|
-
}>);
|
|
570
|
+
changes: readonly [
|
|
571
|
+
SiteStyleSelectionApplyCommandInput['changes'][number],
|
|
572
|
+
...SiteStyleSelectionApplyCommandInput['changes'][number][]
|
|
573
|
+
];
|
|
574
|
+
}>;
|
|
584
575
|
export interface ThemeStyleSelectionApplyResult {
|
|
585
576
|
success: boolean;
|
|
586
577
|
themeId: string;
|
|
@@ -911,6 +902,12 @@ export interface ApiErrorResponse {
|
|
|
911
902
|
code: string;
|
|
912
903
|
message: string;
|
|
913
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;
|
|
914
911
|
};
|
|
915
912
|
}
|
|
916
913
|
export type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
|
|
@@ -1048,6 +1045,20 @@ export interface PullOperations {
|
|
|
1048
1045
|
*/
|
|
1049
1046
|
contentTypes(): Promise<PulledContentTypes>;
|
|
1050
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
|
+
}
|
|
1051
1062
|
export interface BackfillPageResult {
|
|
1052
1063
|
pagesUpdated: number;
|
|
1053
1064
|
identifiersAssigned: Record<string, string>;
|
|
@@ -1134,6 +1145,19 @@ export interface ManagementClient {
|
|
|
1134
1145
|
events: EventOperations;
|
|
1135
1146
|
courses: CourseOperations;
|
|
1136
1147
|
pull: PullOperations;
|
|
1148
|
+
/** Discovery catalogs (theme / blocks / content-types). */
|
|
1149
|
+
catalog: CatalogOperations;
|
|
1137
1150
|
identifiers: IdentifiersOperations;
|
|
1138
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>;
|
|
1139
1163
|
}
|