@hotbunny/hackhub-content-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +252 -0
- package/index.d.ts +1460 -0
- package/package.json +26 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,1460 @@
|
|
|
1
|
+
// HackHub ContentSDK Type Declarations
|
|
2
|
+
// Package: @hotbunny/hackhub-content-sdk
|
|
3
|
+
// Auto-generated — do not edit manually
|
|
4
|
+
|
|
5
|
+
export interface QuestRewards {
|
|
6
|
+
money: number;
|
|
7
|
+
xp?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface QuestEmployer {
|
|
10
|
+
firstName: string;
|
|
11
|
+
lastName: string;
|
|
12
|
+
email: string;
|
|
13
|
+
avatar?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface QuestObjectiveDefinition {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
info?: string;
|
|
19
|
+
hint?: string;
|
|
20
|
+
terminalCommand?: string;
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
unlocksAfter?: string[];
|
|
23
|
+
trigger?: QuestObjectiveTrigger;
|
|
24
|
+
}
|
|
25
|
+
export interface QuestObjectiveTrigger {
|
|
26
|
+
event: string;
|
|
27
|
+
condition: (data: any) => boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface QuestDefinition {
|
|
30
|
+
name: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
icon?: string;
|
|
34
|
+
autoStart?: boolean;
|
|
35
|
+
autoComplete?: boolean;
|
|
36
|
+
rewards?: QuestRewards;
|
|
37
|
+
employer?: Partial<QuestEmployer>;
|
|
38
|
+
objectives: QuestObjectiveDefinition[];
|
|
39
|
+
questsToComplete?: string[];
|
|
40
|
+
maxClaim?: number;
|
|
41
|
+
maxClaimPerDay?: number;
|
|
42
|
+
abandonable?: boolean;
|
|
43
|
+
hasCompleteButton?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface WebsitePageDefinition {
|
|
46
|
+
path: string;
|
|
47
|
+
title: string;
|
|
48
|
+
html: string;
|
|
49
|
+
seo?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface WebsiteDefinition {
|
|
52
|
+
siteName: string;
|
|
53
|
+
host: string;
|
|
54
|
+
icon: string;
|
|
55
|
+
popular?: boolean;
|
|
56
|
+
pages: WebsitePageDefinition[];
|
|
57
|
+
}
|
|
58
|
+
export type AutoCompleteType = "IP" | "PORT" | "STRING" | "DOMAIN" | "MAC" | "FILE";
|
|
59
|
+
export interface CommandAutoComplete {
|
|
60
|
+
label: string;
|
|
61
|
+
type: AutoCompleteType;
|
|
62
|
+
extension?: string;
|
|
63
|
+
isFolder?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface CommandDefinition {
|
|
66
|
+
command: string;
|
|
67
|
+
description: string;
|
|
68
|
+
packageName?: string;
|
|
69
|
+
autocomplete?: CommandAutoComplete[];
|
|
70
|
+
}
|
|
71
|
+
export interface CommandTools {
|
|
72
|
+
println(text: string): void;
|
|
73
|
+
printError(text: string): void;
|
|
74
|
+
newLine(): void;
|
|
75
|
+
clear(): void;
|
|
76
|
+
prompt(label: string): Promise<string>;
|
|
77
|
+
sleep(ms: number): Promise<void>;
|
|
78
|
+
getArgs(): string[];
|
|
79
|
+
exec(command: string): Promise<void>;
|
|
80
|
+
isLocked(): boolean;
|
|
81
|
+
lock(): void;
|
|
82
|
+
unlock(): void;
|
|
83
|
+
}
|
|
84
|
+
export interface AppSize {
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
}
|
|
88
|
+
export interface AppDefinition {
|
|
89
|
+
name: string;
|
|
90
|
+
title: string;
|
|
91
|
+
icon: string;
|
|
92
|
+
html: string;
|
|
93
|
+
defaultSize: AppSize;
|
|
94
|
+
minSize?: AppSize;
|
|
95
|
+
maxSize?: AppSize;
|
|
96
|
+
maxOpen?: number;
|
|
97
|
+
disableMaximize?: boolean;
|
|
98
|
+
disableMinimize?: boolean;
|
|
99
|
+
store?: {
|
|
100
|
+
title: string;
|
|
101
|
+
ratings: number;
|
|
102
|
+
description: string;
|
|
103
|
+
price?: number;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Game events that mods can listen to.
|
|
108
|
+
* This is a curated subset of the internal GameEvents, exposing only
|
|
109
|
+
* safe and stable events to mod authors.
|
|
110
|
+
*/
|
|
111
|
+
export interface NmapScanEvent {
|
|
112
|
+
ip: string;
|
|
113
|
+
versionScan?: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface NslookupEvent {
|
|
116
|
+
domain: string;
|
|
117
|
+
ip: string;
|
|
118
|
+
}
|
|
119
|
+
export interface PingEvent {
|
|
120
|
+
ip: string;
|
|
121
|
+
isUp: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface SSHConnectedEvent {
|
|
124
|
+
ip: string;
|
|
125
|
+
}
|
|
126
|
+
export interface SSHFileDownloadEvent {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
extension?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface HydraEvent {
|
|
132
|
+
ip: string;
|
|
133
|
+
port: number;
|
|
134
|
+
wordlistFile: string;
|
|
135
|
+
credentials?: {
|
|
136
|
+
username: string;
|
|
137
|
+
password: string;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export interface WhoisEvent {
|
|
141
|
+
domain: string;
|
|
142
|
+
whois: any;
|
|
143
|
+
}
|
|
144
|
+
export interface FTPConnectEvent {
|
|
145
|
+
ip: string;
|
|
146
|
+
port?: number;
|
|
147
|
+
}
|
|
148
|
+
export interface DigEvent {
|
|
149
|
+
target: string;
|
|
150
|
+
}
|
|
151
|
+
export interface DirhunterEvent {
|
|
152
|
+
host: string;
|
|
153
|
+
results: string[];
|
|
154
|
+
}
|
|
155
|
+
export interface GeoipEvent {
|
|
156
|
+
ip: string;
|
|
157
|
+
}
|
|
158
|
+
export interface CatEvent {
|
|
159
|
+
id: string;
|
|
160
|
+
name: string;
|
|
161
|
+
extension?: string;
|
|
162
|
+
data?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface ExplorerEvent {
|
|
165
|
+
ip: string;
|
|
166
|
+
}
|
|
167
|
+
export interface FileOpenEvent {
|
|
168
|
+
app: string;
|
|
169
|
+
data: any;
|
|
170
|
+
}
|
|
171
|
+
export interface FileTransferEvent {
|
|
172
|
+
type: "DOWNLOAD" | "UPLOAD";
|
|
173
|
+
file: {
|
|
174
|
+
id: string;
|
|
175
|
+
name: string;
|
|
176
|
+
extension?: string;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
export interface BrowserWebsiteOpenedEvent {
|
|
180
|
+
siteName: string;
|
|
181
|
+
url: string;
|
|
182
|
+
}
|
|
183
|
+
export interface TerminalInstallPackageEvent {
|
|
184
|
+
cId: string;
|
|
185
|
+
pkg: string;
|
|
186
|
+
}
|
|
187
|
+
export interface DatabaseConnectedEvent {
|
|
188
|
+
ip: string;
|
|
189
|
+
database?: string;
|
|
190
|
+
}
|
|
191
|
+
export interface DatabaseDataUpdateEvent {
|
|
192
|
+
table: string;
|
|
193
|
+
data: any;
|
|
194
|
+
}
|
|
195
|
+
interface MailEvent {
|
|
196
|
+
from: string;
|
|
197
|
+
to: string;
|
|
198
|
+
subject: string;
|
|
199
|
+
}
|
|
200
|
+
export interface MailAccountCreatedEvent {
|
|
201
|
+
email: string;
|
|
202
|
+
password: string;
|
|
203
|
+
}
|
|
204
|
+
export interface MailAccountLoggedInEvent {
|
|
205
|
+
email: string;
|
|
206
|
+
}
|
|
207
|
+
export interface BankTransferEvent {
|
|
208
|
+
amount: number;
|
|
209
|
+
from: string;
|
|
210
|
+
to: string;
|
|
211
|
+
}
|
|
212
|
+
export interface BankAccountCreatedEvent {
|
|
213
|
+
id: string;
|
|
214
|
+
IBAN: string;
|
|
215
|
+
owner?: string;
|
|
216
|
+
}
|
|
217
|
+
export interface BankLogoutEvent {
|
|
218
|
+
id: string;
|
|
219
|
+
IBAN: string;
|
|
220
|
+
}
|
|
221
|
+
export interface QuestClaimedEvent {
|
|
222
|
+
name: string;
|
|
223
|
+
id: string;
|
|
224
|
+
}
|
|
225
|
+
export interface MetasploitEvent {
|
|
226
|
+
type: string;
|
|
227
|
+
data: any;
|
|
228
|
+
}
|
|
229
|
+
export interface MetasploitSearchEvent {
|
|
230
|
+
search: string;
|
|
231
|
+
matchedModules: any[];
|
|
232
|
+
}
|
|
233
|
+
export interface MetasploitUseEvent {
|
|
234
|
+
name: string;
|
|
235
|
+
type: string;
|
|
236
|
+
}
|
|
237
|
+
export interface MeterpreterConnectedEvent {
|
|
238
|
+
ip: string;
|
|
239
|
+
session: any;
|
|
240
|
+
}
|
|
241
|
+
export interface TwotterAccountCreatedEvent {
|
|
242
|
+
id: string;
|
|
243
|
+
username: string;
|
|
244
|
+
}
|
|
245
|
+
export interface TwotterAccountLoginEvent {
|
|
246
|
+
id: string;
|
|
247
|
+
username: string;
|
|
248
|
+
}
|
|
249
|
+
export interface TwotterPostSeenEvent {
|
|
250
|
+
id: string;
|
|
251
|
+
userId: string;
|
|
252
|
+
}
|
|
253
|
+
export interface TwotterPostEvent {
|
|
254
|
+
questId: string;
|
|
255
|
+
tweetIndex: number;
|
|
256
|
+
}
|
|
257
|
+
export interface TwotterProfileSeenEvent {
|
|
258
|
+
id: string;
|
|
259
|
+
username: string;
|
|
260
|
+
}
|
|
261
|
+
export interface KisscordFriendAddedEvent {
|
|
262
|
+
id: string;
|
|
263
|
+
username: string;
|
|
264
|
+
isFriend: boolean;
|
|
265
|
+
}
|
|
266
|
+
export interface KisscordMessagingEvent {
|
|
267
|
+
channel: string;
|
|
268
|
+
isMine?: boolean;
|
|
269
|
+
}
|
|
270
|
+
export interface WeeChatConnectedEvent {
|
|
271
|
+
host: string;
|
|
272
|
+
}
|
|
273
|
+
export interface WeeChatDisconnectedEvent {
|
|
274
|
+
host: string;
|
|
275
|
+
}
|
|
276
|
+
export interface WeeChatMessageEvent {
|
|
277
|
+
host: string;
|
|
278
|
+
username: string;
|
|
279
|
+
message: any;
|
|
280
|
+
}
|
|
281
|
+
export interface NetworkPortChangesEvent {
|
|
282
|
+
ip: string;
|
|
283
|
+
port: number;
|
|
284
|
+
active: boolean;
|
|
285
|
+
}
|
|
286
|
+
export interface NetworkUserActivityEvent {
|
|
287
|
+
userId: string;
|
|
288
|
+
online: boolean;
|
|
289
|
+
}
|
|
290
|
+
export interface NetworkWifiConnectedEvent {
|
|
291
|
+
ip: string;
|
|
292
|
+
ssid?: string;
|
|
293
|
+
}
|
|
294
|
+
export interface PFSenseLoginEvent {
|
|
295
|
+
ip: string;
|
|
296
|
+
}
|
|
297
|
+
export interface PFSenseChangesEvent {
|
|
298
|
+
old: any;
|
|
299
|
+
new: any;
|
|
300
|
+
}
|
|
301
|
+
export interface SqlmapListTablesEvent {
|
|
302
|
+
host: string;
|
|
303
|
+
}
|
|
304
|
+
export interface SqlmapDumpTableEvent {
|
|
305
|
+
host: string;
|
|
306
|
+
tableName: string;
|
|
307
|
+
}
|
|
308
|
+
export interface RemoteConnectionEstablishedEvent {
|
|
309
|
+
ip: string;
|
|
310
|
+
service?: string;
|
|
311
|
+
}
|
|
312
|
+
export interface RemoteConnectionDisconnectedEvent {
|
|
313
|
+
ip: string;
|
|
314
|
+
service?: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Map of event names to their payload types.
|
|
318
|
+
* Mod authors use these as: Events.on("Terminal.NmapScan", (data) => { ... })
|
|
319
|
+
*
|
|
320
|
+
* Supports declaration merging — mods can extend this interface
|
|
321
|
+
* to add custom events with full type safety:
|
|
322
|
+
* ```ts
|
|
323
|
+
* declare module "@hotbunny/hackhub-content-sdk" {
|
|
324
|
+
* interface ModEventMap {
|
|
325
|
+
* "MyMod.CustomEvent": { score: number };
|
|
326
|
+
* }
|
|
327
|
+
* }
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
export interface ModEventMap {
|
|
331
|
+
"Terminal.NmapScan": NmapScanEvent;
|
|
332
|
+
"Terminal.Nslookup": NslookupEvent;
|
|
333
|
+
"Terminal.Ping": PingEvent;
|
|
334
|
+
"Terminal.InstallPackage": TerminalInstallPackageEvent;
|
|
335
|
+
"Terminal.SSH.Connected": SSHConnectedEvent;
|
|
336
|
+
"Terminal.SSH.Disconnected": SSHConnectedEvent;
|
|
337
|
+
"Terminal.SSH.FileDownload": SSHFileDownloadEvent;
|
|
338
|
+
"Terminal.Hydra": HydraEvent;
|
|
339
|
+
"Terminal.Whois": WhoisEvent;
|
|
340
|
+
"Terminal.FTP.Connect": FTPConnectEvent;
|
|
341
|
+
"Terminal.Dig": DigEvent;
|
|
342
|
+
"Terminal.Dirhunter": DirhunterEvent;
|
|
343
|
+
"Terminal.Geoip": GeoipEvent;
|
|
344
|
+
"Terminal.Cat": CatEvent;
|
|
345
|
+
"Terminal.Explorer": ExplorerEvent;
|
|
346
|
+
"Files.Open": FileOpenEvent;
|
|
347
|
+
"Files.Transfer": FileTransferEvent;
|
|
348
|
+
"Files.Deleted": {
|
|
349
|
+
id: string;
|
|
350
|
+
name: string;
|
|
351
|
+
};
|
|
352
|
+
"Browser.WebsiteOpened": BrowserWebsiteOpenedEvent;
|
|
353
|
+
"Database.Connected": DatabaseConnectedEvent;
|
|
354
|
+
"Database.DataUpdate": DatabaseDataUpdateEvent;
|
|
355
|
+
"Mail.Received": MailEvent;
|
|
356
|
+
"Mail.Read": MailEvent;
|
|
357
|
+
"Mail.AccountCreated": MailAccountCreatedEvent;
|
|
358
|
+
"Mail.AccountLoggedIn": MailAccountLoggedInEvent;
|
|
359
|
+
"Bank.Transfer": BankTransferEvent;
|
|
360
|
+
"Bank.AccountCreated": BankAccountCreatedEvent;
|
|
361
|
+
"Bank.Logout": BankLogoutEvent;
|
|
362
|
+
"Quest.Claimed": QuestClaimedEvent;
|
|
363
|
+
"Metasploit.Event": MetasploitEvent;
|
|
364
|
+
"Metasploit.Search": MetasploitSearchEvent;
|
|
365
|
+
"Metasploit.Use": MetasploitUseEvent;
|
|
366
|
+
"Metasploit.Meterpreter.Connected": MeterpreterConnectedEvent;
|
|
367
|
+
"Twotter.AccountCreated": TwotterAccountCreatedEvent;
|
|
368
|
+
"Twotter.AccountLogin": TwotterAccountLoginEvent;
|
|
369
|
+
"Twotter.PostSeen": TwotterPostSeenEvent;
|
|
370
|
+
"Twotter.Post": TwotterPostEvent;
|
|
371
|
+
"Twotter.ProfileSeen": TwotterProfileSeenEvent;
|
|
372
|
+
"Kisscord.FriendAdded": KisscordFriendAddedEvent;
|
|
373
|
+
"Kisscord.Messaging": KisscordMessagingEvent;
|
|
374
|
+
"WeeChat.Connected": WeeChatConnectedEvent;
|
|
375
|
+
"WeeChat.Disconnected": WeeChatDisconnectedEvent;
|
|
376
|
+
"WeeChat.Message": WeeChatMessageEvent;
|
|
377
|
+
"Network.PortChanges": NetworkPortChangesEvent;
|
|
378
|
+
"Network.UserActivity": NetworkUserActivityEvent;
|
|
379
|
+
"Network.WifiConnected": NetworkWifiConnectedEvent;
|
|
380
|
+
"PFSense.Login": PFSenseLoginEvent;
|
|
381
|
+
"PFSense.Changes": PFSenseChangesEvent;
|
|
382
|
+
"Sqlmap.ListTables": SqlmapListTablesEvent;
|
|
383
|
+
"Sqlmap.DumpTable": SqlmapDumpTableEvent;
|
|
384
|
+
"RemoteConnection.Established": RemoteConnectionEstablishedEvent;
|
|
385
|
+
"RemoteConnection.Disconnected": RemoteConnectionDisconnectedEvent;
|
|
386
|
+
"AppStore.Downloaded": string;
|
|
387
|
+
}
|
|
388
|
+
export type ModEventName = keyof ModEventMap;
|
|
389
|
+
export type ModEventCallback<T extends ModEventName> = (data: ModEventMap[T]) => void;
|
|
390
|
+
export interface FileDefinition {
|
|
391
|
+
name: string;
|
|
392
|
+
extension?: string;
|
|
393
|
+
data?: string;
|
|
394
|
+
isFolder?: boolean;
|
|
395
|
+
children?: FileDefinition[];
|
|
396
|
+
readonly?: boolean;
|
|
397
|
+
hidden?: boolean;
|
|
398
|
+
}
|
|
399
|
+
export interface FileInfo {
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
extension?: string;
|
|
403
|
+
isFolder?: boolean;
|
|
404
|
+
data?: string;
|
|
405
|
+
parent?: string;
|
|
406
|
+
readonly?: boolean;
|
|
407
|
+
hidden?: boolean;
|
|
408
|
+
}
|
|
409
|
+
export interface FileCreateOptions {
|
|
410
|
+
name: string;
|
|
411
|
+
extension?: string;
|
|
412
|
+
data?: string;
|
|
413
|
+
parentPath?: string;
|
|
414
|
+
isFolder?: boolean;
|
|
415
|
+
}
|
|
416
|
+
/** Network device type. */
|
|
417
|
+
export declare enum NetworkDeviceType {
|
|
418
|
+
Router = "ROUTER",
|
|
419
|
+
Device = "DEVICE",
|
|
420
|
+
Firewall = "FIREWALL",
|
|
421
|
+
Splitter = "SPLITTER",
|
|
422
|
+
Printer = "PRINTER"
|
|
423
|
+
}
|
|
424
|
+
/** Port definition for a network device. */
|
|
425
|
+
export interface NetworkPort {
|
|
426
|
+
external: number;
|
|
427
|
+
internal: number;
|
|
428
|
+
active?: boolean;
|
|
429
|
+
locked?: boolean;
|
|
430
|
+
service?: string;
|
|
431
|
+
version?: string;
|
|
432
|
+
}
|
|
433
|
+
/** Firewall rule definition. */
|
|
434
|
+
export interface FirewallRule {
|
|
435
|
+
allowed: boolean;
|
|
436
|
+
port: number;
|
|
437
|
+
source?: string;
|
|
438
|
+
destination?: string;
|
|
439
|
+
locked?: boolean;
|
|
440
|
+
}
|
|
441
|
+
/** Domain attached to a network device. */
|
|
442
|
+
export interface NetworkDomain {
|
|
443
|
+
name: string;
|
|
444
|
+
vulnerabilities?: NetworkVulnerability[];
|
|
445
|
+
}
|
|
446
|
+
export interface NetworkVulnerability {
|
|
447
|
+
type: "SQL_INJECTION" | "XSS" | "CORS" | "SSRF" | "LFI" | "RFI" | "RCE";
|
|
448
|
+
version?: string;
|
|
449
|
+
}
|
|
450
|
+
/** User account on a network device. */
|
|
451
|
+
export interface NetworkUser {
|
|
452
|
+
username: string;
|
|
453
|
+
password?: string;
|
|
454
|
+
firstName?: string;
|
|
455
|
+
lastName?: string;
|
|
456
|
+
online?: boolean;
|
|
457
|
+
files?: NetworkFileMap[];
|
|
458
|
+
acceptReverseTCP?: boolean;
|
|
459
|
+
email?: {
|
|
460
|
+
address: string;
|
|
461
|
+
password: string;
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
/** File definition for a network device's file system. */
|
|
465
|
+
export interface NetworkFileMap {
|
|
466
|
+
name: string;
|
|
467
|
+
extension?: string;
|
|
468
|
+
data?: string;
|
|
469
|
+
isFolder?: boolean;
|
|
470
|
+
children?: NetworkFileMap[];
|
|
471
|
+
readonly?: boolean;
|
|
472
|
+
hidden?: boolean;
|
|
473
|
+
locked?: boolean;
|
|
474
|
+
}
|
|
475
|
+
/** Location info for a network device. */
|
|
476
|
+
export interface NetworkLocation {
|
|
477
|
+
latitude: string;
|
|
478
|
+
longitude: string;
|
|
479
|
+
city?: string;
|
|
480
|
+
country?: string;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Child subnet in a Router or Splitter's hierarchy.
|
|
484
|
+
* This is the type used inside `children` arrays.
|
|
485
|
+
*/
|
|
486
|
+
export type ChildSubnetDefinition = {
|
|
487
|
+
id?: string;
|
|
488
|
+
ip: string;
|
|
489
|
+
users: NetworkUser[];
|
|
490
|
+
name?: string;
|
|
491
|
+
domain?: NetworkDomain;
|
|
492
|
+
lanIp?: string;
|
|
493
|
+
ports?: NetworkPort[];
|
|
494
|
+
location?: NetworkLocation;
|
|
495
|
+
isIpHidden?: boolean;
|
|
496
|
+
ssh?: boolean;
|
|
497
|
+
} & ({
|
|
498
|
+
type: NetworkDeviceType.Router;
|
|
499
|
+
model?: string;
|
|
500
|
+
accessable?: boolean;
|
|
501
|
+
children: ChildSubnetDefinition[];
|
|
502
|
+
} | {
|
|
503
|
+
type: NetworkDeviceType.Device;
|
|
504
|
+
} | {
|
|
505
|
+
type: NetworkDeviceType.Firewall;
|
|
506
|
+
rules: FirewallRule[];
|
|
507
|
+
} | {
|
|
508
|
+
type: NetworkDeviceType.Splitter;
|
|
509
|
+
children: ChildSubnetDefinition[];
|
|
510
|
+
} | {
|
|
511
|
+
type: NetworkDeviceType.Printer;
|
|
512
|
+
});
|
|
513
|
+
/**
|
|
514
|
+
* Top-level network creation definition.
|
|
515
|
+
* Passed to `Network.createSubnetNetwork()`.
|
|
516
|
+
*
|
|
517
|
+
* Typically a Router with children:
|
|
518
|
+
* ```ts
|
|
519
|
+
* Network.createSubnetNetwork({
|
|
520
|
+
* ip: "45.33.32.156",
|
|
521
|
+
* type: NetworkDeviceType.Router,
|
|
522
|
+
* ports: [{ external: 80, internal: 80, active: true, service: "http" }],
|
|
523
|
+
* users: [],
|
|
524
|
+
* children: [
|
|
525
|
+
* { ip: "10.0.0.2", type: NetworkDeviceType.Device, users: [...], ports: [...] },
|
|
526
|
+
* ],
|
|
527
|
+
* });
|
|
528
|
+
* ```
|
|
529
|
+
*/
|
|
530
|
+
export type SubnetNetworkDefinition = {
|
|
531
|
+
id?: string;
|
|
532
|
+
ip: string;
|
|
533
|
+
users: NetworkUser[];
|
|
534
|
+
name?: string;
|
|
535
|
+
domain?: NetworkDomain;
|
|
536
|
+
lanIp?: string;
|
|
537
|
+
ports: NetworkPort[];
|
|
538
|
+
location?: NetworkLocation;
|
|
539
|
+
isIpHidden?: boolean;
|
|
540
|
+
} & ({
|
|
541
|
+
type: NetworkDeviceType.Router;
|
|
542
|
+
model?: string;
|
|
543
|
+
accessable?: boolean;
|
|
544
|
+
children: ChildSubnetDefinition[];
|
|
545
|
+
} | {
|
|
546
|
+
type: NetworkDeviceType.Device;
|
|
547
|
+
} | {
|
|
548
|
+
type: NetworkDeviceType.Firewall;
|
|
549
|
+
rules: FirewallRule[];
|
|
550
|
+
} | {
|
|
551
|
+
type: NetworkDeviceType.Splitter;
|
|
552
|
+
children: ChildSubnetDefinition[];
|
|
553
|
+
} | {
|
|
554
|
+
type: NetworkDeviceType.Printer;
|
|
555
|
+
});
|
|
556
|
+
/** Simplified read-only subnet info returned by query methods. */
|
|
557
|
+
export interface SubnetInfo {
|
|
558
|
+
ip: string;
|
|
559
|
+
lanIp?: string;
|
|
560
|
+
type: string;
|
|
561
|
+
hostname?: string;
|
|
562
|
+
domain?: string;
|
|
563
|
+
online?: boolean;
|
|
564
|
+
ports: {
|
|
565
|
+
port: number;
|
|
566
|
+
service?: string;
|
|
567
|
+
version?: string;
|
|
568
|
+
active?: boolean;
|
|
569
|
+
}[];
|
|
570
|
+
users: {
|
|
571
|
+
username: string;
|
|
572
|
+
}[];
|
|
573
|
+
}
|
|
574
|
+
/** Domain resolution result. */
|
|
575
|
+
export interface DomainInfo {
|
|
576
|
+
domain: string;
|
|
577
|
+
ip: string;
|
|
578
|
+
subdomains?: string[];
|
|
579
|
+
}
|
|
580
|
+
/** Read-only firewall info returned by query methods. */
|
|
581
|
+
export interface FirewallInfo {
|
|
582
|
+
ip: string;
|
|
583
|
+
rules: FirewallRule[];
|
|
584
|
+
}
|
|
585
|
+
export interface WifiNetwork {
|
|
586
|
+
ssid: string;
|
|
587
|
+
bssid: string;
|
|
588
|
+
channel: string;
|
|
589
|
+
encryption: string;
|
|
590
|
+
signal: number;
|
|
591
|
+
}
|
|
592
|
+
export interface MailDefinition {
|
|
593
|
+
subject: string;
|
|
594
|
+
content: string;
|
|
595
|
+
from?: string;
|
|
596
|
+
to?: string;
|
|
597
|
+
attachments?: MailAttachment[];
|
|
598
|
+
}
|
|
599
|
+
export interface MailAttachment {
|
|
600
|
+
name: string;
|
|
601
|
+
extension: string;
|
|
602
|
+
data?: string;
|
|
603
|
+
}
|
|
604
|
+
export interface MailInfo {
|
|
605
|
+
id: string;
|
|
606
|
+
from: string;
|
|
607
|
+
to: string;
|
|
608
|
+
subject: string;
|
|
609
|
+
read: boolean;
|
|
610
|
+
sentAt: number;
|
|
611
|
+
}
|
|
612
|
+
export interface BankTransactionOptions {
|
|
613
|
+
amount: number;
|
|
614
|
+
description: string;
|
|
615
|
+
from?: {
|
|
616
|
+
IBAN: string;
|
|
617
|
+
name: string;
|
|
618
|
+
};
|
|
619
|
+
to?: string;
|
|
620
|
+
}
|
|
621
|
+
export interface BankAccountInfo {
|
|
622
|
+
id: string;
|
|
623
|
+
IBAN: string;
|
|
624
|
+
balance: number;
|
|
625
|
+
owner: string;
|
|
626
|
+
}
|
|
627
|
+
export interface ModManifest {
|
|
628
|
+
id: string;
|
|
629
|
+
name: string;
|
|
630
|
+
version: string;
|
|
631
|
+
author: string;
|
|
632
|
+
description: string;
|
|
633
|
+
gameVersion?: string;
|
|
634
|
+
dependencies?: string[];
|
|
635
|
+
permissions?: ModPermission[];
|
|
636
|
+
icon?: string;
|
|
637
|
+
}
|
|
638
|
+
export type ModPermission = "filesystem" | "network" | "events" | "mail" | "bank" | "shell" | "ui";
|
|
639
|
+
export interface ModInfo {
|
|
640
|
+
id: string;
|
|
641
|
+
name: string;
|
|
642
|
+
version: string;
|
|
643
|
+
author: string;
|
|
644
|
+
description: string;
|
|
645
|
+
icon?: string;
|
|
646
|
+
enabled: boolean;
|
|
647
|
+
error?: string;
|
|
648
|
+
}
|
|
649
|
+
export declare enum ModStatus {
|
|
650
|
+
Pending = "PENDING",
|
|
651
|
+
Loading = "LOADING",
|
|
652
|
+
Loaded = "LOADED",
|
|
653
|
+
Error = "ERROR",
|
|
654
|
+
Disabled = "DISABLED"
|
|
655
|
+
}
|
|
656
|
+
export interface TwotterCreateUserOptions {
|
|
657
|
+
id?: string;
|
|
658
|
+
username?: string;
|
|
659
|
+
firstName?: string;
|
|
660
|
+
lastName?: string;
|
|
661
|
+
avatar?: string;
|
|
662
|
+
banner?: string;
|
|
663
|
+
bio?: string;
|
|
664
|
+
gender?: "male" | "female";
|
|
665
|
+
verified?: boolean;
|
|
666
|
+
password?: string;
|
|
667
|
+
followers?: number;
|
|
668
|
+
following?: number;
|
|
669
|
+
isMine?: boolean;
|
|
670
|
+
}
|
|
671
|
+
export interface TwotterUser {
|
|
672
|
+
id: string;
|
|
673
|
+
username: string;
|
|
674
|
+
name: string;
|
|
675
|
+
surname: string;
|
|
676
|
+
avatar: string;
|
|
677
|
+
banner: string;
|
|
678
|
+
bio?: string;
|
|
679
|
+
joinedAt: string;
|
|
680
|
+
followers: number;
|
|
681
|
+
following: number;
|
|
682
|
+
verified?: boolean;
|
|
683
|
+
password: string;
|
|
684
|
+
isMine?: boolean;
|
|
685
|
+
}
|
|
686
|
+
export interface TwotterTweetInteraction {
|
|
687
|
+
comments: number;
|
|
688
|
+
share: number;
|
|
689
|
+
likes: number;
|
|
690
|
+
views: number;
|
|
691
|
+
}
|
|
692
|
+
export interface TwotterTweet {
|
|
693
|
+
id: string;
|
|
694
|
+
userId: string;
|
|
695
|
+
content: string;
|
|
696
|
+
sendedAt?: string;
|
|
697
|
+
interaction: TwotterTweetInteraction;
|
|
698
|
+
showInTimeline?: boolean;
|
|
699
|
+
}
|
|
700
|
+
export declare enum KisscordStatus {
|
|
701
|
+
Online = "ONLINE",
|
|
702
|
+
Offline = "OFFLINE",
|
|
703
|
+
Idle = "IDLE"
|
|
704
|
+
}
|
|
705
|
+
export interface KisscordCreateUserOptions {
|
|
706
|
+
id?: string;
|
|
707
|
+
username?: string;
|
|
708
|
+
firstName?: string;
|
|
709
|
+
lastName?: string;
|
|
710
|
+
avatar?: string;
|
|
711
|
+
isFriend?: boolean;
|
|
712
|
+
status?: KisscordStatus;
|
|
713
|
+
}
|
|
714
|
+
export interface KisscordUser {
|
|
715
|
+
id: string;
|
|
716
|
+
username: string;
|
|
717
|
+
name: string;
|
|
718
|
+
surname: string;
|
|
719
|
+
avatar: string;
|
|
720
|
+
isFriend?: boolean;
|
|
721
|
+
status: KisscordStatus;
|
|
722
|
+
}
|
|
723
|
+
export interface KisscordMessagePayload {
|
|
724
|
+
channel: string;
|
|
725
|
+
content: string;
|
|
726
|
+
isMine?: boolean;
|
|
727
|
+
}
|
|
728
|
+
export interface KisscordMessageInfo {
|
|
729
|
+
channel: string;
|
|
730
|
+
content: string;
|
|
731
|
+
isMine?: boolean;
|
|
732
|
+
sendedAt: string;
|
|
733
|
+
read?: boolean;
|
|
734
|
+
}
|
|
735
|
+
export interface WeeChatMessage {
|
|
736
|
+
host: string;
|
|
737
|
+
username: string;
|
|
738
|
+
message: string;
|
|
739
|
+
}
|
|
740
|
+
export interface WeeChatServer {
|
|
741
|
+
host: string;
|
|
742
|
+
password: string;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Base class for a mod package entry point. Every mod must have exactly
|
|
746
|
+
* one class extending Bootstrap, decorated with @RegisterModPackage.
|
|
747
|
+
*
|
|
748
|
+
* @example
|
|
749
|
+
* ```ts
|
|
750
|
+
* import { Bootstrap, RegisterModPackage } from "@hotbunny/hackhub-content-sdk";
|
|
751
|
+
*
|
|
752
|
+
* @RegisterModPackage
|
|
753
|
+
* export class MyMod extends Bootstrap {
|
|
754
|
+
* OnModPackageLoaded() {
|
|
755
|
+
* console.log("My mod has been loaded!");
|
|
756
|
+
* }
|
|
757
|
+
*
|
|
758
|
+
* OnModPackageUnloaded() {
|
|
759
|
+
* console.log("My mod has been unloaded.");
|
|
760
|
+
* }
|
|
761
|
+
* }
|
|
762
|
+
* ```
|
|
763
|
+
*/
|
|
764
|
+
export declare abstract class Bootstrap {
|
|
765
|
+
/** The parsed manifest.json of this mod. Set by the loader at runtime. */
|
|
766
|
+
Manifest: ModManifest;
|
|
767
|
+
/** Called after the mod package and all its registered content are loaded. */
|
|
768
|
+
OnModPackageLoaded(): void | Promise<void>;
|
|
769
|
+
/** Called when the mod is being unloaded (e.g. disabled by user). */
|
|
770
|
+
OnModPackageUnloaded(): void;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Base class for mod quests. Mod authors extend this to create custom quests.
|
|
774
|
+
*
|
|
775
|
+
* @example
|
|
776
|
+
* ```ts
|
|
777
|
+
* import { Quest, RegisterQuest } from "@hotbunny/hackhub-content-sdk";
|
|
778
|
+
*
|
|
779
|
+
* @RegisterQuest
|
|
780
|
+
* export class HackThePlanet extends Quest {
|
|
781
|
+
* Name = "HackThePlanet";
|
|
782
|
+
* Title = "Hack the Planet";
|
|
783
|
+
* Rewards = { money: 5000 };
|
|
784
|
+
* Objectives = [
|
|
785
|
+
* { name: "scan", description: "Scan the target with nmap" },
|
|
786
|
+
* { name: "exploit", description: "Exploit the vulnerability", unlocksAfter: ["scan"] },
|
|
787
|
+
* ];
|
|
788
|
+
*
|
|
789
|
+
* OnStart() {
|
|
790
|
+
* Events.on("Terminal.NmapScan", (data) => {
|
|
791
|
+
* if (data.ip === "192.168.1.50") this.completeObjective("scan");
|
|
792
|
+
* });
|
|
793
|
+
* }
|
|
794
|
+
* }
|
|
795
|
+
* ```
|
|
796
|
+
*/
|
|
797
|
+
export declare abstract class Quest {
|
|
798
|
+
abstract Name: string;
|
|
799
|
+
abstract Title: string;
|
|
800
|
+
abstract Objectives: QuestObjectiveDefinition[];
|
|
801
|
+
Description?: string;
|
|
802
|
+
Icon?: string;
|
|
803
|
+
Rewards?: QuestRewards;
|
|
804
|
+
Employer?: Partial<QuestEmployer>;
|
|
805
|
+
AutoStart?: boolean;
|
|
806
|
+
AutoComplete?: boolean;
|
|
807
|
+
QuestsToComplete?: string[];
|
|
808
|
+
MaxClaim?: number;
|
|
809
|
+
MaxClaimPerDay?: number;
|
|
810
|
+
Abandonable?: boolean;
|
|
811
|
+
HasCompleteButton?: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Called when the quest is first claimed/started.
|
|
814
|
+
* Use this to set up event listeners for objective completion.
|
|
815
|
+
*/
|
|
816
|
+
OnStart(): void | Promise<void>;
|
|
817
|
+
/** Called when all objectives are completed and the quest finishes. */
|
|
818
|
+
OnComplete(): void | Promise<void>;
|
|
819
|
+
/** Called when the quest is abandoned by the player. */
|
|
820
|
+
OnAbandon(): void;
|
|
821
|
+
/** Called when the quest's objectives listener starts (e.g. after game load). */
|
|
822
|
+
OnObjectivesStart(): void;
|
|
823
|
+
/** Return initial quest data. Override to provide custom data storage. */
|
|
824
|
+
CreateData(): any;
|
|
825
|
+
/** Complete an objective by its name. */
|
|
826
|
+
completeObjective(name: string): void;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Base class for mod websites. Mod authors extend this to create
|
|
830
|
+
* in-game websites accessible through the FirebearBrowser.
|
|
831
|
+
*
|
|
832
|
+
* Pages use HTML content which is rendered inside a sandboxed iframe.
|
|
833
|
+
*
|
|
834
|
+
* @example
|
|
835
|
+
* ```ts
|
|
836
|
+
* import { Website, RegisterWebsite } from "@hotbunny/hackhub-content-sdk";
|
|
837
|
+
* import homePage from "./pages/home.html";
|
|
838
|
+
* import aboutPage from "./pages/about.html";
|
|
839
|
+
*
|
|
840
|
+
* @RegisterWebsite
|
|
841
|
+
* export class HackerForum extends Website {
|
|
842
|
+
* SiteName = "Hacker Forum";
|
|
843
|
+
* Host = "hackerforum.net";
|
|
844
|
+
* Icon = "./assets/forum-icon.png";
|
|
845
|
+
* Pages = [
|
|
846
|
+
* { path: "/", title: "Home", html: homePage },
|
|
847
|
+
* { path: "/about", title: "About", html: aboutPage },
|
|
848
|
+
* ];
|
|
849
|
+
* }
|
|
850
|
+
* ```
|
|
851
|
+
*/
|
|
852
|
+
export declare abstract class Website {
|
|
853
|
+
abstract SiteName: string;
|
|
854
|
+
abstract Host: string;
|
|
855
|
+
abstract Icon: string;
|
|
856
|
+
abstract Pages: WebsitePageDefinition[];
|
|
857
|
+
Popular?: boolean;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Base class for mod terminal commands. Mod authors extend this to
|
|
861
|
+
* create custom terminal commands that players can run.
|
|
862
|
+
*
|
|
863
|
+
* @example
|
|
864
|
+
* ```ts
|
|
865
|
+
* import { Command, RegisterCommand } from "@hotbunny/hackhub-content-sdk";
|
|
866
|
+
*
|
|
867
|
+
* @RegisterCommand
|
|
868
|
+
* export class PingTool extends Command {
|
|
869
|
+
* CommandName = "myping";
|
|
870
|
+
* Description = "Custom ping tool";
|
|
871
|
+
* Autocomplete = [
|
|
872
|
+
* { label: "myping", type: "STRING" },
|
|
873
|
+
* { label: "<target>", type: "IP" },
|
|
874
|
+
* ];
|
|
875
|
+
*
|
|
876
|
+
* async Run(tools: CommandTools) {
|
|
877
|
+
* const args = tools.getArgs();
|
|
878
|
+
* if (args.length === 0) {
|
|
879
|
+
* tools.printError("Usage: myping <ip>");
|
|
880
|
+
* return;
|
|
881
|
+
* }
|
|
882
|
+
* tools.println(`Pinging ${args[0]}...`);
|
|
883
|
+
* await tools.sleep(1000);
|
|
884
|
+
* tools.println("Reply received.");
|
|
885
|
+
* }
|
|
886
|
+
* }
|
|
887
|
+
* ```
|
|
888
|
+
*/
|
|
889
|
+
export declare abstract class Command {
|
|
890
|
+
abstract CommandName: string;
|
|
891
|
+
abstract Description: string;
|
|
892
|
+
Autocomplete: CommandAutoComplete[];
|
|
893
|
+
PackageName?: string;
|
|
894
|
+
abstract Run(tools: CommandTools): Promise<void> | void;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Base class for mod desktop applications. Mod authors extend this
|
|
898
|
+
* to create custom apps that appear on the in-game desktop.
|
|
899
|
+
*
|
|
900
|
+
* App UI is defined via HTML, rendered inside a sandboxed iframe
|
|
901
|
+
* within the game's window manager.
|
|
902
|
+
*
|
|
903
|
+
* @example
|
|
904
|
+
* ```ts
|
|
905
|
+
* import { App, RegisterApp } from "@hotbunny/hackhub-content-sdk";
|
|
906
|
+
* import appHTML from "./app.html";
|
|
907
|
+
*
|
|
908
|
+
* @RegisterApp
|
|
909
|
+
* export class PasswordGenerator extends App {
|
|
910
|
+
* AppName = "PasswordGenerator";
|
|
911
|
+
* Title = "Password Generator";
|
|
912
|
+
* Icon = "./assets/icon.png";
|
|
913
|
+
* HTML = appHTML;
|
|
914
|
+
* DefaultSize = { width: 400, height: 300 };
|
|
915
|
+
* Store = {
|
|
916
|
+
* title: "Password Generator",
|
|
917
|
+
* ratings: 4.5,
|
|
918
|
+
* description: "Generate secure passwords",
|
|
919
|
+
* };
|
|
920
|
+
* }
|
|
921
|
+
* ```
|
|
922
|
+
*/
|
|
923
|
+
export declare abstract class App {
|
|
924
|
+
abstract AppName: string;
|
|
925
|
+
abstract Title: string;
|
|
926
|
+
abstract Icon: string;
|
|
927
|
+
abstract HTML: string;
|
|
928
|
+
abstract DefaultSize: AppSize;
|
|
929
|
+
MinSize?: AppSize;
|
|
930
|
+
MaxSize?: AppSize;
|
|
931
|
+
MaxOpen?: number;
|
|
932
|
+
DisableMaximize?: boolean;
|
|
933
|
+
DisableMinimize?: boolean;
|
|
934
|
+
Store?: {
|
|
935
|
+
title: string;
|
|
936
|
+
ratings: number;
|
|
937
|
+
description: string;
|
|
938
|
+
price?: number;
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Game events API. Allows mods to listen to in-game events
|
|
943
|
+
* such as terminal commands, file operations, network events, etc.
|
|
944
|
+
*
|
|
945
|
+
* Also supports cross-mod custom events via `register`, `emit`, and
|
|
946
|
+
* declaration merging on `ModEventMap`.
|
|
947
|
+
*
|
|
948
|
+
* @example
|
|
949
|
+
* ```ts
|
|
950
|
+
* import { Events } from "@hotbunny/hackhub-content-sdk";
|
|
951
|
+
*
|
|
952
|
+
* // Listen to a built-in game event
|
|
953
|
+
* Events.on("Terminal.NmapScan", (data) => {
|
|
954
|
+
* console.log(`Player scanned ${data.ip}`);
|
|
955
|
+
* });
|
|
956
|
+
*
|
|
957
|
+
* // Register + emit a custom cross-mod event
|
|
958
|
+
* Events.register("MyMod.BossDefeated");
|
|
959
|
+
* Events.emit("MyMod.BossDefeated", { bossName: "Hydra", reward: 500 });
|
|
960
|
+
*
|
|
961
|
+
* // Another mod can listen
|
|
962
|
+
* Events.on("MyMod.BossDefeated", (data) => { ... });
|
|
963
|
+
* ```
|
|
964
|
+
*/
|
|
965
|
+
export declare namespace Events {
|
|
966
|
+
/**
|
|
967
|
+
* Register a custom event name for cross-mod communication.
|
|
968
|
+
* This is optional but recommended for discoverability.
|
|
969
|
+
*/
|
|
970
|
+
export function register(name: string): void;
|
|
971
|
+
/**
|
|
972
|
+
* Listen to a game event or a custom mod event.
|
|
973
|
+
* Returns an unsubscribe function.
|
|
974
|
+
*
|
|
975
|
+
* For known `ModEventMap` keys, the callback is fully typed.
|
|
976
|
+
* For custom string events, the callback receives `any`.
|
|
977
|
+
*/
|
|
978
|
+
export function on<T extends string>(event: T, callback: (data: T extends keyof ModEventMap ? ModEventMap[T] : any) => void): () => void;
|
|
979
|
+
/** Remove a specific event listener. */
|
|
980
|
+
export function off(event: string, callback: Function): void;
|
|
981
|
+
/**
|
|
982
|
+
* Emit an event.
|
|
983
|
+
* - Known `ModEventMap` keys are dispatched through the game's
|
|
984
|
+
* event system AND the custom event bus.
|
|
985
|
+
* - Unknown/custom event names go only through the custom event bus,
|
|
986
|
+
* enabling cross-mod communication without polluting game internals.
|
|
987
|
+
*/
|
|
988
|
+
export function emit<T extends string>(event: T, data?: T extends keyof ModEventMap ? ModEventMap[T] : any): void;
|
|
989
|
+
export {};
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Virtual file system API. Allows mods to create, read, and manage
|
|
993
|
+
* files in the in-game file system.
|
|
994
|
+
*
|
|
995
|
+
* @example
|
|
996
|
+
* ```ts
|
|
997
|
+
* import { Files } from "@hotbunny/hackhub-content-sdk";
|
|
998
|
+
*
|
|
999
|
+
* await Files.create({ name: "readme", extension: "txt", data: "Hello world" });
|
|
1000
|
+
* const file = await Files.getByPath("~/readme.txt");
|
|
1001
|
+
* ```
|
|
1002
|
+
*/
|
|
1003
|
+
export declare namespace Files {
|
|
1004
|
+
/** Create a new file or folder. */
|
|
1005
|
+
export function create(options: FileCreateOptions): Promise<FileInfo>;
|
|
1006
|
+
/** Create a file tree from a nested definition. */
|
|
1007
|
+
export function createTree(parentPath: string, tree: FileDefinition[]): Promise<void>;
|
|
1008
|
+
/** Get a file by its virtual path. */
|
|
1009
|
+
export function getByPath(path: string): Promise<FileInfo | null>;
|
|
1010
|
+
/** Get a file by its internal ID. */
|
|
1011
|
+
export function getById(id: string): FileInfo | null;
|
|
1012
|
+
/** Get all children of a folder. */
|
|
1013
|
+
export function getChildren(folderId: string): Promise<FileInfo[]>;
|
|
1014
|
+
/** Delete a file by ID. */
|
|
1015
|
+
export function remove(id: string): void;
|
|
1016
|
+
/** Rename a file. */
|
|
1017
|
+
export function rename(id: string, newName: string): void;
|
|
1018
|
+
/** Move a file to a different folder. */
|
|
1019
|
+
export function move(id: string, newParentId: string): void;
|
|
1020
|
+
/** Read file content as string. */
|
|
1021
|
+
export function read(id: string): string | undefined;
|
|
1022
|
+
/** Write string content to a file. */
|
|
1023
|
+
export function write(id: string, data: string): void;
|
|
1024
|
+
/** Check if a file or folder exists at the given path. */
|
|
1025
|
+
export function exists(path: string): Promise<boolean>;
|
|
1026
|
+
/** Get the user's home directory path. */
|
|
1027
|
+
export function getHomePath(): string;
|
|
1028
|
+
/** Get the user's desktop directory path. */
|
|
1029
|
+
export function getDesktopPath(): string;
|
|
1030
|
+
export {};
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Network API. Allows mods to interact with the in-game network
|
|
1034
|
+
* simulation — routers, devices, firewalls, ports, domains, and users.
|
|
1035
|
+
*
|
|
1036
|
+
* The network uses a hierarchical structure:
|
|
1037
|
+
* Router → Firewall / Device / Splitter / Printer
|
|
1038
|
+
*
|
|
1039
|
+
* @example
|
|
1040
|
+
* ```ts
|
|
1041
|
+
* import { Network, NetworkDeviceType } from "@hotbunny/hackhub-content-sdk";
|
|
1042
|
+
*
|
|
1043
|
+
* Network.createSubnetNetwork({
|
|
1044
|
+
* ip: "45.33.32.156",
|
|
1045
|
+
* type: NetworkDeviceType.Router,
|
|
1046
|
+
* users: [],
|
|
1047
|
+
* ports: [{ external: 80, internal: 80, active: true, service: "http" }],
|
|
1048
|
+
* children: [
|
|
1049
|
+
* {
|
|
1050
|
+
* ip: "10.0.0.2",
|
|
1051
|
+
* type: NetworkDeviceType.Device,
|
|
1052
|
+
* users: [Network.createUser({ username: "admin" })],
|
|
1053
|
+
* ports: [{ external: 22, internal: 22, active: true, service: "ssh" }],
|
|
1054
|
+
* },
|
|
1055
|
+
* ],
|
|
1056
|
+
* });
|
|
1057
|
+
* ```
|
|
1058
|
+
*/
|
|
1059
|
+
export declare namespace Network {
|
|
1060
|
+
/**
|
|
1061
|
+
* Create a full subnet network (Router with children hierarchy).
|
|
1062
|
+
* This is equivalent to the game's `Network.CreateSubnetNetwork()`.
|
|
1063
|
+
*/
|
|
1064
|
+
export function createSubnetNetwork(definition: SubnetNetworkDefinition): void;
|
|
1065
|
+
/** Destroy an entire network by its router IP. Removes all child subnets and files. */
|
|
1066
|
+
export function destroyNetwork(ip: string): Promise<void>;
|
|
1067
|
+
/** Get subnet info by IP address. */
|
|
1068
|
+
export function getSubnet(ip: string): SubnetInfo | null;
|
|
1069
|
+
/** Get all subnets in the game network. */
|
|
1070
|
+
export function getAllSubnets(): SubnetInfo[];
|
|
1071
|
+
/** Find a subnet by its domain name. */
|
|
1072
|
+
export function getSubnetByDomain(domain: string): SubnetInfo | null;
|
|
1073
|
+
/** Get all child subnets of a router. */
|
|
1074
|
+
export function getChildSubnets(routerIp: string): SubnetInfo[];
|
|
1075
|
+
/** Register a domain name pointing to an IP. */
|
|
1076
|
+
export function registerDomain(domain: string, ip: string): void;
|
|
1077
|
+
/** Remove a registered domain. */
|
|
1078
|
+
export function removeDomain(domain: string): void;
|
|
1079
|
+
/** Resolve a domain to its IP and info. */
|
|
1080
|
+
export function resolveDomain(domain: string): DomainInfo | null;
|
|
1081
|
+
/** Get the player's current IP address. */
|
|
1082
|
+
export function getPlayerIp(): string;
|
|
1083
|
+
/** Get the firewall protecting a given IP. Returns rules and the firewall's IP. */
|
|
1084
|
+
export function getFirewall(ip: string): FirewallInfo | null;
|
|
1085
|
+
/** Add a firewall rule to the firewall protecting the given IP. */
|
|
1086
|
+
export function addFirewallRule(ip: string, rule: FirewallRule): void;
|
|
1087
|
+
/** Remove a firewall rule by port from the firewall protecting the given IP. */
|
|
1088
|
+
export function removeFirewallRule(ip: string, port: number): void;
|
|
1089
|
+
/** Check if a request to the given IP and port would be blocked by the firewall. */
|
|
1090
|
+
export function isRequestBlocked(ip: string, port: number): boolean;
|
|
1091
|
+
/** Open a port on a router (set active=true). */
|
|
1092
|
+
export function openPort(routerIp: string, portExternal: number): void;
|
|
1093
|
+
/** Close a port on a router (set active=false). */
|
|
1094
|
+
export function closePort(routerIp: string, portExternal: number): void;
|
|
1095
|
+
/** Add a new port to a subnet. */
|
|
1096
|
+
export function addPort(routerIp: string, port: NetworkPort): void;
|
|
1097
|
+
/** Remove a port from a subnet by its external port number. */
|
|
1098
|
+
export function removePort(routerIp: string, portExternal: number): void;
|
|
1099
|
+
/**
|
|
1100
|
+
* Helper: Create a user object with sensible defaults.
|
|
1101
|
+
* Missing fields are filled with random values at runtime.
|
|
1102
|
+
*/
|
|
1103
|
+
export function createUser(options?: Partial<NetworkUser>): NetworkUser;
|
|
1104
|
+
/**
|
|
1105
|
+
* Helper: Create a default user schema with root + optional guest + custom users.
|
|
1106
|
+
* Matches the game's `Network.CreateDefaultUserSchema()`.
|
|
1107
|
+
*/
|
|
1108
|
+
export function createDefaultUserSchema(users: NetworkUser[], options?: {
|
|
1109
|
+
guest?: boolean;
|
|
1110
|
+
}): NetworkUser[];
|
|
1111
|
+
/** Re-export the device type enum for convenience. */
|
|
1112
|
+
export const Type: typeof NetworkDeviceType;
|
|
1113
|
+
export {};
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* Mail API. Allows mods to send and read in-game emails.
|
|
1117
|
+
*
|
|
1118
|
+
* @example
|
|
1119
|
+
* ```ts
|
|
1120
|
+
* import { Mail } from "@hotbunny/hackhub-content-sdk";
|
|
1121
|
+
*
|
|
1122
|
+
* Mail.send({
|
|
1123
|
+
* from: "boss@company.com",
|
|
1124
|
+
* subject: "New assignment",
|
|
1125
|
+
* content: "Your target is 192.168.1.50. Good luck.",
|
|
1126
|
+
* });
|
|
1127
|
+
* ```
|
|
1128
|
+
*/
|
|
1129
|
+
export declare namespace Mail {
|
|
1130
|
+
/** Send an email to the player's inbox. */
|
|
1131
|
+
export function send(mail: MailDefinition): void;
|
|
1132
|
+
/** Get all emails in the player's inbox. */
|
|
1133
|
+
export function getInbox(): MailInfo[];
|
|
1134
|
+
/** Mark an email as read. */
|
|
1135
|
+
export function markAsRead(id: string): void;
|
|
1136
|
+
/** Get the player's email address. */
|
|
1137
|
+
export function getPlayerEmail(): string;
|
|
1138
|
+
export {};
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Bank API. Allows mods to interact with the in-game banking system.
|
|
1142
|
+
*
|
|
1143
|
+
* @example
|
|
1144
|
+
* ```ts
|
|
1145
|
+
* import { Bank } from "@hotbunny/hackhub-content-sdk";
|
|
1146
|
+
*
|
|
1147
|
+
* Bank.transaction({
|
|
1148
|
+
* amount: 5000,
|
|
1149
|
+
* description: "Quest reward payment",
|
|
1150
|
+
* from: { IBAN: "DE89370400440532013000", name: "Anonymous Employer" },
|
|
1151
|
+
* });
|
|
1152
|
+
*
|
|
1153
|
+
* const account = Bank.getPlayerAccount();
|
|
1154
|
+
* console.log(`Balance: ${account.balance}`);
|
|
1155
|
+
* ```
|
|
1156
|
+
*/
|
|
1157
|
+
export declare namespace Bank {
|
|
1158
|
+
/** Create a bank transaction (deposit money to the player). */
|
|
1159
|
+
export function transaction(options: BankTransactionOptions): void;
|
|
1160
|
+
/** Get the player's bank account info. */
|
|
1161
|
+
export function getPlayerAccount(): BankAccountInfo;
|
|
1162
|
+
/** Get the player's current balance. */
|
|
1163
|
+
export function getBalance(): number;
|
|
1164
|
+
export {};
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* UI API. Allows mods to show notifications, toasts and dialogs.
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* import { UI } from "@hotbunny/hackhub-content-sdk";
|
|
1172
|
+
*
|
|
1173
|
+
* UI.notify("Quest updated!");
|
|
1174
|
+
* UI.toast("File downloaded successfully", "success");
|
|
1175
|
+
* ```
|
|
1176
|
+
*/
|
|
1177
|
+
export declare namespace UI {
|
|
1178
|
+
/** Show a notification popup. */
|
|
1179
|
+
export function notify(message: string): void;
|
|
1180
|
+
/** Show a toast message. */
|
|
1181
|
+
export function toast(message: string, type?: "success" | "error" | "warning" | "info"): void;
|
|
1182
|
+
export {};
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Persistent storage API scoped to the current mod.
|
|
1186
|
+
* Data persists across game sessions (saved to disk).
|
|
1187
|
+
* Each mod has its own isolated namespace — other mods
|
|
1188
|
+
* cannot read or write your storage.
|
|
1189
|
+
*
|
|
1190
|
+
* For sharing data between mods, use {@link SharedStorage}.
|
|
1191
|
+
* For session-only data, use {@link Variables}.
|
|
1192
|
+
*
|
|
1193
|
+
* @example
|
|
1194
|
+
* ```ts
|
|
1195
|
+
* import { Storage } from "@hotbunny/hackhub-content-sdk";
|
|
1196
|
+
*
|
|
1197
|
+
* Storage.set("highScore", 42);
|
|
1198
|
+
* const score = Storage.get<number>("highScore"); // 42
|
|
1199
|
+
* ```
|
|
1200
|
+
*/
|
|
1201
|
+
declare namespace Storage$1 {
|
|
1202
|
+
/** Get a value by key. Returns undefined if not found. */
|
|
1203
|
+
export function get<T = any>(key: string): T | undefined;
|
|
1204
|
+
/** Set a value by key. Value must be JSON-serializable. */
|
|
1205
|
+
export function set(key: string, value: any): void;
|
|
1206
|
+
/** Remove a key from storage. */
|
|
1207
|
+
export function remove(key: string): void;
|
|
1208
|
+
/** Clear all data in this mod's storage. */
|
|
1209
|
+
export function clear(): void;
|
|
1210
|
+
/** Get all stored key-value pairs. */
|
|
1211
|
+
export function getAll(): Record<string, any>;
|
|
1212
|
+
export {};
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* In-memory variables API scoped to the current mod.
|
|
1216
|
+
* Data is lost when the game is closed (session-only).
|
|
1217
|
+
*
|
|
1218
|
+
* @example
|
|
1219
|
+
* ```ts
|
|
1220
|
+
* import { Variables } from "@hotbunny/hackhub-content-sdk";
|
|
1221
|
+
*
|
|
1222
|
+
* Variables.set("targetFound", true);
|
|
1223
|
+
* const found = Variables.get<boolean>("targetFound"); // true
|
|
1224
|
+
* ```
|
|
1225
|
+
*/
|
|
1226
|
+
export declare namespace Variables {
|
|
1227
|
+
/** Get a value by key. Returns undefined if not found. */
|
|
1228
|
+
export function get<T = any>(key: string): T | undefined;
|
|
1229
|
+
/** Set a value by key. */
|
|
1230
|
+
export function set(key: string, value: any): void;
|
|
1231
|
+
/** Remove a key. */
|
|
1232
|
+
export function remove(key: string): void;
|
|
1233
|
+
/** Clear all variables for this mod. */
|
|
1234
|
+
export function clear(): void;
|
|
1235
|
+
/** Get all stored key-value pairs. */
|
|
1236
|
+
export function getAll(): Record<string, any>;
|
|
1237
|
+
export {};
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Persistent shared storage accessible by all mods.
|
|
1241
|
+
* Data persists across game sessions.
|
|
1242
|
+
*
|
|
1243
|
+
* Use this for inter-mod data sharing. All mods read/write
|
|
1244
|
+
* from the same key space, so choose descriptive key names
|
|
1245
|
+
* to avoid collisions (e.g. "mymod.leaderboard").
|
|
1246
|
+
*
|
|
1247
|
+
* @example
|
|
1248
|
+
* ```ts
|
|
1249
|
+
* import { SharedStorage } from "@hotbunny/hackhub-content-sdk";
|
|
1250
|
+
*
|
|
1251
|
+
* SharedStorage.set("mymod.leaderboard", [{ name: "Player1", score: 100 }]);
|
|
1252
|
+
* const board = SharedStorage.get("mymod.leaderboard");
|
|
1253
|
+
* ```
|
|
1254
|
+
*/
|
|
1255
|
+
export declare namespace SharedStorage {
|
|
1256
|
+
/** Get a shared value by key. Returns undefined if not found. */
|
|
1257
|
+
export function get<T = any>(key: string): T | undefined;
|
|
1258
|
+
/** Set a shared value by key. Value must be JSON-serializable. */
|
|
1259
|
+
export function set(key: string, value: any): void;
|
|
1260
|
+
/** Remove a shared key. */
|
|
1261
|
+
export function remove(key: string): void;
|
|
1262
|
+
/** Get all shared key-value pairs. */
|
|
1263
|
+
export function getAll(): Record<string, any>;
|
|
1264
|
+
export {};
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* In-memory shared variables accessible by all mods.
|
|
1268
|
+
* Data is lost when the game is closed (session-only).
|
|
1269
|
+
*
|
|
1270
|
+
* Use this for runtime inter-mod communication.
|
|
1271
|
+
* All mods share the same key space.
|
|
1272
|
+
*
|
|
1273
|
+
* @example
|
|
1274
|
+
* ```ts
|
|
1275
|
+
* import { SharedVariables } from "@hotbunny/hackhub-content-sdk";
|
|
1276
|
+
*
|
|
1277
|
+
* SharedVariables.set("globalDifficulty", "hard");
|
|
1278
|
+
* const diff = SharedVariables.get<string>("globalDifficulty");
|
|
1279
|
+
* ```
|
|
1280
|
+
*/
|
|
1281
|
+
export declare namespace SharedVariables {
|
|
1282
|
+
/** Get a shared variable by key. Returns undefined if not found. */
|
|
1283
|
+
export function get<T = any>(key: string): T | undefined;
|
|
1284
|
+
/** Set a shared variable by key. */
|
|
1285
|
+
export function set(key: string, value: any): void;
|
|
1286
|
+
/** Remove a shared variable. */
|
|
1287
|
+
export function remove(key: string): void;
|
|
1288
|
+
/** Get all shared variables. */
|
|
1289
|
+
export function getAll(): Record<string, any>;
|
|
1290
|
+
export {};
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Shell API. Allows mods to interact with the in-game terminal.
|
|
1294
|
+
*
|
|
1295
|
+
* @example
|
|
1296
|
+
* ```ts
|
|
1297
|
+
* import { Shell } from "@hotbunny/hackhub-content-sdk";
|
|
1298
|
+
*
|
|
1299
|
+
* const username = Shell.getUsername();
|
|
1300
|
+
* const hostname = Shell.getHostname();
|
|
1301
|
+
* await Shell.exec("nmap 192.168.1.1");
|
|
1302
|
+
* ```
|
|
1303
|
+
*/
|
|
1304
|
+
export declare namespace Shell {
|
|
1305
|
+
/** Execute a terminal command programmatically. */
|
|
1306
|
+
export function exec(command: string): Promise<void>;
|
|
1307
|
+
/** Get the player's OS username. */
|
|
1308
|
+
export function getUsername(): string;
|
|
1309
|
+
/** Get the computer's hostname. */
|
|
1310
|
+
export function getHostname(): string;
|
|
1311
|
+
/** Get the player's IP address. */
|
|
1312
|
+
export function getPlayerIp(): string;
|
|
1313
|
+
/** Get list of installed terminal packages. */
|
|
1314
|
+
export function getInstalledPackages(): string[];
|
|
1315
|
+
/** Check if a specific package is installed. */
|
|
1316
|
+
export function isPackageInstalled(pkg: string): boolean;
|
|
1317
|
+
export {};
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Twotter API. Allows mods to interact with the in-game
|
|
1321
|
+
* Twitter-like social media platform.
|
|
1322
|
+
*
|
|
1323
|
+
* @example
|
|
1324
|
+
* ```ts
|
|
1325
|
+
* import { Twotter } from "@hotbunny/hackhub-content-sdk";
|
|
1326
|
+
*
|
|
1327
|
+
* const user = Twotter.createUser({
|
|
1328
|
+
* username: "darknet_hacker",
|
|
1329
|
+
* bio: "I hack things.",
|
|
1330
|
+
* verified: true,
|
|
1331
|
+
* });
|
|
1332
|
+
* Twotter.addUser(user);
|
|
1333
|
+
*
|
|
1334
|
+
* Twotter.postTweet({
|
|
1335
|
+
* id: "my-tweet-1",
|
|
1336
|
+
* userId: user.id,
|
|
1337
|
+
* content: "Just hacked the mainframe!",
|
|
1338
|
+
* interaction: { comments: 5, share: 2, likes: 42, views: 1000 },
|
|
1339
|
+
* showInTimeline: true,
|
|
1340
|
+
* });
|
|
1341
|
+
* ```
|
|
1342
|
+
*/
|
|
1343
|
+
export declare namespace Twotter {
|
|
1344
|
+
/** Create a new Twotter user with sensible defaults for missing fields. */
|
|
1345
|
+
export function createUser(options?: TwotterCreateUserOptions): TwotterUser;
|
|
1346
|
+
/** Add a user to the Twotter platform. */
|
|
1347
|
+
export function addUser(user: TwotterUser): void;
|
|
1348
|
+
/** Post a tweet. */
|
|
1349
|
+
export function postTweet(tweet: TwotterTweet): void;
|
|
1350
|
+
/** Remove a tweet by its ID. */
|
|
1351
|
+
export function removeTweet(id: string): void;
|
|
1352
|
+
/** Find a user by their username. */
|
|
1353
|
+
export function getUserByUsername(username: string): TwotterUser | undefined;
|
|
1354
|
+
/** Find a user by their ID. */
|
|
1355
|
+
export function getUserById(id: string): TwotterUser | undefined;
|
|
1356
|
+
/** Toggle like on a tweet. */
|
|
1357
|
+
export function toggleLike(postId: string, userId: string): void;
|
|
1358
|
+
export {};
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Kisscord API. Allows mods to interact with the in-game
|
|
1362
|
+
* Discord-like messaging application.
|
|
1363
|
+
*
|
|
1364
|
+
* @example
|
|
1365
|
+
* ```ts
|
|
1366
|
+
* import { Kisscord, KisscordStatus } from "@hotbunny/hackhub-content-sdk";
|
|
1367
|
+
*
|
|
1368
|
+
* const npc = Kisscord.createUser({
|
|
1369
|
+
* username: "informant",
|
|
1370
|
+
* firstName: "John",
|
|
1371
|
+
* lastName: "Doe",
|
|
1372
|
+
* isFriend: true,
|
|
1373
|
+
* status: KisscordStatus.Online,
|
|
1374
|
+
* });
|
|
1375
|
+
* Kisscord.addUser(npc);
|
|
1376
|
+
*
|
|
1377
|
+
* Kisscord.sendMessage(npc.id, "I have the files you need.");
|
|
1378
|
+
* ```
|
|
1379
|
+
*/
|
|
1380
|
+
export declare namespace Kisscord {
|
|
1381
|
+
/** Create a new Kisscord user with sensible defaults. */
|
|
1382
|
+
export function createUser(options?: KisscordCreateUserOptions): KisscordUser;
|
|
1383
|
+
/** Add a user to the Kisscord system. */
|
|
1384
|
+
export function addUser(user: KisscordUser): void;
|
|
1385
|
+
/** Remove a user and their messages from Kisscord. */
|
|
1386
|
+
export function removeUser(userId: string): void;
|
|
1387
|
+
/** Mark a user as a friend. Returns true if successful. */
|
|
1388
|
+
export function addFriend(username: string): boolean;
|
|
1389
|
+
/** Send a message in a channel (channel = user ID). */
|
|
1390
|
+
export function sendMessage(channelUserId: string, content: string, isMine?: boolean): void;
|
|
1391
|
+
/** Change a user's online status. */
|
|
1392
|
+
export function changeStatus(userId: string, status: KisscordStatus): void;
|
|
1393
|
+
/** Get all messages in a channel. */
|
|
1394
|
+
export function getMessages(channelUserId: string): KisscordMessageInfo[];
|
|
1395
|
+
/** Re-export status enum for convenience. */
|
|
1396
|
+
export const Status: typeof KisscordStatus;
|
|
1397
|
+
export {};
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* WeeChat API. Allows mods to interact with the in-game
|
|
1401
|
+
* IRC-like terminal chat system.
|
|
1402
|
+
*
|
|
1403
|
+
* @example
|
|
1404
|
+
* ```ts
|
|
1405
|
+
* import { WeeChat } from "@hotbunny/hackhub-content-sdk";
|
|
1406
|
+
*
|
|
1407
|
+
* WeeChat.createServer("irc.darknet.org", "secret123");
|
|
1408
|
+
*
|
|
1409
|
+
* WeeChat.sendMessage({
|
|
1410
|
+
* host: "irc.darknet.org",
|
|
1411
|
+
* username: "informant",
|
|
1412
|
+
* message: "The target IP is 45.33.32.156",
|
|
1413
|
+
* });
|
|
1414
|
+
*
|
|
1415
|
+
* const history = WeeChat.getHistory("irc.darknet.org");
|
|
1416
|
+
* ```
|
|
1417
|
+
*/
|
|
1418
|
+
export declare namespace WeeChat {
|
|
1419
|
+
/** Register a WeeChat IRC server that the player can connect to. */
|
|
1420
|
+
export function createServer(host: string, password: string): void;
|
|
1421
|
+
/** Remove a registered WeeChat server. */
|
|
1422
|
+
export function removeServer(host: string, password: string): void;
|
|
1423
|
+
/** Send a message in a WeeChat channel. */
|
|
1424
|
+
export function sendMessage(message: WeeChatMessage): void;
|
|
1425
|
+
/** Get message history, optionally filtered by host. */
|
|
1426
|
+
export function getHistory(host?: string): WeeChatMessage[];
|
|
1427
|
+
export {};
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Marks a class as the mod's entry point.
|
|
1431
|
+
* Each mod must have exactly one @RegisterModPackage class extending Bootstrap.
|
|
1432
|
+
*/
|
|
1433
|
+
export declare function RegisterModPackage<T extends new (...args: any[]) => Bootstrap>(target: T): T;
|
|
1434
|
+
/**
|
|
1435
|
+
* Registers a Quest class with the mod system.
|
|
1436
|
+
* The quest will be available in the game once the mod is loaded.
|
|
1437
|
+
*/
|
|
1438
|
+
export declare function RegisterQuest<T extends new (...args: any[]) => Quest>(target: T): T;
|
|
1439
|
+
/**
|
|
1440
|
+
* Registers a Website class with the mod system.
|
|
1441
|
+
* The website will be accessible through the in-game browser once loaded.
|
|
1442
|
+
*/
|
|
1443
|
+
export declare function RegisterWebsite<T extends new (...args: any[]) => Website>(target: T): T;
|
|
1444
|
+
/**
|
|
1445
|
+
* Registers a terminal Command class with the mod system.
|
|
1446
|
+
* The command will be available in the terminal once loaded.
|
|
1447
|
+
*/
|
|
1448
|
+
export declare function RegisterCommand<T extends new (...args: any[]) => Command>(target: T): T;
|
|
1449
|
+
/**
|
|
1450
|
+
* Registers a desktop App class with the mod system.
|
|
1451
|
+
* The app will be available for installation via AppStore once loaded.
|
|
1452
|
+
*/
|
|
1453
|
+
export declare function RegisterApp<T extends new (...args: any[]) => App>(target: T): T;
|
|
1454
|
+
|
|
1455
|
+
export {
|
|
1456
|
+
MailEvent as MailEventPayload,
|
|
1457
|
+
Storage$1 as Storage,
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
export {};
|