Use custom body for the export recordings endpoint (#14908)

* Use custom body for the export recordings endpoint

* Fixed usage of ExportRecordingsBody

* Updated docs to reflect changes to export endpoint

* Fix friendly name and source

* Updated openAPI spec
This commit is contained in:
Rui Alves
2024-11-10 20:26:47 -07:00
committed by GitHub
parent 64b3397f8e
commit d2b2f3d54d
5 changed files with 93 additions and 37 deletions
View File
@@ -0,0 +1,20 @@
from typing import Union
from pydantic import BaseModel, Field
from pydantic.json_schema import SkipJsonSchema
from frigate.record.export import (
PlaybackFactorEnum,
PlaybackSourceEnum,
)
class ExportRecordingsBody(BaseModel):
playback: PlaybackFactorEnum = Field(
default=PlaybackFactorEnum.realtime, title="Playback factor"
)
source: PlaybackSourceEnum = Field(
default=PlaybackSourceEnum.recordings, title="Playback source"
)
name: str = Field(title="Friendly name", default=None, max_length=256)
image_path: Union[str, SkipJsonSchema[None]] = None