- 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
93 lines
2.4 KiB
TypeScript
Executable File
93 lines
2.4 KiB
TypeScript
Executable File
import { JwtService } from '@nestjs/jwt';
|
|
import { OtpService } from './otp.service';
|
|
export declare const IS_PUBLIC_KEY = "isPublic";
|
|
export declare const Public: () => import("@nestjs/common").CustomDecorator<string>;
|
|
interface RequestWithUser extends Request {
|
|
user: {
|
|
userId: string;
|
|
email: string;
|
|
};
|
|
}
|
|
export declare class OtpController {
|
|
private readonly otpService;
|
|
private readonly jwtService;
|
|
constructor(otpService: OtpService, jwtService: JwtService);
|
|
getStatus(req: RequestWithUser): Promise<{
|
|
emailEnabled: boolean;
|
|
whatsappEnabled: boolean;
|
|
totpEnabled: boolean;
|
|
phone?: undefined;
|
|
totpSecret?: undefined;
|
|
} | {
|
|
phone: string | null;
|
|
emailEnabled: boolean;
|
|
whatsappEnabled: boolean;
|
|
totpEnabled: boolean;
|
|
totpSecret: string | null;
|
|
}>;
|
|
sendEmailOtp(req: RequestWithUser): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
verifyEmailOtp(req: RequestWithUser, body: {
|
|
code: string;
|
|
}): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
disableEmailOtp(req: RequestWithUser): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
setupTotp(req: RequestWithUser): Promise<{
|
|
secret: string;
|
|
qrCode: string;
|
|
}>;
|
|
verifyTotp(req: RequestWithUser, body: {
|
|
code: string;
|
|
}): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
disableTotp(req: RequestWithUser): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
sendWhatsappOtp(req: RequestWithUser, body: {
|
|
mode?: 'test' | 'live';
|
|
}): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
verifyWhatsappOtp(req: RequestWithUser, body: {
|
|
code: string;
|
|
}): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
disableWhatsappOtp(req: RequestWithUser): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
checkWhatsappNumber(body: {
|
|
phone: string;
|
|
}): Promise<{
|
|
success: boolean;
|
|
isRegistered: boolean;
|
|
message: string;
|
|
}>;
|
|
resendEmailOtp(body: {
|
|
tempToken: string;
|
|
}): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
resendWhatsappOtp(body: {
|
|
tempToken: string;
|
|
}): Promise<{
|
|
success: boolean;
|
|
message: string;
|
|
}>;
|
|
}
|
|
export {};
|