API response cleanup

This commit is contained in:
Nicolas Mowen 2024-12-06 18:46:20 -07:00 committed by GitHub
parent bb86e71e65
commit ecfa060877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
from typing import Any, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
class EventResponse(BaseModel):
@ -10,7 +10,7 @@ class EventResponse(BaseModel):
camera: str
start_time: float
end_time: Optional[float]
false_positive: bool
false_positive: Optional[bool]
zones: list[str]
thumbnail: str
has_clip: bool
@ -22,6 +22,8 @@ class EventResponse(BaseModel):
model_type: Optional[str]
data: dict[str, Any]
model_config = ConfigDict(extra="forbid", protected_namespaces=())
class EventCreateResponse(BaseModel):
success: bool