Codewise
Courses
My learning
Ideas
Leaderboard
YouTube
Courses
My learning
Ideas
Leaderboard
YouTube
Sign in
services/chat-service/src/types/message.ts · Chat App Microservices | Codewise
Chat App Microservices
chatapp
/
services
/
chat-service
/
src
/
types
/
message.ts
message.ts
39 lines, 657 B
Raw
1
export
interface
Reaction
{
2
emoji
:
string
;
3
userId
:
string
;
4
createdAt
:
Date
;
5
}
6
7
export
interface
Message
{
8
id
:
string
;
9
conversationId
:
string
;
10
senderId
:
string
;
11
body
:
string
;
12
createdAt
:
Date
;
13
reactions
:
Reaction
[];
14
}
15
16
export
interface
CreateMessageInput
{
17
conversationId
:
string
;
18
senderId
:
string
;
19
body
:
string
;
20
}
21
22
export
interface
MessageListOptions
{
23
limit
?:
number
;
24
after
?:
Date
;
25
}
26
27
export
interface
AddReactionInput
{
28
messageId
:
string
;
29
conversationId
:
string
;
30
userId
:
string
;
31
emoji
:
string
;
32
}
33
34
export
interface
RemoveReactionInput
{
35
messageId
:
string
;
36
conversationId
:
string
;
37
userId
:
string
;
38
emoji
:
string
;
39
}