2022-08-25 12:16:29 +00:00
|
|
|
import { SuccessResponse } from './base';
|
2022-08-25 11:39:58 +00:00
|
|
|
import { IsBase32, IsJWT, IsNotEmpty } from 'class-validator';
|
2022-08-24 14:15:33 +00:00
|
|
|
|
|
|
|
export type TfaRequiredResponse = SuccessResponse;
|
|
|
|
export type RemoveTfaResponse = SuccessResponse;
|
|
|
|
export type RequestEmailTfaResponse = SuccessResponse;
|
|
|
|
export type TfaCompletedResponse = SuccessResponse;
|
|
|
|
export type SignupResponse = SuccessResponse;
|
|
|
|
export type RefreshResponse = LoginResponse;
|
|
|
|
|
2022-08-25 12:16:29 +00:00
|
|
|
export class LoginResponse extends SuccessResponse {
|
2022-08-25 11:39:58 +00:00
|
|
|
@IsNotEmpty()
|
|
|
|
@IsJWT()
|
2022-08-24 14:15:33 +00:00
|
|
|
jwt: string;
|
|
|
|
}
|
|
|
|
|
2022-08-25 12:16:29 +00:00
|
|
|
export class RequestTotpTfaResponse extends SuccessResponse {
|
2022-08-25 11:39:58 +00:00
|
|
|
@IsNotEmpty()
|
2022-08-24 14:15:33 +00:00
|
|
|
qrCode: string;
|
2022-08-25 11:39:58 +00:00
|
|
|
|
|
|
|
@IsNotEmpty()
|
|
|
|
@IsBase32()
|
2022-08-24 14:15:33 +00:00
|
|
|
secret: string;
|
|
|
|
}
|