mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Api docs updates (#20388)
* Update classification API docs * Add information to events api * Fix tag * Add exports * Add generic response to model for classification apis * Add preview API information * Cleanup * Cleanup
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class ExportModel(BaseModel):
|
||||
"""Model representing a single export."""
|
||||
|
||||
id: str = Field(description="Unique identifier for the export")
|
||||
camera: str = Field(description="Camera name associated with this export")
|
||||
name: str = Field(description="Friendly name of the export")
|
||||
date: float = Field(description="Unix timestamp when the export was created")
|
||||
video_path: str = Field(description="File path to the exported video")
|
||||
thumb_path: str = Field(description="File path to the export thumbnail")
|
||||
in_progress: bool = Field(
|
||||
description="Whether the export is currently being processed"
|
||||
)
|
||||
|
||||
|
||||
class StartExportResponse(BaseModel):
|
||||
"""Response model for starting an export."""
|
||||
|
||||
success: bool = Field(description="Whether the export was started successfully")
|
||||
message: str = Field(description="Status or error message")
|
||||
export_id: Optional[str] = Field(
|
||||
default=None, description="The export ID if successfully started"
|
||||
)
|
||||
|
||||
|
||||
ExportsResponse = List[ExportModel]
|
||||
Reference in New Issue
Block a user