ftb-docker/ftbtypes.py

106 lines
2.1 KiB
Python
Raw Normal View History

2022-11-21 16:33:29 +01:00
from typing import Any, Literal, NotRequired, TypedDict
class IdObject(TypedDict):
id: int
class IdTypeObject(IdObject):
type: str
class IdTypeUpdatedObject(IdTypeObject):
updated: int
class IdTypeNamedObject(IdTypeObject):
name: str
class IdTypeUpdatedNamedObject(IdTypeUpdatedObject):
name: str
class ModPackFileInfo(IdTypeUpdatedObject):
sha1: str
size: int
url: str
mirrors: list[Any]
class ModPackArt(ModPackFileInfo):
width: int
height: int
compressed: bool
class Tag(IdTypeNamedObject):
pass
class ModPackRating(IdObject):
configured: bool
verified: bool
age: int
gambling: bool
frightening: bool
alcoholdrugs: bool
nuditysexual: bool
sterotypeshate: bool
language: bool
violence: bool
class ModPackLink(IdTypeNamedObject):
link: str
class ModPackAuthor(IdTypeUpdatedNamedObject):
website: str
class ModPackSpecs(IdObject):
minimum: int
recommended: int
class ModPackTarget(IdTypeUpdatedNamedObject):
version: str
class ModPackVersion(IdTypeUpdatedNamedObject):
specs: ModPackSpecs
targets: list[ModPackTarget]
private: bool
class ModManifest(IdTypeUpdatedNamedObject):
synopsis: str
description: str
art: list[ModPackArt]
links: list[ModPackLink]
authors: list[ModPackAuthor]
versions: list[ModPackVersion]
installs: int
status: str
refreshed: int
class ModPackManifest(ModManifest):
plays: int
tags: list[Tag]
featured: bool
notification: str
rating: ModPackRating
released: int
plays_14d: int
private: bool
class ModPackFile(ModPackFileInfo):
version: str
path: str
tags: list[str]
clientonly: bool
serveronly: bool
optional: bool
name: str
class ApiError(TypedDict):
status: Literal["error"] | str
message: str
target: NotRequired[str]
class ModPackVersionManifest(ModPackVersion):
files: list[ModPackFile]
installs: int
plays: int
refreshed: int
changelog: str
parent: int
notification: str
links: list[ModPackLink]
status: str