Add monthlyQuotaRemaining/monthlyQuotaLimit fields to QRResponseDto populated from X-Quota-* headers set by rate limiter. MCP server now displays quota in tool result text instead of web credits. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
namespace QRRapidoApp.Models.DTOs
|
|
{
|
|
public class QRResponseDto
|
|
{
|
|
public bool Success { get; set; }
|
|
public string? QRCodeBase64 { get; set; }
|
|
public string? QRId { get; set; }
|
|
public string? Message { get; set; }
|
|
public string? ErrorCode { get; set; }
|
|
public int RemainingCredits { get; set; }
|
|
public int RemainingFreeQRs { get; set; }
|
|
public bool FromCache { get; set; }
|
|
public string? NewDeviceId { get; set; }
|
|
public long GenerationTimeMs { get; set; }
|
|
|
|
/// <summary>Output image format: "png", "webp" or "svg".</summary>
|
|
public string Format { get; set; } = "png";
|
|
|
|
/// <summary>MIME type of the encoded image (e.g. "image/png", "image/webp").</summary>
|
|
public string MimeType { get; set; } = "image/png";
|
|
|
|
/// <summary>Monthly API quota remaining (from rate limiter). -1 = unlimited.</summary>
|
|
public int MonthlyQuotaRemaining { get; set; } = -1;
|
|
|
|
/// <summary>Monthly API quota limit. -1 = unlimited.</summary>
|
|
public int MonthlyQuotaLimit { get; set; } = -1;
|
|
}
|
|
} |