@quickscores/chat
v0.4.1
Published
Shared chat types and Zod schemas for QuickScores (RN, web)
Readme
@quickscores/chat
Shared TypeScript types and Zod schemas for the QuickScores chat API. Use from React Native or web apps that call the chat endpoints.
Install
pnpm add @quickscores/chatUsage
import {
threadSchema,
threadKindSchema,
threadListRowSchema,
messageSchema,
type Thread,
type ThreadKind,
type ThreadListRow,
type Message,
type CreateThreadBody,
type SendMessageBody,
type ThreadResponse,
type MessageResponse,
type ErrorResponse,
} from "@quickscores/chat";- Domain types:
Thread,ThreadKind,ThreadListRow,Message— use with the matching Zod schemas for validation. - API types:
CreateThreadBody,LeagueRoomBody,TeamRoomBody,SendMessageBody,MarkReadBody,ThreadResponse,MessageResponse,MarkReadResponse,ErrorResponse— for request/response typing.
Types and schemas stay in sync with the chat backend and API docs in the source repo.
Repository
Source and backend docs: github.com/quickscores/App2.0-Chat. If you’re developing this package or the chat service, see DEVELOPING.md in the repo.
