- 彻底移除旧内部狭隘命名与垫片包袱,一步到位全仓整体重命名: * session-client.ts ➔ hose-web-session-client.ts (合思 Web 主站会话客户端) * script-engine-client.ts ➔ piper-workflow-client.ts (Piper 工作流引擎客户端) * unity-client.ts ➔ unity-easo-client.ts (Unity / EASO 运营中台与动态集群客户端) * sso-client.ts ➔ sso-auth-client.ts (SSO 与扫码鉴权客户端) - 新增 hose-docs-client.ts 纳为第 7 大通信底座客户端,收口 docs.ekuaibao.com 文档站点通信 - 端正 Piper 工作流引擎定位,完整覆盖工作流创建、保存、发布、108 类节点编排与 Job 流转 - 彻底整体替换全仓 import 引用与测试套件,新增 clients-semantics.test.ts 自动化校验 - 全量自动化测试 150 files 1155 tests 全部通过,类型检查零错误
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { createSessionClient } from "../../core/http/hose-web-session-client.js";
|
|
import type { CorpConfig } from "../../core/config/types.js";
|
|
import {
|
|
fetchDesktopMenuTree,
|
|
fetchWorkbenchApps,
|
|
fetchAppCenterMenus,
|
|
} from "./api.js";
|
|
import type { MenuItem, WorkbenchApp } from "./types.js";
|
|
|
|
/** 获取桌面端工作台【应用管理】下的业务应用列表 */
|
|
export async function fetchWorkbenchAppsList(
|
|
corp: CorpConfig
|
|
): Promise<WorkbenchApp[]> {
|
|
const client = await createSessionClient(corp);
|
|
const corpId = corp.corpId || corp.credentials.corpId;
|
|
return fetchWorkbenchApps(client, corpId);
|
|
}
|
|
|
|
/** 获取桌面端全站主框架导航菜单树 */
|
|
export async function fetchDesktopMenus(
|
|
corp: CorpConfig
|
|
): Promise<MenuItem[]> {
|
|
const client = await createSessionClient(corp);
|
|
const corpId = corp.corpId || corp.credentials.corpId;
|
|
return fetchDesktopMenuTree(client, corpId);
|
|
}
|
|
|
|
/** 获取【应用中心】下的子栏目 */
|
|
export async function fetchAppCenterSubMenus(
|
|
corp: CorpConfig
|
|
): Promise<MenuItem[]> {
|
|
const client = await createSessionClient(corp);
|
|
const corpId = corp.corpId || corp.credentials.corpId;
|
|
return fetchAppCenterMenus(client, corpId);
|
|
}
|