cms.c2sgmbh/src/lib/jobs
Martin Porwoll cdaa871436 feat(community): Phase 2.5 - Token Refresh Service
Automatischer Token-Refresh für alle Social-Media-Plattformen:

- TokenRefreshService: Proaktiver Refresh 7 Tage vor Ablauf
  - YouTube: Refresh via refresh_token
  - Meta (Facebook/Instagram): Long-lived Token Exchange
  - Rate-Limiting zwischen Accounts
  - Dry-Run Modus für Tests

- NotificationService: Benachrichtigungen für YouTube Manager
  - Token läuft ab (warning)
  - Token abgelaufen (error)
  - Token-Refresh fehlgeschlagen (error)
  - Token erfolgreich erneuert (info)

- Cron-Endpoint: /api/cron/token-refresh
  - GET: Automatischer Cron-Trigger
  - POST: Manueller Trigger mit erweiterten Optionen
  - HEAD: Status-Check für Monitoring
  - Query-Parameter: platforms, thresholdDays, includeExpired, dryRun

- YtNotifications erweitert:
  - Neue Typen: token_expiring, token_expired, token_refresh_failed, token_refreshed
  - Neues Feld: relatedAccount für Social Account Relationship

- Migration: 20260116_100000_add_token_notification_fields

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 21:50:08 +00:00
..
JobLogger.ts feat(community): Phase 2.2 - YouTube Auto-Sync und AI Reply Suggestions 2026-01-16 15:44:06 +00:00
NotificationService.ts feat(community): Phase 2.5 - Token Refresh Service 2026-01-16 21:50:08 +00:00
syncAllComments.ts feat(community): Phase 2.2 - YouTube Auto-Sync und AI Reply Suggestions 2026-01-16 15:44:06 +00:00
TokenRefreshService.ts feat(community): Phase 2.5 - Token Refresh Service 2026-01-16 21:50:08 +00:00
UnifiedSyncService.ts feat(community): Phase 2.4 - Unified Sync Service 2026-01-16 21:33:42 +00:00