/** * `BrandKitRecipe` — the declarative definition of a Sitecore Brand * brand kit. * * This schema is the single source of truth for the `brand-kit` recipe * kind: it validates recipe files, drives the `sync` CLI, and becomes * the MCP tool input schema. Keep the `.describe()` text accurate — the * model reads it. * * Two authoring shapes share this schema: * * - **scai-native** — flat object with `name`, `documents`, `sections`. * No `kind` / `schemaVersion` / `handle`. Used by hand-authored * `.brandkit.yaml` files and the `scai brand sync pull` capture * path. Stays valid: the discriminator fields are optional here. * - **registry-superset** — the richer shape the `@registry` * `sitecore-recipes.ts` exports use: adds `kind: "brandkit"`, * `schemaVersion: "1"`, `handle`, `displayName`, and a * discriminated `documents[]` shape (`url` | `registry-file`) * with `tags` / `sections` hints per document. The orchestrator * passes recipes through unchanged from the registry to scai; * scai's parser accepts the extra fields without stripping them. * * See docs/recipe-sync-architecture.md. */ import { z } from "zod"; /** * An `array`-field entry: a single `{name}` object slot. Server-assigned * `id` echoed back on read; omit when authoring. * * Used for Sitecore's flat list fields — Dos and dont's, Checklist * values, Grammar guidelines values, Visual Guidelines > Logo * guidelines / Colour palettes, Brand Context > Brand concept. Mirrors * `BrandArrayEntry` in the registry's `sitecore-recipes.ts` and * `BrandKitArrayEntry` in this package's API client layer. */ export declare const BrandArrayEntrySchema: z.ZodObject<{ name: z.ZodString; id: z.ZodOptional; }, z.core.$strip>; /** * A `richArray`-field entry: text plus optional tags and a constraint. * Used for Tone scenarios + Image style scenarios (Sitecore UI labels * `name`→"Instructions" and `tags`→"Keys"). */ export declare const BrandRichEntrySchema: z.ZodObject<{ name: z.ZodString; tags: z.ZodOptional>; restrictions: z.ZodOptional; id: z.ZodOptional; }, z.core.$strip>; /** * A glossary translation row. The `Glossary and Localization` section's * fields are dynamic — one per glossary term — and each field's value * is an array of these rows (one per locale). The section's base * language belongs in `BrandKitRecipe.sectionProperties[…].sourceLanguage`. */ export declare const BrandGlossaryEntrySchema: z.ZodObject<{ term: z.ZodString; locale: z.ZodString; displayName: z.ZodOptional; id: z.ZodOptional; }, z.core.$strip>; /** * A brand-kit field value. The valid shape depends on the live field's * `type` — `text` → string, `array` → `BrandArrayEntry[]`, `richArray` * → `BrandRichEntry[]`. Glossary fields are special: dynamic per-term * with `BrandGlossaryEntry[]` values. Sitecore returns HTTP 422 if you * PATCH a mismatched shape (e.g. a string into an `array` field). * * The earlier `string[]` member of this union was empirically wrong — * `array` is object-shaped on the wire, not string-shaped — and made * every list-field push 422. */ export declare const BrandFieldValueSchema: z.ZodUnion; }, z.core.$strip>>, z.ZodArray>; restrictions: z.ZodOptional; id: z.ZodOptional; }, z.core.$strip>>, z.ZodArray; id: z.ZodOptional; }, z.core.$strip>>]>; /** * Section-level metadata that Sitecore stores alongside the field * dictionary. Today the only load-bearing slot is `sourceLanguage`, * the Glossary section's base/default-language tag (BCP-47). */ export declare const BrandKitSectionPropertiesSchema: z.ZodObject<{ sourceLanguage: z.ZodOptional; }, z.core.$strip>; /** * Canonical Sitecore AI brand-kit section names — verified empirically * 2026-06-02 against the live `Sync` brand kit. Earlier snapshots of * this list were wrong on three names ("Do's and Don'ts" → "Dos and * Dont's", "Grammar Checklists" → "Grammar Guidelines") and missing * two sections ("Image Style", "Checklist"); recipes built against * those names PATCH-skipped silently. * * Mirrors `BRAND_KIT_CANONICAL_SECTIONS` in the registry's recipe * definitions. Exported so callers building recipes have a stable * list to bias `documents[].sections` against. */ export declare const BRAND_KIT_CANONICAL_SECTIONS: readonly ["Brand Context", "Global Goals", "Tone of Voice", "Dos and Dont's", "Visual Guidelines", "Image Style", "Grammar Guidelines", "Checklist", "Glossary and Localization"]; export type BrandKitCanonicalSection = (typeof BRAND_KIT_CANONICAL_SECTIONS)[number]; /** * A brand document referenced by URL. Sitecore's Documents API fetches * the URL server-side and copies the bytes into MMS. The default * variant — what `scai brand sync pull` emits when capturing a live * kit. */ export declare const BrandUrlDocumentSchema: z.ZodObject<{ title: z.ZodOptional; summary: z.ZodOptional; tags: z.ZodOptional>; sections: z.ZodOptional>; kind: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>; /** * A brand document stored alongside the recipe in the registry repo. * The `path` is relative to the recipe file's directory. scai itself * does **not** upload these — the Sitecore Documents API has no * working bytes-upload path (see * `src/brand/documents/upload.ts::LOCAL_UPLOAD_UNSUPPORTED_MESSAGE`), * so the orchestrator (or whoever owns the recipe before scai sees * it) MUST translate `registry-file` entries to `url` entries * pointing at an HTTP-reachable host before invoking `scai brand * sync push`. The seed runner rejects unresolved `registry-file` * documents with a clear hint; this stays in the schema as an * authoring-time shape so registry-side recipes round-trip cleanly. */ export declare const BrandRegistryFileDocumentSchema: z.ZodObject<{ title: z.ZodOptional; summary: z.ZodOptional; tags: z.ZodOptional>; sections: z.ZodOptional>; kind: z.ZodLiteral<"registry-file">; path: z.ZodString; }, z.core.$strip>; /** * A brand document to ingest. Two variants — `{ kind: "url", url }` and * `{ kind: "registry-file", path }` — sharing optional `title` / * `summary` / `tags` / `sections` ingestion hints. * * Back-compat: scai-native recipes that pre-date the discriminator wrote * documents as the flat `{ url, title?, summary? }` shape. The * `z.preprocess` step defaults a missing `kind` to `"url"` whenever * `url` is present, so legacy recipes keep parsing without a migration * step. Zod 4's discriminated unions require the discriminator to be * present BEFORE routing, so `.default("url")` inline on the literal * doesn't work — preprocess is the correct seam. */ export declare const BrandDocumentSchema: z.ZodPreprocess; summary: z.ZodOptional; tags: z.ZodOptional>; sections: z.ZodOptional>; kind: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ title: z.ZodOptional; summary: z.ZodOptional; tags: z.ZodOptional>; sections: z.ZodOptional>; kind: z.ZodLiteral<"registry-file">; path: z.ZodString; }, z.core.$strip>], "kind">>; /** The full brand-kit recipe. */ export declare const BrandKitRecipeSchema: z.ZodObject<{ kind: z.ZodOptional>; schemaVersion: z.ZodOptional>; handle: z.ZodOptional; name: z.ZodString; displayName: z.ZodOptional; description: z.ZodOptional; industry: z.ZodOptional; logo: z.ZodOptional; documents: z.ZodDefault; summary: z.ZodOptional; tags: z.ZodOptional>; sections: z.ZodOptional>; kind: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ title: z.ZodOptional; summary: z.ZodOptional; tags: z.ZodOptional>; sections: z.ZodOptional>; kind: z.ZodLiteral<"registry-file">; path: z.ZodString; }, z.core.$strip>], "kind">>>>; sections: z.ZodDefault; }, z.core.$strip>>, z.ZodArray>; restrictions: z.ZodOptional; id: z.ZodOptional; }, z.core.$strip>>, z.ZodArray; id: z.ZodOptional; }, z.core.$strip>>]>>>>; sectionProperties: z.ZodDefault; }, z.core.$strip>>>; }, z.core.$strip>; /** A validated brand-kit recipe (parsed form — defaults materialised). */ export type BrandKitRecipe = z.infer; /** * Input alias — the shape an *author* writes. Same as * `BrandKitRecipe` minus the `.default(...)` clauses; useful for * loaders and TypeScript-authored recipe modules. */ export type BrandKitRecipeInput = z.input; /** A brand-kit field value (text / array entries / rich entries / glossary entries). */ export type BrandFieldValue = z.infer; /** A single `array`-field entry (object with `name`). */ export type BrandArrayEntry = z.infer; /** A single `richArray`-field entry (name + optional tags + restrictions). */ export type BrandRichEntry = z.infer; /** A single glossary-and-localization translation row. */ export type BrandGlossaryEntry = z.infer; /** Per-section metadata (currently only `sourceLanguage`). */ export type BrandKitSectionProperties = z.infer; /** A brand document reference within a recipe (URL or registry-file). */ export type BrandDocument = z.infer; /** A URL-form brand document (post-parse — `kind` is the literal). */ export type BrandUrlDocument = z.infer; /** A registry-file-form brand document (post-parse — `kind` is the literal). */ export type BrandRegistryFileDocument = z.infer;