import { type HygieneCommonOptions } from "../shared.js"; export interface CleanupArchivePurgeOptions extends HygieneCommonOptions { /** * Only purge archived items older than N days. Default 30. Setting to * 0 purges everything in the archive (use with care). */ olderThanDays?: number; /** Cap on the number of items purged. Default 1000. */ limit?: number; /** Limit to a specific archive name. */ archiveName?: string; /** Concurrency for delete calls. Default 4. */ concurrency?: number; /** Page size for archive listing. Default 100. */ pageSize?: number; whatIf?: boolean; allowWrite?: boolean; } export interface ArchivePurgeAction { archivalId: string; itemId: string; name: string; originalLocation: string; archivedDate: string | null; daysSinceArchived: number | null; status: "purged" | "skipped" | "what-if" | "failed"; error?: string; } /** * Purge items from the Sitecore archive (recycle bin) that have been * archived longer than `--older-than-days N`. * * Strategy: * 1. Page through `archivedItems`, computing days-since-archived per * record. * 2. Skip records younger than the threshold. * 3. For each eligible record, call `deleteArchivedItem(archivalId)`. * Failures don't abort; they're collected per-record so the report * shows partial success. * * Safety rails: * - `ensureAllowWrite` enforces `--allow-write` / env * `allowWrite` outside `--what-if` mode. * - `--older-than-days 0` is allowed but logged as a warning — it * purges everything in the archive. * - There is no `--force` here because archive items are already a * "soft delete" by Sitecore's standards. Operators who got here * have already accepted the data loss. */ export declare const runCleanupArchivePurge: (options: CleanupArchivePurgeOptions) => Promise;