| 1 | using AgentForge.Plugin.Ci.Ir; |
| 2 | |
| 3 | namespace AgentForge.Plugin.Ci.Contracts; |
| 4 | |
| 5 | public sealed record CreateCiDefinitionRequest(string? Name, ForgeCiDocument? Document); |
| 6 | |
| 7 | public sealed record UpdateCiDefinitionRequest(ForgeCiDocument Document); |
| 8 | |
| 9 | public sealed record CiDefinitionSummaryResponse( |
| 10 | string Name, |
| 11 | string Repo, |
| 12 | string CreatedBy, |
| 13 | DateTimeOffset CreatedAt, |
| 14 | DateTimeOffset UpdatedAt, |
| 15 | int TaskCount); |
| 16 | |
| 17 | public sealed record CiDefinitionListResponse(int Count, IReadOnlyList<CiDefinitionSummaryResponse> Definitions); |
| 18 | |
| 19 | public sealed record CiDefinitionDetailResponse( |
| 20 | string Name, |
| 21 | string Repo, |
| 22 | string CreatedBy, |
| 23 | DateTimeOffset CreatedAt, |
| 24 | DateTimeOffset UpdatedAt, |
| 25 | ForgeCiDocument Document); |
| 26 | |
| 27 | public sealed record CiTaskCatalogResponse(IReadOnlyList<CiTaskDescriptorResponse> Tasks); |
| 28 | |
| 29 | public sealed record CiTaskDescriptorResponse(string Id, string DisplayName, string Description); |
| 30 | |
| 31 | public sealed record QueueCiRunRequest( |
| 32 | string DefinitionName, |
| 33 | string? Ref = null, |
| 34 | string? Commit = null, |
| 35 | int? MrNumber = null); |
| 36 | |
| 37 | public sealed record CiRunSummaryResponse( |
| 38 | string Id, |
| 39 | string Repo, |
| 40 | string DefinitionName, |
| 41 | string Ref, |
| 42 | string Status, |
| 43 | DateTimeOffset CreatedAt, |
| 44 | DateTimeOffset UpdatedAt); |
| 45 | |
| 46 | public sealed record CiRunListResponse(int Count, IReadOnlyList<CiRunSummaryResponse> Runs); |
| 47 | |
| 48 | public sealed record CiStepRunResponse( |
| 49 | string Id, |
| 50 | string NodeId, |
| 51 | string TaskId, |
| 52 | string DisplayName, |
| 53 | int OrderIndex, |
| 54 | string Status, |
| 55 | string LogText, |
| 56 | DateTimeOffset? StartedAt, |
| 57 | DateTimeOffset? FinishedAt); |
| 58 | |
| 59 | public sealed record CiRunDetailResponse( |
| 60 | string Id, |
| 61 | string Repo, |
| 62 | string DefinitionName, |
| 63 | string Ref, |
| 64 | string Commit, |
| 65 | int? MrNumber, |
| 66 | string Status, |
| 67 | string QueuedBy, |
| 68 | DateTimeOffset CreatedAt, |
| 69 | DateTimeOffset UpdatedAt, |
| 70 | DateTimeOffset? StartedAt, |
| 71 | DateTimeOffset? FinishedAt, |
| 72 | IReadOnlyList<CiStepRunResponse> Steps); |
| 73 | |