import type { Digit, OmitX } from "@agyemanjp/standard"; import type { EntityRecordBase, EntityRecordXtensions } from "./base"; export type UserBaseX = (Omit & EntityRecordXtensions); /** Basic user type; can be extended for more specificity */ export type UserBase = { authIdType: A; authId: string; accessLevel: L; pwdHash: string; pwdSalt: string; /** Auth Id verification code hash */ verificationCodeHash?: string; /** Timestamp when (& thus if) auth id was verified. * Unverified users can't access pages requiring verification */ whenAuthIdVerified?: Date; /** For users only, this normally required field is */ versionCreatorUserVId?: number; } & OmitX; export type AuthIdType = "email-address" | "phone-number" | "user-name";