This commit is contained in:
Anaïs Saraiva
2026-03-29 18:45:25 +02:00
parent 0f7d692d12
commit afc839d43d
42 changed files with 3809 additions and 58 deletions
+60
View File
@@ -0,0 +1,60 @@
export type UserRole = "admin" | "user";
export interface SessionUser {
email: string;
displayName: string;
role: UserRole;
avatarUrl: string | null;
totpEnabled: boolean;
}
export interface SessionView {
authenticated: boolean;
csrfToken: string | null;
user: SessionUser | null;
}
export interface ForwardingRule {
enabled: boolean;
target: string | null;
allowedDomains: string[];
}
export interface ProfileSettings {
email: string;
displayName: string;
role: UserRole;
avatarUrl: string | null;
totpEnabled: boolean;
}
export interface MailAttachment {
filename: string;
mimeType: string;
size: number | null;
}
export interface MailMessageSummary {
id: string;
from: string;
subject: string;
preview: string;
receivedAt: string;
hasHtml: boolean;
}
export interface MailMessageDetail extends MailMessageSummary {
to: string[];
textBody: string;
safeHtml: string | null;
attachments: MailAttachment[];
}
export interface LoginResponse {
session: SessionView;
}
export interface TotpSetupResponse {
secret: string;
otpauthUrl: string;
}