"""Type definitions for OctaMem SDK."""

from __future__ import annotations

from pydantic import BaseModel, ConfigDict
from typing_extensions import TypedDict


class GetParams(TypedDict, total=False):
    """Parameters for the get method (search)."""

    query: str
    previousContext: str


class AddParams(TypedDict, total=False):
    """Parameters for the add method."""

    content: str
    previousContext: str


class DetailsParams(TypedDict, total=False):
    """Parameters for the details method."""

    pass


class MemoryDetails(BaseModel):
    """Response model for memory details."""

    model_config = ConfigDict(extra="allow")

    usage: int | None = None
    limit: int | None = None


class SearchResult(BaseModel):
    """Response model for search results."""

    model_config = ConfigDict(extra="allow")

    pending_id: str | None = None


class AddResult(BaseModel):
    """Response model for add operation."""

    model_config = ConfigDict(extra="allow")

    success: bool = True
