Enhance notification APIs with HTML email support, CC/BCC, and structured logging

Add comprehensive improvements across REST and gRPC APIs:
  - Add structured logging for all notification operations
  - Implement HTML email support with multipart/alternative MIME
  - Add CC and BCC recipient support for email notifications
  - Add GetNotifiers endpoint to query available notifier configurations
  - Support configurable From name in SMTP configuration
  - Auto-detect content type (text vs HTML) in notification bodies
  - Improve error handling and validation across all endpoints

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-22 23:31:32 -07:00
parent 8229944149
commit 35b6c8aed3
12 changed files with 444 additions and 39 deletions
+15
View File
@@ -57,6 +57,9 @@ type NotificationService interface {
// GetStats returns notification statistics
GetStats(ctx context.Context) (*NotificationStats, error)
// GetNotifiers returns information about available notifiers
GetNotifiers(ctx context.Context) (*NotifiersResponse, error)
}
// NotificationStats contains statistics about notification processing
@@ -69,3 +72,15 @@ type NotificationStats struct {
ByStatus map[string]int64 `json:"by_status"`
AverageLatency float64 `json:"average_latency_ms"`
}
// NotifierInfo contains information about a configured notifier type
type NotifierInfo struct {
Type NotificationType `json:"type"`
Accounts []string `json:"accounts"`
DefaultAccount string `json:"default_account"`
}
// NotifiersResponse contains the list of available notifiers
type NotifiersResponse struct {
Notifiers []NotifierInfo `json:"notifiers"`
}