import { z } from "zod"; /** * A single field value on a `ContentItemRecipe`. Tagged on `shape` so * the compiler can dispatch each value to the right Sitecore wire * encoder (image XML, link XML, pipe-separated GUID list, …) without * cross-recipe shape lookup at parse time. * * Shapes mirror `FieldShape` from `field-types.ts`, with `link` split * into `link-external` / `link-internal` and `reference` lifted to * always-array (`refs: string[]`) — both differences reflect that the * value-level form encodes the stored representation, not the abstract * field shape on the template. * * Cross-recipe handle references (`link-internal.ref`, `reference.refs`) * resolve via the same `templateId(handle)` / `contentItemId(handle)` * derivation the rest of the recipe surface uses. */ export declare const ContentFieldValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ shape: z.ZodLiteral<"text">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"richText">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"boolean">; value: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"number">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"integer">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"date">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"datetime">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"enum">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"image">; mediaPath: z.ZodString; alt: z.ZodOptional; width: z.ZodOptional; height: z.ZodOptional; mediaLibraryFolder: z.ZodOptional; role: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-external">; href: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; title: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-internal">; ref: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"reference">; refs: z.ZodArray; }, z.core.$strip>], "shape">; export type ContentFieldValue = z.infer; /** Per-language field values — a simple-mode translation of a content item. */ export declare const ContentTranslationSchema: z.ZodObject<{ fields: z.ZodDefault; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"richText">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"boolean">; value: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"number">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"integer">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"date">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"datetime">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"enum">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"image">; mediaPath: z.ZodString; alt: z.ZodOptional; width: z.ZodOptional; height: z.ZodOptional; mediaLibraryFolder: z.ZodOptional; role: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-external">; href: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; title: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-internal">; ref: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"reference">; refs: z.ZodArray; }, z.core.$strip>], "shape">>>; }, z.core.$strip>; export type ContentTranslation = z.infer; /** * A personalization variant within a numbered version — an * audience-conditional alternative. Carries a partial field delta (and an * optional layout) against the version's default. * * The exact XM Cloud personalization wire model is unverified; the compiler * mapping for `variants` is deferred — see docs/recipe-sync-architecture.md, * "Personalization variants". */ export declare const ContentVariantSchema: z.ZodObject<{ audience: z.ZodString; fields: z.ZodDefault; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"richText">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"boolean">; value: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"number">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"integer">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"date">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"datetime">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"enum">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"image">; mediaPath: z.ZodString; alt: z.ZodOptional; width: z.ZodOptional; height: z.ZodOptional; mediaLibraryFolder: z.ZodOptional; role: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-external">; href: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; title: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-internal">; ref: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"reference">; refs: z.ZodArray; }, z.core.$strip>], "shape">>>; layout: z.ZodOptional>>>>; }, z.core.$strip>>>; }, z.core.$strip>; export type ContentVariant = z.infer; /** * One numbered version of a content item in a single language — the unit a * story-seed recipe authors. See docs/recipe-sync-architecture.md, * "Content versioning — seeding a story". */ export declare const ContentVersionSchema: z.ZodObject<{ version: z.ZodNumber; fields: z.ZodDefault; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"richText">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"boolean">; value: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"number">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"integer">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"date">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"datetime">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"enum">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"image">; mediaPath: z.ZodString; alt: z.ZodOptional; width: z.ZodOptional; height: z.ZodOptional; mediaLibraryFolder: z.ZodOptional; role: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-external">; href: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; title: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-internal">; ref: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"reference">; refs: z.ZodArray; }, z.core.$strip>], "shape">>>; workflowState: z.ZodOptional; date: z.ZodOptional; layout: z.ZodOptional>>>>; }, z.core.$strip>>>; variants: z.ZodOptional; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"richText">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"boolean">; value: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"number">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"integer">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"date">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"datetime">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"enum">; value: z.ZodString; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"image">; mediaPath: z.ZodString; alt: z.ZodOptional; width: z.ZodOptional; height: z.ZodOptional; mediaLibraryFolder: z.ZodOptional; role: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-external">; href: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; title: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"link-internal">; ref: z.ZodString; text: z.ZodOptional; target: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ shape: z.ZodLiteral<"reference">; refs: z.ZodArray; }, z.core.$strip>], "shape">>>; layout: z.ZodOptional>>>>; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>; export type ContentVersion = z.infer; /** * The datasource binding on a placement — input (authoring) and output * (parsed) forms. Hand-declared alongside the recursive * `ComponentPlacement` interfaces below: the only input/output * difference is the scoped ref's `fields`, which Zod defaults to `{}`. */ export type ComponentPlacementDatasourceRefInput = { kind: "shared"; handle: string; } | { kind: "scoped"; slot: string; fields?: Record; } | { kind: "none"; }; export type ComponentPlacementDatasourceRef = { kind: "shared"; handle: string; } | { kind: "scoped"; slot: string; fields: Record; } | { kind: "none"; }; /** * Authoring (input) shape of one placement. Recursive: a placement may * host children in its own placeholders (`placement.placeholders` — * layout components like `column-splitter@1` expose one slot per * column). Keys are the component's LOGICAL placeholder names * (`column-1`, `column-2` — the static prefix of a dynamic placeholder, * no instance suffix). * * Valid in `PageRecipe`, `PartialDesignRecipe`, and `PageDesignRecipe` * layouts. Their compilers flatten the tree into SXA dynamic-placeholder * wire form (`compile/flatten-layout.ts`): the parent placement gets an * item-unique integer `DynamicPlaceholderId` rendering parameter * (unless the author set one) and each child lands in the * path-qualified key `//-` * — the key shape XM Cloud Pages writes when an author drops a component * into a dynamic placeholder, and the shape headless components resolve * via `params.DynamicPlaceholderId`. Layout contexts without a * flattening pass (content-item version layouts, page-template * standard-values layouts) reject nesting. Nesting depth is unbounded. * * The interfaces are hand-declared (rather than `z.infer`red) so the * recursion resolves lazily: an inferred recursive schema type gets * INLINED structurally into every consuming schema's emitted `.d.ts`, * and downstream `z.output` expansion of page/content-item schemas then * exceeds TypeScript's instantiation depth (TS2589) in consumer repos. * Named interfaces keep the emitted types small and cacheable. */ export interface ComponentPlacementInput { /** Handle of a `ComponentTemplateRecipe` (`@`). */ componentHandle: string; /** SXA Rendering Variant name. Defaults to the component's first variant. */ variant?: string; /** Rendering Parameters (URL-encoded into the placement's params blob). */ params?: Record; /** Nested placements, keyed by the component's logical placeholder names. */ placeholders?: Record; /** * How the rendering's content is bound. Omit for `kind: "none"` * semantics. * * shared — a `ContentItemRecipe` handle (catalog-shipped reusable * content like `site-logo-content@1`). * scoped — host-local content materialised at `/Data/` * (the page, partial-design, or page-design item); * `fields` accepts both the scai-native discriminated * `ContentFieldValue` shape and the registry's flat shape. * none — config-driven rendering with no datasource (rare). */ datasourceRef?: ComponentPlacementDatasourceRefInput; } /** Parsed (output) shape of one placement — scoped `fields` defaulted. */ export interface ComponentPlacement { componentHandle: string; variant?: string; params?: Record; placeholders?: Record; datasourceRef?: ComponentPlacementDatasourceRef; } /** * One rendering placed into a placeholder — see the interface docs * above. `z.lazy` + the explicit `z.ZodType` annotation is the * recursive-schema pattern: the annotation terminates type inference, * and the emitted declaration references the named interfaces instead * of inlining a structural tree. */ export declare const ComponentPlacementSchema: z.ZodType; /** * Layout block keyed by placeholder. Each placeholder holds an ordered * array of `ComponentPlacement`s — render order is array order. */ export declare const LayoutSchema: z.ZodObject<{ placeholders: z.ZodDefault>>>>; }, z.core.$strip>; export type Layout = z.infer;