-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.d.ts
65 lines (59 loc) · 1.06 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
export type PersonProfileType = {
_id: string;
name: string;
bio: string;
profilePhoto: string;
};
export interface BasicPostInterface {
_id: string;
thread: string;
image: string;
likes: number;
liked: boolean;
commentsLength: number;
comments?: [];
createdAt: string;
}
export interface PostType extends BasicPostInterface {
creator: {
_id: string;
name: string;
profilePhoto: string;
};
}
export type CommentsType = {
_id: string;
createdBy: {
_id: string;
name: string;
profilePhoto: string;
};
message: string;
createdAt: Date;
};
export type NotificationType = {
_id: string;
message: string;
read: boolean;
createdAt: Date;
destination: string;
};
export type ActiveConversationType = {
conversationId: string;
otherUserId?: string;
};
export type ConversationType = {
conversationId: string;
lastMessage: {
time: string;
message: string;
};
user: {
_id: string;
name: string;
profilePhoto: string;
};
};
export interface MessageObject {
[key: string]: string;
}