import { BaseResponse, SuccessResponse } from './base'; import { IsBase32, IsJWT, IsNotEmpty } from 'class-validator'; export type TfaRequiredResponse = SuccessResponse; export type RemoveTfaResponse = SuccessResponse; export type RequestEmailTfaResponse = SuccessResponse; export type TfaCompletedResponse = SuccessResponse; export type SignupResponse = SuccessResponse; export type RefreshResponse = LoginResponse; export class LoginResponse extends BaseResponse { statusCode: 200; @IsNotEmpty() @IsJWT() jwt: string; } export class RequestTotpTfaResponse extends BaseResponse { statusCode: 200; @IsNotEmpty() qrCode: string; @IsNotEmpty() @IsBase32() secret: string; }