import { type OperationIr } from "../ir/operations.js"; import { type SiteRecipe } from "../schema/recipe.js"; import { type CompileContext } from "./shared.js"; /** * Compile a `SiteRecipe` to an Operation IR. * * Emits a single `CreateSiteFromTemplate` op that the executor * dispatches through the Sites API. The * `SiteTemplateRecipe` it references is identified via deterministic * `templateId(siteTemplate)`; the executor resolves that refKey to * the SiteTemplate's actual Sitecore itemId via cross-recipe ref * pre-seeding (push.ts walks every recipe's `CreateItem` ops and * seeds `crossRecipeRefs[refKey] = path`, then the executor's * `seedCrossRecipeRefs` calls `getItem({path})` once per push to * populate `capturedItemIds`). * * **Validates** (compile-time, not zod-level): * - Exactly one of `collectionId` / `collectionName` is present. * * **Override emission (Milestone E v2):** * - Dictionary overrides emit one `SetField` op per phrase, targeting * `//Dictionary/`. Each op carries a * `latePath` so the executor's pre-switch lookup seeds the captured * itemId after `CreateSiteFromTemplate` materialises the site's * content tree (SXA's Site Wizard creates the Dictionary folder + * phrase items mid-push). * - Path composition needs the collection's content-tree path. The * compiler resolves it in this priority: * 1. `recipe.collectionPath` (operator-supplied — explicit truth) * 2. `/sitecore/content/` when only collectionName * is set (SXA default; new collections land at this path) * For `collectionId` callers without `collectionPath`, the compiler * CAN'T derive the path (would need a Sites API lookup at compile * time, which the compiler doesn't do). Override emission is * skipped silently — the site still gets created; operators add * `collectionPath` when they want overrides applied. * * **Still deferred (E v3+):** * - Taxonomy overrides as a mix of SetField (existing tags) and * CreateItem (new tags). The SXA taxonomy convention is still under * sandbox investigation; defer until verified. */ export declare function compileSiteRecipe(input: SiteRecipe, context: CompileContext): OperationIr;