diff --git a/src/types/index.ts b/src/types/index.ts index 2a52b01..d307918 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -860,3 +860,18 @@ export interface InboxClaimRow { totalLines: number; } | null; } + +// --------------------------------------------------------------------------- +// Auth (admin/user/viewer). Mirrors `users.to_public()` on the backend +// (backend/src/cyclone/auth/users.py). Role is the triple ("admin" | +// "user" | "viewer"); `disabledAt` is non-null when the account has been +// disabled by an admin. `createdAt` mirrors the original DB column. +// --------------------------------------------------------------------------- + +export interface User { + id: number; + username: string; + role: "admin" | "user" | "viewer"; + createdAt: string | null; + disabledAt?: string | null; +}