import { Message } from '../../common/domain'; export interface MessageResponse { id: string; chat_id: string; sender_id: string; text: string; created_at: string; } export interface MessagePageResponse { items: MessageResponse[]; next_cursor: string | null; } export function toMessageResponse(message: Message): MessageResponse { return { id: message.id, chat_id: message.chatId, sender_id: message.senderId, text: message.text, created_at: message.createdAt, }; }