Webhookのメッセージをカスタマイズできるように

This commit is contained in:
CyberRex
2026-05-27 10:59:58 +09:00
parent 2a4050d442
commit 38acbd35bb
14 changed files with 994 additions and 49 deletions

View File

@@ -42,6 +42,7 @@
- Webhook 登録 API
- Webhook 更新 API
- Webhook 削除 API
- Webhook メッセージ設定 API
- 現在ブラウザの Push 購読状態確認 API
- Push 購読情報登録 API
- Push 購読情報解除 API
@@ -52,6 +53,7 @@
- 通知条件ごとの証明書期限単位の送信済み管理
- 証明書取得失敗時のアラート履歴作成
- Webhook 通知送信処理
- ユーザー設定テンプレートによる Webhook 通知本文生成
- Push 通知送信処理
- `/push-sw.js` の明示的な静的配信
- 二重送信を防ぐ `dedupe_key` 利用
@@ -59,7 +61,7 @@
- 監視ジョブの一回実行スクリプト
- 1 時間ごとに監視ジョブを実行する Node worker
- アカウント情報取得 API
- 表示名更新 API
- 表示名・タイムゾーン更新 API
- パスワード更新 API
- パスワード更新時の全セッション無効化
- TOTP セットアップ API
@@ -110,6 +112,7 @@
- `src/server/modules/alerts/routes.js`
- `src/server/modules/auth/routes.js`
- `src/server/modules/notificationMethods/routes.js`
- `src/server/modules/notificationMethods/webhookMessageSettings.js`
- `src/server/modules/monitoring/certificate.js`
- `src/server/modules/monitoring/monitor.js`
- `src/server/modules/monitoring/notifications.js`
@@ -143,6 +146,7 @@
- `sessions`
- `sites`
- `notification_methods`
- `user_notification_settings`
- `site_alert_conditions`
- `alert_history`
@@ -187,6 +191,8 @@ GET /api/notification-methods
POST /api/notification-methods/webhooks
PATCH /api/notification-methods/webhooks/:methodId
DELETE /api/notification-methods/webhooks/:methodId
PUT /api/notification-methods/webhook-message-settings
DELETE /api/notification-methods/webhook-message-settings
POST /api/notification-methods/push-subscription-status
POST /api/notification-methods/push-subscriptions
DELETE /api/notification-methods/push-subscriptions
@@ -245,6 +251,7 @@ pnpm monitor:worker
- 通知方法管理画面
- Webhook 登録
- モーダルでの Webhook 編集
- モーダルでの Webhook メッセージ編集
- 確認ダイアログ付き Webhook 削除
- ブラウザ Push 通知の許可状態表示
- 現在のブラウザの Push 登録状態表示
@@ -252,6 +259,7 @@ pnpm monitor:worker
- 現在のブラウザが登録済みの場合の Push 購読解除
- アカウント設定画面
- 表示名更新
- タイムゾーン設定
- ダイアログでのパスワード更新
- ステップ式ポップアップでの 2 段階認証セットアップ
- 2 段階認証 QR コード表示
@@ -293,6 +301,8 @@ pnpm monitor:worker
- Webhook URL は HTTPS のみ許可。
- Webhook URL は `normalizeHttpsUrl` を通し、localhost / private IPv4 / loopback IPv4 を拒否。
- Webhook 更新・削除はログインユーザーの通知方法のみ対象。
- Webhook メッセージ設定はログインユーザー単位で保存し、未設定時は既定テンプレートを使用。
- タイムゾーンはアカウントのユーザー情報として保存し、未設定時は `Asia/Tokyo` を使用。
- Push endpoint は HTTPS のみ許可。
- Push 設定画面では登録済みデバイス一覧を返さず、現在ブラウザの登録状態のみ確認。
- Push 購読解除はログインユーザーの現在ブラウザ endpoint のみ対象。