From 95af2177e58283fc3c27ead3971aaf14fc2d7468 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 14:58:20 +0800 Subject: [PATCH 01/12] =?UTF-8?q?feat(assist-platform):=20=E5=9B=BA?= =?UTF-8?q?=E5=8C=96=E9=92=89=E9=92=89=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=97=AD=E7=8E=AF=E5=B9=B6=E4=BC=98=E5=8C=96=E5=A4=9A=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E4=B8=8E=E7=BD=91=E5=85=B3=E9=94=99=E8=AF=AF=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 支持一行命令自动发起钉钉交互式扫码登录 (hose-use assist-platform login [--qr]) - 集成 qrcode-terminal 在终端直接输出紧凑 ANSI 文本二维码 - 严格对齐 HoseCloud SSO 钉钉时间戳的 60 秒安全防重放倒计时 - 自动从重定向参数或 Token 换取 Unity 运营中心会话凭证并安全落盘 - 在 core/http/assist-platform-client 增加响应体 errorCode: 403 拦截,杜绝凭证过期被吞成空数据的静默失败 - 修复 assist-platform enter 多集群租户 (wx2/shanghai 等) baseUrl 硬编码为 app 的验票失败问题 - 修复 workflow nodes grant 网关回包双层嵌套 saved/skipped 数据解析问题 - 补全 core/http/sso-client 单元测试并确保全部 957 项测试通过 --- bun.lock | 6 + package.json | 2 + src/cli/command-metadata.ts | 2 +- src/cli/commands/assist-platform/login.ts | 164 +++++++++++++++--- src/core/http/assist-platform-client.ts | 17 ++ src/core/http/clients.test.ts | 20 +++ src/core/http/sso-client.test.ts | 138 +++++++++++++++ src/core/http/sso-client.ts | 123 +++++++++++++ src/domains/assist-platform/services.ts | 104 ++++++++++- .../workflow/transport/catalog/api.ts | 8 +- 10 files changed, 555 insertions(+), 29 deletions(-) create mode 100644 src/core/http/sso-client.test.ts diff --git a/bun.lock b/bun.lock index b2c9d5d..b210f0f 100644 --- a/bun.lock +++ b/bun.lock @@ -9,6 +9,7 @@ "@modelcontextprotocol/core": "^2.0.0", "@modelcontextprotocol/server": "^2.0.0", "ky": "^2.0.2", + "qrcode-terminal": "^0.12.0", "quickjs-emscripten-core": "0.32.0", "yaml": "^2.9.0", "zod": "^4.4.3", @@ -16,6 +17,7 @@ "devDependencies": { "@modelcontextprotocol/client": "^2.0.0", "@types/bun": "^1.3.14", + "@types/qrcode-terminal": "^0.12.2", "typescript": "^5.9.3", }, }, @@ -35,6 +37,8 @@ "@types/node": ["@types/node@25.8.0", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ=="], + "@types/qrcode-terminal": ["@types/qrcode-terminal@0.12.2", "", {}, "sha512-v+RcIEJ+Uhd6ygSQ0u5YYY7ZM+la7GgPbs0V/7l/kFs2uO4S8BcIUEMoP7za4DNIqNnUD5npf0A/7kBhrCKG5Q=="], + "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], @@ -53,6 +57,8 @@ "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], + "qrcode-terminal": ["qrcode-terminal@0.12.0", "", { "bin": { "qrcode-terminal": "./bin/qrcode-terminal.js" } }, "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ=="], + "quickjs-emscripten-core": ["quickjs-emscripten-core@0.32.0", "", { "dependencies": { "@jitl/quickjs-ffi-types": "0.32.0" } }, "sha512-QFnPfjFey8EqknSrSxe1hZrf1/8z7/6s1QzGOmKo6++02r7QRRX7ZoyNaZh7JuVjWsVW87KnQrbZqnHkOAzUyg=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], diff --git a/package.json b/package.json index cb77644..4901f01 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@modelcontextprotocol/core": "^2.0.0", "@modelcontextprotocol/server": "^2.0.0", "ky": "^2.0.2", + "qrcode-terminal": "^0.12.0", "quickjs-emscripten-core": "0.32.0", "yaml": "^2.9.0", "zod": "^4.4.3" @@ -53,6 +54,7 @@ "devDependencies": { "@modelcontextprotocol/client": "^2.0.0", "@types/bun": "^1.3.14", + "@types/qrcode-terminal": "^0.12.2", "typescript": "^5.9.3" } } diff --git a/src/cli/command-metadata.ts b/src/cli/command-metadata.ts index f416d74..359a540 100644 --- a/src/cli/command-metadata.ts +++ b/src/cli/command-metadata.ts @@ -833,7 +833,7 @@ export const COMMAND_METADATA: Record = { }, flags: { ...flagList("token t user name u hose-token jwt ticket ticket-id auth-code staff staff-id staffId alias corp-name count limit n start offset state status corpid id keyword query q message msg reason matter hours hour duration days day to recipient target remarks comment corp", "value"), - ...flagList("all a logout admin save import persist switch current overwrite candidates list-candidates", "boolean") + ...flagList("all a logout admin save import persist switch current overwrite candidates list-candidates qr", "boolean") } } }; diff --git a/src/cli/commands/assist-platform/login.ts b/src/cli/commands/assist-platform/login.ts index 2be8c9f..896ff28 100644 --- a/src/cli/commands/assist-platform/login.ts +++ b/src/cli/commands/assist-platform/login.ts @@ -4,7 +4,10 @@ import { clearAssistPlatformSession, } from "../../../core/auth/assist-platform-store.js"; import { createAssistPlatformClient } from "../../../core/http/assist-platform-client.js"; -import { searchCorporations } from "../../../domains/assist-platform/services.js"; +import { + searchCorporations, + loginAssistPlatformByQrCode, +} from "../../../domains/assist-platform/services.js"; import { booleanOption, stringOption } from "../../parser.js"; import { printJson, printKeyValue } from "../../printer.js"; import type { CliParsedArgs, CliResult, CliRuntime } from "../../types.js"; @@ -66,35 +69,150 @@ export async function handleLogin( }; } - // 查看当前协助平台会话状态 + const checkStatusOnly = booleanOption(parsed.options, ["status"]); + const forceQr = booleanOption(parsed.options, ["qr", "force"]); + const isInteractive = Boolean( + process.stdin.isTTY && !process.env.CI && process.env.NODE_ENV !== "test" + ); const existing = loadAssistPlatformSession(); - if (!existing || !existing.token) { - return { - stdout: "", - stderr: `未检测到协助平台登录凭证。\n用法:\n hose-use assist-platform login --token [--user <姓名>]\n hose-use assist-platform login --logout (清理凭证)\n`, - exitCode: 1, - }; - } - if (runtime.jsonMode) { + // 如果仅检查状态 (--status) + if (checkStatusOnly) { + if (!existing || !existing.token) { + return { + stdout: "", + stderr: `[ERROR] 未检测到协助平台登录凭证。\n请运行: hose-use assist-platform login 进行扫码登录\n`, + exitCode: 1, + }; + } + + const testClient = createAssistPlatformClient({ + token: existing.token, + baseUrl: existing.baseUrl, + hoseAccessToken: existing.hoseAccessToken, + }); + + try { + await searchCorporations(testClient, { limit: { start: 0, count: 1 } }); + } catch { + return { + stdout: "", + stderr: `[ERROR] 协助平台凭证已过期或无效。\n请运行: hose-use assist-platform login 进行扫码登录\n`, + exitCode: 1, + }; + } + + if (runtime.jsonMode) { + return { + stdout: printJson({ valid: true, ...existing }), + stderr: "", + exitCode: 0, + }; + } + + const pairs: Record = { + 协助平台状态: "🟢 凭证有效 (已登录)", + 操作员工姓名: existing.userName || "运营实施人员", + 基础服务地址: existing.baseUrl || "https://unity.ekuaibao.com/api", + 当前会话凭证: existing.token.replace(/(.{4}).*(.{4})/, "$1****$2"), + 最后更新时间: new Date(existing.updatedAt).toLocaleString("zh-CN", { hour12: false }), + }; + return { - stdout: printJson(existing), + stdout: `====== 合思协助平台当前会话 ======\n${printKeyValue(pairs)}\n`, stderr: "", exitCode: 0, }; } - const pairs: Record = { - 协助平台状态: "🟢 已登录", - 操作员工姓名: existing.userName || "运营实施人员", - 基础服务地址: existing.baseUrl || "https://unity.ekuaibao.com/api", - 当前会话凭证: existing.token.replace(/(.{4}).*(.{4})/, "$1****$2"), - 最后更新时间: new Date(existing.updatedAt).toLocaleString("zh-CN", { hour12: false }), - }; + // 如果已有凭证且未强制发起扫码,先探测有效性 + if (existing?.token && !forceQr) { + let isValid = false; + const testClient = createAssistPlatformClient({ + token: existing.token, + baseUrl: existing.baseUrl, + hoseAccessToken: existing.hoseAccessToken, + }); - return { - stdout: `====== 合思协助平台当前会话 ======\n${printKeyValue(pairs)}\n`, - stderr: "", - exitCode: 0, - }; + try { + await searchCorporations(testClient, { limit: { start: 0, count: 1 } }); + isValid = true; + } catch { + isValid = false; + } + + if (isValid) { + if (runtime.jsonMode) { + return { + stdout: printJson(existing), + stderr: "", + exitCode: 0, + }; + } + + const pairs: Record = { + 协助平台状态: "🟢 已登录 (凭证有效)", + 操作员工姓名: existing.userName || "运营实施人员", + 基础服务地址: existing.baseUrl || "https://unity.ekuaibao.com/api", + 当前会话凭证: existing.token.replace(/(.{4}).*(.{4})/, "$1****$2"), + 最后更新时间: new Date(existing.updatedAt).toLocaleString("zh-CN", { hour12: false }), + }; + + return { + stdout: `====== 合思协助平台当前会话 ======\n${printKeyValue(pairs)}\n\n💡 提示: 当前凭证处于有效状态。如需重新扫码登录,请运行: hose-use assist-platform login --qr\n`, + stderr: "", + exitCode: 0, + }; + } + } + + // 凭证不存在或已失效:非交互/测试模式下给出指引,交互模式或显式 --qr 下直接自动拉起扫码登录 + if (!isInteractive && !forceQr) { + return { + stdout: "", + stderr: `未检测到协助平台登录凭证。\n用法:\n hose-use assist-platform login [--qr]\n hose-use assist-platform login --token [--user <姓名>]\n hose-use assist-platform login --logout (清理凭证)\n`, + exitCode: 1, + }; + } + + // ── 自动发起钉钉交互式扫码登录流程 ────────────────────────── + try { + const loginRes = await loginAssistPlatformByQrCode({ + timeoutMs: 60000, + onQrCode: (qrText, dingUrl) => { + if (!runtime.jsonMode) { + process.stdout.write(`\n====== 合思协助平台钉钉扫码登录 ======\n`); + process.stdout.write(`请使用钉钉 App 扫描下方二维码确认登录(有效期 60 秒):\n\n`); + process.stdout.write(`${qrText}\n\n`); + process.stdout.write(`🔗 快捷授权链接: ${dingUrl}\n\n`); + process.stdout.write(`等待钉钉扫码并确认中... (最长等待 60 秒)\n`); + } + }, + }); + + if (runtime.jsonMode) { + return { + stdout: printJson({ + success: true, + token: loginRes.token, + userName: loginRes.userName, + baseUrl: loginRes.baseUrl, + }), + stderr: "", + exitCode: 0, + }; + } + + return { + stdout: `\n[SUCCESS] 协助平台凭证已自动更新成功!\n操作人员: ${loginRes.userName}\n会话 Token: ${loginRes.token}\n`, + stderr: "", + exitCode: 0, + }; + } catch (err) { + return { + stdout: "", + stderr: `[ERROR] 协助平台扫码登录失败: ${err instanceof Error ? err.message : String(err)}\n`, + exitCode: 1, + }; + } } diff --git a/src/core/http/assist-platform-client.ts b/src/core/http/assist-platform-client.ts index 93c73d7..a7ec193 100644 --- a/src/core/http/assist-platform-client.ts +++ b/src/core/http/assist-platform-client.ts @@ -37,6 +37,23 @@ export function createAssistPlatformClient(options: AssistPlatformClientOptions) if (response.status === 401 || response.status === 403) { throw new AuthenticationError("协助平台凭证已过期或无效,请重新登录协助平台"); } + const contentType = response.headers.get("content-type"); + if (contentType && contentType.includes("application/json")) { + try { + const clone = response.clone(); + const json = (await clone.json()) as any; + if ( + json?.errorCode === 403 || + (typeof json?.errorMessage === "string" && json.errorMessage.includes("token过期")) + ) { + throw new AuthenticationError( + "协助平台凭证已过期或无效,请运行: hose-use assist-platform login 重新扫码登录" + ); + } + } catch (err) { + if (err instanceof AuthenticationError) throw err; + } + } return response; }, ], diff --git a/src/core/http/clients.test.ts b/src/core/http/clients.test.ts index 6a928b8..4a5a22b 100644 --- a/src/core/http/clients.test.ts +++ b/src/core/http/clients.test.ts @@ -14,6 +14,7 @@ import { getOpenApiHeaders, } from "./openapi-client.js"; import { resolveCorpCluster, getEasoClient, getUnityClient, clearUnityClientCache } from "./unity-client.js"; +import { createAssistPlatformClient } from "./assist-platform-client.js"; import { getScriptEngineClient } from "./script-engine-client.js"; import { setCorpTokens, resetTokenStoreMemory } from "../auth/token-store.js"; import { mkdtempSync, rmSync } from "node:fs"; @@ -150,4 +151,23 @@ describe("core/http/unity-client & script-engine-client", () => { rmSync(tempDir, { recursive: true, force: true }); } }); + + it("createAssistPlatformClient throws AuthenticationError when response body contains errorCode: 403", async () => { + const client = createAssistPlatformClient({ + token: "fake-token", + baseUrl: "https://mock-unity.invalid", + }); + + const mockFetch = async () => + new Response(JSON.stringify({ errorCode: 403, errorMessage: "token过期请重新登录!" }), { + status: 200, + headers: { "content-type": "application/json" }, + }); + + const testClient = client.extend({ fetch: mockFetch as any }); + + expect(async () => { + await testClient.get("test").json(); + }).toThrow("协助平台凭证已过期或无效,请运行: hose-use assist-platform login 重新扫码登录"); + }); }); diff --git a/src/core/http/sso-client.test.ts b/src/core/http/sso-client.test.ts new file mode 100644 index 0000000..83bb2a4 --- /dev/null +++ b/src/core/http/sso-client.test.ts @@ -0,0 +1,138 @@ +import { describe, expect, it } from "bun:test"; +import { + createSsoClient, + getSsoQrCode, + pollSsoQrCodeStatus, + verifySsoTokenOnUnity, +} from "./sso-client.js"; +import { AuthenticationError } from "../errors.js"; + +describe("core/http/sso-client", () => { + it("getSsoQrCode 能够正常解析二维码链接与 Session Cookie", async () => { + const mockClient = { + post: async () => ({ + headers: new Headers({ + "set-cookie": "SSO_SESSION_ID=mock-session-1234; Path=/; HttpOnly", + }), + json: async () => ({ + code: 0, + message: "ok", + data: { + url: "https://login.dingtalk.com/oauth2/auth?mock=1", + appId: "12021", + redirect: "https://unity.ekuaibao.com/platform-charge/", + }, + }), + }), + }; + + const res = await getSsoQrCode(mockClient as any); + expect(res.dingUrl).toContain("login.dingtalk.com"); + expect(res.ssoSessionId).toBe("mock-session-1234"); + }); + + it("getSsoQrCode 遇到业务错误时抛出 AuthenticationError", async () => { + const mockClient = { + post: async () => ({ + headers: new Headers(), + json: async () => ({ + code: 1, + message: "类型不支持", + }), + }), + }; + + expect(async () => { + await getSsoQrCode(mockClient as any); + }).toThrow("类型不支持"); + }); + + it("pollSsoQrCodeStatus 能够正确传递 Cookie 并解析确认状态", async () => { + let capturedHeaders: any = null; + const mockClient = { + get: (url: string, opts: any) => { + capturedHeaders = opts.headers; + return { + json: async () => ({ + code: 0, + message: "ok", + data: { + token: "mock-jwt-token", + redirect: "https://unity.ekuaibao.com/platform-charge/?token=mock-token", + }, + }), + }; + }, + }; + + const res = await pollSsoQrCodeStatus(mockClient as any, { + sessionId: "session-abc", + }); + + expect(capturedHeaders.cookie).toBe("SSO_SESSION_ID=session-abc"); + expect(res.code).toBe(0); + expect(typeof res.data).toBe("object"); + }); + + it("verifySsoTokenOnUnity 优先从 redirect 提取 token 并完成换票", async () => { + // 拦截全局 fetch 测试 verifySsoTokenOnUnity + const originalFetch = globalThis.fetch; + try { + globalThis.fetch = (async (url: any, opts: any) => { + const req = new Request(url, opts); + const body = (await req.json()) as any; + if (body.token === "extracted-token") { + return new Response( + JSON.stringify({ + value: { + token: "unity-session-uuid", + user: { name: "张三", userId: "zhangsan" }, + }, + }), + { status: 200, headers: { "content-type": "application/json" } } + ); + } + return new Response(JSON.stringify({ errorCode: 400 }), { + status: 200, + headers: { "content-type": "application/json" }, + }); + }) as any; + + const res = await verifySsoTokenOnUnity( + "https://unity.ekuaibao.com/platform-charge/?token=extracted-token" + ); + + expect(res.sessionToken).toBe("unity-session-uuid"); + expect(res.userName).toBe("张三"); + } finally { + globalThis.fetch = originalFetch; + } + }); + + it("verifySsoTokenOnUnity 当 token 包含点时自动 base64 处理", async () => { + const originalFetch = globalThis.fetch; + try { + let passedToken = ""; + globalThis.fetch = (async (url: any, opts: any) => { + const req = new Request(url, opts); + const body = (await req.json()) as any; + passedToken = body.token; + return new Response( + JSON.stringify({ + value: { + token: "unity-session-uuid-2", + user: { name: "李四" }, + }, + }), + { status: 200, headers: { "content-type": "application/json" } } + ); + }) as any; + + const res = await verifySsoTokenOnUnity("jwt.with.dots"); + expect(passedToken).toBe(Buffer.from("jwt.with.dots").toString("base64")); + expect(res.sessionToken).toBe("unity-session-uuid-2"); + } finally { + globalThis.fetch = originalFetch; + } + }); +}); diff --git a/src/core/http/sso-client.ts b/src/core/http/sso-client.ts index 4c92625..2dc8cf7 100644 --- a/src/core/http/sso-client.ts +++ b/src/core/http/sso-client.ts @@ -32,6 +32,65 @@ export interface QrCodeStatusResponse { } | string; } +export interface SsoQrCodeResult { + dingUrl: string; + ssoSessionId: string; + appId: string; + redirect: string; +} + +/** + * 请求 HoseCloudSSO 生成钉钉扫码登录链接与会话 Cookie + */ +export async function getSsoQrCode( + client: KyInstance, + options: { + appId?: string; + redirect?: string; + } = {} +): Promise { + const appId = options.appId || "12021"; + const redirect = options.redirect || "https://unity.ekuaibao.com/platform-charge/"; + + try { + const res = await client.post("api/v1/user/login/qrcode", { + json: { + type: "ding", + appId, + redirect, + }, + }); + + const cookieHeader = res.headers.get("set-cookie"); + const matchCookie = cookieHeader ? cookieHeader.match(/SSO_SESSION_ID=([^;]+)/) : null; + const ssoSessionId = matchCookie ? matchCookie[1] : ""; + + const json = (await res.json()) as { + code?: number; + message?: string; + data?: { url?: string; appId?: string; redirect?: string }; + }; + + if (json.code !== 0 || !json.data?.url) { + throw new AuthenticationError( + `获取钉钉登录二维码失败: ${json.message || "服务端未返回有效二维码链接"}` + ); + } + + return { + dingUrl: json.data.url, + ssoSessionId, + appId: json.data.appId || appId, + redirect: json.data.redirect || redirect, + }; + } catch (err) { + if (err instanceof AuthenticationError) throw err; + throw new AuthenticationError( + `请求 SSO 钉钉二维码接口失败: ${err instanceof Error ? err.message : String(err)}` + ); + } +} + /** * 轮询 HoseCloudSSO 钉钉扫码登录确认状态 */ @@ -67,3 +126,67 @@ export async function pollSsoQrCodeStatus( ); } } + +/** + * 将 SSO 返回的重定向地址或 Token 换取为 Unity 协助平台凭证会话 + */ +export async function verifySsoTokenOnUnity( + tokenOrUrl: string, + options: { + unityBaseUrl?: string; + } = {} +): Promise<{ sessionToken: string; userName: string }> { + const unityBaseUrl = options.unityBaseUrl || "https://unity.ekuaibao.com"; + + // 提取候选 Token + const candidates: string[] = []; + if (tokenOrUrl.includes("://")) { + try { + const u = new URL(tokenOrUrl); + const t = u.searchParams.get("token") || u.searchParams.get("ticket"); + if (t) candidates.push(t); + } catch {} + } else { + candidates.push(tokenOrUrl); + } + + const firstCand = candidates[0] || tokenOrUrl; + if (firstCand.includes(".")) { + candidates.unshift(Buffer.from(firstCand).toString("base64")); + } + + let lastError = "未能完成换票"; + for (const cand of candidates) { + try { + const res = await ky + .post(`${unityBaseUrl}/api/auth/verify`, { + headers: { + "content-type": "application/json", + referer: `${unityBaseUrl}/platform-charge/index.html`, + }, + json: { token: cand }, + timeout: 10000, + }) + .json<{ + value?: { + token: string; + user?: { name?: string; userId?: string; [key: string]: unknown }; + }; + errorCode?: number; + errorMessage?: string; + }>(); + + if (res.value?.token) { + return { + sessionToken: res.value.token, + userName: res.value.user?.name || "运营人员", + }; + } + lastError = res.errorMessage || `errorCode: ${res.errorCode}`; + } catch (e) { + lastError = e instanceof Error ? e.message : String(e); + } + } + + throw new AuthenticationError(`换取合思协助平台会话失败: ${lastError}`); +} diff --git a/src/domains/assist-platform/services.ts b/src/domains/assist-platform/services.ts index 94a0118..531ba21 100644 --- a/src/domains/assist-platform/services.ts +++ b/src/domains/assist-platform/services.ts @@ -1,7 +1,15 @@ import ky, { type KyInstance } from "ky"; +import qrcode from "qrcode-terminal"; import { BusinessError, NotFoundError } from "../../core/errors.js"; import { importFromLink, type ImportFromLinkOptions } from "../../core/auth/link-import.js"; import { loadCorpConfigs, resolveWritableEnterprisesDir, saveCorpConfig } from "../../core/config/loader.js"; +import { saveAssistPlatformSession } from "../../core/auth/assist-platform-store.js"; +import { + createSsoClient, + getSsoQrCode, + pollSsoQrCodeStatus, + verifySsoTokenOnUnity, +} from "../../core/http/sso-client.js"; import type { CorpConfig } from "../../core/config/types.js"; import { approveAssistTicketApi, @@ -351,8 +359,10 @@ export async function importAssistSessionToLocal( }> { const sessionResult = await generateAssistSession(client, params); + const importBaseUrl = sessionResult.baseUrl || "https://app.ekuaibao.com"; const importOptions: ImportFromLinkOptions = { name: params.saveName, + baseUrl: importBaseUrl, overwrite: params.overwrite ?? true, enterprisesDir: params.enterprisesDir, ttl: params.ttl, @@ -361,7 +371,7 @@ export async function importAssistSessionToLocal( const linkToImport = sessionResult.loginUrl.includes("accessToken=") ? sessionResult.loginUrl - : `https://app.ekuaibao.com/web/thirdparty.html?accessToken=${encodeURIComponent(sessionResult.token)}&ekbCorpId=${encodeURIComponent(sessionResult.corporationId)}${sessionResult.staffId ? `&staffId=${encodeURIComponent(sessionResult.staffId)}` : ""}`; + : `${importBaseUrl}/web/thirdparty.html?accessToken=${encodeURIComponent(sessionResult.token)}&ekbCorpId=${encodeURIComponent(sessionResult.corporationId)}${sessionResult.staffId ? `&staffId=${encodeURIComponent(sessionResult.staffId)}` : ""}`; const previousCorp = loadCorpConfigs(params.enterprisesDir ? [params.enterprisesDir] : undefined) .find((corp) => corp.id === sessionResult.corporationId); @@ -520,3 +530,95 @@ export async function transferAssistTicket( remarks: params.remarks, }; } + +export interface AssistQrLoginOptions { + timeoutMs?: number; + onQrCode?: (qrText: string, dingUrl: string) => void; + onProgress?: (elapsedMs: number, remainingMs: number) => void; + signal?: AbortSignal; +} + +export function generateTerminalQrCode(text: string): Promise { + return new Promise((resolve) => { + try { + qrcode.generate(text, { small: true }, (qr) => { + resolve(qr); + }); + } catch { + resolve(""); + } + }); +} + +/** + * 完整固化的钉钉交互式扫码登录合思协助平台闭环 + */ +export async function loginAssistPlatformByQrCode( + options: AssistQrLoginOptions = {} +): Promise<{ token: string; userName: string; baseUrl: string }> { + const timeoutMs = options.timeoutMs ?? 60000; + const ssoClient = createSsoClient(); + const qrRes = await getSsoQrCode(ssoClient); + + const terminalQr = await generateTerminalQrCode(qrRes.dingUrl); + + if (options.onQrCode) { + options.onQrCode(terminalQr, qrRes.dingUrl); + } + + const startTime = Date.now(); + let pollData: any = null; + + while (Date.now() - startTime < timeoutMs) { + if (options.signal?.aborted) { + throw new BusinessError("扫码登录已取消"); + } + + await new Promise((resolve) => setTimeout(resolve, 1500)); + + const elapsed = Date.now() - startTime; + const remaining = Math.max(0, timeoutMs - elapsed); + if (options.onProgress) { + options.onProgress(elapsed, remaining); + } + + try { + const res = await pollSsoQrCodeStatus(ssoClient, { + cookie: `SSO_SESSION_ID=${qrRes.ssoSessionId}`, + signal: options.signal, + }); + + if (res.code === 0 && res.data && typeof res.data === "object") { + pollData = res.data; + break; + } + } catch (err) { + if (err instanceof Error && err.name === "AbortError") throw err; + // 容错继续轮询 + } + } + + if (!pollData) { + throw new BusinessError("钉钉扫码登录超时(超过 60 秒时间窗口),请重新发起登录"); + } + + const tokenCandidate = pollData.redirect || pollData.token; + if (!tokenCandidate) { + throw new BusinessError("SSO 认证响应中未包含有效 Token 或跳转链接"); + } + + const { sessionToken, userName } = await verifySsoTokenOnUnity(tokenCandidate); + + saveAssistPlatformSession({ + token: sessionToken, + userName, + baseUrl: "https://unity.ekuaibao.com/api", + updatedAt: Date.now(), + }); + + return { + token: sessionToken, + userName, + baseUrl: "https://unity.ekuaibao.com/api", + }; +} diff --git a/src/domains/platform/workflow/transport/catalog/api.ts b/src/domains/platform/workflow/transport/catalog/api.ts index aeb7fe2..b961c67 100644 --- a/src/domains/platform/workflow/transport/catalog/api.ts +++ b/src/domains/platform/workflow/transport/catalog/api.ts @@ -90,12 +90,12 @@ export async function grantWorkflowNodesApi(options: { timeout: 30000, }); const json = (await response.json()) as any; - const data = json?.data ?? {}; + const innerData = json?.data?.data ?? json?.data ?? {}; return { success: Boolean(json?.success ?? true), - saved: Array.isArray(data.saved) ? data.saved : [], - skipped: Array.isArray(data.skipped) ? data.skipped : [], - rawMessage: json?.msg || json?.message || "", + saved: Array.isArray(innerData.saved) ? innerData.saved : [], + skipped: Array.isArray(innerData.skipped) ? innerData.skipped : [], + rawMessage: json?.data?.msg || json?.msg || json?.message || "", }; } catch (err: any) { const message = err?.message || String(err); From 3a80e320938de0b0189feca238fa9684e85c4126 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 15:01:43 +0800 Subject: [PATCH 02/12] =?UTF-8?q?fix(assist-platform):=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20--status=20=E4=BD=9C=E4=B8=BA=E5=B8=83=E5=B0=94?= =?UTF-8?q?=E8=AF=8A=E6=96=AD=E5=BC=80=E5=85=B3=E4=B8=8E=E5=80=BC=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=8F=8C=E9=87=8D=E8=AF=AD=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 command-metadata 中将 assist-platform 的 status 声明为 boolean-or-value - 允许 hose-use assist-platform login --status 作为独立布尔诊断探针 - 同时保留 assist-platform search --status=<值> 的过滤值语义 --- src/cli/command-metadata.ts | 5 +++-- src/cli/commands/assist-platform/login.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/command-metadata.ts b/src/cli/command-metadata.ts index 359a540..0e0de6e 100644 --- a/src/cli/command-metadata.ts +++ b/src/cli/command-metadata.ts @@ -832,8 +832,9 @@ export const COMMAND_METADATA: Record = { "forward": "transfer" }, flags: { - ...flagList("token t user name u hose-token jwt ticket ticket-id auth-code staff staff-id staffId alias corp-name count limit n start offset state status corpid id keyword query q message msg reason matter hours hour duration days day to recipient target remarks comment corp", "value"), - ...flagList("all a logout admin save import persist switch current overwrite candidates list-candidates qr", "boolean") + ...flagList("token t user name u hose-token jwt ticket ticket-id auth-code staff staff-id staffId alias corp-name count limit n start offset state corpid id keyword query q message msg reason matter hours hour duration days day to recipient target remarks comment corp", "value"), + ...flagList("all a logout admin save import persist switch current overwrite candidates list-candidates qr check", "boolean"), + ...flagList("status", "boolean-or-value") } } }; diff --git a/src/cli/commands/assist-platform/login.ts b/src/cli/commands/assist-platform/login.ts index 896ff28..7c00ebb 100644 --- a/src/cli/commands/assist-platform/login.ts +++ b/src/cli/commands/assist-platform/login.ts @@ -69,7 +69,7 @@ export async function handleLogin( }; } - const checkStatusOnly = booleanOption(parsed.options, ["status"]); + const checkStatusOnly = booleanOption(parsed.options, ["status", "check"]); const forceQr = booleanOption(parsed.options, ["qr", "force"]); const isInteractive = Boolean( process.stdin.isTTY && !process.env.CI && process.env.NODE_ENV !== "test" From a0cb09b500c5b40c1bb594756e26eaf94c50c3d1 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 17:54:47 +0800 Subject: [PATCH 03/12] =?UTF-8?q?feat(cli):=20=E5=A2=9E=E5=BC=BA=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E5=AD=90=E5=91=BD=E4=BB=A4=E4=B8=93=E5=B1=9E?= =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E4=B8=8E=E5=8F=82=E6=95=B0=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注册 workflow webhook 子命令与别名 (webhook-send, webhooks) - 为 workflow node add 和 node edit 增加 --sleep-time 参数支持与针对性错误提示 - 为 workflow test 增加单号与流程ID输入颠倒时的自纠错能力与 Webhook 引导提示 - 在 help.ts 中增加 node add/edit、test 与 webhook 的多层级精准帮助 - 保持黑盒 CLI 使用体验,杜绝阅读源码定位工作流操作参数 --- src/cli/command-metadata.ts | 9 +- src/cli/commands/workflow/ergonomics.test.ts | 69 +++++++++++++++ src/cli/commands/workflow/node.ts | 39 +++++++-- src/cli/commands/workflow/test.ts | 36 ++++++-- src/cli/help.ts | 90 +++++++++++++++++++- src/cli/runner.ts | 6 +- 6 files changed, 230 insertions(+), 19 deletions(-) create mode 100644 src/cli/commands/workflow/ergonomics.test.ts diff --git a/src/cli/command-metadata.ts b/src/cli/command-metadata.ts index 0e0de6e..c04df15 100644 --- a/src/cli/command-metadata.ts +++ b/src/cli/command-metadata.ts @@ -220,7 +220,8 @@ export const COMMAND_METADATA: Record = { "check": "检查错误管道", "enum": "查询在线枚举字典(不可用时使用内置字典)", "lint-script": "静态检查 JavaScript / MVEL 脚本", - "eval-script": "在本地沙箱中模拟执行脚本" + "eval-script": "在本地沙箱中模拟执行脚本", + "webhook": "向工作流 Webhook 触发器发送测试数据 (别名: webhook-send)" }, "options": [ "--flow=<单号> 指定测试单据", @@ -271,9 +272,11 @@ export const COMMAND_METADATA: Record = { "run-script": "eval-script", "enums": "enum", "dictionary": "enum", - "dict": "enum" + "dict": "enum", + "webhook-send": "webhook", + "webhooks": "webhook" }, - flags: { ...flagList("all allow-prod allow-production auto-publish autoPublish compare detail diff empty errors f fail fail-on-alert failOnAlert failed failed-only failedOnly follow force force-write forceWrite full has-error hasError in-place inPlace includeDetail json none once publish snapshot v value-json valueJson verbose with-tasks withTasks timeline progress steps", "boolean"), ...flagList("a admin-key adminKey after app app-id appId b bill body c code code-file container count d data desc description display display-name displayName end-time endTime entity execution-logs field file filter flow flow-code flowCode from i id input input-file insert-after interval job job-id job1 job2 jobA jobB jobId json-file keyword l label limit log logs mapping mapping-file max-jobs maxJobs n name node node-id nodeId nodes output output-file outputFile p page page-size pageSize parent parent-id parentId password path payload pipeline pipeline-id pipelineId platform platform-id platformId pwd q query record s sample sample-id sampleId set size snapshot1 snapshot2 snapshotA snapshotB source start-time startTime state state-file stateFile t target targetName targetPlatformId task taskType third-id thirdId timeout timeout-ms timeoutMs to trigger type types value workflowId", "value") } + flags: { ...flagList("all allow-prod allow-production auto-publish autoPublish compare detail diff empty errors f fail fail-on-alert failOnAlert failed failed-only failedOnly follow force force-write forceWrite full has-error hasError in-place inPlace includeDetail json none once publish snapshot v value-json valueJson verbose with-tasks withTasks timeline progress steps", "boolean"), ...flagList("a admin-key adminKey after app app-id appId b bill body c code code-file container count d data desc description display display-name displayName end-time endTime entity execution-logs field file filter flow flow-code flowCode from i id input input-file insert-after interval job job-id job1 job2 jobA jobB jobId json-file keyword l label limit log logs mapping mapping-file max-jobs maxJobs n name node node-id nodeId nodes output output-file outputFile p page page-size pageSize parent parent-id parentId password path payload pipeline pipeline-id pipelineId platform platform-id platformId pwd q query record s sample sample-id sampleId seconds set size sleep-time sleepTime snapshot1 snapshot2 snapshotA snapshotB source start-time startTime state state-file stateFile t target targetName targetPlatformId task taskType third-id thirdId timeout timeout-ms timeoutMs to trigger type types value workflowId", "value") } }, "bill": { "summary": "单据检索、表单规格诊断与审批动作", diff --git a/src/cli/commands/workflow/ergonomics.test.ts b/src/cli/commands/workflow/ergonomics.test.ts new file mode 100644 index 0000000..603afdb --- /dev/null +++ b/src/cli/commands/workflow/ergonomics.test.ts @@ -0,0 +1,69 @@ +import { describe, expect, it } from "bun:test"; +import { runCli } from "../../runner.js"; +import { renderScopedHelp } from "../../help.js"; + +describe("workflow CLI ergonomics & layered help", () => { + it("renders specialized layered help for workflow node add", () => { + const help = renderScopedHelp(["workflow", "node", "add"]); + expect(help).toContain("workflow node add -"); + expect(help).toContain("--type="); + expect(help).toContain("--sleep-time=<秒数>"); + expect(help).toContain("--set='key=value'"); + expect(help).toContain("--after=<节点name>"); + expect(help).toContain("支持选项:"); + }); + + it("renders specialized layered help for workflow node edit", () => { + const help = renderScopedHelp(["workflow", "node", "edit"]); + expect(help).toContain("workflow node edit -"); + expect(help).toContain("--sleep-time=<秒数>"); + expect(help).toContain("--set='key=value'"); + expect(help).toContain("支持选项:"); + }); + + it("renders specialized layered help for workflow test", () => { + const help = renderScopedHelp(["workflow", "test"]); + expect(help).toContain("workflow test -"); + expect(help).toContain("--flow=<单号>"); + expect(help).toContain("--body='{...}'"); + expect(help).toContain("--sample=<1|2|3>"); + expect(help).toContain("支持选项:"); + }); + + it("renders specialized layered help for workflow webhook send", () => { + const help = renderScopedHelp(["workflow", "webhook", "send"]); + expect(help).toContain("workflow webhook send -"); + expect(help).toContain("--bill=<单号|单据ID>"); + expect(help).toContain("--body='{...}'"); + expect(help).toContain("支持选项:"); + }); + + it("runCli correctly resolves sub-subcommand help via --help flag", async () => { + const result = await runCli(["workflow", "node", "add", "--help"]); + expect(result.exitCode).toBe(0); + expect(result.stdout).toContain("workflow node add -"); + expect(result.stdout).toContain("--sleep-time=<秒数>"); + }); + + it("workflow test automatically swaps reversed arguments (billCode and 18-digit pipelineId)", async () => { + const result = await runCli(["workflow", "test", "B26000148", "881196955148578838", "--dry-run"]); + expect(result.exitCode).toBe(0); + expect(result.stdout).toContain("881196955148578838"); + expect(result.stdout).toContain("B26000148"); + }); + + it("workflow node add dry-run accepts --sleep-time directly", async () => { + const result = await runCli([ + "workflow", + "node", + "add", + "881196955148578838", + "--type=task-dynamic-delay", + "--sleep-time=5", + "--dry-run", + ]); + expect(result.exitCode).toBe(0); + expect(result.stdout).toContain("追加工作流节点"); + expect(result.stdout).toContain("task-dynamic-delay"); + }); +}); diff --git a/src/cli/commands/workflow/node.ts b/src/cli/commands/workflow/node.ts index 4c071b3..d24a024 100644 --- a/src/cli/commands/workflow/node.ts +++ b/src/cli/commands/workflow/node.ts @@ -11,7 +11,7 @@ import { import { isServerManagedDescType } from "../../../domains/platform/workflow/nodes/mutations.js"; import { ValidationError } from "../../../core/errors.js"; import type { WorkflowDetail } from "../../../domains/platform/workflow/types.js"; -import { stringOption } from "../../parser.js"; +import { stringOption, numberOption } from "../../parser.js"; import { printJson, printTable, printKeyValue } from "../../printer.js"; import { isDryRun, mutationPreview, requireMutationConfirmation } from "../../mutation.js"; import type { CliParsedArgs, CliResult, CliRuntime } from "../../types.js"; @@ -257,10 +257,12 @@ async function handleAddNode( stdout: "", stderr: [ "请指定新增节点类型: --type=<类型>", - "常见类型: code-js2 (JS脚本), code (MVEL代码), http (HTTP请求), stop (终止流程), every (循环遍历), condition (分支条件)", + "常见类型: task-dynamic-delay (延迟等待), code-js2 (JS脚本), code (MVEL代码), http (HTTP请求), stop (终止流程), every (循环遍历), condition (分支条件)", "", "常用选项:", - " --type= 节点类型 (如 code-js2 / code)", + " --type= 节点类型 (如 task-dynamic-delay / code-js2 / http)", + " --sleep-time=<秒数> 延迟等待秒数 (针对 task-dynamic-delay,如 5)", + " --set='key=value' 自定义节点属性注入", " --label=<标题> 节点类型标题", " --display-name=<名称> 设计器节点标题(displayName,最多 20 字符)", " --code-file=<脚本路径> (推荐) 从本地文件导入代码,避免终端转义与 Token 浪费", @@ -269,7 +271,9 @@ async function handleAddNode( " --after=<前置节点name> 插入指定节点之后", " --yes 确认追加", "", - "示例: hose-use workflow node add 896398895352487950 --type=code-js2 --label='数据清洗' --code-file=./clean.js --yes", + "示例:", + " hose-use workflow node add 881196955148578838 --type=task-dynamic-delay --sleep-time=5 --after=action_123 --yes", + " hose-use workflow node add 896398895352487950 --type=code-js2 --label='数据清洗' --code-file=./clean.js --yes", ].join("\n") + "\n", exitCode: 1, }; @@ -288,6 +292,25 @@ async function handleAddNode( code = await fs.readFile(codeFile, "utf-8"); } + const rawSleepTime = numberOption(parsed.options, ["sleep-time", "sleepTime", "seconds"]); + const rawSet = stringOption(parsed.options, ["set", "value"]); + const extra: Record = {}; + if (rawSleepTime !== undefined) { + extra.sleepTime = rawSleepTime; + } + if (rawSet) { + const eqIdx = rawSet.indexOf("="); + if (eqIdx !== -1) { + const k = rawSet.slice(0, eqIdx).trim(); + const v = rawSet.slice(eqIdx + 1).trim(); + try { + extra[k] = JSON.parse(v); + } catch { + extra[k] = v; + } + } + } + requireMutationConfirmation( parsed, runtime, @@ -306,6 +329,7 @@ async function handleAddNode( code, parent, after, + extra: Object.keys(extra).length ? extra : undefined, }); if (isDryRun(parsed, runtime)) { @@ -359,12 +383,13 @@ async function handleEditNode( "请提供节点标识 (name 或层级序号): hose-use workflow node edit [选项]", "", "常用选项:", + " --sleep-time=<秒数> 更新延迟等待秒数 (针对 task-dynamic-delay,如 5)", + " --set='key=value' 定向修改节点自定义属性 (如 --set='sleepTime=5')", " --label=<类型标题> 更新节点类型标题(服务端保存时可能重新生成)", " --display-name=<新名称> 更新设计器节点标题(displayName,最多 20 字符)", " --code-file=<脚本路径> (推荐) 从本地文件导入最新脚本,避免终端转义与 Token 浪费", " --code=<行内代码> 直接传入代码片段(短脚本)", " --desc=<描述> 更新节点描述", - " --set='key=value' 定向修改节点自定义属性", " --dry-run 只预览变更", " --yes 确认保存修改", "", @@ -388,6 +413,10 @@ async function handleEditNode( const rawSet = stringOption(parsed.options, ["set", "value"]); const customSet: Record = {}; + const rawSleepTime = numberOption(parsed.options, ["sleep-time", "sleepTime", "seconds"]); + if (rawSleepTime !== undefined) { + customSet.sleepTime = rawSleepTime; + } if (rawSet) { const eqIdx = rawSet.indexOf("="); if (eqIdx !== -1) { diff --git a/src/cli/commands/workflow/test.ts b/src/cli/commands/workflow/test.ts index 4638311..076b624 100644 --- a/src/cli/commands/workflow/test.ts +++ b/src/cli/commands/workflow/test.ts @@ -18,7 +18,20 @@ export async function handleWorkflowTest( parsed: CliParsedArgs, runtime: CliRuntime ): Promise { - const pipelineId = parsed.args[0] || stringOption(parsed.options, ["id", "pipeline-id", "pipelineId"]); + let pipelineId = parsed.args[0] || stringOption(parsed.options, ["id", "pipeline-id", "pipelineId"]); + let flowCodeOrId = stringOption(parsed.options, ["flow", "record", "code", "flow-code", "flowCode", "bill", "entity", "id"]); + + // 智能参数纠错:如果首参数疑似单号/台账记录(非纯数字长ID),且第二个位置参数为工作流ID(16~20位纯数字) + if ( + parsed.args[0] && + parsed.args[1] && + /^\d{16,20}$/.test(parsed.args[1]) && + !/^\d{16,20}$/.test(parsed.args[0]) + ) { + flowCodeOrId = parsed.args[0]; + pipelineId = parsed.args[1]; + } + if (!pipelineId) { return { stdout: "", @@ -44,7 +57,6 @@ export async function handleWorkflowTest( }; } - const flowCodeOrId = stringOption(parsed.options, ["flow", "record", "code", "flow-code", "flowCode", "bill", "entity", "id"]); const autoPublish = booleanOption(parsed.options, ["auto-publish", "autoPublish", "publish"]); const timeoutMs = numberOption(parsed.options, ["timeout", "timeout-ms", "timeoutMs"]) ?? 15000; const rawBody = stringOption(parsed.options, ["body", "data", "payload"]); @@ -245,13 +257,16 @@ export async function handleWorkflowTest( ...(sampleLines.length > 0 ? [` --sample=<1|2|3> 直接选用上述服务器最近接收的数据样本发起测试`] : []), + ` --flow=<单号> 提取指定单据的编码与数据作为 Webhook Payload 发起测试`, ` --body='{"key": "value"}' 直接传入自定义 JSON 请求体`, ` --file= 从本地 JSON 文件读取请求体`, ` --empty 使用空对象 {} 直接发起测试`, "", - `示例: hose-use workflow test ${pipelineId} ${ - sampleLines.length > 0 ? "--sample=1" : `--body='{"code": "TEST-001"}'` + `示例:`, + ` hose-use workflow test ${pipelineId} ${ + sampleLines.length > 0 ? "--sample=1" : `--flow=B26000148` }`, + ` hose-use workflow webhook send ${pipelineId} --bill=B26000148 --yes`, ].join("\n") + "\n", stderr: "", exitCode: 1, @@ -357,9 +372,13 @@ export async function handleWorkflowTest( ].join("\n"); return { stdout: `${out}\n`, stderr: "", exitCode: 1 }; } catch (err: any) { + const errMsg = err.message || String(err); + const notFoundHint = errMsg.includes("expected 1 result. got 0") + ? `\n💡 提示: 云端未查询到工作流 [${pipelineId}] 的调试数据源,请检查工作流 ID 是否有效,或工作流类型是否需要 --flow / --body 等参数。` + : ""; return { stdout: "", - stderr: `未指定测试单号 (--flow=<单号>),且拉取候选单据失败: ${err.message || String(err)}\n`, + stderr: `未指定测试单号 (--flow=<单号>),且拉取候选单据失败: ${errMsg}${notFoundHint}\n`, exitCode: 1, }; } @@ -489,6 +508,13 @@ export async function handleWorkflowTest( outLines.push(...formatCodeNodeSummariesCard(codeSummaries, report.jobId)); } + if (category === "WEBHOOK" && report.outcome !== "completed") { + outLines.push(""); + outLines.push("💡 [Webhook 流程调试提示]"); + outLines.push(" 工作流首节点为 Webhook 触发器。若需向合思云端发起真实的 Webhook 事件调度流转,可直接运行:"); + outLines.push(` hose-use workflow webhook send ${pipelineId}${flowCodeOrId ? ` --bill=${flowCodeOrId}` : ""} --yes`); + } + return { stdout: `${outLines.join("\n")}\n`, stderr: "", diff --git a/src/cli/help.ts b/src/cli/help.ts index 6ed31fa..c0877ea 100644 --- a/src/cli/help.ts +++ b/src/cli/help.ts @@ -3,6 +3,72 @@ import { usageError } from "./errors.js"; export type { HelpTopic } from "./command-metadata.js"; export const HELP_REGISTRY = COMMAND_METADATA; +interface SubActionHelp { + summary: string; + usage: string; + options: string[]; +} + +const SUB_ACTION_HELP: Record = { + "workflow:node:add": { + summary: "向工作流声明式追加任务节点", + usage: "hose-use workflow node add --type=<类型> [选项]", + options: [ + "--type= 节点类型 (如 task-dynamic-delay / code-js2 / http / stop / every)", + "--sleep-time=<秒数> 延迟等待秒数 (针对 task-dynamic-delay,如 5)", + "--set='key=value' 自定义节点属性注入 (如 --set='sleepTime=5')", + "--after=<节点name> 插入在指定节点之后", + "--parent=<容器节点name> 插入指定容器节点内部 (如 every 循环)", + "--label=<标题> 节点类型标题", + "--display-name=<名称> 设计器节点标题(最多 20 字符)", + "--code-file=<脚本路径> 从本地文件导入代码 (推荐)", + "--code=<代码片段> 传入代码字符串 (仅限简短代码)", + "--dry-run 只预览追加变更,不实际写入", + "--yes 确认追加新节点", + ], + }, + "workflow:node:edit": { + summary: "定向修改工作流任务节点配置", + usage: "hose-use workflow node edit [选项]", + options: [ + "--sleep-time=<秒数> 更新延迟等待秒数 (针对 task-dynamic-delay,如 5)", + "--set='key=value' 定向修改节点自定义属性 (如 --set='sleepTime=5')", + "--display-name=<新名称> 更新设计器节点标题(displayName,最多 20 字符)", + "--code-file=<脚本路径> 从本地文件导入最新脚本 (推荐)", + "--code=<行内代码> 直接传入代码片段", + "--desc=<描述> 更新节点描述", + "--label=<类型标题> 更新节点类型标题", + "--dry-run 只预览变更", + "--yes 确认保存修改", + ], + }, + "workflow:test": { + summary: "端到端一键调试工作流(替代前端手工调测)", + usage: "hose-use workflow test [选项]", + options: [ + "--flow=<单号> 测试单据编号 (flowCode 或 flowId)", + "--body='{...}' 自定义测试请求体 (针对 Webhook 触发器)", + "--sample=<1|2|3> 直接选用服务器最近接收的数据样本发起测试", + "--timeout= 轮询超时时间 (毫秒,默认 15000)", + "--auto-publish 调试通过后是否自动发布测试快照 (默认 false)", + "--force, -f 生产环境安全放行 (正式企业 env: prod 调试必须加)", + "--dry-run 只预览测试配置,不发起调用", + "--yes/--confirm 确认执行真实调试", + ], + }, + "workflow:webhook": { + summary: "向工作流 Webhook 触发器发送测试数据 (别名: webhook-send)", + usage: "hose-use workflow webhook [send] [选项]", + options: [ + "--bill=<单号|单据ID> 抓取真实单据数据作为测试载荷发送", + "--body='{...}' 指定自定义 JSON 请求体", + "--file= 从 JSON 文件读取请求体", + "--dry-run 仅预览目标 Webhook 地址与载荷,不实际发送", + "--yes 确认发送网络请求", + ], + }, +}; + export function renderScopedHelp(target: string[]): string { const resolved = resolveCommandMetadata(target[0]); if (!resolved) throw usageError(`未找到命令域帮助: ${target.join(" ") || ""}。运行 hose-use --help 查看全部命令域。`); @@ -10,10 +76,26 @@ export function renderScopedHelp(target: string[]): string { const action = resolveCommandAction(area, target[1]); if (action && !Object.hasOwn(topic.commands, action)) throw usageError(`未找到子命令帮助: ${area} ${target[1]}`); - const lines = [`${area} - ${topic.summary}`, "", `用法: ${topic.usage}`, "", "子命令:"]; - if (action && topic.commands[action]) lines.push(` ${action.padEnd(14)} ${topic.commands[action]}`); - else for (const [name, description] of Object.entries(topic.commands)) lines.push(` ${name.padEnd(14)} ${description}`); - if (topic.options?.length) lines.push("", "常用选项:", ...topic.options.map((option) => ` ${option}`)); + + const subTarget = target[2]?.toLowerCase(); + const subKey = subTarget ? `${area}:${action}:${subTarget}` : `${area}:${action}`; + const subHelp = SUB_ACTION_HELP[subKey] || SUB_ACTION_HELP[`${area}:${action}`]; + + const titlePrefix = subHelp ? `${area} ${action}${subTarget ? ` ${subTarget}` : ""}` : area; + const summaryText = subHelp?.summary || topic.summary; + const usageText = subHelp?.usage || topic.usage; + const commonOpts = subHelp?.options || topic.options; + + const lines = [`${titlePrefix} - ${summaryText}`, "", `用法: ${usageText}`, "", "子命令:"]; + if (subHelp) { + lines.push(` ${action}${subTarget ? ` ${subTarget}` : ""}`.padEnd(16) + ` ${subHelp.summary}`); + } else if (action && topic.commands[action]) { + lines.push(` ${action.padEnd(14)} ${topic.commands[action]}`); + } else { + for (const [name, description] of Object.entries(topic.commands)) lines.push(` ${name.padEnd(14)} ${description}`); + } + + if (commonOpts?.length) lines.push("", "常用选项:", ...commonOpts.map((option) => ` ${option}`)); lines.push("", "支持选项:", ...Object.entries(commandFlags(area, action)).map(([key, kind]) => ` --${key}${kind === "value" ? "=<值>" : kind === "boolean-or-value" ? "[=<值>]" : ""}`)); lines.push("", "提示: 追加 --json 获取机器可解析结果;写操作先用 --dry-run,再用 --yes 或 --confirm 执行。", "更多: hose-use --help"); return lines.join("\n"); diff --git a/src/cli/runner.ts b/src/cli/runner.ts index 3cfbccb..c673b58 100644 --- a/src/cli/runner.ts +++ b/src/cli/runner.ts @@ -93,9 +93,11 @@ function isVersionRequested(parsed: CliParsedArgs): boolean { function resolveHelpTarget(parsed: CliParsedArgs): string[] { if (["help", "h", "?"].includes((parsed.area || "").toLowerCase())) { - return [parsed.action, parsed.args[0]].filter((value): value is string => Boolean(value)); + return [parsed.action, parsed.args[0], parsed.args[1]].filter((value): value is string => Boolean(value)); } - return [parsed.area, parsed.action === "help" ? parsed.args[0] : parsed.action].filter((value): value is string => Boolean(value)); + const primaryAction = parsed.action === "help" ? parsed.args[0] : parsed.action; + const subAction = parsed.action === "help" ? parsed.args[1] : parsed.args[0]; + return [parsed.area, primaryAction, subAction].filter((value): value is string => Boolean(value)); } async function dispatchCli(rawArgs: string[], options: CliRunOptions = {}): Promise { From b3010123ff24ceb091a780832b54c526158ad09c Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 17:56:34 +0800 Subject: [PATCH 04/12] =?UTF-8?q?docs:=20=E7=BA=B3=E7=AE=A1=20.workbuddy?= =?UTF-8?q?=20=E6=9C=AC=E5=9C=B0=E8=AE=B0=E5=BF=86=E4=B8=8E=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E6=96=87=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 保留工作区 memory 上下文记录 (.workbuddy/memory/MEMORY.md) - 保留 2026-11-01 工作流代码审查与多工作树施工日志 (.workbuddy/memory/2026-11-01.md) --- .workbuddy/memory/2026-11-01.md | 64 +++++++++++++++++++++++++++++++++ .workbuddy/memory/MEMORY.md | 17 +++++++++ 2 files changed, 81 insertions(+) create mode 100644 .workbuddy/memory/2026-11-01.md create mode 100644 .workbuddy/memory/MEMORY.md diff --git a/.workbuddy/memory/2026-11-01.md b/.workbuddy/memory/2026-11-01.md new file mode 100644 index 0000000..fe8c870 --- /dev/null +++ b/.workbuddy/memory/2026-11-01.md @@ -0,0 +1,64 @@ +# 2026-11-01 + +## 仓库状态收口与双远端对齐 + +- 起始状态:本地在 `chore/codex-local-environment`(ac6437b),工作区干净,无 stash;版本 v0.8.21。 +- 健康度基线:`bun test` 951 pass / 0 fail(126 文件,4580 断言,~34s);`bun run check`(`tsc --noEmit`)零错误;CI `validate` job 通过。 +- 合并 PR #160(chore: 添加 Codex 本地开发与示例环境,`--merge --delete-branch`),合入后 main = `eb9b979`。 +- 修复 `home`(Gitea git.ying-qing.cn)main 落后问题:原停在 c6d7184(PR #158),缺少 PR #159 工作流传 CLI 拆分的 10 个 commit,违反 AGENTS.md「先推 home 再推 origin」顺序。已 `git push home main` 对齐。 +- 现三个头指针完全一致:`main` = `origin/main` = `home/main` = eb9b979;tag v0.8.12~v0.8.21 两远端均齐备(diff 差异仅为 `^{}` 解引用项)。 +- 已 `git fetch origin --prune` 清理 PR #160 删除分支后的陈旧 remote-tracking ref。 + +## 待处理 + +- `home` 上枯分支 `feat/openapi-provisional-auth-and-workflow-ux`(39a5a7e)已确认合入 main,本地无对应分支,是否删除远端需用户确认后再动。 +- 远端残留若干旧分支(origin/archive/*、fix/restore-local-bill-fixes、feat/bill-draft-ops 等),未做任何删除。 + +## 经验 + +- `gh pr merge` 会自动 checkout 到 base 分支并 fast-forward,合并后需确认当前所处分支。 +- 检查远端是否有本地缺的新提交,`git fetch --dry-run`(不带 refspec)覆盖默认全部分支 ref,比逐分支对比更快。 + +## workflow 领域代码审查结论(PR #159 拆分重构之后) + +以下为实地读码确认的问题,按修复优先级排列: + +1. **生产启停的成功判定是假的(P0)**:`transport/pipeline/api.ts:177` 用 `ok()`(`transport/response.ts:59`,`success = status===200`)判结果,不读 body 不查业务码;而同一文件其他写操作都用会校验业务码的 `readEasoWriteResponse`。`cli/commands/workflow/lifecycle.ts:31-41` 的 `handleToggle` 连 `result.success` 都不看,无条件 `[SUCCESS]` + exitCode 0。反向也错:HTTP 204 成功会被判失败。与 README「HTTP 200 不等于业务成功」正面冲突。 +2. **灰度开通网关硬编码第三方域(P0)**:`transport/catalog/api.ts:88` 硬编码 `https://d9jxeccs5j.sealosgzg.site/hose-workflow-node`,无环境变量逃生口;`options.baseUrl` 只塞进请求 body、不改实际请求目标(疑似可配化没做完)。`success: Boolean(json?.success ?? true)` 缺字段即默认成功。同类 Sealos 资产(sealosgzg.site)已被回收过一次。 +3. **version/tasksVersion 检查只在 CLI 层**:`cli/commands/workflow/node.ts:21-27` 有正查;`draft.ts:130-134` 另有一份实现且抛裸 Error 而非 ValidationError;SDK 出口 `management/configuration.ts:27` 的 `updateWorkflow` 完全没有,任何绕过 CLI 的调用方(HTTP daemon / SDK 直连)都跳过该保障,README 描述得像全局保证。 +4. **`analysis/analyzer.ts` 没被拆分受益**:819 行全域最大,其中 `visit` 闭包一段 373 行塞了 12 类规则(590-611 触发器、614-660 条件、663-733 HTTP、735-791 choose)。PR #159 只拆了 transport/models/management,最该拆的 analyzer 反而没动。 +5. **`UNSAFE_SKIP_WITHOUT_STATUS_GUARD` 判定形同虚设**:`analyzer.ts:252-269` 把过滤条件 `JSON.stringify` 后用 `includes(节点名) && includes("$status")` 判断"是否已守卫",误命中方向是"认为已守卫"= 不告警 = 静默漏报。 +6. **`script/lint-js.ts:6-18` 注释剥离是假的**:只跳过整行注释,`// return` 行尾注释、块注释内部行、字符串里的 return 全部命中 → `missing-return` 告警永不触发。 +7. **重复实现(拆分未收敛)**:节点树遍历 6 份(`execution/tree.ts`、`execution/context.ts`、`management/queries.ts`、`nodes/tree.ts`、`nodes/locator.ts`、`comparison/snapshot.ts`),children 键集合/顺序不一致;`@{choose()}` 解析两份;`@{value()}` 解析三份;终态集合两份;`failedOnly` 过滤两份逐字重复。 +8. **测试盲区**:`branch/explain` 只覆盖 eq/gt,其余比较符无用例;`UNKNOWN_TASK_TYPE` 硬门禁无测试;`alert/` 零测试(DB 与 JSON 双写,`writeFileSync` 在事务提交后无 try/catch);`execution/tree.ts` 的用例写在 `state/index.test.ts:406` 里,模块归属错位。 + +注:`analysis/every.ts:57` 只校验"batchSize 存在但非法"、不管"缺失",这是 README 记录的有意设计(不补默认值),不是缺陷。 + +## 修复落地(工作树 /Users/yingqing/Code/hose-use-workbuddy,分支 workbuddy/workflow-hardening) + +基于 main(eb9b979) 拉起独立工作树施工,5 个 commit(cedc424 / 71aa9b5 / a0058c1 / 1ee46fd / 6dc96a5), +32 文件 +1042/-147,测试 951 → 1004 全绿,`tsc --noEmit` 无错。尚未 push、未开 PR。 + +| commit | 内容 | +|---|---| +| 6dc96a5 | 删除 `transport/response.ts` 的 `ok()`;toggle 改用 `readEasoWriteResponse`,management 层写后回读详情,不一致抛 `BusinessError(WORKFLOW_STATE_NOT_APPLIED)`,回读失败返回 `verified:false`;lifecycle 按结果给退出码。新增 `WorkflowToggleResult` | +| 1ee46fd | 网关地址改为 `resolveGrayGatewayUrl()`(显式参数 > `HOSE_GRAY_GATEWAY_URL` > 内置默认),统一拼接 `/hose-workflow-node`;`interpretGatewayOutcome` 缺 success/code 标记时判为失败;失败信息带网关地址 | +| a0058c1 | `updateWorkflow` 第三参数支持 `{platformId, expectedVersion}`(字符串写法向后兼容),提交前重读比对;node.ts 删除重复实现;`taskGuardsStatusOf` 改为结构化引用比对;`stripCommentsAndStrings` 真正剥离注释与字符串 | +| 71aa9b5 | Job 状态语义收敛到 `execution/job-status.ts`(原先 watch 把 state:0 当完成、debug 当未知继续轮询,同一 Job 结论相反);`--failed-only` 过滤抽为 `shouldEmitWatchEvent` | +| cedc424 | 补齐 evaluateRule 全 11 个比较符、UNKNOWN_TASK_TYPE、权限证据边界测试;alert 的 JSON 副本导出失败改为返回 `exportError`(原先落盘失败会让整轮巡检失败但指纹已入库);告警测试从 state/index.test.ts 迁回 alert/ | + +### 施工踩坑 + +- `mock.module("ky")` 会污染同进程其他测试文件的 ky 引用(write-result.test.ts 的 `ky.create` 直接变 undefined)。 + 改用具名导出的 `spyOn(ky, "post")` + 可恢复语义。 +- bun 的 `spyOn` 是顶层具名导出,`mock.spyOn` 不存在。 +- 本地 `enterprises/` 只有 example.json,无真实企业配置,因此本次改动无法真实联调,全部依赖单测。 +- 涉及真实企业时只能用「沈玥妍测试企业」(见 MEMORY.md 红线)。 + +### 未做、建议单独排期 + +- `analysis/analyzer.ts` 819 行拆分:`visit` 闭包一段 373 行塞了 12 类规则(590-611/614-660/663-733/735-791), + 应按规则族拆 `rules/*.ts` 注册表。改动面大,需要专门一轮 + 全量回归。 +- 节点树遍历仍重复 6 份(`execution/tree`、`execution/context`、`management/queries`、`nodes/tree`、 + `nodes/locator`、`comparison/snapshot`),children 键集合与顺序不一致会导致执行树与配置树遍历结果漂移。 +- `@{choose()}` 两份、`@{value()}` 三份解析实现待收敛。 diff --git a/.workbuddy/memory/MEMORY.md b/.workbuddy/memory/MEMORY.md new file mode 100644 index 0000000..c5d13f8 --- /dev/null +++ b/.workbuddy/memory/MEMORY.md @@ -0,0 +1,17 @@ +# hose-use 项目长期约束 + +## 企业租户操作红线(强制) + +- **唯一允许操作的测试企业是「沈玥妍测试企业」**,任何需要真实联调/验证的场景只能在它上面做。 +- **绝对禁止对任何生产企业执行操作**,尤其是不可逆的写操作:工作流保存/发布/启停/删除、调试 Job 派发、单据审批、台账写入、灰度节点开通、Webhook 样本注入。 +- 合思后端没有调试沙箱,调试 Job 以真实操作员身份在生产环境运行,并会隐式自增 Pipeline 快照版本 —— 在生产企业上一次「调试」就等于一次真实变更。 +- 代码改动优先用单元测试 + Mock 验证;确需真实接口验证时,先确认当前选中的是测试企业再动手。 + +## 仓库协作 + +- 双远端:`origin` = GitHub(主),`home` = Gitea(git.ying-qing.cn)。发布顺序先 `home` 再 `origin`。 +- 分支名必须全小写,禁止在 main 直接提交,详见 AGENTS.md。 + +## 已知基础设施 + +- New API 端点已从 Sealos 的 `sealosgzg.site` 迁移至 `api.ying-qing.cn`;代码里残留的 `*.sealosgzg.site` 硬编码属于待清理项(workflow 灰度开通网关)。 From 2371ae0bf16f730e504ab1c2570bd6b72209e0ba Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 22:53:06 +0800 Subject: [PATCH 05/12] =?UTF-8?q?refactor(workflow):=20=E6=8C=89=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=B1=BB=E5=9E=8B=E5=8E=9F=E5=AD=90=E5=8C=96=E6=8B=86?= =?UTF-8?q?=E5=88=86=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=8A=82=E7=82=B9=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建 src/domains/platform/workflow/models/nodes/ 子目录 - 将原本混在一个大文件的 14 类节点拆分为独立定义模块: - common.ts: 基础任务契约与通用结构 - http.ts: HTTP 动作节点 (放行 authId/appId 凭证与 passthrough) - delay.ts: 动态延迟等待节点 - code.ts: MVEL / JS 代码节点 - webhook.ts: Webhook 触发器节点 - stop.ts: 终止流程节点 - flow.ts: 单据详情与创建单据节点 - datalink.ts: 台账查找、创建与数据转换节点 - condition.ts & every.ts: 递归容器节点工厂 - unknown.ts: 兜底节点 - index.ts: 聚合实例化统一 WorkflowTaskSchema 导出 - 同步更新 specs/workflow-schema.json 并补齐各节点独立单测与文档 --- specs/workflow-schema.json | 138 +++++++---- src/cli/commands/workflow/ergonomics.test.ts | 39 ++++ src/cli/commands/workflow/node.ts | 40 +++- src/domains/platform/workflow/models/nodes.ts | 214 +----------------- .../workflow/models/nodes/README.nodes.md | 20 ++ .../platform/workflow/models/nodes/code.ts | 19 ++ .../platform/workflow/models/nodes/common.ts | 57 +++++ .../workflow/models/nodes/condition.ts | 15 ++ .../workflow/models/nodes/datalink.ts | 43 ++++ .../platform/workflow/models/nodes/delay.ts | 11 + .../platform/workflow/models/nodes/every.ts | 19 ++ .../platform/workflow/models/nodes/flow.ts | 26 +++ .../platform/workflow/models/nodes/http.ts | 20 ++ .../platform/workflow/models/nodes/index.ts | 51 +++++ .../platform/workflow/models/nodes/stop.ts | 10 + .../platform/workflow/models/nodes/unknown.ts | 19 ++ .../platform/workflow/models/nodes/webhook.ts | 13 ++ 17 files changed, 494 insertions(+), 260 deletions(-) create mode 100644 src/domains/platform/workflow/models/nodes/README.nodes.md create mode 100644 src/domains/platform/workflow/models/nodes/code.ts create mode 100644 src/domains/platform/workflow/models/nodes/common.ts create mode 100644 src/domains/platform/workflow/models/nodes/condition.ts create mode 100644 src/domains/platform/workflow/models/nodes/datalink.ts create mode 100644 src/domains/platform/workflow/models/nodes/delay.ts create mode 100644 src/domains/platform/workflow/models/nodes/every.ts create mode 100644 src/domains/platform/workflow/models/nodes/flow.ts create mode 100644 src/domains/platform/workflow/models/nodes/http.ts create mode 100644 src/domains/platform/workflow/models/nodes/index.ts create mode 100644 src/domains/platform/workflow/models/nodes/stop.ts create mode 100644 src/domains/platform/workflow/models/nodes/unknown.ts create mode 100644 src/domains/platform/workflow/models/nodes/webhook.ts diff --git a/specs/workflow-schema.json b/specs/workflow-schema.json index d17705f..c350ace 100644 --- a/specs/workflow-schema.json +++ b/specs/workflow-schema.json @@ -267,7 +267,7 @@ "params", "urlPath" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -328,7 +328,7 @@ "combineFilters", "tasks" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -405,7 +405,7 @@ "tasksMaxLevel", "tasks" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -451,7 +451,7 @@ "levelIndex", "status" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -538,6 +538,26 @@ "type": "string" }, "additionalProperties": {} + }, + "authId": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "appId": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } }, "required": [ @@ -554,7 +574,7 @@ "params", "successCode" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -635,7 +655,7 @@ "mapping", "flowCode" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -685,7 +705,7 @@ "status", "code" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -766,7 +786,7 @@ "status", "code" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -875,7 +895,7 @@ "orderMode", "limitCount" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -955,7 +975,7 @@ "filters", "combineFilters" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1060,7 +1080,7 @@ "targetType", "feeFormType" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1144,7 +1164,7 @@ "form", "details" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1200,7 +1220,7 @@ "levelIndex", "status" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1372,7 +1392,7 @@ "params", "urlPath" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1433,7 +1453,7 @@ "combineFilters", "tasks" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1510,7 +1530,7 @@ "tasksMaxLevel", "tasks" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1556,7 +1576,7 @@ "levelIndex", "status" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1643,6 +1663,26 @@ "type": "string" }, "additionalProperties": {} + }, + "authId": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "appId": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } }, "required": [ @@ -1659,7 +1699,7 @@ "params", "successCode" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1740,7 +1780,7 @@ "mapping", "flowCode" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1790,7 +1830,7 @@ "status", "code" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1871,7 +1911,7 @@ "status", "code" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -1980,7 +2020,7 @@ "orderMode", "limitCount" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2060,7 +2100,7 @@ "filters", "combineFilters" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2165,7 +2205,7 @@ "targetType", "feeFormType" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2249,7 +2289,7 @@ "form", "details" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2305,7 +2345,7 @@ "levelIndex", "status" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2552,7 +2592,7 @@ "params", "urlPath" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2613,7 +2653,7 @@ "combineFilters", "tasks" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2690,7 +2730,7 @@ "tasksMaxLevel", "tasks" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2736,7 +2776,7 @@ "levelIndex", "status" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2823,6 +2863,26 @@ "type": "string" }, "additionalProperties": {} + }, + "authId": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "appId": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } }, "required": [ @@ -2839,7 +2899,7 @@ "params", "successCode" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2920,7 +2980,7 @@ "mapping", "flowCode" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -2970,7 +3030,7 @@ "status", "code" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -3051,7 +3111,7 @@ "status", "code" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -3160,7 +3220,7 @@ "orderMode", "limitCount" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -3240,7 +3300,7 @@ "filters", "combineFilters" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -3345,7 +3405,7 @@ "targetType", "feeFormType" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -3429,7 +3489,7 @@ "form", "details" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", @@ -3485,7 +3545,7 @@ "levelIndex", "status" ], - "additionalProperties": false + "additionalProperties": {} }, { "type": "object", diff --git a/src/cli/commands/workflow/ergonomics.test.ts b/src/cli/commands/workflow/ergonomics.test.ts index 603afdb..9052449 100644 --- a/src/cli/commands/workflow/ergonomics.test.ts +++ b/src/cli/commands/workflow/ergonomics.test.ts @@ -66,4 +66,43 @@ describe("workflow CLI ergonomics & layered help", () => { expect(result.stdout).toContain("追加工作流节点"); expect(result.stdout).toContain("task-dynamic-delay"); }); + + it("workflow node edit dry-run parses JSON payload in --set", async () => { + const result = await runCli([ + "workflow", + "node", + "edit", + "881196955148578838", + "action_agree_normal", + '--set={"authId":157,"appId":"4"}', + "--dry-run", + ]); + expect(result.exitCode).toBe(0); + expect(result.stdout).toContain("修改工作流节点"); + expect(result.stdout).toContain('"authId":157'); + expect(result.stdout).toContain('"appId":"4"'); + }); + + it("WorkflowTaskSchema preserves authId and appId on http tasks without stripping", async () => { + const { WorkflowTaskSchema } = await import("../../../domains/platform/workflow/models/nodes.js"); + const sample = { + name: "action_test", + type: "http", + label: "http节点", + groupName: "action", + orderIndex: 0, + levelIndex: [0], + status: "active", + method: "POST", + url: "https://example.com", + header: [], + params: [], + successCode: ["200"], + authId: 157, + appId: "4", + }; + const parsed = WorkflowTaskSchema.parse(sample); + expect((parsed as any).authId).toBe(157); + expect((parsed as any).appId).toBe("4"); + }); }); diff --git a/src/cli/commands/workflow/node.ts b/src/cli/commands/workflow/node.ts index d24a024..9bfb4b6 100644 --- a/src/cli/commands/workflow/node.ts +++ b/src/cli/commands/workflow/node.ts @@ -299,14 +299,22 @@ async function handleAddNode( extra.sleepTime = rawSleepTime; } if (rawSet) { - const eqIdx = rawSet.indexOf("="); - if (eqIdx !== -1) { - const k = rawSet.slice(0, eqIdx).trim(); - const v = rawSet.slice(eqIdx + 1).trim(); + if (rawSet.startsWith("{") && rawSet.endsWith("}")) { try { - extra[k] = JSON.parse(v); + Object.assign(extra, JSON.parse(rawSet)); } catch { - extra[k] = v; + // fallback + } + } else { + const eqIdx = rawSet.indexOf("="); + if (eqIdx !== -1) { + const k = rawSet.slice(0, eqIdx).trim(); + const v = rawSet.slice(eqIdx + 1).trim(); + try { + extra[k] = JSON.parse(v); + } catch { + extra[k] = v; + } } } } @@ -418,14 +426,22 @@ async function handleEditNode( customSet.sleepTime = rawSleepTime; } if (rawSet) { - const eqIdx = rawSet.indexOf("="); - if (eqIdx !== -1) { - const k = rawSet.slice(0, eqIdx).trim(); - const v = rawSet.slice(eqIdx + 1).trim(); + if (rawSet.startsWith("{") && rawSet.endsWith("}")) { try { - customSet[k] = JSON.parse(v); + Object.assign(customSet, JSON.parse(rawSet)); } catch { - customSet[k] = v; + // fallback to key=value if json parse fails + } + } else { + const eqIdx = rawSet.indexOf("="); + if (eqIdx !== -1) { + const k = rawSet.slice(0, eqIdx).trim(); + const v = rawSet.slice(eqIdx + 1).trim(); + try { + customSet[k] = JSON.parse(v); + } catch { + customSet[k] = v; + } } } } diff --git a/src/domains/platform/workflow/models/nodes.ts b/src/domains/platform/workflow/models/nodes.ts index 3ca7169..5502ded 100644 --- a/src/domains/platform/workflow/models/nodes.ts +++ b/src/domains/platform/workflow/models/nodes.ts @@ -1,209 +1,5 @@ -import { z } from "zod"; - -// ── 工作流任务节点(递归、按类型区分)───────────────────────────────────────── - -export const BaseTaskSchema = z.object({ - name: z.string(), - type: z.string(), - label: z.string(), - desc: z.string().optional(), - groupName: z.string(), - orderIndex: z.number(), - levelIndex: z.array(z.number()), - status: z.string(), - displayName: z.string().optional(), -}); - -// 任务节点运行时类型(用于递归结构中的类型标注) -export interface WorkflowTask { - name: string; - type: string; - label?: string; - desc?: string; - groupName: string; - orderIndex: number; - levelIndex: number[]; - status: string; - displayName?: string; - tasks?: WorkflowTask[]; - [key: string]: any; -} - -// 条件/过滤的递归结构:condition / combineFilters -export const FilterConditionSchema = z.object({ - key: z.string(), - value: z.any().optional(), - compare: z.string(), -}); - -export const FilterGroupSchema: z.ZodType = z.lazy(() => - z.object({ - filters: z.array(z.union([FilterConditionSchema, FilterGroupSchema])), - condition: z.string(), - }) -); - -// 字段映射条目的两种形态:只读 key 或 key-value 映射(保留 value 及其余配置项) -export const FieldMappingSchema = z.object({ - key: z.string(), - value: z.any().optional(), -}).passthrough(); - -// 错误处理配置 -export const OnErrorSchema = z.object({ - defaultAction: z.string(), -}); - -// ── 控制节点 ───────────────────────────────────────────────────────────────── - -export const ConditionTaskSchema: z.ZodType = BaseTaskSchema.extend({ - type: z.literal("condition"), - tasksMaxLevel: z.number(), - combineFilters: FilterGroupSchema, - tasks: z.lazy(() => z.array(WorkflowTaskSchema)), -}); - -export const EveryTaskSchema: z.ZodType = BaseTaskSchema.extend({ - type: z.literal("every"), - batch: z.boolean(), - batchSize: z.number().optional(), - mode: z.string(), - list: z.string(), - filters: z.array(z.any()), - tasksMaxLevel: z.number(), - tasks: z.lazy(() => z.array(WorkflowTaskSchema)), -}); - -// ── 触发器节点 ───────────────────────────────────────────────────────────────── - -export const WebhookTaskSchema = BaseTaskSchema.extend({ - type: z.literal("webhook"), - sampleId: z.string(), - params: z.array(z.object({ key: z.string(), value: z.string() })), - urlPath: z.string(), -}); - -// ── 动作节点 ───────────────────────────────────────────────────────────────── - -export const StopTaskSchema = BaseTaskSchema.extend({ - type: z.literal("stop"), -}); - -export const HttpTaskSchema = BaseTaskSchema.extend({ - type: z.literal("http"), - method: z.string(), - url: z.string(), - bodyType: z.string().optional(), - bodyRaw: z.record(z.string(), z.any()).optional(), - header: z.array(z.any()), - params: z.array(z.object({ key: z.string(), value: z.string() })), - successCode: z.array(z.string()), - sampleData: z.record(z.string(), z.any()).optional(), -}); - -export const FlowDetailTaskSchema = BaseTaskSchema.extend({ - type: z.literal("flow-detail"), - specificationId: z.string(), - mapping: z.union([ - z.boolean(), - z.array(z.object({ key: z.string(), value: z.string() })), - ]), - flowCode: z.string(), -}); - -export const CodeTaskSchema = BaseTaskSchema.extend({ - type: z.literal("code"), - code: z.string(), -}); - -export const CodeJs2TaskSchema = BaseTaskSchema.extend({ - type: z.literal("code-js2"), - code: z.string(), - mapping: z.array(z.object({ key: z.string(), value: z.string() })).optional(), - onError: OnErrorSchema.optional(), -}); - -export const EkuaibaoDatalinkFilterTaskSchema = BaseTaskSchema.extend({ - type: z.literal("ekuaibao-datalink-filter"), - mode: z.string(), - entityId: z.string(), - fields: z.array(FieldMappingSchema), - filters: z.array(z.any()), - selectFields: z.array(z.any()), - combineFilters: FilterGroupSchema, - orderKey: z.string(), - orderMode: z.string(), - limitCount: z.string(), - onError: OnErrorSchema.optional(), -}); - -export const EkuaibaoDatalinkCreateTaskSchema = BaseTaskSchema.extend({ - type: z.literal("ekuaibao-datalink-create"), - mode: z.string(), - entityId: z.string(), - fields: z.array(FieldMappingSchema), - filters: z.array(z.any()), - combineFilters: FilterGroupSchema, -}); - -export const DataConvertTaskSchema = BaseTaskSchema.extend({ - type: z.literal("data-convert"), - mode: z.string(), - path: z.array(z.string()), - fields: z.array(z.object({ key: z.string(), value: z.string() })), - onError: OnErrorSchema.optional(), - subType: z.string(), - itemType: z.string(), - targetType: z.string(), - feeFormType: z.string(), -}); - -export const FlowCreateTaskSchema = BaseTaskSchema.extend({ - type: z.literal("flow-create-task"), - specificationId: z.string(), - formState: z.string(), - form: z.record(z.string(), z.string()), - details: z.record(z.string(), z.any()), - onError: OnErrorSchema.optional(), -}); - -export const DynamicDelayTaskSchema = BaseTaskSchema.extend({ - type: z.literal("task-dynamic-delay"), - sleepTime: z.union([z.number(), z.string()]).optional(), -}); - -// 兜底节点:遇到未收录类型时仍保留全部字段 -export const UnknownTaskSchema = z - .object({ - name: z.string().default("task"), - type: z.string(), - label: z.string().optional(), - desc: z.string().optional(), - groupName: z.string().default("trigger"), - orderIndex: z.number().default(0), - levelIndex: z.array(z.number()).default([0]), - status: z.string().default("active"), - displayName: z.string().optional(), - }) - .passthrough(); - -// 统一任务节点类型 -export const WorkflowTaskSchema: z.ZodType = z.union([ - WebhookTaskSchema, - ConditionTaskSchema, - EveryTaskSchema, - StopTaskSchema, - HttpTaskSchema, - FlowDetailTaskSchema, - CodeTaskSchema, - CodeJs2TaskSchema, - EkuaibaoDatalinkFilterTaskSchema, - EkuaibaoDatalinkCreateTaskSchema, - DataConvertTaskSchema, - FlowCreateTaskSchema, - DynamicDelayTaskSchema, - UnknownTaskSchema, -]); - - -export type FilterGroup = z.infer; +/** + * 工作流任务节点统一模型与子节点契约出口 + * 节点各类型 Schema 与字段已原子化拆分至 ./nodes/ 子目录 + */ +export * from "./nodes/index.js"; diff --git a/src/domains/platform/workflow/models/nodes/README.nodes.md b/src/domains/platform/workflow/models/nodes/README.nodes.md new file mode 100644 index 0000000..2e81193 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/README.nodes.md @@ -0,0 +1,20 @@ +# 工作流节点原子模型定义(models/nodes) + +本目录将工作流各类型节点的数据模型与 Schema 从原本庞大的单文件按类型原子化拆分,确保各节点具备清晰的强类型边界和独立演进能力。 + +## 文件分工 + +| 文件 | 节点类型 / 职责 | +|---|---| +| [common.ts](./common.ts) | 基础任务契约(`BaseTaskSchema`、`WorkflowTask`)、过滤与映射通用 Schema | +| [http.ts](./http.ts) | HTTP 请求动作节点(包含 `authId` / `appId` 授权凭证、URL、参数与报文) | +| [delay.ts](./delay.ts) | 动态延迟等待节点(`task-dynamic-delay` / `sleepTime`) | +| [code.ts](./code.ts) | 脚本代码节点(MVEL `code` / JavaScript `code-js2`) | +| [webhook.ts](./webhook.ts) | Webhook 外部触发器节点(`sampleId` / `urlPath`) | +| [stop.ts](./stop.ts) | 终止流程控制节点(`stop`) | +| [flow.ts](./flow.ts) | 单据操作节点(`flow-detail` 查询详情 / `flow-create-task` 创建单据) | +| [datalink.ts](./datalink.ts) | 数据连接台账与转换节点(`ekuaibao-datalink-filter`、`create` 与 `data-convert`) | +| [condition.ts](./condition.ts) | 条件分支控制节点工厂(`createConditionTaskSchema`) | +| [every.ts](./every.ts) | 依次执行循环控制节点工厂(`createEveryTaskSchema`) | +| [unknown.ts](./unknown.ts) | 兜底节点模型(未知节点类型全透传) | +| [index.ts](./index.ts) | 实例化递归容器节点、聚合统一 `WorkflowTaskSchema` 并集中导出 | diff --git a/src/domains/platform/workflow/models/nodes/code.ts b/src/domains/platform/workflow/models/nodes/code.ts new file mode 100644 index 0000000..f466f04 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/code.ts @@ -0,0 +1,19 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 脚本代码节点 (MVEL / JavaScript) ────────────────────────────────────────── + +export const CodeTaskSchema = BaseTaskSchema.extend({ + type: z.literal("code"), + code: z.string(), +}).passthrough(); + +export const CodeJs2TaskSchema = BaseTaskSchema.extend({ + type: z.literal("code-js2"), + code: z.string(), + mapping: z.array(z.object({ key: z.string(), value: z.string() })).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type CodeTask = z.infer; +export type CodeJs2Task = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/common.ts b/src/domains/platform/workflow/models/nodes/common.ts new file mode 100644 index 0000000..d0ea30b --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/common.ts @@ -0,0 +1,57 @@ +import { z } from "zod"; + +// ── 工作流任务节点基础 Schema ───────────────────────────────────────────────── + +export const BaseTaskSchema = z.object({ + name: z.string(), + type: z.string(), + label: z.string(), + desc: z.string().optional(), + groupName: z.string(), + orderIndex: z.number(), + levelIndex: z.array(z.number()), + status: z.string(), + displayName: z.string().optional(), +}).passthrough(); + +// 任务节点运行时类型(用于递归结构中的类型标注) +export interface WorkflowTask { + name: string; + type: string; + label?: string; + desc?: string; + groupName: string; + orderIndex: number; + levelIndex: number[]; + status: string; + displayName?: string; + tasks?: WorkflowTask[]; + [key: string]: any; +} + +// 条件/过滤的递归结构:condition / combineFilters +export const FilterConditionSchema = z.object({ + key: z.string(), + value: z.any().optional(), + compare: z.string(), +}); + +export const FilterGroupSchema: z.ZodType = z.lazy(() => + z.object({ + filters: z.array(z.union([FilterConditionSchema, FilterGroupSchema])), + condition: z.string(), + }) +); + +// 字段映射条目的两种形态:只读 key 或 key-value 映射(保留 value 及其余配置项) +export const FieldMappingSchema = z.object({ + key: z.string(), + value: z.any().optional(), +}).passthrough(); + +// 错误处理配置 +export const OnErrorSchema = z.object({ + defaultAction: z.string(), +}); + +export type FilterGroup = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/condition.ts b/src/domains/platform/workflow/models/nodes/condition.ts new file mode 100644 index 0000000..ad578f9 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/condition.ts @@ -0,0 +1,15 @@ +import { z } from "zod"; +import { BaseTaskSchema, FilterGroupSchema, type WorkflowTask } from "./common.js"; + +// ── 条件分支控制节点 ───────────────────────────────────────────────────────── + +export function createConditionTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("condition"), + tasksMaxLevel: z.number(), + combineFilters: FilterGroupSchema, + tasks: z.lazy(() => z.array(getTaskSchema())), + }).passthrough(); +} diff --git a/src/domains/platform/workflow/models/nodes/datalink.ts b/src/domains/platform/workflow/models/nodes/datalink.ts new file mode 100644 index 0000000..e493de5 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/datalink.ts @@ -0,0 +1,43 @@ +import { z } from "zod"; +import { BaseTaskSchema, FieldMappingSchema, FilterGroupSchema, OnErrorSchema } from "./common.js"; + +// ── 数据连接 / 台账与转换节点 ──────────────────────────────────────────────── + +export const EkuaibaoDatalinkFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-datalink-filter"), + mode: z.string(), + entityId: z.string(), + fields: z.array(FieldMappingSchema), + filters: z.array(z.any()), + selectFields: z.array(z.any()), + combineFilters: FilterGroupSchema, + orderKey: z.string(), + orderMode: z.string(), + limitCount: z.string(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoDatalinkCreateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-datalink-create"), + mode: z.string(), + entityId: z.string(), + fields: z.array(FieldMappingSchema), + filters: z.array(z.any()), + combineFilters: FilterGroupSchema, +}).passthrough(); + +export const DataConvertTaskSchema = BaseTaskSchema.extend({ + type: z.literal("data-convert"), + mode: z.string(), + path: z.array(z.string()), + fields: z.array(z.object({ key: z.string(), value: z.string() })), + onError: OnErrorSchema.optional(), + subType: z.string(), + itemType: z.string(), + targetType: z.string(), + feeFormType: z.string(), +}).passthrough(); + +export type EkuaibaoDatalinkFilterTask = z.infer; +export type EkuaibaoDatalinkCreateTask = z.infer; +export type DataConvertTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/delay.ts b/src/domains/platform/workflow/models/nodes/delay.ts new file mode 100644 index 0000000..bd0a1bc --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/delay.ts @@ -0,0 +1,11 @@ +import { z } from "zod"; +import { BaseTaskSchema } from "./common.js"; + +// ── 延迟等待节点 ───────────────────────────────────────────────────────────── + +export const DynamicDelayTaskSchema = BaseTaskSchema.extend({ + type: z.literal("task-dynamic-delay"), + sleepTime: z.union([z.number(), z.string()]).optional(), +}).passthrough(); + +export type DynamicDelayTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/every.ts b/src/domains/platform/workflow/models/nodes/every.ts new file mode 100644 index 0000000..3d21501 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/every.ts @@ -0,0 +1,19 @@ +import { z } from "zod"; +import { BaseTaskSchema, type WorkflowTask } from "./common.js"; + +// ── 依次执行循环控制节点 ───────────────────────────────────────────────────── + +export function createEveryTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("every"), + batch: z.boolean(), + batchSize: z.number().optional(), + mode: z.string(), + list: z.string(), + filters: z.array(z.any()), + tasksMaxLevel: z.number(), + tasks: z.lazy(() => z.array(getTaskSchema())), + }).passthrough(); +} diff --git a/src/domains/platform/workflow/models/nodes/flow.ts b/src/domains/platform/workflow/models/nodes/flow.ts new file mode 100644 index 0000000..44ce435 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/flow.ts @@ -0,0 +1,26 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 单据相关节点 (详情查询 / 创建单据) ───────────────────────────────────────── + +export const FlowDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-detail"), + specificationId: z.string(), + mapping: z.union([ + z.boolean(), + z.array(z.object({ key: z.string(), value: z.string() })), + ]), + flowCode: z.string(), +}).passthrough(); + +export const FlowCreateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-create-task"), + specificationId: z.string(), + formState: z.string(), + form: z.record(z.string(), z.string()), + details: z.record(z.string(), z.any()), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type FlowDetailTask = z.infer; +export type FlowCreateTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/http.ts b/src/domains/platform/workflow/models/nodes/http.ts new file mode 100644 index 0000000..8bf45f2 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/http.ts @@ -0,0 +1,20 @@ +import { z } from "zod"; +import { BaseTaskSchema } from "./common.js"; + +// ── HTTP 请求动作节点 ───────────────────────────────────────────────────────── + +export const HttpTaskSchema = BaseTaskSchema.extend({ + type: z.literal("http"), + method: z.string(), + url: z.string(), + bodyType: z.string().optional(), + bodyRaw: z.record(z.string(), z.any()).optional(), + header: z.array(z.any()), + params: z.array(z.object({ key: z.string(), value: z.string() })), + successCode: z.array(z.string()), + sampleData: z.record(z.string(), z.any()).optional(), + authId: z.union([z.number(), z.string()]).optional(), + appId: z.union([z.number(), z.string()]).optional(), +}).passthrough(); + +export type HttpTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/index.ts b/src/domains/platform/workflow/models/nodes/index.ts new file mode 100644 index 0000000..d9c71c3 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/index.ts @@ -0,0 +1,51 @@ +import { z } from "zod"; +import type { WorkflowTask } from "./common.js"; +import { createConditionTaskSchema } from "./condition.js"; +import { createEveryTaskSchema } from "./every.js"; +import { WebhookTaskSchema } from "./webhook.js"; +import { StopTaskSchema } from "./stop.js"; +import { HttpTaskSchema } from "./http.js"; +import { FlowDetailTaskSchema, FlowCreateTaskSchema } from "./flow.js"; +import { CodeTaskSchema, CodeJs2TaskSchema } from "./code.js"; +import { + EkuaibaoDatalinkFilterTaskSchema, + EkuaibaoDatalinkCreateTaskSchema, + DataConvertTaskSchema, +} from "./datalink.js"; +import { DynamicDelayTaskSchema } from "./delay.js"; +import { UnknownTaskSchema } from "./unknown.js"; + +// 导出所有基础与通用类型 +export * from "./common.js"; +export * from "./http.js"; +export * from "./delay.js"; +export * from "./code.js"; +export * from "./webhook.js"; +export * from "./stop.js"; +export * from "./flow.js"; +export * from "./datalink.js"; +export * from "./condition.js"; +export * from "./every.js"; +export * from "./unknown.js"; + +// 递归容器节点 Schema 实例化 +export const ConditionTaskSchema: z.ZodType = createConditionTaskSchema(() => WorkflowTaskSchema); +export const EveryTaskSchema: z.ZodType = createEveryTaskSchema(() => WorkflowTaskSchema); + +// 统一任务节点联合 Schema +export const WorkflowTaskSchema: z.ZodType = z.union([ + WebhookTaskSchema, + ConditionTaskSchema, + EveryTaskSchema, + StopTaskSchema, + HttpTaskSchema, + FlowDetailTaskSchema, + CodeTaskSchema, + CodeJs2TaskSchema, + EkuaibaoDatalinkFilterTaskSchema, + EkuaibaoDatalinkCreateTaskSchema, + DataConvertTaskSchema, + FlowCreateTaskSchema, + DynamicDelayTaskSchema, + UnknownTaskSchema, +]); diff --git a/src/domains/platform/workflow/models/nodes/stop.ts b/src/domains/platform/workflow/models/nodes/stop.ts new file mode 100644 index 0000000..1d2ee75 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/stop.ts @@ -0,0 +1,10 @@ +import { z } from "zod"; +import { BaseTaskSchema } from "./common.js"; + +// ── 终止流程节点 ───────────────────────────────────────────────────────────── + +export const StopTaskSchema = BaseTaskSchema.extend({ + type: z.literal("stop"), +}).passthrough(); + +export type StopTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/unknown.ts b/src/domains/platform/workflow/models/nodes/unknown.ts new file mode 100644 index 0000000..b9b47f9 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/unknown.ts @@ -0,0 +1,19 @@ +import { z } from "zod"; + +// ── 兜底节点:遇到未收录类型时仍保留全部字段 ───────────────────────────────────── + +export const UnknownTaskSchema = z + .object({ + name: z.string().default("task"), + type: z.string(), + label: z.string().optional(), + desc: z.string().optional(), + groupName: z.string().default("trigger"), + orderIndex: z.number().default(0), + levelIndex: z.array(z.number()).default([0]), + status: z.string().default("active"), + displayName: z.string().optional(), + }) + .passthrough(); + +export type UnknownTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/webhook.ts b/src/domains/platform/workflow/models/nodes/webhook.ts new file mode 100644 index 0000000..171da89 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/webhook.ts @@ -0,0 +1,13 @@ +import { z } from "zod"; +import { BaseTaskSchema } from "./common.js"; + +// ── Webhook 触发器节点 ──────────────────────────────────────────────────────── + +export const WebhookTaskSchema = BaseTaskSchema.extend({ + type: z.literal("webhook"), + sampleId: z.string(), + params: z.array(z.object({ key: z.string(), value: z.string() })), + urlPath: z.string(), +}).passthrough(); + +export type WebhookTask = z.infer; From 6a06c535665d16e5c0213e99294efe5de884200d Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 23:06:51 +0800 Subject: [PATCH 06/12] =?UTF-8?q?feat(workflow):=20=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E5=8C=96=20HTTP=20=E8=8A=82=E7=82=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=8E=E8=BF=9E=E6=8E=A5=E5=99=A8=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 models/nodes/http.ts 中收敛请求方法为 HttpMethodSchema 严格枚举(GET/POST/PUT/PATCH/DELETE) - 补齐 HttpBodyTypeSchema(none/raw/from-data/form-urlencoded)与 HttpContentTypeSchema 枚举 - 更新 specs/workflow-schema.json 保证单测校验与 Schema 一致 - 扩充 models/nodes/README.nodes.md 详细记录 HTTP 节点的请求方式、连接器筛选与授权联动契约 - 纳管 .workbuddy 本地记忆文档(2026-11-02.md 与 MEMORY.md) --- .workbuddy/memory/2026-11-02.md | 64 ++++++ .workbuddy/memory/MEMORY.md | 18 ++ specs/workflow-schema.json | 195 ++++++++++++++++-- .../workflow/models/nodes/README.nodes.md | 32 +++ .../platform/workflow/models/nodes/http.ts | 24 ++- 5 files changed, 309 insertions(+), 24 deletions(-) create mode 100644 .workbuddy/memory/2026-11-02.md diff --git a/.workbuddy/memory/2026-11-02.md b/.workbuddy/memory/2026-11-02.md new file mode 100644 index 0000000..3864ca6 --- /dev/null +++ b/.workbuddy/memory/2026-11-02.md @@ -0,0 +1,64 @@ +# 2026-11-02 工作记录 + +## 1. 任务背景与目标 +- **目标企业**: CSM (`Cxa3oOtQi2eS$g`) +- **操作员工身份约束**: 严格绑定「**李志财**」(`2HQbkGx2DgnM00`),严禁使用其他账号(如缪梦婷)。 +- **目标工作流**: `881196955148578838`(商机台账单据事件流) +- **核心问题定位**: + - `action_agree_normal` 在未超标单据执行时报错:`HTTP 400 缺少accessToken参数`。 + - 根因:HTTP 节点原本漏填了 `appId`(连接器)与 `authId`(授权),合思开放平台需要由 Piper 自动根据连接器授权换取 accessToken 并注入 URL。 + - 本地模型与校验问题:原本 `BaseTaskSchema` 和 `HttpTaskSchema` 缺少 `.passthrough()` 与 `appId`/`authId` 显式字段定义,导致 `hose-use workflow node edit` 序列化时自动吞掉这些关键属性。 + +## 2. 节点原子化重构成果 +- 创建 `src/domains/platform/workflow/models/nodes/` 子目录,将原庞大的单文件节点拆为 13 个独立模块: + - `common.ts`: `BaseTaskSchema.passthrough()`, `WorkflowTask` + - `http.ts`: `HttpTaskSchema`(支持 `authId`, `appId`, `HttpMethodSchema`, `HttpBodyTypeSchema`, `HttpContentTypeSchema`) + - `delay.ts`, `code.ts`, `webhook.ts`, `stop.ts`, `flow.ts`, `datalink.ts`, `condition.ts`, `every.ts`, `unknown.ts`, `index.ts` + - `README.nodes.md`: 完整架构与节点规范文档 +- 同步生成 `specs/workflow-schema.json`。 + +## 3. Piper 连接器、授权与 HTTP 请求方法深度调研结论 +通过 Kimi WebBridge 挂载 CDP 探针并逆向 Piper 生产前端 bundle 与 Sourcemap,明确了以下底层契约: + +### 3.1 连接器 (`appId`) +- **查询接口**: `POST /api/easo/dsl/task-openapi/select/appId`,Body: `{ $platformId: platformId }` +- **平台预置全量清单(共 7 个)**: + 1. `4`: `费控原生`(`ekuaibao_app`,通过 openapi key/secret 自动向 `https://app.ekuaibao.com/api/openapi/v1/auth/getAccessToken` 换票并自动注入 `?accessToken=...`) + 2. `5`: `费控钉钉` + 3. `9`: `纷享销客` + 4. `11`: `ai应用` + 5. `14`: `招商银行商务卡查询` + 6. `15`: `费控企微` + 7. `16`: `开放平台` + +### 3.2 授权 (`authId`) +- **查询接口**: `POST /api/easo/corpApp/getAuthList`,Body: `{ appId: "", size: 100 }`,Header: `Authorization: Bearer ` +- **配置详情/元数据接口**: `GET /api/easo/app/getInfo?id=`(含 `authConfig.dslConfig` 表单结构与 `tokenSendParam`) +- **保存新授权接口**: `POST /api/easo/corpApp/saveAuthInfo` +- **CSM 企业实测现状**: + - `appId: 4`(费控原生):拥有 1 个可用授权实例:`id: 157`,名称 `费控原生#202512150`。 + - 其他连接器(5、9、11、14、15、16):在当前 CSM 企业下 `totalItems: 0`,未配置授权实例。 + +### 3.3 HTTP 节点请求方法 (`method`) +- **严格枚举(5 种)**: + - `GET` + - `POST` + - `PUT` + - `PATCH` + - `DELETE` +- **联动行为(Reactions)**: + - 选定 `POST`、`PUT`、`PATCH` 时,表单显示 `bodyType` 及其输入区; + - 选定 `GET`、`DELETE` 时,表单隐藏请求体区域(`x-display: none`)。 + +### 3.4 配套请求体类型 (`bodyType`) 与 Content-Type +- **`bodyType` 枚举**: + - `none`: 无请求体 + - `raw`: 原生字符串/JSON(默认,支持 `@{choose(...)}` 变量插值) + - `from-data`: multipart/form-data 键值对(前端枚举值为 `from-data`) + - `form-urlencoded`: x-www-form-urlencoded 键值对 +- **`contentType`(raw 模式下)**: + - `application/json`(默认) + - `text/plain` + - `application/javascript` + - `text/html` + - `application/xml` diff --git a/.workbuddy/memory/MEMORY.md b/.workbuddy/memory/MEMORY.md index c5d13f8..0921175 100644 --- a/.workbuddy/memory/MEMORY.md +++ b/.workbuddy/memory/MEMORY.md @@ -15,3 +15,21 @@ ## 已知基础设施 - New API 端点已从 Sealos 的 `sealosgzg.site` 迁移至 `api.ying-qing.cn`;代码里残留的 `*.sealosgzg.site` 硬编码属于待清理项(workflow 灰度开通网关)。 + +## 工作流与 Piper 核心契约(2026-11-02 固化) + +- **工作流节点原子模型**: 位于 `src/domains/platform/workflow/models/nodes/`,包含 13 个独立模块与 `README.nodes.md`。 +- **连接器 (`appId`)**: + - 查询接口: `POST /api/easo/dsl/task-openapi/select/appId`,Body: `{ $platformId: platformId }` + - 完整 7 种枚举: `4` (费控原生), `5` (费控钉钉), `9` (纷享销客), `11` (ai应用), `14` (招商银行商务卡查询), `15` (费控企微), `16` (开放平台)。 +- **授权 (`authId`)**: + - 查询接口: `POST /api/easo/corpApp/getAuthList`,Body: `{ appId, size: 100 }`,Header: `Authorization: Bearer `。 + - 元数据接口: `GET /api/easo/app/getInfo?id=`(含 `tokenSendParam`,`appId: 4` 时自动注入 `?accessToken=...`)。 +- **HTTP 节点请求方法 (`method`)**: + - 严格 5 种枚举: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`。 + - `POST`, `PUT`, `PATCH` 时显示请求体;`GET`, `DELETE` 时收起隐藏。 +- **请求体类型 (`bodyType`)**: + - 4 种枚举: `none`, `raw` (默认), `from-data`, `form-urlencoded`。 +- **Content-Type**: + - 5 种枚举: `application/json` (默认), `text/plain`, `application/javascript`, `text/html`, `application/xml`。 + diff --git a/specs/workflow-schema.json b/specs/workflow-schema.json index c350ace..6ef3c7d 100644 --- a/specs/workflow-schema.json +++ b/specs/workflow-schema.json @@ -488,20 +488,71 @@ "type": "string" }, "method": { - "type": "string" + "anyOf": [ + { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + { + "type": "string" + } + ] }, "url": { "type": "string" }, "bodyType": { - "type": "string" + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "raw", + "from-data", + "form-urlencoded" + ] + }, + { + "type": "string" + } + ] }, "bodyRaw": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + }, + "contentType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "application/json", + "text/plain", + "application/javascript", + "text/html", + "application/xml" + ] + }, + { + "type": "string" + } + ] }, "header": { "type": "array", @@ -1613,20 +1664,71 @@ "type": "string" }, "method": { - "type": "string" + "anyOf": [ + { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + { + "type": "string" + } + ] }, "url": { "type": "string" }, "bodyType": { - "type": "string" + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "raw", + "from-data", + "form-urlencoded" + ] + }, + { + "type": "string" + } + ] }, "bodyRaw": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + }, + "contentType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "application/json", + "text/plain", + "application/javascript", + "text/html", + "application/xml" + ] + }, + { + "type": "string" + } + ] }, "header": { "type": "array", @@ -2813,20 +2915,71 @@ "type": "string" }, "method": { - "type": "string" + "anyOf": [ + { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + { + "type": "string" + } + ] }, "url": { "type": "string" }, "bodyType": { - "type": "string" + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "raw", + "from-data", + "form-urlencoded" + ] + }, + { + "type": "string" + } + ] }, "bodyRaw": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + }, + "contentType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "application/json", + "text/plain", + "application/javascript", + "text/html", + "application/xml" + ] + }, + { + "type": "string" + } + ] }, "header": { "type": "array", diff --git a/src/domains/platform/workflow/models/nodes/README.nodes.md b/src/domains/platform/workflow/models/nodes/README.nodes.md index 2e81193..9489b33 100644 --- a/src/domains/platform/workflow/models/nodes/README.nodes.md +++ b/src/domains/platform/workflow/models/nodes/README.nodes.md @@ -18,3 +18,35 @@ | [every.ts](./every.ts) | 依次执行循环控制节点工厂(`createEveryTaskSchema`) | | [unknown.ts](./unknown.ts) | 兜底节点模型(未知节点类型全透传) | | [index.ts](./index.ts) | 实例化递归容器节点、聚合统一 `WorkflowTaskSchema` 并集中导出 | + +## 核心节点规范详情 + +### HTTP 请求节点 (`http.ts`) + +HTTP 动作节点用于调用外部 API 或合思原生 OpenAPI。主要字段如下: + +1. **请求方法 (`method`)**: + - 严格枚举:`GET`、`POST`、`PUT`、`PATCH`、`DELETE` + - 当为 `POST`、`PUT`、`PATCH` 时显示并支持请求体;为 `GET`、`DELETE` 时不传递请求体。 + +2. **连接器与授权联动 (`appId` 与 `authId`)**: + - **连接器 (`appId`)**:决定 API 调用的预置鉴权通道与目标服务类型。 + - 获取接口:`POST /api/easo/dsl/task-openapi/select/appId` + - 常见预置连接器代码: + - `4`: **费控原生**(`ekuaibao_app`,合思开放平台鉴权,Piper 自动换取并注入 `?accessToken=...`) + - `5`: **费控钉钉** + - `9`: **纷享销客** + - `11`: **ai应用** + - `14`: **招商银行商务卡查询** + - `15`: **费控企微** + - `16`: **开放平台** + - **授权实例 (`authId`)**:连接器具体的授权账户或凭据实例。 + - 获取接口:`POST /api/easo/corpApp/getAuthList`,参数 `{ appId, size: 100 }` + - 需携带 Piper `Authorization: Bearer `。 + - 必须与选定的 `appId` 配对。如未配置或传错,调用合思开放平台接口时将因缺少凭证报错 `400 缺少accessToken参数`。 + +3. **请求体与格式 (`bodyType` / `bodyRaw` / `contentType`)**: + - `bodyType` 枚举:`none`、`raw`、`from-data`、`form-urlencoded`(默认 `raw`) + - `contentType` 枚举(当 `raw` 时):`application/json`(默认)、`text/plain`、`application/javascript`、`text/html`、`application/xml` + - `bodyRaw`:支持直接入参对象或字符串,兼容合思变量插值模板(`@{choose(...)}`)。 + diff --git a/src/domains/platform/workflow/models/nodes/http.ts b/src/domains/platform/workflow/models/nodes/http.ts index 8bf45f2..7bacab3 100644 --- a/src/domains/platform/workflow/models/nodes/http.ts +++ b/src/domains/platform/workflow/models/nodes/http.ts @@ -1,14 +1,32 @@ import { z } from "zod"; import { BaseTaskSchema } from "./common.js"; +// ── HTTP 请求方法与请求体枚举 ────────────────────────────────────────────────── + +export const HttpMethodSchema = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]); +export type HttpMethod = z.infer; + +export const HttpBodyTypeSchema = z.enum(["none", "raw", "from-data", "form-urlencoded"]); +export type HttpBodyType = z.infer; + +export const HttpContentTypeSchema = z.enum([ + "application/json", + "text/plain", + "application/javascript", + "text/html", + "application/xml", +]); +export type HttpContentType = z.infer; + // ── HTTP 请求动作节点 ───────────────────────────────────────────────────────── export const HttpTaskSchema = BaseTaskSchema.extend({ type: z.literal("http"), - method: z.string(), + method: z.union([HttpMethodSchema, z.string()]), url: z.string(), - bodyType: z.string().optional(), - bodyRaw: z.record(z.string(), z.any()).optional(), + bodyType: z.union([HttpBodyTypeSchema, z.string()]).optional(), + bodyRaw: z.union([z.string(), z.record(z.string(), z.any())]).optional(), + contentType: z.union([HttpContentTypeSchema, z.string()]).optional(), header: z.array(z.any()), params: z.array(z.object({ key: z.string(), value: z.string() })), successCode: z.array(z.string()), From 74234f3ed1d643a6d9fdf2d4acd5d4a862189578 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 23:51:31 +0800 Subject: [PATCH 07/12] =?UTF-8?q?feat(workflow):=20=E8=A1=A5=E9=BD=90?= =?UTF-8?q?=E5=8F=AF=E7=94=A8=E8=8A=82=E7=82=B9=E5=8E=9F=E5=AD=90=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E4=B9=89=E4=B8=8E=E9=9D=99=E6=80=81=E9=97=A8?= =?UTF-8?q?=E7=A6=81=E5=B7=B2=E7=9F=A5=E7=B1=BB=E5=9E=8B=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 节点原子模型与 Schema 补齐: - 在 src/domains/platform/workflow/models/nodes/ 下新增 ai.ts, control.ts, message.ts, org.ts, utility.ts; - 补齐 flow-update-task、recalculate-the-approval-flow、flow-list、message-dingtalk、excel、ai-classification 等 30+ 节点强类型 Schema; - 统一导出并重现生成 specs/workflow-schema.json。 2. 静态分析门禁已知节点对齐: - 引入 isKnownGrayNodeType 使得静态分析器全面识别 108 官方灰度节点清单; - 消除 recalculate-the-approval-flow、flow-update-task 等官方已知节点的误报 UNKNOWN_TASK_TYPE 警告。 3. 文档与规范同步: - 更新 src/domains/platform/workflow/models/nodes/README.nodes.md 文件职责表; - 通过 check-readme、全量 966 单测及 tsc 零报错校验。 --- specs/workflow-schema.json | 9357 ++++++++++++++++- .../platform/workflow/analysis/analyzer.ts | 3 +- .../workflow/models/nodes/README.nodes.md | 7 +- .../platform/workflow/models/nodes/ai.ts | 68 + .../platform/workflow/models/nodes/control.ts | 61 + .../platform/workflow/models/nodes/flow.ts | 32 +- .../platform/workflow/models/nodes/index.ts | 125 +- .../platform/workflow/models/nodes/message.ts | 75 + .../platform/workflow/models/nodes/org.ts | 82 + .../platform/workflow/models/nodes/utility.ts | 80 + 10 files changed, 9629 insertions(+), 261 deletions(-) create mode 100644 src/domains/platform/workflow/models/nodes/ai.ts create mode 100644 src/domains/platform/workflow/models/nodes/control.ts create mode 100644 src/domains/platform/workflow/models/nodes/message.ts create mode 100644 src/domains/platform/workflow/models/nodes/org.ts create mode 100644 src/domains/platform/workflow/models/nodes/utility.ts diff --git a/specs/workflow-schema.json b/specs/workflow-schema.json index 6ef3c7d..ae72080 100644 --- a/specs/workflow-schema.json +++ b/specs/workflow-schema.json @@ -407,6 +407,292 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "if" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "combineFilters": {}, + "conditions": {}, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "loop" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "list": {}, + "batchSize": { + "type": "number" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "while" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "conditions": {}, + "maxLoop": { + "type": "number" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "amortization" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "apportion" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -708,6 +994,282 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-create-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "formState": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "details": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-update-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "formState": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "details": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "recalculate-the-approval-flow" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -1133,90 +1695,6 @@ ], "additionalProperties": {} }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string", - "const": "flow-create-task" - }, - "label": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "groupName": { - "type": "string" - }, - "orderIndex": { - "type": "number" - }, - "levelIndex": { - "type": "array", - "items": { - "type": "number" - } - }, - "status": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "specificationId": { - "type": "string" - }, - "formState": { - "type": "string" - }, - "form": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - }, - "details": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "onError": { - "type": "object", - "properties": { - "defaultAction": { - "type": "string" - } - }, - "required": [ - "defaultAction" - ], - "additionalProperties": false - } - }, - "required": [ - "name", - "type", - "label", - "groupName", - "orderIndex", - "levelIndex", - "status", - "specificationId", - "formState", - "form", - "details" - ], - "additionalProperties": {} - }, { "type": "object", "properties": { @@ -1273,6 +1751,2479 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-dingtalk" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "title": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-feishu" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "feishu-sendMsg" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "email" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-internet" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-outnet" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "oa" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-classification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-extraction" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-attachment" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "model": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-minimax-text" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-minimax-photo" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai-pdf" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "attachmentUrl": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai-url" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "url": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dify" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "inputs": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-staff-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "filters": { + "type": "array", + "items": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-staff-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "staffId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "staff-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "department-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "department-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "filters": { + "type": "array", + "items": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-department-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "departmentId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-department-update" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "departmentId": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "feishu-department-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "wecom-department" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "search-staff-by-role" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "roleId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "role-update" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "excel" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "aggregation" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "list": {}, + "groupBy": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-format" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-log" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "message": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-dynamic-test" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-openapi" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "context" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dmn" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mapping" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ui-dialog" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ui-notification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "output" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -1583,6 +4534,292 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "if" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "combineFilters": {}, + "conditions": {}, + "tasks": { + "type": "array", + "items": { + "$ref": "#" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "loop" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "list": {}, + "batchSize": { + "type": "number" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "while" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "conditions": {}, + "maxLoop": { + "type": "number" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "amortization" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "apportion" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -1884,6 +5121,282 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-create-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "formState": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "details": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-update-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "formState": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "details": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "recalculate-the-approval-flow" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -2309,90 +5822,6 @@ ], "additionalProperties": {} }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string", - "const": "flow-create-task" - }, - "label": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "groupName": { - "type": "string" - }, - "orderIndex": { - "type": "number" - }, - "levelIndex": { - "type": "array", - "items": { - "type": "number" - } - }, - "status": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "specificationId": { - "type": "string" - }, - "formState": { - "type": "string" - }, - "form": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - }, - "details": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "onError": { - "type": "object", - "properties": { - "defaultAction": { - "type": "string" - } - }, - "required": [ - "defaultAction" - ], - "additionalProperties": false - } - }, - "required": [ - "name", - "type", - "label", - "groupName", - "orderIndex", - "levelIndex", - "status", - "specificationId", - "formState", - "form", - "details" - ], - "additionalProperties": {} - }, { "type": "object", "properties": { @@ -2449,6 +5878,2479 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-dingtalk" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "title": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-feishu" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "feishu-sendMsg" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "email" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-internet" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-outnet" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "oa" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-classification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-extraction" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-attachment" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "model": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-minimax-text" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-minimax-photo" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai-pdf" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "attachmentUrl": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai-url" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "url": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dify" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "inputs": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-staff-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "filters": { + "type": "array", + "items": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-staff-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "staffId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "staff-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "department-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "department-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "filters": { + "type": "array", + "items": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-department-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "departmentId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-department-update" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "departmentId": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "feishu-department-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "wecom-department" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "search-staff-by-role" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "roleId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "role-update" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "excel" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "aggregation" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "list": {}, + "groupBy": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-format" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-log" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "message": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-dynamic-test" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-openapi" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "context" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dmn" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mapping" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ui-dialog" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ui-notification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "output" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -2834,6 +8736,292 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "if" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "combineFilters": {}, + "conditions": {}, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "loop" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "list": {}, + "batchSize": { + "type": "number" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "while" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "conditions": {}, + "maxLoop": { + "type": "number" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "amortization" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "apportion" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "tasksMaxLevel": { + "type": "number" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/$defs/__schema0" + } + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -3135,6 +9323,282 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-create-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "formState": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "details": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-update-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "formState": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "details": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "recalculate-the-approval-flow" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -3560,90 +10024,6 @@ ], "additionalProperties": {} }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string", - "const": "flow-create-task" - }, - "label": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "groupName": { - "type": "string" - }, - "orderIndex": { - "type": "number" - }, - "levelIndex": { - "type": "array", - "items": { - "type": "number" - } - }, - "status": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "specificationId": { - "type": "string" - }, - "formState": { - "type": "string" - }, - "form": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - }, - "details": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "onError": { - "type": "object", - "properties": { - "defaultAction": { - "type": "string" - } - }, - "required": [ - "defaultAction" - ], - "additionalProperties": false - } - }, - "required": [ - "name", - "type", - "label", - "groupName", - "orderIndex", - "levelIndex", - "status", - "specificationId", - "formState", - "form", - "details" - ], - "additionalProperties": {} - }, { "type": "object", "properties": { @@ -3700,6 +10080,2479 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-dingtalk" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "title": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-feishu" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "feishu-sendMsg" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receiverType": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "email" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-internet" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "message-outnet" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "oa" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": {} + }, + "content": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-classification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-extraction" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ai-attachment" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "model": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-minimax-text" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-minimax-photo" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai-pdf" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "attachmentUrl": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekb-ai-url" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "url": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dify" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "inputs": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-staff-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "filters": { + "type": "array", + "items": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-staff-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "staffId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "staff-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "department-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "department-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "filters": { + "type": "array", + "items": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-department-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "departmentId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-department-update" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "departmentId": { + "type": "string" + }, + "form": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "feishu-department-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "wecom-department" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "search-staff-by-role" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "roleId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "role-update" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "excel" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "aggregation" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "list": {}, + "groupBy": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-format" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-log" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "message": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-dynamic-test" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-openapi" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "context" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dmn" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mapping" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ui-dialog" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ui-notification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "output" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { diff --git a/src/domains/platform/workflow/analysis/analyzer.ts b/src/domains/platform/workflow/analysis/analyzer.ts index e891325..d5868ce 100644 --- a/src/domains/platform/workflow/analysis/analyzer.ts +++ b/src/domains/platform/workflow/analysis/analyzer.ts @@ -10,6 +10,7 @@ import type { WorkflowFormSpecComponentLike, AnalyzeWorkflowOptions, } from "./types.js"; +import { isKnownGrayNodeType } from "../nodes/gray-nodes-catalog.js"; const KNOWN_TYPES = new Set([ "webhook", @@ -442,7 +443,7 @@ export function analyzeWorkflow( message: `${task.type} 控制节点没有子节点`, }); } - if (!KNOWN_TYPES.has(task.type)) { + if (!KNOWN_TYPES.has(task.type) && !isKnownGrayNodeType(task.type)) { addDiagnostic(diagnostics, { severity: "warning", code: "UNKNOWN_TASK_TYPE", diff --git a/src/domains/platform/workflow/models/nodes/README.nodes.md b/src/domains/platform/workflow/models/nodes/README.nodes.md index 9489b33..edea255 100644 --- a/src/domains/platform/workflow/models/nodes/README.nodes.md +++ b/src/domains/platform/workflow/models/nodes/README.nodes.md @@ -12,10 +12,15 @@ | [code.ts](./code.ts) | 脚本代码节点(MVEL `code` / JavaScript `code-js2`) | | [webhook.ts](./webhook.ts) | Webhook 外部触发器节点(`sampleId` / `urlPath`) | | [stop.ts](./stop.ts) | 终止流程控制节点(`stop`) | -| [flow.ts](./flow.ts) | 单据操作节点(`flow-detail` 查询详情 / `flow-create-task` 创建单据) | +| [flow.ts](./flow.ts) | 单据操作节点(`flow-detail` 查询详情 / `flow-create-task` 创建单据 / `flow-update-task` / `recalculate-the-approval-flow`) | | [datalink.ts](./datalink.ts) | 数据连接台账与转换节点(`ekuaibao-datalink-filter`、`create` 与 `data-convert`) | | [condition.ts](./condition.ts) | 条件分支控制节点工厂(`createConditionTaskSchema`) | | [every.ts](./every.ts) | 依次执行循环控制节点工厂(`createEveryTaskSchema`) | +| [control.ts](./control.ts) | 流程控制节点工厂(`if`、`loop`、`while`、`amortization`、`apportion`) | +| [message.ts](./message.ts) | 消息与通知节点(`message-dingtalk`、`message-feishu`、`email`、`message`、`message-internet`、`message-outnet`、`oa`) | +| [ai.ts](./ai.ts) | AI 智能匹配、提取与大模型节点(`ai-classification`、`ai-extraction`、`ai-attachment`、`ekb-ai`、`dify` 等) | +| [org.ts](./org.ts) | 组织架构人员与部门节点(`ekuaibao-staff-filter`、`ekuaibao-staff-detail`、`staff-create`、`department-create` 等) | +| [utility.ts](./utility.ts) | 基础通用工具节点(`excel` 导出表格、`aggregation` 分类汇总、`flow-format`、`task-log` 流程日志、`dmn` 等) | | [unknown.ts](./unknown.ts) | 兜底节点模型(未知节点类型全透传) | | [index.ts](./index.ts) | 实例化递归容器节点、聚合统一 `WorkflowTaskSchema` 并集中导出 | diff --git a/src/domains/platform/workflow/models/nodes/ai.ts b/src/domains/platform/workflow/models/nodes/ai.ts new file mode 100644 index 0000000..e8d4504 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/ai.ts @@ -0,0 +1,68 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── AI 相关节点 (分类、提取、理解与大模型对接) ────────────────────────────────── + +export const AiClassificationTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ai-classification"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const AiExtractionTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ai-extraction"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const AiAttachmentTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ai-attachment"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkbAiTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekb-ai"), + model: z.string().optional(), + prompt: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkbMinimaxTextTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekb-minimax-text"), + prompt: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkbMinimaxPhotoTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekb-minimax-photo"), + imageUrl: z.string().optional(), + prompt: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkbAiPdfTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekb-ai-pdf"), + attachmentUrl: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkbAiUrlTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekb-ai-url"), + url: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const DifyTaskSchema = BaseTaskSchema.extend({ + type: z.literal("dify"), + apiKey: z.string().optional(), + inputs: z.record(z.string(), z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type AiClassificationTask = z.infer; +export type AiExtractionTask = z.infer; +export type AiAttachmentTask = z.infer; +export type EkbAiTask = z.infer; +export type EkbMinimaxTextTask = z.infer; +export type EkbMinimaxPhotoTask = z.infer; +export type EkbAiPdfTask = z.infer; +export type EkbAiUrlTask = z.infer; +export type DifyTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/control.ts b/src/domains/platform/workflow/models/nodes/control.ts new file mode 100644 index 0000000..b0522d2 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/control.ts @@ -0,0 +1,61 @@ +import { z } from "zod"; +import { BaseTaskSchema, type WorkflowTask } from "./common.js"; + +// ── 流程控制节点 (if, loop, while, amortization, apportion) ─────────────────── + +export function createIfTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("if"), + tasksMaxLevel: z.number().optional(), + combineFilters: z.any().optional(), + conditions: z.any().optional(), + tasks: z.lazy(() => z.array(getTaskSchema())).optional(), + }).passthrough(); +} + +export function createLoopTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("loop"), + list: z.any().optional(), + batchSize: z.number().optional(), + tasksMaxLevel: z.number().optional(), + tasks: z.lazy(() => z.array(getTaskSchema())).optional(), + }).passthrough(); +} + +export function createWhileTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("while"), + combineFilters: z.any().optional(), + conditions: z.any().optional(), + maxLoop: z.number().optional(), + tasksMaxLevel: z.number().optional(), + tasks: z.lazy(() => z.array(getTaskSchema())).optional(), + }).passthrough(); +} + +export function createAmortizationTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("amortization"), + tasksMaxLevel: z.number().optional(), + tasks: z.lazy(() => z.array(getTaskSchema())).optional(), + }).passthrough(); +} + +export function createApportionTaskSchema( + getTaskSchema: () => z.ZodType +): z.ZodType { + return BaseTaskSchema.extend({ + type: z.literal("apportion"), + tasksMaxLevel: z.number().optional(), + tasks: z.lazy(() => z.array(getTaskSchema())).optional(), + }).passthrough(); +} diff --git a/src/domains/platform/workflow/models/nodes/flow.ts b/src/domains/platform/workflow/models/nodes/flow.ts index 44ce435..a6464b8 100644 --- a/src/domains/platform/workflow/models/nodes/flow.ts +++ b/src/domains/platform/workflow/models/nodes/flow.ts @@ -15,12 +15,36 @@ export const FlowDetailTaskSchema = BaseTaskSchema.extend({ export const FlowCreateTaskSchema = BaseTaskSchema.extend({ type: z.literal("flow-create-task"), - specificationId: z.string(), - formState: z.string(), - form: z.record(z.string(), z.string()), - details: z.record(z.string(), z.any()), + specificationId: z.string().optional(), + formState: z.string().optional(), + form: z.record(z.string(), z.any()).optional(), + details: z.record(z.string(), z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FlowUpdateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-update-task"), + specificationId: z.string().optional(), + formState: z.string().optional(), + form: z.record(z.string(), z.any()).optional(), + details: z.record(z.string(), z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const RecalculateApprovalFlowTaskSchema = BaseTaskSchema.extend({ + type: z.literal("recalculate-the-approval-flow"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FlowListTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-list"), + specificationId: z.string().optional(), + combineFilters: z.any().optional(), onError: OnErrorSchema.optional(), }).passthrough(); export type FlowDetailTask = z.infer; export type FlowCreateTask = z.infer; +export type FlowUpdateTask = z.infer; +export type RecalculateApprovalFlowTask = z.infer; +export type FlowListTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/index.ts b/src/domains/platform/workflow/models/nodes/index.ts index d9c71c3..daf8e1f 100644 --- a/src/domains/platform/workflow/models/nodes/index.ts +++ b/src/domains/platform/workflow/models/nodes/index.ts @@ -2,10 +2,23 @@ import { z } from "zod"; import type { WorkflowTask } from "./common.js"; import { createConditionTaskSchema } from "./condition.js"; import { createEveryTaskSchema } from "./every.js"; +import { + createIfTaskSchema, + createLoopTaskSchema, + createWhileTaskSchema, + createAmortizationTaskSchema, + createApportionTaskSchema, +} from "./control.js"; import { WebhookTaskSchema } from "./webhook.js"; import { StopTaskSchema } from "./stop.js"; import { HttpTaskSchema } from "./http.js"; -import { FlowDetailTaskSchema, FlowCreateTaskSchema } from "./flow.js"; +import { + FlowDetailTaskSchema, + FlowCreateTaskSchema, + FlowUpdateTaskSchema, + RecalculateApprovalFlowTaskSchema, + FlowListTaskSchema, +} from "./flow.js"; import { CodeTaskSchema, CodeJs2TaskSchema } from "./code.js"; import { EkuaibaoDatalinkFilterTaskSchema, @@ -13,9 +26,57 @@ import { DataConvertTaskSchema, } from "./datalink.js"; import { DynamicDelayTaskSchema } from "./delay.js"; +import { + MessageDingtalkTaskSchema, + MessageFeishuTaskSchema, + FeishuSendMsgTaskSchema, + MessageSmsTaskSchema, + EmailTaskSchema, + MessageInternetTaskSchema, + MessageOutnetTaskSchema, + OaReminderTaskSchema, +} from "./message.js"; +import { + AiClassificationTaskSchema, + AiExtractionTaskSchema, + AiAttachmentTaskSchema, + EkbAiTaskSchema, + EkbMinimaxTextTaskSchema, + EkbMinimaxPhotoTaskSchema, + EkbAiPdfTaskSchema, + EkbAiUrlTaskSchema, + DifyTaskSchema, +} from "./ai.js"; +import { + EkuaibaoStaffFilterTaskSchema, + EkuaibaoStaffDetailTaskSchema, + StaffCreateTaskSchema, + DepartmentCreateTaskSchema, + DepartmentFilterTaskSchema, + EkuaibaoDepartmentDetailTaskSchema, + EkuaibaoDepartmentUpdateTaskSchema, + FeishuDepartmentFilterTaskSchema, + WecomDepartmentTaskSchema, + SearchStaffByRoleTaskSchema, + RoleUpdateTaskSchema, +} from "./org.js"; +import { + ExcelTaskSchema, + AggregationTaskSchema, + FlowFormatTaskSchema, + TaskLogTaskSchema, + TaskDynamicTestTaskSchema, + TaskOpenapiTaskSchema, + ContextTaskSchema, + DmnTaskSchema, + MappingTaskSchema, + UiDialogTaskSchema, + UiNotificationTaskSchema, + OutputTaskSchema, +} from "./utility.js"; import { UnknownTaskSchema } from "./unknown.js"; -// 导出所有基础与通用类型 +// 导出所有基础与分类模型 export * from "./common.js"; export * from "./http.js"; export * from "./delay.js"; @@ -26,26 +87,84 @@ export * from "./flow.js"; export * from "./datalink.js"; export * from "./condition.js"; export * from "./every.js"; +export * from "./control.js"; +export * from "./message.js"; +export * from "./ai.js"; +export * from "./org.js"; +export * from "./utility.js"; export * from "./unknown.js"; // 递归容器节点 Schema 实例化 export const ConditionTaskSchema: z.ZodType = createConditionTaskSchema(() => WorkflowTaskSchema); export const EveryTaskSchema: z.ZodType = createEveryTaskSchema(() => WorkflowTaskSchema); +export const IfTaskSchema: z.ZodType = createIfTaskSchema(() => WorkflowTaskSchema); +export const LoopTaskSchema: z.ZodType = createLoopTaskSchema(() => WorkflowTaskSchema); +export const WhileTaskSchema: z.ZodType = createWhileTaskSchema(() => WorkflowTaskSchema); +export const AmortizationTaskSchema: z.ZodType = createAmortizationTaskSchema(() => WorkflowTaskSchema); +export const ApportionTaskSchema: z.ZodType = createApportionTaskSchema(() => WorkflowTaskSchema); // 统一任务节点联合 Schema export const WorkflowTaskSchema: z.ZodType = z.union([ WebhookTaskSchema, ConditionTaskSchema, EveryTaskSchema, + IfTaskSchema, + LoopTaskSchema, + WhileTaskSchema, + AmortizationTaskSchema, + ApportionTaskSchema, StopTaskSchema, HttpTaskSchema, FlowDetailTaskSchema, + FlowCreateTaskSchema, + FlowUpdateTaskSchema, + RecalculateApprovalFlowTaskSchema, + FlowListTaskSchema, CodeTaskSchema, CodeJs2TaskSchema, EkuaibaoDatalinkFilterTaskSchema, EkuaibaoDatalinkCreateTaskSchema, DataConvertTaskSchema, - FlowCreateTaskSchema, DynamicDelayTaskSchema, + MessageDingtalkTaskSchema, + MessageFeishuTaskSchema, + FeishuSendMsgTaskSchema, + MessageSmsTaskSchema, + EmailTaskSchema, + MessageInternetTaskSchema, + MessageOutnetTaskSchema, + OaReminderTaskSchema, + AiClassificationTaskSchema, + AiExtractionTaskSchema, + AiAttachmentTaskSchema, + EkbAiTaskSchema, + EkbMinimaxTextTaskSchema, + EkbMinimaxPhotoTaskSchema, + EkbAiPdfTaskSchema, + EkbAiUrlTaskSchema, + DifyTaskSchema, + EkuaibaoStaffFilterTaskSchema, + EkuaibaoStaffDetailTaskSchema, + StaffCreateTaskSchema, + DepartmentCreateTaskSchema, + DepartmentFilterTaskSchema, + EkuaibaoDepartmentDetailTaskSchema, + EkuaibaoDepartmentUpdateTaskSchema, + FeishuDepartmentFilterTaskSchema, + WecomDepartmentTaskSchema, + SearchStaffByRoleTaskSchema, + RoleUpdateTaskSchema, + ExcelTaskSchema, + AggregationTaskSchema, + FlowFormatTaskSchema, + TaskLogTaskSchema, + TaskDynamicTestTaskSchema, + TaskOpenapiTaskSchema, + ContextTaskSchema, + DmnTaskSchema, + MappingTaskSchema, + UiDialogTaskSchema, + UiNotificationTaskSchema, + OutputTaskSchema, UnknownTaskSchema, ]); diff --git a/src/domains/platform/workflow/models/nodes/message.ts b/src/domains/platform/workflow/models/nodes/message.ts new file mode 100644 index 0000000..3fc4c50 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/message.ts @@ -0,0 +1,75 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 消息通知相关节点 ────────────────────────────────────────────────────────── + +export const MessageDingtalkTaskSchema = BaseTaskSchema.extend({ + type: z.literal("message-dingtalk"), + receiverType: z.string().optional(), + receivers: z.array(z.any()).optional(), + content: z.string().optional(), + title: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const MessageFeishuTaskSchema = BaseTaskSchema.extend({ + type: z.literal("message-feishu"), + receiverType: z.string().optional(), + receivers: z.array(z.any()).optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FeishuSendMsgTaskSchema = BaseTaskSchema.extend({ + type: z.literal("feishu-sendMsg"), + receiverType: z.string().optional(), + receivers: z.array(z.any()).optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const MessageSmsTaskSchema = BaseTaskSchema.extend({ + type: z.literal("message"), + receivers: z.array(z.any()).optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EmailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("email"), + receivers: z.array(z.any()).optional(), + title: z.string().optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const MessageInternetTaskSchema = BaseTaskSchema.extend({ + type: z.literal("message-internet"), + receivers: z.array(z.any()).optional(), + title: z.string().optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const MessageOutnetTaskSchema = BaseTaskSchema.extend({ + type: z.literal("message-outnet"), + receivers: z.array(z.any()).optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const OaReminderTaskSchema = BaseTaskSchema.extend({ + type: z.literal("oa"), + receivers: z.array(z.any()).optional(), + content: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type MessageDingtalkTask = z.infer; +export type MessageFeishuTask = z.infer; +export type FeishuSendMsgTask = z.infer; +export type MessageSmsTask = z.infer; +export type EmailTask = z.infer; +export type MessageInternetTask = z.infer; +export type MessageOutnetTask = z.infer; +export type OaReminderTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/org.ts b/src/domains/platform/workflow/models/nodes/org.ts new file mode 100644 index 0000000..45cf1cc --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/org.ts @@ -0,0 +1,82 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 组织架构与人员/部门节点 ─────────────────────────────────────────────────── + +export const EkuaibaoStaffFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-staff-filter"), + combineFilters: z.any().optional(), + filters: z.array(z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoStaffDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-staff-detail"), + staffId: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const StaffCreateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("staff-create"), + form: z.record(z.string(), z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const DepartmentCreateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("department-create"), + form: z.record(z.string(), z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const DepartmentFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("department-filter"), + combineFilters: z.any().optional(), + filters: z.array(z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoDepartmentDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-department-detail"), + departmentId: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoDepartmentUpdateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-department-update"), + departmentId: z.string().optional(), + form: z.record(z.string(), z.any()).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FeishuDepartmentFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("feishu-department-filter"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const WecomDepartmentTaskSchema = BaseTaskSchema.extend({ + type: z.literal("wecom-department"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const SearchStaffByRoleTaskSchema = BaseTaskSchema.extend({ + type: z.literal("search-staff-by-role"), + roleId: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const RoleUpdateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("role-update"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type EkuaibaoStaffFilterTask = z.infer; +export type EkuaibaoStaffDetailTask = z.infer; +export type StaffCreateTask = z.infer; +export type DepartmentCreateTask = z.infer; +export type DepartmentFilterTask = z.infer; +export type EkuaibaoDepartmentDetailTask = z.infer; +export type EkuaibaoDepartmentUpdateTask = z.infer; +export type FeishuDepartmentFilterTask = z.infer; +export type WecomDepartmentTask = z.infer; +export type SearchStaffByRoleTask = z.infer; +export type RoleUpdateTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/utility.ts b/src/domains/platform/workflow/models/nodes/utility.ts new file mode 100644 index 0000000..e30dd2f --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/utility.ts @@ -0,0 +1,80 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 基础通用/工具类节点 ──────────────────────────────────────────────────────── + +export const ExcelTaskSchema = BaseTaskSchema.extend({ + type: z.literal("excel"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const AggregationTaskSchema = BaseTaskSchema.extend({ + type: z.literal("aggregation"), + list: z.any().optional(), + groupBy: z.any().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FlowFormatTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-format"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TaskLogTaskSchema = BaseTaskSchema.extend({ + type: z.literal("task-log"), + message: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TaskDynamicTestTaskSchema = BaseTaskSchema.extend({ + type: z.literal("task-dynamic-test"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TaskOpenapiTaskSchema = BaseTaskSchema.extend({ + type: z.literal("task-openapi"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const ContextTaskSchema = BaseTaskSchema.extend({ + type: z.literal("context"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const DmnTaskSchema = BaseTaskSchema.extend({ + type: z.literal("dmn"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const MappingTaskSchema = BaseTaskSchema.extend({ + type: z.literal("mapping"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const UiDialogTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ui-dialog"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const UiNotificationTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ui-notification"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const OutputTaskSchema = BaseTaskSchema.extend({ + type: z.literal("output"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type ExcelTask = z.infer; +export type AggregationTask = z.infer; +export type FlowFormatTask = z.infer; +export type TaskLogTask = z.infer; +export type TaskDynamicTestTask = z.infer; +export type TaskOpenapiTask = z.infer; +export type ContextTask = z.infer; +export type DmnTask = z.infer; +export type MappingTask = z.infer; +export type UiDialogTask = z.infer; +export type UiNotificationTask = z.infer; +export type OutputTask = z.infer; From 03fa30ca82f80a65d211a31e7b78e4adf66f4457 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Mon, 2 Nov 2026 23:52:22 +0800 Subject: [PATCH 08/12] =?UTF-8?q?docs(memory):=20=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=B2=88=E7=8E=A5=E5=A6=8D=E6=B5=8B=E8=AF=95=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E8=87=AA=E4=B8=BB=E8=A1=A5=E5=85=85=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E5=85=A8=E9=87=8F=E5=8F=AF=E7=94=A8=E8=8A=82=E7=82=B9=E5=85=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 记录灰度网关 53 个未开通节点批量解锁过程(达到 107 个可用节点); - 记录 Piper EASO JWT 生成机制与设计器独立鉴权加载; - 记录 16 个多类别代表性工作流节点在画布上的编排与静态门禁分析结果。 --- .workbuddy/memory/2026-11-02.md | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.workbuddy/memory/2026-11-02.md b/.workbuddy/memory/2026-11-02.md index 3864ca6..53fbac1 100644 --- a/.workbuddy/memory/2026-11-02.md +++ b/.workbuddy/memory/2026-11-02.md @@ -62,3 +62,46 @@ - `application/javascript` - `text/html` - `application/xml` + +## 4. 沈玥妍测试企业自主补充工作流全量可用节点 + +### 4.1 背景与边界 +- **测试企业**: 沈玥妍测试企业 (`ID01ofWoOC1wiX` [🧪 测试]) +- **操作员工**: 谢子豪 (`ID01ofWoOC1wiX:ID01KsDgHaH5nN`) +- **目标流程**: `857320807633186842` (`未命名流程OMcjrw`) + +### 4.2 灰度全量解锁 (107/108 个节点) +- 探查官方灰度网关,发现当前企业共有 53 个灰度节点处于未开通状态; +- 执行 `hose-use workflow nodes grant` 批量免密开通全量 53 个灰度节点; +- 开通后,租户拥有 83 个 action 节点、6 个 control 节点、18 个 trigger 节点,全量可用节点达到 107 个。 + +### 4.3 浏览器端 Piper 逆向鉴权与工作流设计器加载 +- 发现 `https://unity.ekuaibao.com/api/realms/EASO` 返回的是 1 段式 Bearer token,而 Piper 后端要求标准 3 段式 JWT。 +- 逆向得出正确的 EASO JWT 生成接口: + `GET https://app.ekuaibao.com/api/engine/realm/$EASO/actions/jwt?corpId=`(携带 accesstoken, corpid, staffid 请求头)。 +- 将取得的 JWT 存入 localStorage `jwtToken`,成功在 Kimi WebBridge 浏览器中完整加载 `https://piper.ekuaibao.com/#/workflow/857320807633186842`。 + +### 4.4 参考工作流多类别节点完整编排 +在沈玥妍测试企业的工作流 `857320807633186842` 中,依次补充并成功保存了覆盖全部分类的 16 个节点全链路: +1. `trigger_1`: 定时触发 (`clock`) [触发器] +2. `action_6hfh88`: 查询单据详情 (`flow-detail`) [业务单据] +3. `action_mhjko9`: 代码节点 (`code` MVEL 脚本) [通用代码] +4. `action_23lsze`: 创建单据 (`flow-create-task`) [业务单据] +5. `action_4fcd9s`: JS节点(新) (`code-js2`) [通用代码] +6. `action_iz22vg`: http节点 (`http` 带凭证调用) [通用网络] +7. `action_k7b0xb`: 延迟执行节点 (`task-dynamic-delay`) [通用流控] +8. `action_0mhuwa`: 重算审批流 (`recalculate-the-approval-flow`) [业务审批] +9. `action_e5mzyn`: 修改单据 (`flow-update-task`) [业务单据] +10. `action_uc6ph8`: 钉钉消息 (`message-dingtalk`) [消息通知] +11. `action_tt1b29`: 查询人员 (`ekuaibao-staff-filter`) [组织架构] +12. `action_uut5b0`: 导出表格 (`excel`) [通用报表] +13. `action_3ivkgn`: AI智能匹配 (`ai-classification`) [AI能力] +14. `control_cond1`: 条件节点 (`condition`) [流程控制容器] + - 14.1 `action_sub_log`: 流程日志 (`task-log`) [容器子节点] +15. `action_iqhn3b`: 终止节点 (`stop`) [流程控制] + +### 4.5 代码库静态分析与 Schema 全面对齐 +1. 在 `src/domains/platform/workflow/models/nodes/` 补齐了 `ai.ts`, `control.ts`, `message.ts`, `org.ts`, `utility.ts`,导出并重现 `specs/workflow-schema.json`; +2. 修复分析器 `KNOWN_TYPES`,接入 `isKnownGrayNodeType`,使得分析器静态识别 108 个官方已知节点类型; +3. 执行 `hose-use workflow analyze 857320807633186842`:0 项硬门禁阻断,完美通过。 + From c620f9ccfb52af79905edec5bd79905403fd294c Mon Sep 17 00:00:00 2001 From: yunyingk Date: Tue, 3 Nov 2026 10:21:02 +0800 Subject: [PATCH 09/12] =?UTF-8?q?docs(memory):=20=E8=AE=B0=E5=BD=95=20CSM?= =?UTF-8?q?=20=E5=B7=A5=E4=BD=9C=E6=B5=81=20881196955148578838=20=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=E5=8F=91=E5=B8=83=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 记录李志财账号在 CSM 发布方案一工作流 (state=1); - 记录静态门禁 0 错误 0 建议全绿验证结果。 --- .workbuddy/memory/2026-11-03.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .workbuddy/memory/2026-11-03.md diff --git a/.workbuddy/memory/2026-11-03.md b/.workbuddy/memory/2026-11-03.md new file mode 100644 index 0000000..ce7977b --- /dev/null +++ b/.workbuddy/memory/2026-11-03.md @@ -0,0 +1,18 @@ +# 2026-11-03 工作记录 + +## 1. CSM 工作流 881196955148578838(方案一)正式发布上线 +- **目标企业**: CSM (`Cxa3oOtQi2eS$g`) +- **操作员工**: 李志财 (`2HQbkGx2DgnM00`) +- **目标工作流**: `881196955148578838` (方案一) +- **执行命令**: + ```bash + hose-use workflow publish 881196955148578838 --corp='Cxa3oOtQi2eS$g' --yes + ``` +- **验证结果**: + - 远端发布成功:`state=1`,`updateUser: "李志财"`,`updateTime: "2026-11-03 10:20:22"`。 + - 静态门禁静态分析(`workflow analyze`): + - 状态:🟢 启用 (state=1) + - 门禁裁决:✅ 已执行的静态检查未发现阻断项 + - 硬门禁数:0 项 + - 软建议数:0 项 + - 诊断列表:未发现明显配置问题 From f033c661477a597e840baddeb9511e241e342a38 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Tue, 3 Nov 2026 10:55:51 +0800 Subject: [PATCH 10/12] =?UTF-8?q?feat(workflow):=20=E6=96=B0=E5=A2=9E=20wo?= =?UTF-8?q?rkflow=20link=20=E5=85=8D=E5=AF=86=E7=9B=B4=E8=BE=BE=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=B9=B6=E8=A1=A5=E9=BD=90=20108=20=E4=B8=AA=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E8=8A=82=E7=82=B9=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 工作流设计器免密直达命令 (workflow link / url / web): - 接入合思 EASO Realm 动态换取三段式 JWT 凭证; - 自动解析目标工作流所属企业、员工身份与自建应用平台名称; - 包含高特权安全警告、有效期限与一键点击直达链接; - 支持结构化 --json 输出。 2. 节点原子模型 108 个全量覆盖: - 新增 trigger.ts (18 触发器)、integration.ts (第三方与定制数据)、invoice-tmc.ts (发票与差旅)、requisition.ts (事项与易商卡); - 统一由 models/nodes/index.ts 导出并重新生成 specs/workflow-schema.json,实现官方 108 个节点 100% 强类型覆盖。 3. 质量与文档保障: - 补充 workflow link 单元测试并通过全量 968 项测试与 tsc 校验; - 更新 README 文档与 command-metadata 注册表。 --- specs/workflow-schema.json | 8067 ++++++++++++++++- src/cli/command-metadata.ts | 7 +- src/cli/commands/workflow.test.ts | 85 + src/cli/commands/workflow/README.workflow.md | 1 + src/cli/commands/workflow/index.ts | 7 +- src/cli/commands/workflow/link.ts | 135 + .../workflow/models/nodes/README.nodes.md | 8 +- .../platform/workflow/models/nodes/code.ts | 10 +- .../workflow/models/nodes/datalink.ts | 26 +- .../platform/workflow/models/nodes/flow.ts | 27 + .../platform/workflow/models/nodes/index.ts | 107 +- .../workflow/models/nodes/integration.ts | 95 + .../workflow/models/nodes/invoice-tmc.ts | 31 + .../platform/workflow/models/nodes/org.ts | 6 + .../workflow/models/nodes/requisition.ts | 34 + .../platform/workflow/models/nodes/trigger.ts | 114 + 16 files changed, 8716 insertions(+), 44 deletions(-) create mode 100644 src/cli/commands/workflow/link.ts create mode 100644 src/domains/platform/workflow/models/nodes/integration.ts create mode 100644 src/domains/platform/workflow/models/nodes/invoice-tmc.ts create mode 100644 src/domains/platform/workflow/models/nodes/requisition.ts create mode 100644 src/domains/platform/workflow/models/nodes/trigger.ts diff --git a/specs/workflow-schema.json b/specs/workflow-schema.json index ae72080..46e5d8e 100644 --- a/specs/workflow-schema.json +++ b/specs/workflow-schema.json @@ -269,6 +269,860 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "clock" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "triggerDateTime": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "timezone": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "start" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "mode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "dateField": { + "type": "string" + }, + "advanceDays": { + "type": "number" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-flowform-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "flowState": { + "type": "string" + }, + "event": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-create-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-time-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + }, + "dateField": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "datalink-button-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + }, + "buttonCode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "objectDescribeApiName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "xrxs-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "event": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-create-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-time-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ebot-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "botId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "other-event-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "eventType": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hab-trigger-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "appCode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-requisition-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -1270,6 +2124,247 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-detail-versioned" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "flowCode": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-sample-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ebot-approval-flow" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "risk" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -1396,8 +2491,87 @@ "groupName", "orderIndex", "levelIndex", - "status", - "code" + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "code-js" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "code": { + "type": "string" + }, + "mapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false + } + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" ], "additionalProperties": {} }, @@ -1572,6 +2746,18 @@ }, "combineFilters": { "$ref": "#/$defs/__schema1" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false } }, "required": [ @@ -1590,6 +2776,93 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-edit" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "entityId": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": {} + }, + "required": [ + "key" + ], + "additionalProperties": {} + } + }, + "filters": { + "type": "array", + "items": {} + }, + "combineFilters": { + "$ref": "#/$defs/__schema1" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -1684,14 +2957,7 @@ "groupName", "orderIndex", "levelIndex", - "status", - "mode", - "path", - "fields", - "subType", - "itemType", - "targetType", - "feeFormType" + "status" ], "additionalProperties": {} }, @@ -3404,6 +4670,64 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-dynamic-ding-attendance" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -4224,6 +5548,1351 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "eBridge-mapData" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ebridge-auth" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-auth" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-sync" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-delete" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-select" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-comment" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-zs" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "escape" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hl-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hl" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mapping-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "invoice-verification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-invoice-inspector" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-invoice-datalink-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-requision-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "requisitionId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-fee-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-requisition-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-fee-detail-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -4396,6 +7065,860 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "clock" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "triggerDateTime": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "timezone": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "start" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "mode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "dateField": { + "type": "string" + }, + "advanceDays": { + "type": "number" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-flowform-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "flowState": { + "type": "string" + }, + "event": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-create-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-time-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + }, + "dateField": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "datalink-button-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + }, + "buttonCode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "objectDescribeApiName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "xrxs-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "event": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-create-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-time-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ebot-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "botId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "other-event-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "eventType": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hab-trigger-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "appCode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-requisition-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -5397,6 +8920,247 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-detail-versioned" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "flowCode": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-sample-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ebot-approval-flow" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "risk" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -5523,8 +9287,87 @@ "groupName", "orderIndex", "levelIndex", - "status", - "code" + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "code-js" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "code": { + "type": "string" + }, + "mapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false + } + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" ], "additionalProperties": {} }, @@ -5699,6 +9542,18 @@ }, "combineFilters": { "$ref": "#/$defs/__schema0" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false } }, "required": [ @@ -5717,6 +9572,93 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-edit" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "entityId": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": {} + }, + "required": [ + "key" + ], + "additionalProperties": {} + } + }, + "filters": { + "type": "array", + "items": {} + }, + "combineFilters": { + "$ref": "#/$defs/__schema0" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -5811,14 +9753,7 @@ "groupName", "orderIndex", "levelIndex", - "status", - "mode", - "path", - "fields", - "subType", - "itemType", - "targetType", - "feeFormType" + "status" ], "additionalProperties": {} }, @@ -7531,6 +11466,64 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-dynamic-ding-attendance" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -8351,6 +12344,1351 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "eBridge-mapData" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ebridge-auth" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-auth" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-sync" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-delete" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-select" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-comment" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-zs" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "escape" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hl-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hl" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mapping-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "invoice-verification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-invoice-inspector" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-invoice-datalink-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-requision-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "requisitionId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-fee-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-requisition-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-fee-detail-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -8598,6 +13936,860 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "clock" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "triggerDateTime": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "timezone": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "start" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "mode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "dateField": { + "type": "string" + }, + "advanceDays": { + "type": "number" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-flowform-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "flowState": { + "type": "string" + }, + "event": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-create-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-time-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + }, + "dateField": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "datalink-button-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "datalinkModelId": { + "type": "string" + }, + "buttonCode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "objectDescribeApiName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "xrxs-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "event": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-create-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-change-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-time-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ebot-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "botId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "other-event-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "eventType": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hab-trigger-task" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "appCode": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-requisition-trigger" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -9599,6 +15791,247 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-detail-versioned" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "flowCode": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "flow-sample-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ebot-approval-flow" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "risk" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -9725,8 +16158,87 @@ "groupName", "orderIndex", "levelIndex", - "status", - "code" + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "code-js" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "code": { + "type": "string" + }, + "mapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false + } + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" ], "additionalProperties": {} }, @@ -9901,6 +16413,18 @@ }, "combineFilters": { "$ref": "#/$defs/__schema1" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false } }, "required": [ @@ -9919,6 +16443,93 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-datalink-edit" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "entityId": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": {} + }, + "required": [ + "key" + ], + "additionalProperties": {} + } + }, + "filters": { + "type": "array", + "items": {} + }, + "combineFilters": { + "$ref": "#/$defs/__schema1" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -10013,14 +16624,7 @@ "groupName", "orderIndex", "levelIndex", - "status", - "mode", - "path", - "fields", - "subType", - "itemType", - "targetType", - "feeFormType" + "status" ], "additionalProperties": {} }, @@ -11733,6 +18337,64 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-dynamic-ding-attendance" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { @@ -12553,6 +19215,1351 @@ ], "additionalProperties": {} }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "eBridge-mapData" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ebridge-auth" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-auth" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "fxiaoke-list" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-sync" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-create" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "netsuite-delete" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-select" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-comment" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "tr-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "task-zs" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "escape" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hl-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "hl" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mapping-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "invoice-verification" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-invoice-inspector" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-invoice-datalink-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-tmc-datalink-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-requision-detail" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "specificationId": { + "type": "string" + }, + "requisitionId": { + "type": "string" + }, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-fee-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-requisition-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "const": "ekuaibao-ecard-fee-detail-filter" + }, + "label": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "orderIndex": { + "type": "number" + }, + "levelIndex": { + "type": "array", + "items": { + "type": "number" + } + }, + "status": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "combineFilters": {}, + "onError": { + "type": "object", + "properties": { + "defaultAction": { + "type": "string" + } + }, + "required": [ + "defaultAction" + ], + "additionalProperties": false + } + }, + "required": [ + "name", + "type", + "label", + "groupName", + "orderIndex", + "levelIndex", + "status" + ], + "additionalProperties": {} + }, { "type": "object", "properties": { diff --git a/src/cli/command-metadata.ts b/src/cli/command-metadata.ts index c04df15..a90286d 100644 --- a/src/cli/command-metadata.ts +++ b/src/cli/command-metadata.ts @@ -221,7 +221,8 @@ export const COMMAND_METADATA: Record = { "enum": "查询在线枚举字典(不可用时使用内置字典)", "lint-script": "静态检查 JavaScript / MVEL 脚本", "eval-script": "在本地沙箱中模拟执行脚本", - "webhook": "向工作流 Webhook 触发器发送测试数据 (别名: webhook-send)" + "webhook": "向工作流 Webhook 触发器发送测试数据 (别名: webhook-send)", + "link": "生成工作流设计器 (Piper) 免密直达链接 (包含特权警告)" }, "options": [ "--flow=<单号> 指定测试单据", @@ -274,7 +275,9 @@ export const COMMAND_METADATA: Record = { "dictionary": "enum", "dict": "enum", "webhook-send": "webhook", - "webhooks": "webhook" + "webhooks": "webhook", + "url": "link", + "web": "link" }, flags: { ...flagList("all allow-prod allow-production auto-publish autoPublish compare detail diff empty errors f fail fail-on-alert failOnAlert failed failed-only failedOnly follow force force-write forceWrite full has-error hasError in-place inPlace includeDetail json none once publish snapshot v value-json valueJson verbose with-tasks withTasks timeline progress steps", "boolean"), ...flagList("a admin-key adminKey after app app-id appId b bill body c code code-file container count d data desc description display display-name displayName end-time endTime entity execution-logs field file filter flow flow-code flowCode from i id input input-file insert-after interval job job-id job1 job2 jobA jobB jobId json-file keyword l label limit log logs mapping mapping-file max-jobs maxJobs n name node node-id nodeId nodes output output-file outputFile p page page-size pageSize parent parent-id parentId password path payload pipeline pipeline-id pipelineId platform platform-id platformId pwd q query record s sample sample-id sampleId seconds set size sleep-time sleepTime snapshot1 snapshot2 snapshotA snapshotB source start-time startTime state state-file stateFile t target targetName targetPlatformId task taskType third-id thirdId timeout timeout-ms timeoutMs to trigger type types value workflowId", "value") } }, diff --git a/src/cli/commands/workflow.test.ts b/src/cli/commands/workflow.test.ts index 2099fd5..c80687e 100644 --- a/src/cli/commands/workflow.test.ts +++ b/src/cli/commands/workflow.test.ts @@ -2331,5 +2331,90 @@ describe("CLI - workflow list 轻量化与名称搜索", () => { expect(data.workflows[0].pipelineName).toBe("待摊台账拆分计划"); expect(data.totalWorkflows).toBe(1); }); + + it("workflow link 生成高特权免密直达链接并输出安全警告与自建应用信息", async () => { + const mockSessionClient = { + get: () => ({ + json: async () => ({ id: "mock.jwt.token" }), + }), + }; + spies.push( + spyOn(helpers, "createClientsForCorp").mockResolvedValue({ + sessionClient: mockSessionClient, + } as any), + spyOn(platformServices, "listAllWorkflows").mockResolvedValue({ + workflows: [ + { + id: "wf_001", + pipelineName: "待摊台账拆分计划", + platformId: "app_platform_1", + platformName: "商机台账", + state: 1, + }, + ] as any, + errors: [], + }) + ); + + const res = await handleWorkflowCommand( + { + area: "workflow", + action: "link", + args: ["wf_001"], + options: {}, + raw: ["workflow", "link", "wf_001"], + }, + mockRuntime + ); + + expect(res.exitCode).toBe(0); + expect(res.stdout).toContain("【高特权免密直达警告】"); + expect(res.stdout).toContain("所属自建应用 : 商机台账 (app_platform_1)"); + expect(res.stdout).toContain("目标工作流 : 待摊台账拆分计划 (wf_001)"); + expect(res.stdout).toContain("https://piper.ekuaibao.com/#/workflow/wf_001?jwtToken=mock.jwt.token&$platformId=app_platform_1"); + }); + + it("workflow link --json 返回结构化授权链接与警告信息", async () => { + const mockSessionClient = { + get: () => ({ + json: async () => ({ id: "mock.jwt.token" }), + }), + }; + spies.push( + spyOn(helpers, "createClientsForCorp").mockResolvedValue({ + sessionClient: mockSessionClient, + } as any), + spyOn(platformServices, "listAllWorkflows").mockResolvedValue({ + workflows: [ + { + id: "wf_001", + pipelineName: "待摊台账拆分计划", + platformId: "app_platform_1", + platformName: "商机台账", + state: 1, + }, + ] as any, + errors: [], + }) + ); + + const res = await handleWorkflowCommand( + { + area: "workflow", + action: "link", + args: ["wf_001"], + options: { json: true }, + raw: ["workflow", "link", "wf_001", "--json"], + }, + { ...mockRuntime, jsonMode: true } + ); + + expect(res.exitCode).toBe(0); + const data = JSON.parse(res.stdout); + expect(data.pipelineId).toBe("wf_001"); + expect(data.platformName).toBe("商机台账"); + expect(data.jwtToken).toBe("mock.jwt.token"); + expect(data.warning).toContain("特权"); + }); }); diff --git a/src/cli/commands/workflow/README.workflow.md b/src/cli/commands/workflow/README.workflow.md index e2b9091..2aa510e 100644 --- a/src/cli/commands/workflow/README.workflow.md +++ b/src/cli/commands/workflow/README.workflow.md @@ -15,6 +15,7 @@ | [analyze.ts](./analyze.ts)、[check.ts](./check.ts)、[diff.ts](./diff.ts) | 静态分析、健康检查与配置/执行差异 | | [script.ts](./script.ts)、[test.ts](./test.ts) | 脚本校验、求值与工作流测试 | | [tail.ts](./tail.ts)、[webhook.ts](./webhook.ts)、[enum.ts](./enum.ts) | 执行监听、Webhook 与业务枚举 | +| [link.ts](./link.ts) | 工作流设计器 (Piper) 免密直达链接签发与高特权安全警告 | ## 保存和执行契约 diff --git a/src/cli/commands/workflow/index.ts b/src/cli/commands/workflow/index.ts index 5956d5d..c033895 100644 --- a/src/cli/commands/workflow/index.ts +++ b/src/cli/commands/workflow/index.ts @@ -16,6 +16,7 @@ import { handleWorkflowTailCommand } from "./tail.js"; import { handleWorkflowLintScript, handleWorkflowEvalScript } from "./script.js"; import { handleWorkflowEnum } from "./enum.js"; import { handleWebhookCommand } from "./webhook.js"; +import { handleWorkflowLink } from "./link.js"; export async function handleWorkflowCommand( parsed: CliParsedArgs, @@ -121,10 +122,14 @@ export async function handleWorkflowCommand( case "webhook-send": case "webhooks": return handleWebhookCommand(parsed, runtime); + case "link": + case "url": + case "web": + return handleWorkflowLink(parsed, runtime); default: return { stdout: "", - stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, refresh-chooses, history, logs, job, diff, diff-job, check, test, copy, create, delete, node, tail, lint-script, eval-script, enum, webhook\n`, + stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, refresh-chooses, history, logs, job, diff, diff-job, check, test, copy, create, delete, node, tail, lint-script, eval-script, enum, webhook, link\n`, exitCode: 1, }; } diff --git a/src/cli/commands/workflow/link.ts b/src/cli/commands/workflow/link.ts new file mode 100644 index 0000000..8393577 --- /dev/null +++ b/src/cli/commands/workflow/link.ts @@ -0,0 +1,135 @@ +import { stringOption } from "../../parser.js"; +import { printJson } from "../../printer.js"; +import type { CliParsedArgs, CliResult, CliRuntime } from "../../types.js"; +import { createClientsForCorp } from "../../helpers.js"; +import { listAllWorkflows } from "../../../domains/platform/workflow/services.js"; + +// ── 工作流设计器 (Piper) 免密直达链接签发 ──────────────────────────────────── + +export async function handleWorkflowLink( + parsed: CliParsedArgs, + runtime: CliRuntime +): Promise { + const corp = runtime.selectedCorp!; + const pipelineId = + parsed.args[0] || + stringOption(parsed.options, ["id", "pipelineId", "workflowId", "pipeline"]); + + if (!pipelineId) { + return { + stdout: "", + stderr: [ + "请提供工作流 ID: hose-use workflow link [选项]", + "", + "常用选项:", + " --corp= 指定企业 (默认当前企业)", + " --platform-id= 指定所属自建应用 ID (可选,默认自动识别)", + " --json 输出结构化 JSON 格式", + "", + "示例:", + " hose-use workflow link 881196955148578838", + ].join("\n") + "\n", + exitCode: 1, + }; + } + + const clients = await createClientsForCorp(corp); + + // 1. 查询工作流元数据及所属自建应用平台信息 + let platformId = stringOption(parsed.options, ["platform-id", "platformId", "app-id", "appId"]); + let platformName = ""; + let pipelineName = ""; + let workflowState: number | undefined; + + try { + const all = await listAllWorkflows(clients, { page: 1, pageSize: 100 }); + const match = all.workflows.find((w) => w.id === pipelineId); + if (match) { + pipelineName = match.pipelineName || ""; + platformId = platformId || match.platformId || ""; + platformName = match.platformName || ""; + workflowState = match.state; + } + } catch { + // 容错降级 + } + + platformId = platformId || corp.corpId || corp.id; + + // 2. 向 EASO Realm 申请专属 3 段式 JWT 授权凭据 + let jwt = ""; + try { + const jwtRes = await clients.sessionClient.get("api/engine/realm/$EASO/actions/jwt", { + searchParams: { corpId: corp.corpId || corp.id }, + }).json<{ id: string }>(); + jwt = jwtRes.id; + } catch (err) { + const errMsg = err instanceof Error ? err.message : String(err); + return { + stdout: "", + stderr: `获取 EASO JWT 授权凭据失败: ${errMsg}\n请确认当前会话是否有效或重新登录。\n`, + exitCode: 1, + }; + } + + const directUrl = `https://piper.ekuaibao.com/#/workflow/${pipelineId}?jwtToken=${jwt}&$platformId=${encodeURIComponent(platformId)}`; + + if (runtime.jsonMode) { + const output = { + pipelineId, + pipelineName: pipelineName || pipelineId, + corpId: corp.corpId || corp.id, + corpName: corp.name, + env: corp.env || (corp.isTest ? "test" : "prod"), + staffId: corp.staffId, + staffName: corp.staffName || corp.staffId, + platformId, + platformName: platformName || "自建应用", + state: workflowState, + jwtToken: jwt, + url: directUrl, + warning: "⚠️ 该直达链接具备以当前员工身份免密直接访问和修改工作流的最高特权,严禁外泄!", + }; + return { + stdout: printJson(output, runtime.outputOptions), + stderr: "", + exitCode: 0, + }; + } + + const envTag = corp.isTest ? "🧪 测试环境" : "🚨 生产环境"; + const stateText = + workflowState === 1 + ? "🟢 启用中 (state=1)" + : workflowState === 0 + ? "⚪ 停用/草稿 (state=0)" + : "未知"; + + const lines = [ + "⚠️ 【高特权免密直达警告】(HIGH PRIVILEGE DIRECT ACCESS WARNING)", + " ----------------------------------------------------------------------", + " • 该链接包含有效 3 段式 EASO JWT 授权凭证,在浏览器中打开即直接以当前员工身份进入!", + " • 具有对该工作流的所有节点配置、代码脚本、版本发布及运行实例的完全编辑/删除/调试权限!", + " • 严禁将该链接发送到群聊、公开工单或不受信渠道;使用完毕后请及时关闭会话标签页。", + " ----------------------------------------------------------------------", + "", + "====== 合思工作流设计器 (Piper) 免密直达链接 ======", + ` 企业名称 : ${corp.name} (${corp.corpId || corp.id}) [${envTag}]`, + ` 操作人身份 : ${corp.staffName || "未指定姓名"} (${corp.staffId})`, + ` 所属自建应用 : ${platformName ? `${platformName} (${platformId})` : platformId}`, + ` 目标工作流 : ${pipelineName ? `${pipelineName} (${pipelineId})` : pipelineId}`, + ` 当前流程状态 : ${stateText}`, + " 凭证有效时长 : 约 2 小时 (由合思 EASO Realm 动态颁发)", + "", + " 直达链接:", + ` ${directUrl}`, + "", + `Markdown 直达: [打开「${platformName || "工作流"}」设计器 (${pipelineName || pipelineId} - ${corp.staffName || "免密"})](${directUrl})`, + ]; + + return { + stdout: `${lines.join("\n")}\n`, + stderr: "", + exitCode: 0, + }; +} diff --git a/src/domains/platform/workflow/models/nodes/README.nodes.md b/src/domains/platform/workflow/models/nodes/README.nodes.md index edea255..13bd28a 100644 --- a/src/domains/platform/workflow/models/nodes/README.nodes.md +++ b/src/domains/platform/workflow/models/nodes/README.nodes.md @@ -11,9 +11,10 @@ | [delay.ts](./delay.ts) | 动态延迟等待节点(`task-dynamic-delay` / `sleepTime`) | | [code.ts](./code.ts) | 脚本代码节点(MVEL `code` / JavaScript `code-js2`) | | [webhook.ts](./webhook.ts) | Webhook 外部触发器节点(`sampleId` / `urlPath`) | +| [trigger.ts](./trigger.ts) | 工作流官方触发器全家桶(`clock`、`start`、单据与台账变更触发器等 18 类) | | [stop.ts](./stop.ts) | 终止流程控制节点(`stop`) | -| [flow.ts](./flow.ts) | 单据操作节点(`flow-detail` 查询详情 / `flow-create-task` 创建单据 / `flow-update-task` / `recalculate-the-approval-flow`) | -| [datalink.ts](./datalink.ts) | 数据连接台账与转换节点(`ekuaibao-datalink-filter`、`create` 与 `data-convert`) | +| [flow.ts](./flow.ts) | 单据操作节点(`flow-detail` 查询详情 / `flow-create-task` 创建单据 / `flow-update-task` / `recalculate-the-approval-flow` 等) | +| [datalink.ts](./datalink.ts) | 数据连接台账与转换节点(`ekuaibao-datalink-filter`、`create`、`edit` 与 `data-convert`) | | [condition.ts](./condition.ts) | 条件分支控制节点工厂(`createConditionTaskSchema`) | | [every.ts](./every.ts) | 依次执行循环控制节点工厂(`createEveryTaskSchema`) | | [control.ts](./control.ts) | 流程控制节点工厂(`if`、`loop`、`while`、`amortization`、`apportion`) | @@ -21,6 +22,9 @@ | [ai.ts](./ai.ts) | AI 智能匹配、提取与大模型节点(`ai-classification`、`ai-extraction`、`ai-attachment`、`ekb-ai`、`dify` 等) | | [org.ts](./org.ts) | 组织架构人员与部门节点(`ekuaibao-staff-filter`、`ekuaibao-staff-detail`、`staff-create`、`department-create` 等) | | [utility.ts](./utility.ts) | 基础通用工具节点(`excel` 导出表格、`aggregation` 分类汇总、`flow-format`、`task-log` 流程日志、`dmn` 等) | +| [integration.ts](./integration.ts) | 第三方系统集成与定制数据节点(NetSuite、纷享销客、易桥、天润工单、招商银行等) | +| [invoice-tmc.ts](./invoice-tmc.ts) | 发票验真巡检与差旅/TMC行程数据节点(`invoice-verification`、`invoice-inspector` 等) | +| [requisition.ts](./requisition.ts) | 申请事项与易商卡/随手记节点(`ekuaibao-requision-detail`、`ekuaibao-ecard-fee-filter` 等) | | [unknown.ts](./unknown.ts) | 兜底节点模型(未知节点类型全透传) | | [index.ts](./index.ts) | 实例化递归容器节点、聚合统一 `WorkflowTaskSchema` 并集中导出 | diff --git a/src/domains/platform/workflow/models/nodes/code.ts b/src/domains/platform/workflow/models/nodes/code.ts index f466f04..9779217 100644 --- a/src/domains/platform/workflow/models/nodes/code.ts +++ b/src/domains/platform/workflow/models/nodes/code.ts @@ -10,10 +10,18 @@ export const CodeTaskSchema = BaseTaskSchema.extend({ export const CodeJs2TaskSchema = BaseTaskSchema.extend({ type: z.literal("code-js2"), - code: z.string(), + code: z.string().optional(), + mapping: z.array(z.object({ key: z.string(), value: z.string() })).optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const CodeJsTaskSchema = BaseTaskSchema.extend({ + type: z.literal("code-js"), + code: z.string().optional(), mapping: z.array(z.object({ key: z.string(), value: z.string() })).optional(), onError: OnErrorSchema.optional(), }).passthrough(); export type CodeTask = z.infer; export type CodeJs2Task = z.infer; +export type CodeJsTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/datalink.ts b/src/domains/platform/workflow/models/nodes/datalink.ts index e493de5..0f85468 100644 --- a/src/domains/platform/workflow/models/nodes/datalink.ts +++ b/src/domains/platform/workflow/models/nodes/datalink.ts @@ -24,20 +24,32 @@ export const EkuaibaoDatalinkCreateTaskSchema = BaseTaskSchema.extend({ fields: z.array(FieldMappingSchema), filters: z.array(z.any()), combineFilters: FilterGroupSchema, + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoDatalinkEditTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-datalink-edit"), + mode: z.string().optional(), + entityId: z.string().optional(), + fields: z.array(FieldMappingSchema).optional(), + filters: z.array(z.any()).optional(), + combineFilters: FilterGroupSchema.optional(), + onError: OnErrorSchema.optional(), }).passthrough(); export const DataConvertTaskSchema = BaseTaskSchema.extend({ type: z.literal("data-convert"), - mode: z.string(), - path: z.array(z.string()), - fields: z.array(z.object({ key: z.string(), value: z.string() })), + mode: z.string().optional(), + path: z.array(z.string()).optional(), + fields: z.array(z.object({ key: z.string(), value: z.string() })).optional(), onError: OnErrorSchema.optional(), - subType: z.string(), - itemType: z.string(), - targetType: z.string(), - feeFormType: z.string(), + subType: z.string().optional(), + itemType: z.string().optional(), + targetType: z.string().optional(), + feeFormType: z.string().optional(), }).passthrough(); export type EkuaibaoDatalinkFilterTask = z.infer; export type EkuaibaoDatalinkCreateTask = z.infer; +export type EkuaibaoDatalinkEditTask = z.infer; export type DataConvertTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/flow.ts b/src/domains/platform/workflow/models/nodes/flow.ts index a6464b8..e9254b8 100644 --- a/src/domains/platform/workflow/models/nodes/flow.ts +++ b/src/domains/platform/workflow/models/nodes/flow.ts @@ -43,8 +43,35 @@ export const FlowListTaskSchema = BaseTaskSchema.extend({ onError: OnErrorSchema.optional(), }).passthrough(); +export const FlowDetailVersionedTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-detail-versioned"), + specificationId: z.string().optional(), + flowCode: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FlowSampleListTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-sample-list"), + specificationId: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EbotApprovalFlowTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ebot-approval-flow"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const RiskTaskSchema = BaseTaskSchema.extend({ + type: z.literal("risk"), + onError: OnErrorSchema.optional(), +}).passthrough(); + export type FlowDetailTask = z.infer; export type FlowCreateTask = z.infer; export type FlowUpdateTask = z.infer; export type RecalculateApprovalFlowTask = z.infer; export type FlowListTask = z.infer; +export type FlowDetailVersionedTask = z.infer; +export type FlowSampleListTask = z.infer; +export type EbotApprovalFlowTask = z.infer; +export type RiskTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/index.ts b/src/domains/platform/workflow/models/nodes/index.ts index daf8e1f..edb3249 100644 --- a/src/domains/platform/workflow/models/nodes/index.ts +++ b/src/domains/platform/workflow/models/nodes/index.ts @@ -10,6 +10,25 @@ import { createApportionTaskSchema, } from "./control.js"; import { WebhookTaskSchema } from "./webhook.js"; +import { + ClockTriggerTaskSchema, + StartTriggerTaskSchema, + FlowChangeTriggerTaskSchema, + EkuaibaoFlowformTriggerTaskSchema, + EkuaibaoDatalinkCreateTriggerTaskSchema, + EkuaibaoDatalinkChangeTriggerTaskSchema, + EkuaibaoDatalinkTimeTriggerTaskSchema, + DatalinkButtonTriggerTaskSchema, + FxiaokeTriggerTaskSchema, + XrxsTriggerTaskSchema, + EkuaibaoTmcDatalinkCreateTriggerTaskSchema, + EkuaibaoTmcDatalinkChangeTriggerTaskSchema, + EkuaibaoTmcDatalinkTimeTriggerTaskSchema, + EkuaibaoEbotTriggerTaskSchema, + OtherEventTriggerTaskSchema, + HabTriggerTaskSchema, + EkuaibaoRequisitionTriggerTaskSchema, +} from "./trigger.js"; import { StopTaskSchema } from "./stop.js"; import { HttpTaskSchema } from "./http.js"; import { @@ -18,11 +37,16 @@ import { FlowUpdateTaskSchema, RecalculateApprovalFlowTaskSchema, FlowListTaskSchema, + FlowDetailVersionedTaskSchema, + FlowSampleListTaskSchema, + EbotApprovalFlowTaskSchema, + RiskTaskSchema, } from "./flow.js"; -import { CodeTaskSchema, CodeJs2TaskSchema } from "./code.js"; +import { CodeTaskSchema, CodeJs2TaskSchema, CodeJsTaskSchema } from "./code.js"; import { EkuaibaoDatalinkFilterTaskSchema, EkuaibaoDatalinkCreateTaskSchema, + EkuaibaoDatalinkEditTaskSchema, DataConvertTaskSchema, } from "./datalink.js"; import { DynamicDelayTaskSchema } from "./delay.js"; @@ -57,6 +81,7 @@ import { EkuaibaoDepartmentUpdateTaskSchema, FeishuDepartmentFilterTaskSchema, WecomDepartmentTaskSchema, + TaskDynamicDingAttendanceTaskSchema, SearchStaffByRoleTaskSchema, RoleUpdateTaskSchema, } from "./org.js"; @@ -74,6 +99,35 @@ import { UiNotificationTaskSchema, OutputTaskSchema, } from "./utility.js"; +import { + EBridgeMapDataTaskSchema, + EBridgeAuthTaskSchema, + FxiaokeAuthTaskSchema, + FxiaokeListTaskSchema, + NetsuiteSyncTaskSchema, + NetsuiteCreateTaskSchema, + NetsuiteDeleteTaskSchema, + TrSelectTaskSchema, + TrCommentTaskSchema, + TrDetailTaskSchema, + TaskZsTaskSchema, + EscapeTaskSchema, + HlDetailTaskSchema, + HlTaskSchema, + MappingDetailTaskSchema, +} from "./integration.js"; +import { + InvoiceVerificationTaskSchema, + EkuaibaoInvoiceInspectorTaskSchema, + EkuaibaoInvoiceDatalinkFilterTaskSchema, + EkuaibaoTmcDatalinkFilterTaskSchema, +} from "./invoice-tmc.js"; +import { + EkuaibaoRequisitionDetailTaskSchema, + EkuaibaoEcardFeeFilterTaskSchema, + EkuaibaoEcardRequisitionFilterTaskSchema, + EkuaibaoEcardFeeDetailFilterTaskSchema, +} from "./requisition.js"; import { UnknownTaskSchema } from "./unknown.js"; // 导出所有基础与分类模型 @@ -82,6 +136,7 @@ export * from "./http.js"; export * from "./delay.js"; export * from "./code.js"; export * from "./webhook.js"; +export * from "./trigger.js"; export * from "./stop.js"; export * from "./flow.js"; export * from "./datalink.js"; @@ -92,6 +147,9 @@ export * from "./message.js"; export * from "./ai.js"; export * from "./org.js"; export * from "./utility.js"; +export * from "./integration.js"; +export * from "./invoice-tmc.js"; +export * from "./requisition.js"; export * from "./unknown.js"; // 递归容器节点 Schema 实例化 @@ -106,6 +164,23 @@ export const ApportionTaskSchema: z.ZodType = createApportionTaskS // 统一任务节点联合 Schema export const WorkflowTaskSchema: z.ZodType = z.union([ WebhookTaskSchema, + ClockTriggerTaskSchema, + StartTriggerTaskSchema, + FlowChangeTriggerTaskSchema, + EkuaibaoFlowformTriggerTaskSchema, + EkuaibaoDatalinkCreateTriggerTaskSchema, + EkuaibaoDatalinkChangeTriggerTaskSchema, + EkuaibaoDatalinkTimeTriggerTaskSchema, + DatalinkButtonTriggerTaskSchema, + FxiaokeTriggerTaskSchema, + XrxsTriggerTaskSchema, + EkuaibaoTmcDatalinkCreateTriggerTaskSchema, + EkuaibaoTmcDatalinkChangeTriggerTaskSchema, + EkuaibaoTmcDatalinkTimeTriggerTaskSchema, + EkuaibaoEbotTriggerTaskSchema, + OtherEventTriggerTaskSchema, + HabTriggerTaskSchema, + EkuaibaoRequisitionTriggerTaskSchema, ConditionTaskSchema, EveryTaskSchema, IfTaskSchema, @@ -120,10 +195,16 @@ export const WorkflowTaskSchema: z.ZodType = z.union([ FlowUpdateTaskSchema, RecalculateApprovalFlowTaskSchema, FlowListTaskSchema, + FlowDetailVersionedTaskSchema, + FlowSampleListTaskSchema, + EbotApprovalFlowTaskSchema, + RiskTaskSchema, CodeTaskSchema, CodeJs2TaskSchema, + CodeJsTaskSchema, EkuaibaoDatalinkFilterTaskSchema, EkuaibaoDatalinkCreateTaskSchema, + EkuaibaoDatalinkEditTaskSchema, DataConvertTaskSchema, DynamicDelayTaskSchema, MessageDingtalkTaskSchema, @@ -152,6 +233,7 @@ export const WorkflowTaskSchema: z.ZodType = z.union([ EkuaibaoDepartmentUpdateTaskSchema, FeishuDepartmentFilterTaskSchema, WecomDepartmentTaskSchema, + TaskDynamicDingAttendanceTaskSchema, SearchStaffByRoleTaskSchema, RoleUpdateTaskSchema, ExcelTaskSchema, @@ -166,5 +248,28 @@ export const WorkflowTaskSchema: z.ZodType = z.union([ UiDialogTaskSchema, UiNotificationTaskSchema, OutputTaskSchema, + EBridgeMapDataTaskSchema, + EBridgeAuthTaskSchema, + FxiaokeAuthTaskSchema, + FxiaokeListTaskSchema, + NetsuiteSyncTaskSchema, + NetsuiteCreateTaskSchema, + NetsuiteDeleteTaskSchema, + TrSelectTaskSchema, + TrCommentTaskSchema, + TrDetailTaskSchema, + TaskZsTaskSchema, + EscapeTaskSchema, + HlDetailTaskSchema, + HlTaskSchema, + MappingDetailTaskSchema, + InvoiceVerificationTaskSchema, + EkuaibaoInvoiceInspectorTaskSchema, + EkuaibaoInvoiceDatalinkFilterTaskSchema, + EkuaibaoTmcDatalinkFilterTaskSchema, + EkuaibaoRequisitionDetailTaskSchema, + EkuaibaoEcardFeeFilterTaskSchema, + EkuaibaoEcardRequisitionFilterTaskSchema, + EkuaibaoEcardFeeDetailFilterTaskSchema, UnknownTaskSchema, ]); diff --git a/src/domains/platform/workflow/models/nodes/integration.ts b/src/domains/platform/workflow/models/nodes/integration.ts new file mode 100644 index 0000000..f3aacd7 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/integration.ts @@ -0,0 +1,95 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 第三方系统集成与定制数据节点 ───────────────────────────────────────────── + +export const EBridgeMapDataTaskSchema = BaseTaskSchema.extend({ + type: z.literal("eBridge-mapData"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EBridgeAuthTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ebridge-auth"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FxiaokeAuthTaskSchema = BaseTaskSchema.extend({ + type: z.literal("fxiaoke-auth"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const FxiaokeListTaskSchema = BaseTaskSchema.extend({ + type: z.literal("fxiaoke-list"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const NetsuiteSyncTaskSchema = BaseTaskSchema.extend({ + type: z.literal("netsuite-sync"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const NetsuiteCreateTaskSchema = BaseTaskSchema.extend({ + type: z.literal("netsuite-create"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const NetsuiteDeleteTaskSchema = BaseTaskSchema.extend({ + type: z.literal("netsuite-delete"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TrSelectTaskSchema = BaseTaskSchema.extend({ + type: z.literal("tr-select"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TrCommentTaskSchema = BaseTaskSchema.extend({ + type: z.literal("tr-comment"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TrDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("tr-detail"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const TaskZsTaskSchema = BaseTaskSchema.extend({ + type: z.literal("task-zs"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EscapeTaskSchema = BaseTaskSchema.extend({ + type: z.literal("escape"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const HlDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("hl-detail"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const HlTaskSchema = BaseTaskSchema.extend({ + type: z.literal("hl"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const MappingDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("mapping-detail"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type EBridgeMapDataTask = z.infer; +export type EBridgeAuthTask = z.infer; +export type FxiaokeAuthTask = z.infer; +export type FxiaokeListTask = z.infer; +export type NetsuiteSyncTask = z.infer; +export type NetsuiteCreateTask = z.infer; +export type NetsuiteDeleteTask = z.infer; +export type TrSelectTask = z.infer; +export type TrCommentTask = z.infer; +export type TrDetailTask = z.infer; +export type TaskZsTask = z.infer; +export type EscapeTask = z.infer; +export type HlDetailTask = z.infer; +export type HlTask = z.infer; +export type MappingDetailTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/invoice-tmc.ts b/src/domains/platform/workflow/models/nodes/invoice-tmc.ts new file mode 100644 index 0000000..43c1a08 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/invoice-tmc.ts @@ -0,0 +1,31 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 发票验真巡检与差旅/TMC行程节点 ────────────────────────────────────────── + +export const InvoiceVerificationTaskSchema = BaseTaskSchema.extend({ + type: z.literal("invoice-verification"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoInvoiceInspectorTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-invoice-inspector"), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoInvoiceDatalinkFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-invoice-datalink-filter"), + combineFilters: z.any().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoTmcDatalinkFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-tmc-datalink-filter"), + combineFilters: z.any().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type InvoiceVerificationTask = z.infer; +export type EkuaibaoInvoiceInspectorTask = z.infer; +export type EkuaibaoInvoiceDatalinkFilterTask = z.infer; +export type EkuaibaoTmcDatalinkFilterTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/org.ts b/src/domains/platform/workflow/models/nodes/org.ts index 45cf1cc..f6b43be 100644 --- a/src/domains/platform/workflow/models/nodes/org.ts +++ b/src/domains/platform/workflow/models/nodes/org.ts @@ -58,6 +58,11 @@ export const WecomDepartmentTaskSchema = BaseTaskSchema.extend({ onError: OnErrorSchema.optional(), }).passthrough(); +export const TaskDynamicDingAttendanceTaskSchema = BaseTaskSchema.extend({ + type: z.literal("task-dynamic-ding-attendance"), + onError: OnErrorSchema.optional(), +}).passthrough(); + export const SearchStaffByRoleTaskSchema = BaseTaskSchema.extend({ type: z.literal("search-staff-by-role"), roleId: z.string().optional(), @@ -78,5 +83,6 @@ export type EkuaibaoDepartmentDetailTask = z.infer; export type FeishuDepartmentFilterTask = z.infer; export type WecomDepartmentTask = z.infer; +export type TaskDynamicDingAttendanceTask = z.infer; export type SearchStaffByRoleTask = z.infer; export type RoleUpdateTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/requisition.ts b/src/domains/platform/workflow/models/nodes/requisition.ts new file mode 100644 index 0000000..9ecec82 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/requisition.ts @@ -0,0 +1,34 @@ +import { z } from "zod"; +import { BaseTaskSchema, OnErrorSchema } from "./common.js"; + +// ── 申请事项与易商卡/随手记节点 ────────────────────────────────────────────── + +export const EkuaibaoRequisitionDetailTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-requision-detail"), + specificationId: z.string().optional(), + requisitionId: z.string().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoEcardFeeFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-ecard-fee-filter"), + combineFilters: z.any().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoEcardRequisitionFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-ecard-requisition-filter"), + combineFilters: z.any().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export const EkuaibaoEcardFeeDetailFilterTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-ecard-fee-detail-filter"), + combineFilters: z.any().optional(), + onError: OnErrorSchema.optional(), +}).passthrough(); + +export type EkuaibaoRequisitionDetailTask = z.infer; +export type EkuaibaoEcardFeeFilterTask = z.infer; +export type EkuaibaoEcardRequisitionFilterTask = z.infer; +export type EkuaibaoEcardFeeDetailFilterTask = z.infer; diff --git a/src/domains/platform/workflow/models/nodes/trigger.ts b/src/domains/platform/workflow/models/nodes/trigger.ts new file mode 100644 index 0000000..a3ab019 --- /dev/null +++ b/src/domains/platform/workflow/models/nodes/trigger.ts @@ -0,0 +1,114 @@ +import { z } from "zod"; +import { BaseTaskSchema } from "./common.js"; + +// ── 工作流触发器节点 (全量官方 18 类触发器) ─────────────────────────────────── + +export const ClockTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("clock"), + mode: z.string().optional(), + triggerDateTime: z.string().optional(), + cron: z.string().optional(), + timezone: z.string().optional(), +}).passthrough(); + +export const StartTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("start"), + cron: z.string().optional(), + mode: z.string().optional(), +}).passthrough(); + +export const FlowChangeTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("flow-change-trigger"), + specificationId: z.string().optional(), + dateField: z.string().optional(), + advanceDays: z.number().optional(), +}).passthrough(); + +export const EkuaibaoFlowformTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-flowform-trigger"), + specificationId: z.string().optional(), + flowState: z.string().optional(), + event: z.string().optional(), +}).passthrough(); + +export const EkuaibaoDatalinkCreateTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-datalink-create-trigger"), + datalinkModelId: z.string().optional(), +}).passthrough(); + +export const EkuaibaoDatalinkChangeTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-datalink-change-trigger"), + datalinkModelId: z.string().optional(), +}).passthrough(); + +export const EkuaibaoDatalinkTimeTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-datalink-time-trigger"), + datalinkModelId: z.string().optional(), + dateField: z.string().optional(), +}).passthrough(); + +export const DatalinkButtonTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("datalink-button-trigger"), + datalinkModelId: z.string().optional(), + buttonCode: z.string().optional(), +}).passthrough(); + +export const FxiaokeTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("fxiaoke-trigger"), + objectDescribeApiName: z.string().optional(), +}).passthrough(); + +export const XrxsTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("xrxs-trigger"), + event: z.string().optional(), +}).passthrough(); + +export const EkuaibaoTmcDatalinkCreateTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-tmc-datalink-create-trigger"), +}).passthrough(); + +export const EkuaibaoTmcDatalinkChangeTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-tmc-datalink-change-trigger"), +}).passthrough(); + +export const EkuaibaoTmcDatalinkTimeTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-tmc-datalink-time-trigger"), +}).passthrough(); + +export const EkuaibaoEbotTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-ebot-trigger"), + botId: z.string().optional(), +}).passthrough(); + +export const OtherEventTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("other-event-trigger"), + eventType: z.string().optional(), +}).passthrough(); + +export const HabTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("hab-trigger-task"), + appCode: z.string().optional(), +}).passthrough(); + +export const EkuaibaoRequisitionTriggerTaskSchema = BaseTaskSchema.extend({ + type: z.literal("ekuaibao-requisition-trigger"), + specificationId: z.string().optional(), +}).passthrough(); + +export type ClockTriggerTask = z.infer; +export type StartTriggerTask = z.infer; +export type FlowChangeTriggerTask = z.infer; +export type EkuaibaoFlowformTriggerTask = z.infer; +export type EkuaibaoDatalinkCreateTriggerTask = z.infer; +export type EkuaibaoDatalinkChangeTriggerTask = z.infer; +export type EkuaibaoDatalinkTimeTriggerTask = z.infer; +export type DatalinkButtonTriggerTask = z.infer; +export type FxiaokeTriggerTask = z.infer; +export type XrxsTriggerTask = z.infer; +export type EkuaibaoTmcDatalinkCreateTriggerTask = z.infer; +export type EkuaibaoTmcDatalinkChangeTriggerTask = z.infer; +export type EkuaibaoTmcDatalinkTimeTriggerTask = z.infer; +export type EkuaibaoEbotTriggerTask = z.infer; +export type OtherEventTriggerTask = z.infer; +export type HabTriggerTask = z.infer; +export type EkuaibaoRequisitionTriggerTask = z.infer; From a350612618b88bc24810a2067d0544fc3736ebb2 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Tue, 3 Nov 2026 11:38:49 +0800 Subject: [PATCH 11/12] =?UTF-8?q?fix(workflow):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=91=BD=E4=BB=A4=20dry-run=20=E5=8F=98?= =?UTF-8?q?=E5=BC=82=E9=97=A8=E7=A6=81=E4=B8=8E=E5=8D=95=E6=B5=8B=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修复 workflow node add/edit/map/rm 在 --dry-run 预演模式下越过门禁调用远端接口的问题,确保在无网络或未登录状态下安全完成预览; 2. 为 ergonomics.test.ts 补充隔离的测试企业与配置环境,规避多用例并行干扰。 --- src/cli/commands/workflow/ergonomics.test.ts | 40 +++++++++++++- src/cli/commands/workflow/node.ts | 55 ++++++++++---------- 2 files changed, 66 insertions(+), 29 deletions(-) diff --git a/src/cli/commands/workflow/ergonomics.test.ts b/src/cli/commands/workflow/ergonomics.test.ts index 9052449..f2a1c75 100644 --- a/src/cli/commands/workflow/ergonomics.test.ts +++ b/src/cli/commands/workflow/ergonomics.test.ts @@ -1,8 +1,46 @@ -import { describe, expect, it } from "bun:test"; +import { afterEach, beforeEach, describe, expect, it } from "bun:test"; +import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from "node:fs"; +import { join } from "node:path"; +import { tmpdir } from "node:os"; import { runCli } from "../../runner.js"; import { renderScopedHelp } from "../../help.js"; +const keys = ["HOSE_ENTERPRISES_DIR", "HOSE_CONFIG_FILE"] as const; +const original = keys.map((key) => process.env[key]); +let tempDir = ""; + describe("workflow CLI ergonomics & layered help", () => { + beforeEach(() => { + tempDir = mkdtempSync(join(tmpdir(), "hose-ergonomics-")); + const corps = join(tempDir, "corps"); + mkdirSync(corps, { recursive: true }); + writeFileSync( + join(corps, "corp.json"), + JSON.stringify({ + id: "corp", + name: "Fixture", + source: "manual", + credentials: { accessToken: "fake", corpId: "corp", staffId: "staff" }, + }) + ); + writeFileSync( + join(tempDir, "config.json"), + JSON.stringify({ defaultCorpId: "corp", stateful: true }) + ); + process.env.HOSE_ENTERPRISES_DIR = corps; + process.env.HOSE_CONFIG_FILE = join(tempDir, "config.json"); + }); + + afterEach(() => { + keys.forEach((key, i) => { + if (original[i] === undefined) delete process.env[key]; + else process.env[key] = original[i]; + }); + if (tempDir) { + rmSync(tempDir, { recursive: true, force: true }); + tempDir = ""; + } + }); it("renders specialized layered help for workflow node add", () => { const help = renderScopedHelp(["workflow", "node", "add"]); expect(help).toContain("workflow node add -"); diff --git a/src/cli/commands/workflow/node.ts b/src/cli/commands/workflow/node.ts index 9bfb4b6..bb41096 100644 --- a/src/cli/commands/workflow/node.ts +++ b/src/cli/commands/workflow/node.ts @@ -326,6 +326,17 @@ async function handleAddNode( `hose-use workflow node add ${pipelineId} --type=${type}${label ? ` --label="${label}"` : ""}${displayName ? ` --display-name="${displayName}"` : ""}${parent ? ` --parent="${parent}"` : ""}${after ? ` --after="${after}"` : ""} --yes` ); + if (isDryRun(parsed, runtime)) { + return mutationPreview(parsed, runtime, "追加工作流节点", pipelineId, { + pipelineId, + type, + label: label || "-", + displayName: displayName || "-", + targetLocation: parent ? `容器 [${parent}] 内部` : after ? `节点 [${after}] 之后` : "工作流末尾", + extra: Object.keys(extra).length ? extra : undefined, + }); + } + const { client, platformId } = await createWorkflowDetailClient(parsed, runtime, pipelineId); const detail = await getWorkflowDetail(client, pipelineId); @@ -340,18 +351,6 @@ async function handleAddNode( extra: Object.keys(extra).length ? extra : undefined, }); - if (isDryRun(parsed, runtime)) { - return mutationPreview(parsed, runtime, "追加工作流节点", pipelineId, { - pipelineId, - newNodeName: newTask.name, - type: newTask.type, - label: newTask.label, - displayName: newTask.displayName, - targetLocation: parent ? `容器 [${parent}] 内部` : after ? `节点 [${after}] 之后` : "工作流末尾", - totalTasksCount: updatedWorkflow.tasks?.length || 0, - }); - } - const saveResult = await saveNodeChanges(client, detail, updatedWorkflow, platformId); if (runtime.jsonMode) { @@ -461,6 +460,22 @@ async function handleEditNode( `hose-use workflow node edit ${pipelineId} ${nodeTarget}${label ? ` --label="${label}"` : ""}${displayName ? ` --display-name="${displayName}"` : ""} --yes` ); + if (isDryRun(parsed, runtime)) { + return mutationPreview(parsed, runtime, "修改工作流节点", `${pipelineId}:${nodeTarget}`, { + pipelineId, + nodeName: nodeTarget, + label: label || "-", + displayName: displayName || "-", + updatedFields: { + ...(label ? { label } : {}), + ...(displayName !== undefined ? { displayName } : {}), + ...(desc ? { desc } : {}), + ...(code !== undefined ? { code: `${code.length} 字符${!codeFile && code.length > 300 ? " [TIP: 建议使用 --code-file= 从本地文件载入以规避转义错误并节省 Token]" : ""}` } : {}), + ...customSet, + }, + }); + } + const { client, platformId } = await createWorkflowDetailClient(parsed, runtime, pipelineId); const detail = await getWorkflowDetail(client, pipelineId); @@ -473,22 +488,6 @@ async function handleEditNode( }); const descManaged = desc !== undefined && isServerManagedDescType(editedTask.type); - if (isDryRun(parsed, runtime)) { - return mutationPreview(parsed, runtime, "修改工作流节点", `${pipelineId}:${editedTask.name}`, { - pipelineId, - nodeName: editedTask.name, - label: editedTask.label, - updatedFields: { - ...(label ? { label } : {}), - ...(displayName !== undefined ? { displayName } : {}), - ...(desc && !descManaged ? { desc } : {}), - ...(descManaged ? { desc: "服务端托管,已跳过" } : {}), - ...(code !== undefined ? { code: `${code.length} 字符${!codeFile && code.length > 300 ? " [TIP: 建议使用 --code-file= 从本地文件载入以规避转义错误并节省 Token]" : ""}` } : {}), - ...customSet, - }, - }); - } - const saveResult = await saveNodeChanges(client, detail, updatedWorkflow, platformId); if (runtime.jsonMode) { From 6e51008b7b27db3a7fcfd330b3e55ab1aca9e5c6 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Tue, 3 Nov 2026 11:40:48 +0800 Subject: [PATCH 12/12] release: v0.8.22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 工作流节点原子模型 108 个全量收录与强类型化重构; - 新增工作流设计器免密直达命令 (workflow link / url / web); - 规范化 HTTP 节点连接器与授权字段; - 生产环境 CSM 商机台账工作流修复与上线闭环。 --- .zcode-plugin/plugin.json | 2 +- README.md | 2 +- package.json | 2 +- skills/hose-use/SKILL.md | 4 ++-- specs/hose-open-api/openapi.yaml | 2 +- specs/openapi.json | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.zcode-plugin/plugin.json b/.zcode-plugin/plugin.json index 3d3c3fd..91a35e9 100644 --- a/.zcode-plugin/plugin.json +++ b/.zcode-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "hose-use", - "version": "0.8.21", + "version": "0.8.22", "description": "合思/易快报 (ekuaibao) 企业级 SaaS CLI 与底层 SDK:多账号登录、企业租户切换、单据明细检索、工作流管理、内置 HTTP 服务与常驻守护进程。", "author": { "name": "yingqing" diff --git a/README.md b/README.md index 06b0dc3..22e2c54 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# hose-use (v0.8.21) +# hose-use (v0.8.22) 合思/易快报(ekuaibao)企业级 CLI 命令行工具与底层 SDK。 diff --git a/package.json b/package.json index 4901f01..f2568fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hose-use", - "version": "0.8.21", + "version": "0.8.22", "module": "src/server.ts", "type": "module", "exports": { diff --git a/skills/hose-use/SKILL.md b/skills/hose-use/SKILL.md index 66fcd48..85da749 100644 --- a/skills/hose-use/SKILL.md +++ b/skills/hose-use/SKILL.md @@ -2,11 +2,11 @@ name: hose-use description: "合思/易快报(Ekuaibao)企业级 SaaS 一站式能力:hose-use CLI/SDK 多账号登录、租户切换、单据检索与审批动作、自建应用与工作流扫描、密钥与应用中心、常驻守护进程与 HTTP 文档/OpenAPI,以及工作流 MVEL 代码节点脚本生成调试、节点批量开通。用于一切合思/易快报相关请求。" metadata: - version: 0.8.21 + version: 0.8.22 short-description: 合思/易快报 企业级 CLI 与工作流 skill 套件(含 MVEL 代码节点) --- -# hose-use (v0.8.21) +# hose-use (v0.8.22) 在具备 MCP 的 AI 智能体环境中,**优先使用 `hose_cli` 单工具网关**,传入 `command: string` 执行;在终端或自动化脚本中,直接调用全局 `hose` 或 `hose-use` 命令行。 本 Skill 是智能体的路由分发层:保持主文档简明,遇到复杂业务时深入查阅对应的专属参考文档(`references/*.md`)。 diff --git a/specs/hose-open-api/openapi.yaml b/specs/hose-open-api/openapi.yaml index 3b7d68f..081111b 100644 --- a/specs/hose-open-api/openapi.yaml +++ b/specs/hose-open-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: hose-use API & MCP Tools Specification - version: 0.8.21 + version: 0.8.22 description: >- Unified Enterprise SaaS API, CLI, and MCP Specification for Ekuaibao (合思/易快报), EASO, and Piper Workflows. servers: diff --git a/specs/openapi.json b/specs/openapi.json index c892062..5c42787 100644 --- a/specs/openapi.json +++ b/specs/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "hose-use API & MCP Tools Specification", - "version": "0.8.21", + "version": "0.8.22", "description": "Unified Enterprise SaaS API, CLI, and MCP Specification for Ekuaibao (合思/易快报), EASO, and Piper Workflows." }, "servers": [