Use a typed escalation fallback instead of fallbackTopic

TerdutTeam spec.escalation.fallback is now {type, address}, mirroring the
server's notification channel model. CRDs regenerated.

Claude-Session: https://claude.ai/code/session_016mBLURvJoMuUEr9cB2RpUN
This commit is contained in:
Niklas Ye
2026-10-12 21:00:40 +02:00
parent 7fb8042265
commit 2d8fe0f275
11 changed files with 117 additions and 16 deletions
+10 -3
View File
@@ -208,10 +208,17 @@ type EscalationLevelRequest struct {
Targets []EscalationTargetRequest `json:"targets"`
}
// NotificationTarget is a notification provider and an address it understands.
// Both empty means none.
type NotificationTarget struct {
Type string `json:"type"`
Address string `json:"address"`
}
type SetEscalationRequest struct {
RepeatCount int64 `json:"repeat_count"`
FallbackTopic string `json:"fallback_topic"`
Levels []EscalationLevelRequest `json:"levels"`
RepeatCount int64 `json:"repeat_count"`
Fallback NotificationTarget `json:"fallback"`
Levels []EscalationLevelRequest `json:"levels"`
}
// SetEscalation calls PUT /api/teams/{teamID}/escalation -- an upsert