UNPKG

@botpress/webchat-client

Version:
202 lines (201 loc) 4.66 kB
export type MessageUpdated = { type: 'message_updated' /** * The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user). */ data: { /** * Id of the [Message](#schema_message) */ id: string /** * Creation date of the [Message](#schema_message) in ISO 8601 format */ createdAt: string /** * Payload is the content of the message. */ payload: | { audioUrl: string type: 'audio' [k: string]: any } | { title: string subtitle?: string imageUrl?: string actions: { action: 'postback' | 'url' | 'say' label: string value: string [k: string]: any }[] type: 'card' [k: string]: any } | { items: { title: string subtitle?: string imageUrl?: string actions: { action: 'postback' | 'url' | 'say' label: string value: string [k: string]: any }[] [k: string]: any }[] type: 'carousel' [k: string]: any } | { text: string options: { label: string value: string [k: string]: any }[] type: 'choice' disableFreeText?: boolean [k: string]: any } | { text: string options: { label: string value: string [k: string]: any }[] type: 'dropdown' [k: string]: any } | { fileUrl: string title?: string type: 'file' [k: string]: any } | { imageUrl: string type: 'image' [k: string]: any } | { latitude: number longitude: number address?: string title?: string type: 'location' [k: string]: any } | { text: string type: 'text' value?: string [k: string]: any } | { videoUrl: string type: 'video' [k: string]: any } | { items: ( | { type: 'text' payload: { text: string [k: string]: any } [k: string]: any } | { type: 'markdown' payload: { markdown: string [k: string]: any } [k: string]: any } | { type: 'image' payload: { imageUrl: string [k: string]: any } [k: string]: any } | { type: 'audio' payload: { audioUrl: string [k: string]: any } [k: string]: any } | { type: 'video' payload: { videoUrl: string [k: string]: any } [k: string]: any } | { type: 'file' payload: { fileUrl: string title?: string [k: string]: any } [k: string]: any } | { type: 'location' payload: { latitude: number longitude: number address?: string title?: string [k: string]: any } [k: string]: any } )[] type: 'bloc' [k: string]: any } | { markdown: string type: 'markdown' [k: string]: any } | { type: 'custom' url: string name: string data?: any [k: string]: any } /** * ID of the [User](#schema_user) */ userId: string /** * ID of the [Conversation](#schema_conversation) */ conversationId: string /** * Metadata of the message */ metadata?: { [k: string]: any } /** * ID of the message this message is replying to */ replyTo?: string } }