/** * a Conversations message */ export interface ConversationsMessage { /** ID of the agent on whose behalf the message was sent (only in messages sent by an agent). */ agentId?: string | undefined; /** Agent’s name as displayed to the visitor. Only in the messages sent by an agent. */ agentName?: string | undefined; /** Only set if the agent has uploaded a profile picture. */ agentUserpic?: string | undefined; /** An array of file attachments. */ attachments?: ConversationsMessage.Attachments.Item[] | undefined; /** An array containing details of the blind carbon copy (BCC) recipients (applicable only to messages in email threads). */ bcc?: ConversationsMessage.Bcc.Item[] | undefined; /** An array containing details of the carbon copy (CC) recipients (applicable only to messages in email threads). */ cc?: ConversationsMessage.Cc.Item[] | undefined; /** Timestamp in milliseconds. */ createdAt?: number | undefined; file?: ConversationsMessage.File_ | undefined; /** Status of the message forwarding to the source. */ forwardedToSourceStatus?: ConversationsMessage.ForwardedToSourceStatus | undefined; /** An object containing details about the email sender (applicable only to messages in email threads). */ from?: ConversationsMessage.From | undefined; /** The HTML content of the message. */ html?: string | undefined; /** Message ID. It can be used for further manipulations with the message. */ id?: string | undefined; /** Integration details. */ integrations?: Record | undefined; /** `true` for automated messages generated by an AI bot. */ isBot?: boolean | undefined; /** `true` for missed and offline messages. */ isMissed?: boolean | undefined; /** `true` for unread agent’s messages in finished chats. */ isMissedByVisitor?: boolean | undefined; /** `true` for pushed messages */ isPushed?: boolean | undefined; /** `true` for automatic messages from “Targeted chats & triggers” and API (https://developers.brevo.com/docs/javascript-api-reference#sendautomessage) */ isTrigger?: boolean | undefined; /** Unescaped HTML content of the message (may include unsafe HTML). */ rawUnsafeHtml?: string | undefined; /** In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop. */ receivedFrom?: string | undefined; /** An object containing details of the reply-to email address (applicable only to messages in email threads). */ replyTo?: ConversationsMessage.ReplyTo | undefined; /** The ID of the message assigned by the integration source. */ sourceMessageId?: string | undefined; /** The subject line of the email message (only for messages sent to email threads). */ subject?: string | undefined; /** Message text or name of the attached file */ text?: string | undefined; /** An array containing details of the recipients (applicable only to messages in email threads). */ to?: ConversationsMessage.To.Item[] | undefined; /** `"agent"` for agents’ messages, `"visitor"` for visitors’ messages. */ type?: ConversationsMessage.Type | undefined; /** ‘`true` if the message was sent via JavaScript API.’ */ isSentViaJsApi?: boolean | undefined; /** The type of message content (e.g. for integration-specific message types). */ messageType?: string | undefined; /** ‘`true` if the message is a forwarded message.’ */ isForward?: boolean | undefined; /** Source information for the message. */ source?: Record | undefined; /** visitor’s ID */ visitorId?: string | undefined; } export declare namespace ConversationsMessage { type Attachments = Attachments.Item[]; namespace Attachments { interface Item { /** The name of the file. */ name?: string | undefined; /** The URL of the file. */ link?: string | undefined; /** The MIME type of the file. */ mimeType?: string | undefined; /** `true` for images. */ isImage?: boolean | undefined; /** `true` for sticker files. */ isSticker?: boolean | undefined; /** `true` for inline files. */ isInline?: boolean | undefined; /** The ID of the inline file. */ inlineId?: string | undefined; /** The size of the file in bytes. */ size?: number | undefined; /** Image information (only present for image files). */ imageInfo?: Item.ImageInfo | undefined; /** Whether the file extension is allowed for download. */ isAllowedFileType?: boolean | undefined; } namespace Item { /** * Image information (only present for image files). */ interface ImageInfo { /** Width of the image in pixels. */ width?: number | undefined; /** Height of the image in pixels. */ height?: number | undefined; /** URL of the image preview. */ previewLink?: string | undefined; } } } type Bcc = Bcc.Item[]; namespace Bcc { interface Item { email?: string | undefined; name?: string | undefined; } } type Cc = Cc.Item[]; namespace Cc { interface Item { email?: string | undefined; name?: string | undefined; } } interface File_ { /** Name of the file. */ name?: string | undefined; /** URL of the file. */ link?: string | undefined; /** MIME type of the file. */ mimeType?: string | undefined; /** Whether the file is an image. */ isImage?: boolean | undefined; /** Whether the file is a sticker. */ isSticker?: boolean | undefined; /** Whether the file is inline. */ isInline?: boolean | undefined; /** The ID of the inline file. */ inlineId?: string | undefined; /** Size in bytes. */ size?: number | undefined; /** Image info, present when the file is an image. */ imageInfo?: File_.ImageInfo | undefined; /** Whether the file extension is allowed for download. */ isAllowedFileType?: boolean | undefined; } namespace File_ { /** * Image info, present when the file is an image. */ interface ImageInfo { /** Width of the image in pixels. */ width?: number | undefined; /** Height of the image in pixels. */ height?: number | undefined; /** URL of the image preview. */ previewLink?: string | undefined; } } /** * Status of the message forwarding to the source. */ interface ForwardedToSourceStatus { error?: string | undefined; isSuccess?: boolean | undefined; } /** * An object containing details about the email sender (applicable only to messages in email threads). */ interface From { email?: string | undefined; name?: string | undefined; } /** * An object containing details of the reply-to email address (applicable only to messages in email threads). */ interface ReplyTo { email?: string | undefined; name?: string | undefined; } type To = To.Item[]; namespace To { interface Item { email?: string | undefined; name?: string | undefined; } } /** `"agent"` for agents’ messages, `"visitor"` for visitors’ messages. */ const Type: { readonly Agent: "agent"; readonly Visitor: "visitor"; }; type Type = (typeof Type)[keyof typeof Type]; }