using API.Constants; using API.Entities.Enums; using API.Entities.Progress; namespace API.DTOs.Progress; #nullable enable public sealed record ClientInfoDto { /// /// Raw User-Agent string from request header /// public string UserAgent { get; set; } = string.Empty; /// /// Client IP address (respecting X-Forwarded-For if present) /// public string IpAddress { get; set; } = string.Empty; /// /// How the user authenticated (JWT token vs API key) /// public AuthenticationType AuthType { get; set; } /// /// Parsed client type from User-Agent or custom Kavita header /// Examples: Web App, OPDS Reader, KOReader, Tachiyomi, etc. /// public ClientDeviceType ClientType { get; set; } = ClientDeviceType.Unknown; /// /// Application version (from web app or mobile app) /// public string? AppVersion { get; set; } /// /// Browser name (Chrome, Firefox, Safari, Edge) - Web clients only /// public string? Browser { get; set; } /// /// Browser version - Web clients only /// public string? BrowserVersion { get; set; } /// /// Platform/OS (Windows, macOS, Linux, iOS, Android) /// public ClientDevicePlatform Platform { get; set; } = ClientDevicePlatform.Unknown; /// /// Device type (Desktop, Mobile, Tablet) /// public string? DeviceType { get; set; } /// /// Screen width in pixels - Web clients only /// public int? ScreenWidth { get; set; } /// /// Screen height in pixels - Web clients only /// public int? ScreenHeight { get; set; } /// /// Screen orientation (portrait, landscape) - Web clients only /// public string? Orientation { get; set; } }