add changes

This commit is contained in:
AD2025
2025-11-13 23:15:11 +02:00
parent 9746cfbc79
commit 41565aec12
88 changed files with 18629 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
/**
* User Interface
* Represents a registered user in the system
*/
export interface User {
id: string;
username: string;
email: string;
role: 'user' | 'admin';
isActive: boolean;
totalQuizzesTaken?: number;
totalQuestionsAnswered?: number;
totalCorrectAnswers?: number;
currentStreak?: number;
longestStreak?: number;
averageScore?: number;
createdAt: string;
updatedAt: string;
}
/**
* User Registration Request
*/
export interface UserRegistration {
username: string;
email: string;
password: string;
guestSessionId?: string;
}
/**
* User Login Request
*/
export interface UserLogin {
email: string;
password: string;
}
/**
* Auth Response
*/
export interface AuthResponse {
success: boolean;
token: string;
user: User;
message?: string;
migratedStats?: {
quizzesTaken: number;
score: number;
};
}
/**
* Auth State (for signal management)
*/
export interface AuthState {
user: User | null;
isAuthenticated: boolean;
isLoading: boolean;
error: string | null;
}