/
san.d.ts
258 lines (237 loc) · 6.18 KB
/
san.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
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
declare interface Display extends Electron.Display {
primary: boolean
}
declare interface Monitor {
id: number,
label: string,
primary: boolean,
bounds: {
width: number,
height: number
},
scaleFactor: number
}
declare interface Res {
msg: string,
dims: {
width: number,
height: number,
offset: number
}
}
interface SANHelper {
[key: string]: function | boolean | number | string | Promise<any> | undefined
}
declare interface Config {
lang: string,
desktop: boolean,
startwin: boolean,
startmin: boolean,
nohwa: boolean,
litemode: boolean,
rarity: number,
soundonly: boolean,
showpercent: "rareonly" | "all" | "off",
extwin: boolean,
audiosrc: "notify" | "app" | "off",
nowtracking: boolean,
nowtrackingscale: number,
shortcuts: boolean,
steamss: boolean,
screenshots: "off" | "overlay" | "notifyimg",
monitor: number,
monitors: Monitor[],
ssdelay: number,
ovpath: string,
imgpath: string,
noanim: boolean,
nvda: boolean,
tooltips: boolean,
notifydebug: boolean,
pollrate: number,
maxretries: number,
releasedelay: number,
width: number,
height: number,
x: number,
y: number,
usecustomfiles: boolean,
noreleasedialog: boolean,
norestartdialog: boolean,
userust: boolean,
debug: boolean,
noiconcache: boolean,
exclusions: number[],
customisation: {
main: Customisation,
rare: Customisation,
plat: Customisation,
[key: string]: object
},
[key: string]: string | number | boolean | object
}
declare interface Customisation {
soundmode: "file" | "folder",
soundfile: string,
sounddir: string,
volume: number,
preset: string,
displaytime: number,
scale: number,
customtext: string,
usegametitle: boolean,
bgstyle: "solid" | "gradient" | "bgimg" | "gameart",
gradientangle: number,
bgimg: string,
bgimgbrightness: number,
brightness: number,
roundness: number,
fontsize: number,
opacity: number,
bgonly: boolean,
fontcolor: string,
fontoutline: boolean,
fontoutlinecolor: string,
fontshadow: boolean,
fontshadowcolor: string,
iconroundness: number,
usegameicon: boolean,
customicons: { [key: string]: CustomIcon | string },
showdecoration: boolean,
pos: "bottomcenter" | "topcenter" | "topleft" | "topright" | "bottomleft" | "bottomright",
usecustompos: boolean,
custompos: {
x: number,
y: number
},
animdir: "up" | "down" | "left" | "right",
ovpos: "bottomcenter" | "topcenter" | "topleft" | "topright" | "bottomleft" | "bottomright",
ovmatch: boolean,
alldetails: boolean,
primarycolor: string,
secondarycolor: string,
tertiarycolor: string,
gameart: string,
shortcut: string,
customfont: string
iconanim?: boolean,
showhiddenicon: boolean,
replacelogo: boolean,
hiddenicon: string,
previewhiddenicon: boolean,
usepercent: boolean,
usertheme: Button[],
[key: string]: string | number | boolean | object
}
declare interface CustomIcon {
[key: string]: string,
logo: string | string[] | null,
decoration: string | string[] | null,
plat?: string | string[] | null,
}
declare interface GameData {
appid: number,
gamename?: string,
exepath?: string,
pid: number,
pollrate?: number
}
declare interface Achievement {
unlocked: boolean,
apiname: string,
name: string,
desc: string,
percent: number,
hidden: boolean
}
declare interface Notify extends Achievement {
id: number,
type: "main" | "rare" | "plat",
customisation: Customisation,
icon: string,
gamename: string | null
}
declare interface Dialog {
type: "default" | "selection" | "menu",
title: string,
sub?: string | string[],
addHTML?: string,
icon?: string,
buttons?: Button[]
}
declare interface Button {
id: string | number,
label: string,
icon: string,
customisation?: Customisation,
click?: Function,
enabled?: boolean
}
declare interface WinType {
type: "BrowserWindow" | "Notification",
notify: Notify,
options: Electron.BrowserWindowConstructorOptions | Electron.NotificationConstructorOptions
}
declare interface Info {
info: BuildNotifyInfo,
customisation: Customisation,
iswebview: "customiser" | "sspreview" | "ss" | null,
steampath: string | null,
skipaudio?: boolean
}
declare interface BuildNotifyInfo {
id: number,
type: "main" | "rare" | "plat",
gamename: string | null,
appid: number,
apiname: string,
unlockmsg: string,
title: string,
desc: string,
icon: string,
percent: {
value: number,
rarity: number,
showpercent: "rareonly" | "all" | "off"
},
hidden: boolean
}
declare interface Positions {
topleft: { x: number | "start" | "center" | "end", y: number | "start" | "center" | "end" },
topcenter: { x: number | "start" | "center" | "end", y: number | "start" | "center" | "end" },
topright: { x: number | "start" | "center" | "end", y: number | "start" | "center" | "end" },
bottomleft: { x: number | "start" | "center" | "end", y: number | "start" | "center" | "end" },
bottomcenter: { x: number | "start" | "center" | "end", y: number | "start" | "center" | "end" },
bottomright: { x: number | "start" | "center" | "end", y: number | "start" | "center" | "end" }
}
declare interface ProcessInfo {
pid: number,
exe: string
}
declare interface AppInfo {
appid: number,
status?: "Active" | "Released",
gamename?: string | null
pollrate?: number,
releasedelay?: number,
maxretries?: number,
userust?: boolean,
debug?: boolean,
noiconcache?: boolean
}
declare interface DebugInfo extends AppInfo {
username?: string,
steam3id?: number,
steam64id?: string,
releasedelay?: number,
processes: ProcessInfo[] | DebugProcessInfo[]
}
declare interface DebugProcessInfo extends ProcessInfo {
active: boolean
}
declare interface AchievementIcon {
handle: any,
width: number,
height: number
}
declare module "simple-vdf"