65 lines
1.2 KiB
TypeScript
65 lines
1.2 KiB
TypeScript
export interface EmailCredentials {
|
|
id: string;
|
|
userId: string;
|
|
email: string;
|
|
password: string;
|
|
host: string;
|
|
port: number;
|
|
secure: boolean;
|
|
smtp_host: string | null;
|
|
smtp_port: number | null;
|
|
smtp_secure: boolean | null;
|
|
display_name: string | null;
|
|
color: string | null;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export interface EmailAddress {
|
|
name: string;
|
|
address: string;
|
|
}
|
|
|
|
export interface EmailAttachment {
|
|
contentId?: string;
|
|
filename: string;
|
|
contentType: string;
|
|
size: number;
|
|
path?: string;
|
|
content?: string;
|
|
}
|
|
|
|
export interface EmailMessage {
|
|
id: string;
|
|
messageId?: string;
|
|
subject: string;
|
|
from: EmailAddress[];
|
|
to: EmailAddress[];
|
|
cc?: EmailAddress[];
|
|
bcc?: EmailAddress[];
|
|
date: Date;
|
|
flags: {
|
|
seen: boolean;
|
|
flagged: boolean;
|
|
answered: boolean;
|
|
deleted: boolean;
|
|
draft: boolean;
|
|
};
|
|
preview?: string;
|
|
content?: string;
|
|
html?: string;
|
|
text?: string;
|
|
hasAttachments: boolean;
|
|
attachments?: EmailAttachment[];
|
|
folder: string;
|
|
size?: number;
|
|
contentFetched: boolean;
|
|
}
|
|
|
|
export interface Account {
|
|
id: number | string;
|
|
name: string;
|
|
email: string;
|
|
color: string;
|
|
folders?: string[];
|
|
}
|