Types
TypeScript type definitions used throughout the SDK.
Quest Types
QuestRewards
typescript
interface QuestRewards {
money?: number;
xp?: number;
}QuestEmployer
typescript
interface QuestEmployer {
firstName?: string;
lastName?: string;
email?: string;
avatar?: string;
}QuestObjectiveDefinition
typescript
interface QuestObjectiveDefinition {
name: string;
description: string;
info?: string;
hint?: string;
terminalCommand?: string;
hidden?: boolean;
unlocksAfter?: string[];
trigger?: QuestObjectiveTrigger;
}QuestObjectiveTrigger
typescript
interface QuestObjectiveTrigger {
event: string;
condition: (data: any) => boolean;
}QuestMailDefinition
typescript
interface QuestMailDefinition {
title: string;
content: string;
replyable?: boolean;
attachment?: {
name: string;
extension: string;
content: string;
};
}QuestDialogDefinition
typescript
type QuestDialogDefinition = Record<string, QuestDialogSpeech[]>;QuestDialogSpeech
typescript
interface QuestDialogSpeech {
speaker: string;
text: string;
audio?: string;
isEnd?: boolean;
timeout?: number;
onEnd?: () => void;
options?: QuestDialogOption[];
}QuestDialogOption
typescript
interface QuestDialogOption {
label: string;
text: string;
audio?: string;
switchBranch?: string;
nextIndex?: number;
isEnd?: boolean;
timeout?: number;
onSelect?: () => void;
}Website Types
WebsitePageDefinition
typescript
interface WebsitePageDefinition {
path: string;
title: string;
html: string;
}App Types
AppSize
typescript
interface AppSize {
width: number;
height: number;
}AppStoreDefinition
typescript
interface AppStoreDefinition {
title: string;
description: string;
ratings?: number;
}Command Types
CommandAutoComplete
typescript
interface CommandAutoComplete {
label: string;
type: AutoCompleteType;
}AutoCompleteType
typescript
type AutoCompleteType = "STRING" | "IP" | "FLAG" | "FILE" | "DIRECTORY" | "USER";CommandTools
typescript
interface CommandTools {
getArgs(): string[];
println(text: string): void;
printError(text: string): void;
printWarning(text: string): void;
printSuccess(text: string): void;
sleep(ms: number): Promise<void>;
clear(): void;
}Network Types
NetworkPort
typescript
interface NetworkPort {
external: number;
internal: number;
active: boolean;
service: string;
}NetworkUser
typescript
interface NetworkUser {
id?: string;
username: string;
password?: string;
firstName?: string;
lastName?: string;
}Mod Types
ModManifest
typescript
interface ModManifest {
id: string;
name: string;
version: string;
author: string;
description: string;
apiVersion: number;
permissions?: ModPermission[];
dependencies?: string[];
cover?: string;
tags?: string[];
workshopId?: string;
}ModPermission
typescript
type ModPermission = "filesystem" | "network" | "events" | "mail" | "bank" | "shell" | "ui";ModSettingDefinition
typescript
interface ModSettingDefinition {
key: string;
label: string;
type: "toggle" | "select" | "text" | "number" | "slider";
default: any;
options?: { label: string; value: string }[];
min?: number;
max?: number;
step?: number;
}