vnite-plugin-sdk
Version:
Vnite Plugin Development SDK
148 lines • 3.6 kB
TypeScript
import { Paths } from 'type-fest';
export type gameDocs = {
[gameId: string]: gameDoc;
};
export interface gameDoc {
_id: string;
metadata: {
name: string;
originalName: string;
releaseDate: string;
description: string;
developers: string[];
publishers: string[];
platforms: string[];
genres: string[];
tags: string[];
relatedSites: {
label: string;
url: string;
}[];
steamId: string;
vndbId: string;
igdbId: string;
ymgalId: string;
extra: {
key: string;
value: string[];
}[];
};
record: {
addDate: string;
lastRunDate: string;
score: number;
playTime: number;
playStatus: 'unplayed' | 'playing' | 'finished' | 'multiple' | 'shelved';
timers: {
start: string;
end: string;
}[];
};
save: {
saveList: {
[saveId: string]: {
_id: string;
date: string;
note: string;
locked: boolean;
};
};
maxBackups: number;
};
memory: {
memoryList: {
[memoryId: string]: {
_id: string;
date: string;
note: string;
};
};
};
apperance: {
logo: {
position: {
x: number;
y: number;
};
size: number;
visible: boolean;
};
nsfw: boolean;
};
}
export interface gameCollectionDocs {
[gameCollectionId: string]: gameCollectionDoc;
}
export interface gameCollectionDoc {
_id: string;
name: string;
sort: number;
games: string[];
}
export interface gameLocalDocs {
[gameId: string]: gameLocalDoc;
}
export interface gameLocalDoc {
_id: string;
path: {
gamePath: string;
savePaths: string[];
};
launcher: {
mode: 'file' | 'url' | 'script';
fileConfig: {
path: string;
workingDirectory: string;
args: string[];
monitorMode: 'file' | 'folder' | 'process';
monitorPath: string;
};
urlConfig: {
url: string;
browserPath: string;
monitorMode: 'file' | 'folder' | 'process';
monitorPath: string;
};
scriptConfig: {
workingDirectory: string;
command: string[];
monitorMode: 'file' | 'folder' | 'process';
monitorPath: string;
};
useMagpie: boolean;
};
utils: {
markPath: string;
};
}
export declare const DEFAULT_GAME_LOCAL_VALUES: Readonly<gameLocalDoc>;
export declare const DEFAULT_GAME_COLLECTION_VALUES: Readonly<gameCollectionDoc>;
export declare const DEFAULT_GAME_VALUES: Readonly<gameDoc>;
export interface SortConfig {
by: Paths<gameDoc, {
bracketNotation: true;
}>;
order?: 'asc' | 'desc';
}
export interface Timer {
start: string;
end: string;
}
export interface MaxPlayTimeDay {
date: string;
playTime: number;
}
export declare const METADATA_EXTRA_PREDEFINED_KEYS: string[];
export interface BatchGameInfo {
dataId: string;
dataSource: string;
name: string;
id: string;
status: 'idle' | 'loading' | 'success' | 'error' | 'existed';
dirPath: string;
}
export interface Timer {
start: string;
end: string;
}
//# sourceMappingURL=game.d.ts.map