Browse Notifications

stable · guide · 0.1.0

Validate a Notification Catalog

Notification Catalog 由 Project Backend 的 repository 擁有;MiniCenter 不保存第二份 Catalog。部署前以 notifications:write Project Credential 呼叫驗證 API。未知的 Sender Profile、template、channel、purpose 格式、locale 或不相容 variables 會回傳 422

Sandbox and CI example

Shell example
curl --fail-with-body "$MINICENTER_URL/api/v1/notification-catalog/validate" \
  -H "Authorization: Bearer $MINICENTER_PROJECT_CREDENTIAL" \
  -H "Content-Type: application/json" \
  -H "X-Correlation-ID: $MINICENTER_CORRELATION_ID" \
  --data '{"entries":[{"event_key":"leader.geo_match_found","template_key":"geo-match-found","channel":"fcm","purpose":"geo_match_updates","locale":"zh-TW","sender_profile":"default","variables":{"leader_name":"string"}}]}'

成功時會回傳 entry 數量與 canonical SHA-256 digest。CI 應要求 HTTP 200;digest 可保存於 release evidence,以辨識實際驗證的 Catalog 內容。TypeScript SDK 提供 MiniCenterClient.validateNotificationCatalog(entries)