Files
tabungin/apps/api/dist/auth/auth.service.d.ts
Dwindi Ramadhana 6a6e74562c checkpoint: goals feature, wallet balance, and goals/wallet detail UI
- Add goals feature (models, migrations, API, web pages)
- Add reserved/centralized wallet balance service
- Add wallet detail page and overview components
- Add new UI components (progress, multi-select, FAB)
- Remove stray empty -H/-d files from working tree
2026-06-17 20:40:00 +07:00

99 lines
2.8 KiB
TypeScript
Executable File

import { JwtService } from '@nestjs/jwt';
import { PrismaService } from '../prisma/prisma.service';
import { OtpService } from '../otp/otp.service';
export declare class AuthService {
private readonly prisma;
private readonly jwtService;
private readonly otpService;
constructor(prisma: PrismaService, jwtService: JwtService, otpService: OtpService);
register(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(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;
}>;
googleLogin(googleProfile: {
googleId: string;
email: string;
name: string;
avatarUrl?: 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;
}>;
verifyOtpAndLogin(tempToken: string, otpCode: string, method: 'email' | 'whatsapp' | 'totp'): Promise<{
user: {
id: string;
email: string;
name: string | null;
avatarUrl: string | null;
emailVerified: boolean;
role: string;
};
token: string;
}>;
private generateToken;
private generateTempToken;
getUserProfile(userId: string): Promise<{
id: string;
email: string;
name: string | null;
avatarUrl: string | null;
emailVerified: boolean;
role: string;
}>;
changePassword(userId: string, currentPassword: string, newPassword: string, isSettingPassword?: boolean): Promise<{
message: string;
}>;
private downloadAndStoreAvatar;
}