"""Type references that define the structure of metadata json files""" from typing import Callable, TypedDict class S3Reference(TypedDict): bucket: str | None key: str | None class Track(TypedDict): asset: S3Reference | None class Product(TypedDict): artwork: S3Reference | None class ProductInfo(TypedDict): product: Product tracks: list[Track] class ProductObject(TypedDict): product_info: ProductInfo # A predicate type for filtering ProductInfo records ProductInfoPredicate = Callable[[ProductInfo], bool]