using System.Text.Json.Serialization; namespace ClaudeDo.Worker.Tickets; /// Antwort-Hülle jeder Bandel.APIs-Route. public sealed record BandelEnvelope( [property: JsonPropertyName("success")] bool Success, [property: JsonPropertyName("data")] T? Data, [property: JsonPropertyName("message")] string? Message, [property: JsonPropertyName("errorCode")] string? ErrorCode); /// GET /api/ticketsystem/pat/me public sealed record TicketIdentity( [property: JsonPropertyName("userName")] string UserName, [property: JsonPropertyName("isPat")] bool IsPat, [property: JsonPropertyName("scopes")] IReadOnlyList Scopes); /// Ein Board-Item (Ausschnitt aus GetTicketSummaryDto — nur was der Import braucht). /// ⚠️ / sind live durchgehend null (geprüft über /// alle 63 Tickets der Abteilung Entwicklung, 2026-09-01). Die echten Zuweisungen stehen in /// ; nur dessen assigneeName hat dasselbe Format wie /// (mika.kuns). personInChargeName wäre die /// falsche Quelle — dort steht mal der Login, mal der Anzeigename ("Mika Kuns"). public sealed record TicketBoardItem( [property: JsonPropertyName("id")] int Id, [property: JsonPropertyName("title")] string Title, [property: JsonPropertyName("description")] string? Description, [property: JsonPropertyName("statusId")] int StatusId, [property: JsonPropertyName("statusName")] string? StatusName, [property: JsonPropertyName("assigneeID")] int? AssigneeId, [property: JsonPropertyName("assigneeName")] string? AssigneeName, [property: JsonPropertyName("ticketAssignees")] IReadOnlyList? TicketAssignees = null); public sealed record TicketAssignee( [property: JsonPropertyName("assigneeId")] int AssigneeId, [property: JsonPropertyName("assigneeName")] string? AssigneeName); /// GET /api/Navigation/sidebar — Abteilung mit ihren Projekten. public sealed record SidebarDepartment( [property: JsonPropertyName("departmentId")] int DepartmentId, [property: JsonPropertyName("departmentName")] string DepartmentName, [property: JsonPropertyName("projects")] IReadOnlyList Projects); public sealed record SidebarProject( [property: JsonPropertyName("id")] int Id, [property: JsonPropertyName("title")] string Title); /// Flachgeklopftes Projekt für die UI-Auswahl. public sealed record TicketProject(int Id, string Title, string DepartmentName); public sealed class TicketApiException : Exception { public TicketApiException(string message) : base(message) { } }