32 lines
697 B
Python
32 lines
697 B
Python
from pydantic import BaseModel
|
|
from typing import Optional, List
|
|
|
|
|
|
class FirmwareVersion(BaseModel):
|
|
id: str
|
|
hw_type: str # "vs", "vp", "vx"
|
|
channel: str # "stable", "beta", "alpha", "testing"
|
|
version: str # semver e.g. "1.4.2"
|
|
filename: str
|
|
size_bytes: int
|
|
sha256: str
|
|
uploaded_at: str
|
|
notes: Optional[str] = None
|
|
is_latest: bool = False
|
|
|
|
|
|
class FirmwareListResponse(BaseModel):
|
|
firmware: List[FirmwareVersion]
|
|
total: int
|
|
|
|
|
|
class FirmwareLatestResponse(BaseModel):
|
|
hw_type: str
|
|
channel: str
|
|
version: str
|
|
size_bytes: int
|
|
sha256: str
|
|
download_url: str
|
|
uploaded_at: str
|
|
notes: Optional[str] = None
|