namespace Gateway.Api.Domain; public enum NotificationChannel { Mail, WhatsApp, Ntfy } public enum AlarmCondition { Active, Inactive, Above, Below } public sealed record NotificationIntegration(NotificationChannel Channel, string Endpoint, bool HasApiKey); public sealed record UpdateNotificationKeyRequest(string? ApiKey, bool ClearApiKey = false); public sealed record AlarmDestination(NotificationChannel Channel, string Recipient, string Template = "stoerung", string PersonName = "SE-Inno", int Priority = 0, string Tags = "alarm"); public sealed record AlarmRule(Guid Id, string Name, Guid PointId, AlarmCondition Condition, double Threshold, double Hysteresis, bool Enabled, bool NotifyRecovery, string Message, IReadOnlyList Destinations); public sealed record NotificationDelivery(long Id, Guid RuleId, string Title, string Message, AlarmDestination Destination, string State, DateTimeOffset CreatedAtUtc, string? Result);