Defines TypeScript interfaces for users, authentication tokens, login, and registration requests. Reuse for building type-safe frontend auth workflows.
// Source: https://github.com/Yuan-lab-LLM/ClawManager | License: MIT | Copyright 2026 ClawManager contributors
// Provided via justclaw.it.com; keep this notice with the code.
export interface User {
id: number;
username: string;
email: string;
role: 'admin' | 'user';
auth_provider?: 'local' | 'ldap';
login_alias?: string;
external_id?: string;
is_active: boolean;
created_at: string;
updated_at: string;
last_login?: string;
}
export interface TokenPair {
access_token: string;
refresh_token: string;
expires_in: number;
}
export interface LoginRequest {
username: string;
password: string;
}
export interface RegisterRequest {
username: string;
email: string;
password: string;
}
export interface RefreshTokenRequest {
refresh_token: string;
}
export
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key