using System.Text.Json.Serialization;
namespace Chronos.Protocol;
/// Error body of every failed API call: { code, message, details } (BRIEF ยง14.3).
public sealed record ApiError(string Code, string Message, string? Details = null);
/// Upload and account limits announced by the server.
public sealed record ServerLimits(long MaxUploadBytes, int ChunkSizeBytes, int PasswordMinLength = 10);
/// GET /api/v1/server/info.
///
/// File extensions the archive files as photos (lower case, no dot): the admin panel's upload dialog offers and sends only
/// these (owner review 2, R3). Null from servers that do not announce them.
///
public sealed record ServerInfo(
string Name,
string Version,
int ApiVersion,
IReadOnlyList Capabilities,
string? TlsFingerprint,
IReadOnlyList Formats,
ServerLimits Limits,
IReadOnlyList? Extensions = null);
/// GET /health.
public sealed record HealthStatus(string Status, string Version, IReadOnlyDictionary Checks);