from __future__ import annotations

from typing import Any, Dict, Optional, TypedDict


class GuardResponse(TypedDict, total=False):
    allowed: bool
    reason: str
    detected_pii: bool
    transformed_input: str
    fail_open: bool
    guard_event_id: str
    client_event_id: str


class GuardParams(TypedDict, total=False):
    input: str
    system_id: str
    user_id: str
    client_event_id: str
    client_capabilities: Dict[str, Any]


class LogParams(TypedDict, total=False):
    event_id: str
    system_id: str
    input: str
    output: str
    model: str
    usage: Dict[str, Any]
    tokens: Dict[str, Any]
    latency: int
    user_id: str
    metadata: Dict[str, Any]
    event_type: str
    severity: str
    timestamp: str
    client_capabilities: Dict[str, Any]
