# Code generated by typegen. DO NOT EDIT.

from __future__ import annotations

from enum import Enum, IntEnum
from typing import Any, Dict, List, Optional, TypedDict, Union
from datetime import datetime


##########
# source: sdk_app.go

class AppSDKTypes(TypedDict, total=False):
    pass


##########
# source: usage.go

class MetaItemType(str, Enum):
    TEXT = "text"
    IMAGE = "image"
    VIDEO = "video"
    AUDIO = "audio"
    RAW = "raw"

class VideoResolution(str, Enum):
    VIDEO_RES480_P = "480p"
    VIDEO_RES720_P = "720p"
    VIDEO_RES1080_P = "1080p"
    VIDEO_RES1440_P = "1440p"
    VIDEO_RES4_K = "4k"

# MetaItem represents metadata about an input or output item
class MetaItem(TypedDict, total=False):
    type: MetaItemType
    # Text fields
    tokens: int
    # Image/Video shared fields
    width: int
    height: int
    resolution_mp: float
    # Image specific fields
    steps: int
    count: int
    # Video specific fields
    resolution: VideoResolution
    seconds: float
    fps: int
    # Audio specific fields
    sample_rate: int
    # Raw specific fields
    cost: float
    # App-specific key-value pairs for custom pricing factors
    extra: Dict[str, Any]

# OutputMeta contains structured metadata about task inputs and outputs for pricing calculation
class OutputMeta(TypedDict, total=False):
    inputs: List[MetaItem]
    outputs: List[MetaItem]

