feat: user/service sessions type

This commit is contained in:
2025-06-15 18:10:47 +02:00
parent b0005c6702
commit 0b1ef77689

View File

@ -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;
}