import { Command } from 'commander'; import { JsonFormatter } from '../lib/json-formatter.js'; import { ICommand } from '../lib/command-registry.js'; import { GreprApiClient } from '../lib/api-client.js'; import { ApiClientFactoryOptions } from '../lib/api-client-factory.js'; import { OutputFormat } from '../lib/output-format.js'; import { CommandOption, MergeConfiguration } from '../types.js'; export interface ListCommandOptions extends ApiClientFactoryOptions { quiet?: boolean; timezone?: string; output?: string; format?: OutputFormat; sort?: string; color?: boolean; timestamps?: boolean; jobState?: boolean; maxDepth?: number; maxLines?: number; fields?: string[]; } /** * Base class for list commands (job:list, integration:list, dataset:list) * Provides common functionality for filtering, formatting, and output */ export declare abstract class ListCommand implements ICommand { protected formatter: JsonFormatter | null; protected apiClient: GreprApiClient | null; /** * Get the command name (e.g., 'job:list', 'integration:list') */ abstract getCommandName(): string; /** * Get the command description */ abstract getCommandDescription(): string; /** * Get command-specific options */ abstract getCommandOptions(): CommandOption[]; /** * Execute the list operation */ abstract executeList(options: T): Promise; /** * Add this command to the program */ addToProgram(program: Command, mergeConfiguration: MergeConfiguration): void; /** * Setup formatter for output */ /** The format actually in effect, including the env-var default. */ protected resolveFormat(options: T): OutputFormat; protected setupFormatter(options: T): void; /** * Create API client using shared factory */ protected createApiClient(options: T): GreprApiClient; /** * Format and output data */ protected formatAndOutput(rows: Record[], options: T, dataType: string): Promise; /** * Generate query summary showing applied filters and results. */ protected generateQuerySummary(options: T, resultCount: number): string; /** * Show query summary if not in quiet mode. Routes to stderr in * machine-readable formats so the stdout stream stays parseable. */ protected showQuerySummary(options: T, resultCount: number): void; } //# sourceMappingURL=list-command.d.ts.map