add quser app
This commit is contained in:
27
packages/list/src/defines/query-shop-define.ts
Normal file
27
packages/list/src/defines/query-shop-define.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { QueryUtil } from '@kevisual/router/define';
|
||||
|
||||
export const shopDefine = QueryUtil.create({
|
||||
getRegistry: {
|
||||
path: 'shop',
|
||||
key: 'get-registry',
|
||||
description: '获取应用商店注册表信息',
|
||||
},
|
||||
|
||||
listInstalled: {
|
||||
path: 'shop',
|
||||
key: 'list-installed',
|
||||
description: '列出当前已安装的所有应用',
|
||||
},
|
||||
|
||||
install: {
|
||||
path: 'shop',
|
||||
key: 'install',
|
||||
description: '安装指定的应用,可以指定 id、type、force 和 yes 参数',
|
||||
},
|
||||
|
||||
uninstall: {
|
||||
path: 'shop',
|
||||
key: 'uninstall',
|
||||
description: '卸载指定的应用,可以指定 id 和 type 参数',
|
||||
},
|
||||
});
|
||||
19
packages/list/src/query/query-shop.ts
Normal file
19
packages/list/src/query/query-shop.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { shopDefine } from '../defines/query-shop-define.ts';
|
||||
|
||||
import { BaseQuery, DataOpts, Query } from '@kevisual/query/query';
|
||||
|
||||
export { shopDefine };
|
||||
|
||||
export class QueryApp extends BaseQuery {
|
||||
appDefine = shopDefine;
|
||||
constructor(opts?: { query: Query }) {
|
||||
super(opts!);
|
||||
this.appDefine.query = this.query;
|
||||
}
|
||||
get chain() {
|
||||
return this.appDefine.queryChain;
|
||||
}
|
||||
getInstall(data: any, opts?: DataOpts) {
|
||||
return this.appDefine.queryChain('install').post(data, opts);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user