Repository navigation
Expand file tree
/
Copy pathinterfaces.ts
More file actions
155 lines (137 loc) · 3.49 KB
/
Copy pathinterfaces.ts
File metadata and controls
155 lines (137 loc) · 3.49 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/**
* The most simple character structure, used primarily for listing your characters on the log-in selector.
*
* Character name, unique ID, and whether or not the character exists.
*
* Comment imported from Frolic; may be inaccurate if significant changes occured.
*/
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;
}
/**
* Public character page. Why does this extend SimpleCharacter? Investigate usage.
*
* @see [file://site/character_page/interfaces.ts](site/character_page/interfaces.ts)
*
* Comment imported from Frolic; may be inaccurate if significant changes occured.
*/
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;
smoothMosaics: 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> };
}