from typing_extensions import TypedDict
from .schemas import SentimentResult, IssueResult, RiskResult, RoutingResult, FinalAnalysis


class FeedbackState(TypedDict, total=False):
    customer_id: str
    feedback: str

    # Each parallel worker writes to its own state key.
    sentiment_result: SentimentResult
    issue_result: IssueResult
    risk_result: RiskResult
    routing_result: RoutingResult

    final_analysis: FinalAnalysis
