# ----------------------------------------------------------------------------
#
#  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
from enum import Enum

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

CheckT = typing_extensions.TypeVar("CheckT")
CheckName = typing_extensions.TypeVar("CheckName", bound=str)


class Check(BaseModel):
    name: str
    expression: str
    status: str


class Checked(BaseModel, typing.Generic[CheckT, CheckName]):
    value: CheckT
    checks: typing.Dict[CheckName, Check]


def get_checks(checks: typing.Dict[CheckName, Check]) -> typing.List[Check]:
    return list(checks.values())


def all_succeeded(checks: typing.Dict[CheckName, Check]) -> bool:
    return all(check.status == "succeeded" for check in get_checks(checks))


# #########################################################################
# Generated enums (0)
# #########################################################################

# #########################################################################
# Generated classes (3)
# #########################################################################


class ChunkInput(BaseModel):
    chunk_id: str
    symbol: str
    node_type: str
    line_start: int
    line_end: int
    content: str


class ChunkSummary(BaseModel):
    chunk_id: str
    summary: str


class FileSummaryResult(BaseModel):
    summaries: typing.List["ChunkSummary"]


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