Dashboard 1.0
Added Addon Builder Added Emerald SRV API for One-Click Addon install Added API Config Update Checker for Bot and Panel
This commit is contained in:
1 parent
24ccc179a6
commit
1a6b360701
13 files changed
+720
-213
No files matched your search
@@ -85,15 +85,21 @@ export interface ApiResponse<T> {
|
||||
export interface CatalogAddon {
|
||||
id: string;
|
||||
name: string;
|
||||
slug?: string;
|
||||
description: string;
|
||||
repositoryUrl: string;
|
||||
price?: number;
|
||||
is_external?: number;
|
||||
external_store?: string;
|
||||
jsFiles: string[];
|
||||
configFiles: string[];
|
||||
fileCount: number;
|
||||
fileCount?: number;
|
||||
installed?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateCheckResult {
|
||||
id: string;
|
||||
name: string;
|
||||
current: string;
|
||||
latest: string;
|
||||
updateAvailable: boolean;
|
||||
@@ -269,12 +275,12 @@ export const api = {
|
||||
}),
|
||||
|
||||
checkForUpdates: () =>
|
||||
request<ApiResponse<UpdateCheckResult>>("/api/system/update-check"),
|
||||
request<ApiResponse<UpdateCheckResult[]>>("/api/system/update-check"),
|
||||
|
||||
runUpdate: (version: string) =>
|
||||
runUpdate: (repoId: string, version: string, url: string) =>
|
||||
request<ApiResponse<unknown>>("/api/system/update", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ version }),
|
||||
body: JSON.stringify({ repoId, version, url }),
|
||||
}),
|
||||
|
||||
reloadConfigs: (file?: string) =>
|
||||
@@ -547,6 +553,12 @@ export const api = {
|
||||
body: JSON.stringify({ filename, data }),
|
||||
}),
|
||||
|
||||
buildAddon: (payload: { name: string; description: string; permission: string; embed: any }) =>
|
||||
request<ApiResponse<{ success: boolean }>>("/api/addons/build", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(payload),
|
||||
}),
|
||||
|
||||
getSetupStatus: () =>
|
||||
request<ApiResponse<import("@/lib/setup-types").SetupStatus>>("/api/setup/status"),
|
||||
|
||||
|
||||
Reference in new issue
Block a user