# ----------------------------------------------------------------------------
#
#  Welcome to Baml! To use this generated code, please run the following:
#
#  $ pip install baml
#
# ----------------------------------------------------------------------------

# This file was generated by BAML: please do not edit it. Instead, edit the
# BAML files and re-generate this code using: baml-cli generate
# baml-cli is available with the baml package.

import typing
import typing_extensions
from pydantic import BaseModel, ConfigDict, Field

import baml_py

from . import types

StreamStateValueT = typing.TypeVar('StreamStateValueT')
class StreamState(BaseModel, typing.Generic[StreamStateValueT]):
    value: StreamStateValueT
    state: typing_extensions.Literal["Pending", "Incomplete", "Complete"]
# #########################################################################
# Generated classes (109)
# #########################################################################

class AICommandHistoryItem(BaseModel):
    # A single AI command history entry
    id: typing.Optional[str] = None
    command: typing.Optional[str] = None
    commandType: typing.Optional[types.AICommandType] = None
    originalContent: typing.Optional[str] = None
    editedContent: typing.Optional[str] = None
    section: typing.Optional[str] = None
    applied: typing.Optional[bool] = None
    explanation: typing.Optional[str] = None
    createdAt: typing.Optional[str] = None

class AICommandRequest(BaseModel):
    # Request to execute an AI command
    contentId: typing.Optional[str] = None
    section: typing.Optional[str] = None
    command: typing.Optional[str] = None
    currentContent: typing.Optional[str] = None
    commandType: typing.Optional[types.AICommandType] = None

class AICommandResult(BaseModel):
    # Response from executing an AI command
    editedContent: typing.Optional[str] = None
    explanation: typing.Optional[str] = None
    appliedChange: typing.Optional[str] = None
    commandId: typing.Optional[str] = None

class ActionError(BaseModel):
    code: typing.Optional[str] = None
    message: typing.Optional[str] = None
    retryable: typing.Optional[bool] = None
    details: typing.Dict[str, str]

class ActionEventPayload(BaseModel):
    # Payload for ACTION_* events
    actionId: typing.Optional[str] = None
    tool: typing.Optional[str] = None
    status: typing.Optional[str] = None
    parameters: typing.Dict[str, str]
    result: typing.Optional[typing.Dict[str, str]] = None
    error: typing.Optional[typing.Dict[str, str]] = None

class ActionOutput(BaseModel):
    type: typing.Optional[str] = None
    text: typing.Optional[str] = None
    structured: typing.Dict[str, str]
    preview: typing.Optional[str] = None

class ActionRequest(BaseModel):
    conversationId: typing.Optional[str] = None
    tool: typing.Optional[types.ToolName] = None
    parameters: typing.Dict[str, str]
    context: typing.Optional["PageContext"] = None
    confirmed: typing.Optional[bool] = None

class ActionResponse(BaseModel):
    success: typing.Optional[bool] = None
    tool: typing.Optional[types.ToolName] = None
    output: typing.Optional["ActionOutput"] = None
    error: typing.Optional["ActionError"] = None
    appliedChanges: typing.List[str]
    followUpMessage: typing.Optional[str] = None
    suggestedNextActions: typing.List["SuggestedAction"]

class AiTimingSuggestion(BaseModel):
    # Response from AI timing suggestion
    suggestedTime: typing.Optional[str] = None
    reason: typing.Optional[str] = None
    confidence: typing.Optional[float] = None
    alternativeTimes: typing.List[str]

class AiTimingSuggestionRequest(BaseModel):
    # Request for AI timing suggestion
    clientId: typing.Optional[int] = None
    messageType: typing.Optional[str] = None
    preferredTimeRange: typing.Optional[str] = None

class AuthVerifyResponse(BaseModel):
    authenticated: typing.Optional[bool] = None
    userId: typing.Optional[int] = None
    username: typing.Optional[str] = None
    email: typing.Optional[str] = None
    firstName: typing.Optional[str] = None
    lastName: typing.Optional[str] = None
    organizationId: typing.Optional[int] = None
    permissions: typing.List[str]

class ChatMessage(BaseModel):
    # Single chat message
    role: typing.Optional[types.MessageRole] = None
    content: typing.Optional[str] = None
    timestamp: typing.Optional[str] = None

class ChatRequest(BaseModel):
    # Chat request from extension to backend
    message: typing.Optional[str] = None
    context: typing.Optional["PageContext"] = None
    conversationHistory: typing.List["ChatMessage"]
    conversationId: typing.Optional[str] = None

class ChatResponse(BaseModel):
    # Chat response from backend to extension
    message: typing.Optional[str] = None
    conversationId: typing.Optional[str] = None
    suggestedActions: typing.List["SuggestedAction"]
    context: typing.Optional["ResolvedContext"] = None

class ClientContext(BaseModel):
    id: typing.Optional[int] = None
    name: typing.Optional[str] = None
    email: typing.Optional[str] = None
    phone: typing.Optional[str] = None
    goals: typing.List[str]
    recentNotes: typing.Optional[str] = None
    lastSessionDate: typing.Optional[str] = None
    nextSessionDate: typing.Optional[str] = None
    totalSessions: typing.Optional[int] = None

class CommandCenterData(BaseModel):
    # Grouped command center response
    focusNow: typing.List["CommandCenterItem"]
    soon: typing.List["CommandCenterItem"]
    later: typing.List["CommandCenterItem"]
    lastUpdated: typing.Optional[str] = None

class CommandCenterEventPayload(BaseModel):
    # Payload for COMMAND_CENTER_UPDATED event
    focusNowCount: typing.Optional[int] = None
    soonCount: typing.Optional[int] = None
    laterCount: typing.Optional[int] = None
    lastUpdated: typing.Optional[str] = None

class CommandCenterItem(BaseModel):
    # A single command center item
    id: typing.Optional[str] = None
    type: typing.Optional[types.CommandItemType] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    priority: typing.Optional[types.Priority] = None
    priorityReason: typing.Optional[str] = None
    action: typing.Optional[str] = None
    dueDate: typing.Optional[str] = None
    crossDomainContext: typing.Optional[str] = None
    sessionId: typing.Optional[str] = None
    createdAt: typing.Optional[str] = None

class ConnectionPayload(BaseModel):
    # Payload for CONNECTION_ESTABLISHED event
    connectionId: typing.Optional[str] = None
    userId: typing.Optional[int] = None
    capabilities: typing.List[str]

class ContextChangedPayload(BaseModel):
    # Payload for CONTEXT_CHANGED and STATE_UPDATED events
    page: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    sessionId: typing.Optional[str] = None
    sessionDate: typing.Optional[str] = None
    availableActions: typing.List[str]
    source: typing.Optional[str] = None

class CreateResourceRequest(BaseModel):
    # Request to create a new resource
    type: typing.Optional[types.ResourceType] = None
    title: typing.Optional[str] = None
    description: typing.Optional[str] = None
    externalUrl: typing.Optional[str] = None
    tags: typing.List[str]

class CreateScheduledMessageRequest(BaseModel):
    # Request to create a scheduled message
    clientId: typing.Optional[int] = None
    sessionId: typing.Optional[str] = None
    templateId: typing.Optional[str] = None
    channel: typing.Optional[types.MessageChannel] = None
    subject: typing.Optional[str] = None
    body: typing.Optional[str] = None
    scheduledFor: typing.Optional[str] = None
    useAiSuggestion: typing.Optional[bool] = None
    autoApprove: typing.Optional[bool] = None
    transparencyIndicator: typing.Optional[str] = None
    transparencyDisplayName: typing.Optional[str] = None

class CurrentRead(BaseModel):
    # AI's current read/assessment of client
    assessment: typing.Optional[str] = None
    confidence: typing.Optional[float] = None
    lastUpdated: typing.Optional[str] = None

class ErrorPayload(BaseModel):
    # Payload for ERROR event
    code: typing.Optional[str] = None
    message: typing.Optional[str] = None
    details: typing.Dict[str, str]
    retryable: typing.Optional[bool] = None

class EventEnvelope(BaseModel):
    # Event envelope - all WebSocket messages MUST be wrapped in this
    type: typing.Optional[types.EventType] = None
    meta: typing.Optional["EventMeta"] = None
    payload: typing.Dict[str, str]

class EventMeta(BaseModel):
    # Metadata for every event (required for debugging/replay)
    timestamp: typing.Optional[str] = None
    correlationId: typing.Optional[str] = None
    contractsVersion: typing.Optional[str] = None
    actorId: typing.Optional[int] = None
    requestId: typing.Optional[str] = None

class FrontendActionResult(BaseModel):
    # Result reported back by frontend
    actionId: typing.Optional[str] = None
    status: typing.Optional[types.FrontendActionStatus] = None
    success: typing.Optional[bool] = None
    message: typing.Optional[str] = None
    error: typing.Optional["ActionError"] = None
    executedAt: typing.Optional[str] = None

class FrontendCommand(BaseModel):
    # Command sent to frontend via WebSocket
    actionId: typing.Optional[str] = None
    tool: typing.Optional[types.FrontendToolName] = None
    parameters: typing.Dict[str, str]
    timeout: typing.Optional[int] = None
    requiresConfirmation: typing.Optional[bool] = None

class FrontendCommandPayload(BaseModel):
    # Payload for FRONTEND_COMMAND event
    actionId: typing.Optional[str] = None
    tool: typing.Optional[str] = None
    parameters: typing.Dict[str, str]
    timeout: typing.Optional[int] = None
    requiresConfirmation: typing.Optional[bool] = None

class FrontendToolConfig(BaseModel):
    # Tool configuration for admin panel
    tool: typing.Optional[types.FrontendToolName] = None
    requiresConfirmation: typing.Optional[bool] = None
    defaultTimeout: typing.Optional[int] = None

class HeartbeatPayload(BaseModel):
    # Payload for HEARTBEAT event
    serverTime: typing.Optional[str] = None
    connectionAge: typing.Optional[int] = None

class IntegrationConfig(BaseModel):
    # Configuration for a single integration
    id: typing.Optional[str] = None
    coachId: typing.Optional[int] = None
    type: typing.Optional[types.IntegrationType] = None
    status: typing.Optional[types.IntegrationStatus] = None
    displayName: typing.Optional[str] = None
    accountEmail: typing.Optional[str] = None
    connectedAt: typing.Optional[str] = None
    lastSyncAt: typing.Optional[str] = None
    settings: typing.Dict[str, str]
    error: typing.Optional[str] = None

class IntegrationConnectRequest(BaseModel):
    # Request to initiate an integration connection
    type: typing.Optional[types.IntegrationType] = None
    redirectUrl: typing.Optional[str] = None

class IntegrationConnectResponse(BaseModel):
    # Response with OAuth URL
    success: typing.Optional[bool] = None
    authUrl: typing.Optional[str] = None
    error: typing.Optional[str] = None

class IntegrationDisconnectRequest(BaseModel):
    # Request to disconnect an integration
    integrationId: typing.Optional[str] = None

class IntegrationList(BaseModel):
    # List of coach's integrations
    integrations: typing.List["IntegrationConfig"]
    availableTypes: typing.List[types.IntegrationType]

class MessagePayload(BaseModel):
    # Payload for MESSAGE_RECEIVED and MESSAGE_SENT events
    conversationId: typing.Optional[str] = None
    role: typing.Optional[str] = None
    content: typing.Optional[str] = None
    timestamp: typing.Optional[str] = None

class NavigationOption(BaseModel):
    # Navigation option for available routes/actions
    label: typing.Optional[str] = None
    route: typing.Optional[str] = None
    icon: typing.Optional[str] = None

class ObservationEntry(BaseModel):
    # A single observation entry
    id: typing.Optional[str] = None
    type: typing.Optional[types.ObservationType] = None
    description: typing.Optional[str] = None
    evidence: typing.List[str]
    confidence: typing.Optional[float] = None
    detectedAt: typing.Optional[str] = None
    dismissed: typing.Optional[bool] = None
    dismissedBy: typing.Optional[str] = None
    dismissedAt: typing.Optional[str] = None

class ObservationPayload(BaseModel):
    # Payload for OBSERVATION_DETECTED event
    observationId: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    type: typing.Optional[str] = None
    description: typing.Optional[str] = None
    confidence: typing.Optional[float] = None

class OnboardingEventPayload(BaseModel):
    # Payload for ONBOARDING_* events
    coachId: typing.Optional[int] = None
    phase: typing.Optional[str] = None
    previousPhase: typing.Optional[str] = None
    overallProgress: typing.Optional[float] = None
    action: typing.Optional[str] = None
    timestamp: typing.Optional[str] = None

class OnboardingPhaseProgress(BaseModel):
    # Progress for a single onboarding phase
    phase: typing.Optional[types.OnboardingPhase] = None
    status: typing.Optional[types.PhaseStatus] = None
    startedAt: typing.Optional[str] = None
    completedAt: typing.Optional[str] = None
    skipped: typing.Optional[bool] = None
    skipReason: typing.Optional[str] = None
    data: typing.Dict[str, str]

class OnboardingProgress(BaseModel):
    # Overall onboarding progress
    coachId: typing.Optional[int] = None
    currentPhase: typing.Optional[types.OnboardingPhase] = None
    phases: typing.List["OnboardingPhaseProgress"]
    overallProgress: typing.Optional[float] = None
    startedAt: typing.Optional[str] = None
    completedAt: typing.Optional[str] = None
    estimatedTimeRemaining: typing.Optional[int] = None
    canSkipCurrent: typing.Optional[bool] = None

class OnboardingUpdateRequest(BaseModel):
    # Request to update onboarding progress
    phase: typing.Optional[types.OnboardingPhase] = None
    action: typing.Optional[types.OnboardingAction] = None
    data: typing.Dict[str, str]

class OnboardingUpdateResponse(BaseModel):
    # Response from onboarding update
    success: typing.Optional[bool] = None
    progress: typing.Optional["OnboardingProgress"] = None
    nextPhase: typing.Optional[types.OnboardingPhase] = None
    error: typing.Optional[str] = None

class PageContext(BaseModel):
    # Page context from extension content script
    url: typing.Optional[str] = None
    route: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    sessionId: typing.Optional[int] = None
    pageTitle: typing.Optional[str] = None
    pageData: typing.Dict[str, str]

class PriorityItemPayload(BaseModel):
    # Payload for PRIORITY_ITEM_* events
    itemId: typing.Optional[str] = None
    type: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    priority: typing.Optional[str] = None
    action: typing.Optional[str] = None

class PrivateIntelligence(BaseModel):
    # Complete private intelligence for a client
    clientId: typing.Optional[int] = None
    currentRead: typing.Optional["CurrentRead"] = None
    observations: typing.List["ObservationEntry"]
    coachPrivateNotes: typing.Optional[str] = None
    lastUpdated: typing.Optional[str] = None

class ProfileScrapeRequest(BaseModel):
    # Request to scrape coach profile
    urls: typing.List[str]
    linkedInUrl: typing.Optional[str] = None
    websiteUrl: typing.Optional[str] = None

class ProfileScrapeResponse(BaseModel):
    # Response from profile scraping
    success: typing.Optional[bool] = None
    profiles: typing.List["ScrapedCoachProfile"]
    mergedProfile: typing.Optional["ScrapedCoachProfile"] = None
    error: typing.Optional[str] = None

class ResolvedContext(BaseModel):
    # Resolved context (what the system understood from PageContext)
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    sessionDate: typing.Optional[str] = None
    confidence: typing.Optional[float] = None

class ResourceEventPayload(BaseModel):
    # Payload for RESOURCE_* events
    resourceId: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    type: typing.Optional[str] = None
    title: typing.Optional[str] = None
    action: typing.Optional[str] = None

class ResourceItem(BaseModel):
    # A single resource item
    id: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    coachId: typing.Optional[int] = None
    type: typing.Optional[types.ResourceType] = None
    title: typing.Optional[str] = None
    description: typing.Optional[str] = None
    fileUrl: typing.Optional[str] = None
    externalUrl: typing.Optional[str] = None
    thumbnailUrl: typing.Optional[str] = None
    tags: typing.List[str]
    metadata: typing.Optional["ResourceMetadata"] = None
    createdAt: typing.Optional[str] = None
    updatedAt: typing.Optional[str] = None

class ResourceListData(BaseModel):
    # Paginated resource list
    items: typing.List["ResourceItem"]
    total: typing.Optional[int] = None
    page: typing.Optional[int] = None
    pageSize: typing.Optional[int] = None
    nextPage: typing.Optional[int] = None

class ResourceMetadata(BaseModel):
    # Metadata for a resource item
    fileSize: typing.Optional[int] = None
    mimeType: typing.Optional[str] = None
    originalName: typing.Optional[str] = None
    linkTitle: typing.Optional[str] = None
    linkDescription: typing.Optional[str] = None
    linkImage: typing.Optional[str] = None

class ScheduledMessage(BaseModel):
    # Full representation of a scheduled message (API response)
    id: typing.Optional[str] = None
    coachId: typing.Optional[int] = None
    coachName: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    clientEmail: typing.Optional[str] = None
    sessionId: typing.Optional[str] = None
    sessionDate: typing.Optional[str] = None
    templateUsed: typing.Optional[str] = None
    channel: typing.Optional[types.MessageChannel] = None
    subject: typing.Optional[str] = None
    body: typing.Optional[str] = None
    scheduledFor: typing.Optional[str] = None
    aiSuggestedTime: typing.Optional[str] = None
    aiSuggestionReason: typing.Optional[str] = None
    status: typing.Optional[types.MessageStatus] = None
    approvedAt: typing.Optional[str] = None
    reviewedAt: typing.Optional[str] = None
    sentAt: typing.Optional[str] = None
    cancelledAt: typing.Optional[str] = None
    cancellationReason: typing.Optional[str] = None
    deliveryAttempts: typing.Optional[int] = None
    lastDeliveryError: typing.Optional[str] = None
    externalMessageId: typing.Optional[str] = None
    transparencyIndicator: typing.Optional[str] = None
    transparencyDisplayName: typing.Optional[str] = None
    canEdit: typing.Optional[bool] = None
    canCancel: typing.Optional[bool] = None
    canSend: typing.Optional[bool] = None
    createdAt: typing.Optional[str] = None
    updatedAt: typing.Optional[str] = None

class ScheduledMessageAuditEntry(BaseModel):
    # Audit log entry for message state changes
    id: typing.Optional[str] = None
    messageId: typing.Optional[str] = None
    action: typing.Optional[str] = None
    actorId: typing.Optional[int] = None
    actorName: typing.Optional[str] = None
    details: typing.Dict[str, str]
    createdAt: typing.Optional[str] = None

class ScheduledMessageEventPayload(BaseModel):
    # Payload for SCHEDULED_MESSAGE_* events
    messageId: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    channel: typing.Optional[str] = None
    subject: typing.Optional[str] = None
    scheduledFor: typing.Optional[str] = None
    status: typing.Optional[str] = None
    previousStatus: typing.Optional[str] = None

class ScheduledMessageFilter(BaseModel):
    # Filter parameters for listing messages
    status: typing.Optional[types.MessageStatus] = None
    channel: typing.Optional[types.MessageChannel] = None
    clientId: typing.Optional[int] = None
    sessionId: typing.Optional[str] = None
    fromDate: typing.Optional[str] = None
    toDate: typing.Optional[str] = None

class ScheduledMessageList(BaseModel):
    # Paginated list of scheduled messages
    items: typing.List["ScheduledMessage"]
    total: typing.Optional[int] = None
    page: typing.Optional[int] = None
    pageSize: typing.Optional[int] = None
    hasNext: typing.Optional[bool] = None

class ScheduledMessagePreferences(BaseModel):
    # User preferences for scheduled message handling
    preSendReviewEnabled: typing.Optional[bool] = None
    preSendReviewMinutes: typing.Optional[int] = None
    autoCancelIfClientResponds: typing.Optional[bool] = None
    defaultChannel: typing.Optional[types.MessageChannel] = None
    createdAt: typing.Optional[str] = None
    updatedAt: typing.Optional[str] = None

class ScrapedCoachProfile(BaseModel):
    # Scraped coach profile from external sources
    source: typing.Optional[str] = None
    sourceUrl: typing.Optional[str] = None
    name: typing.Optional[str] = None
    title: typing.Optional[str] = None
    bio: typing.Optional[str] = None
    certifications: typing.List[str]
    specialties: typing.List[str]
    yearsExperience: typing.Optional[int] = None
    photoUrl: typing.Optional[str] = None
    contactEmail: typing.Optional[str] = None
    scrapedAt: typing.Optional[str] = None
    confidence: typing.Optional[float] = None

class SessionContext(BaseModel):
    id: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    scheduledAt: typing.Optional[str] = None
    status: typing.Optional[str] = None
    t15Summary: typing.Optional[str] = None
    notes: typing.Optional[str] = None
    transcript: typing.Optional[str] = None
    runningNotes: typing.Optional[str] = None

class SessionEventPayload(BaseModel):
    # Payload for SESSION_* events
    sessionId: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    status: typing.Optional[str] = None
    scheduledAt: typing.Optional[str] = None

class SessionNotesDocument(BaseModel):
    # Full session notes document
    id: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    sessionDate: typing.Optional[str] = None
    sessionDuration: typing.Optional[int] = None
    sections: typing.List["SessionSectionContent"]
    summary: typing.Optional[str] = None
    keyInsights: typing.List[str]
    followUpDate: typing.Optional[str] = None
    generatedAt: typing.Optional[str] = None
    lastUpdatedAt: typing.Optional[str] = None
    status: typing.Optional[types.SessionNotesStatus] = None
    version: typing.Optional[int] = None

class SessionNotesEventPayload(BaseModel):
    # Payload for SESSION_NOTES_* events
    notesId: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    sessionDate: typing.Optional[str] = None
    action: typing.Optional[str] = None
    status: typing.Optional[str] = None
    previousStatus: typing.Optional[str] = None
    sectionsCompleted: typing.Optional[int] = None
    totalSections: typing.Optional[int] = None

class SessionNotesFilter(BaseModel):
    # Filter options for session notes list
    clientId: typing.Optional[int] = None
    status: typing.Optional[types.SessionNotesStatus] = None
    fromDate: typing.Optional[str] = None
    toDate: typing.Optional[str] = None
    searchQuery: typing.Optional[str] = None

class SessionNotesFinalizeRequest(BaseModel):
    # Request to finalize/approve session notes
    notesId: typing.Optional[str] = None
    shareWithCoachee: typing.Optional[bool] = None
    personalizedMessage: typing.Optional[str] = None

class SessionNotesFinalizeResponse(BaseModel):
    # Response from finalizing notes
    success: typing.Optional[bool] = None
    status: typing.Optional[types.SessionNotesStatus] = None
    sharedAt: typing.Optional[str] = None
    error: typing.Optional[str] = None

class SessionNotesList(BaseModel):
    # List of session notes with pagination
    items: typing.List["SessionNotesSummary"]
    total: typing.Optional[int] = None
    page: typing.Optional[int] = None
    pageSize: typing.Optional[int] = None

class SessionNotesRequest(BaseModel):
    # Request to generate session notes
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    transcript: typing.Optional[str] = None
    coachRunningNotes: typing.Optional[str] = None
    includeSections: typing.List[types.SessionNoteSection]
    regenerate: typing.Optional[bool] = None

class SessionNotesResponse(BaseModel):
    # Response containing generated session notes
    success: typing.Optional[bool] = None
    document: typing.Optional["SessionNotesDocument"] = None
    error: typing.Optional[str] = None
    warnings: typing.List[str]
    generationTimeMs: typing.Optional[int] = None

class SessionNotesSummary(BaseModel):
    # Lightweight summary for list views
    id: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    sessionDate: typing.Optional[str] = None
    status: typing.Optional[types.SessionNotesStatus] = None
    completedSections: typing.Optional[int] = None
    totalSections: typing.Optional[int] = None
    summary: typing.Optional[str] = None
    generatedAt: typing.Optional[str] = None

class SessionSectionContent(BaseModel):
    # Content for a single session note section
    section: typing.Optional[types.SessionNoteSection] = None
    title: typing.Optional[str] = None
    content: typing.Optional[str] = None
    bulletPoints: typing.List[str]
    aiGenerated: typing.Optional[bool] = None
    coachEdited: typing.Optional[bool] = None
    lastEditedAt: typing.Optional[str] = None

class SessionSectionUpdateRequest(BaseModel):
    # Request to update a specific section
    notesId: typing.Optional[str] = None
    section: typing.Optional[types.SessionNoteSection] = None
    content: typing.Optional[str] = None
    bulletPoints: typing.List[str]
    markAsEdited: typing.Optional[bool] = None

class SessionSectionUpdateResponse(BaseModel):
    # Response from section update
    success: typing.Optional[bool] = None
    updatedSection: typing.Optional["SessionSectionContent"] = None
    error: typing.Optional[str] = None

class StateHistoryEntry(BaseModel):
    # Historical state entry
    id: typing.Optional[str] = None
    userId: typing.Optional[int] = None
    page: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    sessionId: typing.Optional[str] = None
    source: typing.Optional[types.StateSource] = None
    createdAt: typing.Optional[str] = None

class StateHistoryQuery(BaseModel):
    # Request to query state history
    userId: typing.Optional[int] = None
    fromDate: typing.Optional[str] = None
    toDate: typing.Optional[str] = None
    limit: typing.Optional[int] = None

class StateUpdateRequest(BaseModel):
    # Request to update user's active state
    page: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    sessionId: typing.Optional[str] = None
    availableActions: typing.List[str]
    navigationOptions: typing.List["NavigationOption"]
    source: typing.Optional[types.StateSource] = None

class StateUpdateResponse(BaseModel):
    # Response from state update
    success: typing.Optional[bool] = None
    stateId: typing.Optional[str] = None

class SuggestedAction(BaseModel):
    # Suggested action (Phase 2+)
    tool: typing.Optional[types.ToolName] = None
    label: typing.Optional[str] = None
    description: typing.Optional[str] = None
    parameters: typing.Dict[str, str]
    requiresConfirmation: typing.Optional[bool] = None

class T15PrepDocument(BaseModel):
    # Full T-15 prep document
    id: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    scheduledAt: typing.Optional[str] = None
    sections: typing.List["T15SectionContent"]
    overallReadiness: typing.Optional[str] = None
    generatedAt: typing.Optional[str] = None
    lastUpdatedAt: typing.Optional[str] = None
    version: typing.Optional[int] = None

class T15PrepEventPayload(BaseModel):
    # Payload for T15_PREP_* events
    prepId: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    scheduledAt: typing.Optional[str] = None
    action: typing.Optional[str] = None
    sectionsCompleted: typing.Optional[int] = None
    totalSections: typing.Optional[int] = None
    overallReadiness: typing.Optional[str] = None

class T15PrepList(BaseModel):
    # List of T-15 preps with pagination
    items: typing.List["T15PrepSummary"]
    total: typing.Optional[int] = None
    page: typing.Optional[int] = None
    pageSize: typing.Optional[int] = None

class T15PrepRequest(BaseModel):
    # Request to generate a T-15 prep document
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    includeSections: typing.List[types.T15PrepSection]
    regenerate: typing.Optional[bool] = None
    focusAreas: typing.List[str]

class T15PrepResponse(BaseModel):
    # Response containing generated T-15 prep
    success: typing.Optional[bool] = None
    document: typing.Optional["T15PrepDocument"] = None
    error: typing.Optional[str] = None
    warnings: typing.List[str]
    generationTimeMs: typing.Optional[int] = None

class T15PrepSummary(BaseModel):
    # Lightweight summary for list views
    id: typing.Optional[str] = None
    sessionId: typing.Optional[int] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    scheduledAt: typing.Optional[str] = None
    generatedAt: typing.Optional[str] = None
    completedSections: typing.Optional[int] = None
    totalSections: typing.Optional[int] = None
    overallReadiness: typing.Optional[str] = None

class T15SectionContent(BaseModel):
    # Content for a single T-15 section
    section: typing.Optional[types.T15PrepSection] = None
    title: typing.Optional[str] = None
    content: typing.Optional[str] = None
    bulletPoints: typing.List[str]
    priority: typing.Optional[int] = None
    aiConfidence: typing.Optional[float] = None

class T15SectionUpdateRequest(BaseModel):
    # Request to update a specific section
    prepId: typing.Optional[str] = None
    section: typing.Optional[types.T15PrepSection] = None
    content: typing.Optional[str] = None
    bulletPoints: typing.List[str]
    coachNotes: typing.Optional[str] = None

class T15SectionUpdateResponse(BaseModel):
    # Response from section update
    success: typing.Optional[bool] = None
    updatedSection: typing.Optional["T15SectionContent"] = None
    error: typing.Optional[str] = None

class TonePreference(BaseModel):
    # Tone preference configuration
    tone: typing.Optional[str] = None
    weight: typing.Optional[float] = None

class ToolDefinition(BaseModel):
    name: typing.Optional[types.ToolName] = None
    description: typing.Optional[str] = None
    parameters: typing.List["ToolParameter"]
    requiresConfirmation: typing.Optional[bool] = None
    outputType: typing.Optional[str] = None

class ToolParameter(BaseModel):
    name: typing.Optional[str] = None
    type: typing.Optional[str] = None
    description: typing.Optional[str] = None
    required: typing.Optional[bool] = None
    default: typing.Optional[str] = None

class TransparentMessage(BaseModel):
    # Message with transparency metadata
    content: typing.Optional[str] = None
    indicator: typing.Optional[types.TransparencyIndicator] = None
    coachName: typing.Optional[str] = None
    approvedAt: typing.Optional[str] = None

class UpdatePreferencesRequest(BaseModel):
    # Request to update preferences
    preSendReviewEnabled: typing.Optional[bool] = None
    preSendReviewMinutes: typing.Optional[int] = None
    autoCancelIfClientResponds: typing.Optional[bool] = None
    defaultChannel: typing.Optional[types.MessageChannel] = None

class UpdateResourceRequest(BaseModel):
    # Request to update an existing resource
    title: typing.Optional[str] = None
    description: typing.Optional[str] = None
    tags: typing.List[str]
    externalUrl: typing.Optional[str] = None

class UpdateScheduledMessageRequest(BaseModel):
    # Request to update a scheduled message
    subject: typing.Optional[str] = None
    body: typing.Optional[str] = None
    scheduledFor: typing.Optional[str] = None
    channel: typing.Optional[types.MessageChannel] = None

class UserActiveState(BaseModel):
    # Current user state (broadcast via WebSocket)
    page: typing.Optional[str] = None
    clientId: typing.Optional[int] = None
    clientName: typing.Optional[str] = None
    sessionId: typing.Optional[str] = None
    sessionDate: typing.Optional[str] = None
    availableActions: typing.List[str]
    navigationOptions: typing.List["NavigationOption"]
    source: typing.Optional[types.StateSource] = None
    lastUpdated: typing.Optional[str] = None

class VoiceCorrection(BaseModel):
    # A single voice correction record
    id: typing.Optional[str] = None
    originalContent: typing.Optional[str] = None
    editedContent: typing.Optional[str] = None
    editType: typing.Optional[types.EditType] = None
    coachFeedback: typing.Optional[types.CoachFeedback] = None
    contentType: typing.Optional[types.VoiceContentType] = None
    sessionId: typing.Optional[str] = None
    timestamp: typing.Optional[str] = None

class VoiceCorrectionRequest(BaseModel):
    # Request to submit a voice correction
    sessionId: typing.Optional[str] = None
    originalContent: typing.Optional[str] = None
    editedContent: typing.Optional[str] = None
    editType: typing.Optional[types.EditType] = None
    coachFeedback: typing.Optional[types.CoachFeedback] = None
    contentType: typing.Optional[types.VoiceContentType] = None

class VoiceCorrectionResponse(BaseModel):
    # Response from submitting a voice correction
    success: typing.Optional[bool] = None
    voiceConfidenceAfter: typing.Optional[float] = None
    improvementNote: typing.Optional[str] = None
    correctionId: typing.Optional[str] = None

class VoiceEventPayload(BaseModel):
    # Payload for VOICE_* events
    correctionId: typing.Optional[str] = None
    voiceConfidence: typing.Optional[float] = None
    contentType: typing.Optional[str] = None

class VoiceProfile(BaseModel):
    # Coach's voice profile
    coachId: typing.Optional[int] = None
    voiceConfidence: typing.Optional[float] = None
    totalCorrections: typing.Optional[int] = None
    vocabularyPatterns: typing.List[str]
    avoidPatterns: typing.List[str]
    tonePreferences: typing.List["TonePreference"]
    recentEdits: typing.List["VoiceCorrection"]
    lastTrainedAt: typing.Optional[str] = None

class VoiceProfileConfig(BaseModel):
    # Voice profile configuration (for onboarding setup)
    coachId: typing.Optional[int] = None
    minSamplesRequired: typing.Optional[int] = None
    currentSampleCount: typing.Optional[int] = None
    sampleTypes: typing.List[types.VoiceContentType]
    trainingStatus: typing.Optional[types.VoiceTrainingStatus] = None
    estimatedConfidence: typing.Optional[float] = None
    canStartTraining: typing.Optional[bool] = None
    lastUpdated: typing.Optional[str] = None

class VoiceSample(BaseModel):
    # A single voice sample for training
    id: typing.Optional[str] = None
    coachId: typing.Optional[int] = None
    type: typing.Optional[types.VoiceSampleType] = None
    content: typing.Optional[str] = None
    context: typing.Optional[str] = None
    isPreferred: typing.Optional[bool] = None
    submittedAt: typing.Optional[str] = None
    processedAt: typing.Optional[str] = None
    processingStatus: typing.Optional[types.VoiceSampleStatus] = None

class VoiceSampleInput(BaseModel):
    # Input for a single voice sample
    type: typing.Optional[types.VoiceSampleType] = None
    content: typing.Optional[str] = None
    context: typing.Optional[str] = None
    isPreferred: typing.Optional[bool] = None

class VoiceSampleSubmitRequest(BaseModel):
    # Request to submit voice samples
    samples: typing.List["VoiceSampleInput"]

class VoiceSampleSubmitResponse(BaseModel):
    # Response from voice sample submission
    success: typing.Optional[bool] = None
    submittedCount: typing.Optional[int] = None
    sampleIds: typing.List[str]
    voiceProfileStatus: typing.Optional[str] = None
    minimumSamplesRequired: typing.Optional[int] = None
    currentSampleCount: typing.Optional[int] = None
    error: typing.Optional[str] = None

class VoiceSamplesPayload(BaseModel):
    # Payload for VOICE_SAMPLES_SUBMITTED event
    coachId: typing.Optional[int] = None
    sampleCount: typing.Optional[int] = None
    totalSamples: typing.Optional[int] = None
    sampleTypes: typing.List[str]
    voiceProfileStatus: typing.Optional[str] = None

# #########################################################################
# Generated type aliases (0)
# #########################################################################
