re-vibecode
This commit is contained in:
@@ -10,8 +10,7 @@
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bun-types": "^1.3.11",
|
||||
"bun-types": "^1.3.10",
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true
|
||||
"rootDir": "src",
|
||||
"noEmit": false
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user