Initial commit: Complete NodeJS-native setup
- Migrated from Python pre-commit to NodeJS-native solution - Reorganized documentation structure - Set up Husky + lint-staged for efficient pre-commit hooks - Fixed Dockerfile healthcheck issue - Added comprehensive documentation index
This commit is contained in:
42
services/auth/auth.types.ts
Normal file
42
services/auth/auth.types.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { User } from '../../types';
|
||||
import { AccountStatus } from './auth.constants';
|
||||
|
||||
export interface RegisterInput {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface LoginInput {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
user: User;
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
}
|
||||
|
||||
export interface TokenPayload {
|
||||
userId: string;
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface EmailVerificationToken {
|
||||
userId: string;
|
||||
email: string;
|
||||
token: string;
|
||||
expiresAt: Date;
|
||||
}
|
||||
|
||||
export interface RefreshTokenPayload {
|
||||
userId: string;
|
||||
refreshToken: string;
|
||||
}
|
||||
|
||||
export interface AuthenticatedUser extends User {
|
||||
status: AccountStatus;
|
||||
email?: string;
|
||||
emailVerified?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user