import type { StatusType } from './indicators.js'; /** * A key-value pair for display in a summary box. */ export type SummaryEntry = { /** The label/key text. */ readonly key: string; /** The value to display. */ readonly value: string; }; /** * Options for rendering a summary box. */ export type SummaryBoxOptions = { /** The section title displayed in the header. */ readonly title: string; /** Key-value entries to display in the box. */ readonly entries: readonly SummaryEntry[]; /** Width to pad keys to for column alignment. Default: 20. */ readonly keyWidth?: number; }; /** * Renders a summary box with a header, key-value entries, and a separator. * * Produces a structured block of output suitable for displaying command * results, org details, or object metadata. Empty entries produce * a header and separator with no key-value lines between them. * * @param options - The summary box configuration * @returns A multi-line formatted string * * @example * renderSummaryBox({ title: 'Org Details', entries: [{ key: 'Username', value: 'admin@example.com' }] }) */ export declare function renderSummaryBox(options: SummaryBoxOptions): string; /** * Logs a summary box to the console, line by line. * * Wraps {@link renderSummaryBox} with the common pattern of splitting * the multi-line output and logging each line individually. Prepends * a blank line for visual separation from preceding output. * * @param log - The logging function (typically `this.log.bind(this)`) * @param options - The summary box configuration * * @example * ```typescript * displaySummaryBox(this.log.bind(this), { * title: 'Summary', * entries: [ * { key: 'Deleted', value: '5' }, * { key: 'Failed', value: '0' }, * ], * }); * ``` */ export declare function displaySummaryBox(log: (msg: string) => void, options: SummaryBoxOptions): void; /** * Options for rendering a completion message. */ export type CompletionMessageOptions = { /** The status type for the message icon. */ readonly status: StatusType; /** The primary message text. */ readonly message: string; /** Optional detail lines displayed below the message. */ readonly details?: readonly string[]; }; /** * Renders a completion message with a status symbol and optional detail lines. * * Used at the end of command execution to indicate success, failure, or * warning outcomes with structured details. * * @param options - The completion message configuration * @returns A formatted string with status symbol, message, and optional details * * @example * renderCompletionMessage({ status: 'success', message: 'Exported 42 definitions' }) */ export declare function renderCompletionMessage(options: CompletionMessageOptions): string; /** * Options for rendering a warning block. */ export type WarningBlockOptions = { /** The warning title text. */ readonly title: string; /** Warning detail items displayed as a bullet list. */ readonly items: readonly string[]; }; /** * Renders a warning block with a header and bullet list of items. * * Used to display non-fatal warnings that the user should be aware of * but that don't prevent command completion. * * @param options - The warning block configuration * @returns A formatted warning string, or an empty string if no items * * @example * renderWarningBlock({ title: 'Warnings', items: ['3 objects have no record types'] }) */ export declare function renderWarningBlock(options: WarningBlockOptions): string; /** * Options for rendering a contextual header. */ export type ContextualHeaderOptions = { /** The human-readable command title (e.g., "User Details", "Org Details"). */ readonly commandTitle: string; /** The authenticated username. */ readonly username: string; /** The org name (omitted from output if undefined or empty). */ readonly orgName?: string; }; /** * Renders a contextual header line for CLI command output. * * Produces a single line that frames the command output with context: * "Cuneiform {commandTitle} for {username} ({orgName})" * * @param options - The contextual header configuration * @returns A formatted header string * * @example * renderContextualHeader({ commandTitle: 'User Details', username: 'admin@example.com', orgName: 'Acme Corp' }) */ export declare function renderContextualHeader(options: ContextualHeaderOptions): string; /** * Org context information for display at the top of command output. */ export type OrgContext = { /** Organization name from the Organization sObject */ readonly orgName?: string; /** 18-character Organization ID */ readonly orgId: string; /** Instance URL (e.g., https://acme.my.salesforce.com) */ readonly instanceUrl: string; /** Whether this is a sandbox org */ readonly isSandbox: boolean; }; /** * Renders an Org Context section as a summary box. * * Displays the connected org's name, ID, instance URL, and type * (Production or Sandbox). This section should appear first in * command output to establish which org the user is operating in. * * @param context - The org context data to render * @returns A multi-line formatted string * * @example * renderOrgContext({ orgName: 'Acme Corp', orgId: '00Dxx0000001gErEAI', instanceUrl: 'https://acme.my.salesforce.com' }) */ export declare function renderOrgContext(context: OrgContext): string;