import { ApplicationDraftAttachment } from './attachmentTypesV2'; import { ApplicationChannel } from './channelTypesV2'; import { ApplicationChannelId, ApplicationDraftId, ApplicationMessageId } from './idTypesV2'; import { ApplicationRecipient } from './recipientTypesV2'; export type ApplicationDraftReplyType = 'forward' | 'reply' | 'replyAll'; export interface ApplicationDraftContent { /** Content of the message. */ body: string; /** Content type of the body. */ type: 'html' | 'text'; } export interface ApplicationDraft { /** Unique ID of the draft. */ id: ApplicationDraftId; /** Channel the draft will be sent from. */ channel: ApplicationChannel; /** List of recipients the message is addressed to. */ to: ReadonlyArray; /** List of recipients in copy of the emssage. */ cc: ReadonlyArray | undefined; /** List of recipients in blind copy of the message. */ bcc: ReadonlyArray | undefined; /** Subject of the message. */ subject: string | undefined; /** Content properties of the draft. */ content: ApplicationDraftContent & { attachments: ReadonlyArray; }; /** Whether the draft is editable */ isEditable: boolean; } interface ApplicationDraftTemplateBase { /** Handles to send the message to. */ to?: ReadonlyArray; /** Handles to add in copy of the message. Supported only for email channels. */ cc?: ReadonlyArray; /** Handles to add in blind copy of the message. Supported only for email channels. */ bcc?: ReadonlyArray; /** Subject of the message. */ subject?: string; } export interface ApplicationDraftTemplate extends ApplicationDraftTemplateBase { /** ID of the channel to use to compose the message. */ channelId?: ApplicationChannelId; /** Option to create a draft from another message. */ replyOptions?: { /** Type of the reply */ type: ApplicationDraftReplyType; /** ID of the message to reply to or forward. */ originalMessageId: ApplicationMessageId; }; /** Content properties of the draft. */ content?: ApplicationDraftContent; /** Attachments to be added to draft */ attachments?: ReadonlyArray; } export interface ApplicationDraftUpdate extends ApplicationDraftTemplateBase { /** Logic to apply the update. */ updateMode: 'insert' | 'replace'; /** Content properties of the draft. */ content?: ApplicationDraftContent; /** Attachments for the draft */ attachments?: ReadonlyArray; } export {};