using System.Text.Json.Serialization;
namespace Titano.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.
public sealed record ServerInfo(
string Name,
string Version,
int ApiVersion,
IReadOnlyList Capabilities,
string? TlsFingerprint,
IReadOnlyList Formats,
ServerLimits Limits);
/// GET /health.
public sealed record HealthStatus(string Status, string Version, IReadOnlyDictionary Checks);