Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /elisiariocouto_leggen /leggen /api /models /notifications.py
| from typing import Literal | |
| from pydantic import BaseModel | |
| class DiscordConfig(BaseModel): | |
| """Discord notification configuration""" | |
| webhook: str | |
| enabled: bool = True | |
| class TelegramConfig(BaseModel): | |
| """Telegram notification configuration""" | |
| token: str | |
| chat_id: int | |
| enabled: bool = True | |
| class NotificationFilters(BaseModel): | |
| """Notification filters configuration | |
| Both lists are tri-state on update: omitted means "leave as stored", an | |
| empty list clears that list, and a populated list replaces it. | |
| """ | |
| case_insensitive: list[str] | None = None | |
| case_sensitive: list[str] | None = None | |
| class NotificationServiceStatus(BaseModel): | |
| """Availability and configuration state of one notification service""" | |
| name: str | |
| enabled: bool | |
| configured: bool | |
| active: bool | |
| class NotificationSettings(BaseModel): | |
| """Complete notification settings | |
| Every field is optional so that an update can address one part of the | |
| settings without disturbing the rest; see the PUT handler in | |
| `api/routes/notifications.py` for the merge semantics. | |
| """ | |
| discord: DiscordConfig | None = None | |
| telegram: TelegramConfig | None = None | |
| filters: NotificationFilters | None = None | |
| class NotificationTest(BaseModel): | |
| """Test notification request""" | |
| service: Literal["discord", "telegram"] | |
Xet Storage Details
- Size:
- 1.37 kB
- Xet hash:
- 782f02d29aa6278e30cd20f0e7dfbcdc28ae867979c2017f48c775be15c3a831
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.