| 1 | from typing import Optional |
| 2 | |
| 3 | from pydantic import BaseModel |
| 4 | from pydantic import ConfigDict |
| 5 | |
| 6 | |
| 7 | class VersionCheckResponse(BaseModel): |
| 8 | success: bool |
| 9 | message: str |
| 10 | current_version: str |
| 11 | latest_version: Optional[str] = None |
| 12 | is_outdated: bool |
| 13 | release_url: Optional[str] = None |
| 14 | release_notes: Optional[str] = None |
| 15 | published_at: Optional[str] = None |
| 16 | model_config = ConfigDict( |
| 17 | json_schema_extra={ |
| 18 | "example": { |
| 19 | "success": True, |
| 20 | "message": "New version v0.1.5 available!", |
| 21 | "current_version": "0.1.4", |
| 22 | "latest_version": "0.1.5", |
| 23 | "is_outdated": True, |
| 24 | "release_url": "https://github.com/socfortress/CoPilot/releases/tag/v0.1.5", |
| 25 | "release_notes": "## What's Changed\n* Feature 1\n* Feature 2", |
| 26 | "published_at": "2025-12-03T18:48:20Z", |
| 27 | }, |
| 28 | }, |
| 29 | ) |