import { ApplicationAttachment } from './attachmentTypesV2'; import { ApplicationMessageId } from './idTypesV2'; import { ApplicationPaginatedResults } from './paginationTypesV2'; import { ApplicationRecipient } from './recipientTypesV2'; export type ApplicationMessageStatus = 'inbound' | 'outbound'; export interface ApplicationMessage extends ApplicationMessageRecipients { /** Unique ID of the message. */ id: ApplicationMessageId; /** Subject of the message. */ subject: string | undefined; /** Date at which the message has been sent or received. Can be undefined if the message is a draft. */ date: Date; /** Status of the message. */ status: ApplicationMessageStatus; /** Content properties of the message. Will be undefined if the content is not available. */ content: ApplicationMessageContent | undefined; } export interface ApplicationMessageRecipients { /** Recipient the message is coming from. */ from: ApplicationRecipient; /** Recipient to use to reply to this message. */ replyTo: ApplicationRecipient | undefined; /** List of recipients the message is addressed to. */ to: ReadonlyArray; /** List of recipients in copy of the message. */ cc: ReadonlyArray | undefined; /** List of recipients in blind copy of the message. */ bcc: ReadonlyArray | undefined; } export interface ApplicationMessageContent { /** Content of the message. */ body: string; /** Content type of the body. */ type: 'html' | 'text'; /** List of files attached to the message. */ attachments: ReadonlyArray; } export type ApplicationMessageList = ApplicationPaginatedResults;