feat(platform): 实现工作流工具(workflow_list/stats/charge/detail)
- platform_workflow_list: 列出指定自建应用下的工作流(EASO) - platform_workflow_stats: 获取工作流统计信息(EASO) - platform_workflow_charge: 查询企业工作流用量配额(EASO) - platform_workflow_detail: 获取工作流详情(Piper) - 简化 EASO 客户端签名,移除冗余的 corpId 返回 - 更新 tsconfig.json 添加 types: ["node"] - 更新 README.md 工具清单
This commit is contained in:
1 parent
f9eb6a4844
commit
b7bdb39f56
6 files changed
+58
-39
No files matched your search
@@ -28,17 +28,16 @@ export async function listPlatforms(
|
||||
}
|
||||
|
||||
// ── 工作流(EASO)─────────────────────────────────────────────────────────────
|
||||
// 注意:EASO 客户端已自动注入 corpId,无需再传
|
||||
|
||||
export async function listWorkflows(
|
||||
client: KyInstance,
|
||||
corpId: string,
|
||||
platformId: string,
|
||||
page: number = 1,
|
||||
pageSize: number = 20
|
||||
): Promise<import("./types").WorkflowPage> {
|
||||
const response = await client.get("api/easo/pipelines/logs", {
|
||||
searchParams: {
|
||||
corpId,
|
||||
platformId,
|
||||
number: String(page),
|
||||
pageSize: String(pageSize),
|
||||
@@ -49,22 +48,18 @@ export async function listWorkflows(
|
||||
|
||||
export async function getWorkflowStats(
|
||||
client: KyInstance,
|
||||
corpId: string,
|
||||
platformId: string
|
||||
): Promise<import("./types").WorkflowStats> {
|
||||
const response = await client.get("api/easo/stats", {
|
||||
searchParams: { corpId, platformId },
|
||||
searchParams: { platformId },
|
||||
});
|
||||
return unwrap(response, WorkflowStatsSchema);
|
||||
}
|
||||
|
||||
export async function getWorkflowCharge(
|
||||
client: KyInstance,
|
||||
corpId: string
|
||||
client: KyInstance
|
||||
): Promise<import("./types").WorkflowCharge> {
|
||||
const response = await client.get("api/easo/charge", {
|
||||
searchParams: { corpId },
|
||||
});
|
||||
const response = await client.get("api/easo/charge");
|
||||
return unwrap(response, WorkflowChargeSchema);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user