forked from f-list/exported
-
Notifications
You must be signed in to change notification settings - Fork 19
/
interfaces.ts
136 lines (118 loc) · 2.99 KB
/
interfaces.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
export interface SimpleCharacter {
id: number
name: string
deleted: boolean
}
export interface InlineImage {
id: number
name: string
hash: string
extension: string
nsfw: boolean
}
export type CharacterImage = CharacterImageOld | CharacterImageNew;
export interface CharacterImageNew {
id: number
extension: string
description: string
hash: string
sort_order: number | null
}
export interface CharacterImageOld {
id: number
extension: string
hash: string
height: number
width: number
description: string
sort_order: number | null
url: string
}
export type InfotagType = 'number' | 'text' | 'list';
export interface CharacterInfotag {
list?: number
string?: string
number?: number
}
export interface Infotag {
id: number
name: string
type: InfotagType
search_field: string
validator?: string
allow_legacy: boolean
infotag_group: number
}
export interface Character extends SimpleCharacter {
id: number
name: string
title: string
description: string
kinks: {[key: number]: KinkChoice | number | undefined}
inlines: {[key: string]: InlineImage}
customs: {[key: string]: CustomKink | undefined}
infotags: {[key: number]: CharacterInfotag | undefined}
created_at: number
updated_at: number
views: number
last_online_at?: number
timezone?: number
image_count?: number
online_chat?: boolean
}
export type KinkChoice = 'favorite' | 'yes' | 'maybe' | 'no';
export interface CharacterSettings {
readonly customs_first: boolean
readonly show_friends: boolean
readonly show_badges: boolean
readonly guestbook: boolean
readonly block_bookmarks: boolean
readonly public: boolean
readonly moderate_guestbook: boolean
readonly hide_timezone: boolean
readonly hide_contact_details: boolean
}
export interface Kink {
id: number
name: string
description: string
kink_group: number
}
export interface CustomKink {
id: number
name: string
choice: KinkChoice
description: string
}
export interface KinkGroup {
id: number
name: string
description: string
sort_order: number
}
export interface InfotagGroup {
id: number
name: string
description: string
sort_order: number
}
export interface ListItem {
id: number
name: string
value: string
sort_order: number
}
export const enum InlineDisplayMode {DISPLAY_ALL, DISPLAY_SFW, DISPLAY_NONE}
export interface Settings {
animateEicons: boolean
inlineDisplayMode: InlineDisplayMode
defaultCharacter: number
fuzzyDates: boolean
}
export interface SharedDefinitions {
readonly listItems: {readonly [key: string]: Readonly<ListItem>}
readonly kinks: {readonly [key: string]: Readonly<Kink>}
readonly kinkGroups: {readonly [key: string]: Readonly<KinkGroup>}
readonly infotags: {readonly [key: string]: Readonly<Infotag>}
readonly infotagGroups: {readonly [key: string]: Readonly<InfotagGroup>}
}