1 import type { ATTACHMENT_DISPOSITION } from '@proton/shared/lib/mail/constants';
3 import type { MIME_TYPES } from '../../constants';
4 import type { Recipient } from '../Address';
6 export interface AttachmentInfo {
11 // Attachment metadata that we get in the element list
12 export interface AttachmentsMetadata {
14 Disposition: ATTACHMENT_DISPOSITION;
20 export interface AttachmentFullMetadata {
25 Disposition: ATTACHMENT_DISPOSITION;
29 EncSignature?: string;
32 ConversationID: string;
33 IsAutoForwardee: boolean;
36 export interface Attachment {
44 Headers?: { [key: string]: string };
51 export interface UnsubscribeMethods {
58 OneClick?: 'OneClick';
61 export interface MessageMetadata {
64 ConversationID: string;
67 /** @deprecated use Flags instead */
69 /** @deprecated use Sender.Address instead */
70 SenderAddress?: string;
71 /** @deprecated use Sender.Name instead */
79 /** @deprecated use Flags instead */
81 ExpirationTime?: number;
88 NumAttachments: number;
90 AttachmentInfo?: { [key in MIME_TYPES]?: AttachmentInfo };
91 AttachmentsMetadata?: AttachmentsMetadata[];
93 DisplaySnoozedReminder: boolean;
96 export interface Message extends MessageMetadata {
99 ParsedHeaders: { [key: string]: string | string[] | undefined };
100 Attachments: Attachment[];
101 MIMEType: MIME_TYPES;
103 ReplyTos: Recipient[];
104 UnsubscribeMethods?: UnsubscribeMethods;
106 PasswordHint?: string;
107 RightToLeft?: number;
108 EORecipient?: Recipient;
111 export type DraftMessage = Pick<
113 'Subject' | 'Unread' | 'Sender' | 'ToList' | 'CCList' | 'BCCList' | 'ExternalID' | 'Flags' | 'Body' | 'MIMEType'
116 interface TaskRunning {
121 export interface GetMessageResponse {
128 export interface QueryMessageMetadataResponse {
131 Messages: MessageMetadata[];
132 TasksRunning: TaskRunning[];
135 export interface MarkAsBrokenResponse {