"""Account Settings API schemas.""" from __future__ import annotations from typing import Literal from pydantic import BaseModel, ConfigDict, Field AccountLanguage = Literal["zh-CN", "en-US"] AccountAnswerDepth = Literal["concise", "balanced", "deep"] AccountEvidenceDisplay = Literal["summary", "inline", "full"] AccountNotificationKey = Literal[ "pendingConfirmation", "executionWriteback", "releaseGate", "failureAlert", ] AccountSettingsSaveScope = Literal["local", "account"] AccountAvatarPreset = Literal[ "default-avatar-male-01", "default-avatar-male-02", "default-avatar-male-03", "default-avatar-female-01", "default-avatar-female-02", "default-avatar-female-03", ] class AccountProfileSettings(BaseModel): displayName: str = Field(min_length=1, max_length=100) roleTitle: str = Field(min_length=1, max_length=100) email: str = Field(default="", max_length=255) defaultLanguage: AccountLanguage = "zh-CN" avatarPreset: AccountAvatarPreset = "default-avatar-male-01" class AccountAiPreferenceSettings(BaseModel): answerDepth: AccountAnswerDepth = "balanced" evidenceDisplay: AccountEvidenceDisplay = "inline" class AccountNotificationPreference(BaseModel): enabled: bool = True desktop: bool = True emailDigest: bool = False class AccountNotificationSettings(BaseModel): pendingConfirmation: AccountNotificationPreference executionWriteback: AccountNotificationPreference releaseGate: AccountNotificationPreference failureAlert: AccountNotificationPreference class AccountSettingsUpdateRequest(BaseModel): profile: AccountProfileSettings aiPreferences: AccountAiPreferenceSettings notifications: AccountNotificationSettings class AccountSettingsResponse(AccountSettingsUpdateRequest): model_config = ConfigDict(populate_by_name=True) saveScope: AccountSettingsSaveScope = "account" updatedAt: str __all__ = [ "AccountAiPreferenceSettings", "AccountAnswerDepth", "AccountAvatarPreset", "AccountEvidenceDisplay", "AccountLanguage", "AccountNotificationKey", "AccountNotificationPreference", "AccountNotificationSettings", "AccountProfileSettings", "AccountSettingsResponse", "AccountSettingsSaveScope", "AccountSettingsUpdateRequest", ]