@viewdo/dxp-story-cli
Version:
DXP Story Management CLI
22 lines (21 loc) • 1 kB
TypeScript
import { ConsoleService } from './ConsoleService';
export declare class PromptService {
console: ConsoleService;
private prefix;
private prompter;
constructor(console: ConsoleService);
validateEmail(email: any): boolean;
validateFolder(folder: string): boolean;
validateKey(key: string): boolean;
validateCode(code: string): boolean;
validateNotEmpty(value: string): boolean;
validateAny(value: string): boolean;
askIf(question: string, default_value?: any): any;
askFor(message: string, default_value?: string, validate?: (value: string) => boolean, type?: string, required?: boolean): any;
askWhich(question: string, options: Array<string | number | {
name: string;
value: any;
}>, preselect?: string, allowNew?: boolean): Promise<any>;
askSensitive(question: string): Promise<any>;
selectFromKeys(model: string, configured_keys: Array<string>, action_name: string, allow_new?: boolean, all?: boolean): Promise<any[]>;
}