6c86f0f571
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
51 lines
1.1 KiB
Python
51 lines
1.1 KiB
Python
"""Settings schemas."""
|
|
|
|
from pydantic import BaseModel, Field
|
|
from typing import Optional, List
|
|
from datetime import datetime
|
|
|
|
|
|
class SettingResponse(BaseModel):
|
|
"""Setting response schema."""
|
|
id: int
|
|
category: str
|
|
key: str
|
|
value: Optional[str]
|
|
description: Optional[str]
|
|
is_secret: bool
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class SettingUpdate(BaseModel):
|
|
"""Setting update schema."""
|
|
value: str = Field(..., min_length=1)
|
|
|
|
|
|
class SettingListResponse(BaseModel):
|
|
"""Settings list response by category."""
|
|
category: str
|
|
settings: List[SettingResponse]
|
|
|
|
|
|
class EmailSettings(BaseModel):
|
|
"""Email settings schema."""
|
|
smtp_server: str
|
|
smtp_port: int
|
|
smtp_username: str
|
|
smtp_password: str
|
|
email_from: str
|
|
imap_server: Optional[str] = None
|
|
imap_port: Optional[int] = None
|
|
use_tls: bool = True
|
|
email_fetch_interval: Optional[int] = 300
|
|
email_delete_after_fetch: Optional[bool] = False
|
|
|
|
|
|
class SMSSettings(BaseModel):
|
|
"""SMS settings schema."""
|
|
twilio_account_sid: str
|
|
twilio_auth_token: str
|
|
twilio_from_number: str
|