"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .sortdirection import SortDirection
from mixpeek.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class SortOptionTypedDict(TypedDict):
    r"""Specifies how to sort query results.

    Attributes:
    field: Field to sort by
    direction: Sort direction (ascending or descending)
    """

    field: str
    r"""Field to sort by, supports dot notation for nested fields"""
    direction: NotRequired[SortDirection]
    r"""Sort direction options."""


class SortOption(BaseModel):
    r"""Specifies how to sort query results.

    Attributes:
    field: Field to sort by
    direction: Sort direction (ascending or descending)
    """

    field: str
    r"""Field to sort by, supports dot notation for nested fields"""

    direction: Optional[SortDirection] = None
    r"""Sort direction options."""
