import { VoiceName } from '../voice-name'; import { MessagesCommand } from '../svaml-commands/messages-command'; import { StopMessagesCommand } from '../svaml-commands/stop-messages-command'; import { CommandInput } from './command-input'; /** * Optional fields for a one-message `text`, `ssml`, or `play` shortcut. * `name` is written to `messagesName`. */ export interface MessagesShortcutOptions { /** Maps to `messagesName` on the messages command. */ name?: string; /** Commands to run when playback finishes. One command, a list, or a sequence callback. */ onFinish?: CommandInput; } /** * Builds a `messages` command. * `text` is plain text. Use `ssml` for SSML. `text`, `ssml`, and `play` stack message items. */ export declare class MessageCreator { private readonly messages; private nameValue; private onFinishCommands; /** Maps to `messagesName` on the messages command. */ name(name: string): 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; play(url: string): this; onFinish(build: CommandInput): this; build(): MessagesCommand; } /** * Builds one messages command. * `text` is a plain-text shortcut. `ssml` is the SSML shortcut. `play` plays one file. * `start` stacks several messages. `stop` stops a named sequence. */ export declare const Messages: { /** * Plays one or more messages. * `name` is written to `messagesName`. */ start(build: (creator: MessageCreator) => void): MessagesCommand; /** * Shortcut: one plain-text Say message. * `name` is written to `messagesName`. */ text(text: string, voiceName: VoiceName, options?: MessagesShortcutOptions): MessagesCommand; /** * Shortcut: one Say message with `format: 'SSML'`. * `name` is written to `messagesName`. */ ssml(ssml: string, voiceName: VoiceName, options?: MessagesShortcutOptions): MessagesCommand; /** * Shortcut: one play message. * `name` is written to `messagesName`. */ play(url: string, options?: MessagesShortcutOptions): MessagesCommand; /** Stops a message sequence. `name` is written to `messagesName`. */ stop(name: string): StopMessagesCommand; };