namespace StellaOps.Notifier.WebService.Contracts;
///
/// Incident list query parameters.
///
public sealed record IncidentListQuery
{
///
/// Filter by status (open, acknowledged, resolved).
///
public string? Status { get; init; }
///
/// Filter by event kind prefix.
///
public string? EventKindPrefix { get; init; }
///
/// Filter incidents after this timestamp.
///
public DateTimeOffset? Since { get; init; }
///
/// Filter incidents before this timestamp.
///
public DateTimeOffset? Until { get; init; }
///
/// Maximum number of results.
///
public int? Limit { get; init; }
///
/// Cursor for pagination.
///
public string? Cursor { get; init; }
}
///
/// Incident response DTO.
///
public sealed record IncidentResponse
{
public required string IncidentId { get; init; }
public required string TenantId { get; init; }
public required string EventKind { get; init; }
public required string Status { get; init; }
public required string Severity { get; init; }
public required string Title { get; init; }
public string? Description { get; init; }
public required int EventCount { get; init; }
public required DateTimeOffset FirstOccurrence { get; init; }
public required DateTimeOffset LastOccurrence { get; init; }
public string? AcknowledgedBy { get; init; }
public DateTimeOffset? AcknowledgedAt { get; init; }
public string? ResolvedBy { get; init; }
public DateTimeOffset? ResolvedAt { get; init; }
public List? Labels { get; init; }
public Dictionary? Metadata { get; init; }
}
///
/// Incident list response with pagination.
///
public sealed record IncidentListResponse
{
public required List Incidents { get; init; }
public required int TotalCount { get; init; }
public string? NextCursor { get; init; }
}
///
/// Request to acknowledge an incident.
///
public sealed record IncidentAckRequest
{
///
/// Actor performing the acknowledgement.
///
public string? Actor { get; init; }
///
/// Optional comment.
///
public string? Comment { get; init; }
}
///
/// Request to resolve an incident.
///
public sealed record IncidentResolveRequest
{
///
/// Actor resolving the incident.
///
public string? Actor { get; init; }
///
/// Resolution reason.
///
public string? Reason { get; init; }
///
/// Optional comment.
///
public string? Comment { get; init; }
}
///
/// Delivery history item for an incident.
///
public sealed record DeliveryHistoryItem
{
public required string DeliveryId { get; init; }
public required string ChannelType { get; init; }
public required string ChannelName { get; init; }
public required string Status { get; init; }
public required DateTimeOffset Timestamp { get; init; }
public string? ErrorMessage { get; init; }
public int Attempts { get; init; }
}