mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
fa81d87dc0
* Updated documentation for the review endpoint * Updated documentation for the review/summary endpoint * Updated documentation for the review/summary endpoint * Documentation for the review activity audio and motion endpoints * Added responses for more review.py endpoints * Added responses for more review.py endpoints * Fixed review.py responses and proper path parameter names * Added body model for /reviews/viewed and /reviews/delete * Updated OpenAPI specification for the review controller endpoints * Run ruff format frigate * Drop significant_motion * Updated frigate-api.yaml * Deleted total_motion * Combine 2 models into generic
44 lines
845 B
Python
44 lines
845 B
Python
from datetime import datetime
|
|
from typing import Dict
|
|
|
|
from pydantic import BaseModel, Json
|
|
|
|
from frigate.review.maintainer import SeverityEnum
|
|
|
|
|
|
class ReviewSegmentResponse(BaseModel):
|
|
id: str
|
|
camera: str
|
|
start_time: datetime
|
|
end_time: datetime
|
|
has_been_reviewed: bool
|
|
severity: SeverityEnum
|
|
thumb_path: str
|
|
data: Json
|
|
|
|
|
|
class Last24HoursReview(BaseModel):
|
|
reviewed_alert: int
|
|
reviewed_detection: int
|
|
total_alert: int
|
|
total_detection: int
|
|
|
|
|
|
class DayReview(BaseModel):
|
|
day: datetime
|
|
reviewed_alert: int
|
|
reviewed_detection: int
|
|
total_alert: int
|
|
total_detection: int
|
|
|
|
|
|
class ReviewSummaryResponse(BaseModel):
|
|
last24Hours: Last24HoursReview
|
|
root: Dict[str, DayReview]
|
|
|
|
|
|
class ReviewActivityMotionResponse(BaseModel):
|
|
start_time: int
|
|
motion: float
|
|
camera: str
|