2023-06-24 18:17:43 +00:00
|
|
|
export interface UserAccount {
|
2023-07-06 21:52:07 +00:00
|
|
|
_id: string;
|
|
|
|
userId: string;
|
|
|
|
name: UserName;
|
|
|
|
cart: string[];
|
|
|
|
wallet: {
|
|
|
|
currency: string;
|
|
|
|
cash: number;
|
|
|
|
purchasesAmount: number;
|
|
|
|
spent: number;
|
|
|
|
money: number;
|
|
|
|
};
|
|
|
|
status: "no";
|
|
|
|
isDeleted: false;
|
|
|
|
/** ISO string */
|
|
|
|
createdAt: string;
|
|
|
|
/** ISO string */
|
|
|
|
updatedAt: string;
|
|
|
|
/** ISO string */
|
|
|
|
deletedAt: string;
|
2023-06-24 18:17:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserName {
|
2023-07-06 21:52:07 +00:00
|
|
|
firstname: string;
|
|
|
|
secondname: string;
|
|
|
|
middlename: string;
|
|
|
|
orgname: string;
|
2023-06-24 18:17:43 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 21:52:07 +00:00
|
|
|
export enum VerificationStatus {
|
|
|
|
VERIFICATED = "verificated",
|
|
|
|
NOT_VERIFICATED = "notVerificated",
|
|
|
|
WAITING = "waiting",
|
|
|
|
}
|
2023-06-24 18:17:43 +00:00
|
|
|
|
2023-07-06 21:52:07 +00:00
|
|
|
export type UserAccountSettingsFieldStatus = Record<
|
|
|
|
keyof UserName,
|
|
|
|
{
|
2023-06-24 18:17:43 +00:00
|
|
|
value: string;
|
|
|
|
error: string | null;
|
|
|
|
touched: boolean;
|
2023-07-06 21:52:07 +00:00
|
|
|
}
|
|
|
|
>;
|