52 lines
1.2 KiB
TypeScript
52 lines
1.2 KiB
TypeScript
|
||
import { createQueryApi } from '../src/query-api.ts';
|
||
const api = {
|
||
"app_domain_manager": {
|
||
/**
|
||
* 获取域名信息,可以通过id或者domain进行查询
|
||
*
|
||
* @param data - Request parameters
|
||
* @param data.data - {object}
|
||
*/
|
||
"get": {
|
||
"path": "app_domain_manager",
|
||
"key": "get",
|
||
"description": "获取域名信息,可以通过id或者domain进行查询",
|
||
"metadata": {
|
||
"args": {
|
||
"data": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"domain": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
}
|
||
},
|
||
"viewItem": {
|
||
"api": {
|
||
"url": "/api/router"
|
||
},
|
||
"type": "api",
|
||
"title": "路由"
|
||
},
|
||
"url": "/api/router",
|
||
"source": "query-proxy-api"
|
||
}
|
||
}
|
||
}
|
||
} as const;
|
||
const queryApi = createQueryApi({ api });
|
||
export { queryApi };
|
||
|
||
queryApi.app_domain_manager.get({
|
||
data: {
|
||
id: '123',
|
||
domain: 'example.com'
|
||
}
|
||
}) |