import { type HygieneCommonOptions } from "../shared.js"; export interface AuditDeadTemplatesOptions extends HygieneCommonOptions { /** * Template-tree root to scan. Default `/sitecore/templates` — * the templates root. By default the scan excludes `System/` and * `Branches/System/` subtrees (set `--include-system` to include). */ root?: string; /** Override the search index. */ index?: string; /** Cap on the number of templates inspected. Default 5000. */ limit?: number; /** Concurrency for per-template item-count checks. Default 8. */ concurrency?: number; /** * Include System / platform templates (`/sitecore/templates/System`, * `/sitecore/templates/Branches/System`) in the scan. Off by default — * these are platform-internal and aren't actionable cleanup targets. */ includeSystem?: boolean; } export interface DeadTemplateReport { templateId: string; name: string; fullName: string | null; /** * Number of items in the master DB that derive from this template. * Zero items → dead template, safe to delete (subject to inbound base-template * references; the cleanup command surfaces those at delete time). */ itemCount: number; } /** * Audit a template tree for templates with zero items based on them. * * Strategy: * 1. List all templates under `--root` via the `itemTemplates` * Authoring query (paged). * 2. For each template, run a small search (`_template: `) * that ignores standard-values items (templates ship a SV item under * themselves; that's not a "real" usage). Fastest cap-at-1 page. * 3. Emit a row for every template with zero items. * * Output is sorted by fullName for stable diffs across runs. */ export declare const runAuditDeadTemplates: (options: AuditDeadTemplatesOptions) => Promise;