import { type HygieneCommonOptions } from "../shared.js"; export interface AuditStaleUsersOptions extends HygieneCommonOptions { /** Days since last activity. Default 180. */ notActiveDays?: number; /** Cap on users inspected. Default 5000. */ limit?: number; /** Include administrators. Off by default. */ includeAdmins?: boolean; /** * Include service accounts (heuristic: user names ending in * `_service`, `_api`, or `service` substring). Off by default — * service accounts have no human-meaningful "last login" * because they authenticate via OAuth client credentials. */ includeServiceAccounts?: boolean; /** * Use `lastActivityDate` instead of `lastLoginDate` for the * staleness check. Default `false` → use `lastLoginDate` which * reflects "has not logged into the admin UI." Activity date is a * broader signal that includes API-style polling. */ useActivityDate?: boolean; concurrency?: number; baseline?: boolean; output?: string; format?: "json" | "csv" | "markdown"; } export interface StaleUserReport { user: string; domain: string | null; isAdministrator: boolean; lastLogin: string | null; lastActivity: string | null; daysSinceActive: number | null; } /** * Audit users who have been inactive for N days. * * Strategy: * 1. List every user via `listUsers`. * 2. For each, fetch `getUserDetail` to read `profile.lastActivity`. * 3. Flag users where `lastActivity` is null OR older than N days. * * Notes: * - The Authoring API's `UserProfile.lastActivity` reflects the * last time the user logged into the Sitecore admin / Pages * editor. It does NOT count CLI / Authoring-API access via * OAuth client-credentials — service-style "users" therefore * always appear stale, which is why the audit excludes likely * service accounts by default. * - Administrators are excluded by default; pass `--include-admins` * to include them. */ export declare const runAuditStaleUsers: (options: AuditStaleUsersOptions) => Promise;