UNPKG

@ably/cli

Version:

Ably CLI for Pub/Sub, Chat and Spaces

30 lines (29 loc) 989 B
import type { ConfigManager, AccountConfig } from "./config-manager.js"; import type { App, ControlApi, Key } from "./control-api.js"; export interface InteractiveHelperOptions { logErrors?: boolean; } export declare class InteractiveHelper { private configManager; private logErrors; constructor(configManager: ConfigManager, options?: InteractiveHelperOptions); /** * Confirm an action with the user */ confirm(message: string): Promise<boolean>; /** * Interactively select an account from the list of configured accounts */ selectAccount(): Promise<{ account: AccountConfig; alias: string; } | null>; /** * Interactively select an app from the list of available apps */ selectApp(controlApi: ControlApi): Promise<App | null>; /** * Interactively select a key from the list of available keys for an app */ selectKey(controlApi: ControlApi, appId: string): Promise<Key | null>; }