- Add missing GraphQL mutations: retryJob, updateAsset, deleteAsset - Add UpdateAssetRequest and DeleteResult to schema source of truth - Move Lambda callback endpoint to main.py (only REST endpoint) - Remove REST routes, pydantic schemas, and deps - Remove pydantic target from modelgen.json - Update architecture diagrams and documentation
143 lines
3.9 KiB
Python
143 lines
3.9 KiB
Python
"""
|
|
Graphene Types - GENERATED FILE
|
|
|
|
Do not edit directly. Regenerate using modelgen.
|
|
"""
|
|
|
|
import graphene
|
|
|
|
|
|
class AssetStatus(graphene.Enum):
|
|
PENDING = "pending"
|
|
READY = "ready"
|
|
ERROR = "error"
|
|
|
|
|
|
class JobStatus(graphene.Enum):
|
|
PENDING = "pending"
|
|
PROCESSING = "processing"
|
|
COMPLETED = "completed"
|
|
FAILED = "failed"
|
|
CANCELLED = "cancelled"
|
|
|
|
|
|
class MediaAssetType(graphene.ObjectType):
|
|
"""A video/audio file registered in the system."""
|
|
|
|
id = graphene.UUID()
|
|
filename = graphene.String()
|
|
file_path = graphene.String()
|
|
status = graphene.String()
|
|
error_message = graphene.String()
|
|
file_size = graphene.Int()
|
|
duration = graphene.Float()
|
|
video_codec = graphene.String()
|
|
audio_codec = graphene.String()
|
|
width = graphene.Int()
|
|
height = graphene.Int()
|
|
framerate = graphene.Float()
|
|
bitrate = graphene.Int()
|
|
properties = graphene.JSONString()
|
|
comments = graphene.String()
|
|
tags = graphene.List(graphene.String)
|
|
created_at = graphene.DateTime()
|
|
updated_at = graphene.DateTime()
|
|
|
|
|
|
class TranscodePresetType(graphene.ObjectType):
|
|
"""A reusable transcoding configuration (like Handbrake presets)."""
|
|
|
|
id = graphene.UUID()
|
|
name = graphene.String()
|
|
description = graphene.String()
|
|
is_builtin = graphene.Boolean()
|
|
container = graphene.String()
|
|
video_codec = graphene.String()
|
|
video_bitrate = graphene.String()
|
|
video_crf = graphene.Int()
|
|
video_preset = graphene.String()
|
|
resolution = graphene.String()
|
|
framerate = graphene.Float()
|
|
audio_codec = graphene.String()
|
|
audio_bitrate = graphene.String()
|
|
audio_channels = graphene.Int()
|
|
audio_samplerate = graphene.Int()
|
|
extra_args = graphene.List(graphene.String)
|
|
created_at = graphene.DateTime()
|
|
updated_at = graphene.DateTime()
|
|
|
|
|
|
class TranscodeJobType(graphene.ObjectType):
|
|
"""A transcoding or trimming job in the queue."""
|
|
|
|
id = graphene.UUID()
|
|
source_asset_id = graphene.UUID()
|
|
preset_id = graphene.UUID()
|
|
preset_snapshot = graphene.JSONString()
|
|
trim_start = graphene.Float()
|
|
trim_end = graphene.Float()
|
|
output_filename = graphene.String()
|
|
output_path = graphene.String()
|
|
output_asset_id = graphene.UUID()
|
|
status = graphene.String()
|
|
progress = graphene.Float()
|
|
current_frame = graphene.Int()
|
|
current_time = graphene.Float()
|
|
speed = graphene.String()
|
|
error_message = graphene.String()
|
|
celery_task_id = graphene.String()
|
|
execution_arn = graphene.String()
|
|
priority = graphene.Int()
|
|
created_at = graphene.DateTime()
|
|
started_at = graphene.DateTime()
|
|
completed_at = graphene.DateTime()
|
|
|
|
|
|
class CreateJobInput(graphene.InputObjectType):
|
|
"""Request body for creating a transcode/trim job."""
|
|
|
|
source_asset_id = graphene.UUID(required=True)
|
|
preset_id = graphene.UUID()
|
|
trim_start = graphene.Float()
|
|
trim_end = graphene.Float()
|
|
output_filename = graphene.String()
|
|
priority = graphene.Int(default_value=0)
|
|
|
|
|
|
class UpdateAssetInput(graphene.InputObjectType):
|
|
"""Request body for updating asset metadata."""
|
|
|
|
comments = graphene.String()
|
|
tags = graphene.List(graphene.String)
|
|
|
|
|
|
class SystemStatusType(graphene.ObjectType):
|
|
"""System status response."""
|
|
|
|
status = graphene.String()
|
|
version = graphene.String()
|
|
|
|
|
|
class ScanResultType(graphene.ObjectType):
|
|
"""Result of scanning the media input bucket."""
|
|
|
|
found = graphene.Int()
|
|
registered = graphene.Int()
|
|
skipped = graphene.Int()
|
|
files = graphene.List(graphene.String)
|
|
|
|
|
|
class DeleteResultType(graphene.ObjectType):
|
|
"""Result of a delete operation."""
|
|
|
|
ok = graphene.Boolean()
|
|
|
|
|
|
class WorkerStatusType(graphene.ObjectType):
|
|
"""Worker health and capabilities."""
|
|
|
|
available = graphene.Boolean()
|
|
active_jobs = graphene.Int()
|
|
supported_codecs = graphene.List(graphene.String)
|
|
gpu_available = graphene.Boolean()
|