# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .audit_log import AuditLog
from .search_query_response import SearchQueryResponse
from .source_distribution import SourceDistribution


class DashboardStats(UniversalBaseModel):
    total_assets_indexed: int
    active_agents: int
    active_contexts: int
    total_queries: int
    sync_success_rate: float
    stale_item_count: int
    knowledge_gaps: typing.List[SearchQueryResponse]
    recent_uploads: typing.List[AuditLog]
    source_distribution: typing.List[SourceDistribution]

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
