AsyncAPI schema for Socket.IO events used by ChatApp.
Local backend server (Socket.IO endpoint /socket.io).
Client joins a chat room to receive realtime chat events.
Available only on servers:
Accepts the following message:
string
Client leaves a chat room.
Available only on servers:
Accepts the following message:
string
Client notifies it started typing. Server broadcasts to other members in the same chat room.
Available only on servers:
Accepts the following message:
string
Client notifies it started typing. Server broadcasts to other members in the same chat room.
Available only on servers:
Accepts the following message:
{
"chatId": "string",
"userId": "string",
"username": "string"
}
Client notifies it stopped typing. Server broadcasts to other members in the same chat room.
Available only on servers:
Accepts the following message:
string
Client notifies it stopped typing. Server broadcasts to other members in the same chat room.
Available only on servers:
Accepts the following message:
{
"chatId": "string",
"userId": "string",
"username": "string"
}
New message created in a chat where the user participates.
Available only on servers:
Accepts the following message:
{
"id": "string",
"chatId": "string",
"senderId": "string",
"content": "string",
"fileUrl": "string",
"fileName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"sender": {
"id": "string",
"username": "string"
}
}
Sidebar chat summary update (last message + unread count).
Available only on servers:
Accepts the following message:
{
"chatId": "string",
"unreadCount": 0,
"message": {
"id": "string",
"chatId": "string",
"senderId": "string",
"content": "string",
"fileUrl": "string",
"fileName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"sender": {
"id": "string",
"username": "string"
}
}
}
Full chat object update for active views.
Available only on servers:
Accepts the following message:
{
"id": "string",
"isGroup": true,
"name": "string",
"profilePic": "string",
"createdAt": "2019-08-24T14:15:22Z",
"users": [
{
"userId": "string",
"chatId": "string",
"unreadCount": 0,
"joinedAt": "2019-08-24T14:15:22Z",
"user": {
"id": "string",
"username": "string",
"profilePic": "string",
"lastSeen": "2019-08-24T14:15:22Z",
"online": true
}
}
],
"unreadCount": 0,
"messages": [
{
"id": "string",
"chatId": "string",
"senderId": "string",
"content": "string",
"fileUrl": "string",
"fileName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"sender": {
"id": "string",
"username": "string"
}
}
]
}
User has been added to a newly created chat.
Available only on servers:
Accepts the following message:
{
"id": "string",
"isGroup": true,
"name": "string",
"profilePic": "string",
"createdAt": "2019-08-24T14:15:22Z",
"users": [
{
"userId": "string",
"chatId": "string",
"unreadCount": 0,
"joinedAt": "2019-08-24T14:15:22Z",
"user": {
"id": "string",
"username": "string",
"profilePic": "string",
"lastSeen": "2019-08-24T14:15:22Z",
"online": true
}
}
],
"unreadCount": 0,
"messages": [
{
"id": "string",
"chatId": "string",
"senderId": "string",
"content": "string",
"fileUrl": "string",
"fileName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"sender": {
"id": "string",
"username": "string"
}
}
]
}
Chat has been deleted.
Available only on servers:
Accepts the following message:
Deleted chat ID.
string
Presence update for a related user.
Available only on servers:
Accepts the following message:
{
"userId": "string",
"online": true,
"lastSeen": "2019-08-24T14:15:22Z"
}
Chat ID.
Deleted chat ID.