import { VoiceName } from '../voice-name'; import { InputMethodsEnum, MenuItem } from '../menu-item'; import { MenuPrompt } from '../menu-prompt'; import { GotoMenuCommand } from '../svaml-commands/goto-menu-command'; import { MenuCommand } from '../svaml-commands/menu-command'; import { CommandInput } from './command-input'; /** * Builds a menu prompt from stacked `text`, `ssml`, and `play` messages. * `text` is plain text. Use `ssml` for SSML. */ export declare class PromptCreator { private readonly messages; private bargeIn; allowBargeIn(allowBargeIn: boolean): this; /** Adds a plain-text Say message. */ text(text: string, voiceName: VoiceName): this; /** Adds a Say message with `format: 'SSML'`. */ ssml(ssml: string, voiceName: VoiceName): this; /** Adds a play message. */ play(url: string): this; build(): MenuPrompt; } /** * Builds one menu step used by {@link MenuCreator.item}. */ export declare class MenuItemCreator { private promptValue; private repeatPromptValue; private inputTimeout; private repeatCountValue; private minimumLength; private maximumLength; private terminating; private methods; private readonly matches; private onFailureCommands; prompt(value: MenuPrompt | ((prompt: PromptCreator) => void)): this; repeatPrompt(value: MenuPrompt | ((prompt: PromptCreator) => void)): this; inputTimeoutDurationSeconds(seconds: number): this; repeatCount(count: number): this; minimumInputLength(length: number): this; maximumInputLength(length: number): this; terminatingSequence(sequence: string): this; inputMethods(inputMethods: InputMethodsEnum[]): this; /** Stacks commands for one match expression. Calling again with the same expression appends. */ match(expression: string, build: CommandInput): this; /** Maps to `onFailure` on the menu item. */ onFailure(build: CommandInput): this; build(): MenuItem; } /** * Builds a `menu` command. */ export declare class MenuCreator { private start; private readonly items; /** Maps to `startMenu` on the menu command. */ name(name: string): this; /** Adds a menu item, from a callback or a prebuilt {@link Menu.item}. */ item(name: string, value: MenuItem | ((item: MenuItemCreator) => void)): this; build(): MenuCommand; } /** * Builds one menu command, a menu prompt, a menu item, or a `gotoMenu` command. */ export declare const Menu: { /** * Builds one `menu` command. * `name` is written to `startMenu`. The callback adds the menu items. */ create(build: (creator: MenuCreator) => void): MenuCommand; /** * Builds a menu prompt from stacked `text`, `ssml`, and `play` messages. * `text` is plain text. */ prompt(build: (creator: PromptCreator) => void): MenuPrompt; /** * Builds a menu item that can be reused across menus with {@link MenuCreator.item}. */ item(build: (creator: MenuItemCreator) => void): MenuItem; /** * Switches to another item of the menu that contains this command. * `name` is written to `menuName`. */ goto(name: string): GotoMenuCommand; };