Files
TimeTracker/app/schemas/version_check.py
T
Dries Peeters 96955aee62 feat(admin): GitHub-based version update notification for admins
Add VersionService to fetch and cache the latest GitHub release, compare it to the installed semver (APP_VERSION when valid, else setup.py), and expose admin-only GET /api/version/check and POST /api/version/dismiss on the legacy /api blueprint (session or Bearer token).

Persist per-user dismissal in users.dismissed_release_version (Alembic 148) and show a non-blocking update card in base.html for administrators. Add packaging for semver parsing and tests for comparison, service, and routes.

Document configuration in docs/admin/deployment/VERSION_MANAGEMENT.md and endpoints in docs/api/REST_API.md and docs/API.md.
2026-04-15 09:39:32 +02:00

13 lines
290 B
Python

"""Typed response for GET /api/version/check."""
from typing import TypedDict
class VersionCheckResponse(TypedDict):
update_available: bool
current_version: str
latest_version: str | None
release_notes: str | None
published_at: str | None
release_url: str | None