a92e47bc18
重新梳理vimp模块的API代码结构,拆分为client、model、query、request子模块并添加统一导出入口;修正所有相关文件的导入路径,新增通用响应类型与工具函数,优化树组件的类型判断逻辑,同时新增设备查询相关API与查询hook。
12 lines
429 B
TypeScript
12 lines
429 B
TypeScript
import { unwrapVimpResponse, vimpClient } from '../client';
|
|
import type { VimpStation } from '../model';
|
|
|
|
export const catalogAllDeviceApi = async (options?: { signal?: AbortSignal }) => {
|
|
const { signal } = options ?? {};
|
|
const client = vimpClient;
|
|
const endpoint = `/catalog/allDevice`;
|
|
const resp = await client.post<VimpStation[]>(endpoint, {}, { signal });
|
|
const data = unwrapVimpResponse(resp);
|
|
return data;
|
|
};
|