import { VoiceName } from '../voice-name'; import { MenuPrompt } from '../menu-prompt'; import { SvamlCommand } from '../svaml-commands'; import { AmdCreator } from './amd'; import { DialCreator, HangupParameters } from './calls'; import { MenuCreator, PromptCreator } from './menu'; import { MessageCreator, MessagesShortcutOptions } from './messages'; import { RecordingCreator } from './recording'; import { WebhookCreator } from './webhook'; /** * Commands sequence creator. * * Command helpers that return one command live beside this class: * {@link Amd}, {@link Calls}, {@link Menu}, {@link Messages}, {@link Recording}, and {@link Webhook}. * * Helper names on the sequence follow the SVAML sequence creator: `amd`, `answer`, `bridgeCall`, * `webhook`, `dial`, `hangup`, `menu`, `gotoMenu`, `messages`, `stopMessages`, * `play`, `pause`, `prompt`, `recording`, `stopRecording`, `text`, and `command`. * * Each command helper appends to the sequence and returns it. * `prompt` returns a {@link MenuPrompt} and does not append a command. * `text` is a plain-text shortcut. Use `messages` with `ssml` for SSML. */ export declare class CommandsSequenceCreator { private readonly commands; constructor(); amd(amdCreator: (creator: AmdCreator) => void): this; /** Appends an `answer` command. */ answer(): this; /** Appends a `bridgeCall` command. `name` is written to `bridgeName`. */ bridgeCall(name: string): this; /** Appends a `webhook` command. */ webhook(webhookCreator: (creator: WebhookCreator) => void): this; dial(dialCreator: (creator: DialCreator) => void): this; /** Appends a `hangup` command. */ hangup(parameters?: HangupParameters): this; menu(menuCreator: (creator: MenuCreator) => void): this; /** * Appends a `gotoMenu` command. `name` is written to `menuName`. * The target must be an item of the menu that contains this command. */ gotoMenu(name: string): this; messages(messageCreator: (creator: MessageCreator) => void): this; /** Appends a `stopMessages` command. `name` is written to `messagesName`. */ stopMessages(name: string): this; /** * Shortcut: appends a `messages` command with one play message. * `url` is required by the play message. */ play(url: string, options?: MessagesShortcutOptions): this; /** Appends a `pause` command. `durationMilliseconds` is required by the command. */ pause(durationMilliseconds: number): this; /** * Returns a menu prompt. This does not append a command. * Pass the result to a menu item, or build the prompt on the item directly. * `text` on the prompt is plain text. */ prompt(promptCreator: (creator: PromptCreator) => void): MenuPrompt; recording(recordingCreator: (creator: RecordingCreator) => void): this; /** Appends a `stopRecording` command. `name` is written to `recordingName`. */ stopRecording(name: string): this; /** * Shortcut: appends a `messages` command with one plain-text Say message. * SSML belongs on `messages` via `ssml`, not on this shortcut. */ text(text: string, voiceName: VoiceName, options?: MessagesShortcutOptions): this; /** Appends an existing command instance. */ command(command: SvamlCommand): this; build(): SvamlCommand[]; }