From 0b1ef776890db6128562bd10bef631dba116f1c2 Mon Sep 17 00:00:00 2001 From: LandaMm Date: Sun, 15 Jun 2025 18:10:47 +0200 Subject: [PATCH] feat: user/service sessions type --- web/src/types/index.ts | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/web/src/types/index.ts b/web/src/types/index.ts index 0853c0a..1ffebc1 100644 --- a/web/src/types/index.ts +++ b/web/src/types/index.ts @@ -31,3 +31,50 @@ export interface ApiServiceCredentials { client_id: string; client_secret: string; } + +export interface ServiceSession { + id: string; + service_id: string; + api_service?: ApiService | null; + client_id: string; + user_id?: string | null; + user?: UserProfile | null; + issued_at: string; + expires_at?: string | null; + last_active?: string | null; + ip_address?: string | null; + user_agent?: string | null; + access_token_id?: string | null; + refresh_token_id?: string | null; + is_active: boolean; + revoked_at?: string | null; + scope?: string | null; + claims: string; // base64 encoded +} + +export interface UserSession { + id: string; + user_id: string; + user?: UserProfile | null; + session_type: string; // "user" | "admin" + issued_at: string; + expires_at?: string | null; + last_active?: string | null; + ip_address?: string | null; + user_agent?: string | null; + access_token_id?: string | null; + refresh_token_id?: string | null; + device_info: string; // base64 encoded + is_active: boolean; + revoked_at?: string | null; +} + +export interface DeviceInfo { + os: string; + os_version: string; + device_name: string; + device_type: string; + location: string; + browser: string; + browser_version: string; +}