namespace CvMatcher.Models.Responses
{
    public sealed class RagSearchResponse
    {
        public IReadOnlyList<RagSearchDocumentResult> Results { get; init; } = [];
    }

    public sealed class RagDocumentDetails
    {
        public required string Id { get; init; }
        public required string DocumentType { get; init; }
        public required string Title { get; init; }
        public string? SourceUrl { get; init; }
        public required string Text { get; init; }
        public required string TextHash { get; init; }
    }
    public sealed class RagSearchDocumentResult
    {
        public required string DocumentId { get; init; }
        public required string DocumentType { get; init; }
        public required string Title { get; init; }
        public string? SourceUrl { get; init; }
        public double Score { get; init; }
        public IReadOnlyList<RagSearchChunkResult> MatchedChunks { get; init; } = [];
    }

    public sealed class RagSearchChunkResult
    {
        public required string ChunkId { get; init; }
        public int ChunkIndex { get; init; }
        public required string Text { get; init; }
        public double Score { get; init; }
    }
}
