import { CuneiformCommand } from '../../../base/cuneiform-command.js'; import { type BlockedDefinition } from '../../../operations/DefinitionPurgeOperation.js'; /** * Command result type for JSON output. */ export type DefinitionPurgeResult = { /** Whether the operation was successful */ success: boolean; /** Number of definitions deleted */ deleted: number; /** Number of definitions skipped */ skipped: number; /** Number of definitions that failed to delete */ failed: number; /** Number of definitions queued (have related requests in queue) */ queued: number; /** Total number of definitions processed */ total: number; /** Whether this was a dry run */ dryRun: boolean; /** Definitions blocked by summaries */ blockedBySummaries: BlockedDefinition[]; /** Whether the operation was cancelled by the user */ cancelled?: boolean; /** Error message if failed */ error?: string; }; /** * Purges profiling definitions from a Salesforce org. * * Aligned with the definition create command's UX: * - Inclusive AND filter model (--objects, --filter, --pattern, --method, --category, --status) * - Per-definition progress output with [DELETED]/[SKIP]/[FAIL] indicators * - Separate blocked sections with actionable guidance * - Summary line: Deleted: X | Skipped: Y | Failed: Z | Total: N * - --dry-run preview mode */ export default class DefinitionPurge extends CuneiformCommand { static readonly summary: string; static readonly description: string; static readonly examples: string[]; static readonly flags: { 'target-org': import("@oclif/core/interfaces").OptionFlag; 'api-version': import("@oclif/core/interfaces").OptionFlag; all: import("@oclif/core/interfaces").BooleanFlag; keys: import("@oclif/core/interfaces").OptionFlag; objects: import("@oclif/core/interfaces").OptionFlag; filter: import("@oclif/core/interfaces").OptionFlag<"standard" | "custom" | undefined, import("@oclif/core/interfaces").CustomOptions>; pattern: import("@oclif/core/interfaces").OptionFlag; method: import("@oclif/core/interfaces").OptionFlag<"metadata" | "historical" | "comparative" | undefined, import("@oclif/core/interfaces").CustomOptions>; category: import("@oclif/core/interfaces").OptionFlag; status: import("@oclif/core/interfaces").OptionFlag<"ERROR" | "NOT PROFILED" | "IN PROGRESS" | "SUCCESS" | "COMPLETE w/ FAILURES" | undefined, import("@oclif/core/interfaces").CustomOptions>; namespace: import("@oclif/core/interfaces").OptionFlag; limit: import("@oclif/core/interfaces").OptionFlag; 'dry-run': import("@oclif/core/interfaces").BooleanFlag; 'no-prompt': import("@oclif/core/interfaces").BooleanFlag; format: import("@oclif/core/interfaces").OptionFlag<"table" | "json", import("@oclif/core/interfaces").CustomOptions>; }; /** * Maps error codes to i18n message keys with optional parameter interpolation. */ private static readonly ERROR_CODE_MAP; private static readonly REASON_LABELS; private static readonly QUEUED_REASON; private isTable; private static formatReason; private static isQueuedError; /** * Renders a padded row for the progress table. * The first column (#) is right-aligned; all others are left-aligned. */ private static formatProgressRow; /** * Returns the status indicator for a progress event. */ private static statusIndicator; /** * Computes column widths from header and row data. * The first column (row number) gets a minimum width of 4. */ private static computeColumnWidths; /** * Executes the purge command. */ run(): Promise; private renderSuccessOutput; private displayInitialization; private displayNoEligible; /** * Displays progress events as a dynamically-sized table. */ private displayProgressTable; /** * Displays the categorized preview before user confirmation. * * Uses {@link paginateOutput} to page through large record sets interactively. * Column widths are computed from ALL rows upfront so they remain consistent * across pages. The header and separator are printed once before pagination. * * @param preview - Categorized preview data from the operation layer. * @param skipPrompt - When true, renders all rows without interactive pagination. * @returns Pagination result metadata, or undefined if no rows to display. */ private displayPreview; /** * Displays purge results with create-aligned formatting. */ private displayResults; }