Refactor: enhance API response schemas for pagination; update environment variables for Supabase and Vision API; improve Vite configuration for proxy routing

This commit is contained in:
salirezav
2025-08-12 13:48:17 -04:00
parent 7a939920fa
commit 62dd0d162b
9 changed files with 57 additions and 35 deletions

View File

@@ -71,13 +71,21 @@ class VideoInfoResponse(BaseModel):
class VideoListResponse(BaseModel):
"""Video list response"""
videos: List[VideoInfoResponse] = Field(..., description="List of videos")
total_count: int = Field(..., description="Total number of videos")
total_count: int = Field(..., description="Total number of matching videos (ignores pagination)")
page: Optional[int] = Field(None, description="Current page number (if using page/limit)")
total_pages: Optional[int] = Field(None, description="Total pages (if using page/limit)")
has_next: Optional[bool] = Field(None, description="Is there a next page?")
has_previous: Optional[bool] = Field(None, description="Is there a previous page?")
class Config:
schema_extra = {
"example": {
"videos": [],
"total_count": 0
"total_count": 0,
"page": 1,
"total_pages": 1,
"has_next": False,
"has_previous": False
}
}
@@ -108,8 +116,9 @@ class VideoListRequest(BaseModel):
start_date: Optional[datetime] = Field(None, description="Filter by start date")
end_date: Optional[datetime] = Field(None, description="Filter by end date")
limit: Optional[int] = Field(50, description="Maximum number of results")
include_metadata: bool = Field(False, description="Include video metadata")
offset: Optional[int] = Field(0, description="Number of items to skip (for pagination)")
include_metadata: bool = Field(False, description="Include video metadata for returned items only")
class Config:
schema_extra = {
"example": {
@@ -117,6 +126,7 @@ class VideoListRequest(BaseModel):
"start_date": "2025-08-04T00:00:00",
"end_date": "2025-08-04T23:59:59",
"limit": 50,
"offset": 0,
"include_metadata": True
}
}