-
Notifications
You must be signed in to change notification settings - Fork 3
/
types.ts
37 lines (35 loc) · 974 Bytes
/
types.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
export type Anon = {
id: number
backgrounds: string
basePerson: string
head: string
eyes: string
clothes: string
ears: string
mouth: string
specialNote?: string
imageUrl: string
revealed: boolean
}
export type TraitRarity = { count: number; totalPercent: number; score: number }
export type CategoryRarity = { [trait: string]: TraitRarity }
export type AnonRarity = { score: number; rank: number }
export type AnonsRarity = {
anons: { [id: number]: AnonRarity }
categories: { [category: string]: CategoryRarity }
traitsAmountRarity: { [traitsCount: string]: { count: number; percent: number } }
}
export type AnonTraitInfo = TraitRarity & { name: string }
export type AnonWithRarity = Anon & {
rarity: AnonRarity & {
traits: {
backgrounds: AnonTraitInfo
basePerson: AnonTraitInfo
head: AnonTraitInfo
eyes: AnonTraitInfo
clothes: AnonTraitInfo
ears: AnonTraitInfo
mouth: AnonTraitInfo
}
}
}