Changeset View
Changeset View
Standalone View
Standalone View
swh/web/common/typing.py
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | class SnapshotContext(TypedDict): | ||||
snapshot_sizes: Dict[str, int] | snapshot_sizes: Dict[str, int] | ||||
"""snapshot sizes grouped by branch target type""" | """snapshot sizes grouped by branch target type""" | ||||
snapshot_swhid: str | snapshot_swhid: str | ||||
"""snapshot SWHID""" | """snapshot SWHID""" | ||||
url_args: Dict[str, Any] | url_args: Dict[str, Any] | ||||
"""common URL arguments when browsing snapshot content""" | """common URL arguments when browsing snapshot content""" | ||||
visit_info: Optional[OriginVisitInfo] | visit_info: Optional[OriginVisitInfo] | ||||
"""optional origin visit info associated to the snapshot""" | """optional origin visit info associated to the snapshot""" | ||||
class SWHObjectMetadata(TypedDict, total=False): | |||||
object_type: str | |||||
origin_url: Optional[str] | |||||
visit_date: Optional[str] | |||||
visit_type: Optional[str] | |||||
directory_url: Optional[str] | |||||
revision_url: Optional[str] | |||||
release_url: Optional[str] | |||||
snapshot_url: Optional[str] | |||||
class ContentMetadata(SWHObjectMetadata): | |||||
sha1: str | |||||
sha1_git: str | |||||
sha256: str | |||||
blake2s256: str | |||||
content_url: str | |||||
mimetype: str | |||||
encoding: str | |||||
size: str | |||||
language: str | |||||
licenses: str | |||||
path: Optional[str] | |||||
filename: Optional[str] | |||||
directory: Optional[str] | |||||
revision: Optional[str] | |||||
release: Optional[str] | |||||
snapshot: Optional[str] |