namespace New.Application.Ports; public sealed record CaseCreated(Guid CaseId, string? ProcessStatus); public sealed record TaskCreated(Guid TaskId, bool Open); /// Seam D: the case-framework client port (New.Infrastructure.CaseFramework implements this). public interface ICaseFrameworkGateway { Task CreateCaseAsync(string caseTypeCode, string externalReference, IReadOnlyList participants, CancellationToken ct); Task GetProcessStatusAsync(Guid caseId, CancellationToken ct); Task CreateTaskAsync(Guid caseId, string code, string description, CancellationToken ct); Task CompleteTaskAsync(Guid caseId, Guid taskId, CancellationToken ct); /// /// POST .../closure-request. Returns true if the case closed, false if /// the framework returned 409 (an open task) - which is an expected, /// non-exceptional outcome for callers (e.g. the owned assessment flow /// treats it as "closure pending", not a failure). /// Task RequestClosureAsync(Guid caseId, CancellationToken ct); }