1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-04 04:54:16 +08:00

92 lines
2.7 KiB
Go
Raw Normal View History

import http from '@/api';
2022-11-28 13:50:53 +08:00
import { ResPage } from '../interface';
import { App } from '../interface/app';
export const SyncApp = () => {
return http.post<any>('apps/sync', {});
};
2023-03-14 13:54:42 +08:00
export const GetAppListUpdate = () => {
return http.get<App.AppUpdateRes>('apps/checkupdate');
2023-03-14 13:54:42 +08:00
};
export const SearchApp = (req: App.AppReq) => {
return http.post<App.AppResPage>('apps/search', req);
};
2022-09-23 16:33:55 +08:00
export const GetApp = (key: string) => {
return http.get<App.AppDTO>('apps/' + key);
2022-09-23 16:33:55 +08:00
};
2023-01-16 15:30:24 +08:00
export const GetAppTags = () => {
return http.get<App.Tag[]>('apps/tags');
};
export const GetAppDetail = (appID: number, version: string, type: string) => {
return http.get<App.AppDetail>(`apps/detail/${appID}/${version}/${type}`);
};
export const GetAppDetailByID = (id: number) => {
return http.get<App.AppDetail>(`apps/details/${id}`);
2022-09-23 16:33:55 +08:00
};
export const InstallApp = (install: App.AppInstall) => {
return http.post<any>('apps/install', install);
};
export const ChangePort = (params: App.ChangePort) => {
return http.post<any>('apps/installed/port/change', params);
};
2022-11-28 13:50:53 +08:00
export const SearchAppInstalled = (search: App.AppInstallSearch) => {
2023-02-21 15:19:12 +08:00
return http.post<ResPage<App.AppInstalled>>('apps/installed/search', search);
};
2022-09-26 18:20:21 +08:00
export const GetAppPort = (key: string) => {
return http.get<number>(`apps/installed/loadport/${key}`);
};
export const GetAppConnInfo = (key: string) => {
return http.get<App.DatabaseConnInfo>(`apps/installed/conninfo/${key}`);
2022-12-20 20:30:14 +08:00
};
2022-11-18 16:14:23 +08:00
export const CheckAppInstalled = (key: string) => {
return http.get<App.CheckInstalled>(`apps/installed/check/${key}`);
};
2022-12-01 19:25:02 +08:00
export const AppInstalledDeleteCheck = (appInstallId: number) => {
return http.get<App.AppInstallResource[]>(`apps/installed/delete/check/${appInstallId}`);
};
2022-11-28 13:50:53 +08:00
export const GetAppInstalled = (search: App.AppInstalledSearch) => {
2023-02-21 15:19:12 +08:00
return http.post<App.AppInstalled[]>('apps/installed/search', search);
2022-10-28 17:04:57 +08:00
};
2022-09-26 18:20:21 +08:00
export const InstalledOp = (op: App.AppInstalledOp) => {
return http.post<any>('apps/installed/op', op, 40000);
2022-09-26 18:20:21 +08:00
};
export const SyncInstalledApp = () => {
return http.post<any>('apps/installed/sync', {});
};
2022-10-07 15:49:39 +08:00
export const GetAppService = (key: string | undefined) => {
return http.get<App.AppService[]>(`apps/services/${key}`);
2022-10-07 15:49:39 +08:00
};
2022-10-12 18:57:22 +08:00
2022-10-13 18:56:53 +08:00
export const GetAppUpdateVersions = (id: number) => {
return http.get<any>(`apps/installed/${id}/versions`);
};
2022-12-09 17:16:07 +08:00
export const GetAppDefaultConfig = (key: string) => {
return http.get<string>(`apps/installed/conf/${key}`);
};
export const GetAppInstallParams = (id: number) => {
return http.get<App.AppConfig>(`apps/installed/params/${id}`);
};
2023-03-08 11:04:22 +08:00
export const UpdateAppInstallParams = (req: any) => {
return http.post<any>(`apps/installed/params/update`, req);
};