import http from '@/api'; import { ResPage } from '../interface'; import { App } from '../interface/app'; import { TimeoutEnum } from '@/enums/http-enum'; export const SyncApp = (req: App.AppStoreSync) => { return http.post('apps/sync/remote', req); }; export const SyncLocalApp = (req: App.AppStoreSync) => { return http.post('apps/sync/local', req); }; export const GetAppListUpdate = () => { return http.get('apps/checkupdate'); }; export const SearchApp = (req: App.AppReq) => { return http.post('apps/search', req); }; export const GetApp = (key: string) => { return http.get('apps/' + key); }; export const GetAppTags = () => { return http.get('apps/tags'); }; export const GetAppDetail = (appID: number, version: string, type: string) => { return http.get(`apps/detail/${appID}/${version}/${type}`); }; export const GetAppDetailByID = (id: number) => { return http.get(`apps/details/${id}`); }; export const InstallApp = (install: App.AppInstall) => { return http.post('apps/install', install); }; export const ChangePort = (params: App.ChangePort) => { return http.post('apps/installed/port/change', params); }; export const SearchAppInstalled = (search: App.AppInstallSearch) => { return http.post>('apps/installed/search', search); }; export const ListAppInstalled = () => { return http.get>('apps/installed/list'); }; export const GetAppPort = (type: string, name: string) => { return http.post(`apps/installed/loadport`, { type: type, name: name }); }; export const GetAppConnInfo = (type: string, name: string) => { return http.post(`apps/installed/conninfo`, { type: type, name: name }); }; export const CheckAppInstalled = (key: string, name: string) => { return http.post(`apps/installed/check`, { key: key, name: name }); }; export const AppInstalledDeleteCheck = (appInstallId: number) => { return http.get(`apps/installed/delete/check/${appInstallId}`); }; export const GetAppInstalled = (search: App.AppInstalledSearch) => { return http.post('apps/installed/search', search); }; export const InstalledOp = (op: App.AppInstalledOp) => { return http.post('apps/installed/op', op, TimeoutEnum.T_40S); }; export const SyncInstalledApp = () => { return http.post('apps/installed/sync', {}); }; export const GetAppService = (key: string | undefined) => { return http.get(`apps/services/${key}`); }; export const GetAppUpdateVersions = (req: App.AppUpdateVersionReq) => { return http.post(`apps/installed/update/versions`, req); }; export const GetAppDefaultConfig = (key: string, name: string) => { return http.post(`apps/installed/conf`, { type: key, name: name }); }; export const GetAppInstallParams = (id: number) => { return http.get(`apps/installed/params/${id}`); }; export const UpdateAppInstallParams = (req: any) => { return http.post(`apps/installed/params/update`, req); }; export const IgnoreUpgrade = (req: any) => { return http.post(`apps/installed/ignore`, req); }; export const GetIgnoredApp = () => { return http.get(`apps/ignored/detail`); };