/** * Templates-family reverse-projection (`read-current`). * * The non-layout, non-content kinds whose item layout is a `TEMPLATE` / * `TEMPLATE_FOLDER` / `Enumeration` tree: * - component-template, content-template, page-template * - component-section (a Template Folder under componentsRoot) * - enumeration (an Enumeration container under enumerationsRoot) * * Plus the two tree walkers that discover and classify these items * (`walkTemplatesTree`, `walkEnumerationsTree`) and the rendering-name index * (`collectRenderingComponentNames`) the template classifier consults. * * See `../read-current.ts` for the module-level contract. */ import type { AuthoringApiClient } from "../../api/client.js"; import type { Recipe } from "../../schema/recipe.js"; /** * Index every rendering item under `renderingsRoot` by component name, so a * candidate template can be classified as a component (has a rendering) vs. * a content template (no rendering). Returns a Set of component names — the * rendering's `Component Name` field, falling back to the item name. * * Returns an empty set when `renderingsRoot` resolves to no item. */ export declare const collectRenderingComponentNames: (renderingsRoot: string, client: AuthoringApiClient) => Promise>; /** * Walk every `TEMPLATE` item under a templates-tree root, reverse-projecting * each into either a component-template or content-template recipe. * * Templates are discovered by recursing through `TEMPLATE_FOLDER` items. A * `TEMPLATE_FOLDER` sitting *directly* under `componentsRoot` is itself a * component section and is emitted as a `ComponentSectionRecipe`; its * children are then component templates carrying that `section`. * * Classification of a `TEMPLATE` item: * - has SXA component bases OR a matching rendering → component-template * - otherwise → content-template */ export declare const walkTemplatesTree: (rootPath: string, client: AuthoringApiClient, renderingComponentNames: Set, isComponentsRoot: boolean, isContentModelsRoot: boolean) => Promise; /** * Walk the enumerations tree, reverse-projecting each `Enumeration`-template * container into an `EnumerationRecipe`. Grouping folders (`Enumerations * Folder` template) are recursed into; the cumulative folder path is * threaded onto each enum's `location.folder`. * * Container-vs-folder discrimination uses the structural rule the compiler * guarantees — grouping folders only ever parent containers/other folders, * containers only ever parent value leaves — inspected via `groupsContainers`. */ export declare const walkEnumerationsTree: (rootPath: string, client: AuthoringApiClient) => Promise;