AdminDashboard: - Replace all gray colors with theme variables - Indonesian text: 'Selamat datang', 'Kelola Plans', etc. - Loading: 'Memuat...' AdminPlans: - bg-card, text-foreground, border-border - text-muted-foreground for secondary text - bg-muted for sections - text-primary for links/icons - text-destructive for delete - Indonesian: 'Kelola Plans', 'Tambah Plan', 'Tidak ada plan' AdminUsers: - Same theme color replacements - Indonesian: 'Kelola Users', 'Tidak ada user' - bg-primary for avatars - Consistent hover states All pages now: ✅ Respect light/dark mode ✅ Use @theme colors from index.css ✅ Indonesian text (keeping English tech terms) ✅ Consistent with member layout styling
88 lines
2.2 KiB
TypeScript
88 lines
2.2 KiB
TypeScript
import { AuthService } from './auth.service';
|
|
import type { Response } from 'express';
|
|
interface RequestWithUser {
|
|
user: {
|
|
userId: string;
|
|
email: string;
|
|
};
|
|
}
|
|
export declare class AuthController {
|
|
private authService;
|
|
constructor(authService: AuthService);
|
|
register(body: {
|
|
email: string;
|
|
password: string;
|
|
name?: string;
|
|
}): Promise<{
|
|
user: {
|
|
id: string;
|
|
email: string;
|
|
name: string | null;
|
|
avatarUrl: string | null;
|
|
emailVerified: boolean;
|
|
role: string;
|
|
};
|
|
token: string;
|
|
}>;
|
|
login(body: {
|
|
email: string;
|
|
password: string;
|
|
}): Promise<{
|
|
requiresOtp: boolean;
|
|
availableMethods: {
|
|
email: boolean;
|
|
whatsapp: boolean;
|
|
totp: boolean;
|
|
};
|
|
tempToken: string;
|
|
user?: undefined;
|
|
token?: undefined;
|
|
} | {
|
|
user: {
|
|
id: string;
|
|
email: string;
|
|
name: string | null;
|
|
avatarUrl: string | null;
|
|
emailVerified: boolean;
|
|
role: string;
|
|
};
|
|
token: string;
|
|
requiresOtp?: undefined;
|
|
availableMethods?: undefined;
|
|
tempToken?: undefined;
|
|
}>;
|
|
verifyOtp(body: {
|
|
tempToken: string;
|
|
otpCode: string;
|
|
method: 'email' | 'totp';
|
|
}): Promise<{
|
|
user: {
|
|
id: string;
|
|
email: string;
|
|
name: string | null;
|
|
avatarUrl: string | null;
|
|
emailVerified: boolean;
|
|
role: string;
|
|
};
|
|
token: string;
|
|
}>;
|
|
googleAuth(): Promise<void>;
|
|
googleAuthCallback(req: any, res: Response): Promise<void>;
|
|
getProfile(req: RequestWithUser): Promise<{
|
|
id: string;
|
|
email: string;
|
|
emailVerified: boolean;
|
|
name: string | null;
|
|
avatarUrl: string | null;
|
|
role: string;
|
|
}>;
|
|
changePassword(req: RequestWithUser, body: {
|
|
currentPassword: string;
|
|
newPassword: string;
|
|
isSettingPassword?: boolean;
|
|
}): Promise<{
|
|
message: string;
|
|
}>;
|
|
}
|
|
export {};
|