import 'reflect-metadata'; import { CoreModels__NS__CfontAlign, CoreModels__NS__CfontStyle } from './core-models'; export interface UtilsTerminal__NS__SelectChoice { /** * Title of the choice */ name?: string; disabled?: boolean; } export interface UtilsTerminal__NS__SelectChoiceValue extends UtilsTerminal__NS__SelectChoice { value?: T; } type SelectActionChoice = { [choice: string]: UtilsTerminal__NS__SelectChoice & { /** * Action to execute */ action?: () => any; }; }; export declare const UtilsTerminal__NS__wait: (second: number) => Promise; export declare const UtilsTerminal__NS__waitMilliseconds: (milliseconds: number) => Promise; /** * Check if cli is running in verbose mode * @returns true if cli is running with arugment -verbose */ export declare const UtilsTerminal__NS__isVerboseModeTaon: () => boolean; export declare const UtilsTerminal__NS__waitForUserAnyKey: (callback: () => void | Promise, options?: { /** * by default, the action is only triggered once when a key is pressed. * if this option is set, the action will be triggered on every key press. * (Promise will not be resolved until process is killed) */ triggerActionEveryKeypress?: boolean; }) => Promise; export declare const UtilsTerminal__NS__getTerminalHeight: () => number; export declare const UtilsTerminal__NS__clearConsole: () => void; export declare const UtilsTerminal__NS__multiselect: (options: { question?: string; /** * If true, then only one choice can be selected * @deprecated use select instead */ onlyOneChoice?: boolean; choices: UtilsTerminal__NS__SelectChoiceValue[] | { [choice: string]: UtilsTerminal__NS__SelectChoice; }; autocomplete?: boolean; /** * at least one choice must be selected */ required?: boolean; defaultSelected?: string[]; }) => Promise; /** * Similar to select but executes action if provided * @returns selected and executed value */ export declare const UtilsTerminal__NS__multiselectActionAndExecute: (choices: CHOICE, options?: { question?: string; autocomplete?: boolean; defaultSelected?: string; hint?: string; executeActionsOnDefault?: boolean; }) => Promise<{ selected: (keyof CHOICE)[]; actionResults: unknown[]; /** * object containing all selected actions */ actions: (() => any)[]; }>; /** * Similar to select but executes action if provided * @returns selected and executed value */ export declare const UtilsTerminal__NS__selectActionAndExecute: (choices: CHOICE, options?: { question?: string; autocomplete?: boolean; defaultSelected?: string; hint?: string; executeActionOnDefault?: boolean; }) => Promise<{ selected: any; action: () => Promise; actionResult?: undefined; } | { selected: keyof CHOICE; actionResult: unknown; action: () => Promise; }>; export declare const UtilsTerminal__NS__select: (options: { question?: string; choices: UtilsTerminal__NS__SelectChoiceValue[] | { [choice: string]: UtilsTerminal__NS__SelectChoice; }; autocomplete?: boolean; defaultSelected?: string; hint?: string; }) => Promise; export declare const UtilsTerminal__NS__pipeEnterToStdin: () => void; export declare const UtilsTerminal__NS__input: ({ defaultValue, question, required, validate, }: { defaultValue?: string; question: string; required?: boolean; validate?: (value: string) => boolean; }) => Promise; export declare const UtilsTerminal__NS__confirm: (options?: { /** * default: Are you sure? */ message?: string; callbackTrue?: () => any; callbackFalse?: () => any; /** * default: true */ defaultValue?: boolean; engine?: "inquirer-toggle" | "prompts" | "enquirer" | "@inquirer/prompts"; }) => Promise; export declare const UtilsTerminal__NS__pressAnyKeyToContinueAsync: (options?: { message?: string; }) => Promise; /** * @deprecated use UtilsTerminal__NS__pressAnyKey */ export declare const UtilsTerminal__NS__pressKeyAndContinueSync: (message?: string) => void; /** * @returns true if user wants to try again, false otherwise */ export declare const UtilsTerminal__NS__pressAnyKeyToTryAgainErrorOccurred: (error: unknown) => Promise; /** * @deprecated use UtilsTerminal__NS__pressAnyKeyToContinueAsync() */ export declare const UtilsTerminal__NS__pressAnyKey: (options?: { message?: string; }) => void; export declare const UtilsTerminal__NS__previewLongList: (list: string | string[], listName?: string) => Promise; /** * Displays a long list in the console using a pager like `less`. * Returns a Promise that resolves when the user exits the pager. * * @param {string} list - The long string content to display. * @returns {Promise} A Promise that resolves when the pager exits. */ export declare const UtilsTerminal__NS__previewLongListGitLogLike: (list: string | string[]) => Promise; export declare const UtilsTerminal__NS__drawBigText: (text: string, options?: { skipDrawing?: boolean; align?: CoreModels__NS__CfontAlign; style?: CoreModels__NS__CfontStyle; }) => Promise; export declare const UtilsTerminal__NS__drawLine: (col?: number) => void; export {};