phase-10.5: market screener ui enhancements
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// ── Auth domain types ─────────────────────────────────────────────────────────
|
||||
|
||||
export type Role = 'trader' | 'viewer' | 'admin';
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
role: Role;
|
||||
createdAt: string;
|
||||
lastLogin: string | null;
|
||||
}
|
||||
|
||||
/** Full user row including password hash — only used internally by UserStore/AuthService. */
|
||||
export interface UserRow {
|
||||
id: string;
|
||||
email: string;
|
||||
password_hash: string;
|
||||
role: Role;
|
||||
created_at: string;
|
||||
last_login: string | null;
|
||||
}
|
||||
|
||||
/** Payload embedded in the JWT. */
|
||||
export interface TokenPayload {
|
||||
sub: string; // user id
|
||||
email: string;
|
||||
role: Role;
|
||||
iat?: number;
|
||||
exp?: number;
|
||||
}
|
||||
|
||||
/** Response body for successful login / register. */
|
||||
export interface AuthResponse {
|
||||
token: string;
|
||||
user: User;
|
||||
}
|
||||
Reference in New Issue
Block a user