import { MessageType } from './constants'; import { StringifiedEnum } from '../../types/util'; import { ResponseExtension } from '../../dtos/Extension.dto'; import { CardProps } from '../Card/types'; import { Text, Trace } from '@voiceflow/base-types'; export interface BaseMessageProps { delay?: number | undefined; ai?: boolean; } export interface TextMessageProps extends BaseMessageProps { type: StringifiedEnum; text: string | Text.SlateTextValue; stream?: TransformStream | null; streamEnded?: boolean | null; audio?: { src: string; }; } export interface ImageMessageProps extends BaseMessageProps { type: StringifiedEnum; url: string | null; } export interface CardMessageProps extends CardProps, BaseMessageProps { type: StringifiedEnum; } export interface CarouselMessageProps extends BaseMessageProps { type: StringifiedEnum; cards: CardProps[]; } export interface EndMessage extends BaseMessageProps { type: StringifiedEnum; } export interface ExtensionMessage extends BaseMessageProps { type: StringifiedEnum; payload: { trace: Trace.AnyTrace; extension: ResponseExtension; }; } export interface CustomMessage extends BaseMessageProps { type: `custom_${string}`; payload: any; } export type MessageProps = TextMessageProps | ImageMessageProps | CardMessageProps | CarouselMessageProps | EndMessage | ExtensionMessage | CustomMessage; //# sourceMappingURL=types.d.ts.map