-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Organize api files * Add more API definitions for events * Add export select by ID * Typing fixes * Update openapi spec * Change type * Fix test * Fix message * Fix tests
- Loading branch information
Showing
20 changed files
with
813 additions
and
526 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from typing import Any, Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class EventResponse(BaseModel): | ||
id: str | ||
label: str | ||
sub_label: Optional[str] | ||
camera: str | ||
start_time: float | ||
end_time: Optional[float] | ||
false_positive: bool | ||
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] | ||
|
||
|
||
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 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters