21 lines
601 B
TypeScript
21 lines
601 B
TypeScript
|
|
import { ApiProperty } from "@nestjs/swagger";
|
||
|
|
import { IsEmail } from "class-validator";
|
||
|
|
|
||
|
|
export class AccountStatusRequestDto {
|
||
|
|
@ApiProperty({ example: "user@example.com" })
|
||
|
|
@IsEmail()
|
||
|
|
email!: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export type AccountState = "none" | "portal_only" | "whmcs_only" | "both_mapped";
|
||
|
|
export type RecommendedAction = "sign_up" | "sign_in" | "link_account" | "set_password";
|
||
|
|
|
||
|
|
export interface AccountStatusResponseDto {
|
||
|
|
state: AccountState;
|
||
|
|
portalUserExists: boolean;
|
||
|
|
whmcsClientExists: boolean;
|
||
|
|
mapped: boolean;
|
||
|
|
needsPasswordSet?: boolean;
|
||
|
|
recommendedAction: RecommendedAction;
|
||
|
|
}
|