/** * Layout-bearing reverse-projection (`read-current`). * * The kinds whose fidelity hinges on parsing Sitecore layout XML back into * the recipe `Layout`: * - partial-design, page-design (SXA composition items) * - page (a concrete page item, per-(language, version) fan-out) * - placeholder (Placeholder Settings item) * * Plus the four tree walkers that discover these items. `pageFromItem` and * `walkPagesTree` reuse the content-bearing helpers in `content-helpers.ts` * (the page per-(lang, version) fan-out is the same shape as a content item's). * * See `../read-current.ts` for the module-level contract. */ import type { AuthoringApiClient } from "../../api/client.js"; import type { Recipe } from "../../schema/recipe.js"; import { type GuidHandleIndex, type TemplateFieldShapes } from "./helpers.js"; /** * Walk the Partial Designs root, reverse-projecting every SXA Partial * Design item into a `PartialDesignRecipe`. Partial designs sit flat * directly under the root (the partial-design compiler parents them at * `joinPath(partialDesignsRoot, recipe.name)`); a child that doesn't * conform to the Partial Design template is skipped silently. */ export declare const walkPartialDesignsTree: (rootPath: string, client: AuthoringApiClient, guidIndex: GuidHandleIndex) => Promise; /** * Walk the Page Designs root, reverse-projecting every SXA Page Design * item into a `PageDesignRecipe`. * * `appliesTo` is recovered from the root's own `TemplatesMapping` field: * the field is decoded once up front into design-GUID → template-handles * groupings, and each page design's slice is threaded into * `pageDesignFromItem`. A template GUID in the mapping with no marker is * dropped from `appliesTo` (unrecoverable handle). */ export declare const walkPageDesignsTree: (rootPath: string, client: AuthoringApiClient, guidIndex: GuidHandleIndex) => Promise; /** * Walk the pages root, reverse-projecting every page item into a * `PageRecipe`. * * A "page" here is any child whose `templateId` resolves — through the * marker index — to a page-template handle: page items conform to a page * template, and `pageFromItem` needs that handle for the recipe's required * `template` field. A child whose template GUID carries no marker is * skipped (its template is unrecoverable, so the page can't reverse- * project). The page's own `Data` datasource folder is skipped — it is a * generic Folder, not a page. * * Recurses one level into child pages (page-tree nesting): a page item's * children that are themselves pages reverse-project too. The `Data` * folder is not descended into. */ export declare const walkPagesTree: (rootPath: string, client: AuthoringApiClient, guidIndex: GuidHandleIndex, templateShapeCache: Map, tenantLanguages: readonly string[]) => Promise; /** * Walk the Placeholder Settings root, reverse-projecting every Placeholder * Settings item into a `PlaceholderRecipe`. * * Items conforming to `PLACEHOLDER_TEMPLATE_ID` are leaves; folders (any * other item with children) are grouping folders — recursed into, with the * cumulative folder path threaded onto each placeholder's `folder`. A * key-less Placeholder Settings item is skipped (`placeholderFromItem` * returns `null`). */ export declare const walkPlaceholderSettingsTree: (rootPath: string, client: AuthoringApiClient, guidIndex: GuidHandleIndex) => Promise;