namespace GerbilManagerWebAPI.SaleAd { /// /// FEAT-12a: request/response contract of POST /gerbils/sale-ad — FROZEN, /// mirror of the frontend (gerbil-manager-web/src/api/saleAd.ts). /// public sealed record SaleAdAnimal( string Name, string? Farbschlag, /// ISO "YYYY-MM-DD" (frontend sends the DTO string verbatim). string? DateOfBirth, string? Notes, /// FEAT-14: Charakterbogen trait LABELS (German, human-readable) for the prompt. List? Traits = null, /// FEAT-14: free-text character note for the prompt. string? CharacterNote = null); public sealed record SaleAdRequest( List Animals, /// e.g. "FREI" / "LOCKER RESERVIERT Anna" / "RESERVIERT". string StatusLine, /// Free-text style hints/wishes from the user. string Hints); public sealed record SaleAdResponse(string Text); /// /// Error body for the non-200 paths. The code string "AiKeyMissing" is FROZEN — /// Kevin's UI maps it to the German "API-Schlüssel noch nicht konfiguriert" hint. /// public sealed record SaleAdError(string Code, string Message); public enum SaleAdStatus { Ok, /// AI section not (fully) configured -> HTTP 503, code "AiKeyMissing". NotConfigured, /// Provider call failed -> HTTP 502, code "AiUpstreamError". UpstreamError, } public sealed record SaleAdResult(SaleAdStatus Status, string? Text, string? Error = null); }