2024-12-06 15:04:02 +01:00
|
|
|
from typing import Any, Optional
|
|
|
|
|
2024-12-07 03:07:43 +01:00
|
|
|
from pydantic import BaseModel, ConfigDict
|
2024-12-06 15:04:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
class EventResponse(BaseModel):
|
|
|
|
id: str
|
|
|
|
label: str
|
|
|
|
sub_label: Optional[str]
|
|
|
|
camera: str
|
|
|
|
start_time: float
|
|
|
|
end_time: Optional[float]
|
2024-12-07 03:07:43 +01:00
|
|
|
false_positive: Optional[bool]
|
2024-12-06 15:04:02 +01:00
|
|
|
zones: list[str]
|
|
|
|
thumbnail: str
|
|
|
|
has_clip: bool
|
|
|
|
has_snapshot: bool
|
|
|
|
retain_indefinitely: bool
|
|
|
|
plus_id: Optional[str]
|
|
|
|
model_hash: Optional[str]
|
|
|
|
detector_type: Optional[str]
|
|
|
|
model_type: Optional[str]
|
|
|
|
data: dict[str, Any]
|
|
|
|
|
2024-12-07 03:07:43 +01:00
|
|
|
model_config = ConfigDict(protected_namespaces=())
|
|
|
|
|
2024-12-06 15:04:02 +01:00
|
|
|
|
|
|
|
class EventCreateResponse(BaseModel):
|
|
|
|
success: bool
|
|
|
|
message: str
|
|
|
|
event_id: str
|
|
|
|
|
|
|
|
|
|
|
|
class EventMultiDeleteResponse(BaseModel):
|
|
|
|
success: bool
|
|
|
|
deleted_events: list[str]
|
|
|
|
not_found_events: list[str]
|
|
|
|
|
|
|
|
|
|
|
|
class EventUploadPlusResponse(BaseModel):
|
|
|
|
success: bool
|
|
|
|
plus_id: str
|