from .common import apply_states_filters as apply_states_filters, legacy_select_events_context_id as legacy_select_events_context_id, select_events_without_states as select_events_without_states, select_states as select_states
from homeassistant.components.recorder.db_schema import Events as Events, LAST_UPDATED_INDEX_TS as LAST_UPDATED_INDEX_TS, States as States
from sqlalchemy.orm import Query as Query
from sqlalchemy.sql.elements import ClauseList as ClauseList
from sqlalchemy.sql.lambdas import StatementLambdaElement as StatementLambdaElement

def all_stmt(start_day: float, end_day: float, event_types: tuple[str, ...], states_entity_filter: Union[ClauseList, None] = ..., events_entity_filter: Union[ClauseList, None] = ..., context_id: Union[str, None] = ...) -> StatementLambdaElement: ...
def _states_query_for_all(start_day: float, end_day: float) -> Query: ...
def _apply_all_hints(query: Query) -> Query: ...
def _states_query_for_context_id(start_day: float, end_day: float, context_id: str) -> Query: ...
