feat(auth,privacy,web): step-by-step login, privacy settings persistence, TOTP QR, and API docs
Some checks failed
CI / test (push) Failing after 22s

This commit is contained in:
2026-03-08 12:09:53 +03:00
parent 1546ae7381
commit 79baadb522
19 changed files with 2034 additions and 79 deletions

View File

@@ -33,6 +33,18 @@ export async function revokeAllSessions(): Promise<void> {
await http.delete("/auth/sessions");
}
export interface EmailStatusResponse {
email: string;
registered: boolean;
email_verified: boolean;
twofa_enabled: boolean;
}
export async function checkEmailStatus(email: string): Promise<EmailStatusResponse> {
const { data } = await http.get<EmailStatusResponse>("/auth/check-email", { params: { email } });
return data;
}
export interface TwoFactorSetupResponse {
secret: string;
otpauth_url: string;

View File

@@ -14,6 +14,9 @@ interface UserProfileUpdatePayload {
bio?: string | null;
avatar_url?: string | null;
allow_private_messages?: boolean;
privacy_last_seen?: "everyone" | "contacts" | "nobody";
privacy_avatar?: "everyone" | "contacts" | "nobody";
privacy_group_invites?: "everyone" | "contacts";
}
export async function updateMyProfile(payload: UserProfileUpdatePayload): Promise<AuthUser> {