import { SuccessResponse } from "./base"; import { ValidateConstructor } from "../utils"; import { IsBoolean, IsNotEmpty, IsString } from "class-validator"; @ValidateConstructor export class UserInfoResponse extends SuccessResponse { constructor(name: string, gitlab: boolean, tfaEnabled: boolean) { super(); this.name = name; this.gitlab = gitlab; this.tfaEnabled = tfaEnabled; } @IsNotEmpty() @IsString() name: string; @IsBoolean() gitlab: boolean; @IsBoolean() tfaEnabled: boolean; } export class DeleteUserResponse extends SuccessResponse {} export class ChangePasswordResponse extends SuccessResponse {} export class LogoutAllResponse extends SuccessResponse {}