/** * Arial Server - Database types * * Type definitions for SQLite database tables */ /** * User record stored in the database */ export interface DbUser { id: string; github_id: number; github_username: string; github_access_token: string; github_token_scope: string; refresh_token_hash: string; token_version: number; created_at: string; updated_at: string; } /** * User data for creating a new user */ export interface CreateUserData { githubId: number; githubUsername: string; githubAccessToken: string; githubTokenScope: string; refreshTokenHash: string; } /** * User data returned to application code */ export interface User { id: string; githubId: number; githubUsername: string; githubAccessToken: string; githubTokenScope: string; tokenVersion: number; createdAt: Date; updatedAt: Date; } /** * Session record stored in the database */ export interface DbSession { id: string; user_id: string; expires_at: string; created_at: string; } /** * Device flow state stored temporarily */ export interface DbDeviceFlow { device_code: string; user_code: string; expires_at: string; interval: number; user_id: string | null; completed: number; created_at: string; } /** * Device flow data for creating a new flow */ export interface CreateDeviceFlowData { deviceCode: string; userCode: string; expiresAt: Date; interval: number; } /** * Device flow state returned to application code */ export interface DeviceFlow { deviceCode: string; userCode: string; expiresAt: Date; interval: number; userId: string | null; completed: boolean; createdAt: Date; } //# sourceMappingURL=types.d.ts.map