import typing

import msgspec


class UserAgent(msgspec.Struct):
    """User agent data."""

    device: typing.Literal[
        "mobile",
        "firefox",
        "mac",
        "chrome",
        "linux",
        "android",
        "windows",
        "explorer",
        "edge",
        "iphone",
    ]
    useragent: str


class GitFile(msgspec.Struct):
    path: str
    mode: str
    type: str
    sha: str
    size: int
    url: str


class GitFiles(msgspec.Struct):
    sha: str
    url: str
    tree: typing.List[GitFile]
    truncated: bool
