-
Notifications
You must be signed in to change notification settings - Fork 0
/
entities.ts
40 lines (35 loc) · 927 Bytes
/
entities.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
type KindTitter = 'titter' | 'retitter' | 'quote'
export type FilterType = 'all' | 'following' | 'user' | 'me'
export interface User {
id: string
name: string
username: string
bio: string
birthday: string
location: string
createdAt: string
}
export interface Profile extends User {
showFollowButton: boolean
loggedUserFollowProfile: boolean
profileFollowLoggedUser: boolean
followersCount: number
followingCount: number
tittersCount: number
}
export interface Titter {
id: string
createdAt: string
user: Pick<User, 'id' | 'name' | 'username'>
kind: KindTitter
body?: string
referencedTitter: Partial<Titter>
}
export interface TitterPayload extends Partial<Titter> {}
export interface TitterFeed extends Titter {
retitter: { data: string[]; count: number }
quote: { data: string[]; count: number }
loggedUserQuoted: boolean
loggedUserRetittered: boolean
sameUser: boolean
}