Appearance
Typescript SDK - Chat API
About 173 wordsLess than 1 minute
Comprehensive code examples for the Stream chat typescript SDK.
Quick Navigation
- Chat (56 methods)
- Common (35 methods)
- Moderation (12 methods)
- Types Reference - interfaces for API requests/responses
Overview
This documentation covers 103 API methods across 3 categories.
Installation
npm install stream-chat
# or
yarn add stream-chatBasic Setup
import { StreamChat } from "stream-chat";
// Initialize the client
const client = StreamChat.getInstance("YOUR_API_KEY");
// Connect the user
await client.connectUser({ id: "john" }, "USER_TOKEN");Categories
Chat
queryChannels()- Query channelsdeleteChannels()- Deletes channels asynchronouslymarkDelivered()- Mark channel message delivery statusmarkChannelsRead()- Mark channels as readgetOrCreateDistinctChannel()- Get or create channel- ... and 51 more methods
Common
getApp()- Get App SettingslistBlockLists()- List block listscreateBlockList()- Create block listupdateBlockList()- Update block listdeleteBlockList()- Delete block list- ... and 30 more methods
Moderation
appeal()- Appeal against the moderation decisiongetAppeal()- Get appeal itemqueryAppeals()- Query Appealsban()- BanupsertConfig()- Create or update moderation configuration- ... and 7 more methods
Generated from Stream OpenAPI specification