first commit

This commit is contained in:
2025-12-15 12:07:32 +01:00
commit 6f49528bbd
21 changed files with 1258 additions and 0 deletions

35
backend/models.py Normal file
View File

@ -0,0 +1,35 @@
from typing import List, Optional
from pydantic import BaseModel, Field
class ActionRequest(BaseModel):
countdown: Optional[int] = Field(default=None, ge=0, description="Seconds for countdown")
sound: Optional[bool] = Field(default=None, description="Play sound alongside notification")
message: Optional[str] = Field(
default=None,
description="Optional message to show the user; falls back to default text.",
)
class ActionResponse(BaseModel):
user: str
action: str
dry_run: bool
steps: List[str]
logged_in: bool
class UserStatus(BaseModel):
user: str
logged_in: bool
class LoginRequest(BaseModel):
username: str
password: str
class LoginResponse(BaseModel):
token: str
expires_in: int