feat: WhatsApp notifications — new incident alert and CAPA overdue escalation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
This commit is contained in:
2026-07-11 18:50:25 +08:00
co-authored by Claude Sonnet 4.6
parent 121433ddf8
commit a47f3aabc9
6 changed files with 282 additions and 4 deletions
+6 -1
View File
@@ -3,7 +3,12 @@ export const dynamic = 'force-dynamic'
import { NextRequest, NextResponse } from 'next/server'
import { createClient } from '@/lib/supabase/server'
const ALLOWED_KEYS = ['ANTHROPIC_API_KEY', 'VOYAGE_API_KEY'] as const
const ALLOWED_KEYS = [
'ANTHROPIC_API_KEY',
'VOYAGE_API_KEY',
'META_WHATSAPP_PHONE_NUMBER_ID',
'META_WHATSAPP_ACCESS_TOKEN',
] as const
type SettingKey = typeof ALLOWED_KEYS[number]
async function requireAdmin(supabase: Awaited<ReturnType<typeof createClient>>) {