namespace PageFetcher.Models;

/// <summary>
/// Request to fetch a web page via the page-fetcher-api.
/// </summary>
public sealed class FetchPageRequest
{
    /// <summary>Absolute HTTP or HTTPS URL to fetch.</summary>
    public string Url { get; set; } = string.Empty;

    /// <summary>
    /// Playwright wait condition. Accepted values: <c>networkidle</c> (default), <c>domcontentloaded</c>, <c>load</c>.
    /// </summary>
    public string WaitFor { get; set; } = "networkidle";

    /// <summary>
    /// Identifies the calling service for audit purposes (e.g. <c>cv-matcher-api</c>, <c>cv-search-job</c>).
    /// </summary>
    public string CallerService { get; set; } = string.Empty;

    /// <summary>
    /// Optional reference to the job search session that triggered this fetch.
    /// Stored on <c>pageFetcher.PageFetches</c> for cross-schema audit queries.
    /// </summary>
    public string? JobSearchSessionId { get; set; }
}
