From 5cdfc05b41abcd496a8d32524b241e129b7cd113 Mon Sep 17 00:00:00 2001 From: Nora Date: Mon, 22 Jun 2026 15:09:10 -0600 Subject: [PATCH] feat(types): add User type --- src/types/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/types/index.ts b/src/types/index.ts index d02b142..1621980 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -831,3 +831,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; +}