"""N01 to N05 bodies.""" from datetime import datetime from typing import Annotated, Literal from uuid import UUID from pydantic import AfterValidator, Field from app.common.schemas import RequestModel, ResponseModel from app.modules.auth.schemas import normalize_email Email = Annotated[str, Field(max_length=254), AfterValidator(normalize_email)] class SettingsOut(ResponseModel): coach_can_see_sessions: bool share_with_parent: bool parent_email: str | None auto_monthly_report: bool private_links: bool clips_as_examples: bool help_improve_ai: bool notify_results: bool notify_coach: bool notify_drills: bool notify_weekly: bool consented_at: datetime | None consent_version: str | None skip_filming_guide: bool version: int class SettingsEnvelope(ResponseModel): settings: SettingsOut class SettingsPatch(RequestModel): coach_can_see_sessions: bool | None = Field(None, strict=True) share_with_parent: bool | None = Field(None, strict=True) parent_email: Email | None = None auto_monthly_report: bool | None = Field(None, strict=True) private_links: bool | None = Field(None, strict=True) clips_as_examples: bool | None = Field(None, strict=True) help_improve_ai: bool | None = Field(None, strict=True) notify_results: bool | None = Field(None, strict=True) notify_coach: bool | None = Field(None, strict=True) notify_drills: bool | None = Field(None, strict=True) notify_weekly: bool | None = Field(None, strict=True) skip_filming_guide: bool | None = Field(None, strict=True) expected_version: int | None = Field(None, ge=1) class ConsentIn(RequestModel): version: str = Field(min_length=1, max_length=16) accepted: Literal[True] class ConsentOut(ResponseModel): version: str | None accepted_at: datetime withdrawn_at: datetime | None = None class ConsentEnvelope(ResponseModel): consent: ConsentOut class ExportIn(RequestModel): scope: Literal["videos"] class ExportOut(ResponseModel): id: UUID status: str requested_at: datetime delivery: Literal["account_email"] = "account_email" class ExportEnvelope(ResponseModel): export: ExportOut