mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-12-22 12:57:22 -05:00
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com> Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
71 lines
2.0 KiB
C#
71 lines
2.0 KiB
C#
using API.Constants;
|
|
using API.Entities.Enums;
|
|
using API.Entities.Progress;
|
|
|
|
namespace API.DTOs.Progress;
|
|
#nullable enable
|
|
|
|
public sealed record ClientInfoDto
|
|
{
|
|
/// <summary>
|
|
/// Raw User-Agent string from request header
|
|
/// </summary>
|
|
public string UserAgent { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Client IP address (respecting X-Forwarded-For if present)
|
|
/// </summary>
|
|
public string IpAddress { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// How the user authenticated (JWT token vs API key)
|
|
/// </summary>
|
|
public AuthenticationType AuthType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Parsed client type from User-Agent or custom Kavita header
|
|
/// Examples: Web App, OPDS Reader, KOReader, Tachiyomi, etc.
|
|
/// </summary>
|
|
public ClientDeviceType ClientType { get; set; } = ClientDeviceType.Unknown;
|
|
|
|
/// <summary>
|
|
/// Application version (from web app or mobile app)
|
|
/// </summary>
|
|
public string? AppVersion { get; set; }
|
|
|
|
/// <summary>
|
|
/// Browser name (Chrome, Firefox, Safari, Edge) - Web clients only
|
|
/// </summary>
|
|
public string? Browser { get; set; }
|
|
|
|
/// <summary>
|
|
/// Browser version - Web clients only
|
|
/// </summary>
|
|
public string? BrowserVersion { get; set; }
|
|
|
|
/// <summary>
|
|
/// Platform/OS (Windows, macOS, Linux, iOS, Android)
|
|
/// </summary>
|
|
public ClientDevicePlatform Platform { get; set; } = ClientDevicePlatform.Unknown;
|
|
|
|
/// <summary>
|
|
/// Device type (Desktop, Mobile, Tablet)
|
|
/// </summary>
|
|
public string? DeviceType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Screen width in pixels - Web clients only
|
|
/// </summary>
|
|
public int? ScreenWidth { get; set; }
|
|
|
|
/// <summary>
|
|
/// Screen height in pixels - Web clients only
|
|
/// </summary>
|
|
public int? ScreenHeight { get; set; }
|
|
|
|
/// <summary>
|
|
/// Screen orientation (portrait, landscape) - Web clients only
|
|
/// </summary>
|
|
public string? Orientation { get; set; }
|
|
}
|