recoder-code
Version:
Complete AI-powered development platform with ML model training, plugin registry, real-time collaboration, monitoring, infrastructure automation, and enterprise deployment capabilities
44 lines (43 loc) • 1.4 kB
TypeScript
/**
* User Service for managing user operations
*/
import { User } from '../entities/User';
export declare class UserService {
private userRepository;
findById(id: string): Promise<User | null>;
findByUsername(username: string): Promise<User | null>;
findByEmail(email: string): Promise<User | null>;
create(userData: Partial<User>): Promise<User>;
update(id: string, updates: Partial<User>): Promise<User | null>;
validatePassword(user: User, password: string): Promise<boolean>;
hashPassword(password: string): Promise<string>;
authenticate(email: string, password: string): Promise<{
success: boolean;
user?: User;
}>;
updateUser(id: string, updates: Partial<User>): Promise<{
success: boolean;
user?: User;
error?: string;
}>;
verifyEmail(token: string): Promise<{
success: boolean;
user?: User;
error?: string;
}>;
requestPasswordReset(email: string): Promise<{
success: boolean;
error?: string;
}>;
resetPassword(token: string, newPassword: string): Promise<{
success: boolean;
user?: User;
error?: string;
}>;
getUserPackages(userId: string): Promise<any[]>;
getUserStats(userId: string): Promise<any>;
deleteUser(userId: string): Promise<{
success: boolean;
error?: string;
}>;
}