mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-11 10:57:38 +03:00
32 lines
983 B
Python
32 lines
983 B
Python
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from ..base import FrigateBaseModel
|
|
|
|
__all__ = ["NotificationConfig"]
|
|
|
|
|
|
class NotificationConfig(FrigateBaseModel):
|
|
enabled: bool = Field(
|
|
default=False,
|
|
title="Enable notifications",
|
|
description="Enable or disable notifications; can be overridden per-camera.",
|
|
)
|
|
email: Optional[str] = Field(
|
|
default=None,
|
|
title="Notification email",
|
|
description="Email address used for push notifications or required by certain notification providers.",
|
|
)
|
|
cooldown: int = Field(
|
|
default=0,
|
|
ge=0,
|
|
title="Cooldown period",
|
|
description="Cooldown (seconds) between notifications to avoid spamming recipients.",
|
|
)
|
|
enabled_in_config: Optional[bool] = Field(
|
|
default=None,
|
|
title="Original notifications state",
|
|
description="Indicates whether notifications were enabled in the original static configuration.",
|
|
)
|