2022-09-22 16:16:04 +08:00
|
|
|
import http from '@/api';
|
2022-11-28 13:50:53 +08:00
|
|
|
import { ResPage } from '../interface';
|
2022-09-22 16:16:04 +08:00
|
|
|
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 = () => {
|
2023-03-14 15:03:46 +08:00
|
|
|
return http.get<App.AppUpdateRes>('apps/checkupdate');
|
2023-03-14 13:54:42 +08:00
|
|
|
};
|
|
|
|
|
2022-09-22 16:16:04 +08:00
|
|
|
export const SearchApp = (req: App.AppReq) => {
|
|
|
|
return http.post<App.AppResPage>('apps/search', req);
|
|
|
|
};
|
2022-09-23 16:33:55 +08:00
|
|
|
|
2023-02-08 17:09:21 +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');
|
|
|
|
};
|
|
|
|
|
2023-04-03 17:47:23 +08:00
|
|
|
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
|
|
|
};
|
2022-09-26 16:32:40 +08:00
|
|
|
|
|
|
|
export const InstallApp = (install: App.AppInstall) => {
|
|
|
|
return http.post<any>('apps/install', install);
|
|
|
|
};
|
|
|
|
|
2022-11-08 14:34:41 +08:00
|
|
|
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 16:32:40 +08:00
|
|
|
};
|
2022-09-26 18:20:21 +08:00
|
|
|
|
2022-12-04 19:20:36 +08:00
|
|
|
export const GetAppPort = (key: string) => {
|
|
|
|
return http.get<number>(`apps/installed/loadport/${key}`);
|
|
|
|
};
|
|
|
|
|
2023-04-11 10:26:25 +08:00
|
|
|
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);
|
|
|
|
};
|
2022-09-29 18:16:56 +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) => {
|
2022-12-02 10:31:07 +08:00
|
|
|
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}`);
|
|
|
|
};
|
2023-01-03 14:57:13 +08:00
|
|
|
|
|
|
|
export const GetAppInstallParams = (id: number) => {
|
|
|
|
return http.get<App.InstallParams[]>(`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);
|
|
|
|
};
|