import { TServiceParams } from "@digital-alchemy/core"; import { ArrayBuilderOptions, ExternalEditorOptions, MainMenuEntry, MenuComponentOptions, ObjectBuilderOptions, PickManyComponentOptions, PromptAcknowledgeOptions, PromptBooleanOptions, PromptConfirmOptions, PromptPasswordOptions, PromptPickOneOptions, PromptTimeOptions } from "../helpers"; import { DateEditorEditorOptions, NumberEditorRenderOptions, StringEditorRenderOptions } from "."; type TypeFilterMenuOptions = Omit, "left" | "right" | "leftHeader" | "rightHeader" | "search"> & { header: string; entries: MainMenuEntry[]; }; export declare function Prompts({ terminal, logger, config }: TServiceParams): Promise<{ /** * Force a user interaction before continuing * * Good for giving the user time to read a message before a screen clear happens */ acknowledge({ label }?: PromptAcknowledgeOptions): Promise; arrayBuilder(options: ArrayBuilderOptions): Promise; /** * prompt for a true / false value */ boolean({ label: message, current }: PromptBooleanOptions): Promise; /** * similar to boolean, but different format for the question to the user */ confirm({ label, current, }?: PromptConfirmOptions): Promise; /** * Retrieve a single date from the user. * * Can be used to retrieve date range also */ date({ current, label, ...options }?: DateEditorEditorOptions): Promise; /** * Retrieve date range from user */ dateRange({ current, label, ...options }?: DateEditorEditorOptions): Promise<{ from: Date; to: Date; }>; external({ text, trim, ...options }: ExternalEditorOptions): string; /** * Menus, keyboard shortcuts, and general purpose tool * * Use the `.cancel` method attached to the promise to close the menu without user interaction */ menu(options: MenuComponentOptions): Promise; /** * Retrieve a number value */ number(options?: NumberEditorRenderOptions): Promise; /** * Build a single object inside a table */ objectBuilder(options: ObjectBuilderOptions): Promise; /** * Take in a string value, hiding the individual characters from the screen */ password({ label, current }: PromptPasswordOptions): Promise; /** * Pick many values from a list of options */ pickMany(options: PickManyComponentOptions): Promise; /** * Pick a single item out of a list */ pickOne({ options, current, headerMessage, }: PromptPickOneOptions): Promise; /** * Plain string value */ string(options?: StringEditorRenderOptions): Promise; /** * Retrieve a date object that is used to show time. * * Day value will be for today */ time({ label, current, }?: PromptTimeOptions): Promise; typeFilterMenu: (options: TypeFilterMenuOptions) => Promise; }>; export {};