from __future__ import annotations

from app.modules.api.domain.events.client_event import ClientEventRecord
from app.schemas.client_events import ClientEventType


class UserMessageFactory:
    def create(self, request_id: str, source: str, text: str, payload: dict | None = None) -> ClientEventRecord:
        return ClientEventRecord(
            request_id=request_id,
            type=ClientEventType.USER,
            source=source,
            text=text,
            payload=payload or {},
        )
