re-vibecode

This commit is contained in:
Debian
2026-03-30 13:57:39 +00:00
parent 09d76c044b
commit bb8497d33d
29 changed files with 1040 additions and 1622 deletions
+54 -51
View File
@@ -1,60 +1,63 @@
export type UserRole = "admin" | "user";
export interface SessionUser {
email: string;
displayName: string;
role: UserRole;
avatarUrl: string | null;
totpEnabled: boolean;
}
export interface SessionView {
export type AdminSession = {
authenticated: boolean;
csrfToken: string | null;
user: SessionUser | null;
}
adminEmail: string | null;
};
export interface ForwardingRule {
enabled: boolean;
target: string | null;
allowedDomains: string[];
}
export type SessionResponse = {
session: AdminSession;
};
export interface ProfileSettings {
export type MailUser = {
email: string;
displayName: string;
role: UserRole;
avatarUrl: string | null;
totpEnabled: boolean;
}
localPart: string;
domain: string;
};
export interface MailAttachment {
filename: string;
mimeType: string;
size: number | null;
}
export type UsersResponse = {
items: MailUser[];
};
export interface MailMessageSummary {
id: string;
from: string;
subject: string;
preview: string;
receivedAt: string;
hasHtml: boolean;
}
export type CreateUserRequest = {
email: string;
};
export interface MailMessageDetail extends MailMessageSummary {
to: string[];
textBody: string;
safeHtml: string | null;
attachments: MailAttachment[];
}
export type CreateUserResponse = {
user: MailUser;
resetLinkSent: boolean;
resetLinkExpiresAt: string | null;
warning: string | null;
};
export interface LoginResponse {
session: SessionView;
}
export type UpdateUserPasswordRequest = {
password: string;
};
export type LoginRequest = {
email: string;
password: string;
};
export type PasswordResetTriggerResponse = {
expiresAt: string;
};
export type PasswordResetInspectRequest = {
token: string;
};
export type PasswordResetInspectResponse = {
emailHint: string;
expiresAt: string;
};
export type PasswordResetConsumeRequest = {
token: string;
password: string;
};
export type ApiErrorBody = {
error: {
message: string;
};
};
export interface TotpSetupResponse {
secret: string;
otpauthUrl: string;
}