Files
tabungin/apps/api/dist/otp/otp.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

68 lines
2.0 KiB
TypeScript
Executable File

import { PrismaService } from '../prisma/prisma.service';
export declare class OtpService {
private prisma;
private emailOtpStore;
private whatsappOtpStore;
constructor(prisma: PrismaService);
sendEmailOtp(userId: string): Promise<{
success: boolean;
message: string;
}>;
verifyEmailOtpForLogin(userId: string, code: string): boolean;
verifyEmailOtp(userId: string, code: string): Promise<{
success: boolean;
message: string;
}>;
disableEmailOtp(userId: string): Promise<{
success: boolean;
message: string;
}>;
setupTotp(userId: string): Promise<{
secret: string;
qrCode: string;
}>;
verifyTotp(userId: string, code: string): Promise<{
success: boolean;
message: string;
}>;
disableTotp(userId: string): Promise<{
success: boolean;
message: string;
}>;
getStatus(userId: string): Promise<{
emailEnabled: boolean;
whatsappEnabled: boolean;
totpEnabled: boolean;
phone?: undefined;
totpSecret?: undefined;
} | {
phone: string | null;
emailEnabled: boolean;
whatsappEnabled: boolean;
totpEnabled: boolean;
totpSecret: string | null;
}>;
verifyOtpGate(userId: string, code: string, method: 'email' | 'totp'): Promise<boolean>;
private generateOtpCode;
private sendOtpViaWebhook;
sendWhatsappOtp(userId: string, mode?: 'test' | 'live'): Promise<{
success: boolean;
message: string;
}>;
verifyWhatsappOtp(userId: string, code: string): Promise<{
success: boolean;
message: string;
}>;
verifyWhatsappOtpForLogin(userId: string, code: string): boolean;
disableWhatsappOtp(userId: string): Promise<{
success: boolean;
message: string;
}>;
checkWhatsappNumber(phone: string): Promise<{
success: boolean;
isRegistered: boolean;
message: string;
}>;
private sendWhatsappOtpViaWebhook;
}