export interface MessageCreated { type: "message_created"; /** * 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; fileId?: 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; }[]; disableFreeText?: boolean; type: "choice"; [k: string]: any; } | { text: string; options: { label: string; value: string; [k: string]: any; }[]; disableFreeText?: boolean; type: "dropdown"; [k: string]: any; } | { fileUrl: string; title?: string; fileId?: string; type: "file"; [k: string]: any; } | { imageUrl: string; fileId?: string; type: "image"; [k: string]: any; } | { latitude: number; longitude: number; address?: string; title?: string; type: "location"; [k: string]: any; } | { text: string; value?: string; type: "text"; [k: string]: any; } | { videoUrl: string; fileId?: string; type: "video"; [k: string]: any; } | { items: ({ type: "text"; payload: { text: string; value?: string; [k: string]: any; }; [k: string]: any; } | { type: "markdown"; payload: { markdown: string; [k: string]: any; }; [k: string]: any; } | { type: "image"; payload: { imageUrl: string; fileId?: string; [k: string]: any; }; [k: string]: any; } | { type: "audio"; payload: { audioUrl: string; fileId?: string; [k: string]: any; }; [k: string]: any; } | { type: "video"; payload: { videoUrl: string; fileId?: string; [k: string]: any; }; [k: string]: any; } | { type: "file"; payload: { fileUrl: string; title?: string; fileId?: 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; } | { url: string; name: string; data?: any; type: "custom"; [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; /** * ID of the user who selected this message. Undefined if not selected. */ selectedBy?: string; /** * Feedback of the message */ feedback?: { value: "positive" | "negative"; comment?: string; }; }; }