import http from '@/api'; import { ResPage } from '../interface'; import { App } from '../interface/app'; export const SyncApp = () => { return http.post('apps/sync', {}); }; 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 = (id: number, version: string) => { return http.get(`apps/detail/${id}/${version}`); }; 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 GetAppPort = (key: string) => { return http.get(`apps/installed/loadport/${key}`); }; export const GetAppPassword = (key: string) => { return http.get(`apps/installed/loadpassword/${key}`); }; export const CheckAppInstalled = (key: string) => { return http.get(`apps/installed/check/${key}`); }; 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); }; export const SyncInstalledApp = () => { return http.post('apps/installed/sync', {}); }; export const GetAppService = (key: string | undefined) => { return http.get(`apps/services/${key}`); }; export const GetAppUpdateVersions = (id: number) => { return http.get(`apps/installed/${id}/versions`); }; export const GetAppDefaultConfig = (key: string) => { return http.get(`apps/installed/conf/${key}`); }; export const GetAppInstallParams = (id: number) => { return http.get(`apps/installed/params/${id}`); };