import type { ICliInterfaceServiceSelectOptions } from '../../application/interface/cli-interface-service-select-options.interface'; import type { ICliInterfaceService } from '../../application/interface/cli-interface-service.interface'; type TPromptInputValidator = (value: string) => Error | string | undefined; /** * Implementation of the CLI interface service using the prompts library. * Provides methods for interacting with the user through the command line. */ export declare class PromptsCliInterface implements ICliInterfaceService { /** Reference to the active spinner instance */ private spinner; /** * Initializes a new instance of the PromptsCliInterface. * Sets up the spinner for providing visual feedback during operations. */ constructor(); /** * Clears the console screen. */ clear(): void; /** * Displays a confirmation prompt to the user. * @param {string} message - The message to display to the user * @param {boolean} isConfirmedByDefault - The default value for the confirmation, defaults to false * @returns {Promise} Promise that resolves to the user's response (true for confirmed, false for declined) */ confirm(message: string, isConfirmedByDefault?: boolean): Promise; /** * Displays an error message to the user. * @param {string} message - The error message to display */ error(message: string): void; /** * Displays a grouped multi-select prompt to the user. * @param {string} message - The message to display to the user * @param {Record>} options - Record of groups and their options * @param {boolean} isRequired - Whether a selection is required, defaults to false * @param {Array} initialValues - Initial selected values * @returns {Promise>} Promise that resolves to an array of selected values * @template T - The type of the selected values */ groupMultiselect(message: string, options: Record>, isRequired?: boolean, initialValues?: Array): Promise>; /** * Handles and displays an error message with additional error details. * @param {string} message - The error message to display * @param {unknown} error - The error object or details */ handleError(message: string, error: unknown): void; /** * Displays an informational message to the user. * @param {string} message - The info message to display */ info(message: string): void; /** * Displays a standard message to the user. * @param {string} message - The message to display */ log(message: string): void; /** * Displays a multi-select prompt to the user. * @param {string} message - The message to display to the user * @param {Array} options - Array of options to select from * @param {boolean} isRequired - Whether a selection is required, defaults to false * @param {Array} initialValues - Initial selected values * @returns {Promise>} Promise that resolves to an array of selected values * @template T - The type of the selected values */ multiselect(message: string, options: Array, isRequired?: boolean, initialValues?: Array): Promise>; /** * Displays a note to the user with a title and message. * @param {string} title - The title of the note * @param {string} message - The message content of the note */ note(title: string, message: string): void; /** * Displays a masked password prompt to the user. * @param {string} message - The message to display to the user * @param {string} initialValue - Optional initial value for the input field * @param {(value: string) => Error | string | undefined} validate - Optional validation function for the input * @returns {Promise} Promise that resolves to the user's password text */ password(message: string, initialValue?: string, validate?: TPromptInputValidator): Promise; /** * Displays a single select prompt to the user. * @param {string} message - The message to display to the user * @param {Array} options - Array of options to select from * @param {string} initialValue - Initial selected value * @returns {Promise} Promise that resolves to the selected value * @template T - The type of the selected value */ select(message: string, options: Array, initialValue?: string): Promise; /** * Starts a spinner with the specified message. * Stops any existing spinner first. * @param {string} message - The message to display while the spinner is active */ startSpinner(message: string): void; /** * Stops the current spinner with an optional completion message. * @param {string} message - Optional message to display when the spinner stops */ stopSpinner(message?: string): void; /** * Displays a success message to the user. * @param {string} message - The success message to display */ success(message: string): void; /** * Displays a text input prompt to the user. * @param {string} message - The message to display to the user * @param {string} _placeholder - Optional placeholder text for the input field (unused) * @param {string} initialValue - Optional initial value for the input field * @param {(value: string) => Error | string | undefined} validate - Optional validation function for the input * @returns {Promise} Promise that resolves to the user's input text */ text(message: string, _placeholder?: string, initialValue?: string, validate?: TPromptInputValidator): Promise; /** * Update the spinner message without stopping it. * @param {string} message - The new message to display */ updateSpinner(message: string): void; /** * Displays a warning message to the user. * @param {string} message - The warning message to display */ warn(message: string): void; } export {};